Datasets:
Add files using upload-large-folder tool
Browse files- md/train/-zgb2v8vV_w/-zgb2v8vV_w.md +295 -0
- md/train/2rAiDBJgR_/2rAiDBJgR_.md +471 -0
- md/train/BJe-unNYPr/BJe-unNYPr.md +0 -0
- md/train/By-7dz-AZ/By-7dz-AZ.md +251 -0
- md/train/BylQSxHFwr/BylQSxHFwr.md +292 -0
- md/train/EMHoBG0avc1/EMHoBG0avc1.md +397 -0
- md/train/H1sUHgb0Z/H1sUHgb0Z.md +392 -0
- md/train/HJxNAnVtDS/HJxNAnVtDS.md +0 -0
- md/train/HyM7AiA5YX/HyM7AiA5YX.md +212 -0
- md/train/Hye4WaVYwr/Hye4WaVYwr.md +0 -0
- md/train/HyeVtoRqtQ/HyeVtoRqtQ.md +443 -0
- md/train/HyrCWeWCb/HyrCWeWCb.md +428 -0
- md/train/HysBZSqlx/HysBZSqlx.md +189 -0
- md/train/KOtxfjpQsq/KOtxfjpQsq.md +0 -0
- md/train/M3tw78MH1Bk/M3tw78MH1Bk.md +431 -0
- md/train/Q-PA3D1OsDz/Q-PA3D1OsDz.md +285 -0
- md/train/S1_pAu9xl/S1_pAu9xl.md +263 -0
- md/train/SJBr9Mcxl/SJBr9Mcxl.md +228 -0
- md/train/SRDuJssQud/SRDuJssQud.md +458 -0
- md/train/Sk2Im59ex/Sk2Im59ex.md +280 -0
- md/train/Skgy464Kvr/Skgy464Kvr.md +314 -0
- md/train/Sklgs0NFvr/Sklgs0NFvr.md +258 -0
- md/train/SygONjRqKm/SygONjRqKm.md +457 -0
- md/train/SygW0TEFwH/SygW0TEFwH.md +366 -0
- md/train/SyjjD1WRb/SyjjD1WRb.md +299 -0
- md/train/SyxCqGbRZ/SyxCqGbRZ.md +178 -0
- md/train/YNnpaAKeCfx/YNnpaAKeCfx.md +608 -0
- md/train/ak06J5jNR4/ak06J5jNR4.md +236 -0
- md/train/dsmxf7FKiaY/dsmxf7FKiaY.md +255 -0
- md/train/dvyUaK4neD0/dvyUaK4neD0.md +314 -0
- md/train/eJIJF3-LoZO/eJIJF3-LoZO.md +332 -0
- md/train/fV4vvs1J5iM/fV4vvs1J5iM.md +475 -0
- md/train/gvxJzw8kW4b/gvxJzw8kW4b.md +379 -0
- md/train/o2tx_m7hK3t/o2tx_m7hK3t.md +499 -0
- md/train/qcjOWDHAc4J/qcjOWDHAc4J.md +561 -0
- md/train/r1esnoAqt7/r1esnoAqt7.md +310 -0
- md/train/rJGZq6g0-/rJGZq6g0-.md +311 -0
- md/train/rJQDjk-0b/rJQDjk-0b.md +344 -0
- md/train/rJUYGxbCW/rJUYGxbCW.md +380 -0
- md/train/rJgMlhRctm/rJgMlhRctm.md +572 -0
- md/train/rJlDnoA5Y7/rJlDnoA5Y7.md +331 -0
- md/train/rJlf_RVKwr/rJlf_RVKwr.md +509 -0
- md/train/rJxRmlStDB/rJxRmlStDB.md +271 -0
- md/train/rk4Qso0cKm/rk4Qso0cKm.md +340 -0
- md/train/ryxmrpNtvH/ryxmrpNtvH.md +294 -0
- md/train/ryykVe-0W/ryykVe-0W.md +242 -0
- md/train/vKxFYApxBjr/vKxFYApxBjr.md +270 -0
- md/train/wHkKTW2wrmm/wHkKTW2wrmm.md +285 -0
- md/train/yJqcM36Qvnu/yJqcM36Qvnu.md +303 -0
- md/train/zdTW91r2wKO/zdTW91r2wKO.md +308 -0
md/train/-zgb2v8vV_w/-zgb2v8vV_w.md
ADDED
|
@@ -0,0 +1,295 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Adaptive Risk Minimization: Learning to Adapt to Domain Shift
|
| 2 |
+
|
| 3 |
+
Marvin Zhang⇤1, Henrik Marklund⇤2, Nikita Dhawan⇤1, Abhishek Gupta1, Sergey Levine1, Chelsea Finn2
|
| 4 |
+
|
| 5 |
+
1 UC Berkeley, 2 Stanford University
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
A fundamental assumption of most machine learning algorithms is that the training and test data are drawn from the same underlying distribution. However, this assumption is violated in almost all practical applications: machine learning systems are regularly tested under distribution shift, due to changing temporal correlations, atypical end users, or other factors. In this work, we consider the problem setting of domain generalization, where the training data are structured into domains and there may be multiple test time shifts, corresponding to new domains or domain distributions. Most prior methods aim to learn a single robust model or invariant feature space that performs well on all domains. In contrast, we aim to learn models that adapt at test time to domain shift using unlabeled test points. Our primary contribution is to introduce the framework of adaptive risk minimization (ARM), in which models are directly optimized for effective adaptation to shift by learning to adapt on the training domains. Compared to prior methods for robustness, invariance, and adaptation, ARM methods provide performance gains of $1 - 4 \%$ test accuracy on a number of image classification problems exhibiting domain shift.
|
| 10 |
+
|
| 11 |
+
# 1 Introduction
|
| 12 |
+
|
| 13 |
+
The standard assumption in empirical risk minimization (ERM) is that the data distribution at test time will match the training distribution. When this assumption does not hold, i.e., when there is distribution shift, the performance of standard ERM methods can deteriorate significantly [54, 38].
|
| 14 |
+
|
| 15 |
+
As an example which we study quantitatively in Section 5, consider a handwriting classification model that, after training on data from past users, is deployed to new end users. Each new user represents a new test distribution that differs from the training distribution. Thus, each test setting involves dealing with shift. In Figure 1, we visualize a batch of 50 examples from a test user, and we highlight an ambiguous example which may be either a “2” (written with a loop) or an “a” (in the double-storey style) depending on the user’s handwriting. Due to the biases in the training data, an ERM trained model incorrectly classifies this example as “2”. However, we can see that the batch of images from this test user contains other examples of “2” (written without loops) and “a” (also double-storey) from this user. Can we somehow leverage this unlabeled data to better handle test shifts caused by new users?
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Figure 1: An example of ambiguous data points in handwriting classification, evaluated quantitatively in Section 5.
|
| 19 |
+
|
| 20 |
+
Any framework that aims to address this question must use additional assumptions beyond the ERM setting, and many such frameworks have been proposed $\pmb { \Vert 5 4 \Vert }$ . One commonly used assumption within several frameworks, such as domain generalization [7, 23], is that the training data are provided in domains and distributions at test time will represent new domains. The example above neatly fits this description if we equate users with domains – we would be assuming that the training data are organized by users and that the model will be tested separately on new users, and these are reasonable assumptions. Constructing training domains in practice is generally accomplished by using meta-data, which exists for many commonly used datasets. Thus, this domain assumption is applicable for a wide range of realistic distribution shift problems (see, e.g., Koh et al. [35]).
|
| 21 |
+
|
| 22 |
+
However, prior benchmarks for domain generalization and similar settings typically center around invariances – i.e., in these benchmarks, there is a consistent input-output relationship across all domains, and the goal is to learn this relationship while ignoring the spurious correlations within the domains (see, e.g., Gulrajani and Lopez-Paz $[ \overbar { 1 2 3 } ] \cdot$ ). Thus, prior methods aim for generalization to shifts by discovering this relationship, through techniques such as robust optimization and learning an invariant feature space [41, 3, 60]. These methods are appealing in that they make minimal assumptions about the information provided at test time – in particular, they do not require test labels, and the learned model can be immediately applied to predict on a single point. Nevertheless, these methods also have limitations, such as in dealing with problems where the input-output relationship varies across domains, e.g., the handwriting classification example above.
|
| 23 |
+
|
| 24 |
+
In this paper, we instead focus on methods that aim to adapt at test time to domain shift. To do so, we study problems in which it is both feasible and helpful (and perhaps even necessary) to assume access to a batch or stream of inputs at test time. Leveraging this test assumption does not require labels for any test data and is feasible in many practical setups. For example, for handwriting classification, we do not access only single handwritten characters from an end user, but rather collections of characters such as sentences or paragraphs. Unlabeled adaptation has been shown empirically to be useful for distribution shift problems $[ \dot { \overline { { 6 9 } } } , \overline { { 6 3 } } , \overline { { 7 5 } } ]$ , such as for dealing with image corruptions $\mathbb { \left[ \left. 2 5 \right] \right. }$ . Taking inspiration from these findings, we propose and evaluate on a number of problems, detailed in Section 5, for which adaptation is beneficial in dealing with domain shift.
|
| 25 |
+
|
| 26 |
+
Our main contribution is to introduce the framework of adaptive risk minimization (ARM), which proposes the following objective: optimize the model such that it can maximally leverage the unlabeled adaptation phase to handle domain shift. To do so, we instantiate a set of methods that, given a set of training domains, meta-learns a model that is adaptable to these domains. These methods are straightforward extensions of existing meta-learning approaches, thereby demonstrating that tools from the meta-learning toolkit can be readily adapted to tackle domain shift. Our experiments in Section 5 test on several image classification problems, derived from benchmarks for federated learning [9] and image classifier robustness $\mathbb { \lVert 2 5 \rVert }$ , in which training and test domains share structure that can be leveraged for improved performance. These testbeds are also a contribution of our work, as we believe these problems can supplement existing benchmarks which, almost exclusively, are designed with invariance in mind $[ \sqrt { 3 } , \sqrt { 5 3 } , \sqrt { 2 3 } ]$ . We also evaluate on the WILDS suite of distribution shift problems $\begin{array} { r l } { { \bigl [ \bigl | 3 5 \bigr | \bigr ] } } & { { } } \end{array}$ , which have been curated to faithfully represent important real world problems. Empirically, we demonstrate that the proposed ARM methods, by leveraging meta-training and test time adaptation, are often able to outperform prior state-of-the-art methods by $1 \%$ test accuracy.
|
| 27 |
+
|
| 28 |
+
# 2 Related Work
|
| 29 |
+
|
| 30 |
+
A number of prior works have studied distribution shift in various forms $[ [ 5 4 ]$ . In this section, we review prior work in domain generalization, group robustness, meta-learning, and adaptation.
|
| 31 |
+
|
| 32 |
+
Invariance and robustness to domains. As discussed above, a number of frameworks leverage training domains to address test time shift. The terminology in prior work is scattered and, depending on the application, includes terms such as “groups”, “datasets”, “subpopulations”, and “users”; in this work, we adopt the term “domains” which we believe is an appropriate unifying term. A number of testbeds for this problem setting have been proposed for image classification, including generalizing to new datasets $\sharp$ , new image types $\pm \boxed { 1 3 9 } \boxed { 5 3 } \cdots$ , and underrepresented demographics $\bar { \mathbb { E O } } \mathbb { I }$ .
|
| 33 |
+
|
| 34 |
+
Prior benchmarks typically assume the existence of a consistent input-output relationship across domains that is learnable by the specified model, thus motivating methods such as learning an invariant feature space [41, 44, 3] or optimizing for worst case group performance $\pmb { \mathbb { B O } } \pmb { \mathbb { G O } } \mathbf { j }$ . In particular, methods for domain generalization – sometimes referred to as multi-source domain adaptation $\lVert \rVert$ or zero shot domain adaptation $\left[ \left[ 7 8 \right] \right]$ – have largely focused on learning invariant features [19, 67, 41, 44, 53]. Gulrajani and Lopez-Paz $\pmb { \left. \pmb { \left. \mathscr { Z } 3 \right. } \right. }$ provide a comprehensive survey of domain generalization benchmarks and find that, surprisingly, ERM is competitive with the state of the art across all the benchmarks considered. In Appendix C, we discuss this finding as well as the performance of an ARM method on this benchmark suite. In Section 5, we identify different problems for which adaptation is helpful, and we find that, on these problems, ARM methods consistently outperform ERM and other non adaptive methods for robustness and invariance.
|
| 35 |
+
|
| 36 |
+
Meta-learning. Meta-learning [62, 6, 71, 27] has been most extensively studied in the context of few shot labeled adaptation [61, 74, 55, 18, 65]. Our aim is not to address few-shot recognition problems, nor to propose a novel meta-learning algorithm, but rather to extend meta-learning paradigms to problems requiring unlabeled adaptation, with the primary goal of tackling distribution shift. This aim differs from previous work in meta-learning for domain generalization $[ \bar { 4 0 } , \bar { 1 } 5 ]$ , which seek to metatrain models for non adaptive generalization performance. We discuss in Section 4 how paradigms such as contextual meta-learning [20, 57] can be readily extended using the ARM framework.
|
| 37 |
+
|
| 38 |
+
Some other meta-learning methods adapt using both labeled and unlabeled data, either in the semi supervised learning setting [56, 81, 42] or the transductive learning setting [51, 46, 2, 29]. These works all assume access to labeled data for adaptation, whereas we propose methods and problems for purely unlabeled adaptation. Prior works in meta-learning for unlabeled adaptation include Yu et al. $\mathbf { [ 8 0 ] }$ , who adapt a policy to imitate human demonstrations in the context of robotic learning; Metz et al. $\lVert \rVert \mathbf { 4 8 } \rVert$ , who meta-learn an update rule for unsupervised representation learning, though they still require labels to learn a predictive model; and Alet et al. [1], who meta-learn adaptive models based on task specific unsupervised objectives. Unlike these prior works, we propose a general framework for tackling distribution shift problems by meta-learning unsupervised adaptation strategies. This framework simplifies the extension of meta-learning paradigms to these problems, encapsulates previous approaches such as the gradient based meta-learning approach of Yu et al. $\pmb { \| 8 0 \| }$ , and sheds light on how to improve existing strategies such as adaptation via batch normalization [43].
|
| 39 |
+
|
| 40 |
+
Adaptation to shift. Unlabeled adaptation has primarily been studied separately from meta-learning. Domain adaptation is a prominent framework that assumes access to test examples at training time $\boxed { 1 3 } , \boxed { 7 6 }$ , similar to transductive learning $\mathbb { | \overline { { { | Z 3 \| } } } | }$ . As such, most domain adaptation methods consider the problem setting where there is a single test distribution $\lVert 6 4 \rVert , \lVert 4 \rVert , \lVert 2 2 \rVert , \dot { \lVert 1 9 \rVert } , \lVert 7 2 \rVert , \lVert 0 \rVert$ , and some of these methods are difficult to apply to problems where there are multiple test distributions. Certain domain adaptation methods have also been applied in the domain generalization setting, such as methods for learning invariant features [19, 67, 41], and we compare to these methods in Section 5.
|
| 41 |
+
|
| 42 |
+
Adaptive methods for domain generalization include Muandet et al. $\mathbb { \oplus 2 }$ and Kumagai and Iwata $\pmb { \Vert 3 7 } \Vert$ who propose a method similar to one of the ARM methods described below. We compare to a version of this method in Appendix E. Blanchard et al. [7] and Blanchard et al. $\pmb { \mathbb { B } } \|$ provide a theoretic study of domain generalization and establish favorable generalization bounds for models that can adapt to domain shift at test time. We summarize some of these results in $\mathsf { S e c t i o n } \ 3 .$ In comparison, our work establishes a framework that makes explicit the connection between adaptation to domain shift and meta-learning, allowing us to devise new methods in a straightforward and principled manner. These methods are amenable to expressive models such as deep neural networks, which enables us to propose and evaluate on problems with raw image observations.
|
| 43 |
+
|
| 44 |
+
Test time adaptation has also been studied for dealing with label shift $\mathbb { \lVert 5 9 \rVert \lVert 5 \rVert \lVert 6 6 \rVert }$ and crafting favorable inductive biases for the domain of interest. For image classification, techniques such as normalizing via the test inputs $\mathbb { E 3 }$ and optimizing self-supervised surrogate losses $\lVert \boldsymbol { 6 9 } \rVert$ have proven effective for adapting to image corruptions $\pmb { \pmb { \bar { 2 } 5 } }$ . We compare to these prior methods in Section 5 and empirically demonstrate the advantage of using training domains to learn how to adapt.
|
| 45 |
+
|
| 46 |
+
# 3 Preliminaries and Notation
|
| 47 |
+
|
| 48 |
+
In this section, we discuss the domain generalization problem setting and formally describe adaptive models. In Section 4, we discuss how adaptive models can be meta-trained via the ARM objective and approach, and we instantiate ARM methods which we empirically evaluate in Section 5.
|
| 49 |
+
|
| 50 |
+
Let $\mathbf { x } \in \mathcal { X }$ and $y \in \mathcal { V }$ represent the input and output, respectively. We can formalize the domain generalization problem setting using the following data generation process $\textcircled { 8 } \textcircled { 1 8 }$ : first, a joint data distribution $p _ { \mathbf { x } y }$ is sampled from a set of distributions $\mathcal { P } _ { \mathbf { x } y }$ , and then some data points are sampled from $p _ { \mathbf { x } y } \underline { { \mathbb { I } } }$ We refer to each $p _ { \mathbf { x } y }$ as a domain, e.g., a particular dataset or user, thus $\mathcal { P } _ { \mathbf { x } y }$ represents the set of all possible domains. We assume that the training dataset is composed of data from $S$ runs of this generative process, organized by domain. An equivalent characterization which we will use for clarity is that, within the training set, there are $S$ domains, and each data point $( \mathbf { x } ^ { ( i ) } , y ^ { ( i ) } )$ is annotated with a domain label $z ^ { ( i ) }$ . Each $z ^ { ( i ) }$ is an integer that takes on a value between 1 and $S$ , indicating which $p _ { \mathbf { x } y }$ generated the $i$ -th training point (though, of course, we do not have access to, or knowledge of, $p _ { \mathbf { x } y }$ itself). At test time, there may be multiple evaluation settings, where each setting is considered separately and contains only unlabeled data sampled via a new run of the same generative process. This data may represent, e.g., a new dataset or user, and the test domains are likely to be distinct from the training domains when $| \mathcal { P } _ { { \bf x } y } |$ is large or infinite.
|
| 51 |
+
|
| 52 |
+
Our formal goal is to optimize for expected performance, e.g., classification accuracy, at test time. To do so, let us first consider predictive models of the form $f : \mathcal { X } \times \mathcal { P } _ { \mathbf { x } } \mathcal { Y }$ , where the model $f$ takes in not just an input $\mathbf { x }$ but also the marginal input distribution $p _ { \mathbf { x } } \in \mathcal { P } _ { \mathbf { x } }$ that $\mathbf { x }$ was sampled from. We refer to $f$ as an adaptive model, as it has the opportunity to use $p _ { \mathbf { x } }$ to adapt its predictions on $\mathbf { x }$ . The underlying assumption is that $p _ { \mathbf { x } }$ provides information about $p _ { y | \mathbf { x } }$ , i.e., $p _ { \mathbf { x } }$ is used as a surrogate input in place of $p _ { \mathbf { x } y }$ . In the worst case, if $p _ { \mathbf { x } }$ and $p _ { y | \mathbf { x } }$ are sampled independently, then the model does not benefit at all from knowing $p _ { \mathbf { x } }$ . In many problems, however, we expect knowledge about $p _ { \mathbf { x } }$ to be useful, e.g., for resolving ambiguity as in the handwriting classification example in Section 1.
|
| 53 |
+
|
| 54 |
+
Theoretically, when $p _ { \mathbf { x } }$ provides information about $p _ { y | \mathbf { x } }$ , and when training and test domains are drawn from the same distribution over $\mathcal { P } _ { \mathbf { x } y }$ , we can establish favorable generalization bounds for the expected performance of $f$ in adapting to domain shift at test time. We can formalize this as follows. First, define a prediction model to be a non adaptive model of the form $g : \mathcal { X } \mathcal { Y }$ , and define the risk for a prediction model $g$ and loss function $\ell$ , under a data distribution $p _ { \mathbf { x } y }$ , as
|
| 55 |
+
|
| 56 |
+
$$
|
| 57 |
+
\mathcal { R } ( g , p _ { \mathbf { x } y } ) \triangleq \mathbb { E } _ { p _ { \mathbf { x } y } } \left[ \ell ( g ( \mathbf { x } ) , y ) \right] .
|
| 58 |
+
$$
|
| 59 |
+
|
| 60 |
+
Further, define the Bayes optimal risk for $\ell$ under $p _ { \mathbf { x } y }$ as
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
\begin{array} { r } { \mathcal { R } ^ { \star } ( p _ { \mathbf { x } y } ) \triangleq \underset { g } { \operatorname* { m i n } } \mathcal { R } ( g , p _ { \mathbf { x } y } ) . } \end{array}
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
Let $\mu$ denote the distribution on $\mathcal { P } _ { \mathbf { x } y }$ from which training and test domains $p _ { \mathbf { x } y }$ are sampled. To avoid overlapping terms, define the adaptive risk for an adaptive model $f$ and $\ell$ , under $\mu$ , to be
|
| 67 |
+
|
| 68 |
+
$$
|
| 69 |
+
\begin{array} { r } { \mathcal { E } ( f , \mu ) \triangleq \mathbb { E } _ { \mu } \left[ \mathbb { E } _ { p _ { \mathbf { x } _ { y } } } \left[ \ell ( f ( \mathbf { x } , p _ { \mathbf { x } } ) , y ) \right] \right] . } \end{array}
|
| 70 |
+
$$
|
| 71 |
+
|
| 72 |
+
We state the following result from Blanchard et al. $\pmb { \mathbb { B } } ] \mathbf l$ , which details a condition on $\mu$ under which $\mathcal { E }$ is a strongly principled objective for learning adaptive models.
|
| 73 |
+
|
| 74 |
+
Lemma 9 from Blanchard et al. [8]. Let $f ^ { \star }$ denote a minimizer of $\mathcal { E }$ for the given $\mu$ . If $\mu$ is a distribution on $\mathcal { P } _ { \mathbf { x } y }$ such that $\mu$ -almost surely it holds that $p _ { y | \mathbf { x } } = M ( p _ { \mathbf { x } } )$ for some deterministic mapping $M$ , then for $\mu$ -almost all $p _ { \mathbf { x } y }$ , we have
|
| 75 |
+
|
| 76 |
+
$$
|
| 77 |
+
\begin{array} { r } { \mathcal { R } \big ( f ^ { \star } \big ( \cdot , p _ { \mathbf { x } } \big ) , p _ { \mathbf { x } y } \big ) = \mathcal { R } ^ { \star } \big ( p _ { \mathbf { x } y } \big ) \implies \mathcal { E } \big ( f ^ { \star } , \mu \big ) = \mathbb { E } _ { \mu } \left[ \mathcal { R } ^ { \star } ( p _ { \mathbf { x } y } ) \right] . } \end{array}
|
| 78 |
+
$$
|
| 79 |
+
|
| 80 |
+
In other words, an adaptive model which minimizes the adaptive risk $\mathcal { E }$ coincides with a Bayes optimal decision function for $p _ { \mathbf { x } y }$ , for $\mu$ -almost all domains $p _ { \mathbf { x } y }$ .
|
| 81 |
+
|
| 82 |
+
Remark. The required condition on $\mu -$ that $p _ { y | \mathbf { x } }$ is determined by $p _ { \mathbf { x } }$ – holds if, and only if, an expert (or oracle) is able to correctly label inputs from a given domain provided only information about the input distribution. This condition holds for the testbeds proposed in this paper, those in Gulrajani and Lopez-Paz $\mathbb { \left. 2 3 \right. }$ , and those in WILDS $\mathbb { \lVert 3 5 \rVert }$ . The condition does not hold for, e.g., standard few shot learning testbeds, where it is possible for two domains with identical input distributions to shuffle their label orderings differently $\pmb { \hat { \mathbb { Z } } } \pmb { \mathbb { \| } }$ . Thus, these problems are outside the scope of this work.
|
| 83 |
+
|
| 84 |
+
This result provides strong justification for learning adaptive models $f$ by minimizing the adaptive risk $\mathcal { E }$ . However, a practical instantiation of this approach requires some approximations. First, we do not know and cannot input $p _ { \mathbf { x } }$ to $f$ in most cases. Instead, we instantiate $f$ such that it takes in a batch of inputs $\mathbf { x } _ { 1 } , \ldots , \mathbf { x } _ { K }$ , all from the same domain, where $K$ can vary. $f$ makes predictions on the whole batch, which also serves as an empirical approximation (i.e., a histogram) $\hat { p } _ { \bf x }$ of $p _ { \mathbf { x } } \mathinner { \| { \boldsymbol { \mathrm { B } } } \| }$ . In our exposition, we will assume that a batch of unlabeled points is available at test time for adaptation. However, we also experiment in $\mathtt { S e c t i o n } 5$ with the streaming setting where the test inputs are observed one at a time and adaptation occurs incrementally.
|
| 85 |
+
|
| 86 |
+
Notice that, if we instead passed in an approximation $\hat { p } _ { { \bf x } y }$ of $p _ { \mathbf { x } y }$ to the model, such as a batch of labeled data $( { \bf x } _ { 1 } , y _ { 1 } ) , \dots , ( { \bf x } _ { K } , y _ { K } )$ , then this setup would resemble the standard few shot metalearning problem $\pmb { \Vert 7 4 \Vert }$ . Formally, a meta-learning model takes in both an input $\mathbf { x }$ and $\hat { p } _ { { \bf x } y }$ , which approximates the distribution that $\mathbf { x }$ was sampled from and thus can be used to adapt the prediction on $\mathbf { x }$ . Compared to our problem setting, the meta-learning formalism can tackle a wider range of problems but also requires more restrictive assumptions, specifically, labels at test time via $\hat { p } _ { { \bf x } y }$ . Transductive meta-learning methods further assume that, in addition to $\hat { p } _ { { \bf x } y }$ , a full batch of inputs $\mathbf { x } _ { 1 } , \ldots , \mathbf { x } _ { K }$ is passed into the model, which allows for better estimation of the input distribution $p _ { \mathbf { x } }$ [51, 46, 29]. The model then makes predictions on this entire batch. In meta-learning terminology, $\hat { p } _ { { \bf x } y }$ and $\mathbf { x } _ { 1 } , \ldots , \mathbf { x } _ { K }$ are often referred to as the support and query, respectively. Therefore, another interpretation of the adaptive models that we study in this work is that they resemble transductive meta-learning models, but they are given only the unlabeled query and not the labeled support set.
|
| 87 |
+
|
| 88 |
+
In the next section, we expand on this connection to develop the ARM framework, which then allows us to bring forward tools from meta-learning to tackle domain shift problems.
|
| 89 |
+
|
| 90 |
+
# 4 Adaptive Risk Minimization
|
| 91 |
+
|
| 92 |
+
In this section, we formally describe the ARM framework, which defines an objective for training adaptive models to tackle domain shift. Furthermore, we propose a general meta-learning algorithm as well as specific methods for optimizing the ARM objective. In Section 5, we test these ARM methods on problems for which unlabeled adaptation can be leveraged for better test performance.
|
| 93 |
+
|
| 94 |
+
# 4.1 Devising the ARM objective
|
| 95 |
+
|
| 96 |
+
We wish to learn an adaptive model $f : \mathcal { X } ^ { K } \to \mathcal { Y } ^ { K }$ to tackle domain shift. As noted, meta-learning methods for labeled adaptation study a similar form of model, and a common approach in many of these methods is to define $f$ such that it is composed of two parts: first, a learner which ingests the data and produces parameters, and second, a prediction model which uses these parameters to make predictions $\boxed { 7 4 } , \boxed { 1 8 } \vert$ . We will follow a similar strategy which, as we will discuss in subsection 4.2, allows us to easily extend and design meta-learning methods towards our goal.
|
| 97 |
+
|
| 98 |
+
In particular, we will decompose the model $f$ into two modules: a standard prediction model $g ( \cdot ; \theta ) : \mathcal { X } \to \mathcal { Y } _ { }$ , that is parameterized by $\theta \in \Theta$ and predicts $y$ given $\mathbf { x }$ , and an adaptation model $h ( \cdot , \cdot ; \phi ) : \ \Theta \times \mathcal { X } ^ { K } \Theta$ , which is parameterized by $\phi$ . $h$ takes in the prediction model parameters $\theta$ and $K$ unlabeled data points and uses the $K$ points to produce adapted parameters $\theta ^ { \prime }$ . This is analogous to the learner in meta-learning, however, $h$ adapts the model parameters using only unlabeled data. We defer the discussion of how to instantiate $h$ to subsection 4.2.2
|
| 99 |
+
|
| 100 |
+
The ARM objective is to optimize $\phi$ and $\theta$ such that $h$ can adapt $g$ using unlabeled data sampled according to a particular domain $z$ . This can be expressed as the optimization problem
|
| 101 |
+
|
| 102 |
+
$$
|
| 103 |
+
\operatorname* { m i n } _ { \theta , \phi } \hat { \mathcal { E } } ( \theta , \phi ) = \mathbb { E } _ { p _ { z } } \left[ \mathbb { E } _ { p _ { \mathbf { x } \cdot p } | z } \left[ \frac { 1 } { K } \sum _ { k = 1 } ^ { K } \ell ( g ( \mathbf { x } _ { k } ; \theta ^ { \prime } ) , y _ { k } ) \right] \right] , \mathrm { ~ w h e r e ~ } \theta ^ { \prime } = h ( \theta , \mathbf { x } _ { 1 } , \ldots , \mathbf { x } _ { K } ; \phi ) .
|
| 104 |
+
$$
|
| 105 |
+
|
| 106 |
+
Note that $\hat { \mathcal { E } }$ is the empirical form of the adaptive risk in $\mathrm { E q u a t i o n } 1$ for the form of $f$ we have defined. Mimicking the generative process from Section 3 that we assume generated the training data, $p _ { z }$ is a categorical distribution over $\{ 1 , \ldots , S \}$ which places uniform probability mass on each training domain, and $p _ { \mathbf { x } y | z }$ assigns uniform probability to only the training points within a particular domain. As we have established theoretically, we expect the trained models to perform well at test time if the test domains are sampled independently and identically – i.e., from the same distribution over $\mathcal { P } _ { \mathbf { x } y } -$ as the training domains. In practice, similar to how meta-learned few shot classification models are evaluated on new and unseen meta-test classes $\textcircled { 7 4 } , \textcircled { 1 8 } \textcircled { }$ , we empirically show in Section 5 that the trained models can generalize to test domains that are not sampled identically to the training domains.
|
| 107 |
+
|
| 108 |
+
# 4.2 Optimizing the ARM objective
|
| 109 |
+
|
| 110 |
+
Algorithm 1 presents a general meta-learning approach for optimizing the ARM objective. As described above, $h$ outputs updated parameters $\theta ^ { \prime }$ using an unlabeled batch of data (line 5). This mimics the adaptation procedure at test time, where we do not assume access to labels (lines 7-8). However, the training update itself does rely on the labels (line 6). We assume that $h$ is differentiable with respect to its input $\theta$ and $\phi$ , thus we use gradient updates on both $\theta$ and $\phi$ to optimize for post adaptation performance on a mini batch of data sampled according to a particular domain $z$ . In practice, we also sample mini batches of domains, rather than just one domain (as written in line 3), to provide a better gradient signal for optimizing $\phi$ and $\theta$
|
| 111 |
+
|
| 112 |
+
# Algorithm 1 Meta-Learning for ARM
|
| 113 |
+
|
| 114 |
+
// Training procedure
|
| 115 |
+
|
| 116 |
+
Require: # training steps $T$ , batch size $K$ , learning rate $\eta$
|
| 117 |
+
|
| 118 |
+
1: Initialize: $\theta , \phi$
|
| 119 |
+
2: for $t = 1 , \dots , T$ do
|
| 120 |
+
3: Sample $z$ uniformly from training domains
|
| 121 |
+
4: Sample $( \mathbf { x } _ { k } , y _ { k } ) \sim p ( \cdot , \cdot | z )$ for $k = 1 , \ldots , K$
|
| 122 |
+
5: $\theta ^ { \prime } \gets h ( \theta , \mathbf { x } _ { 1 } , \ldots , \mathbf { x } _ { K } ; \phi )$
|
| 123 |
+
6: $\begin{array} { r } { ( \theta , \phi ) ( \theta , \phi ) - \eta \nabla _ { ( \theta , \phi ) } \sum _ { k = 1 } ^ { K } \ell ( g ( \mathbf { x } _ { k } ; \theta ^ { \prime } ) , y _ { k } ) } \end{array}$
|
| 124 |
+
|
| 125 |
+
// Test time adaptation procedure
|
| 126 |
+
|
| 127 |
+
Require: $\theta , \phi$ , test batch $\mathbf { x } _ { 1 } , \ldots , \mathbf { x } _ { K }$ 7: $\theta ^ { \prime } \gets h ( \theta , \mathbf { x } _ { 1 } , \ldots , \mathbf { x } _ { K } ; \phi )$ 8: $\hat { y } _ { k } \gets g ( \mathbf x _ { k } ; \theta ^ { \prime } )$ for $k = 1 , \ldots , K$
|
| 128 |
+
|
| 129 |
+
Together, Equation 2 and Algorithm 1 shed light on a number of ways to devise methods for solving the ARM problem. First, we can extend meta-learning paradigms to the ARM problem setting, and any paradigm in which the adaptation model $h$ can be augmented to operate on unlabeled data is readily applicable. As an example, we propose the ARM-CML method, which is inspired by recent works in contextual meta-learning (CML) [20, 57]. Second, we can enhance prior unlabeled adaptation methods by incorporating a meta-training phase that allows the model to better leverage the adaptation. To this end, we propose the ARM-BN method, based on the general approach of adapting using batch normalization (BN) statistics of the test inputs [43, 63, 33, 50]. Third, we can incorporate existing methods for meta-learning unlabeled adaptation to solve domain shift problems. We demonstrate this by proposing the ARM-LL method, which is based on the robotic imitation learning method from Yu et al. $\pmb { \Vert 8 0 \Vert }$ which adapts via a learned loss (LL). All of these methods are straightforward extensions of existing meta-learning and adaptation methods, and this is intentional – we aim to show how existing tools can be readily adapted to tackle domain generalization problems. We summarize the methods here and refer the reader to Appendix B for complete details.
|
| 130 |
+
|
| 131 |
+
ARM-CML. In ARM-CML, the parameters $\phi$ of $h$ define the weights of a context network $\mathrm { f } _ { \mathrm { c o n t } } ( \cdot ; \boldsymbol { \phi } ) : \mathcal { X } \to \mathbb { R } ^ { D }$ , parameterized by the adaptation model parameters $\phi$ . We also instantiate the model with a prediction network $\operatorname { f } _ { \mathrm { p r e d } } ( \cdot , \cdot ; \boldsymbol { \theta } ) \dot { : } \mathcal { X } \times \mathbb { R } ^ { D } \dot { \mathcal { V } }$ , parameterized by $\theta$ . When given a mini batch of inputs, $\mathrm { f _ { c o n t } }$ processes each example $\mathbf { x } _ { k }$ in the mini batch separately and outputs $\mathbf { c } _ { k } \in \mathbb { R } ^ { D }$ for $k = 1 , \ldots , K$ , which are averaged together into a context $\begin{array} { r } { { \mathbf c } = \frac { 1 } { K } \sum _ { k = 1 } ^ { K } { \mathbf c } _ { k } } \end{array}$ . $D$ is a hyperparameter, and in our experiments, we choose to be the dimensionality of $\mathbf { x }$ , such that we can concatenate each image $\mathbf { x } _ { k }$ and the context c along the channel dimension to produce the input to $\mathrm { f _ { p r e d } }$ . In other words, $\mathrm { f _ { p r e d } }$ processes each $\mathbf { x } _ { k }$ separately to produce an estimate of the output $\hat { y } _ { k }$ , but it additionally receives c as input. In this way, $\mathbf { f } _ { \mathrm { c o n t } }$ can provide information about the entire batch of $K$ unlabeled data points to $\mathrm { f _ { p r e d } }$ for predicting the correct outputs.
|
| 132 |
+
|
| 133 |
+
Note that the difference between ARM-CML and prior contextual meta-learning approaches is that, in prior approaches, the context network processes both inputs and outputs to produce each $\mathbf { c } _ { k }$ ARM-CML is designed for the domain generalization setting in which we do not assume access to labels at test time, thus we meta-train for unlabeled adaptation performance at training time.
|
| 134 |
+
|
| 135 |
+
ARM-BN. ARM-BN is a particularly simple method that is applicable for any model $g$ that has BN layers [31] . Practically, training $g$ via ARM-BN follows the same protocol as Ioffe and Szegedy [31] except for two key differences: first, the training batches are sampled from a single domain, rather than from the entire dataset, and second, the normalization statistics are recomputed at test time rather than using a training running average. As noted, this second difference has been explored by several works as a method for test time adaptation, but the first difference is novel to ARM-BN. Following $\mathbb { E } \mathrm { { g o r i t h m } 1 } ,$ ARM-BN defines a meta-training procedure in which $g$ learns to adapt – i.e., compute normalization statistics – using batches of training points sampled from the same domain. We empirically show in Section 5 that, for problems where BN adaptation already has a favorable inductive bias, such as for image classification, further introducing meta-training boosts its performance. We believe that other test time adaptation methods, such as those based on optimizing surrogate losses [69, 75], may similarly benefit from their corresponding meta-training procedures.
|
| 136 |
+
|
| 137 |
+
At a high level, ARM-BN operates in a similar fashion to ARM-CML, thus we group these methods together into the umbrella of contextual approaches, shown in Figure 2 (top). The interpretation of ARM-BN through the contextual approach is that $h$ replaces the running statistics used by standard BN with statistics computed on the batch of inputs, which then serves as the context c. Thus, for ARM-BN, there is no context network, and $h$ has no parameters beyond the model parameters $\theta$ involved in computing BN statistics. The model $g$ is again specified via a prediction network $\mathrm { f _ { p r e d } }$ , which must have BN layers. BN typically tracks a running average of the first and second moments of the activations in these layers, which are then used at test time. ARM-BN defines $h$ such that it swaps out these moments for the moments computed via the activations on the test batch, thus giving us adapted parameters $\theta ^ { \prime }$ if we view the moments as part of the model parameters. This method is remarkably simple, and in deep learning libraries such as PyTorch $\mathbb { \left. \boldsymbol { \bar { 5 2 } } \right. }$ , implementing ARM-BN involves changing a single line of code. However, as shown in Section 5, this method also performs very well empirically, and the adaptation effectiveness is further boosted by meta-training.
|
| 138 |
+
|
| 139 |
+

|
| 140 |
+
Figure 2: In the contextual approach (top), $\mathbf { x } _ { 1 } , \ldots , \mathbf { x } _ { K }$ are summarized into a context c, and we propose two methods for this summarization, either through a separate context network or using batch normalization activations in the model itself. c can then be used by the model to infer additional information about the input distribution. In the gradient based approach (bottom), an unlabeled loss function $\mathcal { L }$ is used for gradient updates to the model parameters, in order to produce parameters that are specialized to the test inputs and can produce more accurate predictions.
|
| 141 |
+
|
| 142 |
+
ARM-LL. ARM-LL, depicted in Figure 2 (bottom), follows the gradient based meta-learning paradigm $\mathbb { \lVert 1 8 \rVert }$ and learns parameters $\theta$ that are amenable to gradient updates on a loss function in order to quickly adapt to a new problem. In other words, $h$ produces $\theta ^ { \prime } \bar { = } \theta - \alpha \nabla _ { \theta } \mathcal { L } ( \theta , \mathbf { x } _ { 1 } , \ldots , \mathbf { x } _ { K } ; \phi )$ , where $\alpha$ is a hyperparameter. Note that the loss function $\mathcal { L }$ used in the gradient updates is different from the original supervised loss function $\ell$ , in that it operates on only the inputs $\mathbf { x }$ , rather than the input output pairs that $\ell$ receives. We follow the general implementation of this approach proposed in Yu et al. $\pmb { \| 8 0 \| }$ . We define $g$ to produce output features $\mathbf { o } \in \mathbb { R } ^ { | \mathcal { V } | }$ that are used as logits when making predictions. We then define the unlabeled loss function $\mathcal { L }$ to be the composition of $g$ and a loss network $\mathsf { f } _ { \mathrm { l o s s } } ( \cdot ; \boldsymbol { \phi } ) : \mathbb { R } ^ { | \mathcal { V } | } \mathbb { R }$ , which takes in the output features from $g$ and produces a scalar. We use the $\ell _ { 2 }$ -norm of these scalars across the batch of inputs as the loss for updating $\theta$ . In other words, $h ( \theta , \mathbf { x } _ { 1 } , . . . , \mathbf { x } _ { K } ; \phi ) = \theta - \alpha \nabla _ { \theta } \| \mathbf { v } \| _ { 2 }$ , where $\mathbf { v } = [ \mathbf { f } _ { \mathrm { l o s s } } ( g ( \mathbf { x } _ { 1 } ; \theta ) ; \phi ) , \dots , \mathbf { f } _ { \mathrm { l o s s } } ( g ( \mathbf { x } _ { K } ; \theta ) ; \phi ) ]$ .
|
| 143 |
+
|
| 144 |
+
# 5 Experiments
|
| 145 |
+
|
| 146 |
+
Our experiments are designed to answer the following questions:
|
| 147 |
+
|
| 148 |
+
1. Do ARM methods learn models that can leverage unlabeled adaptation to tackle domain shift?
|
| 149 |
+
2. How do ARM methods compare to prior methods for robustness, invariance, and adaptation?
|
| 150 |
+
3. Can models trained via ARM methods adapt successfully in the streaming test setting?
|
| 151 |
+
|
| 152 |
+
# 5.1 Evaluation domains and protocol
|
| 153 |
+
|
| 154 |
+
We propose four image classification problems, which we present below and describe in full detail in Appendix D. We also present results on datasets from the WILDS benchmark [35] in subsection 5.4.
|
| 155 |
+
|
| 156 |
+
We believe that the problems we propose in this paper can supplement existing benchmarks for domain shift, which, as discussed above, are designed to test invariances. A key characteristic of the problems presented here is the potential for adaptation to improve test performance, and this differs from prior benchmarks such as the problems compiled by DomainBed [23]. In Appendix C, we compare our testbeds to DomainBed and group robustness benchmarks, and we briefly discuss the results in Gulrajani and Lopez-Paz $\pmb { \left. \pmb { \left. \bar { 2 . 3 } \right. } \right. }$ , which also evaluate ARM-CML.
|
| 157 |
+
|
| 158 |
+
Rotated MNIST. We study a modified version of MNIST where images are rotated in 10 degree increments, from 0 to 130 degrees. We treat each rotation as a separate domain, i.e., a different value of $z$ . We use only 108 training data points for each of the 2 smallest domains (120 and 130 degrees), and 324 points each for rotations 90 to 110, whereas the overall training set contains 32292 points. In this setting, we hypothesize that adaptation can specialize the model to specific domains, in particular the rare domains in the training set. For each test evaluation, we generate images from the MNIST test set with a certain rotation. We measure both worst case and average accuracy across domains.
|
| 159 |
+
|
| 160 |
+
Federated Extended MNIST (FEMNIST). The extended MNIST (EMNIST) dataset consists of images of handwritten uppercase and lowercase letters, in addition to digits [12]. FEMNIST is the same dataset, but it also provides the meta-data of which user generated each data point [9]. We treat each user as a domain. We measure each method’s worst case and average accuracy across 35 test users, which are held out and thus disjoint from the training users. As discussed in Section 1, adaptation may help for this problem for specializing the model and resolving ambiguous data points.
|
| 161 |
+
|
| 162 |
+
Corrupted image datasets. CIFAR-10-C and Tiny ImageNet-C $\lVert 2 5 \rVert$ augment the CIFAR-10 [36] and Tiny ImageNet test sets with common image corruptions that vary in type and severity. The original goal of these augmented test sets was to benchmark how well methods could handle these corruptions without access to any corruptions during training $\mathbb { \left[ \left[ 2 5 \right] \right] }$ . Thus, successful methods for these problems typically have relied on domain knowledge and heuristics designed specifically for image classification. For example, prior work has shown that carefully designed test time adaptation procedures are effective for these problems [69, 63, 75]. One possible reason for this phenomenon is that convolutional networks are biased toward texture $\scriptstyle { \left[ \left[ 2 1 \right] \right] }$ , which is distorted by corruptions, thus adaptation can help the model recover its performance for each corruption type.
|
| 163 |
+
|
| 164 |
+
We study whether meta-training for adaptation performance can improve upon these results. To do so, we modify the protocol from Hendrycks and Dietterich $\mathbb { \left[ \left[ 2 5 \right] \right] }$ to fit into the ARM problem setting by applying a set of 56 corruptions to the training data, and we define each corruption to be a domain. We use a disjoint set of 22 corruptions for the test data, which are mostly of different types from the training corruptions (thus, not sampled identically), and we measure worst case and average accuracy across the test corruptions. This modification allows us to study, for both ARM and prior methods, whether seeing corruptions at training time can help the model deal with new corruptions at test time.
|
| 165 |
+
|
| 166 |
+
# 5.2 Comparisons and ablations
|
| 167 |
+
|
| 168 |
+
We compare the ARM methods against several prior methods designed for robustness, invariance, and adaptation. We describe the comparisons here and provide additional details in Appendix D.
|
| 169 |
+
|
| 170 |
+
Test time adaptation. We evaluate the general approach of using test batches to compute BN statistics [43, 63, 33, 50], which we term BN adaptation. We also compare to test time training (TTT) $\mathbb { \left| \overline { { 6 9 } } \right| }$ which adapts the model at test time using a self-supervised rotation prediction loss. These methods have previously achieved strong results for image classification, likely because they constitute favorable inductive biases for improving on the true classification task [69].
|
| 171 |
+
|
| 172 |
+
Ablations. We also include ablations of the ARM-CML and ARM-LL methods, which sample training batches of unlabeled examples uniformly from the entire training set, rather than sampling from a single domain.3 These “context ablation” and “learned loss ablation” are similar to test time adaptation methods in that they do not require training domains, thus they allow us to evaluate whether or not meta-training on domain shifts is important for improved performance.
|
| 173 |
+
|
| 174 |
+
Group robustness and invariance. Sagawa et al. $\left[ \left[ 6 0 \right] \right]$ recently proposed a state-of-the-art method for group robustness, and we refer to this approach as distributionally robust neural networks (DRNN). Their work also evaluates a strong upweighting (UW) baseline that samples uniformly from each group, and so we also evaluate this approach in our experiments. Additionally, we compare to
|
| 175 |
+
|
| 176 |
+
Table 1: Worst case (WC) and average (Avg) top 1 accuracy on all testbeds, where means and standard errors are reported across three separate runs of each method. Horizontal lines separate methods that make use of (from top to bottom): neither, training domains, test batches, or both. ARM methods consistently achieve greater robustness, measured by WC, and Avg performance compared to prior methods. $^ { * } \mathrm { U W }$ is identical to ERM for CIFAR-10-C and Tiny ImageNet-C.
|
| 177 |
+
|
| 178 |
+
These results have been updated from an earlier version of the paper, primarily for CIFAR10-C, due to significant refactoring of the code, additional hyperparameter tuning for both the ARM methods and the prior methods, and efforts to standardize results across the authors’ different computing environments and library versions. These results are reproducible from the publicly available code: https://github.com/henrikmarklund/arm.
|
| 179 |
+
|
| 180 |
+
<table><tr><td rowspan="2">Method</td><td colspan="2">MNIST</td><td colspan="2">FEMNIST</td><td colspan="2">CIFAR-10-C</td><td colspan="2">Tiny ImageNet-C</td></tr><tr><td>WC</td><td>Avg</td><td>WC</td><td>Avg</td><td>wC</td><td>Avg</td><td>wC</td><td>Avg</td></tr><tr><td>ERM</td><td>74.5 ± 1.4</td><td>93.6±0.4</td><td>62.4±0.4</td><td>79.1± 0.3</td><td>54.1± 0.3</td><td>70.4± 0.1</td><td>20.3±0.5</td><td>41.9 ± 0.1</td></tr><tr><td>UW*</td><td>80.3 ±1.2</td><td>95.1±0.1</td><td>65.7 ± 0.7</td><td>80.3±0.6</td><td></td><td></td><td></td><td></td></tr><tr><td>DRNN</td><td>79.9 ± 0.7</td><td>94.9 ±0.1</td><td>57.5 ± 1.7</td><td>76.5 ± 1.2</td><td>49.3± 0.9</td><td>65.7 ± 0.5</td><td>14.2 ± 0.2</td><td>31.6 ±1.0</td></tr><tr><td>DANN</td><td>78.8±0.8</td><td>94.9 ± 0.1</td><td>65.4 ± 1.0</td><td>81.7 ± 0.3</td><td>53.9±2.2</td><td>69.8±0.3</td><td>20.4± 0.7</td><td>40.9±0.2</td></tr><tr><td>MMD</td><td>82.4±0.9</td><td>95.3± 0.3</td><td>62.4±0.7</td><td>79.8 ±0.4</td><td>52.2 ±0.3</td><td>69.5 ±0.1</td><td>19.7 ±0.2</td><td>40.1±0.1</td></tr><tr><td>BN adaptation</td><td>78.0±0.3</td><td>94.4± 0.1</td><td>65.7 ± 1.5</td><td>80.0 ±0.5</td><td>60.6±0.3</td><td>70.9 ± 0.1</td><td>26.5 ± 0.3</td><td>42.8 ±0.0</td></tr><tr><td>TTT</td><td>81.1±0.3</td><td>95.4±0.1</td><td>68.6 ±0.4</td><td>84.2±0.1</td><td>61.5 ± 0.3</td><td>71.7 ± 0.5</td><td>27.6± 0.5</td><td>37.7 ± 0.3</td></tr><tr><td>CML ablation</td><td>63.5 ± 1.8</td><td>90.1 ±0.2</td><td>61.8 ±0.8</td><td>81.6 ± 0.5</td><td>58.8 ±0.1</td><td>69.6±0.2</td><td>26.3±0.6</td><td>42.5 ± 0.1</td></tr><tr><td>LL ablation</td><td>79.9 ± 1.1</td><td>95.0± 0.3</td><td>64.1 ± 1.6</td><td>80.8 ±0.2</td><td>60.9 ± 0.4</td><td>71.3 ± 0.0</td><td>21.6 ± 2.1</td><td>32.6 ± 3.2</td></tr><tr><td>ARM-CML</td><td>88.0±0.8</td><td>96.3±0.4</td><td>70.9 ± 1.4</td><td>86.4��0.3</td><td>61.2 ± 0.4</td><td>70.3±0.2</td><td>29.1± 0.4</td><td>43.3 ±0.1</td></tr><tr><td>ARM-BN</td><td>83.3 ±0.5</td><td>95.6 ±0.1</td><td>64.5 ±3.2</td><td>83.2 ± 0.5</td><td>61.7 ± 0.3</td><td>72.4±0.3</td><td>28.3± 0.3</td><td>43.3± 0.1</td></tr><tr><td>ARM-LL</td><td>88.9±0.8</td><td>96.9±0.2</td><td>67.0±0.9</td><td>84.3±0.7</td><td>61.2±0.7</td><td>72.5± 0.4</td><td>25.4± 0.1</td><td>35.7 ±0.4</td></tr></table>
|
| 181 |
+
|
| 182 |
+
domain adversarial neural networks (DANN) $\mathbb { \lVert 1 9 \rVert }$ and maximum mean discrepancy (MMD) feature learning [41], two state-of-the-art methods for adversarial learning of invariant predictive features. For the WILDS datasets, we include the numbers reported in Koh et al. $\pmb { \Vert 3 5 \Vert }$ for DRNN and two other invariance methods, correlation alignment (CORAL) $ { \mathbb { I } } { \mathbb { I } }$ and invariant risk minimization (IRM) [3].
|
| 183 |
+
|
| 184 |
+
Robustness and invariance methods assume access to training domains but not test batches, whereas adaptation methods assume the opposite. Thus, at a high level, we can view the comparisons to these methods as evaluating the importance of each of these assumptions for the specified problems.
|
| 185 |
+
|
| 186 |
+
# 5.3 Quantitative evaluation and comparisons
|
| 187 |
+
|
| 188 |
+
The results for the four proposed benchmarks are presented in Table 1. The best results, stratified by classes of methods, are bolded, with the single best result across all methods underlined. Across all of these problems, ARM methods increase both worst case and average accuracy compared to all other methods. ARM-CML performs well across all tasks, and despite its simplicity, ARM-BN achieves the best performance overall on the corrupted image testbeds, demonstrating the effectiveness of metatraining on top of an already strong adaptation procedure. BN adaptation and TTT are the strongest prior methods, as these adaptation procedures constitute inductive biases that are generally well suited for image classification. However, ARM methods are comparatively less reliant on favorable inductive biases and consistently attain better results. In general, we observe poor performance from robustness methods, varying performance from invariance methods, strong performance from adaptation methods, and the strongest performance from ARM methods.
|
| 189 |
+
|
| 190 |
+
When we cannot access a batch of test points all at once, and instead the points are observed in a streaming fashion, we can augment the proposed ARM methods to perform sequential model updates. For example, ARM-CML and ARM-BN can update their average context and normalization statistics, respectively, after observing each new test point. In Figure 3, we study this test setting for the Tiny ImageNet-C problem. We see that both models trained with ARM-CML and ARM-BN are able to achieve near their original worst case and average accuracy within observing 50 data points, well before the training batch size of 100. This result demonstrates that ARM methods are applicable for problems where test points must be observed one at a time, provided that the model is permitted to adapt using each point. We describe in detail how each ARM method can be applied to the streaming setting in Appendix B, and we provide streaming results on rotated MNIST in Appendix E.
|
| 191 |
+
|
| 192 |
+

|
| 193 |
+
Figure 3: In the streaming setting, ARM methods reach strong performance on Tiny ImageNet-C after fewer than 50 data points, despite using training batch sizes of 100. This highlights that the trained models are able to adapt successfully in the standard streaming evaluation setting.
|
| 194 |
+
|
| 195 |
+
Table 2: Results on the WILDS image testbeds. Different methods are best suited for different problems, motivating the need for a wide range of methods. ARM-BN struggles on FMoW but performs well on the other datasets, in particular RxRx1.
|
| 196 |
+
|
| 197 |
+
<table><tr><td></td><td colspan="2">iWildCam</td><td>Camelyon17</td><td>RxRx1</td><td colspan="2">FMoW</td><td colspan="2">PovertyMap</td></tr><tr><td>Method</td><td>Acc</td><td>Macro F1</td><td>Acc</td><td>Acc</td><td>WC Acc</td><td>Avg Acc</td><td>WC Pearson r</td><td>Pearson r</td></tr><tr><td>ERM</td><td>71.6 ± 2.5</td><td>31.0 ±1.3</td><td>70.3±6.4</td><td>29.9 ± 0.4</td><td>32.3±1.25</td><td>53.0±0.55</td><td>0.45±0.06</td><td>0.78±0.04</td></tr><tr><td>DRNN</td><td>72.7±2.0</td><td>23.9 ± 2.1</td><td>68.4± 7.3</td><td>23.0±0.3</td><td>30.8 ±0.81</td><td>52.1±0.5</td><td>0.39 ±0.06</td><td>0.75±0.07</td></tr><tr><td>CORAL</td><td>73.3±4.3</td><td>32.8±0.1</td><td>59.5± 7.7</td><td>28.4±0.3</td><td>31.7 ±1.24</td><td>50.5 ±0.36</td><td>0.44±0.06</td><td>0.78±0.05</td></tr><tr><td>IRM</td><td>59.8 ±3.7</td><td>15.1 ± 4.9</td><td>64.2± 8.1</td><td>8.2 ±1.1</td><td>30.0±1.37</td><td>50.8 ±0.13</td><td>0.43 ± 0.07</td><td>0.77± 0.05</td></tr><tr><td>BN adaptation</td><td>46.4± 1.0</td><td>13.8±0.3</td><td>88.6±1.4</td><td>20.0±0.2</td><td>30.2±0.26</td><td>51.6 ± 0.16</td><td>0.39 ±0.17</td><td>0.82±0.06</td></tr><tr><td>ARM-BN</td><td>70.3±2.4</td><td>23.2 ±2.7</td><td>87.2±0.9</td><td>31.2 ±0.1</td><td>24.6 ±0.04</td><td>42.0±0.21</td><td>0.49±0.21</td><td>0.84±0.05</td></tr></table>
|
| 198 |
+
|
| 199 |
+
# 5.4 WILDS results
|
| 200 |
+
|
| 201 |
+
Finally, we present results on the WILDS benchmark $\pmb { \Vert 3 5 \Vert }$ t Table 2. We evaluate BN adaptation and ARM-BN on these testbeds. We see that, on these real world distribution shift problems, different methods perform well for different problems. CORAL, a method for invariance $\mathbf { \widehat { \mathbf { \phi } } } [ \mathbf { \overline { { 6 7 } } } ] \mathbf { \xi }$ , performs best on the iWildCam animal classification problem [5], whereas no methods outperform ERM by a significant margin on the FMoW [11] or PovertyMap $\textcircled { 1 7 9 }$ satellite imagery problems. ARM-BN performs particularly poorly on the FMoW problem. However, it performs well on PovertyMap and significantly improves performance on the RxRx1 $\mathbb { \ m }$ problem of treatment classification from medical images. On the other medical imagery problem of Camelyon17 [4] tumor identification, adaptation in general boosts performance dramatically. These results indicate the need to consider a wide range of tools, including meta-learning and adaptation, for combating distribution shift.
|
| 202 |
+
|
| 203 |
+
# 6 Discussion and Future Work
|
| 204 |
+
|
| 205 |
+
We presented adaptive risk minimization (ARM), a framework and problem formulation for learning models that can adapt in the face of domain shift at test time using only a batch of unlabeled test examples. We devised an algorithm and instantiated a set of methods for optimizing the ARM objective that meta-learns models that are adaptable to different domains of training data. Empirically, we observed that ARM methods consistently improve performance in terms of both average and worst case metrics, as compared to a number of prior approaches for handling domain shift.
|
| 206 |
+
|
| 207 |
+
Though we provided contextual meta-learning as a concrete example, a number of other meta-learning paradigms would also be interesting to extend to the ARM setting. For example, few shot generative modeling objectives would be a natural fit for unlabeled adaptation $\boxed { 1 6 } \boxed { 2 6 } \boxed { 7 7 }$ . Another exciting direction for future work is to explore the problem setting where domains are not provided at training time. As discussed in $\underline { { \mathrm { ~ A p p e n d i x ~ } } } \mathrm { ~ \bar { E } ~ }$ in this setting, we can instead construct domains via unsupervised learning techniques. Similar to Hsu et al. $\pmb { \left. 2 8 \right. }$ , one promising approach is to generate a diverse set of domains in order to learn generally effective adaptation strategies. Robustness and invariance methods cannot be used easily with multiple different groupings, learned or otherwise, as techniques such as group weighted loss functions $\dot { \left\| 6 0 \right\| }$ and domain classifiers $\mathbb { \lVert 1 9 \rVert }$ are not immediately extendable to this setup. Thus, ARM methods may be uniquely suited to be paired with domain learning.
|
| 208 |
+
|
| 209 |
+
# Acknowledgments and Disclosure of Funding
|
| 210 |
+
|
| 211 |
+
MZ thanks Matt Johnson and Sharad Vikram for helpful discussions and was supported by an NDSEG fellowship. HM is funded by a scholarship from the Dr. Tech. Marcus Wallenberg Foundation for Education in International Industrial Entrepreneurship. AG was supported by an NSF graduate research fellowship. CF is a CIFAR Fellow in the Learning in Machines and Brains program. This research was supported by the DARPA Assured Autonomy and Learning with Less Labels programs.
|
| 212 |
+
|
| 213 |
+
# References
|
| 214 |
+
|
| 215 |
+
[1] F. Alet, M. Bauza, K. Kawaguchi, N. Kuru, T. Lozano-Pérez, and L. Kaelbling. Tailoring: Encoding inductive biases by optimizing unsupervised objectives at prediction time. In Advances in Neural Information Processing Systems (NeurIPS), 2021.
|
| 216 |
+
[2] A. Antoniou and A. Storkey. Learning to learn via self-critique. In Advances in Neural Information Processing Systems (NeurIPS), 2019.
|
| 217 |
+
[3] M. Arjovsky, L. Bottou, I. Gulrajani, and D. Lopez-Paz. Invariant risk minimization. arXiv preprint arXiv:1907.02893, 2019.
|
| 218 |
+
[4] P. Bandi, O. Geessink, Q. Manson, M. Van Dijk, M. Balkenhol, M. Hermsen, B. Bejnordi, B. Lee, K. Paeng, A. Zhong, et al. From detection of individual metastases to classification of lymph node status at the patient level: the CAMELYON17 challenge. IEEE Transactions on Medical Imaging, 2018.
|
| 219 |
+
[5] S. Beery, E. Cole, and A. Gjoka. The iWildCam 2020 competition dataset. arXiv preprint arXiv:2004.10340, 2020.
|
| 220 |
+
[6] S. Bengio, Y. Bengio, J. Cloutier, and J. Gecsei. On the optimization of a synaptic learning rule. In Optimality in Artificial and Biological Neural Networks, 1992.
|
| 221 |
+
[7] G. Blanchard, G. Lee, and C. Scott. Generalizing from several related classification tasks to a new unlabeled sample. In Advances in Neural Information Processing Systems (NIPS), 2011.
|
| 222 |
+
[8] G. Blanchard, A. Deshmukh, U. Dogan, G. Lee, and C. Scott. Domain generalization by marginal transfer learning. Journal of Machine Learning Research (JMLR), 2021.
|
| 223 |
+
[9] S. Caldas, S. Duddu, P. Wu, T. Li, J. Konecnˇ ý, H. McMahan, V. Smith, and A. Talwalkar. LEAF: A benchmark for federated settings. In Workshop on Federated Learning for Data Privacy and Confidentiality, 2019.
|
| 224 |
+
[10] F. Carlucci, L. Porzi, B. Caputo, E. Ricci, and S. Rota Bulò. AutoDIAL: Automatic domaIn alignment layers. In IEEE International Conference on Computer Vision (ICCV), 2017.
|
| 225 |
+
[11] G. Christie, N. Fendley, J. Wilson, and R. Mukherjee. Functional map of the world. In Conference on Computer Vision and Pattern Recognition (CVPR), 2018.
|
| 226 |
+
[12] G. Cohen, S. Afshar, J. Tapson, and A. van Schaik. EMNIST: An extension of MNIST to handwritten letters. arXiv preprint arXiv:1702.05373, 2017.
|
| 227 |
+
[13] G. Csurka. Domain adaptation for visual applications: A comprehensive survey. arXiv preprint arXiv:1702.05374, 2017.
|
| 228 |
+
[14] H. Daumé III. Frustratingly easy domain adaptation. In Conference of the Association for Computational Linguistics (ACL), 2007.
|
| 229 |
+
[15] Q. Dou, D. Castro, K. Kamnitsas, and B. Glocker. Domain generalization via model-agnostic learning of semantic features. In Advances in Neural Information Processing Systems (NeurIPS), 2019.
|
| 230 |
+
[16] H. Edwards and A. Storkey. Towards a neural statistician. In International Conference on Learning Representations (ICLR), 2017.
|
| 231 |
+
[17] C. Fang, Y. Xu, and D. Rockmore. Unbiased metric learning: On the utilization of multiple datasets and web images for softening bias. In IEEE International Conference on Computer Vision (ICCV), 2013.
|
| 232 |
+
[18] C. Finn, P. Abbeel, and S. Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In International Conference on Machine Learning (ICML), 2017.
|
| 233 |
+
[19] Y. Ganin and V. Lempitsky. Unsupervised domain adaptation by backpropagation. In International Conference on Machine Learning (ICML), 2015.
|
| 234 |
+
[20] M. Garnelo, D. Rosenbaum, C. Maddison, T. Ramalho, D. Saxton, M. Shanahan, Y. Teh, D. Rezende, and S. Eslami. Conditional neural processes. In International Conference on Machine Learning (ICML), 2018.
|
| 235 |
+
[21] R. Geirhos, P. Rubisch, C. Michaelis, M. Bethge, F. Wichmann, and W. Brendel. Imagenettrained cnns are biased towards texture; increasing shape bias improves accuracy and robustness. In International Conference on Learning Representations (ICLR), 2019.
|
| 236 |
+
[22] B. Gong, Y. Shi, F. Sha, and K. Grauman. Geodesic flow kernel for unsupervised domain adaptation. In Conference on Computer Vision and Pattern Recognition (CVPR), 2017.
|
| 237 |
+
[23] I. Gulrajani and D. Lopez-Paz. In search of lost domain generalization. In International Conference on Learning Representations (ICLR), 2021.
|
| 238 |
+
[24] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In Conference on Computer Vision and Pattern Recognition (CVPR), 2016.
|
| 239 |
+
[25] D. Hendrycks and T. Dietterich. Benchmarking neural network robustness to common corruptions and perturbations. In International Conference on Learning Representations (ICLR), 2019.
|
| 240 |
+
[26] L. Hewitt, M. Nye, A. Gane, T. Jaakkola, and J. Tenenbaum. The variational homoencoder: Learning to learn high capacity generative models from few examples. In Conference on Uncertainty in Artificial Intelligence (UAI), 2018.
|
| 241 |
+
[27] S. Hochreiter, A. Younger, and P. Conwell. Learning to learn using gradient descent. In International Conference on Artificial Neural Networks (ICANN), 2001.
|
| 242 |
+
[28] K. Hsu, S. Levine, and C. Finn. Unsupervised learning via meta-learning. In International Conference on Learning Representations (ICLR), 2019.
|
| 243 |
+
[29] S. Hu, P. Moreno, Y. Xiao, X. Shen, G. Obozinski, N. Lawrence, and A. Damianou. Empirical Bayes transductive meta-learning with synthetic gradients. In International Conference on Learning Representations (ICLR), 2020.
|
| 244 |
+
[30] W. Hu, G. Niu, I. Sato, and M. Sugiyama. Does distributionally robust supervised learning give robust classifiers? In International Conference on Machine Learning (ICML), 2018.
|
| 245 |
+
[31] S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International Conference on Machine Learning (ICML), 2015.
|
| 246 |
+
[32] E. Jang, S. Gu, and B. Poole. Categorical reparameterization with Gumbel-softmax. In International Conference on Learning Representations (ICLR), 2017.
|
| 247 |
+
[33] A. Kaku, S. Mohan, A. Parnandi, H. Schambra, and C. Fernandez-Granda. Be like water: Robustness to extraneous variables via adaptive feature normalization. arXiv preprint arXiv:2002.04019, 2020.
|
| 248 |
+
[34] D. Kingma and M. Welling. Auto-encoding variational Bayes. In International Conference on Learning Representations (ICLR), 2014.
|
| 249 |
+
[35] P. Koh, S. Sagawa, H. Marklund, S. Xie, M. Zhang, A. Balsubramani, W. Hu, M. Yasunaga, R. Phillips, I. Gao, T. Lee, E. David, I. Stavness, W. Guo, B. Earnshaw, I. Haque, S. Beery, J. Leskovec, A. Kundaje, E. Pierson, S. Levine, C. Finn, and P. Liang. WILDS: A benchmark of in-the-wild distribution shifts. In International Conference on Machine Learning (ICML), 2021.
|
| 250 |
+
[36] A. Krizhevsky. Learning multiple layers of features from tiny images. Technical report, University of Toronto, 2009.
|
| 251 |
+
[37] A. Kumagai and T. Iwata. Zero-shot domain adaptation with domain semantic descriptors. arXiv preprint arXiv:1807.02927, 2018.
|
| 252 |
+
[38] D. Lazer, R. Kennedy, G. King, and A. Vespignani. The parable of Google flu: Traps in big data analysis. Science, 2014.
|
| 253 |
+
[39] D. Li, Y. Yang, Y. Song, and T. Hospedales. Deeper, broader and artier domain generalization. In IEEE International Conference on Computer Vision (ICCV), 2017.
|
| 254 |
+
[40] D. Li, Y. Yang, Y. Song, and T. Hospedales. Learning to generalize: Meta-learning for domain generalization. In AAAI Conference on Artificial Intelligence (AAAI), 2018.
|
| 255 |
+
[41] H. Li, S. Pan, S. Wang, and A. Kot. Domain generalization with adversarial feature learning. In Conference on Computer Vision and Pattern Recognition (CVPR), 2018.
|
| 256 |
+
[42] X. Li, Q. Sun, Y. Liu, Q. Zhou, S. Zheng, T. Chua, and B. Schiele. Learning to self-train for semi-supervised few-shot classification. In Advances in Neural Information Processing Systems (NeurIPS), 2019.
|
| 257 |
+
[43] Y. Li, N. Wang, J. Shi, J. Liu, and X. Hou. Revisiting batch normalization for practical domain adaptation. In International Conference on Learning Representations Workshop (ICLRW), 2017.
|
| 258 |
+
[44] Y. Li, X. Tian, M. Gong, Y. Liu, T. Liu, K. Zhang, and D. Tao. Deep domain generalization via conditional invariant adversarial networks. In European Conference on Computer Vision (ECCV), 2018.
|
| 259 |
+
[45] Z. Lipton, Y. Wang, and A. Smola. Detecting and correcting for label shift with black box predictors. In International Conference on Machine Learning (ICML), 2018.
|
| 260 |
+
[46] Y. Liu, J. Lee, M. Park, S. Kim, E. Yang, S. Hwang, and Y. Yang. Learning to propagate labels: Transductive propagation network for few-shot learning. In International Conference on Learning Representations (ICLR), 2019.
|
| 261 |
+
[47] C. Maddison, A. Mnih, and Y. Teh. The Concrete distribution: A continuous relaxation of discrete random variables. In International Conference on Learning Representations (ICLR), 2017.
|
| 262 |
+
[48] L. Metz, N. Maheswaranathan, B. Cheung, and J. Sohl-Dickstein. Meta-learning update rules for unsupervised representation learning. In International Conference on Learning Representations (ICLR), 2019.
|
| 263 |
+
[49] K. Muandet, D. Balduzzi, and B. Schölkopf. Domain generalization via invariant feature representation. In International Conference on Machine Learning (ICML), 2013.
|
| 264 |
+
[50] 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.
|
| 265 |
+
[51] A. Nichol, J. Achiam, and J. Schulman. On first-order meta-learning algorithms. arXiv preprint arXiv:1803.02999, 2018.
|
| 266 |
+
[52] A. Paszke, S. Gross, F. Massa, A. Lerer, J. Bradbury, G. Chanan, T. Killeen, Z. Lin, N. Gimelshein, L. Antiga, A. Desmaison, A. Kopf, E. Yang, Z. DeVito, M. Raison, A. Tejani, S. Chilamkurthy, B. Steiner, L. Fang, J. Bai, and S. Chintala. PyTorch: An imperative style, high-performance deep learning library. In Advances in Neural Information Processing Systems (NeurIPS), 2019.
|
| 267 |
+
[53] X. Peng, Q. Bai, X. Xia, Z. Huang, K. Saenko, and B. Wang. Moment matching for multi-source domain adaptation. In IEEE International Conference on Computer Vision (ICCV), 2019.
|
| 268 |
+
[54] J. Quiñonero Candela, M. Sugiyama, A. Schwaighofer, and N. Lawrence. Dataset Shift in Machine Learning. The MIT Press, 2009.
|
| 269 |
+
[55] S. Ravi and H. Larochelle. Optimization as a model for few-shot learning. In International Conference on Learning Representations (ICLR), 2017.
|
| 270 |
+
[56] M. Ren, E. Triantafillou, S. Ravi, J. Snell, K. Swersky, J. Tenenbaum, H. Larochelle, and R. Zemel. Meta-learning for semi-supervised few-shot classification. In International Conference on Learning Representations (ICLR), 2018.
|
| 271 |
+
[57] J. Requeima, J. Gordon, J. Bronskill, S. Nowozin, and R. Turner. Fast and flexible multi-task classification using conditional neural adaptive processes. In Advances in Neural Information Processing Systems (NeurIPS), 2019.
|
| 272 |
+
[58] D. Rezende, S. Mohamed, and D. Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In International Conference on Machine Learning (ICML), 2014.
|
| 273 |
+
[59] A. Royer and C. Lampert. Classifier adaptation at prediction time. In Conference on Computer Vision and Pattern Recognition (CVPR), 2015.
|
| 274 |
+
[60] S. Sagawa, P. Koh, T. Hashimoto, and P. Liang. Distributionally robust neural networks for group shifts: On the importance of regularization for worst-case generalization. In International Conference on Learning Representations (ICLR), 2020.
|
| 275 |
+
[61] A. Santoro, S. Bartunov, M. Botvinick, D. Wierstra, and T. Lillicrap. Meta-learning with memory-augmented neural networks. In International Conference on Machine Learning (ICML), 2016.
|
| 276 |
+
[62] J. Schmidhuber. Evolutionary principles in self-referential learning. Diploma thesis, Institut f. Informatik, Tech. Univ. Munich, 1987.
|
| 277 |
+
[63] S. Schneider, E. Rusak, L. Eck, O. Bringmann, W. Brendel, and M. Bethge. Improving robustness against common corruptions by covariate shift adaptation. In Advances in Neural Information Processing Systems (NeurIPS), 2020.
|
| 278 |
+
[64] H. Shimodaira. Improving predictive inference under covariate shift by weighting the loglikelihood function. Journal of Statistical Planning and Inference (JSPI), 2000.
|
| 279 |
+
[65] J. Snell, K. Swersky, and R. Zemel. Prototypical networks for few-shot learning. In Advances in Neural Information Processing Systems (NIPS), 2017.
|
| 280 |
+
[66] M. Sulc and J. Matas. Improving CNN classifiers by estimating test-time priors. In IEEE International Conference on Computer Vision (ICCV), 2019.
|
| 281 |
+
[67] B. Sun, J. Feng, and K. Saenko. Return of frustratingly easy domain adaptation. In AAAI Conference on Artificial Intelligence (AAAI), 2016.
|
| 282 |
+
[68] S. Sun, H. Shi, and Y. Wu. A survey of multi-source domain adaptation. Information Fusion, 2015.
|
| 283 |
+
[69] Y. Sun, X. Wang, Z. Liu, J. Miller, A. Efros, and M. Hardt. Test-time training with selfsupervision for generalization under distribution shifts. In International Conference on Machine Learning (ICML), 2020.
|
| 284 |
+
[70] J. Taylor, B. Earnshaw, B. Mabey, M. Victors, and J. Yosinski. RxRx1: An image set for cellular morphological variation across many experimental batches. In International Conference on Learning Representations (ICLR), 2019.
|
| 285 |
+
[71] S. Thrun and L. Pratt. Learning to Learn. Springer Science & Business Media, 1998.
|
| 286 |
+
[72] E. Tzeng, J. Hoffman, K. Saenko, and T. Darrell. Adversarial discriminative domain adaptation. In Conference on Computer Vision and Pattern Recognition (CVPR), 2017.
|
| 287 |
+
[73] V. Vapnik. Statistical Learning Theory. Wiley New York, 1998.
|
| 288 |
+
[74] O. Vinyals, C. Blundell, T. Lillicrap, K. Kavukcuoglu, and D. Wierstra. Matching networks for one shot learning. In Advances in Neural Information Processing Systems (NIPS), 2016.
|
| 289 |
+
[75] D. Wang, E. Shelhamer, S. Liu, B. Olshausen, and T. Darrell. Tent: Fully test-time adaptation by entropy minimization. In International Conference on Learning Representations (ICLR), 2021.
|
| 290 |
+
[76] G. Wilson and D. Cook. A survey of unsupervised deep domain adaptation. ACM Transactions on Intelligent Systems and Technology (TIST), 2020.
|
| 291 |
+
[77] M. Wu, K. Choi, N. Goodman, and S. Ermon. Meta-amortized variational inference and learning. In AAAI Conference on Artificial Intelligence (AAAI), 2019.
|
| 292 |
+
[78] Y. Yang and T. Hospedales. A unified perspective on multi-domain and multi-task learning. In International Conference on Learning Representations (ICLR), 2015.
|
| 293 |
+
[79] C. Yeh, A. Perez, A. Driscoll, G. Azzari, Z. Tang, D. Lobell, S. Ermon, and M. Burke. Using publicly available satellite imagery and deep learning to understand economic well-being in Africa. Nature Communications, 2020.
|
| 294 |
+
[80] T. Yu, C. Finn, A. Xie, S. Dasari, P. Abbeel, and S. Levine. One-shot imitation from observing humans via domain-adaptive meta-learning. In Robotics: Science and Systems (RSS), 2018.
|
| 295 |
+
[81] R. Zhang, T. Che, Z. Ghahramani, Y. Bengio, and Y. Song. MetaGAN: An adversarial approach to few-shot learning. In Advances in Neural Information Processing Systems (NeurIPS), 2018.
|
md/train/2rAiDBJgR_/2rAiDBJgR_.md
ADDED
|
@@ -0,0 +1,471 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# WeaveNet for Approximating Assignment Problems
|
| 2 |
+
|
| 3 |
+
Anonymous Author(s)
|
| 4 |
+
Affiliation
|
| 5 |
+
Address
|
| 6 |
+
email
|
| 7 |
+
|
| 8 |
+
# Abstract
|
| 9 |
+
|
| 10 |
+
1 Assignment, a task to match a limited number of elements, is a fundamental
|
| 11 |
+
2 problem in informatics. Many assignment problems have no exact solvers due
|
| 12 |
+
3 to their NP-hardness or incomplete input, and their approximation algorithms
|
| 13 |
+
4 have been studied for a long time. However, individual practical applications
|
| 14 |
+
5 have various objective functions and prior assumptions, which usually differ from
|
| 15 |
+
6 academic studies. This gap hinders applying the algorithms to real problems
|
| 16 |
+
7 despite their theoretically ensured performance. In contrast, a learning-based
|
| 17 |
+
8 method can be a promising solution to fill the gap. To open a new vista for
|
| 18 |
+
9 real-world assignment problems, we propose a novel neural network architecture,
|
| 19 |
+
10 WeaveNet. Its core module, feature weaving layer, is stacked to model frequent
|
| 20 |
+
11 communication between elements in a parameter-efficient way for solving the
|
| 21 |
+
12 combinatorial problem of assignment. To evaluate the model, we approximated
|
| 22 |
+
13 one of the most popular non-linear assignment problems, stable matching with two
|
| 23 |
+
14 different strongly NP-hard settings. The experimental results showed its impressive
|
| 24 |
+
15 performance among the learning-based baselines. Furthermore, we achieved better
|
| 25 |
+
16 or comparative performance to the state-of-the-art algorithmic method, depending
|
| 26 |
+
17 on the size of problem instances.
|
| 27 |
+
|
| 28 |
+
# 18 1 Introduction
|
| 29 |
+
|
| 30 |
+
19 From multiple object tracking to job matching, assignment problems can represent a wide variety of
|
| 31 |
+
20 applications. An assignment problem is typically defined on a bipartite graph, a graph with two sets
|
| 32 |
+
21 of nodes $A$ and $B$ with edges $E = A \times B$ $\mathbf { \nabla } \cdot N = | A |$ , $M = | B |$ , $N \geq M$ ). On the graph, the task
|
| 33 |
+
22 is to find a matching $m \in \mathsf { \bar { \{ 0 , 1 \} } } ^ { A \times B }$ (a set of edges represented as a binary matrix) that satisfies
|
| 34 |
+
23 constraints and/or maximizes objectives. Depending on real-world scenes, there must be various
|
| 35 |
+
24 objectives and constraints for $m$ . A typical constraint is a one-to-one correspondence (i.e., every node
|
| 36 |
+
25 has at most one matched partner in $m$ ) and, for simplicity, we always assume it in this paper.
|
| 37 |
+
26 Matching stability is another example of such constraints. It is a non-linear constraint first introduced
|
| 38 |
+
7 for a hospital-student assignment problem (Gale and Shapley, $\textcircled { 1 9 6 2 }$ based on the preferences of
|
| 39 |
+
28 hospitals among students and vice versa. We say a matching $m$ is unstable when there exist $a \in A$
|
| 40 |
+
29 and $b \in B$ which are unmatched in $m$ ${ m } _ { a b } = 0$ ) but both prefer each other more than their partner
|
| 41 |
+
30 in $m$ . We can obtain a stable matching $m$ in $O ( N ^ { 2 } )$ by the Gale-Shapley (GS) algorithm $\underline { { \sqrt { \mathrm { G a l e } } } }$
|
| 42 |
+
and Shapley, 1962). However, when $m$ is expected to have the minimum difference in the total
|
| 43 |
+
32 satisfactions between sides $A$ and $B$ (known as sex-equal stable matching), the problem becomes
|
| 44 |
+
33 strongly NP-hard1 (Kato, 1993; McDermid and Irving, 2014)
|
| 45 |
+
34 In addition to the NP-hardness, we also face difficulties to obtain the best assignment when assignment
|
| 46 |
+
35 candidates may randomly disappear (e.g., multiple object tracking with occlusions (Emami et al.,
|
| 47 |
+
36 $\underline { 2 0 2 0 }$ or joint matching in multi-person pose estimation $( \overline { { \mathbb { C } \mathrm { a o } \ e t \ a l . } } , \overline { { 2 0 1 7 } } ) )$ . In such cases, we need
|
| 48 |
+
37 to compensate for the inputs of incomplete information by its stochastic properties. The traditional
|
| 49 |
+
38 methods often use sub-optimal approximations to avoid solving complex assignment problems.
|
| 50 |
+
39 A differential assignment model can be a future option that enables end-to-end training for such
|
| 51 |
+
40 applications.
|
| 52 |
+
41 Toward such future applications, this paper aims to propose an effective and promising differential
|
| 53 |
+
42 solver for assignment problems. The contribution of this paper is four-fold:
|
| 54 |
+
|
| 55 |
+
1. We proposed WeaveNet, a novel neural network architecture for assignment problems and set-encoder, a novel local structure.
|
| 56 |
+
2. We proposed a novel technique, split batch normalization, to deal with a strong asymmetry in input distributions for sides $A$ and $B$ .
|
| 57 |
+
3. We focused on stable matching, a classical non-linear assignment problem actively studied even in recent years, and proposed a novel evaluation protoco $1 ^ { 2 }$ with pseudo costs, which enables us to compare learning-based solvers and algorithmic solvers directly.
|
| 58 |
+
4. We achieved a better performance with the state-of-the-art algorithmic baseline when $N = 2 0$ , and a comparative performance when $N = 3 0$ . We also outperformed any learning-based baselines with a large margin.
|
| 59 |
+
|
| 60 |
+
# 53 2 Related work
|
| 61 |
+
|
| 62 |
+
54 Despite the recent research interest in deep learning technology, we hardly have a fully differential
|
| 63 |
+
55 assignment solver. As long as authors know, there are two past attempts to solve assignment problems
|
| 64 |
+
56 by a fully differential model. $\underline { { \mathrm { L i } } } ( \underline { { \mathrm { 2 0 1 9 } } } )$ has tried to solve stable matching by multiple layer perceptrons
|
| 65 |
+
57 (MLP). Their contribution is in the proposed relaxation of the non-linear stability constraint to a
|
| 66 |
+
58 differential loss function. However, the MLP is too redundant to learn the assignment strategy without
|
| 67 |
+
59 overfitting. In addition, the proposed auxiliary loss to maintain the output to be one-to-one matching
|
| 68 |
+
60 (symmetric doubly stochastic function) overly constrains the solution search space. In this study, we
|
| 69 |
+
61 propose a parameter-efficient differential model and a weaker but sufficient constraint to output a
|
| 70 |
+
62 one-to-one matching.
|
| 71 |
+
63 The second attempt is made by $\boxed { \mathrm { G i b b o n s } ~ e t ~ a l . } \textcircled { 2 0 1 9 } $ , where Deep Bipartite Matching (DBM) is
|
| 72 |
+
64 proposed. They tested their model with the weapon-target assignment (WTA) problem. WTA is a
|
| 73 |
+
65 classical NP-hard problem whose state-of-the-art algorithm $( \overline { { \Delta \mathrm { h u j a } ~ e t ~ a l . } } , \overline { { 2 0 0 7 } } )$ could find optimal
|
| 74 |
+
66 solution when $N \leq 2 0$ in the experiment although there is no theoretical guarantee. In this sense,
|
| 75 |
+
67 we can consider WTA is empirically easier than sex-equal stable matching, for which we have no
|
| 76 |
+
68 such efficient solvers even for $N = 5$ . In addition, DBM is trained in a supervised manner or with
|
| 77 |
+
69 reinforcement learning, which is hard to apply to a larger $N$ . Furthermore, the implementation details
|
| 78 |
+
70 are not completely explained, and their dataset and source codes are not publicly available. Finally,
|
| 79 |
+
71 the architecture of DBM is still parameter-redundant, and their local structure is sub-optimal. In this
|
| 80 |
+
72 study, we propose a more parameter-efficient two-stream architecture, WeaveNet, with a novel local
|
| 81 |
+
73 structure, set-encoder, both of which have significant impacts on the performance.
|
| 82 |
+
74 In addition to the above methods, it is natural to consider using graph convolutional networks (GCNs).
|
| 83 |
+
75 However, there are no GCN methods for assignment problems due to the over-smoothing problem (Li
|
| 84 |
+
76 et al., 2018; Oono and Suzuki, 2020). Because any graph-convolutional layer summarizes the output
|
| 85 |
+
77 with neighboring nodes, its smoothing effect eliminates expressive power for node classification. To
|
| 86 |
+
78 avoid such elimination, GIN $\textcircled { | \textcircled { \times } { \textrm { v e t a l . } } \textcircled { 2 0 1 9 } }$ , the state-of-the-art GCN method, stacks only two
|
| 87 |
+
79 layers for a node classification task. Such elimination is critical for an assignment-problem solver
|
| 88 |
+
80 because it needs to identify any slight difference through frequent communication among nodes.
|
| 89 |
+
81 Unlike GIN, our model retains edge-wise features rather than node-wise summaries, which does not
|
| 90 |
+
82 cause the smoothing problem. Therefore, we can make the model very deep, which any traditional
|
| 91 |
+
83 graph convolutional networks cannot.
|
| 92 |
+
|
| 93 |
+
# 84 3 Stable matching problem as a benchmark task
|
| 94 |
+
|
| 95 |
+
To evaluate learning-based assignment solvers, we adopt two strongly NP-hard variants of stable matching. They have been actively studied for a long time (Kato, 1993; Iwama et al., 2010; Dworczak,
|
| 96 |
+
|
| 97 |
+
87 2016; Gupta et al., 2019) and their state-of-the-art algorithm by $\boxed { \mathrm { T z i a v e l i s ~ } e t ~ a l . } ( \boxed { 2 0 1 9 } )$ must be a
|
| 98 |
+
88 strong baseline against learning-based methods. Hence, we set these two variants as the benchmark
|
| 99 |
+
89 task for learning-based assignment problems.
|
| 100 |
+
90 An instance $I$ of a stable matching problem consists of two sets of agents $A$ and $B$ on a bipartite
|
| 101 |
+
91 graph. Fig. 1 illustrates an example of $I$ . Each agent $a _ { i }$ in $A$ $( 0 < i \leq N )$ has a preference list $p _ { i } ^ { A }$ ,
|
| 102 |
+
92 which is an ordered set of elements in $B$ and $p _ { i j } ^ { A } = r a n k ( b _ { j } ; p _ { i } ^ { A } )$ is the index of $b _ { j }$ in the list $p _ { i } ^ { A }$ . $a _ { i }$
|
| 103 |
+
93 prefers $b _ { j }$ to $b _ { j ^ { \prime } }$ if $p _ { i j } ^ { A } < p _ { i j ^ { \prime } } ^ { A }$ . Similarly, each agent $b _ { j }$ in $B ( 0 < j \leq M )$ has a preference list $p _ { j } ^ { B }$ .
|
| 104 |
+
|
| 105 |
+
$$
|
| 106 |
+
\begin{array} { c c l } { { p _ { i } ^ { A } } } & { { \mathrm { a g e n t s } } } & { { \stackrel { \mathrm { m a t c h i n g ~ } m } { \longrightarrow } } } & { { \stackrel { \mathrm { ( b _ { j } ^ { A } ~ . ~ t h i n g ~ } m } { \longrightarrow } } } & { { p _ { j } ^ { B } } } \\ { { \stackrel { } { \cong } } } & { { \{ b _ { 2 } , b _ { 1 } , b _ { 3 } \} } } & { { \stackrel { ( a _ { 1 } ) } { \Longleftrightarrow } } } & { { \stackrel { ( b _ { 1 } ) } { \longleftrightarrow } } } & { ( b _ { 3 } , a _ { 2 } , a _ { 1 } \} } \\ { { \stackrel { \circleddash } { \geq } } } & { { \{ b _ { 3 } , b _ { 2 } , b _ { 1 } \} } } & { { \stackrel { \circleddash } { \Longleftrightarrow } } } & { { \stackrel { \circleddash } { \sum } } } & { { \{ a _ { 1 } , a _ { 2 } , a _ { 3 } \} } } \\ { { \stackrel { \circleddash } { \subseteq } } } & { { \{ b _ { 2 } , b _ { 3 } , b _ { 1 } \} } } & { { \stackrel { \circleddash } { \binom { a _ { 3 } } { 3 } } } } & { { \stackrel { \mathrm { m e t h i n g ~ p a r i n g ~ } m } { \uparrow \mathrm { t h e ~ b l o c k i n g ~ p a i r ~ } m } \stackrel { ( b _ { 3 } ) } { \{ a _ { 1 } , a _ { 3 } , a _ { 2 } \} } } } & { { \stackrel { \circleddash } { \sum } } } \end{array}
|
| 107 |
+
$$
|
| 108 |
+
|
| 109 |
+
Figure 1: An example of assignment, where $m$ (black edges) is not stable due to the blocking pair (the orange edge), while $m ^ { \prime }$ (green edges) is stable.
|
| 110 |
+
|
| 111 |
+
94 For a matching $m$ , we say that an unmatched pair $\{ a _ { v } , b _ { w } \} ( m _ { v w } = 0 )$ blocks $m$ if $a _ { v }$ ’s partner
|
| 112 |
+
95 $b _ { j }$ $m _ { v j } = 1 )$ ) and $b _ { w }$ ’s partner $a _ { i }$ ( $m _ { i w } = 1 $ ) satisfy the conditions $p _ { v w } ^ { A } < p _ { v j } ^ { A }$ and $p _ { w v } ^ { B } < p _ { w i } ^ { B ^ { \ast } }$ . Here,
|
| 113 |
+
96 $\{ a _ { v } , b _ { w } \}$ is called a blocking pair (the orange edge blocks a matching of black edges in the figure).
|
| 114 |
+
97 A matching is stable if (and only if) it includes no blocking pair (the green edges in the figure). Note
|
| 115 |
+
98 that $I$ always has at least one stable matching, and the Gale-Shapley (GS) algorithm can find it in
|
| 116 |
+
99 $O ( N ^ { 2 } )$ . However, the GS algorithm has a biased nature, where one side is prioritized and the other
|
| 117 |
+
100 side only gets the least preferable result among all the possibilities of stable matching.
|
| 118 |
+
101 To compensate for the unfairness, we can introduce diverse objectives to maintain a stable matching
|
| 119 |
+
102 fair. Among them, the following two objectives make the stable matching problem strongly NP-hard.
|
| 120 |
+
103 The first one is Sex equality cost $( S E q )$ (Gusfield and Irving, 1989). It focuses on the unfairness
|
| 121 |
+
104 brought by the gap between the two sides’ satisfaction and defined by
|
| 122 |
+
|
| 123 |
+
$$
|
| 124 |
+
S E q ( m ; I ) = | P ( m ; A ) - P ( m ; B ) | , \quad P ( m ; A ) = \sum _ { \{ a _ { i } , b _ { j } \} \in m } p _ { i j } ^ { A } , \quad P ( m ; B ) = \sum _ { \{ a _ { i } , b _ { j } \} \in m } p _ { j i } ^ { B } .
|
| 125 |
+
$$
|
| 126 |
+
|
| 127 |
+
105 The other is Balance cost $( B a l ) ( \mathrm { \underline { { { F e d e r } } } \vert \mathrm { \underline { { { \vert 9 9 5 } } } ; \left[ \mathrm { { G u p t a \it { e t a l . } } \vert \mathrm { \underline { { { 2 0 1 9 } } } } } \right]} } ,$ , which is a compromise between
|
| 128 |
+
106 side-equality and overall satisfaction. It is defined by
|
| 129 |
+
|
| 130 |
+
$$
|
| 131 |
+
B a l ( m ; I ) { = } \operatorname* { m a x } ( P ( m ; A ) , P ( m ; B ) ) .
|
| 132 |
+
$$
|
| 133 |
+
|
| 134 |
+
107 In the proposed evaluation protocol, we minimize either cost while maintaining stable one-to-one
|
| 135 |
+
108 matching.
|
| 136 |
+
109 Input and output data format for stable matching Learning-based approximation is realized by
|
| 137 |
+
110 a trainable function $F$ that outputs a matching $\hat { m } \in [ 0 , 1 ] ^ { N \times \widetilde { M } }$ , which is an $N \times M$ matrix. As
|
| 138 |
+
111 for the input, the value range of the preference rank depends on the problem size, which causes a
|
| 139 |
+
112 range shift of the input distribution. To avoid such shift, we linearly re-scal $ { \mathrm { e } } ^ { 3 }$ the rank of preference
|
| 140 |
+
113 $p _ { i j } ^ { * }$ $\mathbf { \Psi } ^ { \prime } * \in \{ A , B \} )$ from $[ 1 , N ]$ to a normalized score $s _ { i j } ^ { * }$ ranged in $( 0 , 1 ]$ to make it invariant to $N$ ,
|
| 141 |
+
114 where 1 for the highest rank. Then, we obtain the input as matrices $S ^ { A }$ and $S ^ { B }$ , where $s _ { i j } ^ { A }$ is the
|
| 142 |
+
115 $i j$ -element of $S ^ { A }$ .
|
| 143 |
+
|
| 144 |
+
# 116 4 Deep-learning-based fair stable matching with WeaveNet
|
| 145 |
+
|
| 146 |
+
# 4.1 WeaveNet
|
| 147 |
+
|
| 148 |
+
18 One of the required properties of $F : ( S ^ { A } , \ S ^ { B } ) \to { \hat { m } }$ is to take all the agents’ preference into 19 account when determining the presence of each edge in the output $\hat { m }$ . Li (2019) implemented this by 3 The details of this linear re-scaling are based on Li $\bigoplus \iiiint \ M g \lVert \bigstar \rVert$ and described in A.1. Note that sections numbered with capital letters appear in the supplementary material.
|
| 149 |
+
|
| 150 |
+

|
| 151 |
+
Figure 2: WeaveNet architecture. $L$ feature weaving layers are stacked with shortcut paths to be a deep network. The encoded features are fed into Conv $( 1 \times 1 )$ layer to obtain logits $( { \hat { m } } ^ { \prime } { } ^ { \hat { A } } , { \hat { m } } ^ { \prime B } )$ . The output $\hat { m }$ will be binarized in prediction phase to represent a matching.
|
| 152 |
+
|
| 153 |
+
120 MLPs, where $S ^ { A }$ and $S ^ { B }$ are destructured and concatenated into a single flat vector (with the length
|
| 154 |
+
121 of $2 N M )$ and fed to the MLP. Its output (a flat vector with the length of $N M$ ) is restructured into a
|
| 155 |
+
122 matrix $\hat { m }$ . The MLP model, however, would face difficulties due to the following four problems.
|
| 156 |
+
123 (a) Preference lists of multiple agents are encoded by independent parameters, though they share a
|
| 157 |
+
124 format so that we could efficiently process them in the same manner.
|
| 158 |
+
125 (b) MLP only supports a fixed-size input, so training different models for different cases of $N$
|
| 159 |
+
126 becomes mandatory.
|
| 160 |
+
127 (c) $F$ should be permutation invariant, which means the matching result should be unchanged even if
|
| 161 |
+
128 we shuffle the order of agents in $S ^ { A }$ and $S ^ { B }$ , but MLP does not satisfy.
|
| 162 |
+
129 (d) A shallow MLP model may be insufficient to approximate an exact solver for the NP-hard problem
|
| 163 |
+
130 when $N$ is large.
|
| 164 |
+
131 To address the above weaknesses of MLP, we propose the feature weaving network (WeaveNet) which
|
| 165 |
+
132 has the properties of (a) shared encoder, (b) variable-size input, (c) permutation invariance, and
|
| 166 |
+
133 (d) residual structure. The WeaveNet, as shown in Fig. $2 ,$ consists of $L$ feature weaving (FW)
|
| 167 |
+
134 layers. It has two streams of $A$ and $B$ . In a symmetric manner, each stream models the agent’s act of
|
| 168 |
+
135 selecting the one on the opposite side while sharing weights to enhance the parameter efficiency. The
|
| 169 |
+
136 shortcut paths at every two FW layers make them residual blocks, which allows the model to be as
|
| 170 |
+
137 deep as possible. We explain its details as follows.
|
| 171 |
+
138 Fig. $3$ illustrates the detail of a single FW layer, which is the core architecture of the proposed network.
|
| 172 |
+
139 FW layer is a two-stream layer whose inputs consist of a weftwise component $Z _ { \ell } ^ { \dot { A } }$ and a warpwise
|
| 173 |
+
140 component $Z _ { \ell } ^ { B }$ , which are the output of $( l - 1 )$ -th layer and $Z _ { 0 } ^ { A } = { \cal S } ^ { A }$ and $Z _ { 0 } ^ { B } = { \cal S } ^ { B }$ for the first
|
| 174 |
+
141 layer. The two components are symmetrically concatenated in each stream (cross-concatenation).
|
| 175 |
+
142 Then these concatenations are separated into agent-wise features, each of which is a set of outgoing
|
| 176 |
+
143 edge features of an agent (indicating the preference from that agent to every matching candidate).
|
| 177 |
+
144 These features are processed by the encoder $E _ { \ell }$ shared by every agent in both $A$ and $B$ . As for
|
| 178 |
+
145 an encoder that can embed variable-size input in a permutation invariant manner, we adopted the
|
| 179 |
+
146 structure inspired by DeepSet (Zaheer et al., 2017) and PointNet (Qi et al., 2017) (Fig. 4), which
|
| 180 |
+
47 consists of two convolutional layers with kernel size 1 and a set-wise max-pooling layer, followed by
|
| 181 |
+
48 batch-normalization and PReLU activation. We refer to this structure as set encoder.
|
| 182 |
+
149 Mathematical formulations $Z _ { \ell } ^ { A }$ in Fig. $\bigstar$ is a third-order tensor whose dimensions, in sequence,
|
| 183 |
+
150 corresponding to the agent, candidate, and feature dimension, with a size of $( N , M , D )$ . Similarly,
|
| 184 |
+
151 $Z _ { \ell } ^ { B }$ has a size of $( M , N , D )$ . The cross-concatenation is defined as
|
| 185 |
+
|
| 186 |
+

|
| 187 |
+
Figure 3: Feature weaving layer orthogonally Figure 4: Illustration of the process in set enconcatenates the weftwise and warpwize com- coder $E _ { \ell }$ , where $z _ { \ell } ^ { a _ { i } }$ (colored in white) is once ponents $( Z _ { \ell } ^ { A }$ and $Z _ { \ell } ^ { B }$ ) in a symmetric way encoded to $D ^ { \prime }$ \` channel features (colored in pale (cross-concatenation). Then, the concatenated blue), then max-pooled to obtain statistics in the tensors are separated into $z _ { \ell } ^ { a _ { i } }$ (or $z _ { \ell } ^ { b _ { j } }$ ), which feature set (colored in blue). The statistics inrepresents a set of outgoing edges from agent formation is concatenated to each input feature $a _ { i }$ (or $b _ { j }$ ), and independently fed to $E _ { \ell }$ . and further encoded (color in a gradation).
|
| 188 |
+
|
| 189 |
+
$$
|
| 190 |
+
Z _ { \ell } ^ { \prime A } = c a t ( Z _ { \ell } ^ { A } , P _ { A B } ( Z _ { \ell } ^ { B } ) ) ,
|
| 191 |
+
$$
|
| 192 |
+
|
| 193 |
+
152 where $P _ { A B }$ swaps the first and second dimensions of the tensor, and $c a t ( \{ Z _ { 1 } , Z _ { 2 } , . . . \} )$ concatenates
|
| 194 |
+
153 the features of two tensors $Z _ { 1 }$ , $Z _ { 2 }$ . $Z _ { \ell } ^ { \prime A }$ is then sliced into agent-wise features $z _ { \ell } ^ { a _ { i } }$ and we obtain
|
| 195 |
+
154 $Z _ { \ell + 1 } ^ { A } = ( E _ { \ell } ( z _ { \ell } ^ { a _ { i } } ) | 0 < i \leq N )$ , which is also a third-order tensor (and fed to the next layer). We can
|
| 196 |
+
155 calculate $Z _ { \ell + 1 } ^ { B }$ in a symmetric manner (with the same encoder $E _ { \ell }$ ).
|
| 197 |
+
156 After the process of $L$ FW layers, $Z _ { L } ^ { A }$ and $Z _ { L } ^ { B }$ are further cross-concatenated and fed to the matching
|
| 198 |
+
157 estimator (in Fig. 2). It outputs a non-deterministic edge assignment $\hat { m }$ . In the training phase, $\hat { m }$
|
| 199 |
+
158 is input to an objective function, and the loss is minimized. In the prediction phase, the matching
|
| 200 |
+
159 is obtained by binarizing $\hat { m }$ . In this sense, matching estimation through a neural network can be
|
| 201 |
+
160 considered as an approximation by relaxing the binary assignment space $\{ \breve { 0 } , 1 \} ^ { N \times M }$ into a continuous
|
| 202 |
+
161 assignment space [0, 1] N⇥M .
|
| 203 |
+
162 Asymmetric variant with split batch normalization WeaveNet is designed to be fully symmetric
|
| 204 |
+
163 for $S ^ { A }$ and $S ^ { B }$ . Hence, it satisfies the equation $F ( S ^ { A } , S ^ { B } ) = F ( S ^ { B } , S ^ { A } ) ^ { \top }$ . This condition ensures
|
| 205 |
+
164 that the model architecture cannot distinguish the two sides $A$ and $B$ innately. This property is
|
| 206 |
+
165 beneficial when mathematically fair treatment between $A$ and $B$ is desirable. However, when inputs
|
| 207 |
+
166 from $A$ and $B$ are differently biased (e.g., the two sides have different trends of preference or the
|
| 208 |
+
167 objective is asymmetric for $A$ and $B$ ), this symmetric treatment degrades the performance. To
|
| 209 |
+
168 eliminate the bias difference without losing the parameter-efficiency, we further propose to a) apply
|
| 210 |
+
169 batch normalization independently for each stream (split batch normalization), and $\mathbf { b }$ ) adding a
|
| 211 |
+
170 side-identifiable code (e.g., 1 for $A$ and 0 for $B$ ) to $Z _ { 0 } ^ { A }$ and $Z _ { 0 } ^ { B }$ as a $( D { + } 1 )$ -th element of the feature.
|
| 212 |
+
171 We call this variant “asymmetric”.
|
| 213 |
+
|
| 214 |
+
# 4.2 Relaxed continuous optimization for fair stable matching
|
| 215 |
+
|
| 216 |
+
Generally, a combinatorial optimization problem has discrete objective functions and conditions, which are not differentiable. To optimize the model in an end-to-end manner without inaccessible ground truth, we optimize the model by relaxing such discrete loss functions into continuous ones.
|
| 217 |
+
|
| 218 |
+
76 Assume we target to obtain a fair stable matching that has the minimum $S E q$ , for example. Then, we
|
| 219 |
+
77 have the following three loss functions.
|
| 220 |
+
178 ${ \mathcal { L } } _ { m }$ conditions the binarization of $\hat { m }$ to represent a matching.
|
| 221 |
+
179 $\mathcal { L } _ { s }$ conditions the matching to be stable.
|
| 222 |
+
180 $\mathcal { L } _ { f }$ minimizing the fairness cost $S E q$ of the matching
|
| 223 |
+
|
| 224 |
+
181 The overall loss function is defined as
|
| 225 |
+
|
| 226 |
+
$$
|
| 227 |
+
\mathcal { L } _ { \mathrm { f s m } } ( \hat { m } ) = \lambda _ { m } \mathcal { L } _ { m } + \frac { 1 } { 2 } \sum _ { m \in \{ \hat { m } ^ { A } , \hat { m } ^ { B } \} } \big ( \lambda _ { s } \mathcal { L } _ { s } ( m ) + \lambda _ { f } \mathcal { L } _ { f } ( m ) \big ) ,
|
| 228 |
+
$$
|
| 229 |
+
|
| 230 |
+
where 182 $\hat { m } ^ { A } = \mathrm { s o f t m a x } ( \hat { m } )$ and $\hat { m } ^ { B } = \mathrm { s o f t m a x } ( \hat { m } ^ { \top } )$
|
| 231 |
+
|
| 232 |
+
183 An important advantage of learning-based approximation is its flexibility. We can modify the above
|
| 233 |
+
184 loss functions to easily obtain other variants. For example, removing $\mathcal { L } _ { f }$ in Eq. $( 4 )$ leads to standard
|
| 234 |
+
185 stable matching, and replacing $\mathcal { L } _ { f }$ with $\mathcal { L } _ { b }$ (which minimizes $B a l$ ) leads to balanced stable matching,
|
| 235 |
+
186 as follows:
|
| 236 |
+
|
| 237 |
+
$$
|
| 238 |
+
\begin{array} { r l } & { \mathcal { L } _ { \mathrm { s m } } ( \hat { m } ) = \lambda _ { m } \mathcal { L } _ { m } + \displaystyle \frac { 1 } { 2 } \sum _ { m \in \{ \hat { m } ^ { A } , \hat { m } ^ { B } \} } \lambda _ { s } \mathcal { L } _ { s } ( m ) , } \\ & { \mathcal { L } _ { \mathrm { b s m } } ( \hat { m } ) = \lambda _ { m } \mathcal { L } _ { m } + \displaystyle \frac { 1 } { 2 } \sum _ { m \in \{ \hat { m } ^ { A } , \hat { m } ^ { B } \} } \big ( \lambda _ { s } \mathcal { L } _ { s } ( m ) + \lambda _ { b } \mathcal { L } _ { b } ( m ) \big ) . } \end{array}
|
| 239 |
+
$$
|
| 240 |
+
|
| 241 |
+
187 One-to-one matching constraint $\hat { m }$ can be safely converted into a binarized matching by column
|
| 242 |
+
188 wise or row-wise argmax operation when it is a symmetric doubly stochastic matrix $\check { ( \mathbb { L 1 } , \lfloor 2 0 1 9 \rangle ) }$ . To
|
| 243 |
+
189 satisfy this condition, we defined ${ \mathcal { L } } _ { m }$ with an average of the cosine distance as
|
| 244 |
+
|
| 245 |
+
$$
|
| 246 |
+
\begin{array} { r l } & { \mathcal { L } _ { m } ( \hat { m } ^ { A } , \hat { m } ^ { B } ) = 1 - \displaystyle \frac { 1 } { 2 } ( \mathbf { C } ( \hat { m } ^ { A } , \hat { m } ^ { B } ) + \mathbf { C } ( \hat { m } ^ { B } , \hat { m } ^ { A } ) ) , } \\ & { \mathbf { C } ( \hat { m } ^ { A } , \hat { m } ^ { B } ) = \displaystyle \frac { 1 } { N } \sum _ { i = 0 } ^ { N } \frac { \hat { m } _ { i * } ^ { A } \cdot \hat { m } _ { * i } ^ { B } } { \| \hat { m } _ { i * } ^ { A } \| _ { 2 } \| \hat { m } _ { * i } ^ { B } \| _ { 2 } } , } \end{array}
|
| 247 |
+
$$
|
| 248 |
+
|
| 249 |
+
190 where $\hat { m } _ { i * } ^ { A }$ means the $i$ -th row of $\hat { m } ^ { A }$ . This formulation binds $\hat { m }$ to be a symmetric4 doubly stochastic
|
| 250 |
+
191 ⇤ matrix when $\mathcal { L } _ { m } ( \hat { m } ^ { A } , \hat { m } ^ { B } ) = 0$ . The advantage of this implementation against the original one in Li
|
| 251 |
+
192 $\textcircled { 2 0 1 9 }$ is described in $\mathbf { B . l }$ with additional experimental results.
|
| 252 |
+
|
| 253 |
+
193 Blocking pair suppression As for $L _ { s }$ , we used the function proposed in Li $\textcircled { 2 0 1 9 }$ , which is
|
| 254 |
+
|
| 255 |
+
$$
|
| 256 |
+
\begin{array} { c } { { \mathcal { L } _ { s } ( \hat { m } ; I ) = \displaystyle \sum _ { ( v , w ) \in A \times B } g ( a _ { v } ; b _ { w } , \hat { m } ) g ( b _ { w } ; a _ { v } , \hat { m } ) } } \\ { { g ( a _ { i } ; b _ { w } , \hat { m } ) = \displaystyle \sum _ { b _ { j } \ne b _ { w } } \hat { m } _ { i j } \cdot \operatorname * { m a x } ( S _ { i w } ^ { A } - S _ { i j } ^ { A } , 0 ) } } \\ { { g ( b _ { j } ; a _ { v } , \hat { m } ) = \displaystyle \sum _ { a _ { i } \ne a _ { v } } \hat { m } _ { j i } ^ { \top } \cdot \operatorname * { m a x } ( S _ { j v } ^ { B } - S _ { j i } ^ { B } , 0 ) , } } \end{array}
|
| 257 |
+
$$
|
| 258 |
+
|
| 259 |
+
194 where $g ( a _ { i } ; b _ { w } , \hat { m } )$ is a criterion known as ex-ante justified envy, which has a positive value when
|
| 260 |
+
195 $a _ { i }$ prefers $b _ { w }$ more than any $b _ { j }$ in $\{ b _ { j } | j \neq w , \hat { m } _ { i j } \stackrel { . } { > } 0 \}$ . This is the same for $g ( b _ { j } ; a _ { v } , \hat { m } )$ . Hence,
|
| 261 |
+
196 $\{ a _ { v } , b _ { w } \}$ becomes a (soft) blocking pair when both $g ( a _ { v } ; b _ { w } , \hat { m } )$ and $g ( b _ { w } ; a _ { v } , \hat { m } )$ are positive.
|
| 262 |
+
|
| 263 |
+
197 Fairness measurements $\mathcal { L } _ { f } , \mathcal { L } _ { b }$ minimize $S E q ( m ; I ) , B a l ( m ; I )$ , respectively, and are defined as
|
| 264 |
+
|
| 265 |
+
$$
|
| 266 |
+
\mathcal { L } _ { f } ( \hat { m } ; I ) = \frac { 1 } { N } | S ( \hat { m } ; A ) - S ( \hat { m } ; B ) | \quad \mathcal { L } _ { b } ( \hat { m } ; I ) = - \frac { 1 } { N } \mathrm { m i n } ( S ( \hat { m } ; A ) , S ( \hat { m } ; B ) ) ,
|
| 267 |
+
$$
|
| 268 |
+
|
| 269 |
+
198 where
|
| 270 |
+
|
| 271 |
+
$$
|
| 272 |
+
S ( \hat { m } ; A ) = \sum _ { i = 1 } ^ { N } \sum _ { i = j } ^ { M } \hat { m } _ { i j } \cdot S _ { i j } ^ { A } , ~ S ( \hat { m } ; B ) = \sum _ { j = 1 } ^ { M } \sum _ { i = 1 } ^ { N } \hat { m } _ { i j } \cdot S _ { j i } ^ { B } .
|
| 273 |
+
$$
|
| 274 |
+
|
| 275 |
+
# 199 5 Experiments
|
| 276 |
+
|
| 277 |
+
200 We evaluated WeaveNet with different sizes of $N$ . First, with test samples of $N < 1 0$ , we compared
|
| 278 |
+
201 its performance with learning-based baselines and optimal solutions obtained by a brute-force search.
|
| 279 |
+
202 Second, we compared WeaveNet with algorithmic baselines at $N = 2 0$ , 30, where neither existing
|
| 280 |
+
203 learning-based methods nor brute-force search work. We also demonstrated the generalization ability
|
| 281 |
+
204 of WeaveNet under the mismatched training/test dataset distributions. Third, we demonstrated the
|
| 282 |
+
205 performance of WeaveNet at $N = 1 0 0$ . Note that we always assume $M = N$ hereafter.
|
| 283 |
+
|
| 284 |
+
Sample generation protocol In the experiments, we used the same method as Tziavelis et al.
|
| 285 |
+
$\underline { { \bar { ( 2 0 1 9 ) } } }$ to generate synthetic datasets that draw preference lists from the following distributions.
|
| 286 |
+
|
| 287 |
+
Uniform (U) Each agent’s preference towards any matching candidate is totally random, defined by a uniform distribution $\mathcal { U } ( 0 , 1 )$ (larger value means prior in the preference list).
|
| 288 |
+
|
| 289 |
+
Discrete $\mathbf { \eta } ^ { ( \mathbf { D } ) }$ Each agent has a preference of $\mathcal { U } ( 0 . 5 , 1 )$ towards a certain group of $\lfloor 0 . 4 N \rfloor$ popular candidates, while $\mathcal { U } ( 0 , 0 . 5 )$ towards the rest.
|
| 290 |
+
|
| 291 |
+
Gauss (G) Each agent’s preference towards $i$ -th candidate is defined by a Gaussian distribution $\mathcal { N } ( i / N , 0 . 4 )$ .
|
| 292 |
+
|
| 293 |
+
LibimSeTi (Lib) Simulate real rating activity on the online dating service LibimSeTi (Brozovsky and Petricek, 2007) based on the 2D distribution of frequency of each rating pair $( p _ { i j } ^ { A } , ~ p _ { j i } ^ { B } )$ .
|
| 294 |
+
|
| 295 |
+
4 Here a (possibly non-square) matrix $\hat { m }$ $N \geq M )$ is symmetric if and only if $\hat { m } _ { i * } = \hat { m } _ { * i } , ( 0 < i \leq M )$
|
| 296 |
+
|
| 297 |
+
216 Choosing the above preference distributions for group $A$ and $B$ respectively, we obtained five different
|
| 298 |
+
217 dataset settings, namely UU, DD, GG, UD, and Lib. We randomly generated 1,000 test samples and
|
| 299 |
+
218 1,000 validation samples for each of the five distribution settings.
|
| 300 |
+
219 Training protocol We trained any learning-based models $2 0 0 \mathrm { k }$ total iterations at $N \leq 3 0$ and $3 0 0 \mathrm { k }$
|
| 301 |
+
220 at $N = 1 0 0$ , with a batch size of 8. We randomly generated training samples at each iteration based
|
| 302 |
+
221 on the distribution of each dataset and used the Adam optimizer (Kingma and Ba, 2015). We set
|
| 303 |
+
222 learning rate 0.0001 and loss weights $\lambda _ { s } = 0 . 7$ , $\lambda _ { m } = 1 . 0$ , $\lambda _ { f } = \lambda _ { b } ^ { - } = 0 . 0 1$ based on a preliminary
|
| 304 |
+
223 experiment (see $\underline { { \overline { { | \mathbf { A . } 4 } } \mathbf { ) } } }$ .
|
| 305 |
+
224 Pseudo fairness costs for comparing learning-based results with algorithmic results Note that
|
| 306 |
+
225 for learning-based methods, there is a trade-off between fairness scores and stable matching rate.
|
| 307 |
+
226 Hence they may violate the constraints of stable one-to-one matching and yield an $S E q$ or $B a l$ even
|
| 308 |
+
227 lower than the ideal value. To compare the methods fairly with traditional algorithmic methods, we
|
| 309 |
+
228 evaluate our methods using pseudo $S E q \ ( p S E q )$ and pseudo Bal $( p B a l )$ cost, in which the cost of
|
| 310 |
+
229 violation cases is replaced by the worst result of the GS algorithm (prioritizing each side once and
|
| 311 |
+
230 adopting the worse one).
|
| 312 |
+
|
| 313 |
+
# 5.1 Comparison with learning-based methods $( N = 3 , 5 , 7 , 9 )$
|
| 314 |
+
|
| 315 |
+
Baselines and ablations In this experiment, we show results obtained by following baselines and WeaveNet variants. MLP is the model proposed in Li (2019). GIN is the state-of-the-art GCN model proposed in $\left| \mathrm { X u } \ e t \ a l . \right| \left( \mathbb { 2 0 } 1 9 \right)$ . We use each (normalized) preference list as a node feature and bipartite edges as the graph structure. After two graph-convolution calculations, as MLP, we destructed the node-wise embeddings and concatenated them into a single vector, which is fed to one Linear layer to output $\hat { m }$ . DBM is the model in Gibbons et al. (2019). SSWN is the single-stream WeaveNet, which is equivalent to a DBM adopting the set-encoder of WeaveNet. WN is the standard WeaveNet.
|
| 316 |
+
|
| 317 |
+

|
| 318 |
+
Figure 5: Change of the success rates of stable matching $( \uparrow )$ according to $N$
|
| 319 |
+
|
| 320 |
+

|
| 321 |
+
Figure 6: Change of $p S E q -$ ideal scores $( \downarrow )$ according to $N$ .
|
| 322 |
+
|
| 323 |
+

|
| 324 |
+
Figure 7: Change of $p B a l -$ ideal scores $( \downarrow )$ according to $N$ .
|
| 325 |
+
|
| 326 |
+
239 Fig. $\boldsymbol { \vert 5 \vert }$ shows the success rates of finding a stable matching, where we trained models to minimize
|
| 327 |
+
240 Eq. $( 5 )$ , considering only the stable matching constraints. Since MLP and GIN have size-dependency,
|
| 328 |
+
241 we trained the models independently for $N = 3$ , 5, 7, 9. The other models were trained with
|
| 329 |
+
242 $N = 1 0$ and tested on $N = 3$ , 5, 7, 9. We maintained models with $L = 6$ layers (the model names
|
| 330 |
+
243 are noted as XXX-6) to have a similar number of parameters with MLP for $N = 5$ (see $\underline { { \vert \bar { \mathbf { A . } } \bar { \mathbf { \xi } } ) } }$ , while
|
| 331 |
+
244 WN-18 is prepared to demonstrate the full performance (with the residual blocks).
|
| 332 |
+
245 MLP and GIN can hardly find stable matchings when $N \geq 5$ . Note that the number of total cases for
|
| 333 |
+
246 size $N$ instances is estimated by $N ! ^ { 2 ( N - 1 ) }$ . Hence, when $N = 3$ , there are only 1,296 cases at most,
|
| 334 |
+
247 and the test set will fully overlap with the training set. In contrast, when $N = 5$ , we have $4 . 3 \times 1 0 ^ { 1 6 }$
|
| 335 |
+
248 cases, and the overlap is negligible. Therefore, we can say that methods working only with $N = 3$
|
| 336 |
+
249 such as MLP and GIN, have little generalization ability.
|
| 337 |
+
250 DBM performs better than MLP but obviously worse than SSWN and WN. The performance gain of
|
| 338 |
+
251 SSWN-6 over DBM-6 represents the advantage of the set-encoder. Similarly, the improvement of
|
| 339 |
+
252 WN-6 over SSWN-6 shows the benefit of the two-stream architecture. Finally, that of WN-18 over
|
| 340 |
+
253 WN-6 demonstrates the impact of stacked layers on the performance. Fig. 15 of the appendix shows
|
| 341 |
+
54 some additional baselines, including a performance of our $L _ { m }$ against the original one proposed in Li
|
| 342 |
+
55 $\underline { { \left( 2 0 1 9 \right) } }$ .
|
| 343 |
+
|
| 344 |
+
Figs. 6 and $\textcircled { 7 }$ show ${ p S E q }$ and $p B a l$ (their difference from the ideal values5 ), respectively. XXX-18f/b are trained to minimize Eqs. $\textcircled { \sharp }$ and $\textcircled{6}$ , respectivel ${ \boldsymbol { \imath } } ^ { 6 } .$ We omitted MLP and GIN due to their poor performance in Fig. 5. In the results, both SSWN and WN largely outperformed DBM, which again proved the advantage of the set-encoder. WN performed better than SSWN for larger $N$ , owing to the parameter efficiency of the two-stream architecture. Note that the performance gain of XXX-18f/b from XXX-18 proved the flexibility of general learning-based methods for customized objective functions.
|
| 345 |
+
|
| 346 |
+
# 5.2 Comparison with algorithmic methods $N = 2 0$ , 30)
|
| 347 |
+
|
| 348 |
+
As the algorithmic methods, we prepared four baselines. GS is the better result of applying the GS algorithm to prioritize each side once, which runs in $O ( N ^ { 2 } )$ . PolyMin minimizes some alternative fairness costs (the regret and egalitarian costs, which can be solved in $O ( N ^ { 2 } )$ and $\underline { { O } } ( N ^ { 3 } )$ , respectively (Gusfield, 1987; Irving et al., 1987; Feder, 1992)). DACC by $\boxed { \mathrm { D w o r c z a k } } ( \boxed { 2 0 1 6 } )$ is an approximate algorithm that runs in $\overline { { O ( N ^ { 4 } ) } }$ . PowerBalance is the state-of-the-art method that runs in $\mathcal { \hat { O } } ( N ^ { 2 } )$ .
|
| 349 |
+
|
| 350 |
+
WN-60f/b(20/30) is WeaveNet with $L = 6 0$ layers trained with samples of $N = 2 0$ and $N = 3 0$ . Note that we used the asymmetric variant for UD and Lib. Moreover, we do not involve any traditional learning-based methods in this part since they scored clear performance drops with increasing $N$ (see Fig. $\textcircled { 5 }$ and the problem size of $N = 2 0$ , 30 is clearly beyond their capabilities, but an ablation with WeaveNet variants is reported in B.2.
|
| 351 |
+
|
| 352 |
+
Table 1: Average $S E q$ (#) and success rate of stable matching ("). Bold and underlined scores shows the best and second best ones, respectively.
|
| 353 |
+
|
| 354 |
+
<table><tr><td rowspan="2">Agents (N × M) Datasets (Dist. Type)</td><td colspan="4">20 × 20</td><td rowspan="2"></td><td colspan="5">30 × 30</td></tr><tr><td>UU</td><td>DD</td><td>GG</td><td>UD</td><td>Lib UU</td><td>DD</td><td>GG</td><td>UD</td><td>Lib</td></tr><tr><td>GS</td><td>41.89</td><td>18.81</td><td>19.52</td><td>70.97</td><td>19.66</td><td>94.03</td><td>43.46</td><td>36.56</td><td>163.77</td><td>39.78</td></tr><tr><td>PolyMin</td><td>19.93</td><td>11.83</td><td>20.57</td><td>87.08</td><td>18.47</td><td>35.52</td><td>21.21</td><td>37.37</td><td>209.62</td><td>31.85</td></tr><tr><td>DACC</td><td>24.34</td><td>20.13</td><td>23.07</td><td>101.75</td><td>20.40</td><td>40.87</td><td>34.35</td><td>40.59</td><td>240.48</td><td>33.88</td></tr><tr><td>Power Balance</td><td>16.28</td><td>8.93</td><td>17.07</td><td>71.09</td><td>15.40</td><td>18.45</td><td>11.05</td><td>27.22</td><td>163.90</td><td>21.57</td></tr><tr><td>WN-60f(20) (pSEq)</td><td>12.23</td><td>6.37</td><td>15.50</td><td>71.31</td><td>14.59</td><td>25.21</td><td>11.38</td><td>29.36</td><td>172.63</td><td>23.53</td></tr><tr><td>Stably Matched (%)</td><td>98.90</td><td>99.50</td><td>99.40</td><td>99.60</td><td>99.30</td><td>94.60</td><td>97.30</td><td>95.70</td><td>91.30</td><td>97.70</td></tr><tr><td>WN-60f(30) (p SEq)</td><td>12.16</td><td>6.53</td><td>15.56</td><td>71.34</td><td>14.53</td><td>18.30</td><td>10.52</td><td>27.39</td><td>170.35</td><td>22.17</td></tr><tr><td>Stably Matched (%)</td><td>99.10</td><td>99.40</td><td>99.40</td><td>99.50</td><td>99.80</td><td>98.10</td><td>99.00</td><td>98.00</td><td>93.90</td><td>98.60</td></tr></table>
|
| 355 |
+
|
| 356 |
+
Table 2: Average Bal (#) and success rate of stable matching (").
|
| 357 |
+
|
| 358 |
+
<table><tr><td rowspan="2">Agents (N × M) Datasets (Dist. Type)</td><td colspan="4">20×20</td><td colspan="6"></td></tr><tr><td>UU</td><td>DD</td><td>GG</td><td>UD</td><td>Lib</td><td>UU</td><td>DD</td><td>30×30 GG</td><td>UD</td><td>Lib</td></tr><tr><td>GS</td><td>89.14</td><td>146.16</td><td>108.36</td><td>140.53</td><td>68.62</td><td>184.05</td><td>322.05</td><td>225.49</td><td>312.12</td><td>137.59</td></tr><tr><td>PolyMin</td><td>74.19</td><td>140.99</td><td>108.04</td><td>145.28</td><td>66.94</td><td>144.48</td><td>306.28</td><td>224.13</td><td>324.54</td><td>130.79</td></tr><tr><td>DACC</td><td>78.49</td><td>146.71</td><td>110.06</td><td>151.34</td><td>68.75</td><td>150.71</td><td>316.18</td><td>227.52</td><td>337.43</td><td>133.59</td></tr><tr><td>Power Balance</td><td>73.28</td><td>140.12</td><td>106.92</td><td>140.55</td><td>65.89</td><td>138.04</td><td>302.30</td><td>220.26</td><td>312.12</td><td>126.96</td></tr><tr><td>WN-60b(20) (pBal)</td><td>71.89</td><td>138.79</td><td>106.20</td><td>140.84</td><td>65.85</td><td>141.49</td><td>302.73</td><td>221.92</td><td>317.60</td><td>130.58</td></tr><tr><td>Stably Matched (%)</td><td>98.50</td><td>98.80</td><td>99.50</td><td>99.70</td><td>98.80</td><td>96.10</td><td>96.70</td><td>95.00</td><td>88.90</td><td>93.80</td></tr><tr><td>WN-60b(30) (pBal)</td><td>72.33</td><td>138.75</td><td>106.65</td><td>140.79</td><td>65.84</td><td>140.40</td><td>301.59</td><td>223.02</td><td>313.59</td><td>127.93</td></tr><tr><td>Stably Matched (%)</td><td>98.00</td><td>99.10</td><td>98.60</td><td>99.80</td><td>99.10</td><td>97.00</td><td>98.60</td><td>93.70</td><td>98.80</td><td>98.00</td></tr></table>
|
| 359 |
+
|
| 360 |
+
274 We show the results in Tables 1 and 2. When $N = 2 0$ , except for UD, the proposed method constantly
|
| 361 |
+
275 performed better than any algorithmic methods for both $S E q$ and $B a l$ . When $N = 3 0$ , they are
|
| 362 |
+
276 comparative. For UD, GS performed even better than PowerBalance. That means that the ideal
|
| 363 |
+
277 solution constantly prioritizes one side (a kind of the strongest bias). Since we designed the WeaveNet
|
| 364 |
+
278 architecture to treat the sides evenly, this is the most challenging situation for WeaveNet. Nonetheless,
|
| 365 |
+
279 the proposed split batch normalization (with the side-identifiable code) achieved similar performance
|
| 366 |
+
280 to GS and PowerBalance. We show the performance drop with the fully symmetric version in $\boxed { \mathbf { B } . 2 }$
|
| 367 |
+
281 of the appendix, which is also interesting from the ethical viewpoint. It is noteworthy that the
|
| 368 |
+
282 model trained with $N = 2 0$ performs well even with $N = 3 0$ , which indicates that the method has
|
| 369 |
+
283 generalizability for size difference.
|
| 370 |
+
284 Generalization ability for different distributions A learning-based method should have a certain
|
| 371 |
+
285 generalizability for input distribution shifts. To test the ability, we evaluated the performance of
|
| 372 |
+
286 models trained with UU, DD, and GG on test sets of different distributions.
|
| 373 |
+
|
| 374 |
+
Table 3: The generalizability of WeaveNet (trained/tested with $N = 3 0$ ).
|
| 375 |
+
|
| 376 |
+
<table><tr><td>train</td><td>WN-60f</td><td>UU</td><td>test DD</td><td>GG</td><td>Avg.</td></tr><tr><td>UU</td><td>pSEq Stably Matched (%)</td><td>18.30 98.10</td><td>25.81 94.90</td><td>29.09 93.60</td><td>21.10 95.53</td></tr><tr><td>DD</td><td>pSEq Stably Matched (%)</td><td>171.27 2.80</td><td>10.52 99.00</td><td>77.36 0.10</td><td>86.38 33.97</td></tr><tr><td>GG</td><td>pSEq Stably Matched (%)</td><td>21.38 97.30</td><td>12.85 98.10</td><td>27.39 98.00</td><td>20.54 97.80</td></tr></table>
|
| 377 |
+
|
| 378 |
+
Table 4: Average SEq ( ) and Bal ( ) at $N = 1 0 0$ .
|
| 379 |
+
|
| 380 |
+
<table><tr><td>100 × 100,UU</td><td>SEq</td><td>Bal</td></tr><tr><td>GS</td><td>1259.39</td><td>1709.53</td></tr><tr><td>PolyMin</td><td>153.35</td><td>952.85</td></tr><tr><td>DACC</td><td>194.65</td><td>988.02</td></tr><tr><td>Power Balance</td><td>49.41</td><td>909.73</td></tr><tr><td>WN-80f/b+Hungarian</td><td></td><td></td></tr><tr><td>pSEqlpBal</td><td>257.99</td><td>1145.36</td></tr><tr><td>SEqiBal</td><td>68.36</td><td>919.75</td></tr><tr><td>Stably Matched (%)</td><td>89.4</td><td>80.8</td></tr></table>
|
| 381 |
+
|
| 382 |
+
Table $3$ shows the results. Remarkably, there is a contrast between the model trained with DD and the others. The model with DD could hardly satisfy the one-to-one stable matching constraint when tested on UU/GG, and resulted in poor ${ p S E q }$ scores. In contrast, the model with GG achieved satisfying ${ p S E q }$ scores on UU/DD. Since GG generates preference lists based on a common preference score $( i / N$ for $i$ -th agent) with noise, agents in GG tend to have similar preference lists (i.e., hard to assign optimally). A model trained with such hard samples works well even for the test samples drawn from other distribution. UU has also performed well owing to its non-biased sampling strategy. On the other hand, DD worst performed due to its highly biased generation strategy. From these results, we confirmed that WeaveNet has certain robustness in the distribution shift as long as training samples are competitive enough.
|
| 383 |
+
|
| 384 |
+
# 5.3 Demonstration with $N = 1 0 0$
|
| 385 |
+
|
| 386 |
+
We further demonstrate the capability of WeaveNet under a larger size of problem instances, $N = 1 0 0$ In this case, we found that WN-80f and WN-80b failed to yield one-to-one matchings for $1 3 . 4 \%$ and $1 9 . 8 \%$ , respectively (see the Table 9 in B.2 for details). To compensate for this problem, we applied the Hungarian algorithm (Kuhn, 1955) to surely binarize $\hat { m }$ into a one-to-one matching. Table $^ 4$ shows WeaveNet’s relatively good $\overline { { S E q } }$ and $B a l$ scores. Even with the help of the Hungarian algorithm, they were strongly penalized in ${ p S E q }$ and $p B a l$ due to the poor stable matching rate. In other words, we can potentially fill the large gap by better constraining the output.
|
| 387 |
+
|
| 388 |
+
Since this work is just a pilot study toward a practical differential assignment solver, there is still a lot of space for improvement. The proposed test protocol with stable matching will facilitate it since we can freely adjust the difficulty of the problem to develop and enhance the methods continuously.
|
| 389 |
+
|
| 390 |
+
# 6 Conclusion
|
| 391 |
+
|
| 392 |
+
This paper proposed a novel differential assignment solver, WeaveNet, and an evaluation protocol on two strongly NP-hard variants of stable matching. In the experiments, we demonstrated the advantage of set encoder and the two-stream architecture of Weavenet against the other learning-based methods. These techniques also achieved a better performance than the state-of-the-art algorithmic method when $N = 2 0$ and a comparative performance when $N = 3 0$ . Furthermore, the asymmetric variants, split batch normalization with the side-identifiable code, enabled the method to work even with the strongly biased dataset of UD. We also confirmed that the proposed method does not work at $N = 1 0 0$ , which will be an immediate task for this new field of differential assignment solver. We hope that this work becomes a starting point to open a new vista for real-world assignment problems.
|
| 393 |
+
|
| 394 |
+
18 References
|
| 395 |
+
19 Ravindra K Ahuja, Arvind Kumar, Krishna C Jha, and James B Orlin. Exact and heuristic algorithms for the weapon-target assignment problem. Operations research, 55(6):1136–1146, 2007.
|
| 396 |
+
21 Lukas Brozovsky and Vaclav Petricek. Recommender system for online dating service. In Proceedings of Conference Znalosti 2007, Ostrava, 2007.
|
| 397 |
+
23 Zhe Cao, Tomas Simon, Shih-En Wei, and Yaser Sheikh. Realtime multi-person 2d pose estimation using part affinity fields. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017.
|
| 398 |
+
6 Piotr Dworczak. Deferred acceptance with compensation chains. In Proceedings of the 2016 ACM Conference on Economics and Computation, pages 65–66, 2016.
|
| 399 |
+
28 Patrick Emami, Panos M. Pardalos, Lily Elefteriadou, and Sanjay Ranka. Machine learning methods for data association in multi-object tracking. ACM Computing Surveys, 53(4), 2020.
|
| 400 |
+
0 Tomás Feder. A new fixed point approach for stable networks and stable marriages. Journal of Computer and System Sciences, 45(2):233–284, 1992.
|
| 401 |
+
32 Tomás Feder. Stable networks and product graphs. American Mathematical Society, 1995.
|
| 402 |
+
33 David Gale and Lloyd S Shapley. College admissions and the stability of marriage. The American Mathematical Monthly, 69(1):9–15, 1962.
|
| 403 |
+
5 Daniel Gibbons, Cheng-Chew Lim, and Peng Shi. Deep learning for bipartite assignment problems. In Proceedings of IEEE International Conference on Systems, Man and Cybernetics, pages 2318–
|
| 404 |
+
2325, 2019.
|
| 405 |
+
38 Sushmita Gupta, Sanjukta Roy, Saket Saurabh, and Meirav Zehavi. Balanced stable marriage: How close is close enough? In Workshop on Algorithms and Data Structures, pages 423–437, 2019. Dan Gusfield and Robert W Irving. The stable marriage problem: structure and algorithms. MIT press, 1989.
|
| 406 |
+
42 Dan Gusfield. Three fast algorithms for four problems in stable marriage. SIAM Journal on Computing, 16(1):111–128, 1987.
|
| 407 |
+
4 Robert W Irving, Paul Leather, and Dan Gusfield. An efficient algorithm for the “optimal” stable marriage. Journal of the ACM, 34(3):532–543, 1987.
|
| 408 |
+
46 Kazuo Iwama, Shuichi Miyazaki, and Hiroki Yanagisawa. Approximation algorithms for the sexequal stable marriage problem. ACM Transaction on Algorithms, 7(1), 2010.
|
| 409 |
+
48 Akiko Kato. Complexity of the sex-equal stable marriage problem. Japan Journal of Industrial and Applied Mathematics, 10(1):1, 1993.
|
| 410 |
+
0 Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Proceedings of International Conference on Learning Representations, 2015.
|
| 411 |
+
52 Harold W Kuhn. The hungarian method for the assignment problem. Naval research logistics quarterly, 2(1-2):83–97, 1955.
|
| 412 |
+
54 Qimai Li, Zhichao Han, and Xiao-Ming Wu. Deeper insights into graph convolutional networks for semi-supervised learning. In Proceedings of AAAI Conference on Artificial Intelligence, pages
|
| 413 |
+
3538–3545, 2018. Shira Li. Deep Learning for Two-Sided Matching Markets. Bachelor’s thesis, Harvard University,
|
| 414 |
+
2019.
|
| 415 |
+
59 Eric McDermid and Robert W Irving. Sex-equal stable matchings: Complexity and exact algorithms. Algorithmica, 68(3):545–570, 2014.
|
| 416 |
+
61 Kenta Oono and Taiji Suzuki. Graph neural networks exponentially lose expressive power for node classification. In Proceedings of International Conference on Learning Representations, 2020.
|
| 417 |
+
Charles R. Qi, Hao Su, Kaichun Mo, and Leonidas J. Guibas. PointNet: Deep learning on point sets for 3D classification and segmentation. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, July 2017.
|
| 418 |
+
Nikolaos Tziavelis, Ioannis Giannakopoulos, Katerina Doka, Nectarios Koziris, and Panagiotis Karras. Equitable stable matchings in quadratic time. In Proceedings of Advances in Neural Information Processing Systems, pages 457–467, 2019.
|
| 419 |
+
Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? In Proceedings of International Conference on Learning Representations, 2019.
|
| 420 |
+
Manzil Zaheer, Satwik Kottur, Siamak Ravanbakhsh, Barnabas Poczos, Russ R Salakhutdinov, and Alexander J Smola. Deep sets. In Proceedings of Advances in Neural Information Processing Systems, volume 30, pages 3391–3401, 2017.
|
| 421 |
+
|
| 422 |
+
# 374 Checklist
|
| 423 |
+
|
| 424 |
+
3751. For all authors...
|
| 425 |
+
|
| 426 |
+
376 (a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contri
|
| 427 |
+
377 butions and scope? [Yes] The experimental results in Section 5 correspond to the main claims,
|
| 428 |
+
378 which are summarized as the contribution list in Section 1
|
| 429 |
+
379 (b) Did you describe the limitations of your work? [Yes] Our method works best among any
|
| 430 |
+
380 baselines when $N \leq 2 0$ , comparative to the state-of-the-art algorithmic baseline when $N = 3 0$ ,
|
| 431 |
+
381 but poorly when $N = 1 0 0$ . See Section $\underline { { \boldsymbol { \mathsf { F } . 3 } } }$
|
| 432 |
+
382 (c) Did you discuss any potential negative societal impacts of your work? [Yes] We briefly
|
| 433 |
+
383 discussed the fairness/unfairness achieved by our method in the paragraph “Asymmetric variant
|
| 434 |
+
384 with split batch normalization” in Section $4 . 1 .$ Namely, the asymmetric variant can better
|
| 435 |
+
385 optimize the objective than the symmetric one (which ensures mathematically equal treatment
|
| 436 |
+
386 for sides $A$ and $B$ ) but harms the equal treatment of the two sides.
|
| 437 |
+
387 (d) Have you read the ethics review guidelines and ensured that your paper conforms to them?
|
| 438 |
+
388 [Yes]
|
| 439 |
+
|
| 440 |
+
3892. If you are including theoretical results...
|
| 441 |
+
|
| 442 |
+
(a) Did you state the full set of assumptions of all theoretical results? [N/A] We have no main theoretical results. The only theoretical discussion is for the computational cost of WeaveNet in A.2, whose assumption is the network shape explained in the paper.
|
| 443 |
+
(b) Did you include complete proofs of all theoretical results? [N/A] We have no main theoretical results. The only theoretical discussion is for the computational cost of WeaveNet in $\mathbf { A } . 2 ,$ where we provided enough detailed explanation as a proof.
|
| 444 |
+
|
| 445 |
+
3963. If you ran experiments...
|
| 446 |
+
|
| 447 |
+
(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [Yes] We have included it in the supplemental material.
|
| 448 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] We described the training details in Section 5 “Training protocol” and Section A.5.
|
| 449 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] We presented figures with the error bars in Section ${ \bf A . } 4$ of the appendix, which demonstrated the stable behavior of the proposed method against the random seed. For the other part, we have multiple settings, and we observed a stable trend in the results.
|
| 450 |
+
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] We described it in the appendix, Section C.
|
| 451 |
+
|
| 452 |
+
4094. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 453 |
+
|
| 454 |
+
410 (a) If your work uses existing assets, did you cite the creators? [Yes] See Section C in the appendix.
|
| 455 |
+
411 (b) Did you mention the license of the assets? [Yes] See Section C.
|
| 456 |
+
412 (c) Did you include any new assets either in the supplemental material or as a URL? [Yes] We
|
| 457 |
+
413 provides a code to random-generate the problem instances, which contains no personal or any
|
| 458 |
+
414 other sensitive information, but only the distribution parameters of the LibimSeti dataset.
|
| 459 |
+
415 (d) Did you discuss whether and how consent was obtained from people whose data you’re
|
| 460 |
+
416 using/curating? [Yes] See Section C.
|
| 461 |
+
417 (e) Did you discuss whether the data you are using/curating contains personally identifiable
|
| 462 |
+
418 information or offensive content? [Yes] See Section C.
|
| 463 |
+
|
| 464 |
+
4195. If you used crowdsourcing or conducted research with human subjects...
|
| 465 |
+
|
| 466 |
+
420 (a) Did you include the full text of instructions given to participants and screenshots, if applicable?
|
| 467 |
+
421 [N/A] We used neither crowd-sourcing nor human subjects.
|
| 468 |
+
422 (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB)
|
| 469 |
+
423 approvals, if applicable? [N/A]
|
| 470 |
+
424 (c) Did you include the estimated hourly wage paid to participants and the total amount spent on
|
| 471 |
+
425 participant compensation? [N/A]
|
md/train/BJe-unNYPr/BJe-unNYPr.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
md/train/By-7dz-AZ/By-7dz-AZ.md
ADDED
|
@@ -0,0 +1,251 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# A FRAMEWORK FOR THE QUANTITATIVE EVALUATION OF DISENTANGLED REPRESENTATIONS
|
| 2 |
+
|
| 3 |
+
Christopher K. I. Williams
|
| 4 |
+
|
| 5 |
+
Cian Eastwood School of Informatics University of Edinburgh, UK c.eastwood@ed.ac.uk
|
| 6 |
+
|
| 7 |
+
School of Informatics University of Edinburgh, UK and Alan Turing Institute, London, UK ckiw@inf.ed.ac.uk
|
| 8 |
+
|
| 9 |
+
# ABSTRACT
|
| 10 |
+
|
| 11 |
+
Recent AI research has emphasised the importance of learning disentangled representations of the explanatory factors behind data. Despite the growing interest in models which can learn such representations, visual inspection remains the standard evaluation metric. While various desiderata have been implied in recent definitions, it is currently unclear what exactly makes one disentangled representation better than another. In this work we propose a framework for the quantitative evaluation of disentangled representations when the ground-truth latent structure is available. Three criteria are explicitly defined and quantified to elucidate the quality of learnt representations and thus compare models on an equal basis. To illustrate the appropriateness of the framework, we employ it to compare quantitatively the representations learned by recent state-of-the-art models.
|
| 12 |
+
|
| 13 |
+
# 1 INTRODUCTION
|
| 14 |
+
|
| 15 |
+
To gain a conceptual understanding of our world, models must first learn to understand the factorial structure of low-level sensory input without supervision (Bengio et al., 2013; Lake et al., 2016; Higgins et al., 2017). As argued in several notable works (Desjardins et al., 2012; Bengio et al., 2013; Chen et al., 2016; Higgins et al., 2017), this understanding can only be gained if the model learns to disentangle the underlying explanatory factors hidden in unlabelled input.
|
| 16 |
+
|
| 17 |
+
A disentangled representation is generally described as one which separates the factors of variation, explicitly representing the important attributes of the data (Desjardins et al., 2012; Bengio et al., 2013; Cohen & Welling, 2014b; Kulkarni et al., 2015; Chen et al., 2016; Higgins et al., 2017). For example, given an image dataset of human faces, a disentangled representation may consist of separate dimensions (or features) for the face size, hairstyle, eye colour, facial expression, etc. Ultimately, we would like to learn representations that are invariant to irrelevant changes in the data. However, the relevant downstream tasks are generally unknown at training time and hence it is difficult to deduce a priori which features will be useful. Thus, the most robust method is to disentangle as many factors of variation as possible, discarding as little information as possible (Desjardins et al., 2012; Bengio et al., 2013).
|
| 18 |
+
|
| 19 |
+
Despite the expanding literature on models which seek to learn disentangled representations (Desjardins et al., 2012; Reed et al., 2014; Zhu et al., 2014; Cheung et al., 2014; Larsen et al., 2015; Makhzani et al., 2015; Yang et al., 2015; Kulkarni et al., 2015; Whitney et al., 2016; Chen et al., 2016; Higgins et al., 2017; Denton & Birodkar, 2017), visual inspection remains the standard evaluation metric. While the work of Higgins et al. (2017) partially addresses this issue (as discussed in section 3) and various definitions have implied additional desiderata like interpretability (Bengio et al., 2013; Kulkarni et al., 2015; Chen et al., 2016), invariance (Goodfellow et al., 2009; Cohen & Welling, 2014a;b; Lenc & Vedaldi, 2015) and equivariance (Kivinen & Williams, 2011; Lenc & Vedaldi, 2015; Jayaraman & Grauman, 2015), current research generally lacks a clear metric for quantitatively evaluating and comparing disentangled representations.
|
| 20 |
+
|
| 21 |
+
In this work we propose a framework for the quantitative evaluation of disentangled representations when the ground-truth latent structure is available. To elucidate the quality of learnt representations and thus compare models on an equal basis, desiderata of disentangled representations are explicitly defined and quantified. These unified desiderata help define the disentangled representations which we seek and remove the need for a subjective visual evaluation by a human arbiter. To illustrate the appropriateness of this framework, we employ it to compare quantitatively the representations learned by principal components analysis (PCA), the variational autoencoder (VAE, Kingma & Welling 2013), $\beta$ -VAE (Higgins et al., 2017) and information maximising generative adversarial networks (InfoGAN, Chen et al. 2016).
|
| 22 |
+
|
| 23 |
+
In the remainder of this paper, we begin by detailing the theoretical framework and how it facilitates the quantitative evaluation of disentangled representations. Next we review related desiderata and metrics for evaluating disentangled representations. Finally, we describe the dataset and model specifics before presenting the experimental results.
|
| 24 |
+
|
| 25 |
+
# 2 THEORETICAL FRAMEWORK
|
| 26 |
+
|
| 27 |
+
Models for disentangled factor learning seek a compact data representation or code $^ c$ of dimension $D$ , which consists of disentangled and interpretable latent variables. For synthetic data, the $K$ - dimensional generative factors $_ { z }$ are designed to be an ideal such representation. Thus if $D = K$ the ideal disentangled code $c ^ { * }$ should be some (scaled) permutation of $_ { z }$ , i.e. they should be related by a generalised permutation matrix (or monomial matrix1). If $D > K$ , one would expect to obtain this monomial structure along with a number of ‘dead’ or irrelevant units in $^ c$ which are not predictive of $/$ informative about $_ { z }$ . Thus, we can quantitatively evaluate the codes learned by a given model $M$ using the following steps:
|
| 28 |
+
|
| 29 |
+
1. Train $M$ on a synthetic dataset with generative factors $_ { z }$
|
| 30 |
+
2. Retrieve $^ c$ for each sample $_ { \textbf { \em x } }$ in the dataset $( { \pmb c } = M ( { \pmb x } ) )$ )
|
| 31 |
+
3. Train regressor $f$ to predict $_ z$ given $\pmb { c } \left( \hat { \pmb { z } } = f ( \pmb { c } ) \right)$
|
| 32 |
+
4. Quantify $f$ ’s deviation from the ideal mapping and the prediction error
|
| 33 |
+
|
| 34 |
+
We now detail the proposed evaluation metrics, i.e., steps 3 and 4. We train $K$ regressors to predict the value of $K$ generative factors. The regressor $f _ { j }$ predicts $z _ { j }$ given $^ c$ , that is, it learns a mapping $f _ { j } ( \pmb { c } ) : \mathbb { R } ^ { D } \mathbb { R } ^ { 1 }$ . We use regressors that can provide a matrix of relative importances $R$ , where $R _ { i j }$ denotes the relative importance of $c _ { i }$ in predicting $z _ { j }$ (see section 4.3). This allows us to explicitly define and quantify three criteria of disentangled representations or codes which are implicit in recent definitions (Desjardins et al., 2012; Bengio et al., 2013; Kulkarni et al., 2015; Chen et al., 2016; Higgins et al., 2017), namely disentanglement, completeness and informativeness.
|
| 35 |
+
|
| 36 |
+
Disentanglement. The degree to which a representation factorises or disentangles the underly
|
| 37 |
+
ing factors of variation, with each variable (or dimension) capturing at most one generative factor. $D _ { i }$ ode variable denotes the $c _ { i }$ is qtrop ntifiand $D _ { i } = ( 1 - \bar { H } _ { K } ( P _ { i . } ) )$ , whereotes the
|
| 38 |
+
$\begin{array} { r } { H _ { K } ( P _ { i . } ) = - \sum _ { k = 0 } ^ { K - 1 } P _ { i k } \log _ { K } P _ { i k } } \end{array}$ $P _ { i j } = \left. R _ { i j } \right/ \sum _ { k = 0 } ^ { K - 1 } { R _ { i k } }$ $c _ { i }$ $z _ { j }$ $c _ { i }$
|
| 39 |
+
erative factor, the score will be 1. If $c _ { i }$ is equally important for predicting all generative factors, the
|
| 40 |
+
score will be 0. $D _ { i }$ can be visualised by examining row $i$ of the Hinton diagrams as in Figure 3.
|
| 41 |
+
|
| 42 |
+
In order to account for dead or irrelevant units in $^ c$ , relative code variable importance $\begin{array} { r l } { \rho _ { i } } & { { } = } \end{array}$ $\textstyle \sum _ { j } R _ { i j } / \sum _ { i j } R _ { i j }$ is used to construct a weighted average $\sum _ { i } \rho _ { i } D _ { i }$ expressing overall disentanglement. If a code variable $c _ { i }$ is irrelevant for predicting $_ z$ , then its $\rho _ { i }$ (and thus contribution to the overall disentanglement) will be near zero.
|
| 43 |
+
|
| 44 |
+
Completeness. The degree to which each underlying factor is captured by a single code variable. where The completeness score $\begin{array} { r } { H _ { D } ( \tilde { P } _ { . j } ) = - \sum _ { d = 0 } ^ { D - 1 } \tilde { P } _ { d j } \log _ { D } \tilde { P } _ { i j } } \end{array}$ $C _ { j }$ in capturing generative factor denotes the entropy of the $z _ { j }$ is quantified by $\tilde { P } _ { \cdot j }$ distribution. If a single code $C _ { j } \stackrel { - } { = } ( 1 - H _ { D } ( \tilde { P } _ { . j } ) )$ , variable contributes to $z _ { j }$ ’s prediction, the score will be 1 (complete). If all code variables equally contribute to $z _ { j }$ ’s prediction, the score will be 0 (maximally overcomplete). $C _ { j }$ can be visualised by examining column $j$ of the Hinton diagrams as in Figure 3.
|
| 45 |
+
|
| 46 |
+

|
| 47 |
+
Figure 1: Visualising disentanglement and completeness.
|
| 48 |
+
|
| 49 |
+
Informativeness. The amount of information that a representation captures about the underlying factors of variation. To be useful for natural tasks which require knowledge of the important attributes of the data (e.g. object recognition), representations must ultimately capture information about the underlying factors of variation (Bengio et al., 2013; Chen et al., 2016). The informativeness of code $^ c$ about generative factor $z _ { j }$ is quantified by the prediction error $E ( z _ { j } , \hat { z } _ { j } )$ (averaged over the dataset), where $E$ is an appropriate error function and $\hat { z } _ { j } = f _ { j } ( \pmb { c } )$ . It is important to note that the prediction error $E ( z _ { j } , \hat { z } _ { j } )$ , and thus this informativeness metric, is dependent on the capacity of $f$ , with linear regressors only capable of extracting information about $_ z$ in $^ c$ that is explicitly represented. Hence this informativeness metric is also dependent on a model’s ability to explicitly represent information about $_ z$ in $^ c$ , which in turn is dependent on the model’s ability to disentangle the underlying factors of variation $( z )$ . Thus the informativeness metric has some overlap with the disentanglement metric, with the size of the overlap determined by the capacity of $f$ (no overlap with infinite capacity).
|
| 50 |
+
|
| 51 |
+
While the disentanglement score quantifies the number of generative factors captured by a given code variable, the completeness score quantifies the number of code variables which capture a given generative factor. Together, these scores quantify the deviation from the ideal one-to-one mapping between $_ z$ and $K$ of the dimensions in $^ c$ . Figure 1 illustrates this idea.
|
| 52 |
+
|
| 53 |
+
Despite the overlap between the disentanglement and informativeness metrics with low-capacity linear regressors, these are ultimately distinct criteria. While disentanglement requires each code variable in $^ c$ to be only perturbed by changes in a single $z$ , informativeness requires these perturbations to be systematic and thus informative. This motivates the use of non-linear regressors in section 4.3.
|
| 54 |
+
|
| 55 |
+
While the ideal code would be able to explicitly represent each generative factor with a single variable, models with generic priors cannot be expected to learn such complete and explicit codes. For example, generative factors which are drawn from a distribution on a circle cannot be accurately captured by single code variables on which unwrapped prior distributions are imposed. Thus, with generic priors like the standard normal, information about such topologically distinct generative factors may be non-linearly encoded across multiple code variables. Empirical results in Appendix C and (Higgins et al., 2017, fig. 7) support this idea, with several code variables resembling non-linear functions (like the sine and cosine) of the object azimuth. This further motivates the use of non-linear regressors in section 4.3.
|
| 56 |
+
|
| 57 |
+
Our criteria assume that it is possible to recover the latent factors $_ { z }$ from the data. If the data $_ { \textbf { \em x } }$ depends on a linear combination of (some of) the underlying $z$ ’s with a spherically symmetric distribution, then it will only be possible to recover these components up to a rotation matrix. This is the well-known issue of the rotation of factors in the linear factor analysis model (see e.g., Mardia, Kent, and Bibby 1979, sec. 9.6), and also leads to the condition in independent components analysis (ICA) that at most one of the $z$ ’s can be Gaussian (Hyvarinen et al., 2001). In this case, the infor- ¨ mativeness metric remains valid but the disentanglement and completeness metrics do not as they are dependent on the arbitrary rotation which determines $^ c$ ’s alignment with $_ z$ . Although $_ { z }$ may be used to compute the rotation matrix which best aligns $^ c$ and $_ z$ , we ultimately wish to evaluate models which will not have access to $_ z$ at test time.
|
| 58 |
+
|
| 59 |
+
# 3 RELATED WORK
|
| 60 |
+
|
| 61 |
+
The question of how well a learned representation $^ c$ matches the true generative factors $_ { z }$ has been considered in the ‘square’ case of independent components analysis (ICA), where $D = K$ . In the ICA case, the data is generated as $\textstyle { \boldsymbol { x } } = A { \boldsymbol { z } }$ and the learned representation is obtained as $\mathbf { \boldsymbol { c } } = W \mathbf { \boldsymbol { x } }$ , where $A$ is the mixing matrix and $W$ is the learned ‘un-mixing’ matrix. Ideally $P = W A$ will be equal to a permutation matrix. Yang $\&$ Amari (1997, sec. 6.1) propose an error metric to assess how close $P$ is to a permutation matrix2. This metric takes the form
|
| 62 |
+
|
| 63 |
+
$$
|
| 64 |
+
E = \sum _ { i } \left( \sum _ { j } \frac { \left| p _ { i j } \right| } { \operatorname* { m a x } _ { k } \left| p _ { i k } \right| } - 1 \right) + \sum _ { j } \left( \sum _ { i } \frac { \left| p _ { i j } \right| } { \operatorname* { m a x } _ { k } \left| p _ { k j } \right| } - 1 \right) ,
|
| 65 |
+
$$
|
| 66 |
+
|
| 67 |
+
summing two terms which have similar goals to our disentanglement and completeness scores respectively, although expressed by comparing with the maximum value in the row or column, rather than via an entropic measure. Note that, due to the linear structure of ICA, there is no explicit mapping between $^ c$ and $_ z$ . We report separate scores as they capture distinct criteria and go beyond this metric by handling the non-square case when $D > K$ .
|
| 68 |
+
|
| 69 |
+
Predicting $_ { z }$ from $^ c$ has also been considered previously. Higgins et al. (2017, sec. A.5) use a linear classifier to predict discrete settings of $_ { z }$ and thus quantify the amount of explicit information about $_ z$ in $^ c$ , albeit with a discretisation step which we find unnecessary. Higgins et al. (2017, sec. 3) also propose a disentanglement metric. With this method, one of the generative factors say $z _ { k }$ is held fixed, and pairs of $_ { \textbf { \em x } }$ ’s are drawn, generated with different random $_ { z }$ ’s except for the fixed $z _ { k }$ . Pairwise absolute differences of the resulting codes $\lvert c _ { 1 } - c _ { 2 } \rvert$ are then computed and averaged over repetitions before being used to train a linear classifier to predict which generative factor was held fixed. In our view this is unnecessarily cumbersome—by setting up a regression problem to predict $_ { z }$ from $^ c$ as we have done, the structure of the $R _ { i j }$ matrix can be interrogated to quantify the degree of disentanglement. In addition, this facilitates the quantification of additional criteria, namely completeness and informativeness, without needing to generate any additional datasets.
|
| 70 |
+
|
| 71 |
+
Glorot et al. (2011, fig. 3) predict $_ z$ from $^ c$ using a lasso regressor but only to qualitatively assess disentanglement, visually assessing the overlap of important features for the separate tasks of domain recognition and sentiment classification. Karaletsos et al. (2015) do so with an unspecified regressor, thus quantifying informativeness. In addition, they devise a quantitative metric to determine a model’s ability to disentangle the underlying factors of variation in images. In particular, they predict the order of query-specific oracle triplets of images, where the order indicates image similarity with respect to a query (e.g., ‘Where is the light condition most similar in terms of azimuth?’). However, the proposed metric is specifically designed to evaluate their ‘oracle-prioritized belief network’ and thus overly cumbersome to be used as a generic disentanglement metric.
|
| 72 |
+
|
| 73 |
+
Properties such as invariance and equivariance have been proposed as desiderata for representations or codes (Goodfellow et al., 2009; Kivinen & Williams, 2011; Cohen & Welling, 2014b; Lenc & Vedaldi, 2015; Jayaraman & Grauman, 2015). In our view these qualities arise naturally from a properly disentangled and informative code. Consider, for example, the code of an object which consists of separate variables for its class (e.g., cup, bottle, banana etc.), position, pose, texture etc. If the object is translated, its position code variable(s) will transform accordingly (equivariance), but other code variables will remain invariant.
|
| 74 |
+
|
| 75 |
+
# 4 EXPERIMENTS
|
| 76 |
+
|
| 77 |
+
We employ the framework to compare quantitatively the codes learned by PCA, the VAE, $\beta$ -VAE and InfoGAN. The results can be reproduced with our open source implementation3.
|
| 78 |
+
|
| 79 |
+
# 4.1 DATA
|
| 80 |
+
|
| 81 |
+
We use the graphics renderer described in (Moreno et al., 2016) to generate $2 0 0 , 0 0 0 6 4 \times 6 4$ colour images of an object (teapot) with varying pose and colour (see Figure 2). For simplicity, the camera is centred on the object, the scene background is removed and additional generative factors (shape and lighting) are held constant. Each generative factor is independently sampled from its respective uniform distribution: azimuth $( z _ { 0 } ) \setminus U [ 0 , 2 \pi ]$ , elevation $( \bar { z _ { 1 } } ) \sim U [ \bar { 0 } , \pi / 2 ]$ , $\operatorname { r e d } ( z _ { 2 } ) \sim U [ 0 , 1 ]$ , green $( z _ { 3 } ) \sim U [ 0 , 1 ]$ , $\mathrm { \ u e } ( z _ { 4 } ) \sim U [ 0 , 1 ]$ . We divide the images into training (160,000), validation (20,000) and test (20,000) sets before removing images which contain particular generative factor combinations to faciliate the evaluation of zeroshot performance (see Appendix B.2). This left 142,927, 17,854 and 17,854 images in the training, validation and test sets respectively.
|
| 82 |
+
|
| 83 |
+

|
| 84 |
+
Figure 2: Data samples.
|
| 85 |
+
|
| 86 |
+
# 4.2 MODELS
|
| 87 |
+
|
| 88 |
+
Generative modelling has become one of the leading approaches to unsupervised representation learning, with several recent works imposing additional learning constraints to encourage the model to learn disentangled representations (Desjardins et al., 2012; Reed et al., 2014; Zhu et al., 2014; Cohen & Welling, 2014a; Cheung et al., 2014; Larsen et al., 2015; Makhzani et al., 2015; Chen et al., 2016; Higgins et al., 2017). Of these models, it can be argued that $\beta$ -VAE (Higgins et al., 2017) and InfoGAN (Chen et al., 2016) are the most promising due to their scalability and lack of assumptions about the underling factors of variation. Thus, we evaluate the codes learned by these models and compare them to the VAE $\beta = 1 \AA$ ) and PCA.
|
| 89 |
+
|
| 90 |
+
For fair comparison, we train all models with 10 code variables and use the same network architectures for the VAE, $\beta$ -VAE and InfoGAN. More specifically, we use the same residual networks (ResNets, He et al. 2016) for the encoders/discriminator and the decoders/generator (see Table 2), and train InfoGAN with 10 continous ‘latent codes’(Chen et al., 2016) and 0 noise variables. We found that these ResNets produced the sharpest images and best visual disentanglement for all generative models, outperforming popular architectures for ( $\beta .$ -)VAE (Larsen et al., 2015; Higgins et al., 2017) and InfoGAN (Kulkarni et al., 2015). We fit $\beta = 6$ and $\lambda = 6$ for $\beta$ -VAE and InfoGAN respectively by balancing reconstruction/generation quality and visual disentanglement (see Appendix D), where $\lambda$ is the mutual information coefficient. See Appendix A for further details.
|
| 91 |
+
|
| 92 |
+
# 4.3 REGRESSORS
|
| 93 |
+
|
| 94 |
+
Lasso. We begin with linear regressors and encourage a sparse mapping between $^ c$ and $_ { z }$ with an $\ell _ { 1 }$ regularisation penalty (lasso regressors). With the inputs and targets normalised to have zero mean and unit variance, the magnitude of the resulting regression weights rank the learnt code variables $c _ { 0 } , \ldots , c _ { D - 1 }$ in order of relative importance to the prediction. That is, they reveal which code variables capture information about a given generative factor. Thus, we define the matrix of relative importances $R$ as $R _ { i j } = | W _ { i j } |$ for linear regression, where $R _ { i j }$ denotes the relative importance of $c _ { i }$ in predicting $z _ { j }$ and $| W _ { i j } |$ denotes the magnitude of the weight used to scale $c _ { i }$ in predicting $z _ { j }$ . We fit the $\ell _ { 1 }$ penalty coefficient $\alpha$ on the validation set to achieve the lowest prediction error.
|
| 95 |
+
|
| 96 |
+
Random forest. We use random forest regressors due to their inbuilt ability to determine the relative importance of each feature to a given prediction, thus allowing us to directly specify the matrix of relative importances $R$ . Random forests average the predictions and feature importances from each decision tree in the ensemble. The number of times a tree chooses to split on a particular input variable determines its importance to the prediction. Thus, the relative importance of each input variable $c _ { i }$ is given by the number of cases split on $c _ { i }$ over the total number of splits (Breiman et al., 1984). As performance generally improves with the number of trees $n$ in the ensemble, we fix $n = 1 0$ . The remaining parameter, tree depth, is determined on the validation set (lowest prediction error).
|
| 97 |
+
|
| 98 |
+
<table><tr><td colspan="4">(a) Lasso</td><td colspan="4">(b)Random forest</td></tr><tr><td>Code</td><td>Disent.</td><td>Compl.</td><td>Inform.</td><td>Code</td><td>Disent.</td><td>Compl.</td><td>Inform.</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>PCA</td><td>0.29</td><td>0.32</td><td>0.44</td><td>PCA</td><td>0.50</td><td>0.52</td><td>0.27</td></tr><tr><td>VAE (β = 1)</td><td>0.67</td><td>0.62</td><td>0.37</td><td>VAE (β = 1)</td><td>0.86</td><td>0.75</td><td>0.09</td></tr><tr><td>β-VAE (β = 6)</td><td>0.66</td><td>0.59</td><td>0.35</td><td>β-VAE (β = 6)</td><td>0.90</td><td>0.76</td><td>0.10</td></tr><tr><td>InfoGAN</td><td>0.75</td><td>0.72</td><td>0.23</td><td>InfoGAN</td><td>0.91</td><td>0.87</td><td>0.13</td></tr></table>
|
| 99 |
+
|
| 100 |
+
Table 1: Average model scores. ‘Inform.’ indicates (average) normalised root-mean-square error (NRMSE) in predicting $_ z$ .
|
| 101 |
+
|
| 102 |
+
# 4.4 RESULTS
|
| 103 |
+
|
| 104 |
+
Overview. Table 1 presents the average disentanglement, completeness and informativeness scores for PCA, the VAE, $\beta$ -VAE and InfoGAN for the (a) lasso and (b) random forest regressors. With both regressors, PCA achieves the worst disentanglement, completeness and informativeness scores (highest error in predicting $_ z$ ) while the VAE $\mathbf { \nabla } \beta = 1 \mathbf { \dot { \varepsilon } } ,$ ) and $\beta$ -VAE $\beta = 6 )$ ) achieve very similar disentanglement, completeness and informativeness scores to each other. While InfoGAN achieves the best disentanglement, completeness and informativeness scores with the lasso regressor, the VAE and $\beta$ -VAE achieve similar disentanglement and informativeness scores to it with (the increased capacity of) the random forest regressor.
|
| 105 |
+
|
| 106 |
+
Disentanglement. InfoGAN achieves the highest average disentanglement with both regressors (although $\beta$ -VAE closely follows with the random forest regressor). That is, each variable in InfoGAN’s code (c−InfoGAN) is closest (on average) to capturing a single generative factor, making $c -$ InfoGAN the most disentangled code (see Appendix B.1 for the full / per-variable results). Figure 3 helps to identify the generative factors captured by a given code variable and thus visualise the disentanglement. For example, comparing $c _ { 0 }$ across all models in Figure 3 (the first rows), it is clear that $c _ { 0 } { - } \mathrm { V A E }$ , $c _ { 0 } { - } \beta \mathrm { V A E }$ and $c _ { 0 } { \mathrm { - I n f o G A N } }$ (almost) solely capture information about $z _ { \mathrm { 0 } }$ while $c _ { 0 } { - } \mathrm { P C A }$ captures information about almost all generative factors.
|
| 107 |
+
|
| 108 |
+
Completeness. InfoGAN also achieves the highest average completeness with both regressors. That is, $c - .$ InfoGAN is closest (on average) to capturing each generative factor with a single code variable, making $c - .$ InfoGAN the most complete code. In contrast, the low completeness score (overcompleteness) of $c { \mathrm { - P C A } }$ reveals that it uses several code variables to capture each generative factor (again, see Appendix B.1 for the full $/$ per-variable results). Figure 3 helps to identify the code variables which capture a given generative factor and thus visualise the completeness. For example, Figure 3 shows that several ��dead’ or redundant code variables $( c _ { 5 } , c _ { 6 } , c _ { 7 } )$ enable a high degree of completeness in $c -$ InfoGAN. In addition, comparing $z _ { 0 }$ (azimuth) across all models in Figure 3b (the first columns), it is clear that InfoGAN uses three code variables $( c _ { 0 } , c _ { 1 } , c _ { 8 } )$ to capture $z _ { \mathrm { 0 } }$ while PCA, VAE, and $\beta$ -VAE use significantly more. In particular, Figure 3 shows that $c { \mathrm { - P C A } }$ is severely overcomplete in capturing $z _ { \mathrm { 0 } }$ , with each of its constituent variables capturing distinct information about $z _ { \mathrm { 0 } }$ . With an ideal code, Figure 3 would show a single large square in $K$ rows and each column, indicating a one-to-one mapping between $_ z$ and $K$ of the dimensions in $^ c$ .
|
| 109 |
+
|
| 110 |
+
Informativeness. With the lasso regressor, c−InfoGAN is most predictive of / informative about $_ z$ . That is, $c - .$ InfoGAN contains the most easily-extractable $/$ explicit information about $_ { z }$ . This is supported by Figure 5, which plots each $z$ against the corresponding ‘most important’ code variable(s) (as indicated by the $R$ matrix) and reveals (primarily) linear relationships between $_ { z }$ and c−InfoGAN. Despite being significantly deeper with many more parameters, $c { \mathrm { - V A E } }$ and $\displaystyle c { - \beta \mathrm { V A E } }$ are only slightly more predictive of $_ z$ than $c { \mathrm { - P C A } }$ with this linear regressor, indicating that the information about $_ z$ in $c { \mathrm { - V A E } }$ and $\displaystyle c { - \beta \mathrm { V A E } }$ is not easily-extractable / explicit (again, this is supported by the relationships depicted in Figure 5).
|
| 111 |
+
|
| 112 |
+
All model codes better predict $_ z$ with the random forest regressor, particularly $c { \mathrm { - V A E } }$ and $\displaystyle c { - \beta \mathrm { V A E } }$ . In fact, $c { \mathrm { - V A E } }$ and $\textstyle { c - } \beta \mathrm { V A E }$ are the most predictive of $/$ informative about $_ { z }$ with this non-linear regressor, with the increased capacity allowing significantly more information about $_ z$ to be extracted from these codes. As discussed in section 2, the prediction error with this (nonlinear) regressor is likely a better quantification of informativeness as it is less dependent on the ability of the model to explicitly represent information about $_ z$ in $^ c$ .
|
| 113 |
+
|
| 114 |
+

|
| 115 |
+
Figure 3: Visualising $\pmb { R }$ . Square size indicates magnitude, i.e. relative importance. Row $i$ illustrates the importance of $c _ { i }$ to each prediction and thus the disentanglement. Column $j$ illustrates the importance of each code variable for predicting $z _ { j }$ and thus the completeness.
|
| 116 |
+
|
| 117 |
+
# 5 CONCLUSION
|
| 118 |
+
|
| 119 |
+
In this work we have presented a framework for the quantitative evaluation of disentangled representations when the ground-truth latent structure is available. The quality of learnt representations is elucidated through the explicit definition and quantification of three criteria: disentanglement, completeness and informativeness. To illustrate the appropriateness of our framework, we employed it to compare quantitatively the codes learned by PCA, the VAE, $\beta$ -VAE and InfoGAN.
|
| 120 |
+
|
| 121 |
+
While our framework is limited to synthetic datasets where it is possible to recover $_ z$ , reliable disentanglement is far from solved even in this restricted setting. Hence, we believe our framework and its constituent metrics take a substantial and important step forward in understanding learned representations. We have made the code and dataset publicly available in the hope that this facilitates further model comparisons and eventually the establishment of quantitative benchmarks for disentangled factor learning. While we have focused on image data in this work, future work may explore the applicability of our framework to other types of synthetic data.
|
| 122 |
+
|
| 123 |
+
# 6 ACKNOWLEDGEMENTS
|
| 124 |
+
|
| 125 |
+
We would like to thank Pol Moreno and Akash Srivastava for helpful discussions. We would also like to thank Pol for generating the dataset. Finally, we would like to thank the anonymous reviewers for their constructive criticisms which were helpful in refining this paper. The work of CW is supported in part by EPSRC grant EP/N510129/1 to the Alan Turing Institute.
|
| 126 |
+
|
| 127 |
+
# REFERENCES
|
| 128 |
+
|
| 129 |
+
Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016.
|
| 130 |
+
|
| 131 |
+
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.
|
| 132 |
+
|
| 133 |
+
Leo Breiman, Jerome Friedman, Charles J Stone, and Richard A Olshen. Classification and regression trees. CRC press, 1984.
|
| 134 |
+
|
| 135 |
+
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 29, pp. 2172–2180, 2016.
|
| 136 |
+
|
| 137 |
+
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.
|
| 138 |
+
|
| 139 |
+
Taco S Cohen and Max Welling. Transformation properties of learned visual representations. arXiv preprint arXiv:1412.7659, 2014a.
|
| 140 |
+
|
| 141 |
+
Taco S Cohen and Max Welling. Learning the irreducible representations of commutative lie groups. In International Conference on Machine Learning, pp. 1755–1763, 2014b.
|
| 142 |
+
|
| 143 |
+
Emily Denton and Vighnesh Birodkar. Unsupervised learning of disentangled representations from video. arXiv preprint arXiv:1705.10915, 2017.
|
| 144 |
+
|
| 145 |
+
Guillaume Desjardins, Aaron Courville, and Yoshua Bengio. Disentangling factors of variation via generative entangling. arXiv preprint arXiv:1210.5474, 2012.
|
| 146 |
+
|
| 147 |
+
Xavier Glorot, Antoine Bordes, and Yoshua Bengio. Domain adaptation for large-scale sentiment classification: A deep learning approach. In Proceedings of the 28th International Conference on Machine Learning (ICML-11), pp. 513–520, 2011.
|
| 148 |
+
|
| 149 |
+
Ian Goodfellow, Honglak Lee, Quoc V Le, Andrew Saxe, and Andrew Y Ng. Measuring invariances in deep networks. In Advances in Neural Information Processing Systems 22, pp. 646–654, 2009.
|
| 150 |
+
|
| 151 |
+
Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron Courville. Improved training of Wasserstein GANs. arXiv preprint arXiv:1704.00028, 2017.
|
| 152 |
+
|
| 153 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 770–778, 2016.
|
| 154 |
+
|
| 155 |
+
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 5th International Conference on Learning Representations, 2017.
|
| 156 |
+
|
| 157 |
+
A. Hyvarinen, J. Karhunen, and E. Oja. ¨ Independent Component Analysis. Wiley, 2001.
|
| 158 |
+
|
| 159 |
+
Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International Conference on Machine Learning, pp. 448–456, 2015.
|
| 160 |
+
|
| 161 |
+
Dinesh Jayaraman and Kristen Grauman. Learning image representations tied to ego-motion. In Proceedings of the IEEE International Conference on Computer Vision, pp. 1413–1421, 2015.
|
| 162 |
+
|
| 163 |
+
Theofanis Karaletsos, Serge Belongie, and Gunnar Ratsch. Bayesian representation learning with ¨ oracle constraints. arXiv preprint arXiv:1506.05011, 2015.
|
| 164 |
+
|
| 165 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 166 |
+
|
| 167 |
+
Diederik P Kingma and Max Welling. Auto-encoding variational Bayes. arXiv preprint arXiv:1312.6114, 2013.
|
| 168 |
+
|
| 169 |
+
Jyri J Kivinen and Christopher K. I. Williams. Transformation equivariant Boltzmann machines. In International Conference on Artificial Neural Networks, pp. 1–9. Springer, 2011.
|
| 170 |
+
|
| 171 |
+
Tejas D Kulkarni, William F Whitney, Pushmeet Kohli, and Josh Tenenbaum. Deep convolutional inverse graphics network. In Advances in Neural Information Processing Systems 28, pp. 2539– 2547, 2015.
|
| 172 |
+
|
| 173 |
+
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.
|
| 174 |
+
|
| 175 |
+
Anders Boesen Lindbo Larsen, Søren Kaae Sønderby, Hugo Larochelle, and Ole Winther. Autoencoding beyond pixels using a learned similarity metric. arXiv preprint arXiv:1512.09300, 2015.
|
| 176 |
+
|
| 177 |
+
Karel Lenc and Andrea Vedaldi. Understanding image representations by measuring their equivariance and equivalence. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 991–999, 2015.
|
| 178 |
+
|
| 179 |
+
Alireza Makhzani, Jonathon Shlens, Navdeep Jaitly, Ian Goodfellow, and Brendan Frey. Adversarial autoencoders. arXiv preprint arXiv:1511.05644, 2015.
|
| 180 |
+
|
| 181 |
+
K. V. Mardia, J. T. Kent, and J. M. Bibby. Multivariate Analysis. Academic Press, London, 1979.
|
| 182 |
+
|
| 183 |
+
Pol Moreno, Christopher K. I. Williams, Charlie Nash, and Pushmeet Kohli. Overcoming occlusion with inverse graphics. In ECCV Geometry Meets Deep Learning Workshop 2016, pp. 170–185. Springer, 2016.
|
| 184 |
+
|
| 185 |
+
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.
|
| 186 |
+
|
| 187 |
+
William F Whitney, Michael Chang, Tejas Kulkarni, and Joshua B Tenenbaum. Understanding visual concepts with continuation learning. arXiv preprint arXiv:1602.06822, 2016.
|
| 188 |
+
|
| 189 |
+
H. H. Yang and S-i. Amari. Adaptive On-Line Learning Algorithms for Blind Separation— Maximum Entropy and Minimum Mutual Information. Neural Computation, 9(7):1457–1482, 1997.
|
| 190 |
+
|
| 191 |
+
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 28, pp. 1099–1107, 2015.
|
| 192 |
+
|
| 193 |
+
Zhenyao Zhu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Multi-view perceptron: a deep model for learning face identity and view representations. In Advances in Neural Information Processing Systems 27, pp. 217–225, 2014.
|
| 194 |
+
|
| 195 |
+
# A EXPERIMENTAL SETUP
|
| 196 |
+
|
| 197 |
+
For all generative models, we use the ResNet architectures shown in Table 2 for the encoder / discriminatior $( D )$ / auxilary network $( Q )$ and the decoder / generator $( G )$ . We optimize using Adam (Kingma & Ba, 2014) with a learning rate of 1e-4 and a batch size of 64. For the stable training of InfoGAN, we fix the latent codes’ standard deviations to 1 and use the objective of the improved Wasserstein GAN (IWGAN) (Gulrajani et al., 2017), simply appending InfoGAN’s approximate mutual information penalty. As in Gulrajani et al. (2017), we use layer normalization (Ba et al., 2016) instead of batch normalization (Ioffe & Szegedy, 2015) in $D$ . As in Chen et al. (2016), $Q$ shares all convolutional layers with the discriminator (or ‘critic’ with WGAN objective) $D$ , each adding their own final output layer. As $Q$ parametrises the approximate posterior over continous latent codes $Q ( c | \pmb { x } )$ , we simply take the mean returned by $Q ( { \pmb x } )$ as the code or representation for a given image. Further details on the experimental setup are provided in our open-source implementation.
|
| 198 |
+
|
| 199 |
+
Table 2: (β-)VAE / InfoGAN architecture. Each network has 4 residual blocks (all but the first and last rows). The input to each residual block is added to its output (with appropriate downsampling/upsampling to ensure that the dimensions match). Downsampling (↓) is performed with mean pooling. $\uparrow$ indicates nearest-neighbour upsampling. When batch normalization (BN) is applied to convolutional layers, per-channel normalization is used.
|
| 200 |
+
|
| 201 |
+
<table><tr><td rowspan=1 colspan=2>Encoder /D/ Q Decoder /G</td></tr><tr><td rowspan=1 colspan=1>3x3 64 conv.</td><td rowspan=1 colspan=1>FC 4:4.8.64</td></tr><tr><td rowspan=1 colspan=1>BN,ReLU,3x3 64 convBN, ReLU,3×3 128 conv,↓</td><td rowspan=1 colspan=1>BN,ReLU, 3x3 512 conv ↑BN,ReLU, 3×3 512 conv</td></tr><tr><td rowspan=1 colspan=1>BN, ReLU, 3x3 128 convBN,ReLU,3x3 256 conv,↓</td><td rowspan=1 colspan=1>BN, ReLU, 3x3 256 conv ↑BN, ReLU, 3x3 256 conv</td></tr><tr><td rowspan=1 colspan=1>BN, ReLU, 3x3 256 convBN,ReLU,3×3 512 conv,↓</td><td rowspan=1 colspan=1>BN, ReLU, 3x3 128 conv ↑BN,ReLU, 3×3 128 conv</td></tr><tr><td rowspan=1 colspan=1>BN, ReLU,3x3 512 convBN, ReLU,3×3 512 conv,↓</td><td rowspan=1 colspan=1>BN,ReLU,3x3 64 conv ↑BN,ReLU,3x3 64 conv</td></tr><tr><td rowspan=1 colspan=1>FC Output</td><td rowspan=1 colspan=1>BN,ReLU,3x33 conv, tanh</td></tr></table>
|
| 202 |
+
|
| 203 |
+
# B EXTENDED RESULTS
|
| 204 |
+
|
| 205 |
+
# B.1 FULL TABLE / PER-FACTOR RESULTS
|
| 206 |
+
|
| 207 |
+
Tables 3 and 4 give the full regression results, i.e. the per-factor disentanglement, completeness and informativeness. As each target is normalised to have a standard deviation of 1, the root-mean-square error (RMSE) in predicting each target is naturally normalised relative to the constant regressor which guesses the expected value of the targets. Hence, we report the NRMSE.
|
| 208 |
+
|
| 209 |
+
# B.2 ZEROSHOT
|
| 210 |
+
|
| 211 |
+
Disentangled representations should enable a model to perform zero-shot inference, that is, generalise its knowledge beyond the training distribution by recombining previously-learnt factors (Bengio et al., 2013; Higgins et al., 2017). Thus, we can further evaluate the disentangled representations learned by a given model by quantifying its ability to perform zero-shot inference. We use the ground-truth values of the generative factors to create two different data distributions. More specifically, we isolate all images whose generative factor values lie in a particular range to create a ‘gap’ in the original dataset. This gap then serves as our zero-shot data containing unseen factor combinations. Informally, the images in this gap can be described as ‘red’ teapots from ‘above’. Formally, the generative factors of these images satisfy the following condition: $z _ { 2 } > ( z _ { 3 } + 0 . 1 5 )$ and $z _ { 2 } > ( z _ { 4 } + 0 . 1 5 )$ and $z _ { 1 } > \frac { \pi } { 4 }$ . This dataset contained 21,238 images, with (extreme) samples given in Figure 4. Note that zero-shot inference is facilitated by disentangled and informative representations, thus is not a core component of our evaluation, but rather a ‘bonus’.
|
| 212 |
+
|
| 213 |
+
(a) Disentanglement
|
| 214 |
+
|
| 215 |
+
<table><tr><td>Code</td><td>Co</td><td>C1</td><td>C2</td><td>C3</td><td>C4</td><td>C5</td><td>C6</td><td>C7</td><td>C8</td><td>Cg</td><td>W. Avg.</td></tr><tr><td>PCA</td><td>0.16</td><td>0.50</td><td>0.31</td><td>0.09</td><td>0.45</td><td>0.60</td><td>0.11</td><td>1.00</td><td>0.17</td><td>0.51</td><td>0.29</td></tr><tr><td>VAE</td><td>1.00</td><td>0.85</td><td>0.95</td><td>0.68</td><td>0.63</td><td>1.00</td><td>0.30</td><td>0.37</td><td>0.66</td><td>0.95</td><td>0.67</td></tr><tr><td>β-VAE</td><td>1.00</td><td>0.64</td><td>1.00</td><td>0.76</td><td>0.39</td><td>0.89</td><td>0.49</td><td>0.81</td><td>0.45</td><td>0.80</td><td>0.66</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>InfoGAN</td><td>0.83</td><td>0.85</td><td>0.76</td><td>0.66</td><td>0.78</td><td>0.43</td><td>1.00</td><td>1.00</td><td>0.64</td><td>0.74</td><td>0.75</td></tr></table>
|
| 216 |
+
|
| 217 |
+
(b) Completeness
|
| 218 |
+
(c) Informativeness
|
| 219 |
+
|
| 220 |
+
<table><tr><td>Code</td><td>20</td><td>21</td><td>22</td><td>23</td><td>24</td><td>Avg.</td><td>Code</td><td>20</td><td>21</td><td>22</td><td>23</td><td>24</td><td>Avg.</td></tr><tr><td>PCA</td><td>0.38</td><td>0.39</td><td>0.34</td><td>0.24</td><td></td><td>0.32</td><td>PCA</td><td></td><td></td><td></td><td>0.32</td><td>0.33</td><td>0.44</td></tr><tr><td>VAE</td><td></td><td></td><td></td><td></td><td>0.25</td><td></td><td></td><td>0.83</td><td>0.42</td><td>0.32</td><td></td><td></td><td></td></tr><tr><td></td><td>0.54</td><td>0.37</td><td>0.75</td><td>0.73</td><td>0.73</td><td>0.62</td><td>VAE</td><td>0.61</td><td>0.60</td><td>0.23</td><td>0.21</td><td>0.21</td><td>0.37</td></tr><tr><td>β-VAE</td><td>0.14</td><td>0.39</td><td>0.70</td><td>0.85</td><td>0.88</td><td>0.59</td><td>β-VAE</td><td>0.80</td><td>0.41</td><td>0.19</td><td>0.19</td><td>0.18</td><td>0.35</td></tr><tr><td>InfoGAN</td><td>0.42</td><td>0.72</td><td>0.75</td><td>0.86</td><td>0.84</td><td>0.72</td><td>InfoGAN</td><td>0.48</td><td>0.13</td><td>0.23</td><td>0.16</td><td>0.15</td><td>0.23</td></tr></table>
|
| 221 |
+
|
| 222 |
+
Table 3: Lasso regression results. (a) Disentanglement scores for each code variable. ‘W. Avg.’ abbreviates weighted average. (b) Completeness scores for each generative factor. $z _ { 0 } , \ldots , z _ { 4 }$ represent azimuth, elevation, red, green and blue generative factors respectively. c) Test set NRMSE.
|
| 223 |
+
(a) Disentanglement
|
| 224 |
+
Table 4: Random forest regression results. Caption of Table 3 applies.
|
| 225 |
+
|
| 226 |
+
<table><tr><td>Code</td><td></td><td>Co</td><td>C1</td><td>C2</td><td>C3</td><td>C4</td><td>C5</td><td>C6</td><td>C7</td><td>C8</td><td>Cg</td><td>W. Avg.</td><td></td></tr><tr><td>PCA</td><td></td><td>0.25</td><td>0.54</td><td>0.63</td><td>0.10</td><td>0.88</td><td>0.97</td><td>0.16</td><td>0.90</td><td>0.41</td><td>0.72</td><td>0.50</td><td></td></tr><tr><td>VAE</td><td></td><td>0.98</td><td>0.99</td><td>0.91</td><td>0.94</td><td>0.75</td><td>0.99</td><td>0.56</td><td>0.56</td><td>0.92</td><td>0.86</td><td>0.86</td><td></td></tr><tr><td>β-VAE</td><td></td><td>0.96</td><td>0.96</td><td>0.95</td><td>0.99</td><td>0.63</td><td>0.96</td><td>0.69</td><td>0.94</td><td>0.64</td><td>0.98</td><td>0.90</td><td></td></tr><tr><td>InfoGAN</td><td></td><td>0.85</td><td>0.97</td><td>0.91</td><td>0.84</td><td>0.94</td><td>0.68</td><td>0.86</td><td>0.70</td><td>0.71</td><td>0.92</td><td>0.91</td><td></td></tr><tr><td>(b) Completeness</td><td colspan="3"></td><td></td><td></td><td></td><td>(c) Informativeness</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Code 20</td><td colspan="3">21</td><td>23</td><td>24</td><td>Avg</td><td>Code</td><td>20</td><td>21</td><td>22</td><td>23</td><td>24</td><td>Avg.</td></tr><tr><td>PCA</td><td></td><td></td><td>22</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>0.27</td></tr><tr><td>VAE</td><td>0.31 0.44</td><td>0.51 0.61</td><td>0.67 0.90</td><td>0.56 0.91</td><td>0.56 0.91</td><td>0.52 0.75</td><td>PCA VAE</td><td>0.36 0.14</td><td>0.23 0.09</td><td>0.20 0.09</td><td>0.28 0.06</td><td>0.28 0.06</td><td>0.09</td></tr><tr><td>β-VAE</td><td>0.28</td><td>0.67</td><td>0.90</td><td>0.96</td><td>0.97</td><td>0.76</td><td>β-VAE</td><td>0.18</td><td>0.07</td><td>0.08</td><td>0.09</td><td>0.08</td><td>0.10</td></tr><tr><td>InfoGAN</td><td>0.59</td><td>0.94</td><td>0.91</td><td>0.96</td><td>0.95</td><td>0.87</td><td>InfoGAN</td><td>0.25</td><td>0.07</td><td>0.14</td><td>0.09</td><td>0.10</td><td>0.13</td></tr></table>
|
| 227 |
+
|
| 228 |
+
Table 5 presents the zeroshot results. With the random forest regressor, $c { \mathrm { - V A E } }$ and $\displaystyle c { - \beta \mathrm { V A E } }$ perform the best with very little increase in prediction error compared to Table 4c, while $c - .$ InfoGAN predicts the value of unseen factor combinations reasonably well.
|
| 229 |
+
|
| 230 |
+

|
| 231 |
+
Figure 4: Zeroshot samples
|
| 232 |
+
|
| 233 |
+
<table><tr><td colspan="6">(a) Lasso</td><td colspan="8">(b)Random Forest</td></tr><tr><td>Code</td><td>20</td><td>21</td><td>22</td><td>23</td><td>24</td><td>Avg.</td><td>Code</td><td>20</td><td>21</td><td>22</td><td>23</td><td>24</td><td>Avg.</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>PCA</td><td>0.88</td><td>0.80</td><td>0.75</td><td>0.52</td><td>0.54</td><td>0.70</td><td>PCA</td><td>0.44</td><td>0.49</td><td>0.65</td><td>0.56</td><td>0.63</td><td>0.55</td></tr><tr><td>VAE</td><td>0.56</td><td>1.11</td><td>0.52</td><td>0.30</td><td>0.32</td><td>0.56</td><td>VAE</td><td>0.13</td><td>0.13</td><td>0.34</td><td>0.08</td><td>0.07</td><td>0.15</td></tr><tr><td>β-VAE</td><td>0.81</td><td>0.79</td><td>0.32</td><td>0.27</td><td>0.25</td><td>0.49</td><td>β-VAE</td><td>0.18</td><td>0.18</td><td>0.21</td><td>0.12</td><td>0.14</td><td>0.16</td></tr><tr><td>InfoGAN</td><td>0.49</td><td>0.34</td><td>0.93</td><td>0.36</td><td>0.33</td><td>0.49</td><td>InfoGAN</td><td>0.27</td><td>0.18</td><td>0.63</td><td>0.21</td><td>0.25</td><td>0.31</td></tr></table>
|
| 234 |
+
|
| 235 |
+
Table 5: Zeroshot performance. NRMSE in predicting unseen factor combinations.
|
| 236 |
+
|
| 237 |
+
# C Z VS. C
|
| 238 |
+
|
| 239 |
+
Figure 5 plots each generative factor against the corresponding ‘most important’ code variable(s) (as indicated by $R$ ) of each model for 5000 randomly-selected samples. As discussed in section 2, models with generic priors cannot be expected to learn the most complete and explicit representation of topologically distinct factors of variation. Thus, for the wrapped azimuth $\left( z _ { 0 } \right)$ , we plot its value against the 3 most important code variables for each model. Inspecting the relationships depicted in Figure 5, it is clear that the simplest / lowest-order relationship exists between InfoGAN’s code variables and the corresponding generative factors. For example, each unwrapped generative factor $( z _ { 1 } , z _ { 2 } , z _ { 3 } , z _ { 4 } )$ is linearly-related to InfoGAN’s corresponding code variables, while $c _ { 0 }$ and $c _ { 8 }$ resemble scaled sine and cosine functions of the azimuth $\left( z _ { 0 } \right)$ and $c _ { 1 }$ resembles a step function.
|
| 240 |
+
|
| 241 |
+

|
| 242 |
+
Figure 5: Generative factors vs. important code variables.
|
| 243 |
+
|
| 244 |
+
# D VISUALLY ASSESSING DISENTANGLEMENT
|
| 245 |
+
|
| 246 |
+
For each model, we traverse the space of each code variable indepedently to show the effect on generated images and thus visually assess disentanglement. The code variable traversals depicted in Figure 6 for (a) VAE $[ - 3 , 3 ]$ , (b) $\beta$ -VAE $[ - 3 , 3 ]$ and (c) InfoGAN $[ - 1 , 1 ]$ are ordered according to the generative factor $( z )$ which that code best captures in an attempt to align the generated images of all models. There appears to be a high degree of disentanglement in all generative models as each $c _ { i }$ traversal results in a single type of semantic variation.
|
| 247 |
+
|
| 248 |
+

|
| 249 |
+
|
| 250 |
+

|
| 251 |
+
Figure 6: Code variable traversals.
|
md/train/BylQSxHFwr/BylQSxHFwr.md
ADDED
|
@@ -0,0 +1,292 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ATOMNAS: FINE-GRAINED END-TO-END NEURAL ARCHITECTURE SEARCH
|
| 2 |
+
|
| 3 |
+
Jieru Mei1∗, Yingwei $\mathbf { L i } ^ { 1 * }$ , Xiaochen Lian2, Xiaojie $\mathbf { J i n ^ { 2 } }$ , Linjie Yang2, Alan Yuille1 & Jianchao Yang2
|
| 4 |
+
|
| 5 |
+
1Johns Hopkins University
|
| 6 |
+
2ByteDance AI Lab
|
| 7 |
+
|
| 8 |
+
eijieru@gmail.com, yingwei.li@jhu.edu, {xiaochen.lian, jinxiaojie, linjie.yang}@bytedance.com
|
| 9 |
+
|
| 10 |
+
alan.l.yuille@gmail.com, yangjianchao@bytedance.com
|
| 11 |
+
|
| 12 |
+
# ABSTRACT
|
| 13 |
+
|
| 14 |
+
Search space design is very critical to neural architecture search (NAS) algorithms. We propose a fine-grained search space comprised of atomic blocks, a minimal search unit that is much smaller than the ones used in recent NAS algorithms. This search space allows a mix of operations by composing different types of atomic blocks, while the search space in previous methods only allows homogeneous operations. Based on this search space, we propose a resource-aware architecture search framework which automatically assigns the computational resources (e.g., output channel numbers) for each operation by jointly considering the performance and the computational cost. In addition, to accelerate the search process, we propose a dynamic network shrinkage technique which prunes the atomic blocks with negligible influence on outputs on the fly. Instead of a searchand-retrain two-stage paradigm, our method simultaneously searches and trains the target architecture. Our method achieves state-of-the-art performance under several FLOPs configurations on ImageNet with a small searching cost. We open our entire codebase at: https://github.com/meijieru/AtomNAS.
|
| 15 |
+
|
| 16 |
+
# 1 INTRODUCTION
|
| 17 |
+
|
| 18 |
+
Human-designed neural networks are already surpassed by machine-designed ones. Neural Architecture Search (NAS) has become the mainstream approach to discover efficient and powerful network structures (Zoph & Le (2017); Pham et al. (2018); Tan et al. (2019); Liu et al. (2019a)). Although the tedious searching process is conducted by machines, humans still involve extensively in the design of the NAS algorithms. Designing of search spaces is critical for NAS algorithms and different choices have been explored. Cai et al. (2019) and Wu et al. (2019) utilize supernets with multiple choices in each layer to accommodate a sampled network on the GPU. Chen et al. (2019b) progressively grow the depth of the supernet and remove unnecessary blocks during the search. Tan & Le (2019a) propose to search the scaling factor of image resolution, channel multiplier and layer numbers in scenarios with different computation budgets. Stamoulis et al. (2019a) propose to use different kernel sizes in each layer of the supernet and reuse the weights of larger kernels for small kernels. Howard et al. (2019); Tan & Le (2019b) adopts Inverted Residuals with Linear Bottlenecks (MobileNetV2 block) (Sandler et al., 2018), a building block with light-weighted depth-wise convolutions for highly efficient networks in mobile scenarios.
|
| 19 |
+
|
| 20 |
+
However, the proposed search spaces generally have only a small set of choices for each block. DARTS and related methods (Liu et al., 2019a; Chen et al., 2019b; Liang et al., 2019) use around 10 different operations between two network nodes. Howard et al. (2019); Cai et al. (2019); Wu et al. (2019); Stamoulis et al. (2019a) search the expansion ratios in the MobileNetV2 block but still limit them to a few discrete values. We argue that search space of finer granularity is critical to find optimal neural architectures. Specifically, the searched building block in a supernet should be as small as possible to generate the most diversified model structures.
|
| 21 |
+
|
| 22 |
+
We revisit the architectures of state-of-the-art networks (Howard et al. (2019); Tan & Le (2019b); He et al. (2016)) and discover a commonly used building structure: convolution - channel-wise operation - convolution. We reinterpret this building structure as an ensemble of computationally independent blocks, which we call atomic blocks. As the minimum search unit, the atomic block constitutes a much larger and more fine-grained search space, within which we are able to search for mixed operations (e.g., convolutions with different kernel sizes and their channel numbers).
|
| 23 |
+
|
| 24 |
+
For the efficient exploration of the new search space, we propose a NAS framework named AtomNAS which applies network pruning techniques to architecture search. Specifically, we start from an initial large supernet and rewrite every convolution - channel-wise operation - convolution structure of it in the form the weighted sum of atomic blocks; the weights reflect the contribution of the atomic blocks to the network capacity and are called importance factors. For each atomic block, a penalty term in proportion to its FLOPs is enforced on its importance factor; effectively, the penalty makes AtomNAS favor atomic blocks with less FLOPs. By minimizing the combination of the original network loss and the total penalty on the weights, AtomNAS is able to learn both the parameters of the network and the weights of the atomic blocks. At the end of the learning, atomic blocks with very small weights (e.g., $< 0 . 0 0 1$ ) are removed from the network and we obtain the final network which has fewer FLOPs. Since the pruned atomic blocks have little contribution to the network output due to their negligible weights, the final network does not need to be retrained or finetuned.
|
| 25 |
+
|
| 26 |
+
Training on the large supernet is computationally demanding. We observe that for many pruned atomic blocks, their weights diminish at the early stage of learning and never “revive” throughout the rest of learning. We propose a dynamic network shrinkage technique which removes those atomic blocks on the fly and greatly reduces the run time of AtomNAS.
|
| 27 |
+
|
| 28 |
+
In our experiment, our method achieves $7 5 . 9 \%$ top-1 accuracy on ImageNet dataset around 360M FLOPs, which is $0 . 9 \%$ higher than state-of-the-art model (Stamoulis et al., 2019a). By further incorporating additional modules, our method achieves $7 7 . 6 \%$ top-1 accuracy. It outperforms MixNet by $0 . 6 \%$ using 363M FLOPs, which is a new state-of-the-art under the mobile scenario.
|
| 29 |
+
|
| 30 |
+
In summary, the major contributions of our work are:
|
| 31 |
+
|
| 32 |
+
1. We design a fine-grained search space which includes the exact number of channels and mixed operations (e.g., combination of different convolution kernels).
|
| 33 |
+
2. We propose an NAS framework, AtomNAS. Within the framework, an efficient end-to-end NAS algorithm is proposed which can simultaneously search the network architecture and train the final model. No finetuning is needed after the algorithm finishes.
|
| 34 |
+
3. With the proposed search space and AtomNAS, we achieve state-of-the-art performance on ImageNet dataset under mobile setting.
|
| 35 |
+
|
| 36 |
+
# 2 RELATED WORK
|
| 37 |
+
|
| 38 |
+
# 2.1 NEURAL ARCHITECTURE SEARCH
|
| 39 |
+
|
| 40 |
+
Recently, there is a growing interest in automated neural architecture design. Reinforce learning based NAS methods (Zoph & Le, 2017; Tan et al., 2019; Tan & Le, 2019b;a) are usually computational intensive, thus hampering its usage with limited computational budget. To accelerate the search procedure, ENAS (Pham et al., 2018) represents the search space using a directed acyclic graph and aims to search the optimal subgraph within the large supergraph. A training strategy of parameter sharing among subgraphs is proposed to significantly increase the searching efficiency. The similar idea of optimizing optimal subgraphs within a supergraph is also adopted by Liu et al. (2019a); Jin et al. (2019); Xu et al. (2020); Wu et al. (2019); Guo et al. (2019); Cai et al. (2019). Stamoulis et al. (2019a); Yu et al. (2020) further share the parameters of different paths within a block using super-kernel representation. A prominent disadvantage of the above methods is that their coarse search spaces only support selecting one out of a set of choices (e.g., selecting one kernel size from $\{ 3 , 5 , { \bar { 7 } } \}$ ). MixNet tries to benefit from mixed operations by using a predefined set of mixed operations $\{ \{ 3 \} , \{ 3 , 5 \} , \{ 3 , 5 , 7 \} , \{ 3 , 5 , 7 , 9 \} \}$ , where the channels are equally distributed among different kernel sizes. Due to this limitation, it is difficult to learn optimal architectures under computational resource constraints. On the contrary, our method takes advantage of the fine-grained search space and is able to search for more flexible network architectures satisfying various resource constraints. The fine-grained search space proposed in this paper is exponentially larger than previous search space. For reference, the total number of possible structures within the experiment is around $1 0 ^ { 1 6 2 }$ , compared with $1 0 ^ { 2 1 }$ for FBNet. Recently, to improve the final performance of the searched architectures, $\mathrm { Y u }$ et al. (2020) utilizes knowledge distillation which is orthogonal to our method. It could be easily integrated into our method by Eq. (5) thanks to the end-to-end learning paradigm of our method.
|
| 41 |
+
|
| 42 |
+

|
| 43 |
+
Figure 1: Illustration of the ensemble perspective. Arrow means operators. The structure of two convolutions joined by a channel-wise operation is mathematically equivalent to the ensemble of multiple atomic blocks, according to Eq. (2). Colored rectangles represent tensors, with numbers inside indicating their channel numbers; The shaded path on the right is one example of atomic block.
|
| 44 |
+
|
| 45 |
+
# 2.2 NETWORK PRUNING
|
| 46 |
+
|
| 47 |
+
Assuming that many parameters in the network are unnecessary, network pruning methods start from a computation-intensive model, identify the unimportant connections and remove them to get a compact and efficient network. Early method (Han et al., 2016) simultaneously learns the important connections and weights. However, non-regularly removing connections in these works makes it hard to achieve theoretical speedup ratio on realistic hardwares due to extra overhead in caching and indexing. To tackle this problem, structured network pruning methods (He et al., 2017b; Liu et al., 2017; Luo et al., 2017; Ye et al., 2018; Gordon et al., 2018) are proposed to prune structured components in networks, e.g. the entire channel and kernel. In this way, empirical acceleration can be achieved on modern computing devices. Liu et al. (2017); Ye et al. (2018); Gordon et al. (2018) encourage channel-level sparsity by imposing the L-1 regularizer on the channel dimension, which is also used by our method. Recently, Liu et al. (2019b) show that in structured network pruning, the learned weights are unimportant. This suggests structured network pruning is actually a neural architecture search focusing on channel numbers. Our method jointly searches the channel numbers and a mix of operations, which is a much larger search space.
|
| 48 |
+
|
| 49 |
+
# 3 ATOMNAS
|
| 50 |
+
|
| 51 |
+
We formulate our neural architecture search method in a fine-grained search space with the atomic block used as the basic search unit. An atomic block is comprised of two convolutions connected by a channel-wise operation. By stacking atomic blocks, we obtain larger building blocks (e.g. residual block and MobileNetV2 block proposed in a variety of state-of-the-art models including ResNet, MobileNet V2/V3 (He et al., 2016; Howard et al., 2019; Sandler et al., 2018). In Section 3.1, We first show larger network building blocks (e.g. MobileNetV2 block) can be represented by an ensembles of atomic blocks. Based on this view, we propose a fine-grained search space using atomic blocks. In Section 3.2, we propose a resource-aware atomic block selection method for end-to-end architecture search. Finally, we propose a dynamic network shrinkage technique in Section 3.3, which greatly reduces the search cost.
|
| 52 |
+
|
| 53 |
+
# 3.1 FINE-GRAINED SEARCH SPACE
|
| 54 |
+
|
| 55 |
+
Under the typical block-wise NAS paradigm (Tan et al., 2019; Tan & Le, 2019b), the search space of each block in a neural network is represented as the Cartesian product $\begin{array} { r } { \mathcal { C } = \prod _ { i = 1 } \mathcal { P } _ { i } } \end{array}$ , where each $\mathcal { P } _ { i }$ is the set of all choices of the $i$ -th configuration such as kernel size, number of channels and type of operation. For example, ${ \mathcal { C } } = \{ { \mathrm { c o n v } } $ , depth-wise conv, dilated conv $\} \times \{ 3 , 5 \} \times \{ 2 4 , 3 2 , 6 4 , 1 \dot { 2 } \dot { 8 } \}$ represents a search space of three types of convolutions by two kernel sizes and four options of channel number. A block in the resulting model can only pick one convolution type from the three and one output channel number from the four values. This paradigm greatly limits the search space due to the few choices of each configuration. Here we present a more fine-grained search space by decomposing the network into smaller and more basic building blocks.
|
| 56 |
+
|
| 57 |
+
We denote $f ^ { c ^ { \prime } , c } ( X )$ as a convolution operator, where $X$ is the input tensor and $c , c ^ { \prime }$ are the input and output channel numbers respectively. A wide range of manually-designed and NAS architectures share a structure that joins two convolutions by a channel-wise operation:
|
| 58 |
+
|
| 59 |
+
$$
|
| 60 |
+
Y = \left( f _ { 1 } ^ { c ^ { \prime \prime } , c ^ { \prime } } \circ g \circ f _ { 0 } ^ { c ^ { \prime } , c } \right) ( X )
|
| 61 |
+
$$
|
| 62 |
+
|
| 63 |
+
where $g$ is a channel-wise operator. For example, in VGG (Simonyan & Zisserman, 2015) and a Residual Block (He et al., 2016), $f _ { 0 }$ and $f _ { 1 }$ are convolutions and $g$ is one of Maxpool, ReLU and BN-ReLU; in a MobileNetV2 block (Sandler et al., 2018), $f _ { 0 }$ and $f _ { 1 }$ are point-wise convolutions and $g$ is depth-wise convolution with BN-ReLU in the MobileNetV2 block. Eq. (1) can be reformulated as follows:
|
| 64 |
+
|
| 65 |
+
$$
|
| 66 |
+
Y = \sum _ { i = 1 } ^ { c ^ { \prime } } \left( f _ { 1 } ^ { c ^ { \prime \prime } , 1 } [ i , : ] \circ g [ i , : ] \circ f _ { 0 } ^ { 1 , c } [ : , i ] \right) ( X ) ,
|
| 67 |
+
$$
|
| 68 |
+
|
| 69 |
+
where $f _ { 0 } ^ { 1 , c } [ : , i ]$ is the $i$ -th convolution kernel of $f _ { 0 } , g [ i , : ]$ is the operator of the $i$ -th channel of $g$ and $\{ f _ { 1 } ^ { c ^ { \prime \prime } , 1 } [ i , : ] \} _ { i = 1 } ^ { c ^ { \prime } }$ are obtained by splitting the kernel tensor of $f _ { 1 }$ along the the input channel dimension. Each term in the summation can be seen as a computationally independent block, which is called atomic block. Fig. (1) demonstrate this reformulation. By determining whether to keep each atomic block in the final model individually, the search of channel number $c ^ { \prime }$ is enabled through channel selection, which greatly enlarges the search space.
|
| 70 |
+
|
| 71 |
+
This formulation also naturally includes the selection of operators. To gain a better understanding, we first generalize Eq. (2) as:
|
| 72 |
+
|
| 73 |
+
$$
|
| 74 |
+
Y = \sum _ { i = 1 } ^ { c ^ { \prime } } \left( f _ { 1 i } ^ { c ^ { \prime \prime } , 1 } \circ g _ { i } \circ f _ { 0 i } ^ { 1 , c } \right) ( X ) .
|
| 75 |
+
$$
|
| 76 |
+
|
| 77 |
+
Note the array indices $i$ are moved to subscripts. In this formulation, we can use different types of operators for $f _ { 0 i } , f _ { 1 i }$ and $g _ { i }$ ; in other words, $f _ { 0 } , f _ { 1 }$ and $g$ can each be a combination of different operators and each atomic block can use different operators such as convolutions with different kernel sizes.
|
| 78 |
+
|
| 79 |
+
Formally, the search space is formulated as a supernet which is built based on the structure in Eq. (1); such structure satisfies Eq. (3) and thus can be represented by atomic blocks; each of $f _ { 0 }$ , $f _ { 1 }$ and $g$ is a combination of operators. The new search space includes some state-of-the-art network architectures. For example, by allowing $g$ to be a combination of convolutions with different kernel sizes, the MixConv block in MixNet (Tan & Le, 2019b) becomes a special case in our search space. In addition, our search space facilitates discarding any number of channels in $g$ , resulting in a more fine-grained channel configuration. In comparison, the channel numbers are determined heuristically in Tan & Le (2019b).
|
| 80 |
+
|
| 81 |
+
# 3.2 RESOURCE-AWARE ATOMIC BLOCK SEARCH
|
| 82 |
+
|
| 83 |
+
In this work, we adopt a differentiable neural architecture search paradigm where the model structure is discovered in a full pass of model training. With the supernet defined above, the final model can be produced by discarding part of the atomic blocks during training. Following DARTS (Liu et al.
|
| 84 |
+
|
| 85 |
+
(2019a)), we introduce a importance factor $\alpha$ to scale the output of each atomic block in the supernet. Eq. (3) then becomes
|
| 86 |
+
|
| 87 |
+
$$
|
| 88 |
+
Y = \sum _ { i = 1 } ^ { c ^ { \prime } } \alpha _ { i } \left( f _ { 1 i } ^ { c ^ { \prime \prime } , 1 } \circ g _ { i } \circ f _ { 0 i } ^ { 1 , c } \right) ( X ) .
|
| 89 |
+
$$
|
| 90 |
+
|
| 91 |
+
Here, each $\alpha _ { i }$ is tied with an atomic block comprised of three operators $f _ { 1 i } ^ { c ^ { \prime \prime } , 1 } , g _ { i }$ and $f _ { 0 i } ^ { 1 , c }$ . The importance factors are learned jointly with the network weights. Once the training finishes, the atomic blocks that have negligible effect (i.e., those with factors smaller than a threshold) on the network output are discarded.
|
| 92 |
+
|
| 93 |
+
We still need to address two issues related to the importance factors $\alpha _ { i }$ ’s. The first issue is where in the supernet we should put the $\alpha$ ? Let’s first consider the case when $g$ only contains linear operations, e.g., convolution, batch normalization and linear activation like ReLU. If $g$ contains at least one BN layer, The scaling parameters in the BN layers can be directly used as such importance factors (Liu et al. (2017)). If $g$ has no BN layers, which is rare, we can place $\alpha$ anywhere between $f _ { 0 }$ and $f _ { 1 }$ ; however, we need to apply regularization terms to the weights of $f _ { 0 }$ and $f _ { 1 }$ (e.g., weight decays) in order to prevent weights in $f _ { 0 }$ and $f _ { 1 }$ from getting too large and canceling the effect of $\alpha$ . When $g$ contains non-linear operations, e.g., Swish activation and Sigmoid activation, we can only put $\alpha$ behind $f _ { 1 }$ .
|
| 94 |
+
|
| 95 |
+
The second issue is how to avoid performance deterioration after discarding some of the atomic blocks. For example, DARTS discards operations with small scale factors after iterative training of model parameters and scale factors. Since the scale factors of the discarded operations are not small enough, the performance of the network will be affected which needs re-training to adjust the weights again. In order to maintain the performance of the supernet after dropping some atomics blocks, the importance factors $\alpha$ of those atomic blocks should be sufficiently small. Inspired by the channel pruning work in Liu et al. (2017), we add L1 norm penalty loss on $\alpha$ , which effectively pushes many importance factors to near-zero values. At the end of learning, atomic blocks with $\alpha$ close to zero are removed from the supernet. Note that since the BN scales change more dramatically during training due to the regularization term, the running statistics of BNs might be inaccurate and needs to be calculated again using the training set.
|
| 96 |
+
|
| 97 |
+
With the added regularization term, the training loss is
|
| 98 |
+
|
| 99 |
+
$$
|
| 100 |
+
\begin{array} { c } { \displaystyle { \mathcal { L } = \mathcal { E } + \lambda \sum _ { i \in \mathcal { S } } c _ { i } \big | \alpha _ { i } \big | , } } \\ { \displaystyle { \phantom { \frac { \sum _ { i } } { c _ { i } } } } } \\ { \displaystyle { c _ { i } = \hat { c } _ { i } \big / \sum _ { k \in \mathcal { S } } \hat { c } _ { k } } } \end{array}
|
| 101 |
+
$$
|
| 102 |
+
|
| 103 |
+
where $\lambda$ is the coefficient of L1 penalty term, $s$ is the index set of all atomic blocks, and $\mathcal { E }$ is the conventional training loss (e.g., cross-entropy loss combined with the regularization term like weight decay and distillation loss.). $\left| \alpha _ { i } \right|$ is weighted by coefficient $c _ { i }$ which is proportional to the computation cost of $i$ -th atomic block, i.e. $\hat { c } _ { i }$ . By using computation costs aware regularization, we encourage the model to learn network structures that strike a good balance between accuracy and efficiency. In this paper, we use FLOPs as the criteria of computation cost. Other metrics such as latency and energy consumption can be used similarly. As a result, the whole loss function $\mathcal { L }$ trades off between accuracy and FLOPs.
|
| 104 |
+
|
| 105 |
+
# 3.3 DYNAMIC NETWORK SHRINKAGE
|
| 106 |
+
|
| 107 |
+
Usually, the supernet is much larger than the final search result. We observe that many atomic blocks become “dead” starting from the early stage of the search, i.e., their importance factors $\alpha$ are close to zero till the end of the search. To utilize computational resources more efficiently and speed up the search process, we propose a dynamic network shrinkage algorithm which cuts down the network architecture by removing atomic blocks once they are deemed “dead”.
|
| 108 |
+
|
| 109 |
+
We adopt a conservative strategy to decide whether an atomic block is “dead”: for importance factors $\alpha$ , we maintain its momentum $\hat { \alpha }$ which is updated as
|
| 110 |
+
|
| 111 |
+
$$
|
| 112 |
+
\hat { \alpha } \gets \beta \hat { \alpha } + ( 1 - \beta ) \alpha ^ { t } ,
|
| 113 |
+
$$
|
| 114 |
+
|
| 115 |
+

|
| 116 |
+
Figure 2: FLOPs change of the supernet during the searching and training for AtomNAS-C. The crossed-out region corresponds to the saved computation compared to training the supernet without the dynamic shrinkage. The region in yellow corresponds to the extra cost compared with training the final model from scratch, the cost of which is the region below the red dashed line.
|
| 117 |
+
|
| 118 |
+
Initialize the supernet and the exponential moving average;
|
| 119 |
+
while epoch $\leq$ max epoch do Update network weights and importance factors $\alpha$ by minimizing the loss function $\mathcal { L }$ ; Update the $\hat { \alpha }$ by Eq. (7); if Total FLOPs of dead blocks $\geq \Delta$ then Remove dead blocks from the supernet; end Recalculate BN’s statistics by forwarding some training examples; Validate the performance of the current supernet;
|
| 120 |
+
|
| 121 |
+
end
|
| 122 |
+
|
| 123 |
+
Algorithm 1: Dynamic network shrinkage
|
| 124 |
+
|
| 125 |
+
where $\alpha ^ { t }$ is the importance factors at $t$ -th iteration and $\beta$ is the decay term. An atomic block is considered “dead” if both $\hat { \alpha }$ and $\alpha ^ { t }$ are smaller than a threshold, which is set to 0.001 throughout experiments.
|
| 126 |
+
|
| 127 |
+
Once the total FLOPs of “dead” blocks reach a predefined threshold, we remove those blocks from the supernet. As discussed above, we recalculate BN’s running statistics before deploying the network. The whole training process is presented in Algorithm 1.
|
| 128 |
+
|
| 129 |
+
We show the FLOPs of a sample network during the search process in Fig. 2. We start from a supernet with 1521M FLOPs and dynamically discard “dead” atomic blocks to reduce search cost. The overall search and train cost only increases by $1 7 . 2 \%$ compared to that of training the searched model from scratch.
|
| 130 |
+
|
| 131 |
+
# 4 EXPERIMENT
|
| 132 |
+
|
| 133 |
+
We first describe the implementation details in Section 4.1 and then compare AtomNAS with previous state-of-the-art methods under various FLOPs constraints in Section 4.2. In Section 4.3, we provide more detailed analysis about AtomNAS. Finally, in Section 4.4, we demonstrate the transferability of AtomNAS networks by evaluating them on detection and instance segmentation tasks.
|
| 134 |
+
|
| 135 |
+
# 4.1 IMPLEMENTATION DETAILS
|
| 136 |
+
|
| 137 |
+
The architecture of the supernet we use for the experiments is shown in table on the right of Fig. 3. The supernet contains 21 AtomNAS blocks, the searchable block in our supernet; the picture on the right of Fig. 3 illustrates the structure of an AtomNAS block, where $f _ { 0 }$ is a $1 \times 1$ pointwise convolutions that expands the input channel number from $C$ to $3 \times 6 C$ ; $g$ is a mix of three depth-wise convolutions with kernel sizes of $3 \times 3 , 5 \times 5$ and $7 \times 7 .$ and $f _ { 1 }$ is another $1 \times 1$ pointwise convolutions that projects the channel number to the output channel number. Similar to MobileNetV2 (Sandler et al., 2018), if the output dimension stays the same as the input dimension, we use a skip connection to add the input to the output. AtomNAS block is effectively an ensemble of $3 \times 6 C$ atomic blocks, whose underlying search space covers the MobileNetV2 block (Sandler et al., 2018) and its multikernel variant, MixConv (Tan & Le, 2019b). Within AtomNAS block, we are able to optimize the distribution of computation resources (i.e., channel numbers) among the three types of depth-wise convolution.
|
| 138 |
+
|
| 139 |
+
<table><tr><td> Input Shape</td><td>Block</td><td>f</td><td>n</td><td>stride</td></tr><tr><td>224²×3</td><td>3x3 conv</td><td>32(16)</td><td>1</td><td>2</td></tr><tr><td>112² × 32(16)</td><td>3x3 MB</td><td>16</td><td>1</td><td>1</td></tr><tr><td>112²×16</td><td>searchable</td><td>24</td><td>4</td><td>2</td></tr><tr><td>56²×24</td><td>searchable</td><td>40</td><td>4</td><td>2</td></tr><tr><td>28²×40</td><td>searchable</td><td>80</td><td>4</td><td>2</td></tr><tr><td>14²×80</td><td>searchable</td><td>96</td><td>4</td><td>1</td></tr><tr><td>14²×96</td><td>searchable</td><td>192</td><td>4</td><td>2</td></tr><tr><td>7²×192</td><td>searchable</td><td>320</td><td>1</td><td>1</td></tr><tr><td>7² ×320</td><td>avgpool</td><td>1</td><td>1</td><td>1</td></tr><tr><td>1280</td><td>fc</td><td>1000</td><td>1</td><td>1</td></tr></table>
|
| 140 |
+
|
| 141 |
+

|
| 142 |
+
Figure 3: (Left) The searchable block of the supernet. $f _ { 0 }$ and $f _ { 1 }$ are fixed to $1 \times 1$ pointwise convolutions; $g$ here is a mix of three convolutions with kernel sizes of $3 \times 3$ , $5 \times 5$ and $7 \times 7$ . $f _ { 0 }$ expands the input channel number from $C$ to $1 8 C$ and $f _ { 1 }$ projects the channel number to the output channel number. If the output dimension stays the same as the input dimension, we use a skip connection to add the input to the output. (Right) Architecture of the supernet. Column-Block denotes the block type; MB denotes MobileNetV2 block; ”searchable” means a searchable block shown on the left. Column-f denotes the output channel number of a block. Column-n denotes the number of blocks. Column-s denotes the stride of the first block in a stage. The output channel numbers of the first convolution are 16 for AtomNAS-A, 32 for AtomNAS-B and AtomNAS-C.
|
| 143 |
+
|
| 144 |
+
We use the same training configuration (e.g., RMSProp optimizer, EMA on weights and exponential learning rate decay) as Tan et al. (2019); Stamoulis et al. (2019a) and do not use extra data augmentation such as MixUp (Zhang et al., 2018) and AutoAugment (Cubuk et al., 2018). We find that using this configuration is sufficient for our method to achieve good performance. Our results are shown in Table 1 and Table 3. When training the supernet, we use a total batch size of 2048 on 32 Tesla V100 GPUs and train for 350 epochs. For our dynamic network shrinkage algorithm, we set the momentum factor $\beta$ in Eq. (7) to 0.9999. At the beginning of the training, all of the weights are randomly initialized. To avoid removing atomic blocks with high penalties (i.e., FLOPs) prematurely, the weight of the penalty term in Eq. (5) is increased from 0 to the target $\lambda$ by a linear scheduler during the first 25 epochs. By setting the weight of the L1 penalty term $\lambda$ to be $1 . { \overset { \cdot } { 8 } } \times 1 0 ^ { - 4 }$ , $1 . 2 \times 1 0 ^ { - 4 }$ and ${ \bar { 1 } } . 0 \times 1 0 ^ { - 4 }$ respectively, we obtain networks with three different sizes: AtomNAS-A, AtomNAS-B, and AtomNAS-C. They have the similar FLOPs as previous state-of-the-art networks under 400M: MixNet-S (Tan & Le, 2019b), MixNet-M (Tan & Le, 2019b) and SinglePath (Stamoulis et al., 2019a). In Appendix A, we visualize the architecture of AtomNAS-C.
|
| 145 |
+
|
| 146 |
+
# 4.2 EXPERIMENTS ON IMAGENET
|
| 147 |
+
|
| 148 |
+
We apply AtomNAS to search high performance light-weight model on ImageNet 2012 classification task (Deng et al., 2009). Table 1 compares our methods with previous state-of-the-art models, either manually designed or searched.
|
| 149 |
+
|
| 150 |
+
With models directly produced by AtomNAS, our method achieves the new state-of-the-art under all FLOPs constraints. Especially, AtomNAS-C achieves $7 5 . 9 \%$ top-1 accuracy with only 360M FLOPs, and surpasses all other models, including models like PDARTS and DenseNAS which have much higher FLOPs.
|
| 151 |
+
|
| 152 |
+

|
| 153 |
+
Figure 4: FLOPs versus accuracy on ImageNet. † means methods use extra techniques like Swish activation and Squeeze-and-Excitation module.
|
| 154 |
+
|
| 155 |
+
Techniques like Swish activation function (Ramachandran et al., 2018) and Squeeze-and-Excitation (SE) module (Hu et al., 2018) consistently improve the accuracy with marginal FLOPs cost. For a fair comparison with methods that use these techniques, we directly modify the searched network by replacing all ReLU activation with Swish and add SE module with ratio 0.5 to every block and then retrain the network from scratch. Note that unlike other methods, we do not search the configuration of Swish and SE, and therefore the performance might not be optimal. Extra data augmentations such as MixUp and AutoAugment are still not used. We train the models from scratch with a total batch size of 4096 on 32 Tesla V100 GPUs for 250 epochs.
|
| 156 |
+
|
| 157 |
+
Simply adding these techniques improves the results further. AtomNAS- $\mathbf { A } +$ achieves $7 6 . 3 \%$ top1 accuracy with 260M FLOPs, which outperforms many heavier models including MnasNet-A2. Without extra data augmentations, it performs as well as Efficient-B0 (Tan & Le, 2019a) by using 130M less FLOPs. It also outperforms the previous state-of-the-art MixNet-S by $0 . 5 \%$ . In addition, AtomNAS- $C +$ improves the top-1 accuracy on ImageNet to $7 7 . 6 \%$ , surpassing previous state-ofthe-art MixNet-M by $0 . 6 \%$ and becomes the overall best performing model under 400M FLOPs.
|
| 158 |
+
|
| 159 |
+
Fig. 4 visualizes the top-1 accuracy on ImageNet for different models. It’s clear that our fine-grained search space and the end-to-end resource-aware search method boost the performance significantly.
|
| 160 |
+
|
| 161 |
+
# 4.3 ANALYSIS
|
| 162 |
+
|
| 163 |
+
# 4.3.1 RESOURCE-AWARE REGULARIZATION
|
| 164 |
+
|
| 165 |
+
To demonstrate the effectiveness of the resource-aware regularization in Section 3.2, we compare it with a baseline without FLOPs-related coefficients $c _ { i }$ , which is widely used in network pruning (Liu et al., 2017; He et al., 2017b). Table 2 shows the results. First, by using the same L1 penalty coefficient $\lambda = 1 . 0 \times 1 0 ^ { - 4 }$ , the baseline achieves a network with similar performance but using much more FLOPs; then by increasing $\lambda$ to $1 . 5 \times 1 0 ^ { - 4 }$ , the baseline obtain a network which has similar FLOPs but inferior performance (i.e., about $1 . 0 \%$ lower). In Fig. 6b we visualized the ratio of different types of atomic blocks of the baseline network obtained by $\bar { \lambda ( \mathrm { = 1 . 5 \times 1 0 ^ { - 4 } } }$ . The baseline network keeps more atomic blocks in the earlier blocks, which have higher computation cost due to higher input resolution. On the contrary, AtomNAS is aware of the resource constraint, thus keeping more atomic blocks in the later blocks and achieving much better performance.
|
| 166 |
+
|
| 167 |
+
# 4.3.2 BN RECALIBRATION
|
| 168 |
+
|
| 169 |
+
As the BN’s running statistics might be inaccurate as explained in Section 3.2 and Section 3.3, we re-calculate the running statistics of BN before inference, by forwarding 131k randomly sampled training images through the network. Table 3 shows the impact of the BN recalibration. The top-1 accuracies of AtomNAS-A, AtomNAS-B, and AtomNAS-C on ImageNet improve by $1 . 4 \%$ , $1 . { \bar { 7 } } \%$ , and $1 . 2 \%$ respectively, which clearly shows the benefit of BN recalibration.
|
| 170 |
+
|
| 171 |
+
Table 1: Comparision with state-of-the-arts on ImageNet under the mobile setting. † denotes methods using extra network modules such as Swish activation and Squeeze-and-Excitation module. ‡ denotes using extra data augmentation such as MixUp and AutoAugment. ∗ denotes models searched and trained simultaneously.
|
| 172 |
+
|
| 173 |
+
<table><tr><td>Model</td><td>Parameters</td><td>FLOPs</td><td>Top-1(%)</td><td>Top-5(%)</td></tr><tr><td>MobileNetV1 (Howard et al., 2017)</td><td>4.2M</td><td>575M</td><td>70.6</td><td>89.5</td></tr><tr><td>MobileNetV2 (Sandler et al., 2018)</td><td>3.4M</td><td>300M</td><td>72.0</td><td>91.0</td></tr><tr><td>MobileNetV2 (our impl.)</td><td>3.4M</td><td>301M</td><td>73.6</td><td>91.5</td></tr><tr><td>MobileNetV2 (1.4)</td><td>6.9M</td><td>585M</td><td>74.7</td><td>92.5</td></tr><tr><td>ShuffleNetV2 (Ma et al.,2018)</td><td>3.5M</td><td>299M</td><td>72.6</td><td>=</td></tr><tr><td>ShuffleNetV2 2×</td><td>7.4M</td><td>591M</td><td>74.9</td><td></td></tr><tr><td>FBNet-A (Wu et al., 2019)</td><td>4.3M</td><td>249M</td><td>73.0</td><td></td></tr><tr><td>FBNet-C</td><td>5.5M</td><td>375M</td><td>74.9</td><td></td></tr><tr><td>Proxyless (mobile) (Cai et al., 2019)</td><td>4.1M</td><td>320M</td><td>74.6</td><td>92.2</td></tr><tr><td>SinglePath (Stamoulis et al., 2019a)</td><td>4.4M</td><td>334M</td><td>75.0</td><td>92.2</td></tr><tr><td>NASNet-A (Zoph & Le,2017)</td><td>5.3M</td><td>564M</td><td>74.0</td><td>91.6</td></tr><tr><td>DARTS (second order) (Liu et al., 2019a)</td><td>4.9M</td><td>595M</td><td>73.1</td><td>-</td></tr><tr><td>PDARTS (cifar 10) (Chen et al., 2019b)</td><td>4.9M</td><td>557M</td><td>75.6</td><td>92.6</td></tr><tr><td>DenseNAS-A (Fang et al., 2019)</td><td>7.9M</td><td>501M</td><td>75.9</td><td>92.6</td></tr><tr><td>FairNAS-A (Chu et al., 2019b)</td><td>4.6M</td><td>388M</td><td>75.3</td><td>92.4</td></tr><tr><td>AtomNAS-A*</td><td>3.9M</td><td>258M</td><td>74.6</td><td>92.1</td></tr><tr><td>AtomNAS-B*</td><td>4.4M</td><td>326M</td><td>75.5</td><td>92.6</td></tr><tr><td>AtomNAS-C*</td><td>4.7M</td><td>360M</td><td>75.9</td><td>92.7</td></tr><tr><td>SCARLET-A† (Chu et al., 2019a)</td><td>6.7M</td><td>365M</td><td>76.9</td><td>93.4</td></tr><tr><td>MnasNet-A1† (Tan et al., 2019)</td><td>3.9M</td><td>312M</td><td>75.2</td><td>92.5</td></tr><tr><td>MnasNet-A2t</td><td>4.8M</td><td>340M</td><td>75.6</td><td>92.7</td></tr><tr><td>MixNet-St (Tan & Le, 2019b)</td><td>4.1M</td><td>256M</td><td>75.8</td><td>92.8</td></tr><tr><td>MixNet-M†</td><td>5.0M</td><td>360M</td><td>77.0</td><td>93.3</td></tr><tr><td>EfficientNet-Bot‡ (Tan & Le, 2019a)</td><td>5.3M</td><td>390M</td><td>76.3</td><td>93.2</td></tr><tr><td>SE-DARTS+†‡ (Liang et al., 2019)</td><td>6.1M</td><td>594M</td><td>77.5</td><td>93.6</td></tr><tr><td>AtomNAS-A+†</td><td>4.7M</td><td>260M</td><td>76.3</td><td>93.0</td></tr><tr><td>AtomNAS-B+†</td><td>5.5M</td><td>329M</td><td>77.2</td><td>93.5</td></tr><tr><td>AtomNAS-C+†</td><td>5.9M</td><td>363M</td><td>77.6</td><td>93.6</td></tr></table>
|
| 174 |
+
|
| 175 |
+
Table 2: Influence of awareness of resource metric. The upper block uses equal penalties for all atomic blocks. The lower part uses our resource-aware atomic block selection.
|
| 176 |
+
|
| 177 |
+
<table><tr><td>入</td><td>FLOPs</td><td>Top-1(%)</td></tr><tr><td>1.0×10-4</td><td>445M</td><td>76.1</td></tr><tr><td>1.5 ×10-4</td><td>370M</td><td>74.9</td></tr><tr><td>1.0×10-4</td><td>360M</td><td>75.9</td></tr></table>
|
| 178 |
+
|
| 179 |
+
# 4.3.3 COST OF DYNAMIC NETWORK SHRINKAGE
|
| 180 |
+
|
| 181 |
+
Our dynamic network shrinkage algorithm speedups the search and train process significantly. For AtomNAS-C, the total time for search-and-training is 25.5 hours. For reference, training the final architecture from scratch takes 22 hours. Note that as the supernet shrinks, both the GPU memory consumption and forward-backward time are significantly reduced. Thus it’s possible to dynamically change the batch size once having sufficient GPU memory, which would further speed up the whole procedure.
|
| 182 |
+
|
| 183 |
+
Table 3: Influence of BN recalibration.
|
| 184 |
+
|
| 185 |
+
<table><tr><td>Model</td><td>w/o Recalibration</td><td>w/Recalibration</td></tr><tr><td>AtomNAS-A</td><td>73.2</td><td>74.6 (+1.4)</td></tr><tr><td>AtomNAS-B</td><td>73.8</td><td>75.5 (+1.7)</td></tr><tr><td>AtomNAS-C</td><td>74.7</td><td>75.9 (+1.2)</td></tr></table>
|
| 186 |
+
|
| 187 |
+
# 4.4 EXPERIMENTS ON COCO DETECTION AND INSTANCE SEGMENTATION
|
| 188 |
+
|
| 189 |
+
In this section, we assess the performance of AtomNAS models as feature extractors for object detection and instance segmentation on COCO dataset (Lin et al., 2014). We first pretrain AtomNAS models (without Swish activation function (Ramachandran et al., 2018) and Squeeze-and-Excitation (SE) module (Hu et al., 2018)) on ImageNet, use them as drop-in replacements for the backbone in the Mask-RCNN model (He et al., 2017a) by building the detection head on top of the last feature map, and finetune the model on COCO dataset.
|
| 190 |
+
|
| 191 |
+
We use the open-source code MMDetection (Chen et al., 2019a). All the models are trained on COCO train2017 with batch size 16 and evaluated on COCO val2017. Following the schedule used in the open-source implementation of TPU-trained Mask-RCNN , the learning rate starts at 0.02 and decreases by a scale of 10 at 15-th and 20th epoch respectively. The models are trained for 23 epochs in total.
|
| 192 |
+
|
| 193 |
+
Table 4 compares the results with other baseline backbone models. The detection results of baseline models are from Stamoulis et al. (2019b). We can see that all three AtomNAS models outperform the baselines on object detection task. The results demonstrate that our models have better transferability than the baselines, which may due to mixed operations, a.k.a multi-scale here, are more important to object detection and instance segmentation.
|
| 194 |
+
|
| 195 |
+
Table 4: Comparision with baseline backbones on COCO object detection and instance segmentation. Cls denotes the ImageNet top-1 accuracy; detect-mAP and seg-mAP denotes mean average precision for detection and instance segmentation on COCO dataset. The results of baseline models are from Stamoulis et al. (2019b). SinglePath $^ +$ (Stamoulis et al., 2019b) contains SE module.
|
| 196 |
+
|
| 197 |
+
<table><tr><td>Model</td><td>FLOPs</td><td>Cls (%)</td><td>detect-mAP (%)</td><td>seg-mAP (%)</td></tr><tr><td>MobileNetV2 (Sandler et al., 2018)</td><td>301M</td><td>73.6</td><td>30.5</td><td>1</td></tr><tr><td>Proxyless (mobile) (Cai et al., 2019)</td><td>320M</td><td>74.6</td><td>32.9</td><td>=</td></tr><tr><td>Proxyless (mobile) (our impl.)</td><td>320M</td><td>74.9</td><td>32.7</td><td>30.0</td></tr><tr><td>SinglePath+ (Stamoulis et al., 2019b)</td><td>353M</td><td>75.6</td><td>33.0</td><td>1</td></tr><tr><td>SinglePath (our impl.)</td><td>334M</td><td>75.0</td><td>32.0</td><td>29.7</td></tr><tr><td>AtomNAS-A</td><td>258M</td><td>74.6</td><td>32.7</td><td>30.1</td></tr><tr><td>AtomNAS-B</td><td>326M</td><td>75.5</td><td>33.6</td><td>30.8</td></tr><tr><td>AtomNAS-C</td><td>360M</td><td>75.9</td><td>34.1</td><td>31.4</td></tr></table>
|
| 198 |
+
|
| 199 |
+
# 5 CONCLUSION
|
| 200 |
+
|
| 201 |
+
In this paper, we revisit the common structure, i.e., two convolutions joined by a channel-wise operation, and reformulate it as an ensemble of atomic blocks. This perspective enables a much larger and more fine-grained search space. For efficiently exploring the huge fine-grained search space, we propose an end-to-end framework named AtomNAS, which conducts architecture search and network training jointly. The searched networks achieve significantly better accuracy than previous state-of-the-art methods while using small extra cost.
|
| 202 |
+
|
| 203 |
+
# REFERENCES
|
| 204 |
+
|
| 205 |
+
Han Cai, Ligeng Zhu, and Song Han. Proxylessnas: Direct neural architecture search on target task and hardware. In ICLR, 2019.
|
| 206 |
+
|
| 207 |
+
Kai Chen, Jiaqi Wang, Jiangmiao Pang, Yuhang Cao, Yu Xiong, Xiaoxiao Li, Shuyang Sun, Wansen Feng, Ziwei Liu, Jiarui Xu, Zheng Zhang, Dazhi Cheng, Chenchen Zhu, Tianheng Cheng, Qijie Zhao, Buyu Li, Xin Lu, Rui Zhu, Yue Wu, Jifeng Dai, Jingdong Wang, Jianping Shi, Wanli Ouyang, Chen Change Loy, and Dahua Lin. MMDetection: Open mmlab detection toolbox and benchmark. arXiv preprint arXiv:1906.07155, 2019a.
|
| 208 |
+
|
| 209 |
+
Xin Chen, Lingxi Xie, Jun Wu, and Qi Tian. Progressive differentiable architecture search: Bridging the depth gap between search and evaluation. CoRR, abs/1904.12760, 2019b.
|
| 210 |
+
|
| 211 |
+
Xiangxiang Chu, Bo Zhang, Jixiang Li, Qingyuan Li, and Ruijun Xu. Scarletnas: Bridging the gap between scalability and fairness in neural architecture search. CoRR, abs/1908.06022, 2019a.
|
| 212 |
+
|
| 213 |
+
Xiangxiang Chu, Bo Zhang, Ruijun Xu, and Jixiang Li. Fairnas: Rethinking evaluation fairness of weight sharing neural architecture search. CoRR, abs/1907.01845, 2019b.
|
| 214 |
+
|
| 215 |
+
Ekin Dogus Cubuk, Barret Zoph, Dandelion Mane, Vijay Vasudevan, and Quoc V. Le. Autoaugment: ´ Learning augmentation policies from data. CoRR, abs/1805.09501, 2018.
|
| 216 |
+
|
| 217 |
+
Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Fei-Fei Li. Imagenet: A large-scale hierarchical image database. In CVPR, pp. 248–255, 2009.
|
| 218 |
+
|
| 219 |
+
Jiemin Fang, Yuzhu Sun, Qian Zhang, Yuan Li, Wenyu Liu, and Xinggang Wang. Densely connected search space for more flexible neural architecture search. CoRR, abs/1906.09607, 2019.
|
| 220 |
+
|
| 221 |
+
Ariel Gordon, Elad Eban, Ofir Nachum, Bo Chen, Hao Wu, Tien-Ju Yang, and Edward Choi. Morphnet: Fast & simple resource-constrained structure learning of deep networks. In CVPR, pp. 1586–1595, 2018.
|
| 222 |
+
|
| 223 |
+
Zichao Guo, Xiangyu Zhang, Haoyuan Mu, Wen Heng, Zechun Liu, Yichen Wei, and Jian Sun. Single path one-shot neural architecture search with uniform sampling. CoRR, abs/1904.00420, 2019.
|
| 224 |
+
|
| 225 |
+
Song Han, Huizi Mao, and William J. Dally. Deep compression: Compressing deep neural network with pruning, trained quantization and huffman coding. In ICLR, 2016.
|
| 226 |
+
|
| 227 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pp. 770–778, 2016.
|
| 228 |
+
|
| 229 |
+
Kaiming He, Georgia Gkioxari, Piotr Dollar, and Ross B. Girshick. Mask R-CNN. In ´ IEEE International Conference on Computer Vision, ICCV 2017, Venice, Italy, October 22-29, 2017, pp. 2980–2988, 2017a.
|
| 230 |
+
|
| 231 |
+
Yihui He, Xiangyu Zhang, and Jian Sun. Channel pruning for accelerating very deep neural networks. In ICCV, pp. 1398–1406, 2017b.
|
| 232 |
+
|
| 233 |
+
Andrew Howard, Mark Sandler, Grace Chu, Liang-Chieh Chen, Bo Chen, Mingxing Tan, Weijun Wang, Yukun Zhu, Ruoming Pang, Vijay Vasudevan, et al. Searching for mobilenetv3. Corr, abs/1905.02244, 2019.
|
| 234 |
+
|
| 235 |
+
Andrew G. Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, and Hartwig Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. CoRR, abs/1704.04861, 2017.
|
| 236 |
+
|
| 237 |
+
Jie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. In CVPR, pp. 7132–7141, 2018.
|
| 238 |
+
|
| 239 |
+
Xiaojie Jin, Jiang Wang, Joshua Slocum, Ming-Hsuan Yang, Shengyang Dai, Shuicheng Yan, and Jiashi Feng. Rc-darts: Resource constrained differentiable architecture search. arXiv preprint arXiv:1912.12814, 2019.
|
| 240 |
+
|
| 241 |
+
Hanwen Liang, Shifeng Zhang, Jiacheng Sun, Xingqiu He, Weiran Huang, Kechen Zhuang, and Zhenguo Li. Darts $^ +$ : Improved differentiable architecture search with early stopping, 2019.
|
| 242 |
+
|
| 243 |
+
Tsung-Yi Lin, Michael Maire, Serge J. Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollar, and C. Lawrence Zitnick. Microsoft COCO: common objects in context. In ´ Computer Vision - ECCV 2014 - 13th European Conference, Zurich, Switzerland, September 6-12, 2014, Proceedings, Part V, pp. 740–755, 2014.
|
| 244 |
+
|
| 245 |
+
Hanxiao Liu, Karen Simonyan, and Yiming Yang. DARTS: differentiable architecture search. In ICLR, 2019a.
|
| 246 |
+
|
| 247 |
+
Zhuang Liu, Jianguo Li, Zhiqiang Shen, Gao Huang, Shoumeng Yan, and Changshui Zhang. Learning efficient convolutional networks through network slimming. In ICCV, pp. 2755–2763, 2017.
|
| 248 |
+
|
| 249 |
+
Zhuang Liu, Mingjie Sun, Tinghui Zhou, Gao Huang, and Trevor Darrell. Rethinking the value of network pruning. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019, 2019b.
|
| 250 |
+
|
| 251 |
+
Jian-Hao Luo, Jianxin Wu, and Weiyao Lin. Thinet: A filter level pruning method for deep neural network compression. In ICCV, pp. 5068–5076, 2017.
|
| 252 |
+
|
| 253 |
+
Ningning Ma, Xiangyu Zhang, Hai-Tao Zheng, and Jian Sun. Shufflenet V2: practical guidelines for efficient CNN architecture design. In ECCV, pp. 122–138, 2018.
|
| 254 |
+
|
| 255 |
+
Hieu Pham, Melody Y. Guan, Barret Zoph, Quoc V. Le, and Jeff Dean. Efficient neural architecture search via parameter sharing. In ICML, pp. 4092–4101, 2018.
|
| 256 |
+
|
| 257 |
+
Prajit Ramachandran, Barret Zoph, and Quoc V. Le. Searching for activation functions. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 - May 3, 2018, Workshop Track Proceedings, 2018.
|
| 258 |
+
|
| 259 |
+
Mark Sandler, Andrew G. Howard, Menglong Zhu, Andrey Zhmoginov, and Liang-Chieh Chen. Mobilenetv2: Inverted residuals and linear bottlenecks. In CVPR, pp. 4510–4520, 2018.
|
| 260 |
+
|
| 261 |
+
Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015.
|
| 262 |
+
|
| 263 |
+
Dimitrios Stamoulis, Ruizhou Ding, Di Wang, Dimitrios Lymberopoulos, Bodhi Priyantha, Jie Liu, and Diana Marculescu. Single-path NAS: designing hardware-efficient convnets in less than 4 hours. CoRR, abs/1904.02877, 2019a.
|
| 264 |
+
|
| 265 |
+
Dimitrios Stamoulis, Ruizhou Ding, Di Wang, Dimitrios Lymberopoulos, Bodhi Priyantha, Jie Liu, and Diana Marculescu. Single-path mobile automl: Efficient convnet design and NAS hyperparameter optimization. CoRR, abs/1907.00959, 2019b.
|
| 266 |
+
|
| 267 |
+
Mingxing Tan and Quoc V. Le. Efficientnet: Rethinking model scaling for convolutional neural networks. In ICML, pp. 6105–6114, 2019a.
|
| 268 |
+
|
| 269 |
+
Mingxing Tan and Quoc V. Le. Mixconv: Mixed depthwise convolutional kernels. CoRR, abs/1907.09595, 2019b.
|
| 270 |
+
|
| 271 |
+
Mingxing Tan, Bo Chen, Ruoming Pang, Vijay Vasudevan, Mark Sandler, Andrew Howard, and Quoc V Le. Mnasnet: Platform-aware neural architecture search for mobile. In CVPR, pp. 2820– 2828, 2019.
|
| 272 |
+
|
| 273 |
+
Bichen Wu, Xiaoliang Dai, Peizhao Zhang, Yanghan Wang, Fei Sun, Yiming Wu, Yuandong Tian, Peter Vajda, Yangqing Jia, and Kurt Keutzer. Fbnet: Hardware-aware efficient convnet design via differentiable neural architecture search. In CVPR, pp. 10734–10742, 2019.
|
| 274 |
+
|
| 275 |
+
Yuhui Xu, Lingxi Xie, Xiaopeng Zhang, Xin Chen, Guo-Jun Qi, Qi Tian, and Hongkai Xiong. PCDARTS: Partial channel connections for memory-efficient architecture search. In ICLR, 2020.
|
| 276 |
+
|
| 277 |
+
Jianbo Ye, Xin Lu, Zhe Lin, and James Z. Wang. Rethinking the smaller-norm-less-informative assumption in channel pruning of convolution layers. In ICLR, 2018.
|
| 278 |
+
|
| 279 |
+
Jiahui Yu, Pengchong Jin, Hanxiao Liu, Gabriel Bender, Pieter-Jan Kindermans, Mingxing Tan, Thomas Huang, Xiaodan Song, and Quoc Le. Scaling up neural architecture search with big single-stage models, 2020. URL https://openreview.net/forum?id $=$ HJe7unNFDH.
|
| 280 |
+
|
| 281 |
+
Hongyi Zhang, Moustapha Cisse, Yann N. Dauphin, and David Lopez-Paz. mixup: Beyond empiri- ´ cal risk minimization. In ICLR, 2018.
|
| 282 |
+
|
| 283 |
+
Barret Zoph and Quoc V. Le. Neural architecture search with reinforcement learning. In ICLR, 2017.
|
| 284 |
+
|
| 285 |
+

|
| 286 |
+
A VISUALIZATION
|
| 287 |
+
Figure 5: The architecture of AtomNAS-C. Blue, orange, cyan blocks denote atomic blocks with kernel size 3, 5 and 7 respectively; the heights of these blocks are proportional to their expand ratios.
|
| 288 |
+
|
| 289 |
+
We plot the structure of the searched architecture AtomNAS-C in Fig. 5, from which we see more flexibility of channel number selection, not only among different operators within each block, but also across the network. In Fig. 6a, we visualize the ratio between atomic blocks with different kernel sizes in all 21 search blocks. First, we notice that all search blocks have convolutions of all three kernel sizes, showing that AtomNAS learns the importance of using multiple kernel sizes in network architecture. Another observation is that AtomNAS tends to keep more atomic blocks at the later stage of the network. This is because in earlier stage, convolutions of the same kernel size costs more FLOPs; AtomNAS is aware of this (thanks to its resource-aware regularization) and try to keep as less as possible computationally costly atomic blocks.
|
| 290 |
+
|
| 291 |
+

|
| 292 |
+
Figure 6: Ratio of different types of atomic blocks in all 21 searchable blocks. The text above each pie tells the total number of atomic blocks of the corresponding block in the original supernet. Grey denotes dead atomic blocks; blue, orange, and cyan represent atomic blocks using depth-wise convolutions with kernel size $3 , 5 , 7$ respectively. Blocks without skip connection are highlighted by bold text. (a) Visualization for AtomNAS-C. (b) Visualization for baseline (i.e., without FLOPs related coefficients $c _ { i }$ ).
|
md/train/EMHoBG0avc1/EMHoBG0avc1.md
ADDED
|
@@ -0,0 +1,397 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ANSWERING COMPLEX OPEN-DOMAIN QUESTIONS WITH MULTI-HOP DENSE RETRIEVAL
|
| 2 |
+
|
| 3 |
+
Wenhan Xiong1∗ Xiang Lorraine $\mathbf { L i } ^ { 2 * }$ Srinivasan Iyer‡ Jingfei Du‡
|
| 4 |
+
|
| 5 |
+
Patrick Lewis‡† William Wang1 Yashar Mehdad‡ Wen-tau Yih‡
|
| 6 |
+
|
| 7 |
+
Sebastian Riedel‡† Douwe Kiela‡ Barlas Oguz ˘ ‡
|
| 8 |
+
|
| 9 |
+
1University of California, Santa Barbara
|
| 10 |
+
2University of Massachusetts Amherst
|
| 11 |
+
‡Facebook AI
|
| 12 |
+
†University College London
|
| 13 |
+
{xwhan, william}@cs.ucsb.edu, xiangl@cs.umass.edu,
|
| 14 |
+
{sviyer, jingfeidu, plewis, mehdad, scottyih, sriedel, dkiela, barlaso}@fb.com
|
| 15 |
+
|
| 16 |
+
# ABSTRACT
|
| 17 |
+
|
| 18 |
+
We propose a simple and efficient multi-hop dense retrieval approach for answering complex open-domain questions, which achieves state-of-the-art performance on two multi-hop datasets, HotpotQA and multi-evidence FEVER. Contrary to previous work, our method does not require access to any corpus-specific information, such as inter-document hyperlinks or human-annotated entity markers, and can be applied to any unstructured text corpus. Our system also yields a much better efficiency-accuracy trade-off, matching the best published accuracy on HotpotQA while being 10 times faster at inference time.1
|
| 19 |
+
|
| 20 |
+
# 1 INTRODUCTION
|
| 21 |
+
|
| 22 |
+
Open domain question answering is a challenging task where the answer to a given question needs to be extracted from a large pool of documents. The prevailing approach (Chen et al., 2017) tackles the problem in two stages. Given a question, a retriever first produces a list of $k$ candidate documents, and a reader then extracts the answer from this set. Until recently, retrieval models were dependent on traditional term-based information retrieval (IR) methods, which fail to capture the semantics of the question beyond lexical matching and remain a major performance bottleneck for the task. Recent work on dense retrieval methods instead uses pretrained encoders to cast the question and documents into dense representations in a vector space and relies on fast maximum inner-product search (MIPS) to complete the retrieval. These approaches (Lee et al., 2019; Guu et al., 2020; Karpukhin et al., 2020) have demonstrated significant retrieval improvements over traditional IR baselines.
|
| 23 |
+
|
| 24 |
+
However, such methods remain limited to simple questions, where the answer to the question is explicit in a single piece of text evidence. In contrast, complex questions typically involve aggregating information from multiple documents, requiring logical reasoning or sequential (multihop) processing in order to infer the answer (see Figure 1 for an example). Since the process for answering such questions might be sequential in nature, single-shot approaches to retrieval are insufficient. Instead, iterative methods are needed to recursively retrieve new information at each step, conditioned on the information already at hand. Beyond further expanding the scope of existing textual open-domain QA systems, answering more complex questions usually involves multi-hop reasoning, which poses unique challenges for existing neural-based AI systems. With its practical and research values, multi-hop QA has been extensively studied recently (Talmor & Berant, 2018; Yang et al., 2018; Welbl et al., 2018) and remains an active research area in NLP (Qi et al., 2019; Nie et al., 2019; Min et al., 2019; Zhao et al., 2020; Asai et al., 2020; Perez et al., 2020).
|
| 25 |
+
|
| 26 |
+

|
| 27 |
+
Figure 1: An overview of the multi-hop dense retrieval approach.
|
| 28 |
+
|
| 29 |
+
The main problem in answering multi-hop open-domain questions is that the search space grows exponentially with each retrieval hop. Most recent work tackles this issue by constructing a document graph utilizing either entity linking or existing hyperlink structure in the underlying Wikipedia corpus (Nie et al., 2019; Asai et al., 2020). The problem then becomes finding the best path in this graph, where the search space is bounded by the number of hyperlinks in each passage. However, such methods may not generalize to new domains, where entity linking might perform poorly, or where hyperlinks might not be as abundant as in Wikipedia. Moreover, efficiency remains a challenge despite using these data-dependent pruning heuristics, with the best model (Asai et al., 2020) needing hundreds of calls to large pretrained models to produce a single answer.
|
| 30 |
+
|
| 31 |
+
In contrast, we propose to employ dense retrieval to the multi-hop setting with a simple recursive framework. Our method iteratively encodes the question and previously retrieved documents as a query vector and retrieves the next relevant documents using efficient MIPS methods. With highquality, dense representations derived from strong pretrained encoders, our work first demonstrates that the sequence of documents that provide sufficient information to answer the multi-hop question can be accurately discovered from unstructured text, without the help of corpus-specific hyperlinks. When evaluated on two multi-hop benchmarks, HotpotQA (Yang et al., 2018) and a multi-evidence subset of FEVER (Thorne et al., 2018), our approach improves greatly over the traditional linkingbased retrieval methods. More importantly, the better retrieval results also lead to state-of-the-art downstream results on both datasets. On HotpotQA, we demonstrate a vastly improved efficiencyaccuracy trade-off achieved by our system: by limiting the amount of retrieved contexts fed into downstream models, our system can match the best published result while being $1 0 \mathrm { x }$ faster.
|
| 32 |
+
|
| 33 |
+
# 2 METHOD
|
| 34 |
+
|
| 35 |
+
# 2.1 PROBLEM DEFINITION
|
| 36 |
+
|
| 37 |
+
The retrieval task considered in this work can be described as follows (see also Figure 1). Given a multi-hop question $q$ and a large text corpus $\mathcal { C }$ , the retrieval module needs to retrieve a sequence of passages $\mathcal { P } _ { s e q } : \{ p _ { 1 } , p _ { 2 } , . . . , p _ { n } \}$ that provide sufficient information for answering $q$ . Practically, the retriever returns the $k$ best-scoring sequence candidates, ${ \{ \mathcal { P } _ { s e q } ^ { 1 } , \mathcal { P } _ { s e q } ^ { 2 } , . . . , \mathcal { P } _ { s e q } ^ { k } \} }$ $k \ll | \mathcal { C } | )$ , with the hope that at least one of them has the desired qualities. $k$ should be small enough for downstream modules to process in a reasonable time while maintaining adequate recall. In general, retrieval also needs to be efficient enough to handle real-world corpora containing millions of documents.
|
| 38 |
+
|
| 39 |
+
# 2.2 MULTI-HOP DENSE RETRIEVAL
|
| 40 |
+
|
| 41 |
+
Model Based on the sequential nature of the multi-hop retrieval problem, our system solves it in an iterative fashion. We model the probability of selecting a certain passage sequence as follows:
|
| 42 |
+
|
| 43 |
+
$$
|
| 44 |
+
P ( \mathcal P _ { s e q } | q ) = \prod _ { t = 1 } ^ { n } P ( p _ { t } | q , p _ { 1 } , . . . , p _ { t - 1 } ) ,
|
| 45 |
+
$$
|
| 46 |
+
|
| 47 |
+
where for $t = 1$ , we only condition on the original question for retrieval. At each retrieval step, we construct a new query representation based on previous results and the retrieval is implemented as maximum inner product search over the dense representations of the whole corpus:
|
| 48 |
+
|
| 49 |
+
Here $\langle \cdot , \cdot \rangle$ is the inner product between the query and passage vectors. $h ( \cdot )$ and and $g ( \cdot )$ are passage and query encoders that produce the dense representations. In order to reformulate the query representation to account for previous retrieval results at time step $t$ , we simply concatenate the question and the retrieved passages as the inputs to $g ( \cdot )$ . Note that our formulation for each retrieval step is similar to existing single-hop dense retrieval methods (Lee et al., 2019; Guu et al., 2020; Karpukhin et al., 2020) except that we add the query reformulation process conditioned on previous retrieval results. Additionally, instead of using a bi-encoder architecture with separately parameterized encoders for queries and passages, we use a shared RoBERTa-base (Liu et al., 2019) encoder for both $h ( \cdot )$ and $g ( \cdot )$ . In $\ S 3 . 1 . 3$ , we show this simple modification yields considerable improvements. Specifically, we apply layer normalization over the start token’s representations from RoBERTa to get the final dense query/passage vectors.
|
| 50 |
+
|
| 51 |
+
Training and Inference The retriever model is trained as in Karpukhin et al. (2020), where each input query (which at each step consists of a question and previously retrieved passages) is paired with a positive passage and $m$ negative passages to approximate the softmax over all passages. The positive passage is the gold annotated evidence at step $t$ . Negative passages are a combination of passages in the current batch which correspond to other questions (in-batch), and hard negatives which are false adversarial passages. In our experiments, we obtain hard negatives from TF-IDF retrieved passages and their linked pages in Wikipedia. We note that using hyperlinked pages as additional negatives is neither necessary nor critical for our approach. In fact we observe only a very small degradation in performance if we remove them from training (§3.1.3). In addition to in-batch negatives, we use a memory bank $( \mathcal { M } )$ mechanism (Wu et al., 2018) to further increase the number of negative examples for each question. The memory bank stores a large number of dense passage vectors. As we block the gradient back-propagation in the memory bank, its size $( | \mathcal { M } | \gg$ batch size) is less restricted by the GPU memory size. Specifically, after training to convergence with the shared encoder, we freeze a copy of the encoder as the new passage encoder and collect a bank of passage representations across multiple batches to serve as the set of negative passages. This simple extension results in further improvement in retrieval. $( \ S 3 . 1 . 3 )$ .
|
| 52 |
+
|
| 53 |
+
For inference, we first encode the whole corpus into an index of passage vectors. Given a question, we use beam search to obtain top- $k$ passage sequence candidates, where the candidates to beam search at each step are generated by MIPS using the query encoder at step $t$ , and the beams are scored by the sum of inner products as suggested by the probabilistic formulation discussed above. Such inference relies only on the dense passage index and the query representations, and does not need explicit graph construction using hyperlinks or entity linking. The top- $k$ sequences will then be fed into task-specific downstream modules to produce the desired outputs.
|
| 54 |
+
|
| 55 |
+
# 3 EXPERIMENTS
|
| 56 |
+
|
| 57 |
+
Datasets Our experiments focus on two datasets: HotpotQA and Multi-evidence FEVER. HotpotQA (Yang et al., 2018) includes 113k multi-hop questions. Unlike other multi-hop QA datasets (Zhang et al., 2018; Talmor & Berant, 2018; Welbl et al., 2018), where the information sources of the answers are knowledge bases, HotpotQA uses documents in Wikipedia. Thus, its questions are not restricted by the fixed KB schema and can cover more diverse topics. Each question in HotpotQA is also provided with ground truth support passages, which enables us to evaluate the intermediate retrieval performance. Multi-evidence FEVER includes 20k claims from the FEVER (Thorne et al., 2018) fact verification dataset, where the claims can only be verified using multiple documents. We use this dataset to validate the general applicability of our method.
|
| 58 |
+
|
| 59 |
+
Implementation Details All the experiments are conducted on a machine with 8 32GB V100 GPUs. Our code is based on Huggingface Transformers (Wolf et al., 2019). Our best retrieval results are predicted using the exact inner product search index (IndexFlatIP) in FAISS (Johnson et al., 2017).
|
| 60 |
+
|
| 61 |
+
Table 1: Retrieval performance in recall at $k$ retrieved passages and precision/recall/F1.
|
| 62 |
+
|
| 63 |
+
<table><tr><td rowspan="2">Method</td><td colspan="3">HotpotQA</td><td colspan="3">FEVER</td></tr><tr><td>R@2</td><td>R@10</td><td>R@20</td><td>Precision</td><td>Recall</td><td>F1</td></tr><tr><td>TF-IDF</td><td>10.3</td><td>29.1</td><td>36.8</td><td>14.9</td><td>28.2</td><td>19.5</td></tr><tr><td>TF-IDF+Linked</td><td>17.3</td><td>50.0</td><td>62.7</td><td>18.6</td><td>35.8</td><td>24.5</td></tr><tr><td>DrKIT</td><td>38.3</td><td>67.2</td><td>71.0</td><td>-</td><td>1</td><td>-</td></tr><tr><td>Entity Linking</td><td>1</td><td>1</td><td>1</td><td>30.6</td><td>53.8</td><td>39.0</td></tr><tr><td>MDR</td><td>65.9</td><td>77.5</td><td>80.2</td><td>45.7</td><td>69.1</td><td>55.0</td></tr></table>
|
| 64 |
+
|
| 65 |
+
Both datasets assume 2 hops, so we fix $n = 2$ for all experiments. Since HotpotQA does not provide the order of the passage sequences, as a heuristic, we consider the passage that includes the answer span as the final passage. 2 In $\ S 3 . 1 . 3$ , we show that the order of the passages is important for effective retriever training. The hyperparameters can be found in Appendix B.1.
|
| 66 |
+
|
| 67 |
+
# 3.1 EXPERIMENTS: RETRIEVAL
|
| 68 |
+
|
| 69 |
+
We evaluate our multi-hop dense retriever (MDR) in two different use cases: direct and reranking, where the former outputs the top- $k$ results directly using the retriever scores and the latter applies a task-specific reranking model to the initial results from MDR.
|
| 70 |
+
|
| 71 |
+
# 3.1.1 DIRECT
|
| 72 |
+
|
| 73 |
+
We first compare MDR with several efficient retrieval methods that can directly find the top- $k$ passage sequences from a large corpus, including TF-IDF, TF- $\mathrm { . I D F + }$ Linked, DrKIT and Entity Linking. TFIDF is the standard term-matching baseline, while TF-IDF $^ +$ Linked is a straightforward extension that also extracts the hyperlinked passages from TF-IDF passages, and then reranks both TF-IDF and hyperlinked passages with $\mathbf { B } \mathbf { M } 2 5 \mathbf { \Omega } ^ { 3 }$ scores. DrKIT (Dhingra et al., 2020) is a recently proposed dense retrieval approach, which builds a entity-level (mentions of entities) dense index for retrieval. It relies on hyperlinks to extract entity mentions and prunes the search space with a binary mask that restricts the next hop to using hyperlinked entities. On FEVER, we additionally consider an entity linking baseline (Hanselowski et al., 2018) that is commonly used in existing fact verification pipelines. This baseline first uses a constituency parser to extract potential entity mentions in the fact claim and then uses the MediaWiki API to search documents with titles that match the mentions.
|
| 74 |
+
|
| 75 |
+
Table 1 shows the performance of different retrieval methods. On HotpotQA the metric is recall at the top $k$ paragraphs4, while on FEVER the metrics are precision, recall and $\mathrm { F _ { 1 } }$ in order to be consistent with previous results. On both datasets, MDR substantially outperforms all baselines.
|
| 76 |
+
|
| 77 |
+
# 3.1.2 RERANKING
|
| 78 |
+
|
| 79 |
+
Reranking documents returned by efficient retrieval methods with a more sophisticated model is a common strategy for improving retrieval quality. For instance, state-of-the-art multi-hop QA systems usually augment traditional IR techniques with large pretrained language models to select a more compact but precise passage set. On HotpotQA, we test the effectiveness of MDR after a simple BERT-based reranking: each of the top $k$ passage sequences from MDR is first prepended with the original question and then fed into a BERT-like encoder that predicts relevant scores. We train this reranking model with a binary cross-entropy loss, with the target being whether the passage sequence cover both groundtruth passages. We empirically compare our approach with two other existing reranking-based retrieval methods: Semantic Retrieval (Nie et al., 2019) uses BERT at both passage-level and sentence-level to select context from the initial TF-IDF and hyperlinked passages; Graph Recurrent Retriever (Asai et al., 2020) learns to recursively select the best passage sequence on top of a hyperlinked passage graph, where each passage node is encoded with BERT.
|
| 80 |
+
|
| 81 |
+
Table 2 shows the reranking results. Following Asai et al. (2020), we use Answer Recall and Support Passage Exact Match $( S P E M ) ^ { 5 }$ as the evaluation metrics. Even without reranking, MDR is already better than Semantic Retrieval, which requires around 50 BERT encoding (where each encoding involves cross-attention over a concatenated question-passage pair). After we rerank the top-100 sequences from the dense retriever, our passage recall is better than the state-of-the-art Graph Recurrent Retriever, which uses BERT to process more than 500 passages. We do not compare the reranked results on FEVER, as most FEVER systems directly use BERT encoder to select the top evidence sentences from the retrieved documents, instead of the reranking the documents.
|
| 82 |
+
|
| 83 |
+
Table 2: HotpotQA reranked retrieval results (input passages for final answer prediction).
|
| 84 |
+
|
| 85 |
+
<table><tr><td>Method</td><td>SP EM</td><td>Ans Recall</td></tr><tr><td>Semantic Retrieval</td><td>63.9</td><td>77.9</td></tr><tr><td>Graph Rec Retriever</td><td>75.7</td><td>87.5</td></tr><tr><td>MDR (direct)</td><td>65.9</td><td>75.4</td></tr><tr><td>MDR (reranking)</td><td>81.2</td><td>88.2</td></tr></table>
|
| 86 |
+
|
| 87 |
+
Table 3: Retriever Model Ablation on HotpotQA retrieval. Single-hop here is equivalent to the DPR method (Karpukhin et al., 2020).
|
| 88 |
+
|
| 89 |
+
<table><tr><td>Retriever variants</td><td>R@2</td><td>R@10</td><td>R@20</td></tr><tr><td>Full Retrieval Model</td><td>65.9</td><td>77.5</td><td>80.2</td></tr><tr><td>- w/o linked negatives</td><td>64.6</td><td>76.8</td><td>79.6</td></tr><tr><td>- w/o memory bank</td><td>63.7</td><td>74.2</td><td>77.2</td></tr><tr><td>- w/o shared encoder</td><td>59.9</td><td>70.6</td><td>73.1</td></tr><tr><td>- w/o order</td><td>17.6</td><td>55.6</td><td>62.3</td></tr><tr><td>Single-hop</td><td>25.2</td><td>45.4</td><td>52.1</td></tr></table>
|
| 90 |
+
|
| 91 |
+
# 3.1.3 ANALYSIS
|
| 92 |
+
|
| 93 |
+
To understand the strengths and weaknesses of MDR, we conduct further analysis on HotpotQA dev.
|
| 94 |
+
|
| 95 |
+
Retrieval Error Analysis HotpotQA contains two question categories: bridge questions in which an intermediate entity is missing and needs to be retrieved before inferring the answer; and comparison questions where two entities are mentioned simultaneously and compared in some way. In Figure 2, we show the retrieval performance of both question types. The case of comparison questions proves easier, since both entities needed for retrieval are present in the question.
|
| 96 |
+
|
| 97 |
+
This case appears almost solved, confirming recent work demonstrating that dense retrieval is very effective at entity linking (Wu et al., 2019).
|
| 98 |
+
|
| 99 |
+
For the case of bridge questions, we manually inspect 50 randomly sampled erroneous examples after reranking. We find that in half of these cases, our retrieval model predicts an alternative passage sequence that is also valid (see Appendix A.1 for examples).
|
| 100 |
+
|
| 101 |
+

|
| 102 |
+
Figure 2: The retrieval performance gap between comparison and bridge questions. Left: recall of groundtruth passage sequences without reranking. Right: Top-1 chain exact match after reranking.
|
| 103 |
+
|
| 104 |
+
This gives an estimated top-1 passage sequence accuracy of about $90 \%$ . Other remaining errors are due to the dense method’s inability to capture the exact n-gram match between the question and passages. This is a known issue (Lee et al., 2019; Karpukhin et al., 2020) of dense retrieval methods when dealing with questions that have high lexical overlap with the passages. To this end, a hybrid multi-hop retrieval method with both term and dense index might be used to further improve the performance on bridge questions.
|
| 105 |
+
|
| 106 |
+
Retriever Ablation Study In Table 3, we examine our model with different variations on HotpotQA to show the effectiveness of each proposed component. We see that further training with a memory bank results in modest gains, while using a shared encoder is crucial for the best performance. Respecting the ordering of passages in two hops is essential - training in an order-agnostic manner hardly works at all, and underperforms even the single-hop baseline. Finally, not using hyperlinked paragraphs from TF-IDF passages as additional negatives has only a minor impact on performance.
|
| 107 |
+
|
| 108 |
+
Question Decomposition for Retrieval As multi-hop questions have more complex structures than simple questions, recent studies (Min et al., 2019; Perez et al., 2020) propose to use explicit question decomposition to simplify the problem. Wolfson et al. (2020) shows that with TF-IDF, using decomposed questions improves the retrieval results. We investigate whether the conclusion still holds with stronger dense retrieval methods. We use the human-annotated question decomposition from the QDMR dataset (Wolfson et al., 2020) for analysis. For a question like Q:Mick Carter is the landlord of a public house located at what address?, QDMR provides two subquestions, SubQ1: What is the public house that Mick Carter is the landlord of? and SubQ2: What is the address that #1 is located at?. We sample 100 bridge questions and replace $\# 1$ in SubQ2 with the correct answer (The Queen Victoria) to SubQ1. Note that this gives advantages to the decomposed method as we ignore any intermediate errors. We estimate the performance of potential decomposed methods with the state-of-the-art single-hop dense retrieval model (Karpukhin et al., 2020).
|
| 109 |
+
|
| 110 |
+
As shown in Table 4, we did not observe any strong improvements from explicit question decomposition, which is contrary to the findings by Wolfson et al. (2020) when using term-based IR methods. Moreover, as shown in the third row of the table, when the 1st hop of the decomposed retrieval (i.e., SubQ1) is replaced with the original question, no performance degradation is observed. This suggests that strong pretrained encoders can effectively learn to select necessary information from the multi-hop question at each
|
| 111 |
+
|
| 112 |
+
Table 4: Comparison with decomposed dense retrieval which uses oracle question decomposition (test on 100 bridge questions). See text for details about the decomposed settings.
|
| 113 |
+
|
| 114 |
+
<table><tr><td>Method</td><td>R@2</td><td>R@10</td><td>R@20</td></tr><tr><td>MDR</td><td>54.9</td><td>63.7</td><td>70.6</td></tr><tr><td>Decomp (SubQ1;SubQ2)</td><td>50.0</td><td>64.7</td><td>67.6</td></tr><tr><td>Decomp (Q;SubQ2)</td><td>51.0</td><td>64.7</td><td>68.6</td></tr></table>
|
| 115 |
+
|
| 116 |
+
retrieval step. Regarding the performance drop when using explicit compositions, we hypothesize that it is because some information in one decomposed subquestion could be useful for the other retrieval hop. Examples supporting this hypothesis can be found in Appendix A.2. While this could potentially be addressed by a different style of decomposition, our analysis suggests that decomposition approaches might be sub-optimal in the context of dense retrieval with strong pretrained encoders.
|
| 117 |
+
|
| 118 |
+
# 3.2 EXPERIMENTS: HOTPOTQA
|
| 119 |
+
|
| 120 |
+
We evaluate how the better retrieval results of MDR improve multi-hop question answering in this section. As our retriever system is agnostic to downstream models, we test two categories of answer prediction architectures: the extractive span prediction models based on pretrained masked language models, such as BERT (Devlin et al., 2019) and ELECTRA (Clark et al., 2020), and the retrieval-augmented generative reader models (Lewis et al., 2020b; Izacard & Grave, 2020), which are based on pretrained sequence-to-sequence (seq2seq) models such as BART (Lewis et al., 2020a) and T5 (Raffel et al., 2019). Note that compared to more complicated graph reasoning models (Fang et al., 2019; Zhao et al., 2020), these two classes of models do not rely on hyperlinks and can be applied to any text.
|
| 121 |
+
|
| 122 |
+
Extractive reader models learn to predict an answer span from the concatenation of the question and passage sequence $( [ q , p _ { 1 } , . . . , p _ { n } ] )$ . On top of the token representations produced by pretrained models, we add two prediction heads to predict the start and end position of the answer span.6 To predict the supporting sentences, we add another prediction head and predict a binary label at each sentence start. For simplicity, the same encoder is also responsible for reranking the top $k$ passage sequences. The reranking detail has been discussed in $\ S 3 . 1 . 2$ . Our best reader model is based on ELECTRA (Clark et al., 2020), which has achieved the best single-model performance on the standard SQuAD (Rajpurkar et al., 2018) benchmark. Additionally, we also report the performance of BERT-large with whole word masking (BERT-wwm) to fairly compare with Asai et al. (2020).
|
| 123 |
+
|
| 124 |
+
Generative models, such as RAG (Lewis et al., 2020b) and FiD (Izacard & Grave, 2020), are based on pretrained seq2seq models. These methods finetune pretrained models with the concatenated questions and retrieved documents as inputs, and answer tokens as outputs. This generative paradigm has shown state-of-the-art performance on single-hop open-domain QA tasks. Specifically, FiD first uses the T5 encoder to process each retrieved passage sequence independently and then uses the decoder to perform attention over the representations of all input tokens while generating answers. RAG is built on the smaller BART model. Instead of only tuning the seq2seq model, it also jointly train the question encoder of the dense retriever. We modified it to allow multi-hop retrieval.
|
| 125 |
+
|
| 126 |
+
More details about these two classes of reader models are described in Appendix B.2.
|
| 127 |
+
|
| 128 |
+
3.2.1 RESULTS
|
| 129 |
+
Table 5: HotpotQA-fullwiki test results.
|
| 130 |
+
|
| 131 |
+
<table><tr><td rowspan="2">Methods</td><td colspan="2">Answer</td><td colspan="2">Support</td><td colspan="2">Joint</td></tr><tr><td>EM</td><td>F1</td><td>EM</td><td>F1</td><td>EM</td><td>F1</td></tr><tr><td>GoldEn Retriever (Qi et al.,2019)</td><td>37.9</td><td>48.6</td><td>30.7</td><td>64,2</td><td>18.9</td><td>39.1</td></tr><tr><td>Semantic Retrieval (Nie et al.,2019)</td><td>46.5</td><td>58.8</td><td>39.9</td><td>71.5</td><td>26.6</td><td>49.2</td></tr><tr><td>Transformer-XH (Zhao et al., 2020)</td><td>51.6</td><td>64.1</td><td>40.9</td><td>71.4</td><td>26.1</td><td>51.3</td></tr><tr><td>HGN (Fang et al., 2019)</td><td>56.7</td><td>69.2</td><td>50.0</td><td>76.4</td><td>35.6</td><td>59.9</td></tr><tr><td>DrKIT (Dhingra et al., 2020)</td><td>42.1</td><td>51.7</td><td>37.1</td><td>59.8</td><td>24.7</td><td>42.9</td></tr><tr><td>Graph Recurrent Retriever (Asai et al., 2020)</td><td>60.0</td><td>73.0</td><td>49.1</td><td>76.4</td><td>35.4</td><td>61.2</td></tr><tr><td>MDR (ELECTRA Reader)</td><td>62.3</td><td>75.3</td><td>57.5</td><td>80.9</td><td>41.8</td><td>66.6</td></tr></table>
|
| 132 |
+
|
| 133 |
+
Comparison with Existing Systems Table 5 compares the HotpotQA test performance of our best ELECTRA reader with recently published systems, using the numbers from the official leaderboard, which measure answer and supporting sentence exact match (EM)/F1 and joint EM/F1. Among these methods, only GoldEn Retriever (Qi et al., 2019) does not exploit hyperlinks. In particular, Graph Recurrent Retriever trains a graph traversal model for chain retrieval; TransformerXH (Zhao et al., 2020) and HGN (Fang et al., 2019) explicitly encode the hyperlink graph structure within their answer prediction models. In fact, this particular inductive bias provides a perhaps unreasonably strong advantage in the specific context of HotpotQA, which by construction guarantees groundtruth passage sequences to follow hyperlinks. Despite not using such prior knowledge, our model outperforms all previous systems by large margins, especially on supporting fact prediction, which benefits more directly from better retrieval.
|
| 134 |
+
|
| 135 |
+
Reader Model Variants Results for reader model variants are shown in Table 6.7 First, we see that the BERT-wwm reader is $1 \%$ worse than the ELECTRA reader when using enough passages. However, it still outperforms the results in (Asai et al., 2020) which also uses BERT-wwm for answer prediction. While RAG and FiD have shown strong improvements over extractive models on single-hop datasets such as NaturalQuestions (Kwiatkowski
|
| 136 |
+
|
| 137 |
+
Table 6: Reader comparison on HotpotQA dev set.
|
| 138 |
+
|
| 139 |
+
<table><tr><td></td><td>Model</td><td>Topk</td><td>EM</td><td>F1</td></tr><tr><td rowspan="2">Extractive</td><td>ELECTRA ELECTRA</td><td>Top50</td><td>61.7</td><td>74.3</td></tr><tr><td>BERT-wwm</td><td>Top 250 Top250</td><td>63.4 61.5</td><td>76.2 74.7</td></tr><tr><td rowspan="2">Generative</td><td rowspan="2">Multi-hop RAG FiD</td><td>Top 4*4</td><td>51.2</td><td>63.9</td></tr><tr><td>Top 50</td><td>61.7</td><td>73.1</td></tr></table>
|
| 140 |
+
|
| 141 |
+
et al., 2019), they do not show an advantage in the multi-hop case. Despite having twice as many parameters as ELECTRA, FiD fails to outperform it using the same amount of context (top 50). In contrast, on NaturalQuestions, FiD is 4 points better than a similar extractive reader when using the top 100 passages in both.8 We hypothesize that the improved performance on single-hop questions is due to the ability of larger pretrained models to more effectively memorize single-hop knowledge about real-world entities.9 Compared to multi-hop questions that involve multiple relations and missing entities, simple questions usually only ask about a certain property of an entity. It is likely that such simple entity-centric information is explicitly mentioned by a single text piece in the pretraining corpus, while the evidence for multihop questions is typically dispersed, making the complete reasoning chain nontrivial to memorize. More analysis on RAG can be found in Appendix A.3.
|
| 142 |
+
|
| 143 |
+
Table 7: Multi-Evidence FEVER Fact Verification Results. Loose-Multi represents the subset that requires multiple evidence sentences. Strict-Multi is a subset of Loose-Multi that require multiple evidence sentences from different documents.
|
| 144 |
+
|
| 145 |
+
<table><tr><td>Method</td><td>Loose-Multi (1,960) LA FEVER</td><td>Strict-Multi (1,059) LA</td><td>FEVER</td></tr><tr><td>GEAR</td><td>66.4</td><td></td><td></td></tr><tr><td>GAT</td><td>66.1</td><td>1 -</td><td>1 =</td></tr><tr><td>KGAT with ESIM rerank</td><td>65.9</td><td>51.5</td><td>7.7</td></tr><tr><td>KGAT with BERT rerank</td><td>65.9</td><td>51.0</td><td>6.2</td></tr><tr><td>Ours + KGAT with BERT rerank</td><td>77.9</td><td>72.1</td><td>16.2</td></tr></table>
|
| 146 |
+
|
| 147 |
+
Inference Efficiency To compare with existing multi-hop QA systems in terms of efficiency, we follow Dhingra et al. (2020) and measure the inference time with 16 CPU cores and batch size 1. We implement our system with a fast approximate nearest neighbor search method, i.e., HNSW (Malkov & Yashunin, 2018), which achieves nearly the same performance as exact search. With an in-memory index, we observe that the retrieval time is negligible compared to the forward pass of large pretrained models. Similarly, for systems that use term-based indices, the BERT calls for passage reranking cause the main efficiency bottleneck. Thus, for systems that do not release the end-to-end code, we estimate the running time based on the number of BERT cross-attention forward passes (the same estimation strategy used by Dhingra et al. (2020)), and ignore the overhead caused by ad
|
| 148 |
+
|
| 149 |
+

|
| 150 |
+
Figure 3: Efficiency-performance trade-off comparison with published HotpotQA systems. The curve is plotted with different number of top $k$ $( k { = } 1 , 5 , 1 0 , 2 0 , 5 0 , 1 0 0 , 2 0 0 )$ passage sequences we feed into the reader model. seq/Q denotes the time required for each query.
|
| 151 |
+
|
| 152 |
+
ditional processing such as TF-IDF or linking graph construction. As shown in Figure 3, our method is about 10 times faster than current state-of-the-art systems while achieving a similar level of performance. Compared to two efficient systems (DrKIT and GoldEn), we achieve over 10 points improvement while only using the top-1 retrieval result for answer and supporting sentence prediction.
|
| 153 |
+
|
| 154 |
+
# 3.3 EXPERIMENTS: MULTI-EVIDENCE FEVER
|
| 155 |
+
|
| 156 |
+
For FEVER claim verification, we reuse the best open-sourced verification system, i.e., KGAT (Liu et al., 2020), to show the benefit of our retrieval approach over existing retrieval methods. We report the results in verification label accuracy (LA) and the FEVER score10 in Table 7, where the numbers of competitive baselines, GEAR (Zhou et al., 2019), graph attention network (GAT) (Velickovi ˇ c´ et al., 2017) and variants of KGAT are from the KGAT (Liu et al., 2020) paper. All these baselines use entity linking for document retrieval, then rerank the sentences of the retrieved documents, and finally use different graph attention mechanisms over the fully-connected sentence graph to predict verification labels. Since some instances in the multi-evidence subset used by previous studies only needs multiple evidence sentences from the same document, we additionally test on a strict multi-hop subset with instances that need multiple documents. As shown by the results, even without finetuning the downstream modules, simply replacing the retrieval component with MDR leads to significant improvements, especially on the strict multi-evidence subset.
|
| 157 |
+
|
| 158 |
+
# 4 RELATED WORK
|
| 159 |
+
|
| 160 |
+
Open-domain QA with Dense Retrieval In contrast to sparse term-index IR methods that are widely used by existing open-domain QA systems (Chen et al., 2017; Wang et al., 2018; Yang et al., 2019), recent systems (Lee et al., 2019; Guu et al., 2020; Karpukhin et al., 2020) typically uses dense passage retrieval techniques that better capture the semantic matching beyond simple n-gram overlaps. To generate powerful dense question and passage representations, these methods either conduct large-scale pretraining with self-supervised tasks that are close to the underlying question-passage matching in retrieval, or directly use the human-labeled question-passage pairs to finetune pretrained masked language models. On single-hop information-seeking QA datasets such as NaturalQuestions (Kwiatkowski et al., 2019) or WebQuestions (Berant et al., 2013), these dense methods have achieved significant improvements over traditional IR methods. Prior to these methods based on pretrained models, Das et al. (2019) use RNN encoder to get dense representations of questions and passages. They also consider an iterative retrieval process and reformulate the query representation based on reader model’s hidden states. However, their method requires an initial round of TF-IDF/BM25 retrieval and a sophisticated RL-based training paradigm to work well. Finally, like the aforementioned methods, only single-hop datasets are considered in their experiments. More akin to our approach, Feldman & El-Yaniv (2019) use a similar recursive dense retrieval formulation for multi-hop QA. In contrast to their biattenional reformulation component applied on top of token query and passage representations, we adopt a more straightforward query reformulation strategy, by simply concatenating the original query and previous retrieval as the inputs to the query encoder. Together with stronger pretrained encoders and more effective training methods (in-batch $^ +$ memory bank negative sampling vs their binary ranking loss), MDR is able to double the accuracy of their system.
|
| 161 |
+
|
| 162 |
+
Query Expansion Techniques in IR As our dense encoder augments the original question with the initial retrieved results to form the updated query representation, our work is also relevant to query expansion techniques (Rocchio, 1971; Voorhees, 1994; Ruthven & Lalmas, 2003) that are widely used in traditional IR systems. In particular, our system is similar in spirit to pseudo-relevance feedback techniques (Croft & Harper, 1979; Cao et al., 2008; Lv & Zhai, 2010), where no additional user interaction is required at the query reformulation stage. Existing studies mainly focus on alleviating the uncertainty of the user query (Collins-Thompson & Callan, 2007) by adding relevant terms from the first round of retrieval, where the retrieval target remains the same throughout the iterative process. In contrast, the query reformulation in our approach aims to follow the multi-hop reasoning chain and effectively retrieves different targets at each step. Furthermore, instead of explicitly selecting terms to expand the query, we simply concatenate the whole passage and rely on the pretrained encoder to choose useful information from the last retrieved passage.
|
| 163 |
+
|
| 164 |
+
Other Multi-hop QA Work Apart from HotpotQA, other multi-hop QA datasets (Welbl et al., 2018; Talmor & Berant, 2018; Zhang et al., 2018) are mostly built from knowledge bases (KBs). Compared to questions in HotpotQA, questions in these datasets are rather synthetic and less diverse. As multi-hop relations in KBs could be mentioned together in a single text piece, these datasets are not designed for an open-domain setting which necessitates multi-hop retrieval. Existing methods on these datasets either retrieve passages from a small passage pool pruned based on the the specific dataset (Sun et al., 2019; Dhingra et al., 2020), or focus on a non-retrieval setting where a compact documents set is already given (De Cao et al., 2018; Zhong et al., 2019; Tu et al., 2019; Beltagy et al., 2020). Compared to these research, our work aims at building an efficient multi-hop retrieval model that easily scales to large real-world corpora that include millions of open-domain documents.
|
| 165 |
+
|
| 166 |
+
# 5 CONCLUSION
|
| 167 |
+
|
| 168 |
+
In this work, we generalized the recently proposed successful dense retrieval methods by extending them to the multi-hop setting. This allowed us to handle complex multi-hop queries with much better accuracy and efficiency than the previous best methods. We demonstrated the versatility of our approach by applying it to two different tasks, using a variety of downstream modules. In addition, the simplicity of the framework and the fact that it does not depend on a corpus-dependent graph structure opens the possibility of applying such multi-hop retrieval methods more easily and broadly cross different domains and settings.
|
| 169 |
+
|
| 170 |
+
# REFERENCES
|
| 171 |
+
|
| 172 |
+
Akari Asai, Kazuma Hashimoto, Hannaneh Hajishirzi, Richard Socher, and Caiming Xiong. Learning to retrieve reasoning paths over wikipedia graph for question answering. In ICLR. OpenReview.net, 2020.
|
| 173 |
+
|
| 174 |
+
Iz Beltagy, Matthew E Peters, and Arman Cohan. Longformer: The long-document transformer. arXiv preprint arXiv:2004.05150, 2020.
|
| 175 |
+
|
| 176 |
+
Jonathan Berant, Andrew Chou, Roy Frostig, and Percy Liang. Semantic parsing on freebase from question-answer pairs. In Proceedings of the 2013 conference on empirical methods in natural language processing, pp. 1533–1544, 2013.
|
| 177 |
+
|
| 178 |
+
Guihong Cao, Jian-Yun Nie, Jianfeng Gao, and Stephen Robertson. Selecting good expansion terms for pseudo-relevance feedback. In Proceedings of the 31st annual international ACM SIGIR conference on Research and development in information retrieval, pp. 243–250, 2008.
|
| 179 |
+
|
| 180 |
+
Danqi Chen, Adam Fisch, Jason Weston, and Antoine Bordes. Reading Wikipedia to answer open-domain questions. In ACL (1), pp. 1870–1879. Association for Computational Linguistics, 2017.
|
| 181 |
+
|
| 182 |
+
Kevin Clark, Minh-Thang Luong, Quoc V. Le, and Christopher D. Manning. ELECTRA: pre-training text encoders as discriminators rather than generators. In ICLR. OpenReview.net, 2020.
|
| 183 |
+
|
| 184 |
+
Kevyn Collins-Thompson and Jamie Callan. Estimation and use of uncertainty in pseudo-relevance feedback. In Proceedings of the 30th annual international ACM SIGIR conference on Research and development in information retrieval, pp. 303–310, 2007.
|
| 185 |
+
|
| 186 |
+
W Bruce Croft and David J Harper. Using probabilistic models of document retrieval without relevance information. Journal of documentation, 1979.
|
| 187 |
+
|
| 188 |
+
Rajarshi Das, Shehzaad Dhuliawala, Manzil Zaheer, and Andrew McCallum. Multi-step retrieverreader interaction for scalable open-domain question answering. arXiv preprint arXiv:1905.05733, 2019.
|
| 189 |
+
|
| 190 |
+
Nicola De Cao, Wilker Aziz, and Ivan Titov. Question answering by reasoning across documents with graph convolutional networks. arXiv preprint arXiv:1808.09920, 2018.
|
| 191 |
+
|
| 192 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: pre-training of deep bidirectional transformers for language understanding. In NAACL-HLT (1), pp. 4171–4186. Association for Computational Linguistics, 2019.
|
| 193 |
+
|
| 194 |
+
Bhuwan Dhingra, Manzil Zaheer, Vidhisha Balachandran, Graham Neubig, Ruslan Salakhutdinov, and William W. Cohen. Differentiable reasoning over a virtual knowledge base. In ICLR. OpenReview.net, 2020.
|
| 195 |
+
|
| 196 |
+
Yuwei Fang, Siqi Sun, Zhe Gan, Rohit Pillai, Shuohang Wang, and Jingjing Liu. Hierarchical graph network for multi-hop question answering. arXiv preprint arXiv:1911.03631, 2019.
|
| 197 |
+
|
| 198 |
+
Yair Feldman and Ran El-Yaniv. Multi-hop paragraph retrieval for open-domain question answering. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 2296–2309, Florence, Italy, July 2019. Association for Computational Linguistics. doi: 10.18653/v1/P19-1222. URL https://www.aclweb.org/anthology/P19-1222.
|
| 199 |
+
|
| 200 |
+
Kelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat, and Ming-Wei Chang. Realm: Retrievalaugmented language model pre-training. arXiv preprint arXiv:2002.08909, 2020.
|
| 201 |
+
|
| 202 |
+
Andreas Hanselowski, Hao Zhang, Zile Li, Daniil Sorokin, Benjamin Schiller, Claudia Schulz, and Iryna Gurevych. Ukp-athene: Multi-sentence textual entailment for claim verification. arXiv preprint arXiv:1809.01479, 2018.
|
| 203 |
+
|
| 204 |
+
Gautier Izacard and Edouard Grave. Leveraging passage retrieval with generative models for open domain question answering. arXiv preprint arXiv:2007.01282, 2020.
|
| 205 |
+
|
| 206 |
+
Jeff Johnson, Matthijs Douze, and Herve J ´ egou. Billion-scale similarity search with gpus. ´ arXiv preprint arXiv:1702.08734, 2017.
|
| 207 |
+
|
| 208 |
+
Vladimir Karpukhin, Barlas Oguz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi ˘ Chen, and Wen-tau Yih. Dense passage retrieval for open-domain question answering. In EMNLP. Association for Computational Linguistics, 2020.
|
| 209 |
+
|
| 210 |
+
Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, et al. Natural questions: a benchmark for question answering research. Transactions of the Association for Computational Linguistics, 7:453–466, 2019.
|
| 211 |
+
|
| 212 |
+
Kenton Lee, Ming-Wei Chang, and Kristina Toutanova. Latent retrieval for weakly supervised open domain question answering. In ACL (1), pp. 6086–6096. Association for Computational Linguistics, 2019.
|
| 213 |
+
|
| 214 |
+
Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. BART: denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. In ACL, pp. 7871–7880. Association for Computational Linguistics, 2020a.
|
| 215 |
+
|
| 216 |
+
Patrick Lewis, Ethan Perez, Aleksandara Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Kuttler, Mike Lewis, Wen-tau Yih, Tim Rockt ¨ aschel, et al. Retrieval-augmented genera- ¨ tion for knowledge-intensive nlp tasks. arXiv preprint arXiv:2005.11401, 2020b.
|
| 217 |
+
|
| 218 |
+
Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692, 2019.
|
| 219 |
+
|
| 220 |
+
Zhenghao Liu, Chenyan Xiong, Maosong Sun, and Zhiyuan Liu. Fine-grained fact verification with kernel graph attention network. In ACL, pp. 7342–7351. Association for Computational Linguistics, 2020.
|
| 221 |
+
|
| 222 |
+
Yuanhua Lv and ChengXiang Zhai. Positional relevance model for pseudo-relevance feedback. In Proceedings of the 33rd international ACM SIGIR conference on Research and development in information retrieval, pp. 579–586, 2010.
|
| 223 |
+
|
| 224 |
+
Yury A Malkov and Dmitry A Yashunin. Efficient and robust approximate nearest neighbor search using hierarchical navigable small world graphs. IEEE transactions on pattern analysis and machine intelligence, 2018.
|
| 225 |
+
|
| 226 |
+
Sewon Min, Victor Zhong, Luke Zettlemoyer, and Hannaneh Hajishirzi. Multi-hop reading comprehension through question decomposition and rescoring. In ACL (1), pp. 6097–6109. Association for Computational Linguistics, 2019.
|
| 227 |
+
|
| 228 |
+
Yixin Nie, Songhe Wang, and Mohit Bansal. Revealing the importance of semantic retrieval for machine reading at scale. In EMNLP/IJCNLP (1), pp. 2553–2566. Association for Computational Linguistics, 2019.
|
| 229 |
+
|
| 230 |
+
Ethan Perez, Patrick Lewis, Wen-tau Yih, Kyunghyun Cho, and Douwe Kiela. Unsupervised question decomposition for question answering. In EMNLP. Association for Computational Linguistics, 2020.
|
| 231 |
+
|
| 232 |
+
Peng Qi, Xiaowen Lin, Leo Mehr, Zijian Wang, and Christopher D. Manning. Answering complex open-domain questions through iterative query generation. In EMNLP/IJCNLP (1), pp. 2590–2602. Association for Computational Linguistics, 2019.
|
| 233 |
+
|
| 234 |
+
Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. arXiv preprint arXiv:1910.10683, 2019.
|
| 235 |
+
|
| 236 |
+
Pranav Rajpurkar, Robin Jia, and Percy Liang. Know what you don’t know: Unanswerable questions for squad. In ACL (2), pp. 784–789. Association for Computational Linguistics, 2018.
|
| 237 |
+
|
| 238 |
+
Adam Roberts, Colin Raffel, and Noam Shazeer. How much knowledge can you pack into the parameters of a language model? arXiv preprint arXiv:2002.08910, 2020.
|
| 239 |
+
|
| 240 |
+
Joseph Rocchio. Relevance feedback in information retrieval. The Smart retrieval system-experiments in automatic document processing, pp. 313–323, 1971.
|
| 241 |
+
|
| 242 |
+
Ian Ruthven and Mounia Lalmas. A survey on the use of relevance feedback for information access systems. Knowledge engineering review, 18(2):95–145, 2003.
|
| 243 |
+
|
| 244 |
+
Haitian Sun, Tania Bedrax-Weiss, and William W Cohen. Pullnet: Open domain question answering with iterative retrieval on knowledge bases and text. arXiv preprint arXiv:1904.09537, 2019.
|
| 245 |
+
|
| 246 |
+
Alon Talmor and Jonathan Berant. The web as a knowledge-base for answering complex questions. In NAACL-HLT, pp. 641–651. Association for Computational Linguistics, 2018.
|
| 247 |
+
|
| 248 |
+
James Thorne, Andreas Vlachos, Christos Christodoulopoulos, and Arpit Mittal. FEVER: a largescale dataset for fact extraction and verification. In NAACL-HLT, pp. 809–819. Association for Computational Linguistics, 2018.
|
| 249 |
+
|
| 250 |
+
Ming Tu, Guangtao Wang, Jing Huang, Yun Tang, Xiaodong He, and Bowen Zhou. Multi-hop reading comprehension across multiple documents by reasoning over heterogeneous graphs. arXiv preprint arXiv:1905.07374, 2019.
|
| 251 |
+
|
| 252 |
+
Petar Velickovi ˇ c, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Lio, and Yoshua ´ Bengio. Graph attention networks. arXiv preprint arXiv:1710.10903, 2017.
|
| 253 |
+
|
| 254 |
+
Ellen M Voorhees. Query expansion using lexical-semantic relations. In SIGIR’94, pp. 61–69. Springer, 1994.
|
| 255 |
+
|
| 256 |
+
Shuohang Wang, Mo Yu, Xiaoxiao Guo, Zhiguo Wang, Tim Klinger, Wei Zhang, Shiyu Chang, Gerry Tesauro, Bowen Zhou, and Jing Jiang. $\mathrm { R } ^ { \bar { 3 } }$ : Reinforced ranker-reader for open-domain question answering. In AAAI, pp. 5981–5988. AAAI Press, 2018.
|
| 257 |
+
|
| 258 |
+
Johannes Welbl, Pontus Stenetorp, and Sebastian Riedel. Constructing datasets for multi-hop reading comprehension across documents. Trans. Assoc. Comput. Linguistics, 6:287–302, 2018.
|
| 259 |
+
|
| 260 |
+
Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Remi Louf, Morgan Funtowicz, et al. Huggingface’s transformers: ´ State-of-the-art natural language processing. ArXiv, pp. arXiv–1910, 2019.
|
| 261 |
+
|
| 262 |
+
Tomer Wolfson, Mor Geva, Ankit Gupta, Yoav Goldberg, Matt Gardner, Daniel Deutch, and Jonathan Berant. Break it down: A question understanding benchmark. Trans. Assoc. Comput. Linguistics, 8:183–198, 2020.
|
| 263 |
+
|
| 264 |
+
Ledell Wu, Fabio Petroni, Martin Josifoski, Sebastian Riedel, and Luke Zettlemoyer. Zero-shot entity linking with dense entity retrieval. arXiv preprint arXiv:1911.03814, 2019.
|
| 265 |
+
|
| 266 |
+
Zhirong Wu, Yuanjun Xiong, Stella X. Yu, and Dahua Lin. Unsupervised feature learning via non-parametric instance discrimination. In CVPR, pp. 3733–3742. IEEE Computer Society, 2018.
|
| 267 |
+
|
| 268 |
+
Wei Yang, Yuqing Xie, Aileen Lin, Xingyu Li, Luchen Tan, Kun Xiong, Ming Li, and Jimmy Lin. End-to-end open-domain question answering with bertserini. arXiv preprint arXiv:1902.01718, 2019.
|
| 269 |
+
|
| 270 |
+
Zhilin Yang, Peng Qi, Saizheng Zhang, Yoshua Bengio, William W. Cohen, Ruslan Salakhutdinov, and Christopher D. Manning. Hotpotqa: A dataset for diverse, explainable multi-hop question answering. In EMNLP, pp. 2369–2380. Association for Computational Linguistics, 2018.
|
| 271 |
+
|
| 272 |
+
Yuyu Zhang, Hanjun Dai, Zornitsa Kozareva, Alexander J. Smola, and Le Song. Variational reasoning for question answering with knowledge graph. In AAAI, pp. 6069–6076. AAAI Press, 2018.
|
| 273 |
+
|
| 274 |
+
Chen Zhao, Chenyan Xiong, Corby Rosset, Xia Song, Paul N. Bennett, and Saurabh Tiwary. Transformer-xh: Multi-evidence reasoning with extra hop attention. In ICLR. OpenReview.net, 2020.
|
| 275 |
+
|
| 276 |
+
Victor Zhong, Caiming Xiong, Nitish Shirish Keskar, and Richard Socher. Coarse-grain fine-grain coattention network for multi-evidence question answering. arXiv preprint arXiv:1901.00603, 2019.
|
| 277 |
+
|
| 278 |
+
Jie Zhou, Xu Han, Cheng Yang, Zhiyuan Liu, Lifeng Wang, Changcheng Li, and Maosong Sun. GEAR: graph-based evidence aggregating and reasoning for fact verification. In ACL (1), pp. 892–901. Association for Computational Linguistics, 2019.
|
| 279 |
+
|
| 280 |
+
# A QUALITATIVE ANALYSIS
|
| 281 |
+
|
| 282 |
+
# A.1 FALSE BRIDGE QUESTION ERROR CASES
|
| 283 |
+
|
| 284 |
+
As mentioned in $\ S 3 . 1 . 3$ , half of the errors of bridge questions are not real errors. In Table 8, we can see that the model predicts alternative passage sequences that could also be used to answer the questions.
|
| 285 |
+
|
| 286 |
+
# Predicted:
|
| 287 |
+
|
| 288 |
+
1. Museum of Human Beings: Museum of Human Beings, included in the National American Indian Heritage Month Booklist, November 2012 and 2013 is a novel written by Colin Sargent, which delves into the heart-rending life of Jean-Baptiste Charbonneau, the son of Sacagawea. Sacagawea was the Native American guide, who at 16 led the Lewis and Clark expedition.
|
| 289 |
+
|
| 290 |
+
2. Jean Baptiste Charbonneau: Jean Baptiste Charbonneau (February 11, 1805 – May 16, 1866) was an American Indian explorer, guide, fur trapper trader, military scout during the MexicanAmerican War, ”alcalde” (mayor) of Mission San Luis Rey de Francia and a gold prospector and hotel operator in Northern California. He spoke French and English, and learned German and Spanish during his six years in Europe from 1823 to 1829. He spoke Shoshone, his mother tongue, and other western American Indian languages...
|
| 291 |
+
|
| 292 |
+
Q: Altnahinch is located in a county that has a population density of how many per square mile? Ground-truth SP Passage Titles: Altnahinch Dam; County Antrim
|
| 293 |
+
|
| 294 |
+
# Predicted:
|
| 295 |
+
|
| 296 |
+
1. Altnahinch: Altnahinch is a townland in County Antrim, Northern Ireland.
|
| 297 |
+
|
| 298 |
+
2. County Antrim: County Antrim (named after the town of Antrim, from Irish: ”Aontroim” , meaning ”lone ridge” , )) is one of six counties that form Northern Ireland. Adjoined to the north-east shore of Lough Neagh, the county covers an area of $3 0 4 6 \mathrm { k m } 2$ and has a population of about 618,000. County Antrim has a population density of 203 people per square kilometer / 526 people per square mile...
|
| 299 |
+
|
| 300 |
+
Q: What foundation do scholars give for the likelihood of collaboration on a William Shakespeare Play written between 1588 and 1593?
|
| 301 |
+
|
| 302 |
+
# Ground-truth SP Passage Titles:
|
| 303 |
+
|
| 304 |
+
Authorship of Titus Andronicus, William Shakespeare’s collaborations
|
| 305 |
+
|
| 306 |
+
# Predicted:
|
| 307 |
+
|
| 308 |
+
1. Titus Andronicus: Titus Andronicus is a tragedy by William Shakespeare, believed to have been written between 1588 and 1593, probably in collaboration with George Peele. It is thought to be Shakespeare’s first tragedy, and is often seen as his attempt to emulate the violent and bloody revenge plays of his contemporaries, which were extremely popular with audiences throughout the 16th century.
|
| 309 |
+
|
| 310 |
+
2. William Shakespeare’s collaborations: Like most playwrights of his period, William Shakespeare did not always write alone... Some of the following attributions, such as ”The Two Noble Kinsmen”, have well-attested contemporary documentation; others, such as ”Titus Andronicus”, are dependent on linguistic analysis by modern scholars...
|
| 311 |
+
|
| 312 |
+
Q: Zach Parise’s father played in which league?
|
| 313 |
+
|
| 314 |
+
Ground-truth SP Passage Titles: Jordan Parise; Zach Parise
|
| 315 |
+
|
| 316 |
+
# Predicted:
|
| 317 |
+
|
| 318 |
+
1. Zach Parise: Zachary Justin Parise (born July 28, 1984) is an American professional ice hockey left winger who is currently serving as an alternate captain for the Minnesota Wild in the National Hockey League (NHL). He has also played for the New Jersey Devils, where he served as team captain and led the team to the 2012 Stanley Cup Finals. Parise’s father, J. P. Parise... ´ 2. J. P. Parise´: Jean-Paul Joseph-Louis Parise (December 11, 1941 – January 7, 2015) was a ´ Canadian professional ice hockey coach and player. Parise played in the National Hockey League (NHL), most notably for the Minnesota North Stars and the New York Islanders.
|
| 319 |
+
|
| 320 |
+
<table><tr><td>Table 9: Sampled retrieval errors (marked in red) only made by the decomposed system. These errors could be potentially avoided if the model has access to the full information in the original question or previous hop results. The important clue for correctly retrieving the documents or avoiding errors is marked in blue. Once decomposed,the marked information are not longer available in one of the decomposed retrieval hop. Multi-hop Question: What is the birthday of the author of "She Walks These Hills"?</td></tr><tr><td>Decomposed Questions: 1.Who is the author of She Walks These Hills? 2. What is the birthday of Sharyn McCrumb? Ground-truth SP Passages: She Walks These Hills: She Walks These Hills is a book written by Sharyn McCrumb and published by Charles Scribner's Sons in 1994, which later went on to win the Anthony Award for Best Novel in 1995. Sharyn McCrumb: Sharyn McCrumb (born February 26,1948) is an American writer whose books celebrate the history and folklore of Appalachia.McCrumb is the winner of numerous</td></tr><tr><td>literary awards... Decomposed Error Case: 1. She Walks These Hills (√) 2. Tané McClure: Tané M. McClure (born June 8, 1958) is an American singer and actress.</td></tr><tr><td>Multi-hop Question: When was the album with the song Unbelievable by American rapper The Notorious B.I.G released? Decomposed Questions: 1. What is the album with the song Unbelievable by American rapper The Notorious B.I.G?</td></tr><tr><td>2.When was the album Ready to Die released? Ground-truth SP Passages: Unbelievable (The Notorious B.I.G. song): Unbelievable is a song by American rapper The Notorious B.I.G., recorded for his debut studio album Ready to Die... Ready to Die: Ready to Die is the debut studio album by American rapper The Notorious B.I.G.; it was released on September 13,1994,by Bad Boy Records and Arista Records.. Decomposed Error Case: 1.Unbelievable (The Notorious B.I.G. song) (√)</td></tr><tr><td>2. Ready to Die (The Stooges album): Ready to Die is the fifth and final studio album by Amer- ican rock band Iggy and the Stooges. The album was released on April 30, 2013... Multi-hop Question: Whose death dramatized in a stage play helped end the death penalty in Australia? Decomposed Questions: 1. What is the stage play that helped end the death penalty in Australia?</td></tr><tr><td>2. Whose death was dramatized in Remember Ronald Ryan? Ground-truth SP Passages: Barry Dickins: Barry Dickins (born 1949) is a prolific Australian playwright, author, artist, actor, educator and journalist.. His most well-known work is the award winning stage play "Remember Ronald Ryan”,a dramatization of the life and subsequent death of Ronald Ryan, the last man executed in Australia... Ronald Ryan: Ronald Joseph Ryan (21 February 1925-3 February 1967) was the last person to</td></tr></table>
|
| 321 |
+
|
| 322 |
+
# A.3 EXTRACTIVE & GENERATIVE READER MODEL
|
| 323 |
+
|
| 324 |
+
Table 6 demonstrates the answer prediction performance for four different reader models. The extractive models predict answers given the top 250 retrieved passage sequences (pairs of passage from hop1 and hop2). Since generative models are generally heavier on the computation side, we can only use fewer passages. Besides the observations alredy discussed in $\ S 3 . 2 . 1$ , we hypothesize the worse performance of multi-hop RAG compared to FiD is partially due to the smaller pretrained model used in RAG, i.e., BART is only half the size of T5-large. Also, as RAG back-propagate the gradients to the query encoder, it needs more memory footprint and can only take in fewer retrieved contexts. Our RAG implementation largely follows the implementation of the original paper and we did not use the PyTorch checkpoint (as used by FiD) to trade computation for memory. We conjecture the multi-hop RAG performance will also improve if we augment the current implementation with memory-saving tricks. However, given the same amount of context and read model size, the multi-hop RAG is still worse than the extractive ELECTRA reader, i.e., with only the top 1 retrieved passage sequence, our ELECTRA reader gets $5 3 . 8 \mathrm { E M }$ compared to the 51.2 answer EM achieved by multi-hop RAG when using more context.
|
| 325 |
+
|
| 326 |
+
Table 10: Answer EM using top 50 retrieved passage chains
|
| 327 |
+
|
| 328 |
+
<table><tr><td>Model</td><td>Overall</td><td>Comp (20%)</td><td>Bridge (80%)</td></tr><tr><td>ELECTRA</td><td>61.7</td><td>79.0</td><td>57.4</td></tr><tr><td>FiD</td><td>61.7</td><td>75.3</td><td>58.3</td></tr></table>
|
| 329 |
+
|
| 330 |
+
Given the same number of retrieved passage sequences (top 50) as shown in table 10, FiD obtains similar performance to ELECTRA, despite that the generative model can generate arbitrary answers for the given input. (We tried constrained decoding for the generative model. However, no significant performance improvements were observed, indicating that the errors from the generative model are not due to the free-form generation task.) Further question type analysis in HotpotQA showed that the main difference comes from the comparison type of question, while for bridge question, FiD performs slightly better than ELECTRA. This finding might indicate that for generation models, numerical comparison is still a bigger issue compared to extractive models.
|
| 331 |
+
|
| 332 |
+
# B MODEL DETAILS
|
| 333 |
+
|
| 334 |
+
# B.1 BEST MODEL HYPERPARAMETERS
|
| 335 |
+
|
| 336 |
+
Table 11: Hyperparameters of Retriever
|
| 337 |
+
|
| 338 |
+
<table><tr><td>learning rate batch size maximum passage length maximum query length at initial hop maximum query length at 2nd hop</td><td>2e-5 150 300 70 350</td></tr><tr><td>warmup ratio gradient clipping norm</td><td>0.1 2.0</td></tr><tr><td>traininig epoch weight decay</td><td>50 0</td></tr></table>
|
| 339 |
+
|
| 340 |
+
Table 12: Hyperparameters of Extractive Reader (ELECTRA)
|
| 341 |
+
|
| 342 |
+
<table><tr><td>learning rate batch size</td><td>5e-5 128</td></tr><tr><td>maximum sequence length maximum answer length</td><td>512 30</td></tr><tr><td>Warmup ratio</td><td>0.1</td></tr><tr><td>gradient clipping norm</td><td>2.0</td></tr><tr><td>traininig epoch weight decay</td><td>7</td></tr><tr><td></td><td>0</td></tr><tr><td># of negative context per question weight of SP sentence prediction loss</td><td>5 0.025</td></tr></table>
|
| 343 |
+
|
| 344 |
+
# B.2 FURTHER DETAILS ABOUT READER MODELS
|
| 345 |
+
|
| 346 |
+
# B.2.1 EXTRACTIVE READER
|
| 347 |
+
|
| 348 |
+
The extractive reader is trained with four loss functions. With the [CLS] token, we predict a reranking score based on whether the passage sequence match the groundtruth supporting passages. On top of the representation of each token, we predict a answer start score and answer end score. Finally, we prepend each sentence with the [unused0] special token and predict whether the sentence is one of the supporting sentences using the representations of the special token. At training time, we pair each question with 1 groundtruth passage sequence and 5 negative passage sequence which do not contain the answer. At inference time, we feed in the top 250 passage sequences from MDR. We rank the predicted answer for each sequence with a linear combination of the reranking score and the answer span score. The combination weight is selected based on the dev results.
|
| 349 |
+
|
| 350 |
+
# B.2.2 FUSION-IN-DECODER
|
| 351 |
+
|
| 352 |
+
The FiD model uses T5-large as the underlying seq2seq model. It is twice as large as the extractive models and has 770M parameters. We reuse the hyperparameters as described in Izacard & Grave (2020). The original FiD uses the top 100 passages for NaturalQuestions. In our case, we use the top 50 retrieved passage sequences and concatenate the passages in each sequence before feeding into T5. In order to fit this model into GPU, we make use of PyTorch checkpoint 11 for training.
|
| 353 |
+
|
| 354 |
+
# B.2.3 MULTI-HOP RAG
|
| 355 |
+
|
| 356 |
+
The RAG model aims to generate answer $y$ given question $x$ and the retrieved documents $z$ . Similarly, the goal of multi-hop RAG can be expressed as: generate answer $y$ given question $x$ and retrieved documents in hop one $z _ { 1 }$ and hop two $z _ { 2 }$ (Limiting to two hops for HotpotQA). The model has three components:
|
| 357 |
+
|
| 358 |
+
• Hop-one retriever $p _ { \eta _ { 1 } } ( z _ { 1 } | x )$ with parameter $\eta _ { 1 }$ to represent the retrieved top- $\mathbf { \nabla } \cdot \mathbf { k }$ passage distribution (top-k truncated distribution) given the input question $x$ .
|
| 359 |
+
• Hop-two retriever $p _ { \eta _ { 2 } } ( z _ { 2 } | x , z _ { 1 } )$ with parameter $\eta _ { 2 }$ to represent the hop-two retrieved top- $\mathbf { \nabla } \cdot \mathbf { k }$ passage distribution given not only the question $x$ but also the retrieved document $z _ { 1 }$ from hop-one.
|
| 360 |
+
• A generator $p _ { \theta } ( y _ { i } | x , z _ { 1 } , z _ { 2 } , , y _ { 1 : i - 1 } )$ to represent the next token distribution given input question $x$ , hop-one retrieved document $z _ { 1 }$ , hop-two retrieved document $z _ { 2 }$ and previous predicted token $y _ { 1 : i - 1 }$ parametrized by $\theta$
|
| 361 |
+
|
| 362 |
+
Multi-Hop RAG Sequence Model As the RAG Sequence model, this model generates the answer sequence given the fixed set of documents from hop-one retriever and hop-two retriever. In order to the get the probability of the generated sequence, we marginalize through the two latent variables corresponding to the two retrieval hops:
|
| 363 |
+
|
| 364 |
+
$$
|
| 365 |
+
\begin{array} { l } { { \displaystyle p _ { s e q u e n c e } ( y | x ) = } } \\ { { \displaystyle \sum _ { z _ { 1 } } p _ { \eta _ { 1 } } ( z _ { 1 } | x ) \sum _ { z _ { 2 } } p _ { \eta _ { 2 } } ( z _ { 2 } | x , z _ { 1 } ) \prod _ { i } ^ { N } p _ { \theta } ( y _ { i } | x , z _ { 1 } , z _ { 2 } , y _ { 1 : i - 1 } ) } } \\ { { \displaystyle \sum _ { z _ { 1 } } \sum _ { z _ { 2 } } p _ { \eta _ { 1 } } ( z _ { 1 } | x ) p _ { \eta _ { 2 } } ( z _ { 2 } | x , z _ { 1 } ) \prod _ { i } ^ { N } p _ { \theta } ( y _ { i } | x , z _ { 1 } , z _ { 2 } , y _ { 1 : i - 1 } ) } } \end{array}
|
| 366 |
+
$$
|
| 367 |
+
|
| 368 |
+
where $z _ { 1 }$ and $z _ { 2 }$ are top $\mathrm { k }$ document from the respective retrieval modules.
|
| 369 |
+
|
| 370 |
+
Multi-Hop RAG Token Model Moreover, the model can make predictions based on different passage extracted at each token.
|
| 371 |
+
|
| 372 |
+
$$
|
| 373 |
+
\begin{array} { l } { { \displaystyle p _ { t o k e n } ( y | x ) = } } \\ { { \displaystyle \prod _ { i } ^ { N } \sum _ { z _ { 1 } } \sum _ { z _ { 2 } } p _ { \eta _ { 1 } } ( z _ { 1 } | x ) p _ { \eta _ { 2 } } ( z _ { 2 } | x , z _ { 1 } ) p _ { \theta } ( y _ { i } | x , z _ { 1 } , z _ { 2 } , y _ { 1 : i - 1 } ) } } \end{array}
|
| 374 |
+
$$
|
| 375 |
+
|
| 376 |
+
The predicted probability for each token is the following
|
| 377 |
+
|
| 378 |
+
$$
|
| 379 |
+
\begin{array} { l } { \displaystyle p _ { t o k e n } ( y _ { i } | ( x , y _ { j } ) ) = } \\ { \displaystyle \sum _ { z _ { 1 } } \sum _ { z _ { 2 } } p _ { \eta _ { 1 } } ( z _ { 1 } | x ) p _ { \eta _ { 2 } } ( z _ { 2 } | x , z _ { 1 } ) p _ { \theta } ( y _ { i } | x , z _ { 1 } , z _ { 2 } , y _ { 1 : i - 1 } ) } \end{array}
|
| 380 |
+
$$
|
| 381 |
+
|
| 382 |
+
# C RETRIEVAL-FREE APPROACHES
|
| 383 |
+
|
| 384 |
+
Inspired by a recent work (Roberts et al., 2020) that trains the T5 seq2seq model to directly decode answers from questions (retrieval-free), we conduct similar experiments on HotpotQA using BART (Lewis et al., 2020a). As shown in Figure 4, the performance gap between retrieval-based methods and retrieval-free methods on multi-hop QA is much larger than the gap in the case of simple single-hop questions.
|
| 385 |
+
|
| 386 |
+

|
| 387 |
+
Figure 4: Performance gap between retrieval-free and retrieval-based methods on different QA datasets.
|
| 388 |
+
|
| 389 |
+
# D A UNIFIED QA RETRIEVAL SYSTEM
|
| 390 |
+
|
| 391 |
+
In practice, when a fixed text corpus is given for open-domain systems, we do not know beforehand whether the incoming questions require single or multiple text evidence. Thus, it is essential to build a unified system that adaptively retrieves for multiple hops. Due to the simplicity of the approach, our method can easily be extended in the unified setup. To the best of our knowledge, only (Asai et al., 2020) test the same retrieval method on both single and multi-hop questions but with separate trained models. Here we take a further step and explore the possibility of using a single retrieval model for both types of questions.
|
| 392 |
+
|
| 393 |
+
To enable adaptive retrieval, we add a binary prediction head on top of the question encoder. Once the retriever finishes the 1-hop retrieval, it encodes concatenation of $q$ and $p _ { 1 }$ and predicts whether to stop retrieval using the final hidden state of the first token. We construct this unified setting with NaturalQuestions-Open (Lee et al., 2019) (NQ) as single-hop and HotpotQA as multi-hop. As the two datasets use different corpora, we merge the two12 for easy comparison. As baselines, we use the retrieval models trained only on the respective dataset. For HotpotQA, the baseline is the best multi-hop retrieval model discussed in the main text. For NQ, we follow the training method in DPR (Karpukhin et al., 2020), but with a shared question and passage encoder, which achieves stronger results. As the NQ corpus includes multiple passages of the same document and the HotpotQA corpus only uses the introduction passage, we are not able to compute the strict title-based support passage recall for HotpotQA as in $\ S 3 . 2$ . Thus, we only evaluate answer recall. Results are in Table 13. In contrast to existing studies that train different models for each dataset, we show that a unified dense retrieval model can maintain competitive performance on both, despite the vastly different nature of both datasets. Note that the information-seeking questions in NQ is usually noisier and more ambiguous, while HotpotQA questions are more complicated and contains more lexical overlaps with the evidence passages. Specifically, for NQ, the unified retrieval model achieves very similar performance as the single-dataset DPR model, while the performance on HotpotQA decreases more. We conjecture that this is because the information-seeking questions in NQ cover more diverse patterns, and the added HotpotQA training questions do not cause a dramatic distribution shift from the NQ test data. We leave the development of a more general retrieval system that handles different styles of questions to future work.
|
| 394 |
+
|
| 395 |
+
Table 13: Comparing the unified retrieval model with models specifically trained for each task. We test the retrieval performance with a single merged corpus. For easy comparison, all three models are based on BERT-base encoder which we find achieves stronger performance than RoBERTa-base on NQ. AR $@ \mathrm { K }$ denotes answer recall at top-K retrieved passage sequences.
|
| 396 |
+
|
| 397 |
+
<table><tr><td rowspan="2">Model</td><td colspan="2">NQ</td><td colspan="2">HotpotQA</td></tr><tr><td>AR@20</td><td>AR@100</td><td>AR@20</td><td>AR@100</td></tr><tr><td rowspan="2">single-hop only</td><td>80.7</td><td>87.3</td><td>-</td><td>1</td></tr><tr><td>=</td><td>-</td><td>83.4</td><td>89.4</td></tr><tr><td>multi-hop only unified</td><td>79.5</td><td>86.1</td><td>78.1</td><td>83.0</td></tr></table>
|
md/train/H1sUHgb0Z/H1sUHgb0Z.md
ADDED
|
@@ -0,0 +1,392 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LEARNING FROM NOISY SINGLY-LABELED DATA
|
| 2 |
+
|
| 3 |
+
Ashish Khetan
|
| 4 |
+
University of Illinois at Urbana-Champaign
|
| 5 |
+
Urbana, IL 61801
|
| 6 |
+
khetan2@illinois.edu
|
| 7 |
+
|
| 8 |
+
Zachary C. Lipton Amazon Web Services Seattle, WA 98101 liptoz@amazon.com
|
| 9 |
+
|
| 10 |
+
Animashree Anandkumar Amazon Web Services Seattle, WA 98101 anima@amazon.com
|
| 11 |
+
|
| 12 |
+
# ABSTRACT
|
| 13 |
+
|
| 14 |
+
Supervised learning depends on annotated examples, which are taken to be the ground truth. But these labels often come from noisy crowdsourcing platforms, like Amazon Mechanical Turk. Practitioners typically collect multiple labels per example and aggregate the results to mitigate noise (the classic crowdsourcing problem). Given a fixed annotation budget and unlimited unlabeled data, redundant annotation comes at the expense of fewer labeled examples. This raises two fundamental questions: (1) How can we best learn from noisy workers? (2) How should we allocate our labeling budget to maximize the performance of a classifier? We propose a new algorithm for jointly modeling labels and worker quality from noisy crowd-sourced data. The alternating minimization proceeds in rounds, estimating worker quality from disagreement with the current model and then updating the model by optimizing a loss function that accounts for the current estimate of worker quality. Unlike previous approaches, even with only one annotation per example, our algorithm can estimate worker quality. We establish a generalization error bound for models learned with our algorithm and establish theoretically that it’s better to label many examples once (vs less multiply) when worker quality exceeds a threshold. Experiments conducted on both ImageNet (with simulated noisy workers) and MS-COCO (using the real crowdsourced labels) confirm our algorithm’s benefits.
|
| 15 |
+
|
| 16 |
+
# 1 INTRODUCTION
|
| 17 |
+
|
| 18 |
+
Recent advances in supervised learning owe, in part, to the availability of large annotated datasets. For instance, the performance of modern image classifiers saturates only with millions of labeled examples. This poses an economic problem: Assembling such datasets typically requires the labor of human annotators. If we confined the labor pool to experts, this work might be prohibitively expensive. Therefore, most practitioners turn to crowdsourcing platforms such as Amazon Mechanical Turk (AMT), which connect employers with low-skilled workers who perform simple tasks, such as classifying images, at low cost.
|
| 19 |
+
|
| 20 |
+
Compared to experts, crowd-workers provide noisier annotations, possibly owing to high variation in worker skill; and a per-answer compensation structure that encourages rapid answers, even at the expense of accuracy. To address variation in worker skill, practitioners typically collect multiple independent labels for each training example from different workers. In practice, these labels are often aggregated by applying a simple majority vote. Academics have proposed many efficient algorithms for estimating the ground truth from noisy annotations. Research addressing the crowd-sourcing problem goes back to the early 1970s. Dawid & Skene (1979) proposed a probabilistic model to jointly estimate worker skills and ground truth labels and used expectation maximization (EM) to estimate the parameters. Whitehill et al. (2009); Welinder et al. (2010); Zhou et al. (2015) proposed generalizations of the Dawid-Skene model, e.g. by estimating the difficulty of each example.
|
| 21 |
+
|
| 22 |
+
Although the downstream goal of many crowdsourcing projects is to train supervised learning models, research in the two disciplines tends to proceed in isolation. Crowdsourcing research seldom accounts for the downstream utility of the produced annotations as training data in machine learning (ML) algorithms. And ML research seldom exploits the noisy labels collected from multiple human workers. A few recent papers use the original noisy labels and the corresponding worker identities together with the predictions of a supervised learning model trained on those same labels, to estimate the ground truth (Branson et al., 2017; Guan et al., 2017; Welinder et al., 2010). However, these papers do not realize the full potential of combining modeling and crowd-sourcing. In particular, they are unable to estimate worker qualities when there is only one label per training example.
|
| 23 |
+
|
| 24 |
+
This paper presents a new supervised learning algorithm that alternately models the labels and worker quality. The EM algorithm bootstraps itself in the following way: Given a trained model, the algorithm estimates worker qualities using the disagreement between workers and the current predictions of the learning algorithm. Given estimated worker qualities, our algorithm optimizes a suitably modified loss function. We show that accurate estimates of worker quality can be obtained even when only collecting one label per example provided that each worker labels sufficiently many examples. An accurate estimate of the worker qualities leads to learning a better model. This addresses a shortcoming of the prior work and overcomes a significant hurdle to achieving practical crowdsourcing without redundancy.
|
| 25 |
+
|
| 26 |
+
We give theoretical guarantees on the performance of our algorithm. We analyze the two alternating steps: (a) estimating worker qualities from disagreement with the model, (b) learning a model by optimizing the modified loss function. We obtain a bound on the accuracy of the estimated worker qualities and the generalization error of the model. Through the generalization error bound, we establish that it is better to label many examples once than to label less examples multiply when worker quality is above a threshold. Empirically, we verify our approach on several multi-class classification datasets: ImageNet and CIFAR10 (with simulated noisy workers), and MS-COCO (using the real noisy annotator labels). Our experiments validate that when the cost of obtaining unlabeled examples is negligible and the total annotation budget is fixed, it is best to collect a single label per training example for as many examples as possible. We emphasize that although this paper applies our approach to classification problems, the main ideas of the algorithm can be extended to other tasks in supervised learning.
|
| 27 |
+
|
| 28 |
+
# 2 RELATED WORK
|
| 29 |
+
|
| 30 |
+
The traditional crowdsourcing problem addresses the challenge of aggregating multiple noisy labels. A naive approach is to aggregate the labels based on majority voting. More sophisticated agreementbased algorithms jointly model worker skills and ground truth labels, estimating both using EM or similar techniques (Dawid & Skene, 1979; Jin & Ghahramani, 2003; Whitehill et al., 2009; Welinder et al., 2010; Zhou et al., 2012; Liu et al., 2012; Dalvi et al., 2013; Liu et al., 2012). Zhang et al. (2014) shows that the EM algorithm with spectral initialization achieves minimax optimal performance under the Dawid-Skene model. Karger et al. (2014) introduces a message-passing algorithm for estimating binary labels under the Dawid-Skene model, showing that it performs strictly better than majority voting when the number of labels per example exceeds some threshold. Similar observations are made by (Bragg et al., 2016). A primary criticism of EM-based approaches is that in practice, it’s rare to collect more than 3 to 5 labels per example; and with so little redundancy, the small gains achieved by EM over majority voting are not compelling to practitioners. In contrast, our algorithm performs well in the low-redundancy setting. Even with just one label per example, we can accurately estimate worker quality.
|
| 31 |
+
|
| 32 |
+
Several prior crowdsourcing papers incorporate the predictions of a supervised learning model, together with the noisy labels, to estimate the ground truth labels. Welinder et al. (2010) consider binary classification and frames the problem as a generative Bayesian model on the features of the examples and the labels. Branson et al. (2017) consider a generalization of the Dawid-Skene model and estimate its parameters using supervised learning in the loop. In particular, they consider a joint probability over observed image features, ground truth labels, and the worker labels and compute the maximum likelihood estimate of the true labels using alternating minimization. We also consider a joint probability model but it is significantly different from theirs as we assume that the optimal labeling function gives the ground truth labels. We maximize the joint likelihood using a variation of expectation maximization to learn the optimal labeling function and the true labels. Further, they train the supervised learning model using the intermediate predictions of the labels whereas we train the model by minimizing a weighted loss function where the weights are the intermediate posterior probability distribution of the labels. Moreover, with only one label per example, their algorithm fails and estimates all the workers to be equally good. They only consider binary classification, whereas we verify our algorithm on multi-class (ten classes) classification problem.
|
| 33 |
+
|
| 34 |
+
A rich body of work addresses human-in-loop annotation for computer vision tasks. However, these works assume that humans are experts, i.e., that they give noiseless annotations (Branson et al., 2010; Deng et al., 2013; Wah et al., 2011). We assume workers are unreliable and have varying skills. A recent work by Ratner et al. (2016) also proposes to use predictions of a supervised learning model to estimate the ground truth. However, their algorithm is significantly different than ours as it does not use iterative estimation technique, and their approach of incorporating worker quality parameters in the supervised learning model is different. Their theoretical results are limited to the linear classifiers.
|
| 35 |
+
|
| 36 |
+
Another line of work employs active learning, iteratively filtering out examples for which aggregated labels have high confidence and collect additional labels for the remaining examples (Whitehill et al., 2009; Welinder & Perona, 2010; Khetan & Oh, 2016). The underlying modeling assumption in these papers is that the questions have varying levels of difficulty. At each iteration, these approaches employ an EM-based algorithm to estimate the ground truth label of the remaining unclassified examples. For simplicity, our paper does not address example difficulties, but we could easily extend our model and algorithm to accommodate this complexity.
|
| 37 |
+
|
| 38 |
+
Several papers analyze whether repeated labeling is useful. Sheng et al. (2008) analyzed the effect of repeated labeling and showed that it depends upon the relative cost of getting an unlabeled example and the cost of labeling. Ipeirotis et al. (2014) shows that if worker quality is below a threshold then repeated labeling is useful, otherwise not. Lin et al. (2014a; 2016) argues that it also depends upon expressiveness of the classifier in addition to the factors considered by others. However, these works do not exploit predictions of the supervised learning algorithm to estimate the ground truth labels, and hence their findings do not extend to our methodology.
|
| 39 |
+
|
| 40 |
+
Another body of work that is relevant to our problem is learning with noisy labels where usual assumption is that all the labels are generated through the same noisy rate given their ground truth label. Recently Natarajan et al. (2013) proposed a generic unbiased loss function for binary classification with noisy labels. They employed a modified loss function that can be expressed as a weighted sum of the original loss function, and gave theoretical bounds on the performance. However, their weights become unstably large when the noise rate is large, and hence the weights need to be tuned. Sukhbaatar et al. (2014); Jindal et al. (2016) learns noise rate as parameters of the model. A recent work by Guan et al. (2017) trains an individual softmax layer for each expert and then predicts their weighted sum where weights are also learned by the model. It is not scalable to crowdsourcing scenario where there are thousands of workers. There are works that aim to create noise-robust models (Joulin et al., 2016; Krause et al., 2016), but they are not relevant to our work.
|
| 41 |
+
|
| 42 |
+
# 3 PROBLEM FORMULATION
|
| 43 |
+
|
| 44 |
+
Let $\mathcal { D }$ be the underlying true distribution generating pairs $( X , Y ) \in { \mathcal { X } } \times { \mathcal { K } }$ from which $n$ i.i.d. samples $( X _ { 1 } , Y _ { 1 } ) , ( X _ { 2 } , Y _ { 2 } ) , \cdot \cdot \cdot , ( X _ { n } , Y _ { n } )$ are drawn, where $\kappa$ denotes the set of possible labels ${ \mathcal { K } } : = \{ 1 , 2 , \cdots , K \}$ , and $\mathcal { X } \subseteq \mathbb { R } ^ { d }$ denotes the set of euclidean features. We denote the marginal distribution of $Y$ by $\{ q _ { 1 } , q _ { 2 } , \cdots , q _ { K } \}$ , which is unknown to us. Consider a pool of $m$ workers indexed by $1 , 2 , \cdots , m$ . We use $[ m ]$ to denote the set $\{ 1 , 2 , \cdots , m \}$ . For each $i$ -th sample $X _ { i }$ , $r$ workers $\{ w _ { i j } \} _ { j \in [ r ] } \in [ m ] ^ { r }$ are selected randomly, independent of the sample $X _ { i }$ . Each selected worker provides a noisy label $Z _ { i j }$ for the sample $X _ { i }$ , where the distribution of $Z _ { i j }$ depends on the selected worker and the true label $Y _ { i }$ . We call $r$ the redundancy and, for simplicity, assume it to be the same for each sample. However, our algorithm can also be applied when redundancy varies across the samples. We use $Z _ { i } ^ { ( r ) }$ to denote $\{ Z _ { i j } \} _ { j \in [ r ] }$ , the set of $r$ labels collected on the $i$ -th example, and $w _ { i } ^ { ( r ) }$ to denote $\{ w _ { i j } \} _ { j \in [ r ] }$ .
|
| 45 |
+
|
| 46 |
+
Following Dawid & Skene (1979), we assume the probability that the $a$ -th worker labels an item in class $k \in \mathcal { K }$ as class $s \in \kappa$ is independent of any particular chosen item, that is, it is a constant over $i \in [ n ]$ . Let us denote this constant by $\pi _ { k s }$ ; by definition, $\textstyle \sum _ { s \in { \mathcal { K } } } \pi _ { k s } = 1$ for all $k \in \mathcal { K }$ , and we call $\pi ^ { ( a ) } \in \left[ 0 , 1 \right] ^ { K \times K }$ the confusion matrix of the $a$ -th worker. In particular, the distribution of $Z$ is:
|
| 47 |
+
|
| 48 |
+
$$
|
| 49 |
+
\mathbb { P } \left[ Z _ { i j } = s \mid Y _ { i } = k , w _ { i j } = a \right] = \pi _ { k s } ^ { ( a ) } .
|
| 50 |
+
$$
|
| 51 |
+
|
| 52 |
+
The diagonal entries of the confusion matrix correspond to the probabilities of correctly labeling an example. The off-diagonal entries represent the probability of mislabeling. We use $\pi$ to denote the collection of confusion matrices $\{ \pi ^ { ( \bar { a } ) } \} _ { a \in [ m ] }$ .
|
| 53 |
+
|
| 54 |
+
We assume nr workers $w _ { 1 , 1 } , w _ { 1 , 2 } , \cdots , w _ { n , r }$ are selected uniformly at random from a pool of $m$ workers with replacement and a batch of $r$ workers are assigned to each of the examples $X _ { 1 } , X _ { 2 } , \cdots , X _ { n }$ . The corrupted labels along with the worker information $( X _ { 1 } , Z _ { 1 } ^ { ( r ) } , w _ { 1 } ^ { ( r ) } ) , \cdot \cdot \cdot , ( X _ { n } , Z _ { n } ^ { ( r ) } , w _ { n } ^ { ( r ) } )$ are what the learning algorithm sees.
|
| 55 |
+
|
| 56 |
+
Let $\mathcal { F }$ be the hypothesis class, and $f \in \mathcal { F } , f : \mathcal { X } \to \mathbb { R } ^ { K }$ , denote a vector valued predictor function. Let $\ell ( f ( X ) , Y )$ denote a loss function. For a predictor $f$ , its $\ell$ -risk under $\mathcal { D }$ is defined as
|
| 57 |
+
|
| 58 |
+
$$
|
| 59 |
+
\begin{array} { r l r } { R _ { \ell , { \mathcal D } } ( f ) } & { : = } & { { \mathbb E } _ { ( X , Y ) \sim { \mathcal D } } \left[ \ell ( f ( X ) , Y ) \right] . } \end{array}
|
| 60 |
+
$$
|
| 61 |
+
|
| 62 |
+
Given the observed samples $( X _ { 1 } , Z _ { 1 } ^ { ( r ) } , w _ { 1 } ^ { ( r ) } ) , \cdot \cdot \cdot , ( X _ { n } , Z _ { n } ^ { ( r ) } , w _ { n } ^ { ( r ) } )$ , we want to learn a good predictor function ${ \widehat { f } } \in { \mathcal { F } }$ such that its risk under the true distribution $\mathcal { D }$ , $R _ { \ell , \mathcal { D } } ( \widehat { f } )$ is minimal. Having access to only noisy labels $Z ^ { ( r ) }$ by workers $w ^ { ( r ) }$ , we compute $\widehat { f }$ as the one which minimizes a suitably modified loss function $\ell _ { \widehat { \pi } , \widehat { q } } ( f ( X ) , Z ^ { ( r ) } , w ^ { ( r ) } )$ . Where $\widehat { \pi }$ denote an estimate of confusion matrix $\pi$ , and $\widehat { q }$ an estimate of $q$ b b, the prior distribution on $Y$ b. We define $\ell _ { \widehat { \pi } , \widehat { q } }$ in the following section.
|
| 63 |
+
|
| 64 |
+
# 4 ALGORITHM
|
| 65 |
+
|
| 66 |
+
Assume that there exists a function $f ^ { * } \in { \mathcal { F } }$ such that $f ^ { * } ( X _ { i } ) = Y _ { i }$ for all $i \in [ n ]$ . Under the Dawid-Skene model (described in previous section), the joint likelihood of true labeling function $f ^ { * } ( X _ { i } )$ and observed labels $\{ Z _ { i j } \} _ { i \in [ n ] , j \in [ r ] }$ as a function of confusion matrices of workers $\pi$ can be written as
|
| 67 |
+
|
| 68 |
+
$$
|
| 69 |
+
\begin{array} { l } { L \left( \pi ; f ^ { * } , \{ X _ { i } \} _ { i \in [ n ] } , \{ Z _ { i j } \} _ { i \in [ n ] , j \in [ r ] } \right) : = } \\ { \displaystyle \prod _ { i = 1 } ^ { n } \left( \sum _ { k \in { \cal K } } q _ { k } \mathbb { I } [ f ^ { * } ( X _ { i } ) = k ] \left( \prod _ { j = 1 } ^ { r } \left( \sum _ { s \in { \cal K } } \mathbb { I } [ Z _ { i j } = s ] \pi _ { k s } ^ { ( w _ { i j } ) } \right) \right) \right) \ : . } \end{array}
|
| 70 |
+
$$
|
| 71 |
+
|
| 72 |
+
$q _ { k }$ ’s are the marginal distribution of the true labels $Y _ { i }$ ’s. We estimate the worker confusion matrices $\pi$ and the true labeling function $f ^ { * }$ by maximizing the likelihood function $L ( \pi ; f ^ { * } ( X ) , Z )$ . Observe that the likelihood function $L ( \pi ; f ^ { * } ( X ) , Z )$ is different than the standard likelihood function of Dawid-Skene model in that we replace each true hidden labels $Y _ { i }$ by $f ^ { * } ( X _ { i } )$ . Like the EM algorithm introduced in (Dawid & Skene, 1979), we propose ‘Model Bootstrapped EM’ (MBEM) to estimate confusion matrices $\pi$ and the true labeling function $f ^ { * }$ . EM converges to the true confusion matrices and the true labels given an appropriate spectral initialization of worker confusion matrices (Zhang et al., 2014). We show in Section 4.4 that MBEM converges under mild conditions when the worker quality is above a threshold and the number of training examples is sufficiently large. In the following two subsections, we motivate and explain our iterative algorithm to estimate the true labeling function $f ^ { * }$ given a good estimate of worker confusion matrices $\pi$ and vice-versa.
|
| 73 |
+
|
| 74 |
+
# 4.1 LEARNING WITH NOISY LABELS
|
| 75 |
+
|
| 76 |
+
To begin, we ask, what is the optimal approach to learn the predictor function $\widehat { f }$ when for each worker we have $\widehat { \pi }$ , a good estimation of the true confusion matrix $\pi$ , and $\widehat { q } ,$ , an estimate of the prior? b bA recent paper, Natarajan et al. (2013) proposes minimizing an unbiased loss function specifically, a weighted sum of the original loss over each possible ground truth label. They provide weights for binary classification where each example is labeled by only one worker. Consider a worker with confusion matrix $\pi$ , where $\pi _ { y } > 1 / 2$ and $\pi _ { - y } > 1 / 2$ represent her probability of correctly labeling the examples belonging to class $y$ and $- y$ respectively. Then their weights are $\pi _ { - y } / ( \pi _ { y } + \bar { \pi } _ { - y } - 1 \bar { ) }$ for class $y$ and $- ( 1 - \pi _ { y } ) / ( \pi _ { y } + \pi _ { - y } - 1 )$ for class $- y$ . It is evident that their weights become unstably large when the probabilities of correct classification $\pi _ { y }$ and $\pi _ { - y }$ are close to $1 / 2$ , limiting the method’s usefulness in practice. As explained below, for the same scenario, our weights would be $\pi _ { y } / ( 1 + \pi _ { y } - \pi _ { - y } )$ for class $y$ and $( 1 - \bar { \pi } _ { - y } ) / ( 1 + \pi _ { y } - \pi _ { - y } )$ for class $- y$ . Inspired by their idea, we propose weighing the loss function according to the posterior distribution of the true label given the $Z ^ { ( r ) }$ observed labels and an estimate of the confusion matrices of the worker who provided those labels. In particular, we define $\ell _ { \widehat { \pi } , \widehat { q } }$ to be
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
\begin{array} { r c l } { \ell _ { \widehat { \pi } , \widehat { q } } ( f ( X ) , Z ^ { ( r ) } , w ^ { ( r ) } ) } & { : = } & { \displaystyle \sum _ { k \in K } \mathbb { P } _ { \widehat { \pi } , \widehat { q } } [ Y = k \mid Z ^ { ( r ) } ; w ^ { ( r ) } ] \ell ( f ( X ) , Y = k ) . } \end{array}
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
If the observed label is uniformly random, then all weights are equal and the loss is identical for all predictor functions $f$ . Absent noise, we recover the original loss function. Under the Dawid-Skene model, given the observed noisy labels $Z ^ { ( r ) }$ , an estimate of confusion matrices $\widehat { \pi }$ , and an estimate of prior $\widehat { q }$ b, the posterior distribution of the true labels can be computed as follows:
|
| 83 |
+
|
| 84 |
+
$$
|
| 85 |
+
\begin{array} { r l r } { \mathbb { P } _ { \widehat { \pi } , \widehat { q } } [ Y _ { i } = k \mid Z _ { i } ^ { ( r ) } ; { w } _ { i } ^ { ( r ) } ] } & { = } & { \frac { \widehat { q } _ { k } \prod _ { j = 1 } ^ { r } \Big ( \sum _ { s \in { \mathcal K } } \mathbb { I } [ Z _ { i j } = s ] \widehat { \pi } _ { k s } ^ { ( w _ { i j } ) } \Big ) } { \sum _ { k ^ { \prime } \in { \mathcal K } } \Big ( \widehat { q } _ { k ^ { \prime } } \prod _ { j = 1 } ^ { r } \Big ( \sum _ { s \in { \mathcal K } } \mathbb { I } [ Z _ { i j } = s ] \widehat { \pi } _ { k ^ { \prime } s } ^ { ( w _ { i j } ) } \Big ) \Big ) } , } \end{array}
|
| 86 |
+
$$
|
| 87 |
+
|
| 88 |
+
where $\mathbb { I } [ . ]$ is the indicator function which takes value one if the identity inside it is true, otherwise zero. We give guarantees on the performance of the proposed loss function in Theorem 4.1. In practice, it is robust to noise level and significantly outperforms the unbiased loss function. Given $\ell _ { \widehat { \pi } , \widehat { q } } .$ , we learn the predictor function $\hat { f }$ by minimizing the empirical risk
|
| 89 |
+
|
| 90 |
+
$$
|
| 91 |
+
\widehat { f } \arg \operatorname* { m i n } _ { f \in \mathcal { F } } \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \ell _ { \widehat { \pi } , \widehat { q } } ( f ( X _ { i } ) , Z _ { i } ^ { ( r ) } , w _ { i } ^ { ( r ) } ) .
|
| 92 |
+
$$
|
| 93 |
+
|
| 94 |
+
# 4.2 ESTIMATING ANNOTATOR NOISE
|
| 95 |
+
|
| 96 |
+
The next question is: how do we get a good estimate $\widehat { \pi }$ of the true confusion matrix $\pi$ for each worker. If redundancy $r$ bis sufficiently large, we can employ the EM algorithm. However, in practical applications, redundancy is typically three or five. With so little redundancy, the standard applications of EM are of limited use. In this paper we look to transcend this problem, posing the question: Can we estimate confusion matrices of workers even when there is only one label per example? While this isn’t possible in the standard approach, we can overcome this obstacle by incorporating a supervised learning model into the process of assessing worker quality.
|
| 97 |
+
|
| 98 |
+
Under the Dawid-Skene model, the EM algorithm estimates the ground truth labels and the confusion matrices in the following way: It alternately fixes the ground truth labels and the confusion matrices by their estimates and and updates its estimate of the other by maximizing the likelihood of the observed labels. The alternating maximization begins by initializing the ground truth labels with a majority vote. With only 1 label per example, EM estimates that all the workers are perfect.
|
| 99 |
+
|
| 100 |
+
We propose using model predictions as estimates of the ground truth labels. Our model is initially trained on the majority vote of the labels. In particular, if the model prediction is $\{ t _ { i } \} _ { i \in [ n ] }$ , where $t _ { i } \in \mathcal { K }$ , then the maximum likelihood estimate of confusion matrices and the prior distribution is given below. For the $a$ -th worker, ${ \widehat \pi } _ { k s } ^ { ( a ) }$ for $k , s \in \mathcal { K }$ , and $\widehat { q _ { k } }$ for $k \in \mathcal { K }$ , we have,
|
| 101 |
+
|
| 102 |
+
$$
|
| 103 |
+
\widehat { \pi } _ { k s } ^ { ( a ) } = \frac { \sum _ { i = 1 } ^ { n } \sum _ { j = 1 } ^ { r } \mathbb { I } [ w _ { i j } = a ] \mathbb { I } [ t _ { i } = k ] \mathbb { I } [ Z _ { i j } = s ] } { \sum _ { i = 1 } ^ { n } \sum _ { j = 1 } ^ { r } \mathbb { I } [ w _ { i j } = a ] \mathbb { I } [ t _ { i } = k ] } , \qquad \widehat { q } _ { k } = ( 1 / n ) \sum _ { i = 1 } ^ { n } \mathbb { I } [ t _ { i } = k ]
|
| 104 |
+
$$
|
| 105 |
+
|
| 106 |
+
The estimate is effective when the hypothesis class $\mathcal { F }$ is expressive enough and the learner is robust to noise. Thus the model should, in general, have small training error on correctly labeled examples and large training error on wrongly labeled examples. Consider the case when there is only one label per example. The model will be trained on the raw noisy labels given by the workers. For simplicity, assume that each worker is either a hammer (always correct) or a spammer (chooses labels uniformly random). By comparing model predictions with the training labels, we can identify which workers are hammers and which are spammers, as long as each worker labels sufficiently many examples. We expect a hammer to agree with the model more often than a spammer.
|
| 107 |
+
|
| 108 |
+
# 4.3 ITERATIVE ALGORITHM
|
| 109 |
+
|
| 110 |
+
Building upon the previous two ideas, we present ‘Model Bootstrapped EM’, an iterative algorithm for efficient learning from noisy labels with small redundancy. MBEM takes data, noisy labels, and the corresponding worker IDs, and returns the best predictor function $\widehat { f }$ in the hypothesis class $\mathcal { F }$ . In the first round, we compute the weights of the modified loss function $\ell _ { \widehat { \pi } , \widehat { q } }$ by using the weighted b bmajority vote. Then we obtain an estimate of the worker confusion matrices $\widehat { \pi }$ using the maximum blikelihood estimator by taking the model predictions as the ground truth labels. In the second round, weights of the loss function are computed as the posterior probability distribution of the ground truth labels conditioned on the noisy labels and the estimate of the confusion matrices obtained in the previous round. In our experiments, only two rounds are required to achieve substantial improvements over baselines.
|
| 111 |
+
|
| 112 |
+
# Algorithm 1 Model Bootstrapped EM (MBEM)
|
| 113 |
+
|
| 114 |
+
Input: $\{ ( X _ { i } , Z _ { i } ^ { ( r ) } , w _ { i } ^ { ( r ) } ) \} _ { i \in [ n ] }$ , $T$ : number of iterations
|
| 115 |
+
Output: $\widehat { f }$ : predictor function
|
| 116 |
+
Initialize posterior distribution using weighted majority vote
|
| 117 |
+
$\mathbb P _ { \widehat { \pi } , \widehat { q } } [ Y _ { i } = k \mid Z _ { i } ^ { ( r ) } ; w _ { i } ^ { ( r ) } ] \gets ( 1 / r ) \bar { \sum _ { j = 1 } ^ { r } } \mathbb I [ Z _ { i j } = k ]$ , for $k \in \mathcal { K } , i \in [ n ]$
|
| 118 |
+
b bRepeat $T$ times: learn predictor function $\widehat { f }$ $\begin{array} { r } { \widehat { f } \longleftarrow \arg \operatorname* { m i n } _ { f \in \mathcal { F } _ { \ast } } \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \sum _ { k \in K } \mathbb { P } _ { \widehat { \pi } , \widehat { q } } [ Y _ { i } = k \mid Z _ { i } ^ { ( r ) } ; w _ { i } ^ { ( r ) } ] \ell ( f ( X _ { i } ) , Y _ { i } = k ) } \end{array}$ predict on training examples $t _ { i } \gets \arg \operatorname* { m a x } _ { k \in \mathcal { K } } \widehat { f } ( X _ { i } ) _ { k }$ , for $i \in [ n ]$ bestimate confusion matrices $\widehat { \pi }$ and prior class distribution $\widehat { q }$ given $\{ t _ { i } \} _ { i \in [ n ] }$ ${ \widehat { \pi } } ^ { ( a ) } \gets$ Equation (7), for $a \in [ m ]$ ; $\widehat { q } \gets$ Equation (7) b bestimate label posterior distribution given ${ \widehat { \pi } } , { \widehat { q } }$ $\mathbb { P } _ { \widehat { \pi } , \widehat { q } } [ Y _ { i } = k \mid \bar { Z _ { i } ^ { ( r ) } } ; w _ { i } ^ { ( r ) } ] , \gets \mathrm { I }$ bquation (5), for $k \in \mathcal { K } , i \in [ n ]$
|
| 119 |
+
b bReturn f
|
| 120 |
+
|
| 121 |
+
# 4.4 PERFORMANCE GUARANTEES
|
| 122 |
+
|
| 123 |
+
The following result gives guarantee on the excess risk for the learned predictor function $\widehat { f }$ in terms of the VC dimension of the hypothesis class $\mathcal { F }$ . Recall that risk of a function $f$ w.r.t. loss function $\ell$ is defined to be $R _ { \ell , \mathcal { D } } ( f ) : = \mathbb { E } _ { ( X , Y ) \sim \mathcal { D } } \left[ \ell ( f ( X ) , Y ) \right]$ , Equation (2). We assume that the classification problem is binary, and the distribution $q$ , prior on ground truth labels $Y$ , is uniform and is known to us. We give guarantees on the excess risk of the predictor function $\widehat { f }$ , and accuracy of $\widehat { \pi }$ estimated bin the second round. For the purpose of analysis, we assume that fresh samples are used in each round for computing function $\widehat { f }$ and estimating $\widehat { \pi }$ . In other words, we assume that $\widehat { f }$ and $\widehat { \pi }$ are each computed using $n / 4$ bfresh samples in the first two rounds. We define $\alpha$ and $\beta _ { \epsilon }$ bto capture the average worker quality. Here, we give their concise bound for a special case when all the workers are identical, and their confusion matrix is represented by a single parameter, $0 \leq \rho < 1 / 2$ . Where $\pi _ { k k } = 1 - \rho$ $\pi _ { k s } ~ = ~ \rho$ $k \neq s$ . re t. e with probability for this special cas $\rho$ . i $\beta _ { \epsilon } \leq$ $\begin{array} { r } { ( \rho + \epsilon ) ^ { r } \sum _ { u = 0 } ^ { r } \binom { r } { u } ( \tau ^ { u } + \tau ^ { r - u } ) ^ { - 1 } } \end{array}$ $\tau : = ( \rho + \epsilon ) / ( 1 - \rho - \epsilon )$ $\alpha$ $\rho$ general definition of $\alpha$ and $\beta _ { \epsilon }$ for any confusion matrices $\pi$ is provided in the Appendix.
|
| 124 |
+
|
| 125 |
+
Theorem 4.1. Define $N : = n r$ to be the number of total annotations collected on n training examples with redundancy $r$ . Suppose $\operatorname* { m i n } _ { f \in \mathcal { F } } R _ { \ell , \mathcal { D } } ( f ) \leq 1 / 4$ . For any hypothesis class $\mathcal { F }$ with a finite VC dimension $V$ , and any $\delta < 1$ , there exists a universal constant $C$ such that if $N$ is large enough and satisfies
|
| 126 |
+
|
| 127 |
+
$$
|
| 128 |
+
N \ge \operatorname* { m a x } \left\{ C r \big ( \big ( \sqrt V + \sqrt { \log ( 1 / \delta ) } \big ) / ( 1 - 2 \alpha ) \big ) ^ { 2 } , 2 ^ { 1 2 } m \log ( 2 ^ { 6 } m / \delta ) \right\} ,
|
| 129 |
+
$$
|
| 130 |
+
|
| 131 |
+
then for binary classification with 0-1 loss function $\ell$ , $\hat { f }$ and $\widehat { \pi }$ returned by Algorithm $I$ after $T = 2$ iterations satisfies
|
| 132 |
+
|
| 133 |
+
$$
|
| 134 |
+
R _ { \ell , \mathcal { D } } ( \widehat { f } ) - \operatorname* { m i n } _ { f \in \mathcal { F } } R _ { \ell , \mathcal { D } } ( f ) \leq \frac { C \sqrt { r } } { 1 - 2 \beta _ { \epsilon } } \left( \sqrt { \frac { V } { N } } + \sqrt { \frac { \log ( 1 / \delta ) } { N } } \right) ,
|
| 135 |
+
$$
|
| 136 |
+
|
| 137 |
+
and $\| \widehat { \pi } ^ { ( a ) } - \pi ^ { ( a ) } \| _ { \infty } \leq \epsilon _ { 1 }$ for all $a \in [ m ]$ , with probability at least √ $1 - \delta$ . Where $\epsilon : = 2 ^ { 4 } \gamma +$ $2 ^ { 8 } \sqrt { m \log ( 2 ^ { 6 } m \delta ) / N }$ , and $\begin{array} { r } { \gamma : = \operatorname* { m i n } _ { f \in \mathcal { F } } R _ { \ell , \mathcal { D } } ( f ) + C ( \sqrt { V } + \sqrt { \log ( 1 / \delta ) } ) / ( ( 1 - 2 \alpha ) \sqrt { N / r } ) } \end{array}$ . $\epsilon _ { 1 }$ is defined to be $\epsilon$ with $\alpha$ in it replaced by $\beta _ { \epsilon }$ .
|
| 138 |
+
|
| 139 |
+
The price we pay in generalization error bound on $\widehat { f }$ is $( 1 - 2 \beta _ { \epsilon } )$ . Note that, when $n$ is large, $\epsilon$ goes to zero, and $\beta _ { \epsilon } \leq 2 \rho ( 1 - \rho )$ , for $r = 1$ .
|
| 140 |
+
|
| 141 |
+
If $\mathrm { m i n } _ { f \in \mathcal { F } } R _ { \ell , \mathcal { D } } ( f )$ is sufficiently small, VC dimension is finite, and $\rho$ is bounded away from $1 / 2$ then for $n = { \cal O } ( m \log ( m ) / r )$ , we get $\epsilon _ { 1 }$ to be sufficiently small. Therefore, for any redundancy $r$ , error in confusion matrix estimation is small when the number of training examples is sufficiently large. Hence, for $N$ large enough, using Equation (9) and the bound on $\beta _ { \epsilon }$ , we get that for fixed total annotation budget, the optimal choice of redundancy $r$ is 1 when the worker quality $( 1 - \rho )$ is above a threshold. In particular, if $( 1 - \rho ) \ge 0 . 8 2 5$ then label once is the optimal strategy. However, in experiments we observe that with our algorithm the choice of $r = 1$ is optimal even for much smaller values of worker quality.
|
| 142 |
+
|
| 143 |
+
# 5 EXPERIMENTS
|
| 144 |
+
|
| 145 |
+
We experimentally investigate our algorithm, MBEM, on multiple large datasets. On CIFAR-10 (Krizhevsky & Hinton, 2009) and ImageNet (Deng et al., 2009), we draw noisy labels from synthetic worker models. We confirm our results on multiple worker models. On the MS-COCO dataset (Lin et al., 2014b), we accessed the real raw data that was used to produce this annotation. We compare MBEM against the following baselines:
|
| 146 |
+
|
| 147 |
+
• MV: First aggregate labels by performing a majority vote, then train the model. • weighted-MV: Model learned using weighted loss function with weights set by majority vote. • EM: First aggregate labels using EM. Then train model in the standard fashion. (Dawid & Skene, 1979) • weighted-EM: Model learned using weighted loss function with weights set by standard EM. • oracle weighted EM: This model is learned by minimizing $\ell _ { \pi }$ , using the true confusion matrices. • oracle correctly labeled: This baseline is trained using the standard loss function $\ell$ but only using those training examples for which at least one of the $r$ workers has given the true label.
|
| 148 |
+
|
| 149 |
+
Note that oracle models cannot be deployed in practice. We show them to build understanding only. In the plots, the dashed lines correspond to MV and EM algorithm. The black dashed-dotted line shows generalization error if the model is trained using ground truth labels on all the training examples. For experiments with synthetic noisy workers, we consider two models of worker skill:
|
| 150 |
+
|
| 151 |
+
• hammer-spammer: Each worker is either a hammer (always correct) with probability $\gamma$ or a spammer (chooses labels uniformly at random).
|
| 152 |
+
• class-wise hammer-spammer: Each worker can be a hammer for some subset of classes and a spammer for the others. The confusion matrix in this case has two types of rows: (a) hammer class: row with all off-diagonal elements being 0. (b) spammer class: row with all elements being $1 / | \mathcal { K } |$ . A worker is a hammer for any class $k \in \mathcal { K }$ with probability $\gamma$ .
|
| 153 |
+
|
| 154 |
+
We sample $m$ confusion matrices $\{ \pi ^ { ( a ) } \} _ { a \in [ m ] }$ according to the given worker skill distribution for a given $\gamma$ . We assign $r$ workers uniformly at random to each example. Given the ground truth labels, we generate noisy labels according to the probabilities given in a worker’s confusion matrix, using Equation (1). While our synthetic workers are sampled from these specific worker skill models, our algorithms do not use this information to estimate the confusion matrices. A Python implementation of the MBEM algorithm is available for download at https://github.com/khetan2/MBEM.
|
| 155 |
+
|
| 156 |
+
CIFAR-10 This dataset has a total of $6 0 \mathrm { K }$ images belonging to 10 different classes where each class is represented by an equal number of images. We use 50K images for training the model and 10K images for testing. We use the ground truth labels to generate noisy labels from synthetic workers. We choose $m = 1 0 0$ , and for each worker, sample confusion matrix of size $1 0 \times 1 0$ according to the worker skill distribution. All our experiments are carried out with a 20-layer ResNet which achieves an accuracy of $9 1 . 5 \%$ . With the larger ResNet-200, we can obtain a higher accuracy of $9 3 . 5 \%$ but to save training time we restrict our attention to ResNet-20. We run MBEM 1 for $T = 2$ rounds. We assume that the prior distribution $\widehat { q }$ is uniform. We report mean accuracy of 5 runs and its standard error for all the experiments.
|
| 157 |
+
|
| 158 |
+

|
| 159 |
+
Figure 1: Plots for CIFAR-10. Line colors- black: oracle correctly labeled, red: oracle weighted EM, blue: MBEM, green: weighted EM, yellow: weighted MV.
|
| 160 |
+
|
| 161 |
+
Figure 1 shows plots for CIFAR-10 dataset under various settings. The three plots in the first row correspond to “hammer-spammer” worker skill distribution and the plots in the second row correspond to “class-wise hammer-spammer” distribution. In the first plot, we fix redundancy $r = 1$ , and plot generalization error of the model for varying hammer probability $\gamma$ . MBEM significantly outperforms all baselines and closely matches the Oracle weighted EM. This implies MBEM recovers worker confusion matrices accurately even when we have only one label per example. When there is only one label per example, MV, weighted-MV, EM, and weighted-EM all reduce learning with the standard loss function $\ell$ .
|
| 162 |
+
|
| 163 |
+
In the second plot, we fix hammer probability $\gamma = 0 . 2$ , and vary redundancy $r$ . This plot shows that weighted-MV and weighted-EM perform significantly better than MV and EM and confirms that our approach of weighing the loss function with posterior probability is effective. MBEM performs much better than weighted-EM at small redundancy, demonstrating the effect of our bootstrapping idea. However, when redundancy is large, EM works as good as MBEM.
|
| 164 |
+
|
| 165 |
+
In the third plot, we show that when the total annotation budget is fixed, it is optimal to collect one label per example for as many examples as possible. We fixed hammer probability $\gamma = 0 . 2$ . Here, when redundancy is increased from 1 to 2, the number of of available training examples is reduced by $50 \%$ , and so on. Performance of weighted-EM improves when redundancy is increased from 1 to 5, showing that with the standard EM algorithm it might be better to collect redundant annotations for fewer example (as it leads to better estimation of worker qualities) than to singly annotate more examples. However, MBEM always performs better than the standard EM algorithm, achieving lowest generalization error with many singly annotated examples. Unlike standard EM, MBEM can estimate worker qualities even with singly annotated examples by comparing them with model predictions. This corroborates our theoretical result that label-once is the optimal strategy when worker quality is above a threshold. The plots corresponding to class-wise hammer-spammer workers follow the same trend. Estimation of confusion matrices in this setting is difficult and hence the gap between MBEM and the baselines is less pronounced.
|
| 166 |
+
|
| 167 |
+
ImageNet The ImageNet-1K dataset contains 1.2M training examples and 50K validation examples. We divide test set in two parts: 10K for validation and 40K for test. Each example belongs to one of the possible 1000 classes. We implement our algorithms using a ResNet-18 that achieves top
|
| 168 |
+
|
| 169 |
+

|
| 170 |
+
Figure 2: Plots for ImageNet. Solid lines represent top-5 error, dashed-lines represent top-1 error. Line colors- blue: MBEM, green: weighted majority vote, yellow: majority vote
|
| 171 |
+
|
| 172 |
+
<table><tr><td rowspan=1 colspan=1>Approach</td><td rowspan=1 colspan=1>F1 score</td></tr><tr><td rowspan=1 colspan=1>majority vote</td><td rowspan=1 colspan=1>0.433</td></tr><tr><td rowspan=1 colspan=1>EM</td><td rowspan=1 colspan=1>0.447</td></tr><tr><td rowspan=1 colspan=1>MBEM</td><td rowspan=1 colspan=1>0.451</td></tr><tr><td rowspan=1 colspan=1>ground truth labels</td><td rowspan=1 colspan=1>0.512</td></tr></table>
|
| 173 |
+
|
| 174 |
+

|
| 175 |
+
Figure 3: Results on raw MS-COCO annotations.
|
| 176 |
+
|
| 177 |
+
1 accuracy of $6 9 . 5 \%$ and top-5 accuracy of $8 9 \%$ on ground truth labels. We use $m = 1 0 0 0$ simulated workers. Although in general, a worker can mislabel an example to one of the 1000 possible classes, our simulated workers mislabel an example to only one of the 10 possible classes. This captures the intuition that even with a larger number of classes, perhaps only a small number are easily confused for each other. Therefore, each workers’ confusion matrix is of size $1 0 \times 1 0$ . Note that without this assumption, there is little hope of estimating a $1 0 0 0 \times 1 0 0 0$ confusion matrix for each worker by collecting only approximately 1200 noisy labels from a worker. The rest of the settings are the same as in our CIFAR-10 experiments. In Figure 2, we fix total annotation budget to be 1.2M and vary redundancy from 1 to 9. When redundancy is 9, we have only $( 1 . 2 / 9 ) \mathbf { M }$ training examples, each labeled by 9 workers. MBEM outperforms baselines in each of the plots, achieving the minimum generalization error with many singly annotated training examples.
|
| 178 |
+
|
| 179 |
+
MS-COCO These experiments use the real raw annotations collected when MS-COCO was crowdsourced. Each image in the dataset has multiple objects (approximately 3 on average). For validation set images (out of 40K), labels were collected from 9 workers on average. Each worker marks which out of the 80 possible objects are present. However, on many examples workers disagree. These annotations were collected to label bounding boxes but we ask a different question: what is the best way to learn a model to perform multi-object classification, using these noisy annotations. We use 35K images for training the model and 1K for validation and 4K for testing. We use raw noisy annotations for training the model and the final MS-COCO annotations as the ground truth for the validation and test set. We use ResNet-98 deep learning model and train independent binary classifier for each of the 80 object classes. Table in Figure 3 shows generalization F1 score of four different algorithms: majority vote, EM, MBEM using all 9 noisy annotations on each of the training examples, and a model trained using the ground truth labels. MBEM performs significantly better than the standard majority vote and slightly improves over EM. In the plot, we fix the total annotation budget to 35K. We vary redundancy from 1 to 7, and accordingly reduce the number of training examples to keep the total number of annotations fixed. When redundancy is $r \ < \ 9$ we select uniformly at random $r$ of the original 9 noisy annotations. Again, we find it best to singly annotate as many examples as possible when the total annotation budget is fixed. MBEM significantly outperforms majority voting and EM at small redundancy.
|
| 180 |
+
|
| 181 |
+
# 6 CONCLUSION
|
| 182 |
+
|
| 183 |
+
We introduced a new algorithm for learning from noisy crowd workers. We also presented a new theoretical and empirical demonstration of the insight that when examples are cheap and annotations expensive, it’s better to label many examples once than to label few multiply when worker quality is above a threshold. Many avenues seem ripe for future work. We are especially keen to incorporate our approach into active query schemes, choosing not only which examples to annotate, but which annotator to route them to based on our models current knowledge of both the data and the worker confusion matrices.
|
| 184 |
+
|
| 185 |
+
# REFERENCES
|
| 186 |
+
|
| 187 |
+
Jonathan Bragg, Daniel S Weld, et al. Optimal testing for crowd workers. In Proceedings of the 2016 International Conference on Autonomous Agents & Multiagent Systems, pp. 966–974. International Foundation for Autonomous Agents and Multiagent Systems, 2016.
|
| 188 |
+
|
| 189 |
+
Steve Branson, Catherine Wah, Florian Schroff, Boris Babenko, Peter Welinder, Pietro Perona, and Serge Belongie. Visual recognition with humans in the loop. Computer Vision–ECCV 2010, pp. 438–451, 2010.
|
| 190 |
+
|
| 191 |
+
Steve Branson, Grant Van Horn, and Pietro Perona. Lean crowdsourcing: Combining humans and machines in an online system. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 7474–7483, 2017.
|
| 192 |
+
|
| 193 |
+
Nilesh Dalvi, Anirban Dasgupta, Ravi Kumar, and Vibhor Rastogi. Aggregating crowdsourced binary ratings. In Proceedings of the 22nd international conference on World Wide Web, pp. 285–294. ACM, 2013.
|
| 194 |
+
|
| 195 |
+
Alexander Philip Dawid and Allan M Skene. Maximum likelihood estimation of observer error-rates using the em algorithm. Applied statistics, pp. 20–28, 1979.
|
| 196 |
+
|
| 197 |
+
J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. ImageNet: A Large-Scale Hierarchical Image Database. In CVPR09, 2009.
|
| 198 |
+
|
| 199 |
+
Jia Deng, Jonathan Krause, and Li Fei-Fei. Fine-grained crowdsourcing for fine-grained recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 580–587, 2013.
|
| 200 |
+
|
| 201 |
+
Melody Y Guan, Varun Gulshan, Andrew M Dai, and Geoffrey E Hinton. Who said what: Modeling individual labelers improves classification. arXiv preprint arXiv:1703.08774, 2017.
|
| 202 |
+
|
| 203 |
+
Panagiotis G Ipeirotis, Foster Provost, Victor S Sheng, and Jing Wang. Repeated labeling using multiple noisy labelers. Data Mining and Knowledge Discovery, 28(2):402–441, 2014.
|
| 204 |
+
|
| 205 |
+
Rong Jin and Zoubin Ghahramani. Learning with multiple labels. In Advances in neural information processing systems, pp. 921–928, 2003.
|
| 206 |
+
|
| 207 |
+
Ishan Jindal, Matthew Nokleby, and Xuewen Chen. Learning deep networks from noisy labels with dropout regularization. In Data Mining (ICDM), 2016 IEEE 16th International Conference on, pp. 967–972. IEEE, 2016.
|
| 208 |
+
|
| 209 |
+
Armand Joulin, Laurens van der Maaten, Allan Jabri, and Nicolas Vasilache. Learning visual features from large weakly supervised data. In European Conference on Computer Vision, pp. 67–84. Springer, 2016.
|
| 210 |
+
|
| 211 |
+
David R Karger, Sewoong Oh, and Devavrat Shah. Budget-optimal task allocation for reliable crowdsourcing systems. Operations Research, 62(1):1–24, 2014.
|
| 212 |
+
|
| 213 |
+
Ashish Khetan and Sewoong Oh. Achieving budget-optimality with adaptive schemes in crowdsourcing. In Advances in Neural Information Processing Systems, pp. 4844–4852, 2016.
|
| 214 |
+
|
| 215 |
+
Jonathan Krause, Benjamin Sapp, Andrew Howard, Howard Zhou, Alexander Toshev, Tom Duerig, James Philbin, and Li Fei-Fei. The unreasonable effectiveness of noisy data for fine-grained recognition. In European Conference on Computer Vision, pp. 301–320. Springer, 2016.
|
| 216 |
+
|
| 217 |
+
Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. 2009.
|
| 218 |
+
|
| 219 |
+
Christopher H Lin, Daniel S Weld, et al. To re (label), or not to re (label). In Second AAAI conference on human computation and crowdsourcing, 2014a.
|
| 220 |
+
|
| 221 |
+
Christopher H Lin, M Mausam, and Daniel S Weld. Re-active learning: Active learning with relabeling. In AAAI, pp. 1845–1852, 2016.
|
| 222 |
+
|
| 223 |
+
Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In ´ European conference on computer vision, pp. 740–755. Springer, 2014b.
|
| 224 |
+
|
| 225 |
+
Qiang Liu, Jian Peng, and Alexander T Ihler. Variational inference for crowdsourcing. In Advances in neural information processing systems, pp. 692–700, 2012.
|
| 226 |
+
|
| 227 |
+
Nagarajan Natarajan, Inderjit S Dhillon, Pradeep K Ravikumar, and Ambuj Tewari. Learning with noisy labels. In Advances in neural information processing systems, pp. 1196–1204, 2013.
|
| 228 |
+
|
| 229 |
+
Alexander J Ratner, Christopher M De Sa, Sen Wu, Daniel Selsam, and Christopher Re. Data pro- ´ gramming: Creating large training sets, quickly. In Advances in Neural Information Processing Systems, pp. 3567–3575, 2016.
|
| 230 |
+
|
| 231 |
+
Victor S Sheng, Foster Provost, and Panagiotis G Ipeirotis. Get another label? improving data quality and data mining using multiple, noisy labelers. In Proceedings of the 14th ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 614–622. ACM, 2008.
|
| 232 |
+
|
| 233 |
+
Sainbayar Sukhbaatar, Joan Bruna, Manohar Paluri, Lubomir Bourdev, and Rob Fergus. Training convolutional networks with noisy labels. arXiv preprint arXiv:1406.2080, 2014.
|
| 234 |
+
|
| 235 |
+
Catherine Wah, Steve Branson, Pietro Perona, and Serge Belongie. Multiclass recognition and part localization with humans in the loop. In Computer Vision (ICCV), 2011 IEEE International Conference on, pp. 2524–2531. IEEE, 2011.
|
| 236 |
+
|
| 237 |
+
Peter Welinder and Pietro Perona. Online crowdsourcing: rating annotators and obtaining costeffective labels. In Computer Vision and Pattern Recognition Workshops (CVPRW), 2010 IEEE Computer Society Conference on, pp. 25–32. IEEE, 2010.
|
| 238 |
+
|
| 239 |
+
Peter Welinder, Steve Branson, Pietro Perona, and Serge J Belongie. The multidimensional wisdom of crowds. In Advances in neural information processing systems, pp. 2424–2432, 2010.
|
| 240 |
+
|
| 241 |
+
Jacob Whitehill, Ting-fan Wu, Jacob Bergsma, Javier R Movellan, and Paul L Ruvolo. Whose vote should count more: Optimal integration of labels from labelers of unknown expertise. In Advances in neural information processing systems, pp. 2035–2043, 2009.
|
| 242 |
+
|
| 243 |
+
Yuchen Zhang, Xi Chen, Denny Zhou, and Michael I Jordan. Spectral methods meet em: A provably optimal algorithm for crowdsourcing. In Advances in neural information processing systems, pp. 1260–1268, 2014.
|
| 244 |
+
|
| 245 |
+
Dengyong Zhou, Qiang Liu, John C Platt, Christopher Meek, and Nihar B Shah. Regularized minimax conditional entropy for crowdsourcing. arXiv preprint arXiv:1503.07240, 2015.
|
| 246 |
+
|
| 247 |
+
Denny Zhou, Sumit Basu, Yi Mao, and John C Platt. Learning from the wisdom of crowds by minimax entropy. In Advances in Neural Information Processing Systems, pp. 2195–2203, 2012.
|
| 248 |
+
|
| 249 |
+
# APPENDIX
|
| 250 |
+
|
| 251 |
+
# A PROOF OF THEOREM 4.1
|
| 252 |
+
|
| 253 |
+
Assuming the prior on $Y$ , distribution $q$ , to be uniform, we change the notation for the modified loss function $\ell _ { \widehat { \pi } , \widehat { q } }$ to $\ell _ { \widehat { \pi } }$ . Observe that for binary classification, $Z ^ { ( r ) } \bar { \in } \{ \pm 1 \} ^ { r }$ . Let $\rho$ denote the posterior b bdistribution of $Y$ b, Equation (5), when $q$ is uniform. Let $\tau$ denote the probability of observing an instance of $Z ^ { ( r ) }$ as a function of the latent true confusion matrices $\pi$ , conditioned on the ground truth label $Y = y$ .
|
| 254 |
+
|
| 255 |
+
$$
|
| 256 |
+
\rho _ { \pi } ( y , Z ^ { ( r ) } , w ^ { ( r ) } ) : = \mathbb { P } _ { \widehat { \pi } } [ Y = y \mid Z ^ { ( r ) } ; w ^ { ( r ) } ] , \qquad \tau _ { \pi } ( y , Z ^ { ( r ) } , w ^ { ( r ) } ) : = \mathbb { P } _ { \pi } [ Z ^ { ( r ) } \mid Y = y ; w ^ { ( r ) } ] .
|
| 257 |
+
$$
|
| 258 |
+
|
| 259 |
+
Let $W$ denote the uniform distribution over a pool of $m$ workers, from which nr workers are selected i.i.d. with replacement, and a batch of $r$ workers are assigned to each example $X _ { i }$ . We define the following quantities which play an important role in our analysis.
|
| 260 |
+
|
| 261 |
+
$$
|
| 262 |
+
\begin{array} { r c l } { \displaystyle \beta _ { \widetilde \pi } ( y ) } & { : = } & { \displaystyle \mathbb { E } _ { w \sim W } \left[ \sum _ { Z ^ { ( r ) } \in \{ \pm 1 \} ^ { r } } \rho _ { \widetilde \pi } ( - y , Z ^ { ( r ) } , w ^ { ( r ) } ) \tau _ { \pi } ( y , Z ^ { ( r ) } , w ^ { ( r ) } ) \right] . } \\ { \displaystyle \beta _ { \widetilde \pi } } & { : = } & { \displaystyle \mathbb { E } _ { w \sim W } \left[ \operatorname* { m a x } _ { y \in \{ \pm 1 \} } \left\{ \sum _ { Z ^ { ( r ) } \in \{ \pm 1 \} ^ { r } } \rho _ { \widetilde \pi } ( - y , Z ^ { ( r ) } , w ^ { ( r ) } ) \tau _ { \pi } ( y , Z ^ { ( r ) } , w ^ { ( r ) } ) \right\} \right] . } \\ { \displaystyle \alpha ( y ) } & { : = } & { \displaystyle \mathbb { E } _ { w \sim W } \left[ \mathbb { P } _ { \pi } [ Z = - y \mid Y = y ; w ] \right] . } \\ { \displaystyle \alpha } & { : = } & { \displaystyle \mathbb { E } _ { w \sim W } \left[ \operatorname* { m a x } _ { y \in \{ \pm 1 \} } \mathbb { P } _ { \pi } [ Z = - y \mid Y = y ; w ] \right] . } \end{array}
|
| 263 |
+
$$
|
| 264 |
+
|
| 265 |
+
For any give $\widehat { \pi }$ with $| \widehat { \pi } _ { k s } ^ { ( a ) } - \pi _ { k s } ^ { ( a ) } | \le \epsilon$ , for all $a \in [ m ] , k , s \in \mathcal { K }$ , we can compute $\beta _ { \epsilon }$ from the $\beta _ { \widehat { \pi } }$ b such that $\beta _ { \widehat { \pi } } ~ \leq ~ \beta _ { \epsilon }$ . For the special case described in Section 4.4, we have the bfollowing bound on $\beta _ { \epsilon }$ .
|
| 266 |
+
|
| 267 |
+
$$
|
| 268 |
+
\begin{array} { r c l } { \beta _ { \epsilon } } & { \le } & { \displaystyle \sum _ { u = 0 } ^ { r } \frac { ( \rho + \epsilon ) ^ { ( r - u ) } ( 1 - \rho - \epsilon ) ^ { u } } { ( \rho + \epsilon ) ^ { u } ( 1 - \rho - \epsilon ) ^ { ( r - u ) } + ( \rho + \epsilon ) ^ { ( r - u ) } ( 1 - \rho - \epsilon ) ^ { u } } \binom { r } { u } ( 1 - \rho ) ^ { r - u } \rho ^ { u } } \\ & { = } & { \displaystyle ( \rho + \epsilon ) ^ { r } \sum _ { u = 0 } ^ { r } \binom { r } { u } \left( \left( \frac { \rho + \epsilon } { 1 - \rho - \epsilon } \right) ^ { u } + \left( \frac { \rho + \epsilon } { 1 - \rho - \epsilon } \right) ^ { r - u } \right) ^ { - 1 } . } \end{array}
|
| 269 |
+
$$
|
| 270 |
+
|
| 271 |
+
It can easily be checked that $\begin{array} { r } { \beta _ { \epsilon } \leq ( \rho + \epsilon ) ^ { r } \sum _ { u = 0 } ^ { \lceil r / 2 \rceil } \binom { r } { u } ( 1 - \rho - \epsilon ) ^ { u } ( \rho + \epsilon ) ^ { - u } . } \end{array}$
|
| 272 |
+
|
| 273 |
+
We present two lemma that analyze the two alternative steps of our algorithm. The following lemma gives a bound on the excess risk of function $\widehat { f }$ learnt by minimizing the modified loss function $\ell _ { \widehat { \pi } }$ .
|
| 274 |
+
|
| 275 |
+
Lemma A.1. Under the assumptions of Theorem 4.1, the excess risk of function $\hat { f }$ in Equation (6), computed with posterior distribution $\mathbb { P } _ { \widehat { \pi } }$ (5) using $n$ training examples is bounded by
|
| 276 |
+
|
| 277 |
+
$$
|
| 278 |
+
R _ { \ell , D } ( \widehat f ) - \operatorname* { m i n } _ { f \in \mathcal { F } } R _ { \ell , \mathcal { D } } ( f ) \ \leq \ \frac { C } { 1 - 2 \beta _ { \widehat \pi } } \left( \sqrt { \frac { V } { n } } + \sqrt { \frac { \log ( 1 / \delta _ { 1 } ) } { n } } \right) ,
|
| 279 |
+
$$
|
| 280 |
+
|
| 281 |
+
with probability at least $1 - \delta _ { 1 }$ , where $C$ is a universal constant. When $\mathbb { P } _ { \widehat { \pi } }$ is computed using majority vote, while initializing the iterative Algorithm $^ { l }$ b, the above bound holds with $\beta _ { \widehat { \pi } }$ replaced by $\alpha$ .
|
| 282 |
+
|
| 283 |
+
The following lemma gives an $\ell _ { \infty }$ norm bound on confusion matrices $\widehat { \pi }$ estimated using model prediction ${ \widehat { f } } ( X )$ as the ground truth labels. In the analysis, we assume fresh samples are used for estimating confusion matrices in step 3, Algorithm 1. Therefore the function $\widehat { f }$ is independent of the samples $X _ { i }$ ’s on which $\widehat { \pi }$ is estimated. Let $K = | { \cal K } |$ .
|
| 284 |
+
|
| 285 |
+
Lemma A.2. Under the assumptions of Theorem 4.1, $\ell _ { \infty }$ error in estimated confusion matrices $\widehat { \pi }$ as computed in Equation (7), using $n$ samples and a predictor function $\widehat { f }$ with risk $R _ { \ell , \mathcal { D } } \ \leq \ \delta$ , is bounded by
|
| 286 |
+
|
| 287 |
+
$$
|
| 288 |
+
\left. \widehat { \pi } _ { k s } ^ { ( a ) } - \pi _ { k s } ^ { ( a ) } \right. ~ \leq ~ \frac { 2 \delta + 1 6 \sqrt { m \log ( 4 m K ^ { 2 } \delta _ { 1 } ) / ( n r ) } } { 1 / K - \delta - 8 \sqrt { m \log ( 4 m K ^ { 2 } / \delta _ { 1 } ) / ( n r ) } } , \qquad \forall a \in [ m ] , \ k , s \in { \mathcal K } ,
|
| 289 |
+
$$
|
| 290 |
+
|
| 291 |
+
with probability at least $1 - \delta _ { 1 }$ .
|
| 292 |
+
|
| 293 |
+
First we apply Lemma A.1 with $\mathbb { P } _ { \widehat { \pi } }$ computed using majority vote. We get a bound on the risk of function $\widehat { f }$ computed in the first round. With this $\widehat { f }$ , we apply Lemma A.2. When $n$ is sufficiently large such that Equation (8) holds, the denominator in Equation (18), $1 / K - \delta -$ $8 \sqrt { m \log ( 4 m K ^ { 2 } / \delta _ { 1 } ) / ( n r ) } \ge 1 / 8$ . Therefore, in the first round, the error in confusion matrix estimation is bounded by $\epsilon$ , which is defined in the Theorem.
|
| 294 |
+
|
| 295 |
+
For the second round: we apply Lemma A.1 with $\mathbb { P } _ { \widehat { \pi } }$ computed as the posterior distribution (5). Where $\ell _ { \infty }$ error in $\widehat { \pi }$ is bounded by $\epsilon$ b. This gives the desired bound in (9). With this $\hat { f }$ , we apply bLemma A.2 and obtain $\ell _ { \infty }$ error in $\widehat { \pi }$ bounded by $\epsilon _ { 1 }$ , which is defined in the Theorem.
|
| 296 |
+
|
| 297 |
+
For the given probability of error $\delta$ in the Theorem, we chose $\delta _ { 1 }$ in both the lemma to be $\delta / 4$ such that with union bound we get the desired probability of $\delta$ .
|
| 298 |
+
|
| 299 |
+
# A.1 PROOF OF LEMMA A.1
|
| 300 |
+
|
| 301 |
+
Let $\begin{array} { r } { f ^ { * } : = \arg \operatorname* { m i n } _ { f \in \mathcal { F } } R _ { \ell , \mathcal { D } } ( f ) } \end{array}$ . Let’s denote the distribution of $( \boldsymbol { X } , \boldsymbol { Z } ^ { ( r ) } , \boldsymbol { w } ^ { ( r ) } )$ by $\mathcal { D } _ { W , \pi , r }$ . For ease of notation, we denote $\mathcal { D } _ { W , \pi , r }$ by $\mathcal { D } _ { \pi }$ . Similar to $R _ { \ell , \mathcal { D } }$ , risk of decision function $f$ with respect to the modified loss function $\ell _ { \widehat { \pi } }$ is characterized by the following quantities:
|
| 302 |
+
|
| 303 |
+
1. $\ell _ { \widehat { \pi } }$ -risk unde $\mathcal D _ { \pi } \colon R _ { \ell _ { \widehat { \pi } } , \mathcal D _ { \pi } } ( f ) : = \mathbb E _ { ( X , Z ^ { ( r ) } , w ^ { ( r ) } ) \sim \mathcal D _ { \pi } } \left[ \ell _ { \widehat { \pi } } \big ( f ( X ) , Z ^ { ( r ) } , w ^ { ( r ) } \big ) \right] .$
|
| 304 |
+
2. Empirical $\ell _ { \widehat { \pi } }$ -risk on samples: $\begin{array} { r } { \widehat { R } _ { \ell _ { \widehat { \pi } } , \mathcal { D } _ { \pi } } ( f ) : = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \ell _ { \widehat { \pi } } ( f ( X _ { i } ) , Z _ { i } ^ { ( r ) } , w _ { i } ^ { ( r ) } ) . } \end{array}$
|
| 305 |
+
|
| 306 |
+
With the above definitions, we have the following,
|
| 307 |
+
|
| 308 |
+
$$
|
| 309 |
+
\begin{array} { r l r } & { \ } & { R _ { \ell , D } ( \widehat f ) - R _ { \ell , D } ( f ^ { * } ) } \\ & { = } & { R _ { \ell , \widehat \sigma , \mathcal { P } _ { \ell } } ( \widehat f ) - R _ { \ell , \widehat \sigma , \mathcal { P } _ { \ell } } ( f ^ { * } ) + ( R _ { \ell , D } ( \widehat f ) - R _ { \ell , \widehat \sigma , \mathcal { P } _ { \ell } } ( \widehat f ) ) - ( R _ { \ell , D } ( f ^ { * } ) - R _ { \ell , \widehat \sigma , \mathcal { P } _ { \ell } } ( f ^ { * } ) ) } \\ & { = } & { R _ { \ell , \widehat \sigma , \mathcal { P } _ { \ell } } ( \widehat f ) - R _ { \ell , \widehat \sigma , \mathcal { P } _ { \ell } } ( f ^ { * } ) + 2 \beta _ { \overline { { \pi } } } ( R _ { \ell , D } ( \widehat f ) - R _ { \ell , D } ( f ^ { * } ) ) } \\ & { \leq } & { \widehat { R _ { \ell , \widehat \sigma , \mathcal { P } _ { \ell } } ( \widehat f ) } - \widehat { R _ { \ell , \widehat \sigma , \mathcal { P } _ { \ell } } } ( f ^ { * } ) + 2 \beta _ { \overline { { \pi } } } ( R _ { \ell , D } ( \widehat f ) - R _ { \ell , D } ( f ^ { * } ) ) } \\ & { = } & { \widehat { R _ { \ell , \widehat \sigma , \mathcal { P } _ { \ell } } ( \widehat f ) } - \widehat { R _ { \ell , \widehat \sigma , \mathcal { P } _ { \ell } } ( f ^ { * } ) } + ( R _ { \ell , \widehat \sigma , \mathcal { P } _ { \ell } } ( \widehat f ) - \widehat { R _ { \ell , \widehat \sigma , \mathcal { P } _ { \ell } } ( \widehat f ) } ) + ( \widehat { R _ { \ell , \widehat \sigma , \mathcal { P } _ { \ell } } ( f ^ { * } ) } - R _ { \ell , \widehat \sigma , \mathcal { P } _ { \ell } } ( f ^ { * } ) ) } \\ & { } & { + 2 \beta _ { \overline { { \pi } } } ( R _ { \ell , D } ( \widehat f ) - R _ { \ell , D } ( f ^ { * } ) ) } \\ & { \leq } & 2 \operatorname* { m a x } | \widehat { R _ { \ell , \widehat \sigma , \mathcal { P } _ { \ell } } } ( f ) - R _ { \ell , \widehat \sigma , \mathcal { P } _ { \ell } } ( f ) \ \end{array}
|
| 310 |
+
$$
|
| 311 |
+
|
| 312 |
+
where (19) follows from Equation (24). (20) follows from the fact that $\widehat { f }$ is the minimizer of $\widehat { R } _ { \ell _ { \widehat { \pi } } , { \mathcal { D } } _ { \pi } }$ as computed in (6). (21) follows from the basic excess-risk bound. $V$ bis the VC dimension of hypothesis class $\mathcal { F }$ , and $C$ is a universal constant.
|
| 313 |
+
|
| 314 |
+
Following shows the inequality used in Equation (19). For binary classification, we denote the two classes by $Y , - Y$ .
|
| 315 |
+
|
| 316 |
+
$$
|
| 317 |
+
\begin{array} { r l r } { = } & { { \cal R } _ { \ell , \mathcal { D } } ( \widehat { f } ) - { \cal R } _ { \ell _ { \widehat { \pi } } , \mathcal { D } _ { \pi } } ( \widehat { f } ) - ( { \cal R } _ { \ell , \mathcal { D } } ( f ^ { * } ) - { \cal R } _ { \ell _ { \widehat { \pi } } , \mathcal { D } _ { \pi } } ( f ^ { * } ) ) } \\ { = } & { \mathbb { E } _ { ( X , Y ) \sim \mathcal { D } } [ \beta _ { \widehat { \pi } } ( Y ) ( ( \ell ( \widehat { f } ( X ) , Y ) - \ell ( f ^ { * } ( X ) , Y ) ) - ( \ell ( \widehat { f } ( X ) , - Y ) - \ell ( f ^ { * } ( X ) , - Y ) ) ) ] ) } \\ { = } & { 2 \mathbb { E } _ { ( X , Y ) \sim \mathcal { D } } [ \beta _ { \widehat { \pi } } ( Y ) ( \ell ( \widehat { f } ( X ) , Y ) - \ell ( f ^ { * } ( X ) , Y ) ) ] } & { ( 2 3 ) } \\ { \leq } & { 2 \beta _ { \widehat { \pi } } ( { \cal R } _ { \ell , \mathcal { D } } ( \widehat { f } ) - { \cal R } _ { \ell , \mathcal { D } } ( f ^ { * } ) ) , } & { ( 2 4 ) } \end{array}
|
| 318 |
+
$$
|
| 319 |
+
|
| 320 |
+
where (22) follows from Equation (26). (23) follows from the fact that for 0-1 loss function $\ell ( f ( X ) , Y ) + \ell ( f ( X ) , - Y ) = 1$ . (24) follows from the definition of $\beta _ { \widehat { \pi } }$ defined in Equation (12). When $\ell _ { \widehat { \pi } }$ bis computed using weighted majority vote of the workers then (24) holds with $\beta _ { \widehat { \pi } }$ replaced by $\alpha , \alpha$ bis defined in (14).
|
| 321 |
+
|
| 322 |
+
Following shows the equality used in Equation (22). Using the notations $\rho _ { \widehat { \pi } }$ and $\tau _ { \pi }$ , in the following, for any function $f \in { \mathcal { F } }$ b, we compute the excess risk due to the unbiasedness of the modified loss function $\ell _ { \widehat { \pi } }$ .
|
| 323 |
+
|
| 324 |
+
$$
|
| 325 |
+
\begin{array} { r l } & { \displaystyle R _ { \xi , \mathcal { D } } ( f ) - R _ { \xi _ { \Psi } , \mathcal { D } _ { \pi } } ( f ) } \\ { = } & { \displaystyle \mathbb { E } _ { ( X , Y ) \sim \mathcal { D } } \left[ \ell ( f ( X ) , Y ) \right] - \mathbb { E } _ { ( X , Z ^ { ( r ) } , w ^ { ( r ) } ) \sim \mathcal { D } _ { \mathbb { P } } } [ \ell _ { \widetilde { \pi } } ( f ( X ) , Z ^ { ( r ) } , w ^ { ( r ) } ) ] } \\ { = } & { \displaystyle \mathbb { E } _ { ( X , Y ) \sim \mathcal { D } } \left[ \ell ( f ( X ) , Y ) \right] } \\ & { \displaystyle - \mathbb { E } _ { ( X , Y , w ^ { ( r ) } ) \sim \mathcal { D } _ { \pi } } \Bigg [ \sum _ { Z ^ { ( r ) } \in \{ \pm 1 \} ^ { r } } \Big ( ( 1 - \rho _ { \widetilde { \pi } } ( - Y , Z ^ { ( r ) } , w ^ { ( r ) } ) ) \ell ( f ( X ) , Y ) } \\ & { \displaystyle + \rho _ { \widetilde { \pi } } ( - Y , Z ^ { ( r ) } , w ^ { ( r ) } ) \ell ( f ( X ) , - Y ) \Big ) \tau _ { \pi } ( Y , Z ^ { ( r ) } , w ^ { ( r ) } ) \Bigg ] } \\ { = } & { \displaystyle \mathbb { E } _ { ( X , Y ) \sim \mathcal { D } } \left[ \beta _ { \widetilde { \pi } } ( Y ) \left( \ell ( f ( X ) , Y ) - \ell ( f ( X ) , - Y ) \right) \right] , } \end{array}
|
| 326 |
+
$$
|
| 327 |
+
|
| 328 |
+
where $\beta _ { \widehat { \pi } } ( Y )$ is defined in (11). Where (25) follows from the definition of $\ell _ { \widehat { \pi } }$ given in Equation (4). bObserve that when $\ell _ { \widehat { \pi } }$ bis computed using weighted majority vote of the workers then Equation (26) holds with $\beta _ { \widehat { \pi } } ( Y )$ b replaced by $\alpha ( y ) . \alpha ( \bar { y } )$ is defined in (13).
|
| 329 |
+
|
| 330 |
+
# A.2 PROOF OF LEMMA A.2
|
| 331 |
+
|
| 332 |
+
Recall that we have
|
| 333 |
+
|
| 334 |
+
$$
|
| 335 |
+
\begin{array} { r l r } { \widehat { \pi } _ { k s } ^ { ( a ) } } & { = } & { \frac { \sum _ { i = 1 } ^ { n } \sum _ { j = 1 } ^ { r } \mathbb { I } [ w _ { i j } = a ] \mathbb { I } [ t _ { i } = k ] \mathbb { I } [ Z _ { i j } = s ] } { \sum _ { i = 1 } ^ { n } \sum _ { j = 1 } ^ { r } \mathbb { I } [ w _ { i j } = a ] \mathbb { I } [ t _ { i } = k ] } } \end{array}
|
| 336 |
+
$$
|
| 337 |
+
|
| 338 |
+
Let $t _ { i }$ denote ${ \widehat { f } } ( X _ { i } )$ . By the definition of risk, for any $k \in \mathcal { K }$ , we have
|
| 339 |
+
|
| 340 |
+
$$
|
| 341 |
+
\mathbb { P } \Big [ \big | \mathbb { I } [ Y _ { i } = k ] - \mathbb { I } [ t _ { i } = k ] \big | = 1 \Big ] = \delta .
|
| 342 |
+
$$
|
| 343 |
+
|
| 344 |
+
Let $| { \cal K } | = { \cal K }$ . Define, for fixed $a \in [ m ]$ , and $k , s \in \mathcal { K }$ ,
|
| 345 |
+
|
| 346 |
+
$$
|
| 347 |
+
\begin{array} { r l } { A } & { \displaystyle : = \begin{array} { l } { \displaystyle \sum _ { i = 1 } ^ { n } \sum _ { j = 1 } ^ { n } [ [ w _ { i j } = a ] [ [ t _ { i } = k ] ] [ Z _ { i j } = s ] , } \end{array} \quad \bar { A } = \frac { n r \pi _ { k i } } { m K } } \\ { B } & \displaystyle : = \begin{array} { l } { \displaystyle \sum _ { i = 1 } ^ { n } \sum _ { j = 1 } ^ { n } [ [ w _ { i j } = a ] [ [ t _ { i } = k ] ] , \quad \quad \bar { B } : = \frac { n r } { m K } } \\ { \displaystyle C } \end{array} \end{array}
|
| 348 |
+
$$
|
| 349 |
+
|
| 350 |
+
Note that $A , B , C , D , E$ depend upon $a \in [ m ] , k , s \in \mathcal { K }$ . However, for ease of notations, we have not included the subscripts. We have,
|
| 351 |
+
|
| 352 |
+
$$
|
| 353 |
+
\begin{array} { r l r } { \left| \widehat { \pi } _ { k s } ^ { ( a ) } - \pi _ { k s } ^ { ( a ) } \right| = \frac { A - B \pi _ { k s } } { B } } & { = } & { \frac { \left| \left( A - \bar { A } \right) - \left( B - \bar { B } \right) \pi _ { k s } \right| } { \left| \bar { B } + \left( B - \bar { B } \right) \right| } } \\ & { \leq } & { \frac { \left| A - \bar { A } \right| + \left| \left( B - \bar { B } \right) \right| \pi _ { k s } } { \left| \bar { B } \right| - \left| B - \bar { B } \right| } } \end{array}
|
| 354 |
+
$$
|
| 355 |
+
|
| 356 |
+
Now, we have,
|
| 357 |
+
|
| 358 |
+
$$
|
| 359 |
+
\begin{array} { l r c l } { { | A - \bar { A } | } } & { { \le } } & { { | A - D | + | D - \bar { A } | } } \\ { { } } & { { \le } } & { { C + | D - \bar { A } | . } } \end{array}
|
| 360 |
+
$$
|
| 361 |
+
|
| 362 |
+
We have,
|
| 363 |
+
|
| 364 |
+
$$
|
| 365 |
+
\begin{array} { l l l } { | B - \bar { B } | } & { \leq } & { | B - E | \ + \ | E - \bar { B } | } \\ & { \leq } & { C + \ | E - \bar { B } | } \end{array}
|
| 366 |
+
$$
|
| 367 |
+
|
| 368 |
+
Observe that $C$ is a sum of $n r$ i.i.d. Bernoulli random variables with mean $\delta / m$ . Using Chernoff bound we get that
|
| 369 |
+
|
| 370 |
+
$$
|
| 371 |
+
C ~ \leq ~ \frac { n r \delta } { m } + \sqrt { \frac { 3 n r \delta \log ( 2 m K / \delta _ { 1 } ) } { m } } ,
|
| 372 |
+
$$
|
| 373 |
+
|
| 374 |
+
for all $a \in [ m ]$ , and $k \in \mathcal { K }$ with probability at least $1 - \delta _ { 1 }$ . Similarly, $D$ is a sum of $n r$ i.i.d. Bernoulli random variables with mean $\pi _ { k s } / ( m k )$ . Again, using Chernoff bound we get that
|
| 375 |
+
|
| 376 |
+
$$
|
| 377 |
+
\begin{array} { r l r } { \left| D - \bar { A } \right| } & { \leq } & { \sqrt { \frac { 3 n r \pi _ { k s } \log ( 2 m K ^ { 2 } / \delta _ { 1 } ) } { m K } } , } \end{array}
|
| 378 |
+
$$
|
| 379 |
+
|
| 380 |
+
for all $a \in [ m ] , k , s \in \mathcal { K }$ with probability at least $1 - \delta _ { 1 }$ . From the bound on $| D - { \bar { A } } |$ , it follows that
|
| 381 |
+
|
| 382 |
+
$$
|
| 383 |
+
| E - \bar { B } | \leq \sqrt { \frac { 3 n r \log ( 2 m K ^ { 2 } / \delta _ { 1 } ) } { m } }
|
| 384 |
+
$$
|
| 385 |
+
|
| 386 |
+
Collecting Equations (33)-(38), we have for all $a \in [ m ] , k , s \in \mathcal { K }$
|
| 387 |
+
|
| 388 |
+
$$
|
| 389 |
+
\left| { \widehat \pi } _ { k s } ^ { ( a ) } - \pi _ { k s } ^ { ( a ) } \right| ~ \leq ~ { \frac { 2 \delta + 1 6 \sqrt { m \log ( 2 m K ^ { 2 } \delta _ { 1 } / ( n r ) } } { 1 / K - \delta - 8 \sqrt { m \log ( 2 m K ^ { 2 } / \delta _ { 1 } ) / ( n r ) } } } ,
|
| 390 |
+
$$
|
| 391 |
+
|
| 392 |
+
with probability at least $1 - 2 \delta _ { 1 }$ .
|
md/train/HJxNAnVtDS/HJxNAnVtDS.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
md/train/HyM7AiA5YX/HyM7AiA5YX.md
ADDED
|
@@ -0,0 +1,212 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# COMPLEMENT OBJECTIVE TRAINING
|
| 2 |
+
|
| 3 |
+
Hao-Yun Chen1, Pei-Hsin Wang1, Chun-Hao Liu1, Shih-Chieh Chang1, 2, Jia-Yu Pan3, Yu-Ting Chen3, Wei Wei3, and Da-Cheng Juan3
|
| 4 |
+
|
| 5 |
+
1Department of Computer Science, National Tsing-Hua University, Hsinchu, Taiwan
|
| 6 |
+
2Electronic and Optoelectronic System Research Laboratories, ITRI, Hsinchu, Taiwan 3Google Research, Mountain View, CA, USA {haoyunchen,peihsin,newgod1992}@gapp.nthu.edu.tw scchang@cs.nthu.edu.tw {jypan, yutingchen, wewei, dacheng}@google.com
|
| 7 |
+
|
| 8 |
+
# ABSTRACT
|
| 9 |
+
|
| 10 |
+
Learning with a primary objective, such as softmax cross entropy for classification and sequence generation, has been the norm for training deep neural networks for years. Although being a widely-adopted approach, using cross entropy as the primary objective exploits mostly the information from the ground-truth class for maximizing data likelihood, and largely ignores information from the complement (incorrect) classes. We argue that, in addition to the primary objective, training also using a complement objective that leverages information from the complement classes can be effective in improving model performance. This motivates us to study a new training paradigm that maximizes the likelihood of the groundtruth class while neutralizing the probabilities of the complement classes. We conduct extensive experiments on multiple tasks ranging from computer vision to natural language understanding. The experimental results confirm that, compared to the conventional training with just one primary objective, training also with the complement objective further improves the performance of the state-of-the-art models across all tasks. In addition to the accuracy improvement, we also show that models trained with both primary and complement objectives are more robust to single-step adversarial attacks.
|
| 11 |
+
|
| 12 |
+
# 1 INTRODUCTION
|
| 13 |
+
|
| 14 |
+
Statistical learning algorithms work by optimizing towards a training objective. A dominant principle for training is to optimize likelihood (Mitchell et al., 1997), which measures the probability of data given the model under a specific set of parameters. The popularity of deep neural networks has given rise to the use of cross entropy (Kullback & Leibler, 1951) as its primary training objective, since minimizing cross entropy is essentially equivalent to maximizing likelihood for disjoint classes. Cross entropy has become the standard training objective for many tasks including classification (Krizhevsky et al., 2012) and sequence generation (Sutskever et al., 2014).
|
| 15 |
+
|
| 16 |
+
Let $\mathbf { y } _ { i } \in \{ 0 , 1 \} ^ { K }$ be the label of the $i ^ { \mathrm { { t h } } }$ sample in one-hot encoded representation and $\hat { \mathbf { y } } _ { i } \in [ 0 , 1 ] ^ { K }$ be the predicted probabilities, the cross entropy $H ( \mathbf { y } , { \hat { \mathbf { y } } } )$ is defined as:
|
| 17 |
+
|
| 18 |
+
$$
|
| 19 |
+
\begin{array} { c } { \displaystyle { H ( \mathbf { y } , \hat { \mathbf { y } } ) = - \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \mathbf { y } _ { i } ^ { T } \cdot \log ( \hat { \mathbf { y } } _ { i } ) } } \\ { \displaystyle { = - \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \log ( \hat { \mathbf { y } } _ { i g } ) } } \end{array}
|
| 20 |
+
$$
|
| 21 |
+
|
| 22 |
+
where $\hat { \mathsf { y } } _ { i g }$ represents the predicted probability of the ground-truth class for the $i ^ { \mathrm { { t h } } }$ sample. Training with cross entropy as the primary objective aims at finding $\hat { \pmb { \theta } } \ : = \ : \arg \operatorname* { m i n } _ { \pmb { \theta } } H ( \mathbf { y } , \hat { \mathbf { y } } )$ , where $\hat { \mathbf { y } } = h _ { \pmb { \theta } } ( \mathbf { x } )$ , $h _ { \theta }$ is a neural network and $\mathbf { x }$ is a sample. Although training using the cross entropy as
|
| 23 |
+
|
| 24 |
+
(a) $\hat { \mathbf { y } }$ from the model trained with cross entropy.
|
| 25 |
+
|
| 26 |
+

|
| 27 |
+
Figure 1: Predicted probabilities $\hat { \mathbf { y } }$ from two training paradigms: (a) With cross entropy as the primary objective. (b) COT: with both primary and complement objectives. The model is ResNet110 and the sample image is from CIFAR10 dataset. The ground-truth class is “horse.” Compared to (b), the model in (a) is confused by other classes such as “airplane” and “automobile,” which suggests (a) might be more susceptible for generalization issues and potentially adversarial attacks.
|
| 28 |
+
|
| 29 |
+

|
| 30 |
+
(b) $\hat { \mathbf { y } }$ from the model trained with COT.
|
| 31 |
+
|
| 32 |
+
(a) Embeddings from the model trained with cross entropy.
|
| 33 |
+
|
| 34 |
+

|
| 35 |
+
(b) Embeddings from the model trained with COT.
|
| 36 |
+
|
| 37 |
+

|
| 38 |
+
Figure 2: Embeddings for CIFAR10 test images from two training paradigms: (a) With cross entropy as the primary objective. (b) COT: training with both primary and complement objectives. The model is ResNet-110, and the “embedding” is the vector representation before taking the softmax operation. The embedding representation of each sample is projected to two dimensions using t-SNE for visualization purpose. Compared to (a), the cluster of each class in (b) is “narrower” in terms of intra-cluster distance. Also, the clusters in (b) seem to have clean and separable boundaries, leading to more accurate and robust classification results.
|
| 39 |
+
|
| 40 |
+
the primary objective has achieved tremendous success, we have observed one limitation: it exploits mostly the information from the ground-truth class as Eq(1) shows; the information from complement classes (i.e., incorrect classes) has been largely ignored, since the predicted probabilities other than $\hat { \mathsf { y } } _ { i g }$ are zeroed out due to the dot product calculation with the one-hot encoded $\mathbf { y } _ { i }$ . Therefore, for classes other than the ground truth, the model behavior is not explicitly optimized — their predicted probabilities are indirectly minimized when $\hat { \mathbf { y } } _ { i g }$ is maximized since the probabilities sum up to 1. One way to utilize the information from the complement classes is to neutralize their predicted probabilities. To this end, we propose Complement Objective Training (COT), a new training paradigm that achieves this optimization goal without compromising the model’s primary objective. Figure 1 illustrates the comparison between Figure 1a: the predicted probability $\hat { \mathbf { y } }$ from the model trained with just cross entropy as the primary objective, and Figure 1b: $\hat { \mathbf { y } }$ from the model trained with both primary and complement objectives. Training with the complement objective finds the parameters $\pmb \theta$ that evenly suppress complement classes without compromising the primary objective (i.e., maximizing $\hat { \mathsf { y } } _ { g } ^ { \phantom { \dagger } } .$ ), making the model more confident of the ground-truth class.
|
| 41 |
+
|
| 42 |
+
Figure 2 further illustrates the embeddings of CIFAR10 images calculated from ResNet-110 using two training paradigms: cross entropy and COT. An embedding of an image is the vector representation computed by the ResNet-110 model, before taking the softmax operation. Compared to Figure 2a, the clusters in Figure 2b seem to have clean and separable boundaries, leading to more accurate and robust classification results. The experimental results later in Section 3 further confirm this observation.
|
| 43 |
+
|
| 44 |
+
Complement objective training requires a function that complements the primary objective. In this paper, we propose “complement entropy” (defined in Section 2) to complement the softmax cross entropy for neutralizing the effects of complement classes. The neural net parameters $\pmb { \theta }$ are then updated by alternating iteratively between (a) minimizing cross entropy to increase $\hat { \mathsf { y } } _ { g }$ , and (b) maximizing complement entropy to neutralize $\hat { \mathbf { y } } _ { j \neq g }$ . Experimental results (in Section 3) confirm that COT improves the accuracies of the state-of-the-art methods for both (a) the image classification tasks on ImageNet-2012, Tiny ImageNet, CIFAR-10, CIFAR-100, and SVHN, and (b) language understanding tasks on machine translation and speech recognition. Furthermore, experimental results also show that models trained by COT are more robust to adversarial attacks.
|
| 45 |
+
|
| 46 |
+
# 2 COMPLEMENT OBJECTIVE TRAINING
|
| 47 |
+
|
| 48 |
+
In this section, we first define “Complement Entropy” as the complement objective, and then provide a new training algorithm for updating neural network parameters $\pmb { \theta }$ by alternating iteratively between the primary objective and the complement objective.
|
| 49 |
+
|
| 50 |
+
# 2.1 COMPLEMENT ENTROPY
|
| 51 |
+
|
| 52 |
+
Conventionally, training with cross entropy as the primary objective aims at maximizing the predicted probability of the ground-truth class $\hat { \mathsf { y } } _ { g }$ in $\operatorname { E q } ( 1 )$ . As mentioned in the introduction, the proposed COT also maximizes the complement objective for neutralizing the predicted probabilities of the complement classes. To achieve this, we propose “complement entropy” as the complement objective; complement entropy $C ( \cdot )$ is defined to be the average of sample-wise entropies over complement classes in a mini-batch:
|
| 53 |
+
|
| 54 |
+
$$
|
| 55 |
+
\begin{array} { l } { { \displaystyle C ( \hat { \mathbf { y } } _ { \bar { c } } ) = \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \mathcal { H } ( \hat { \mathbf { y } } _ { i \bar { c } } ) } } \\ { { \displaystyle ~ = - \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \sum _ { j = 1 , j \neq g } ^ { K } ( \frac { \hat { \mathbf { y } } _ { i j } } { 1 - \hat { \mathbf { y } } _ { i g } } ) \log ( \frac { \hat { \mathbf { y } } _ { i j } } { 1 - \hat { \mathbf { y } } _ { i g } } ) } } \end{array}
|
| 56 |
+
$$
|
| 57 |
+
|
| 58 |
+
$\mathcal { H } ( \cdot )$ is the entropy function. All the symbols and notations used in this paper are summarized in Table 1. One thing worth noticing is that this sample-wise entropy is calculated by considering only the complement classes other than the ground-truth class $g$ . The sample-wise predicted probability $\hat { \mathsf { y } } _ { i j }$ is normalized by one minus the ground-truth probability (i.e., $\mathrm { 1 - } \hat { \mathrm { y } } _ { i g } )$ . The term $\hat { \mathsf { y } } _ { i j } / ( 1 - \hat { \mathsf { y } } _ { i g } )$ can be understood as: conditioned on the ground-truth class $g$ not happening, the predicted probability to see the class $j$ for the $i ^ { \mathrm { { t h } } }$ sample. Since the entropy is maximized when the events are equally likely to occur, optimizing on the complement entropy drives $\hat { \mathsf { y } } _ { i j }$ to $( 1 - \hat { \mathbf y } _ { i g } ) / ( K - 1 )$ , which essentially neutralizes the predicted probability of complement classes as $K$ grows large. In other words, maximizing the complement entropy “flattens” the predicted probabilities of complement classes $\hat { \mathsf { y } } _ { j \neq g }$ . We conjecture that, when $\hat { \mathsf { y } } _ { j \neq g }$ are neutralized, the neural net $h _ { \theta }$ generalizes better, since it is less likely to have an incorrect class with a sufficiently high predicted probability to “challenge” the ground-truth class.
|
| 59 |
+
|
| 60 |
+
# 2.2 TRAINING WITH COMPLEMENT OBJECTIVE
|
| 61 |
+
|
| 62 |
+
Given a training procedure using a primary objective, such as softmax cross entropy, one can easily adopt the complement entropy to turn the procedure into a Complement Objective Training (COT). Algorithm 1 describes the new training mechanism by alternating iteratively between the primary and complement objectives. At each training step, the cross entropy is first calculated as the loss value to update the model parameters; next, the complement entropy is calculated as the loss value to perform the second update. Therefore, additional forward and backward propagation are required in each iteration when using the complement objective, making the total training time empirically 1.6 times longer.
|
| 63 |
+
|
| 64 |
+
Table 1: Notations used in this paper.
|
| 65 |
+
|
| 66 |
+
<table><tr><td>Symbol</td><td>Meaning</td></tr><tr><td>yi yi</td><td>One-hot vector representing the label of the ith sample. The predicted probability for each class for the ith sample.</td></tr><tr><td>g</td><td>Index of the ground-truth class.</td></tr><tr><td>yij oryij ye</td><td>The jth class (element) of yi oryi.</td></tr><tr><td>H(,)</td><td>Predicted probabilities of of the complement (incorrect) classes.</td></tr><tr><td>H()</td><td>Cross entropy function. Entropy function.</td></tr><tr><td>C(.)</td><td></td></tr><tr><td>N and K</td><td>Complement entropy. Total number of samples and total number of classes.</td></tr></table>
|
| 67 |
+
|
| 68 |
+
<table><tr><td>Algorithm 1: Training by alternating between primary and complement objectives</td></tr><tr><td>1 for t ← 1 to ntrain_steps do</td></tr><tr><td>1N 2</td></tr><tr><td>1. Update parameters by Primary Objective: -1Σ-1log(𝑦ig)</td></tr></table>
|
| 69 |
+
|
| 70 |
+
# 3 EXPERIMENTS
|
| 71 |
+
|
| 72 |
+
We perform extensive experiments to evaluate COT on tasks in domains ranging from computer vision to natural language understanding and compare it with the baseline algorithms that achieve state-of-the-art in the respective domains. We also perform experiments to evaluate the robustness of the model trained by COT when attacked by adversarial examples. For each task, we select a stateof-the-art model that has an open-source implementation (referred to as “baseline”) and reproduce their results with the hyper-parameters reported in the paper or code repository. Our code is available at https://github.com/henry8527/COT.
|
| 73 |
+
|
| 74 |
+
# 3.1 BALANCING TRAINING OBJECTIVES
|
| 75 |
+
|
| 76 |
+
In theory, the loss values between the primary and the complement objectives can be in different scales; therefore, additional efforts for tuning learning rates might be required for optimizers to achieve the best performance. Empirically, we find the complement entropy in Eq(2) can be modified as follows to balance the losses between the two objectives:
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
\begin{array} { l } { { \displaystyle C ^ { \prime } ( \hat { \mathbf { y } } _ { \bar { c } } ) = \frac { 1 } { K - 1 } \cdot C ( \hat { \mathbf { y } } _ { \bar { c } } ) } } \\ { { \displaystyle ~ = \frac { 1 } { K - 1 } \cdot \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \mathcal { H } ( \hat { \mathbf { y } } _ { i \bar { c } } ) } } \end{array}
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
where $K$ is the number of classes. This modification can be treated as the complement entropy $C ( \cdot )$ being “normalized” by $( K - 1 )$ . For all the experiments conducted in this paper, we use this normalized complement entropy as the complement objective to improve the baselines without further tuning of learning rates.
|
| 83 |
+
|
| 84 |
+
# 3.2 IMAGE CLASSIFICATION
|
| 85 |
+
|
| 86 |
+
We consider the following datasets for experiments with image classification: CIFAR-10, CIFAR100, SVHN, Tiny ImageNet and ImageNet-2012. For CIFAR-10, CIFAR-100 and SVHN, we choose the following baseline models: ResNet-110 (He et al., 2016b), PreAct ResNet-18 (He et al., 2016a), ResNeXt-29 $( 2 \times 6 4 \mathrm { d } )$ (Xie et al., 2017), WideResNet-28-10 (Zagoruyko & Komodakis, 2016) and DenseNet-BC-121 (Huang et al., 2017b) with a growth rate of 32. For those five models, we use a consistent set of settings below, which is described in (He et al., 2016b). Specifically, the models are trained using SGD optimizer with momentum of 0.9. Weight decay is set to be 0.0001 and learning rate starts at 0.1, then being divided by 10 at the $1 0 0 ^ { \mathrm { { t h } } }$ and $1 5 \dot { 0 } ^ { \mathrm { t h } }$ epoch. The models are trained for 200 epochs, with mini-batches of size 128. The only exception here is for training WideResNet-28-10, we follow the settings described in (Zagoruyko & Komodakis, 2016), and the learning rate is divided by 10 at the $6 0 ^ { \mathrm { { \bar { t } h } } }$ , $1 2 0 ^ { \mathrm { t h } }$ and $1 8 0 ^ { \mathrm { t h } }$ epoch. In addition, no dropout (Srivastava et al., 2014) is applied to any baseline according to the best practices in (Ioffe & Szegedy, 2015). For Tiny ImageNet and ImageNet-2012, the baseline models are slightly different: we follow the settings from (Zhang et al., 2018), and the details are described in the corresponding paragraphs.
|
| 87 |
+
|
| 88 |
+
CIFAR-10 and CIFAR-100. CIFAR-10 and CIFAR-100 are datasets (Krizhevsky, 2009) that contain colored natural images of $3 2 \mathrm { x } 3 2 $ pixels, in 10 and 100 classes, respectively. We follow the baseline settings (He et al., 2016b) to pre-process the datasets; both datasets are split into a training set with 50,000 samples and a testing set with 10,000 samples. During training, zero-padding, random cropping, and horizontal mirroring are applied to the images with a probability of 0.5. For the testing images, we use the original images of $3 2 \mathrm { x } 3 2 $ pixels.
|
| 89 |
+
|
| 90 |
+
A comparison between the models trained using the primary objective and the COT model is illustrated in Figures 3a and 4a for CIFAR-10 and CIFAR-100 respectively. We show that COT consistently outperforms the baseline models. Some of the models, for example, ResNetXt-29, achieves a significant performance boost of $12 . 5 \%$ in terms of classification errors. For some other models such as WideResNet-28-10 and DenseNet-BC-121, the improvements are not as significant but are still large enough to justify the differences. Similar conclusions can be observed from the CIFAR-100 dataset. In addition to the comparisons of the performance, we also present the change of testing errors over the course of the training in Figures 3b and 4b for the ResNet-110 model. Following the standard training practice, learning rates drop after the $1 0 0 ^ { \mathrm { t h } }$ epoch, which corresponds to a drop in testing errors. As we can see from the plot, COT outperforms consistently compared to the baseline models when the models are close to the convergence.
|
| 91 |
+
|
| 92 |
+
Street View House Numbers (SVHN). The SVHN dataset (Netzer et al., 2011) consists of images extracted from Google Street View. We divide the dataset into a set of 73,257 digits for training and a set of 26,032 digits for testing. When pre-processing the training and validation images, we follow the general practice to normalize pixel values into [-1,1]. Table 2 shows the experimental results and confirms that COT consistently improves the baseline models with the biggest improvement being the ResNet-110 with $1 1 . 7 \%$ reduction on the error rate.
|
| 93 |
+
|
| 94 |
+
<table><tr><td>Model</td><td>Baseline</td><td>COT</td></tr><tr><td>ResNet-110</td><td>7.56</td><td>6.84 (6.99±0.12)</td></tr><tr><td>PreActResNet-18</td><td>5.46</td><td>4.86 (5.08±0.14)</td></tr><tr><td>ResNeXt-29 (2×64d)</td><td>5.20</td><td>4.55 (4.69±0.12)</td></tr><tr><td>WideResNet-28-10</td><td>4.40</td><td>4.30 (4.34±0.03)</td></tr><tr><td>DenseNet-BC-121</td><td>4.72</td><td>4.62 (4.67±0.03)</td></tr></table>
|
| 95 |
+
|
| 96 |
+
(a) Test errors (in $\%$ ) on CIFAR-10. For COT, we repeat 5 runs and report the “best (mean $\pm$ std)” error values.
|
| 97 |
+
|
| 98 |
+

|
| 99 |
+
(b) Test errors of ResNet-110 on CIFAR-10 over epochs.
|
| 100 |
+
|
| 101 |
+
Figure 3: Classification errors on CIFAR-10: (a) COT improves all 5 state-of-the-art models. (b) The improvement over epochs. Notice that the performance improvement from COT becomes stable after the $1 0 0 ^ { \mathrm { t h } }$ epoch due to the learning rate decrease.
|
| 102 |
+
|
| 103 |
+
<table><tr><td>Model</td><td>Baseline</td><td>COT</td></tr><tr><td>ResNet-110</td><td>29.22</td><td>27.90</td></tr><tr><td>PreAct ResNet-18</td><td>25.44</td><td>24.73</td></tr><tr><td>ResNeXt-29 (2×64d)</td><td>23.45</td><td>21.90</td></tr><tr><td>WideResNet-28-10</td><td>21.91</td><td>20.99</td></tr><tr><td>DenseNet-BC-121</td><td>21.73</td><td>20.54</td></tr></table>
|
| 104 |
+
|
| 105 |
+
(a) Test errors (in $\%$ ) on CIFAR-100. For COT, we repeat 3 runs and report the mean value.
|
| 106 |
+
|
| 107 |
+

|
| 108 |
+
(b) Test errors of ResNet-110 on CIFAR-100 over the epochs.
|
| 109 |
+
|
| 110 |
+
Figure 4: Classification errors on CIFAR-100: (a) COT improves all 5 state-of-the-art models. (b) The improvement over epochs. Similar to the trend observed in CIFAR-10, the performance improvement from COT becomes stable after the $1 0 0 ^ { \mathrm { t h } }$ epoch due to the learning rate decrease.
|
| 111 |
+
|
| 112 |
+
Table 2: Test errors $( \mathrm { i n } \% )$ of the baseline models and the COT-trained models on the SVHN dataset. The values presented are the mean values of 3 runs.
|
| 113 |
+
|
| 114 |
+
<table><tr><td>Model</td><td>Baseline</td><td>COT</td></tr><tr><td>ResNet-110</td><td>4.94</td><td>4.36</td></tr><tr><td>PreAct ResNet-18</td><td>4.31</td><td>3.96</td></tr><tr><td>ResNeXt-29 (2×64d)</td><td>4.22</td><td>3.76</td></tr><tr><td>WideResNet-28-10</td><td>3.72</td><td>3.50</td></tr><tr><td>DenseNet-BC-121</td><td>3.52</td><td>3.47</td></tr></table>
|
| 115 |
+
|
| 116 |
+
Tiny ImageNet. Tiny ImageNet1 dataset is a subset of ImageNet (Deng et al., 2009), which contains 100,000 images for training and 10,000 for testing images across 200 classes. In this dataset, each image is down-sampled to $6 4 \mathrm { x } 6 4$ pixels from the original $2 5 6 \mathrm { x } 2 5 6$ pixels. We consider four state-of-the-art models as baselines: ResNet-50, ResNet-101 (He et al., 2016b), ResNeXt-50 $( 3 2 \times 4 \mathrm { d } )$ and ResNeXt-101 $( 3 2 \times 4 \mathrm { d } )$ (Xie et al., 2017). During training, we follow the standard data-augmentation techniques, such as random cropping, horizontal flipping, and normalization. For each model, the stride of the first convolution layer is modified to adapt images of size $6 4 \mathrm { x } 6 4$ (Huang et al., 2017a). For evaluation, the testing data is only augmented with 56x56 central cropping. The rest of the experimental details are the same as the ones described at the beginning of Section 3.2. Table 3 provides the experimental results, which demonstrate that COT consistently improves the performance of all baseline models.
|
| 117 |
+
|
| 118 |
+
Table 3: Top-1 Validation errors (in $\%$ ) for the Tiny ImageNet experiments (mean values of 3 runs).
|
| 119 |
+
|
| 120 |
+
<table><tr><td>Model</td><td>Baseline</td><td>COT</td></tr><tr><td>ResNet-50</td><td>39.39</td><td>39.20</td></tr><tr><td>ResNet-101</td><td>38.23</td><td>37.35</td></tr><tr><td>ResNeXt-50 (32×4d)</td><td>37.36</td><td>36.69</td></tr><tr><td>ResNeXt-101 (32×4d)</td><td>37.02</td><td>36.14</td></tr></table>
|
| 121 |
+
|
| 122 |
+
ImageNet. ImageNet-2012 dataset (Russakovsky et al., 2015) is one of the largest datasets for image classification, which contains 1.3 million images for training and 50,000 images for testing with 1,000 classes. Random crops and horizontal flips are applied during training (He et al., 2016b), while images in the testing set use $2 2 4 \mathbf { x } 2 2 4$ center crops (1-crop testing) for data augmentation. ResNet-50 is selected as the baseline model, and we follow (Goyal et al., 2017) for the experimental setup: 256 minibatch size, 90 total training epochs, and 0.1 as the initial learning rate starting that is decayed by dividing 10 at the $3 0 ^ { \mathrm { t h } }$ , $6 0 ^ { \mathrm { \tilde { t h } } }$ and $8 0 ^ { \mathrm { t h } }$ epoch. Table 4 shows (a) the error rate2 of baseline reported by (He et al., 2016b) and (b) the error rate of baseline model trained by COT, which confirms COT further improves the baseline performance.
|
| 123 |
+
|
| 124 |
+
Table 4: Validation errors $( \mathrm { i n } \% )$ ) for the ImageNet-2012 experiments.
|
| 125 |
+
|
| 126 |
+
<table><tr><td>Model</td><td></td><td>Baseline</td><td>COT</td></tr><tr><td>ResNet-50</td><td>Top-1 Error</td><td>24.7</td><td>24.4</td></tr></table>
|
| 127 |
+
|
| 128 |
+
# 3.3 NATURAL LANGUAGE UNDERSTANDING
|
| 129 |
+
|
| 130 |
+
COT is also evaluated on two natural language understanding (NLU) tasks: machine translation and speech recognition. One distinct characteristic of most NLU tasks is a large number of target classes. For example, the machine translation dataset used in this paper, IWSLT 2015 English-Vietnamese (Cettolo et al., 2015), consists of vocabularies of 17,191 English words and 7,709 Vietnamese words. This necessitates the normalized complement entropy in Eq(3).
|
| 131 |
+
|
| 132 |
+
Machine translation. Neural machine translation (NMT) has popularized the use of neural sequence models (Sutskever et al., 2014; Cho et al., 2014). Specifically, we apply COT on the seq2seq model with Luong attention mechanism (Luong et al., 2015) on the IWSLT 2015 EnglishVietnamese dataset, which contains 133 thousand translation pairs. For validation and testing, we use TED tst2012 and TED tst2013, respectively. For the baseline implementation, we follow the official TensorFlow-NMT implementation3. That is, the number of total training steps is 12,000 and the weight decay starts at the $8 { , } 0 0 0 ^ { \mathrm { t h } }$ step then applied for every 1,000 steps. We experiment models with both greedy decoder and beam search decoder. The model trained by COT gives the best testing results when the beam width is 3, while the baseline uses 10 as the best beam width. Table 5 illustrates the experimental results, showing COT improves testing BLEU scores compared to the baseline NMT model on both greedy decoder and the beam search decoder.
|
| 133 |
+
|
| 134 |
+
Table 5: Results of IWSLT 2015 English-Vietnamese. The BLEU scores on tst2013 are reported.
|
| 135 |
+
|
| 136 |
+
<table><tr><td>Model</td><td>Baseline</td><td>COT</td></tr><tr><td>NMT (greedy)</td><td>25.5</td><td>25.7</td></tr><tr><td>NMT (beam search)</td><td>26.1</td><td>26.4</td></tr></table>
|
| 137 |
+
|
| 138 |
+
Speech recognition. For speech recognition, we experiment on Google Commands Dataset (Warden, 2018), which consists of 65,000 one-second utterances of 30 different types such as “Yes,” “No,” “Up,” “Down” and “Stop.” Our baseline model is referenced from (Zhang et al., 2018). We apply the same pre-processing steps as shown in the paper, and perform the short-time Fourier transform on the original waveforms first at a sampling rate of $4 \mathrm { k H z }$ to receive the corresponding spectrograms. We then zero-pad these spectrograms to equalize each sample’s length. For the baseline model, we select VGG-11 (Simonyan & Zisserman, 2014) and train the model for 30 epochs following the steps in (Zhang et al., 2018). We use SGD optimizer with momentum, and weight decay is 0.0001. The learning rate starts at 0.0001 and then is divided by 10 at the $1 0 ^ { \mathrm { t h } }$ and $2 0 ^ { \mathrm { { t h } } }$ epoch. COT improves the baseline by further reducing the error rate by $1 . 5 6 \%$ , as shown in Table 6.
|
| 139 |
+
|
| 140 |
+
# 3.4 ADVERSARIAL EXAMPLES
|
| 141 |
+
|
| 142 |
+
An adversarial example is an imperceptibly-perturbed input that results in the model outputting an incorrect answer with high confidence (Szegedy et al., 2014; Goodfellow et al., 2015). Prior literatures have shown that there are several methods to generate effective adversarial examples that greatly mislead the model toward providing wrong predictions.
|
| 143 |
+
|
| 144 |
+
Table 6: Test errors (in $\%$ ) on Google Commands Dataset (mean values of 3 runs).
|
| 145 |
+
|
| 146 |
+
<table><tr><td>Model</td><td>Baseline</td><td>COT</td></tr><tr><td>VGG-11</td><td>6.06</td><td>4.50</td></tr></table>
|
| 147 |
+
|
| 148 |
+
As shown in Figure 2, the proposed COT generates embeddings where the class boundaries are clear and well-separated. We believe that the models trained using COT generalize better and are more robust to adversarial attacks. To verify this conjecture, we conduct experiments of white-box attacks to the models trained by COT. We consider a common approach of single-step adversarial attacks: Fast Gradient Sign Method (FGSM) (Goodfellow et al., 2015) that uses the gradient to determine the direction of the perturbation to apply on an input for creating an adversarial example. To set up FGSM white-box attacks on a baseline model, adversarial examples are generated using the gradients calculated based on the primary objective (referred to as the “primary gradient”) of the baseline model. For FGSM white-box attacks on COT, adversarial perturbations are generated based on the sum of the primary gradient and the complement gradient (i.e., the gradient calculated from the complement objective), both gradients from the model trained by COT. In our experiments, the baseline models are the same as in Section 3.2, and the amount of perturbation is limited to a maximum value of 0.1 as described in (Goodfellow et al., 2015) when creating adversarial examples. Furthermore, we also conduct experiments on FGSM transfer attacks, which use the adversarial examples from a baseline model to attack and test the robustness of the model trained by COT.
|
| 149 |
+
|
| 150 |
+
Table 7: Classification errors $( \mathrm { i n } \% )$ ) on CIFAR-10 under FGSM white-box & transfer attacks.
|
| 151 |
+
|
| 152 |
+
<table><tr><td>Model</td><td>Baseline</td><td>COT (White-Box)</td><td>COT (Transfer)</td></tr><tr><td>ResNet-110</td><td>62.23</td><td>52.72</td><td>54.96</td></tr><tr><td>PreAct ResNet-18</td><td>65.60</td><td>56.17</td><td>59.39</td></tr><tr><td>ResNeXt-29 (2×64d)</td><td>70.24</td><td>61.55</td><td>65.83</td></tr><tr><td>WideResNet-28-10</td><td>59.39</td><td>55.53</td><td>57.33</td></tr><tr><td>DenseNet-BC-121</td><td>65.97</td><td>55.99</td><td>62.40</td></tr></table>
|
| 153 |
+
|
| 154 |
+
Table 7 shows the performance of the models on the CIFAR-10 dataset under FGSM white-box and transfer attacks. Generally, the models trained using COT have lower classification error under both FGSM white-box and transfer attacks, which is an indicator that COT models are more robust to both kinds of attacks. We also conduct experiments on the basic iterative attacks using I-FGSM (Kurakin et al., 2017) and the corresponding results can be found in Appendix A.
|
| 155 |
+
|
| 156 |
+
We conjecture that since the main goal of the complement gradients is to neutralize the probabilities of incorrect classes (instead of maximizing the probability of the correct class), the complement gradients may “push away” primary gradients when forming adversarial perturbations, which might partially answer why COT is more robust to FGSM white-box attacks compared to the baseline. Regarding the transfer attacks, only the primary objective of the baseline model is used to calculate the gradients for generating adversarial examples. In other words, the complement gradients are not considered when generating adversarial examples in the transfer attack, and this might be the reason why models trained by COT are more robust to transfer attacks. Both conjectures leave a large space for future work: using complement objective to defend against more advanced adversarial attacks.
|
| 157 |
+
|
| 158 |
+
# 4 CONCLUSION AND FUTURE WORK
|
| 159 |
+
|
| 160 |
+
In this paper, we study Complement Objective Training (COT), a new training paradigm that optimizes the complement objective in addition to the primary objective. We propose complement entropy as the complement objective for neutralizing the effects of complement (incorrect) classes.
|
| 161 |
+
|
| 162 |
+
Models trained using COT demonstrate superior performance compared to the baseline models. We also find that COT makes the models robust to single-step adversarial attacks.
|
| 163 |
+
|
| 164 |
+
COT can be extended in several ways: first, in this paper, the complement objective is chosen to be the complement entropy. Non-entropy-based complement objectives should also be considered for future studies, which is left as a straight-line future work. Secondly, the exploration of COT on broader applications remains as an open research question. One example would be applying COT on generative models such as Generative Adversarial Networks (Goodfellow et al., 2014). Another example would be using COT on object detection and segmentation. Finally, in this work, we show using complement objective help defend single-step adversarial attacks; the behavior of COT on more advanced adversarial attacks deserves further investigation and is left as another future work.
|
| 165 |
+
|
| 166 |
+
# REFERENCES
|
| 167 |
+
|
| 168 |
+
Mauro Cettolo, Jan Niehues, Sebastian Stu ker, Luisa Bentivogli, Roldano Cattoni, and Marcello Federico. The IWSLT 2015 evaluation campaign. In ICSLP’15, 2015.
|
| 169 |
+
Kyunghyun Cho, Bart van Merrienboer, C¸ aglar Gulc¸ehre, Fethi Bougares, Holger Schwenk, and ¨ Yoshua Bengio. Learning phrase representations using rnn encoder-decoder for statistical machine translation. In EMNLP’14, 2014.
|
| 170 |
+
Jia Deng, Wei Dong, Richard Socher, Li jia Li, Kai Li, and Li Fei-fei. ImageNet: A large-scale hierarchical image database. In CVPR’09, 2009.
|
| 171 |
+
Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NIPS’14. 2014.
|
| 172 |
+
Ian Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In ICLR’15, 2015.
|
| 173 |
+
Priya Goyal, Piotr Dollar, Ross B. Girshick, Pieter Noordhuis, Lukasz Wesolowski, Aapo Kyrola, ´ Andrew Tulloch, Yangqing Jia, and Kaiming He. Accurate, large minibatch SGD: Training ImageNet in 1 hour. arXiv preprint arXiv:1706.02677, 2017.
|
| 174 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In ECCV’16, 2016a.
|
| 175 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR’16, 2016b.
|
| 176 |
+
Gao Huang, Yixuan Li, Geoff Pleiss, Zhuang Liu, John E. Hopcroft, and Kilian Q. Weinberger. Snapshot ensembles: Train 1, get M for free. In ICLR’17, 2017a.
|
| 177 |
+
Gao Huang, Zhuang Liu, Laurens van der Maaten, and Kilian Q. Weinberger. Densely connected convolutional networks. In CVPR’17, 2017b.
|
| 178 |
+
Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML’15, 2015.
|
| 179 |
+
Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, 2009.
|
| 180 |
+
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In NIPS’12, 2012.
|
| 181 |
+
Solomon Kullback and Richard A. Leibler. On information and sufficiency. Ann. Math. Statist., 1951.
|
| 182 |
+
Alexey Kurakin, Ian J. Goodfellow, and Samy Bengio. Adversarial examples in the physical world. In ICLR’17 Workshop, 2017.
|
| 183 |
+
Minh-Thang Luong, Hieu Pham, and Christopher D. Manning. Effective approaches to attentionbased neural machine translation. In EMNLP’15, 2015.
|
| 184 |
+
Tom M Mitchell et al. Machine learning. Burr Ridge, IL: McGraw Hill, 1997.
|
| 185 |
+
|
| 186 |
+
Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y. Ng. Reading digits in natural images with unsupervised feature learning. In NIPS’11 Workshop, 2011.
|
| 187 |
+
|
| 188 |
+
Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision, 2015.
|
| 189 |
+
|
| 190 |
+
Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR’15, 2014.
|
| 191 |
+
|
| 192 |
+
Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. Journal of Machine Learning Research, 2014.
|
| 193 |
+
|
| 194 |
+
Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. Sequence to sequence learning with neural networks. In NIPS’14, 2014.
|
| 195 |
+
|
| 196 |
+
Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In ICLR’14, 2014.
|
| 197 |
+
|
| 198 |
+
Pete Warden. Speech Commands: A dataset for limited-vocabulary speech recognition. arXiv preprint arXiv:1804.03209, 2018.
|
| 199 |
+
|
| 200 |
+
Saining Xie, Ross B. Girshick, Piotr Dollar, Zhuowen Tu, and Kaiming He. Aggregated residual ´ transformations for deep neural networks. In CVPR’17, 2017.
|
| 201 |
+
|
| 202 |
+
Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. In BMVC’16, 2016.
|
| 203 |
+
|
| 204 |
+
Hongyi Zhang, Moustapha Cisse, Yann N. Dauphin, and David Lopez-Paz. Mixup: Beyond empirical risk minimization. In ICLR’18, 2018.
|
| 205 |
+
|
| 206 |
+
# A ITERATIVE FAST GRADIENT SIGN METHOD
|
| 207 |
+
|
| 208 |
+
Table 8: Classification errors $( \mathrm { i n } \%$ ) on CIFAR-10 under I-FGSM transfer attacks.
|
| 209 |
+
|
| 210 |
+
<table><tr><td>Model</td><td>Baseline</td><td>COT (Transfer)</td></tr><tr><td>ResNet-110</td><td>88.00</td><td>84.36</td></tr><tr><td>PreAct ResNet-18</td><td>84.56</td><td>83.77</td></tr><tr><td>ResNeXt-29 (2× 64d)</td><td>87.79</td><td>86.43</td></tr><tr><td>WideResNet-28-10</td><td>81.97</td><td>80.85</td></tr><tr><td>DenseNet-BC-121</td><td>86.95</td><td>83.66</td></tr></table>
|
| 211 |
+
|
| 212 |
+
Table 8 shows the performance of the models on the CIFAR-10 dataset under I-FGSM transfer attacks. Generally, the models trained using COT have lower classification error under I-FGSM transfer attacks. The number of iteration is set to 10 in the experiment.
|
md/train/Hye4WaVYwr/Hye4WaVYwr.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
md/train/HyeVtoRqtQ/HyeVtoRqtQ.md
ADDED
|
@@ -0,0 +1,443 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# TRELLIS NETWORKS FOR SEQUENCE MODELING
|
| 2 |
+
|
| 3 |
+
Shaojie Bai Carnegie Mellon University
|
| 4 |
+
|
| 5 |
+
J. Zico Kolter Carnegie Mellon University and Bosch Center for AI
|
| 6 |
+
|
| 7 |
+
Vladlen Koltun Intel Labs
|
| 8 |
+
|
| 9 |
+
# ABSTRACT
|
| 10 |
+
|
| 11 |
+
We present trellis networks, a new architecture for sequence modeling. On the one hand, a trellis network is a temporal convolutional network with special structure, characterized by weight tying across depth and direct injection of the input into deep layers. On the other hand, we show that truncated recurrent networks are equivalent to trellis networks with special sparsity structure in their weight matrices. Thus trellis networks with general weight matrices generalize truncated recurrent networks. We leverage these connections to design high-performing trellis networks that absorb structural and algorithmic elements from both recurrent and convolutional models. Experiments demonstrate that trellis networks outperform the current state of the art methods on a variety of challenging benchmarks, including word-level language modeling and character-level language modeling tasks, and stress tests designed to evaluate long-term memory retention. The code is available here1.
|
| 12 |
+
|
| 13 |
+
# 1 INTRODUCTION
|
| 14 |
+
|
| 15 |
+
What is the best architecture for sequence modeling? Recent research has produced significant progress on multiple fronts. Recurrent networks, such as LSTMs, continue to be optimized and extended (Merity et al., 2018b; Melis et al., 2018; Yang et al., 2018; Trinh et al., 2018). Temporal convolutional networks have demonstrated impressive performance, particularly in modeling longrange context (van den Oord et al., 2016; Dauphin et al., 2017; Bai et al., 2018). And architectures based on self-attention are gaining ground (Vaswani et al., 2017; Santoro et al., 2018).
|
| 16 |
+
|
| 17 |
+
In this paper, we introduce a new architecture for sequence modeling, the Trellis Network. We aim to both improve empirical performance on sequence modeling benchmarks and shed light on the relationship between two existing model families: recurrent and convolutional networks.
|
| 18 |
+
|
| 19 |
+
On the one hand, a trellis network is a special temporal convolutional network, distinguished by two unusual characteristics. First, the weights are tied across layers. That is, weights are shared not only by all time steps but also by all network layers, tying them into a regular trellis pattern. Second, the input is injected into all network layers. That is, the input at a given time-step is provided not only to the first layer, but directly to all layers in the network. So far, this may seem merely as a peculiar convolutional network for processing sequences, and not one that would be expected to perform particularly well.
|
| 20 |
+
|
| 21 |
+
Yet on the other hand, we show that trellis networks generalize truncated recurrent networks (recurrent networks with bounded memory horizon). The precise derivation of this connection is one of the key contributions of our work. It allows trellis networks to serve as bridge between recurrent and convolutional architectures, benefitting from algorithmic and architectural techniques developed in either context. We leverage these relationships to design high-performing trellis networks that absorb ideas from both architectural families. Beyond immediate empirical gains, these connections may serve as a step towards unification in sequence modeling.
|
| 22 |
+
|
| 23 |
+
We evaluate trellis networks on challenging benchmarks, including word-level language modeling on the standard Penn Treebank (PTB) and the much larger WikiText-103 (WT103) datasets; character-level language modeling on Penn Treebank; and standard stress tests (e.g. sequential MNIST, permuted MNIST, etc.) designed to evaluate long-term memory retention. On word-level
|
| 24 |
+
|
| 25 |
+
Penn Treebank, a trellis network outperforms by more than a unit of perplexity the recent architecture search work of Pham et al. (2018), as well as the recent results of Melis et al. (2018), which leveraged the Google Vizier service for exhaustive hyperparameter search. On character-level Penn Treebank, a trellis network outperforms the thorough optimization work of Merity et al. (2018a). On word-level WikiText-103, a trellis network outperforms by $7 . 6 \%$ in perplexity the contemporaneous self-attention-based Relational Memory Core (Santoro et al., 2018), and by $1 1 . 5 \%$ the work of Merity et al. (2018a). (Concurrently with our work, Dai et al. (2019) employ a transformer and achieve even better results on WikiText-103.) On stress tests, trellis networks outperform recent results achieved by recurrent networks and self-attention (Trinh et al., 2018). It is notable that the prior state of the art across these benchmarks was held by models with sometimes dramatic mutual differences.
|
| 26 |
+
|
| 27 |
+
# 2 BACKGROUND
|
| 28 |
+
|
| 29 |
+
Recurrent networks (Elman, 1990; Werbos, 1990; Graves, 2012), particularly with gated cells such as LSTMs (Hochreiter & Schmidhuber, 1997) and GRUs (Cho et al., 2014), are perhaps the most popular architecture for modeling temporal sequences. Recurrent architectures have been used to achieve breakthrough results in natural language processing and other domains (Sutskever et al., 2011; Graves, 2013; Sutskever et al., 2014; Bahdanau et al., 2015; Vinyals et al., 2015; Karpathy & Li, 2015). Convolutional networks have also been widely used for sequence processing (Waibel et al., 1989; Collobert et al., 2011). Recent work indicates that convolutional networks are effective on a variety of sequence modeling tasks, particularly ones that demand long-range information propagation (van den Oord et al., 2016; Kalchbrenner et al., 2016; Dauphin et al., 2017; Gehring et al., 2017; Bai et al., 2018). A third notable approach to sequence processing that has recently gained ground is based on self-attention (Vaswani et al., 2017; Santoro et al., 2018; Chen et al., 2018). Our work is most closely related to the first two approaches. In particular, we establish a strong connection between recurrent and convolutional networks and introduce a model that serves as a bridge between the two. A related recent theoretical investigation showed that under a certain stability condition, recurrent networks can be well-approximated by feed-forward models (Miller & Hardt, 2018).
|
| 30 |
+
|
| 31 |
+
There have been many combinations of convolutional and recurrent networks (Sainath et al., 2015). For example, convolutional LSTMs combine convolutional and recurrent units (Donahue et al., 2015; Venugopalan et al., 2015; Shi et al., 2015). Quasi-recurrent neural networks interleave convolutional and recurrent layers (Bradbury et al., 2017). Techniques introduced for convolutional networks, such as dilation, have been applied to RNNs (Chang et al., 2017). Our work establishes a deeper connection, deriving a direct mapping across the two architectural families and providing a structural bridge that can incorporate techniques from both sides.
|
| 32 |
+
|
| 33 |
+
# 3 SEQUENCE MODELING AND TRELLIS NETWORKS
|
| 34 |
+
|
| 35 |
+
Sequence modeling. Given an input $x _ { 1 : T } = x _ { 1 } , . . . , x _ { T }$ with sequence length $T$ , a sequence model is any function $G : { \overset { \smile } { \chi } } ^ { T } \to { \mathcal { V } } ^ { T }$ such that
|
| 36 |
+
|
| 37 |
+
$$
|
| 38 |
+
y _ { 1 : T } = y _ { 1 } , \ldots , y _ { T } = G ( x _ { 1 } , \ldots , x _ { T } ) ,
|
| 39 |
+
$$
|
| 40 |
+
|
| 41 |
+
where $y _ { t }$ should only depend on $x _ { 1 : t }$ and not on $x _ { t + 1 : T }$ (i.e. no leakage of information from the future). This causality constraint is essential for autoregressive modeling.
|
| 42 |
+
|
| 43 |
+
In this section, we describe a new architecture for sequence modeling, referred to as a trellis network or TrellisNet. In particular, we provide an atomic view of TrellisNet, present its fundamental features, and highlight the relationship to convolutional networks. Section 4 will then elaborate on the relationship of trellis networks to convolutional and recurrent models.
|
| 44 |
+
|
| 45 |
+
Notation. We use $\boldsymbol { x } _ { 1 : T } = ( x _ { 1 } , \dots , x _ { T } )$ to denote a length- $\mathcal { T }$ input sequence, where vector $\boldsymbol { x } _ { t } \in \mathbb { R } ^ { p }$ is the input at time step $t$ . Thus $\boldsymbol { x } _ { 1 : T } \in \mathbb { R } ^ { T \times p }$ . We use $\boldsymbol { z } _ { t } ^ { ( i ) } \in \mathbb { R } ^ { q }$ to represent the hidden unit at time $t$ in layer $i$ of the network. We use $\mathrm { C o n v 1 D } ( x ; W )$ to denote a 1D convolution with a kernel $W$ applied to input $x = x _ { 1 : T }$ .
|
| 46 |
+
|
| 47 |
+
A basic trellis network. At the most basic level, a feature vector z(i+1)t+1 at time step $t + 1$ and level $i + 1$ of TrellisNet is computed via three steps, illustrated in Figure 1a:
|
| 48 |
+
|
| 49 |
+

|
| 50 |
+
Figure 1: The interlayer transformation of TrellisNet, at an atomic level (time steps $t$ and $t + 1$ layers $i$ and $i + 1$ ) and on a longer sequence (time steps 1 to 8, layers $i$ and $i + 1$ ).
|
| 51 |
+
|
| 52 |
+
1. The hidden input comprises the hidden outputs z(i)t , z(i)t+1 $z _ { t + 1 } ^ { ( i ) } \in \mathbb { R } ^ { q }$ from the previous layer $i$ , as well as an injection of the input vectors $x _ { t } , x _ { t + 1 }$ . At level 0, we initialize to $z _ { t } ^ { ( 0 ) } = \mathbf { 0 }$ .
|
| 53 |
+
|
| 54 |
+
2. A pre-activation output $\hat { z } _ { t + 1 } ^ { ( i + 1 ) } \in \mathbb { R } ^ { r }$ is produced by a feed-forward linear transformation:
|
| 55 |
+
|
| 56 |
+
$$
|
| 57 |
+
\hat { z } _ { t + 1 } ^ { ( i + 1 ) } = W _ { 1 } \left[ { x _ { t } } ^ { } \atop { z _ { t } ^ { ( i ) } } \right] + W _ { 2 } \left[ { x _ { t + 1 } } ^ { } \right] ,
|
| 58 |
+
$$
|
| 59 |
+
|
| 60 |
+
where W1, W2 ∈ Rr×(p+q) are weights, and r is the size of the pre-activation output zˆ(i+1)t+1 , (Here and throughout the paper, all linear transformations can include additive biases. We omit these for clarity.)
|
| 61 |
+
|
| 62 |
+
3. The output z(i+1)t+1 is produced by a nonlinear activation function $f : \mathbb { R } ^ { r } \times \mathbb { R } ^ { q } \to \mathbb { R } ^ { q }$ applied to the pre-activation output $\hat { z } _ { t + 1 } ^ { ( i + 1 ) }$ and the output $ { \boldsymbol { z } } _ { t } ^ { ( i ) }$ × →from the previous layer. More formally, $z _ { t + 1 } ^ { ( i + 1 ) } = f \left( \hat { z } _ { t + 1 } ^ { ( i + 1 ) } , z _ { t } ^ { ( i ) } \right)$ .
|
| 63 |
+
|
| 64 |
+
A full trellis network can be built by tiling this elementary procedure across time and depth. Given
|
| 65 |
+
an input sequence $x _ { 1 : T }$ , we apply the same production procedure across all time steps and all layers,
|
| 66 |
+
using the same weights. The transformation is the same for all elements in the temporal dimen
|
| 67 |
+
sion and in the depth dimension. This is illustrated in Figure 1b. Note that since we inject the
|
| 68 |
+
same input sequence at every layer of the TrellisNet, we can precompute the linear transformation
|
| 69 |
+
$\tilde { x } _ { t + 1 } = W _ { 1 } ^ { x } x _ { t } + W _ { 2 } ^ { x } x _ { t + 1 }$ l layers propria $i$ . This identical linear combination of th linear combination of the hidden units, $i$ $\bar { W _ { 1 } ^ { z } z _ { t } ^ { ( i ) } + W _ { 2 } ^ { z } z _ { t + 1 } ^ { ( i ) } }$ $W _ { j } ^ { x } \in \mathbb { R } ^ { r \times p }$ $W _ { j } ^ { z } \in \mathbb { R } ^ { r \times q }$
|
| 70 |
+
|
| 71 |
+
Now observe that in each level of the network, we are in effect performing a 1D convolution over the hidden units $z _ { 1 : T } ^ { ( i ) }$ . The output of this convolution is then passed through the activation function $f$ . Formally, with $\ddot { W } \in \mathbb { R } ^ { r \times q }$ as the kernel weight matrix, the computation in layer $i$ can be summarized as follows (Figure 1b):
|
| 72 |
+
|
| 73 |
+
$$
|
| 74 |
+
\hat { z } _ { 1 : T } ^ { ( i + 1 ) } = \mathrm { C o n v } \ln \left( z _ { 1 : T } ^ { ( i ) } ; W \right) + \tilde { x } _ { 1 : T } , \qquad z _ { 1 : T } ^ { ( i + 1 ) } = f \left( \hat { z } _ { 1 : T } ^ { ( i + 1 ) } , z _ { 1 : T - 1 } ^ { ( i ) } \right) .
|
| 75 |
+
$$
|
| 76 |
+
|
| 77 |
+
The resulting network operates in feed-forward fashion, with deeper elements having progressively larger receptive fields. There are, however, important differences from typical (temporal) convolutional networks. Notably, the filter matrix is shared across all layers. That is, the weights are tied not only across time but also across depth. (Vogel & Pock (2017) have previously tied weights across depth in image processing.) Another difference is that the transformed input sequence $\tilde { x } _ { 1 : T }$ is directly injected into each hidden layer. These differences and their importance will be analyzed further in Section 4.
|
| 78 |
+
|
| 79 |
+
The activation function $f$ in Equation (3) can be any nonlinearity that processes the pre-activation output $\hat { z } _ { 1 : T } ^ { ( i + 1 ) }$ and the output from the previous layer $z _ { 1 : T - 1 } ^ { ( i ) }$ . We will later describe an activation function based on the LSTM cell. The rationale for its use will become clearer in light of the analysis presented in the next section.
|
| 80 |
+
|
| 81 |
+
# 4 TRELLISNET, TCN, AND RNN
|
| 82 |
+
|
| 83 |
+
In this section, we analyze the relationships between trellis networks, convolutional networks, and recurrent networks. In particular, we show that trellis networks can serve as a bridge between convolutional and recurrent networks. On the one hand, TrellisNet is a special form of temporal convolutional networks (TCN); this has already been clear in Section 3 and will be discussed further in Section 4.1. On the other hand, any truncated RNN can be represented as a TrellisNet with special structure in the interlayer transformations; this will be the subject of Section 4.2. These connections allow TrellisNet to harness architectural elements and regularization techniques from both TCNs and RNNs; this will be summarized in Section 4.3.
|
| 84 |
+
|
| 85 |
+
# 4.1 TRELLISNET AND TCN
|
| 86 |
+
|
| 87 |
+
We briefly introduce TCNs here, and refer the readers to Bai et al. (2018) for a more thorough discussion. Briefly, a temporal convolutional network (TCN) is a ConvNet that uses one-dimensional convolutions over the sequence. The convolutions are causal, meaning that, at each layer, the transformation at time $t$ can only depend on previous layer units at times $t$ or earlier, not from later points in time. Such approaches were used going back to the late 1980s, under the name of “time-delay neural networks” (Waibel et al., 1989), and have received significant interest in recent years due to their application in architectures such as WaveNet (van den Oord et al., 2016).
|
| 88 |
+
|
| 89 |
+
In essence, TrellisNet is a special kind of temporal convolutional network. TCNs have two distinctive characteristics: 1) causal convolution in each layer to satisfy the causality constraint and 2) deep stacking of layers to increase the effective history length (i.e. receptive field). Trellis networks have both of these characteristics. The basic model presented in Section 3 can easily be elaborated with larger kernel sizes, dilated convolutions, and other architectural elements used in TCNs; some of these are reviewed further in Section 4.3.
|
| 90 |
+
|
| 91 |
+
However, TrellisNet is not a general TCN. As mentioned in Section 3, two important differences are: 1) the weights are tied across layers and 2) the linearly transformed input $\tilde { x } _ { 1 : T }$ is injected into each layer. Weight tying can be viewed as a form of regularization that can stabilize training, support generalization, and significantly reduce the size of the model. Input injection mixes deep features with the original sequence. These structural characteristics will be further illuminated by the connection between trellis networks and recurrent networks, presented next.
|
| 92 |
+
|
| 93 |
+
# 4.2 TRELLISNET AND RNN
|
| 94 |
+
|
| 95 |
+
Recurrent networks appear fundamentally different from convolutional networks. Instead of operating on all elements of a sequence in parallel in each layer, an RNN processes one input element at a time and unrolls in the time dimension. Given a non-linearity $g$ (which could be a sigmoid or a more elaborate cell), we can summarize the transformations in an $L$ -layer RNN at time-step $t$ as follows:
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
h _ { t } ^ { ( i ) } = g \left( W _ { h x } ^ { ( i ) } h _ { t } ^ { ( i - 1 ) } + W _ { h h } ^ { ( i ) } h _ { t - 1 } ^ { ( i ) } \right) \quad \mathrm { f o r } 1 \leq i \leq L , \qquad h _ { t } ^ { ( 0 ) } = x _ { t } .
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
Despite the apparent differences, we will now show that any RNN unrolled to a finite length is equivalent to a TrellisNet with special sparsity structure in the kernel matrix $W$ . We begin by formally defining the notion of a truncated (i.e. finite-horizon) RNN.
|
| 102 |
+
|
| 103 |
+
Definition 1. Given an RNN $\rho ,$ , a corresponding M-truncated RNN $\rho ^ { M }$ , applied to the sequence $x _ { 1 : T }$ , produces at time step $t$ the output $y _ { t }$ by applying $\rho$ to the sequence $x _ { t - M + 1 : t }$ (here $x _ { < 0 } = 0$ ).
|
| 104 |
+
|
| 105 |
+
Theorem 1. Let $\rho ^ { M }$ be an $M$ -truncated RNN with $L$ layers and hidden unit dimensionality $d .$ . Then there exists an equivalent TrellisNet $\tau$ with depth $( M + L - 1 )$ and layer width (i.e. number of channels in each hidden layer) Ld. Specifically, for any $x _ { 1 : T }$ , $\rho ^ { M } ( x _ { 1 : T } ) = \tau _ { L ( d - 1 ) + 1 : L d } ( x _ { 1 : T } )$ (i.e. the TrellisNet outputs contain the RNN outputs).
|
| 106 |
+
|
| 107 |
+
Theorem 1 states that any $M$ -truncated RNN can be represented as a TrellisNet. How severe of a restriction is $M$ -truncation? Note that $M$ -truncation is intimately related to truncated backpropagation-through-time (BPTT), used pervasively in training recurrent networks on long sequences. While RNNs can in principle retain unlimited history, there is both empirical and theoretical evidence that the memory horizon of RNNs is bounded (Bai et al., 2018; Khandelwal et al., 2018;
|
| 108 |
+
|
| 109 |
+
Miller & Hardt, 2018). Furthermore, if desired, TrellisNets can recover exactly a common method of applying RNNs to long sequences – hidden state repackaging, i.e. copying the hidden state across subsequences. This is accomplished using an analogous form of hidden state repackaging, detailed in Appendix B.
|
| 110 |
+
|
| 111 |
+
Proof of Theorem 1. Let $h _ { t , t ^ { \prime } } ^ { ( i ) } \in \mathbb { R } ^ { d }$ be the hidden state at time $t$ and layer $i$ of the truncated RNN $\rho ^ { t - t ^ { \prime } + 1 }$ (i.e., the RNN begun at time $t ^ { \prime }$ and run until time ). Note that without truncation, history starts at tiwe define $t ^ { \prime } = 1$ , so the hidden state(i.e. no history info $h _ { t } ^ { ( i ) }$ ofion $\rho$ can be equivalently expressed as f the clock starts in the future). $h _ { t , 1 } ^ { ( i ) }$ . When $t ^ { \prime } > t$ $h _ { t , t ^ { \prime } } = 0$
|
| 112 |
+
|
| 113 |
+
By assumption, $\rho ^ { M }$ is an RNN defined by the following parameters: $\{ W _ { h x } ^ { ( i ) } , W _ { h h } ^ { ( i ) } , g , M \}$ , where $W _ { h h } ^ { ( i ) } \in \mathbb { R } ^ { w \times d }$ for all $i$ , $W _ { h x } ^ { ( 1 ) } \in \mathbb { R } ^ { w \times p }$ , and $W _ { h x } ^ { ( i ) } \in \mathbb { R } ^ { w \times d }$ for all $i = 2 , \ldots , L$ are the weight matrices at each layer ( $w$ is the dimension of pre-activation output). We now construct a TrellisNet $\tau$ according to the exact definition in Section 3, with parameters $\{ W _ { 1 } , W _ { 2 } , f \}$ , where
|
| 114 |
+
|
| 115 |
+
$$
|
| 116 |
+
\begin{array} { r } { W _ { 1 } = \left[ \begin{array} { c c c c c } { 0 } & { W _ { h h } ^ { ( 1 ) } } & { 0 } & { \cdots } & { 0 } \\ { 0 } & { 0 } & { W _ { h h } ^ { ( 2 ) } } & { \cdots } & { 0 } \\ { \vdots } & { \vdots } & { \vdots } & { \ddots } & { \vdots } \\ { 0 } & { 0 } & { 0 } & { \cdots } & { W _ { h h } ^ { ( L ) } } \end{array} \right] , W _ { 2 } = \left[ \begin{array} { c c c c c } { W _ { h x } ^ { ( 1 ) } } & { 0 } & { \cdots } & { 0 } & { 0 } \\ { 0 } & { W _ { h x } ^ { ( 2 ) } } & { \cdots } & { 0 } & { 0 } \\ { \vdots } & { \vdots } & { \ddots } & { \vdots } & { \vdots } \\ { 0 } & { 0 } & { \cdots } & { W _ { h x } ^ { ( L ) } } & { 0 } \end{array} \right] , } \end{array}
|
| 117 |
+
$$
|
| 118 |
+
|
| 119 |
+
such that $W _ { 1 } , W _ { 2 } \in \mathbb { R } ^ { L w \times ( p + L d ) }$ . We define a nonlinearity $f$ by $f ( \alpha , \beta ) = g ( \alpha )$ (i.e. applying $g$ only on the first entry).
|
| 120 |
+
|
| 121 |
+
Let $t \in [ T ] , j \geq 0$ be arbitrary and fixed. We now claim that the hidden unit at time $t$ and layer $j$ of TrellisNet $\tau$ can be expressed in terms of hidden units at time $t$ in truncated forms of $\rho$ :
|
| 122 |
+
|
| 123 |
+
$$
|
| 124 |
+
z _ { t } ^ { ( j ) } = \left[ h _ { t , t - j + 1 } ^ { ( 1 ) } \quad h _ { t , t - j + 2 } ^ { ( 2 ) } \quad \ldots \quad h _ { t , t - j + L } ^ { ( L ) } \right] ^ { \top } \in \mathbb { R } ^ { L d } ,
|
| 125 |
+
$$
|
| 126 |
+
|
| 127 |
+
where z(jt is the time- $\cdot t$ hidden state at layer $j$ of $\tau$ and $h _ { t , t ^ { \prime } } ^ { ( i ) }$ is the time- $t$ hidden state at layer $i$ of $\rho ^ { t - t ^ { \prime } + 1 }$ .
|
| 128 |
+
|
| 129 |
+
We prove Eq. (6) by induction on $j$ . As a base case, consider $j = 0$ ; i.e. the input layer of $\tau$ . Since $h _ { t , t ^ { \prime } } = 0$ when $t ^ { \prime } > t$ , we have that $z _ { j } ^ { ( 0 ) } = [ 0 \ : \ : 0 \ : \ : \ : . . \ : \ : \ : 0 ] ^ { \bar { \top } }$ . (Recall that in the input layer of TrellisNet we initialize $z _ { t } ^ { ( 0 ) } = \mathbf { 0 } .$ .) For the inductive step, suppose Eq. (6) holds for layer $j$ , and consider layer $j + 1$ . By the feed-forward transformation of TrellisNet defined in Eq. (2) and the nonlinearity $f$ we defined above, we have:
|
| 130 |
+
|
| 131 |
+
$$
|
| 132 |
+
\begin{array} { r l } & { \hat { z } _ { t } ^ { ( j + 1 ) } = W _ { 1 } \left[ \begin{array} { c } { x _ { t - 1 } } \\ { z _ { t - 1 } ^ { ( j ) } } \end{array} \right] + W _ { 2 } \left[ \begin{array} { c } { x _ { t } } \\ { z _ { t } ^ { ( j ) } } \end{array} \right] } \\ & { \quad = \left[ \begin{array} { c c c c c } { 0 } & { W _ { h h } ^ { ( 1 ) } } & { 0 } & { \cdots } & { 0 } \\ { 0 } & { W _ { h h } ^ { ( 2 ) } } & { \cdots } & { \vdots } \\ { \vdots } & { \vdots } & { \ddots } & { \vdots } \\ { 0 } & { 0 } & { \cdots } & { W _ { h h } ^ { ( L ) } } \end{array} \right] \left[ \begin{array} { c } { x _ { t - 1 } } \\ { h _ { t - 1 , t - j } ^ { ( 1 ) } } \\ { \vdots } \\ { h _ { t - 1 , t - j + L - 1 } ^ { ( L ) } } \end{array} \right] + \left[ \begin{array} { c c c c c } { W _ { h x } ^ { ( 1 ) } } & { 0 } & { \cdots } & { 0 } & { 0 } \\ { 0 } & { W _ { h x } ^ { ( 2 ) } } & { \cdots } & { 0 } & { 0 } \\ { \vdots } & { \vdots } & { \ddots } & { \vdots } \\ { 0 } & { 0 } & { \cdots } & { W _ { h x } ^ { ( L ) } } & { 0 } \end{array} \right] \left[ \begin{array} { c } { x _ { t } } \\ { h _ { t , t - j + 1 } ^ { ( 1 ) } } \\ { \vdots } \\ { h _ { t , t - j + L - 1 } ^ { ( L ) } } \end{array} \right] } \end{array}
|
| 133 |
+
$$
|
| 134 |
+
|
| 135 |
+
$$
|
| 136 |
+
\begin{array} { r l } & { \quad = \left[ \begin{array} { c c c c } { W _ { h h } ^ { ( 1 ) } h _ { t - 1 , t - j } ^ { ( 1 ) } + W _ { h x } ^ { ( 1 ) } x _ { t } } & & \\ & { \vdots } & \\ { W _ { h h } ^ { ( L ) } h _ { t - 1 , t - j + L - 1 } ^ { ( L ) } + W _ { h x } ^ { ( L ) } h _ { t , t - j + L - 1 } ^ { ( L - 1 ) } } \end{array} \right] } \\ & { z _ { t } ^ { ( j + 1 ) } = f ( \hat { z } _ { t } ^ { ( j + 1 ) } , z _ { t - 1 } ^ { ( j ) } ) = g ( \hat { z } _ { t } ^ { ( j + 1 ) } ) = \left[ h _ { t , t - j } ^ { ( 1 ) } \quad h _ { t , t - j + 1 } ^ { ( 2 ) } \quad . . . \quad h _ { t , t - j + L - 1 } ^ { ( L ) } \right] ^ { \top } } \end{array}
|
| 137 |
+
$$
|
| 138 |
+
|
| 139 |
+
where in Eq. (10) we apply the RNN non-linearity $g$ following Eq. (4). Therefore, by induction, we have shown that Eq. (6) holds for all $j \geq 0$ .
|
| 140 |
+
|
| 141 |
+
If TrellisNet $\tau$ has $M + L - 1$ layers, then at the final layer we have $\boldsymbol { z } _ { t } ^ { ( M + L - 1 ) } = \left[ \cdot \cdot \cdot \ \cdot \ \cdot \ h _ { t , t + 1 - M } ^ { ( L ) } \right] ^ { \top }$ Since $\rho ^ { M }$ is an $L$ -layer $M$ -truncated RNN, this (taking the last $d$ channels of z(M+L−1)) is exactly the output of $\rho ^ { M }$ at time $t$ .
|
| 142 |
+
|
| 143 |
+

|
| 144 |
+
Figure 2: Representing a truncated 2-layer RNN $\rho ^ { M }$ as a trellis network $\tau$ . (a) Each unit of $\tau$ has three groups, which house the input, first-layer hidden vector, and second-layer hidden vector of $\rho ^ { M }$ , respectively. (b) Each group in the hidden unit of $\tau$ in level $i + 1$ at time step $t + 1$ is computed by a linear combination of appropriate groups of hidden units in level $i$ at time steps $t$ and $t + 1$ . The linear transformations form a mixed group convolution that reproduces computation in $\rho ^ { M }$ . (Nonlinearities not shown for clarity.)
|
| 145 |
+
|
| 146 |
+
In other words, we have shown that $\rho ^ { M }$ is equivalent to a TrellisNet with sparse kernel matrices $W _ { 1 } , W _ { 2 }$ . This completes the proof.
|
| 147 |
+
|
| 148 |
+
Note that the convolutions in the TrellisNet $\tau$ constructed in Theorem 1 are sparse, as shown in Eq. (5). They are related to group convolutions (Krizhevsky et al., 2012), but have an unusual form because group $k$ at time $t$ is convolved with group $k - 1$ at time $t + 1$ . We refer to these as mixed group convolutions. Moreover, while Theorem 1 assumes that all layers of $\rho ^ { M }$ have the same dimensionality $d$ for clarity, the proof easily generalizes to cases where each layer has different widths.
|
| 149 |
+
|
| 150 |
+
For didactic purposes, we recap and illustrate the construction in the case of a 2-layer RNN. The key challenge is that a na¨ıve unrolling of the RNN into a feed-forward network does not produce a convolutional network, since the linear transformation weights are not constant across a layer. The solution, illustrated in Figure 2a, is to organize each hidden unit into groups of channels, such that each TrellisNet unit represents 3 RNN units simultaneously (for $x _ { t } , h _ { t } ^ { ( 1 ) } , h _ { t } ^ { ( 2 ) } )$ . Each TrellisNet unit thus has $( p + 2 d )$ channels. The interlayer transformation can then be expressed as a mixed group convolution, illustrated in Figure 2b. This can be represented as a sparse convolution with the structure given in Eq. (5) (with $L = 2$ ). Applying the nonlinearity $g$ on the pre-activation output, this exactly reproduces the transformations in the original 2-layer RNN.
|
| 151 |
+
|
| 152 |
+
The TrellisNet that emerges from this construction has special sparsity structure in the weight matrix. It stands to reason that a general TrellisNet with an unconstrained (dense) weight matrix $W$ may have greater expressive power: it can model a broader class of transformations than the original RNN $\mathsf { \bar { \rho } } ^ { M }$ . Note that while the hidden channels of the TrellisNet $\tau$ constructed in the proof of Theorem 1 are naturally arranged into groups that represent different layers of the RNN $\bar { \rho } ^ { M }$ (Eq. (6)), an unconstrained dense weight matrix $W$ no longer admits such an interpretation. A model defined by a dense weight matrix is fundamentally distinct from the RNN $\rho ^ { M }$ that served as our point of departure. We take advantage of this expressivity and use general weight matrices $W$ , as presented in Section 3, in our experiments. Our ablation analysis will show that such generalized dense transformations are beneficial, even when model capacity is controlled for.
|
| 153 |
+
|
| 154 |
+
The proof of Theorem 1 did not delve into the inner structure of the nonlinear transformation $g$ in RNN (or $f$ in the constructed TrellisNet). For a vanilla RNN, for instance, $f$ is usually an elementwise sigmoid or tanh function. But the construction in Theorem 1 applies just as well to RNNs with structured cells, such as LSTMs and GRUs. We adopt LSTM cells for the TrellisNets in our experiments and provide a detailed treatment of this nonlinearity in Section 5.1 and Appendix A.
|
| 155 |
+
|
| 156 |
+
# 4.3 TRELLISNET AS A BRIDGE BETWEEN RECURRENT AND CONVOLUTIONAL MODELS
|
| 157 |
+
|
| 158 |
+
In Section 4.1 we concluded that TrellisNet is a special kind of TCN, characterized by weight tying and input injection. In Section 4.2 we established that TrellisNet is a generalization of truncated
|
| 159 |
+
|
| 160 |
+
RNNs. These connections along with the construction in our proof of Theorem 1 allow TrellisNets to benefit significantly from techniques developed originally for RNNs, while also incorporating architectural and algorithmic motifs developed for convolutional networks. We summarize a number of techniques here. From recurrent networks, we can integrate 1) structured nonlinear activations (e.g. LSTM and GRU gates); 2) variational RNN dropout (Gal & Ghahramani, 2016); 3) recurrent DropConnect (Merity et al., 2018b); and 4) history compression and repackaging. From convolutional networks, we can adapt 1) larger kernels and dilated convolutions (Yu & Koltun, 2016); 2) auxiliary losses at intermediate layers (Lee et al., 2015; Xie & Tu, 2015); 3) weight normalization (Salimans & Kingma, 2016); and 4) parallel convolutional processing. Being able to directly incorporate techniques from both streams of research is one of the benefits of trellis networks. We leverage this in our experiments and provide a more comprehensive treatment of these adaptations in Appendix B.
|
| 161 |
+
|
| 162 |
+
# 5 EXPERIMENTS
|
| 163 |
+
|
| 164 |
+
# 5.1 A TRELLISNET WITH GATED ACTIVATION
|
| 165 |
+
|
| 166 |
+
In our description of generic trellis networks in Section 3, the activation function $f$ can be any nonlinearity that computes $z _ { 1 : T } ^ { ( i + 1 ) }$ based on $\hat { z } _ { 1 : T } ^ { ( i + 1 ) }$ and $z _ { 1 : T - 1 } ^ { ( i ) }$ . In experiments, we use a gated activation based on the LSTM cell. Gated activations have been used before in convolutional networks for sequence modeling (van den Oord et al., 2016; Dauphin et al., 2017). Our choice is inspired directly by Theorem 1, which suggests incorporating an existing RNN cell into TrellisNet. We use the LSTM cell due to its effectiveness in recurrent networks (Jozefowicz et al., 2015; Greff et al., 2017; Melis et al., 2018). We summarize the construction here; a more detailed treatment can be found in Appendix A.
|
| 167 |
+
|
| 168 |
+

|
| 169 |
+
Figure 3: A gated activation based on the LSTM cell.
|
| 170 |
+
|
| 171 |
+
In an LSTM cell, three information-controlling gates are computed at time $t$ . Moreover, there is a cell state that does not participate in the hidden-to-hidden transformations but is updated in every step using the result from the gated activations. We integrate the LSTM cell into the TrellisNet as follows (Figure 3):
|
| 172 |
+
|
| 173 |
+
$$
|
| 174 |
+
\begin{array} { r l r } & { \hat { z } _ { t + 1 } ^ { ( i + 1 ) } = W _ { 1 } \left[ z _ { t , 2 } ^ { ( i ) } \right] + W _ { 2 } \left[ z _ { t + 1 , 2 } ^ { ( i + 1 } \right] = \left[ \hat { z } _ { t + 1 , 1 } \quad \hat { z } _ { t + 1 , 2 } \quad \hat { z } _ { t + 1 , 3 } \quad \hat { z } _ { t + 1 , 4 } \right] ^ { \top } } & \\ & { z _ { t + 1 , 1 } ^ { ( i + 1 ) } = \sigma ( \hat { z } _ { t + 1 , 1 } ) \circ z _ { t , 1 } ^ { ( i ) } + \sigma ( \hat { z } _ { t + 1 , 2 } ) \circ \operatorname { t a n h } ( \hat { z } _ { t + 1 , 3 } ) } & \\ & { z _ { t + 1 , 2 } ^ { ( i + 1 ) } = \sigma ( \hat { z } _ { t + 1 , 4 } ) \circ \operatorname { t a n h } ( z _ { t + 1 , 1 } ^ { ( i + 1 ) } ) } & { ( 1 2 ; \operatorname { G a t e c } } \end{array}
|
| 175 |
+
$$
|
| 176 |
+
|
| 177 |
+
d activation $f$ )
|
| 178 |
+
|
| 179 |
+
Thus the linear transformation in each layer of the TrellisNet produces a pre-activation feature $\hat { z } _ { t + 1 }$ with $r = 4 q$ feature channels, which are then processed by elementwise transformations and Hadamard products to yield the final output z(i+1)t+1 $\boldsymbol { z } _ { t + 1 } ^ { ( i + 1 ) } = \left( \boldsymbol { z } _ { t + 1 , 1 } ^ { ( i + 1 ) } , \boldsymbol { z } _ { t + 1 , 2 } ^ { ( i + 1 ) } \right)$ of the layer.
|
| 180 |
+
|
| 181 |
+
# 5.2 RESULTS
|
| 182 |
+
|
| 183 |
+
We evaluate trellis networks on word-level and character-level language modeling on the standard Penn Treebank (PTB) dataset (Marcus et al., 1993; Mikolov et al., 2010), large-scale word-level modeling on WikiText-103 (WT103) (Merity et al., 2017), and standard stress tests used to study long-range information propagation in sequence models: sequential MNIST, permuted MNIST (PMNIST), and sequential CIFAR-10 (Chang et al., 2017; Bai et al., 2018; Trinh et al., 2018). Note that these tasks are on very different scales, with unique properties that challenge sequence models in different ways. For example, word-level PTB is a small dataset that a typical model easily overfits, so judicious regularization is essential. WT103 is a hundred times larger, with less danger of overfitting, but with a vocabulary size of 268K that makes training more challenging (and precludes the application of techniques such as mixture of softmaxes (Yang et al., 2018)). A more complete description of these tasks and their characteristics can be found in Appendix C.
|
| 184 |
+
|
| 185 |
+
Table 1: Test perplexities (ppl) on word-level language modeling with the PTB corpus. \` means lower is better.
|
| 186 |
+
|
| 187 |
+
<table><tr><td colspan="3">Word-level Penn Treebank (PTB)</td></tr><tr><td>Model</td><td>Size</td><td>Test perplexitye</td></tr><tr><td>Generic TCN (Bai et al., 2018)</td><td>13M</td><td>88.68</td></tr><tr><td>Variational LSTM (Gal & Ghahramani,2016)</td><td>66M</td><td>73.4</td></tr><tr><td>NAS Cell (Zoph & Le,2017)</td><td>54M</td><td>62.4</td></tr><tr><td>AWD-LSTM (Merity et al.,2018b)</td><td>24M</td><td>58.8</td></tr><tr><td>(Black-box tuned) NAS (Melis et al.,2018)</td><td>24M</td><td>59.7</td></tr><tr><td>(Black-box tuned) LSTM+ skip conn. (Melis et al.,2018)</td><td>24M</td><td>58.3</td></tr><tr><td>AWD-LSTM-MoC (Yang et al.,2018)</td><td>22M</td><td>57.55</td></tr><tr><td>DARTS (Liu et al., 2018)</td><td>23M</td><td>56.10</td></tr><tr><td>AWD-LSTM-MoS (Yang et al., 2018)</td><td>24M</td><td>55.97</td></tr><tr><td>ENAS (Pham et al., 2018)</td><td>24M</td><td>55.80</td></tr><tr><td>Ours - TrellisNet</td><td>24M</td><td>56.97</td></tr><tr><td>Ours - TrellisNet (1.4x larger)</td><td>33M</td><td>56.80</td></tr><tr><td>Ours-TrellisNet-MoS</td><td>25M</td><td>54.67</td></tr><tr><td>Ours - TrellisNet-MoS (1.4x larger)</td><td>34M</td><td>54.19</td></tr></table>
|
| 188 |
+
|
| 189 |
+
Table 2: Test perplexities (ppl) on word-level language modeling with the WT103 corpus.
|
| 190 |
+
|
| 191 |
+
<table><tr><td colspan="3">Word-level WikiText-103(WT103)</td></tr><tr><td>Model</td><td>Size</td><td>Test perplexityl</td></tr><tr><td>LSTM (Grave et al., 2017b)</td><td>-</td><td>48.7</td></tr><tr><td>LSTM+continuous cache (Grave et al., 2017b)</td><td>=</td><td>40.8</td></tr><tr><td>Generic TCN(Bai et al., 2018)</td><td>150M</td><td>45.2</td></tr><tr><td>Gated Linear ConvNet (Dauphin et al., 2017)</td><td>230M</td><td>37.2</td></tr><tr><td>AWD-QRNN (Merity et al., 2018a)</td><td>159M</td><td>33.0</td></tr><tr><td>Relational Memory Core (Santoro et al., 2018)</td><td>195M</td><td>31.6</td></tr><tr><td>Ours - TrellisNet</td><td>180M</td><td>29.19</td></tr></table>
|
| 192 |
+
|
| 193 |
+
The prior state of the art on these tasks was set by completely different models, such as AWD-LSTM on character-level PTB (Merity et al., 2018a), neural architecture search on word-level PTB (Pham et al., 2018), and the self-attention-based Relational Memory Core on WikiText-103 (Santoro et al., 2018). We use trellis networks on all tasks and outperform the respective state-of-the-art models on each. For example, on word-level Penn Treebank, TrellisNet outperforms by a good margin the recent results of Melis et al. (2018), which used the Google Vizier service for exhaustive hyperparameter tuning, as well as the recent neural architecture search work of Pham et al. (2018). On WikiText-103, a trellis network outperforms by $7 . 6 \%$ the Relational Memory Core (Santoro et al., 2018) and by $1 1 . 5 \%$ the thorough optimization work of Merity et al. (2018a).
|
| 194 |
+
|
| 195 |
+
Many hyperparameters we use are adapted directly from prior work on recurrent networks. (As highlighted in Section 4.3, many techniques can be carried over directly from RNNs.) For others, we perform a basic grid search. We decay the learning rate by a fixed factor once validation error plateaus. All hyperparameters are reported in Appendix D, along with an ablation study.
|
| 196 |
+
|
| 197 |
+
Word-level language modeling. For word-level language modeling, we use PTB and WT103. The results on PTB are listed in Table 1. TrellisNet sets a new state of the art on PTB, both with and without mixture of softmaxes (Yang et al., 2018), outperforming all previously published results by more than one unit of perplexity.
|
| 198 |
+
|
| 199 |
+
WT103 is 110 times larger than PTB, with vocabulary size 268K. We follow prior work and use the adaptive softmax (Grave et al., 2017a), which improves memory efficiency by assigning higher capacity to more frequent words. The results are listed in Table 2. TrellisNet sets a new state of the art on this dataset as well, with perplexity 29.19: about $7 . 6 \%$ better than the contemporaneous self-attention-based Relational Memory Core (RMC) (Santoro et al., 2018). TrellisNet achieves this better accuracy with much faster convergence: 25 epochs, versus 90 for RMC.
|
| 200 |
+
|
| 201 |
+
Table 3: Test bits-per-character (bpc) on character-level language modeling with the PTB corpus.
|
| 202 |
+
|
| 203 |
+
<table><tr><td colspan="3">Char-levelPTB</td></tr><tr><td>Model</td><td>Size</td><td>Test bpcl</td></tr><tr><td>Generic TCN (Bai et al.,2018)</td><td>3.0M</td><td>1.31</td></tr><tr><td>Independently RNN (Li et al., 2018)</td><td>12.0M</td><td>1.23</td></tr><tr><td>Hyper LSTM (Ha et al., 2017)</td><td>14.4M</td><td>1.219</td></tr><tr><td>NAS Cell (Zoph & Le,2017)</td><td>16.3M</td><td>1.214</td></tr><tr><td>Fast-Slow-LSTM-2 (Mujika et al., 2017)</td><td>7.2M</td><td>1.19</td></tr><tr><td>Quasi-RNN (Merity et al.,2018a)</td><td>13.8M</td><td>1.187</td></tr><tr><td>AWD-LSTM (Merity et al.,2018a)</td><td>13.8M</td><td>1.175</td></tr><tr><td>Ours- TrellisNet</td><td>13.4M</td><td>1.158</td></tr></table>
|
| 204 |
+
|
| 205 |
+
Table 4: Test accuracies on long-range modeling benchmarks. h means higher is better.
|
| 206 |
+
|
| 207 |
+
<table><tr><td>Model</td><td>Seq. MNIST Test acc.h</td><td>Permuted MNIST Test acc.h</td><td>Seq. CIFAR-10 Test acc.h</td></tr><tr><td>Dilated GRU (Chang et al., 2017)</td><td>99.0</td><td>94.6</td><td></td></tr><tr><td>IndRNN (Li et al., 2018)</td><td>99.0</td><td>96.0</td><td>=</td></tr><tr><td>Generic TCN (Bai et al., 2018)</td><td>99.0</td><td>97.2</td><td>-</td></tr><tr><td>r-LSTM w/ Aux.Loss (Trinh et al.,2018)</td><td>98.4</td><td>95.2</td><td>72.2</td></tr><tr><td>Transformer (self-attention) (Trinh et al.,2018)</td><td>98.9</td><td>97.9</td><td>62.2</td></tr><tr><td>Ours- TrellisNet</td><td>99.20</td><td>98.13</td><td>73.42</td></tr></table>
|
| 208 |
+
|
| 209 |
+
Character-level language modeling. When used for character-level modeling, PTB is a mediumscale dataset with stronger long-term dependencies between characters. We thus use a deeper network as well as techniques such as weight normalization (Salimans & Kingma, 2016) and deep supervision (Lee et al., 2015; Xie & Tu, 2015). The results are listed in Table 3. TrellisNet sets a new state of the art with 1.158 bpc, outperforming the recent results of Merity et al. (2018a) by a comfortable margin.
|
| 210 |
+
|
| 211 |
+
Long-range modeling with Sequential MNIST, PMNIST, and CIFAR-10. We also evaluate the TrellisNet for ability to model long-term dependencies. In the Sequential MNIST, PMNIST, and CIFAR-10 tasks, images are processed as long sequences, one pixel at a time (Chang et al., 2017; Bai et al., 2018; Trinh et al., 2018). Our model has 8M parameters, in alignment with prior work. To cover the larger context, we use dilated convolutions in intermediate layers, adopting a common architectural element from TCNs (Yu & Koltun, 2016; van den Oord et al., 2016; Bai et al., 2018). The results are listed in Table 4. Note that the performance of prior models is inconsistent. The Transformer works well on MNIST but fairs poorly on CIFAR-10, while $r$ -LSTM with unsupervised auxiliary losses achieves good results on CIFAR-10 but underperforms on Permuted MNIST. TrellisNet outperforms all these models on all three tasks.
|
| 212 |
+
|
| 213 |
+
# 6 DISCUSSION
|
| 214 |
+
|
| 215 |
+
We presented trellis networks, a new architecture for sequence modeling. Trellis networks form a structural bridge between convolutional and recurrent models. This enables direct assimilation of many techniques designed for either of these two architectural families. We leverage these connections to train high-performing trellis networks that set a new state of the art on highly competitive language modeling benchmarks. Beyond the empirical gains, we hope that trellis networks will serve as a step towards deeper and more unified understanding of sequence modeling.
|
| 216 |
+
|
| 217 |
+
There are many exciting opportunities for future work. First, we have not conducted thorough performance optimizations on trellis networks. For example, architecture search on the structure of the gated activation $f$ may yield a higher-performing activation function than the classic LSTM cell we used (Zoph & Le, 2017; Pham et al., 2018). Likewise, principled hyperparameter tuning will likely improve modeling accuracy beyond the levels we have observed (Melis et al., 2018). Future work can also explore acceleration schemes that speed up training and inference.
|
| 218 |
+
|
| 219 |
+
Another significant opportunity is to establish connections between trellis networks and selfattention-based architectures (Transformers) (Vaswani et al., 2017; Santoro et al., 2018; Chen et al., 2018), thus unifying all three major contemporary approaches to sequence modeling. Finally, we look forward to seeing applications of trellis networks to industrial-scale challenges such as machine translation.
|
| 220 |
+
|
| 221 |
+
# REFERENCES
|
| 222 |
+
|
| 223 |
+
Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In International Conference on Learning Representations (ICLR), 2015.
|
| 224 |
+
|
| 225 |
+
Shaojie Bai, J Zico Kolter, and Vladlen Koltun. An empirical evaluation of generic convolutional and recurrent networks for sequence modeling. arXiv:1803.01271, 2018.
|
| 226 |
+
|
| 227 |
+
James Bradbury, Stephen Merity, Caiming Xiong, and Richard Socher. Quasi-recurrent neural networks. In International Conference on Learning Representations (ICLR), 2017.
|
| 228 |
+
|
| 229 |
+
Shiyu Chang, Yang Zhang, Wei Han, Mo Yu, Xiaoxiao Guo, Wei Tan, Xiaodong Cui, Michael Witbrock, Mark Hasegawa-Johnson, and Thomas Huang. Dilated recurrent neural networks. In Neural Information Processing Systems (NIPS), 2017.
|
| 230 |
+
|
| 231 |
+
Mia Xu Chen, Orhan Firat, Ankur Bapna, Melvin Johnson, Wolfgang Macherey, George Foster, Llion Jones, Niki Parmar, Noam Shazeer, Ashish Vaswani, Jakob Uszkoreit, Lukasz Kaiser, Mike Schuster, Zhifeng Chen, Yonghui Wu, and Macduff Hughes. The best of both worlds: Combining recent advances in neural machine translation. In Annual Meeting of the Association for Computational Linguistics (ACL), 2018.
|
| 232 |
+
|
| 233 |
+
Kyunghyun Cho, Bart Van Merrienboer, Dzmitry Bahdanau, and Yoshua Bengio. On the properties ¨ of neural machine translation: Encoder-decoder approaches. arXiv:1409.1259, 2014.
|
| 234 |
+
|
| 235 |
+
Ronan Collobert, Jason Weston, Leon Bottou, Michael Karlen, Koray Kavukcuoglu, and Pavel P. ´ Kuksa. Natural language processing (almost) from scratch. Journal of Machine Learning Research (JMLR), 12, 2011.
|
| 236 |
+
|
| 237 |
+
Zihang Dai, Zhilin Yang, Yiming Yang, William W Cohen, Jaime Carbonell, Quoc V Le, and Ruslan Salakhutdinov. Transformer-XL: Language modeling with longer-term dependency. arXiv:1901.02860, 2019.
|
| 238 |
+
|
| 239 |
+
Yann N. Dauphin, Angela Fan, Michael Auli, and David Grangier. Language modeling with gated convolutional networks. In International Conference on Machine Learning (ICML), 2017.
|
| 240 |
+
|
| 241 |
+
Jeff Donahue, Lisa Anne Hendricks, Sergio Guadarrama, Marcus Rohrbach, Subhashini Venugopalan, Trevor Darrell, and Kate Saenko. Long-term recurrent convolutional networks for visual recognition and description. In Computer Vision and Pattern Recognition (CVPR), 2015.
|
| 242 |
+
|
| 243 |
+
Jeffrey L Elman. Finding structure in time. Cognitive Science, 14(2), 1990.
|
| 244 |
+
|
| 245 |
+
Yarin Gal and Zoubin Ghahramani. A theoretically grounded application of dropout in recurrent neural networks. In Neural Information Processing Systems (NIPS), 2016.
|
| 246 |
+
|
| 247 |
+
Jonas Gehring, Michael Auli, David Grangier, Denis Yarats, and Yann N. Dauphin. Convolutional sequence to sequence learning. In International Conference on Machine Learning (ICML), 2017.
|
| 248 |
+
|
| 249 |
+
Edouard Grave, Armand Joulin, Moustapha Cisse, David Grangier, and Herv ´ e J ´ egou. Efficient ´ softmax approximation for GPUs. In International Conference on Machine Learning (ICML), 2017a.
|
| 250 |
+
|
| 251 |
+
Edouard Grave, Armand Joulin, and Nicolas Usunier. Improving neural language models with a continuous cache. In International Conference on Learning Representations (ICLR), 2017b.
|
| 252 |
+
|
| 253 |
+
Alex Graves. Supervised Sequence Labelling with Recurrent Neural Networks. Springer, 2012.
|
| 254 |
+
|
| 255 |
+
Alex Graves. Generating sequences with recurrent neural networks. arXiv:1308.0850, 2013.
|
| 256 |
+
|
| 257 |
+
Klaus Greff, Rupesh Kumar Srivastava, Jan Koutn´ık, Bas R. Steunebrink, and Jurgen Schmidhuber. ¨ LSTM: A search space odyssey. IEEE Transactions on Neural Networks and Learning Systems, 28(10), 2017.
|
| 258 |
+
|
| 259 |
+
David Ha, Andrew Dai, and Quoc V Le. HyperNetworks. In International Conference on Learning Representations (ICLR), 2017.
|
| 260 |
+
|
| 261 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural Computation, 9(8), 1997.
|
| 262 |
+
|
| 263 |
+
Rafal Jozefowicz, Wojciech Zaremba, and Ilya Sutskever. An empirical exploration of recurrent network architectures. In International Conference on Machine Learning (ICML), 2015.
|
| 264 |
+
|
| 265 |
+
Nal Kalchbrenner, Lasse Espeholt, Karen Simonyan, Aaron van den Oord, Alex Graves, and Koray ¨ Kavukcuoglu. Neural machine translation in linear time. arXiv:1610.10099, 2016.
|
| 266 |
+
|
| 267 |
+
Andrej Karpathy and Fei-Fei Li. Deep visual-semantic alignments for generating image descriptions. In Computer Vision and Pattern Recognition (CVPR), 2015.
|
| 268 |
+
|
| 269 |
+
Urvashi Khandelwal, He He, Peng Qi, and Dan Jurafsky. Sharp nearby, fuzzy far away: How neural language models use context. In Annual Meeting of the Association for Computational Linguistics (ACL), 2018.
|
| 270 |
+
|
| 271 |
+
Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical report, University of Toronto, 2009.
|
| 272 |
+
|
| 273 |
+
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. ImageNet classification with deep convolutional neural networks. In Neural Information Processing Systems (NIPS), 2012.
|
| 274 |
+
|
| 275 |
+
Yann LeCun, Bernhard Boser, John S. Denker, Donnie Henderson, Richard E. Howard, Wayne Hubbard, and Lawrence D. Jackel. Backpropagation applied to handwritten zip code recognition. Neural Computation, 1(4), 1989.
|
| 276 |
+
|
| 277 |
+
Chen-Yu Lee, Saining Xie, Patrick Gallagher, Zhengyou Zhang, and Zhuowen Tu. Deeplysupervised nets. In AISTATS, 2015.
|
| 278 |
+
|
| 279 |
+
Shuai Li, Wanqing Li, Chris Cook, Ce Zhu, and Yanbo Gao. Independently recurrent neural network (IndRNN): Building a longer and deeper RNN. In Computer Vision and Pattern Recognition (CVPR), 2018.
|
| 280 |
+
|
| 281 |
+
Hanxiao Liu, Karen Simonyan, and Yiming Yang. DARTS: Differentiable architecture search. arXiv:1806.09055, 2018.
|
| 282 |
+
|
| 283 |
+
Mitchell P Marcus, Mary Ann Marcinkiewicz, and Beatrice Santorini. Building a large annotated corpus of English: The Penn treebank. Computational Linguistics, 19(2), 1993.
|
| 284 |
+
|
| 285 |
+
Gabor Melis, Chris Dyer, and Phil Blunsom. On the state of the art of evaluation in neural language ´ models. In International Conference on Learning Representations (ICLR), 2018.
|
| 286 |
+
|
| 287 |
+
Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models. In International Conference on Learning Representations (ICLR), 2017.
|
| 288 |
+
|
| 289 |
+
Stephen Merity, Nitish Shirish Keskar, and Richard Socher. An analysis of neural language modeling at multiple scales. arXiv:1803.08240, 2018a.
|
| 290 |
+
|
| 291 |
+
Stephen Merity, Nitish Shirish Keskar, and Richard Socher. Regularizing and optimizing LSTM language models. In International Conference on Learning Representations (ICLR), 2018b.
|
| 292 |
+
|
| 293 |
+
Tomas Mikolov, Martin Karafiat, Luk ´ as Burget, Jan Cernock ´ y, and Sanjeev Khudanpur. Recurrent´ neural network based language model. In Interspeech, 2010.
|
| 294 |
+
|
| 295 |
+
John Miller and Moritz Hardt. When recurrent models don’t need to be recurrent. arXiv:1805.10369, 2018.
|
| 296 |
+
|
| 297 |
+
Yasumasa Miyamoto and Kyunghyun Cho. Gated word-character recurrent language model. arXiv:1606.01700, 2016.
|
| 298 |
+
|
| 299 |
+
Asier Mujika, Florian Meier, and Angelika Steger. Fast-slow recurrent neural networks. In Neural Information Processing Systems (NIPS), 2017.
|
| 300 |
+
|
| 301 |
+
Hieu Pham, Melody Y Guan, Barret Zoph, Quoc V Le, and Jeff Dean. Efficient neural architecture search via parameters sharing. In International Conference on Machine Learning (ICML), 2018.
|
| 302 |
+
|
| 303 |
+
Tara N. Sainath, Oriol Vinyals, Andrew W. Senior, and Hasim Sak. Convolutional, long short-term memory, fully connected deep neural networks. In International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2015.
|
| 304 |
+
|
| 305 |
+
Tim Salimans and Diederik P Kingma. Weight normalization: A simple reparameterization to accelerate training of deep neural networks. In Neural Information Processing Systems (NIPS), 2016.
|
| 306 |
+
|
| 307 |
+
Adam Santoro, Ryan Faulkner, David Raposo, Jack Rae, Mike Chrzanowski, Theophane Weber, Daan Wierstra, Oriol Vinyals, Razvan Pascanu, and Timothy Lillicrap. Relational recurrent neural networks. In Neural Information Processing Systems (NIPS), 2018.
|
| 308 |
+
|
| 309 |
+
Xingjian Shi, Zhourong Chen, Hao Wang, Dit-Yan Yeung, Wai-Kin Wong, and Wang-chun Woo. Convolutional LSTM network: A machine learning approach for precipitation nowcasting. In Neural Information Processing Systems (NIPS), 2015.
|
| 310 |
+
|
| 311 |
+
Ilya Sutskever, James Martens, and Geoffrey E. Hinton. Generating text with recurrent neural networks. In International Conference on Machine Learning (ICML), 2011.
|
| 312 |
+
|
| 313 |
+
Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In Neural Information Processing Systems (NIPS), 2014.
|
| 314 |
+
|
| 315 |
+
Trieu H Trinh, Andrew M Dai, Thang Luong, and Quoc V Le. Learning longer-term dependencies in RNNs with auxiliary losses. In International Conference on Machine Learning (ICML), 2018.
|
| 316 |
+
|
| 317 |
+
Aaron van den Oord, Sander Dieleman, Heiga Zen, Karen Simonyan, Oriol Vinyals, Alex Graves, ¨ Nal Kalchbrenner, Andrew W. Senior, and Koray Kavukcuoglu. WaveNet: A generative model for raw audio. arXiv:1609.03499, 2016.
|
| 318 |
+
|
| 319 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Neural Information Processing Systems (NIPS), 2017.
|
| 320 |
+
|
| 321 |
+
Subhashini Venugopalan, Marcus Rohrbach, Jeffrey Donahue, Raymond J. Mooney, Trevor Darrell, and Kate Saenko. Sequence to sequence – video to text. In International Conference on Computer Vision (ICCV), 2015.
|
| 322 |
+
|
| 323 |
+
Oriol Vinyals, Alexander Toshev, Samy Bengio, and Dumitru Erhan. Show and tell: A neural image caption generator. In Computer Vision and Pattern Recognition (CVPR), 2015.
|
| 324 |
+
|
| 325 |
+
Christoph Vogel and Thomas Pock. A primal dual network for low-level vision problems. In German Conference on Pattern Recognition, 2017.
|
| 326 |
+
|
| 327 |
+
Alex Waibel, Toshiyuki Hanazawa, Geoffrey Hinton, Kiyohiro Shikano, and Kevin J Lang. Phoneme recognition using time-delay neural networks. IEEE Transactions on Acoustics, Speech, and Signal Processing, 37(3), 1989.
|
| 328 |
+
|
| 329 |
+
Paul J Werbos. Backpropagation through time: What it does and how to do it. Proceedings of the IEEE, 78(10), 1990.
|
| 330 |
+
|
| 331 |
+
Saining Xie and Zhuowen Tu. Holistically-nested edge detection. In International Conference on Computer Vision (ICCV), 2015.
|
| 332 |
+
|
| 333 |
+
Zhilin Yang, Zihang Dai, Ruslan Salakhutdinov, and William W. Cohen. Breaking the softmax bottleneck: A high-rank RNN language model. International Conference on Learning Representations (ICLR), 2018.
|
| 334 |
+
|
| 335 |
+
Fisher Yu and Vladlen Koltun. Multi-scale context aggregation by dilated convolutions. In International Conference on Learning Representations (ICLR), 2016.
|
| 336 |
+
|
| 337 |
+
Julian Georg Zilly, Rupesh Kumar Srivastava, Jan Koutn´ık, and Jurgen Schmidhuber. Recurrent ¨ highway networks. In International Conference on Machine Learning (ICML), 2017.
|
| 338 |
+
|
| 339 |
+
Barret Zoph and Quoc V Le. Neural architecture search with reinforcement learning. In International Conference on Learning Representations (ICLR), 2017.
|
| 340 |
+
|
| 341 |
+
# A EXPRESSING AN LSTM AS A TRELLISNET
|
| 342 |
+
|
| 343 |
+

|
| 344 |
+
Figure 4: A TrellisNet with an LSTM nonlinearity, at an atomic level and on a longer sequence.
|
| 345 |
+
|
| 346 |
+
Here we trace in more detail the transformation of an LSTM into a TrellisNet. This is an application of Theorem 1. The nonlinear activation has been examined in Section 5.1. We will walk through the construction again here.
|
| 347 |
+
|
| 348 |
+
In each time step, an LSTM cell computes the following:
|
| 349 |
+
|
| 350 |
+
$$
|
| 351 |
+
\begin{array} { r l } & { f _ { t } ^ { ( \ell ) } = \sigma ( W _ { f } h _ { t } ^ { ( \ell - 1 ) } + U _ { f } h _ { t - 1 } ^ { ( \ell ) } ) \quad i _ { t } ^ { ( \ell ) } = \sigma ( W _ { i } h _ { t } ^ { ( \ell - 1 ) } + U _ { i } h _ { t - 1 } ^ { ( \ell ) } ) \quad g _ { t } ^ { ( \ell ) } = \operatorname { t a n h } ( W _ { g } h _ { t } ^ { ( \ell - 1 ) } + U _ { g } h _ { t - 1 } ^ { ( \ell ) } ) } \\ & { o _ { t } ^ { ( \ell ) } = \sigma ( W _ { o } h _ { t } ^ { ( \ell - 1 ) } + U _ { o } h _ { t - 1 } ^ { ( \ell ) } ) \quad c _ { t } ^ { ( \ell ) } = f _ { t } ^ { ( \ell ) } \circ c _ { t - 1 } ^ { ( \ell ) } + i _ { t } ^ { ( \ell ) } \circ g _ { t } ^ { ( \ell ) } \quad h _ { t } ^ { ( \ell ) } = o _ { t } ^ { ( \ell ) } \circ \operatorname { t a n h } ( c _ { t } ^ { ( \ell ) } ) } \end{array}
|
| 352 |
+
$$
|
| 353 |
+
|
| 354 |
+
where $h _ { t } ^ { ( 0 ) } = x _ { t }$ , and $f _ { t } , i _ { t } , o _ { t }$ are typically called the forget, input, and output gates. By a similar construction to how we defined $\tau$ in Theorem 1, to recover an LSTM the mixed group convolution needs to produce $3 q$ more channels for these gated outputs, which have the form $f _ { t , t ^ { \prime } } , i _ { t , t ^ { \prime } }$ and $g _ { t , t ^ { \prime } }$ (see Figure 5 for an example). In addition, at each layer of the mixed group convolution, the network also needs to maintain a group of channels for cell states $c _ { t , t ^ { \prime } }$ . Note that in an LSTM network, $c _ { t }$ is updated “synchronously” with $h _ { t }$ , so we can similarly write
|
| 355 |
+
|
| 356 |
+
$$
|
| 357 |
+
c _ { t , t ^ { \prime } } ^ { ( 1 ) } = f _ { t , t ^ { \prime } } ^ { ( 1 ) } \circ c _ { t - 1 , t ^ { \prime } } ^ { ( 1 ) } + i _ { t , t ^ { \prime } } ^ { ( 1 ) } \circ g _ { t , t ^ { \prime } } ^ { ( 1 ) } \qquad h _ { t , t ^ { \prime } } ^ { ( 1 ) } = o _ { t , t ^ { \prime } } ^ { ( 1 ) } \circ \operatorname { t a n h } ( c _ { t , t ^ { \prime } } ^ { ( 1 ) } )
|
| 358 |
+
$$
|
| 359 |
+
|
| 360 |
+
Based on these changes, we show in Figure 4 an atomic and a sequence view of TrellisNet with the LSTM activation. The hidden units $z _ { 1 : T }$ consist of two parts: $z _ { 1 : T , 1 }$ , which gets updated directly via the gated activations (akin to LSTM cell states), and $z _ { 1 : T , 2 }$ , which is processed by parameterized convolutions (akin to LSTM hidden states). Formally, in layer $i$ :
|
| 361 |
+
|
| 362 |
+
$$
|
| 363 |
+
\begin{array} { r l } & { \hat { z } _ { 1 : T } ^ { ( i + 1 ) } = { \operatorname { C o n v } } { \operatorname { l D } } ( z _ { 1 : T , 2 } ^ { ( i ) } ; W ) + \tilde { x } _ { 1 : T } = [ \hat { z } _ { 1 : T , 1 } \quad \hat { z } _ { 1 : T , 2 } \quad \hat { z } _ { 1 : T , 3 } \quad \hat { z } _ { 1 : T , 4 } ] ^ { \top } } \\ & { z _ { 1 : T , 1 } ^ { ( i + 1 ) } = \sigma ( \hat { z } _ { 1 : T , 1 } ) \circ z _ { 0 : T - 1 , 1 } ^ { ( i ) } + \sigma ( \hat { z } _ { 1 : T , 2 } ) \circ { \operatorname { t a n h } } ( \hat { z } _ { 1 : T , 3 } ) } \\ & { z _ { 1 : T , 2 } ^ { ( i + 1 ) } = \sigma ( \hat { z } _ { 1 : T , 4 } ) \circ { \operatorname { t a n h } } ( z _ { 1 : T , 1 } ^ { ( i + 1 ) } ) } \end{array}
|
| 364 |
+
$$
|
| 365 |
+
|
| 366 |
+

|
| 367 |
+
Figure 5: A 2-layer LSTM is expressed as a trellis network with mixed group convolutions on four groups of feature channels. (Partial view.)
|
| 368 |
+
|
| 369 |
+
# B OPTIMIZING AND REGULARIZING TRELLISNET WITH RNN AND TCN METHODS
|
| 370 |
+
|
| 371 |
+
(a) History repackaging between truncated sequences in recurrent networks.
|
| 372 |
+
|
| 373 |
+

|
| 374 |
+
(b) History repackaging in mixed group convolutions, where we write out $z _ { t }$ explicitly by Eq. (6).
|
| 375 |
+
|
| 376 |
+

|
| 377 |
+
|
| 378 |
+
Figure 6: Using the equivalence established by Theorem 1, we can transfer the notion of history repackaging in recurrent networks to trellis networks.
|
| 379 |
+
|
| 380 |
+
In Section 4, we formally described the relationship between TrellisNets, RNNs, and temporal convolutional networks (TCN). On the one hand, TrellisNet is a special TCN (with weight-tying and input injection), while on the other hand it can also express any structured RNN via a sparse convolutional kernel. These relationships open clear paths for applying techniques developed for either recurrent or convolutional networks. We summarize below some of the techniques that can be applied in this way to TrellisNet, categorizing them as either inspired by RNNs or TCNs.
|
| 381 |
+
|
| 382 |
+
# B.1 FROM RECURRENT NETWORKS
|
| 383 |
+
|
| 384 |
+
History repackaging. One theoretical advantage of RNNs is their ability to represent a history of infinite length. However, in many applications, sequence lengths are too long for infinite backpropagation during training. A typical solution is to partition the sequence into smaller subsequences and perform truncated backpropagation through time (BPTT) on each. At sequence boundaries, the hidden state $h _ { t }$ is “repackaged” and passed onto the next RNN sequence. Thus gradient flow stops at sequence boundaries (see Figure 6a). Such repackaging is also sometimes used at test time.
|
| 385 |
+
|
| 386 |
+
We can now map this repackaging procedure to trellis networks. As shown in Figure 6, the notion of passing the compressed history vector $h _ { t }$ in an RNN corresponds to specific non-zero padding in the mixed group convolution of the corresponding TrellisNet. The padding is simply the channels from the last step of the final layer applied on the previous sequence (see Figure 6b, where without the repackaging padding, at layer 2 we will have $h _ { T + 1 , T + 1 } ^ { ( 1 ) }$ instead of $h _ { T + 1 , 1 } ^ { ( 1 ) } ,$ ). We illustrate this in Figure 6b, where we have written out $\boldsymbol { z } _ { t } ^ { ( i ) }$ in TrellisNet explicitly in the form of $h _ { t , t ^ { \prime } }$ according to Eq. (6). This suggests that instead of storing all effective history in memory, we can compress history in a feed-forward network to extend its history as well. For a general TrellisNet that employs a dense kernel, similarly, we can pass the hidden channels of the last step of the final layer in the previous sequence as the “history” padding for the next TrellisNet sequence (this works in both training and testing).
|
| 387 |
+
|
| 388 |
+
Gated activations. In general, the structured gates in RNN cells can be translated to gated activations in temporal convolutions, as we did in Appendix A in the case of an LSTM. While in the experiments we adopted the LSTM gating, other activations (e.g. GRUs (Cho et al., 2014) or activations found via architecture search (Zoph & Le, 2017)) can also be applied in trellis networks via the equivalence established in Theorem 1.
|
| 389 |
+
|
| 390 |
+
RNN variational dropout. Variational dropout (VD) for RNNs (Gal & Ghahramani, 2016) is a useful regularization scheme that applies the same mask at every time step within a layer (see Figure 7a). A direct translation of this technique from RNN to the group temporal convolution implies that we need to create a different mask for each diagonal of the network (i.e. each history starting point), as well as for each group of the mixed group convolution. We propose an alternative (and extremely simple) dropout scheme for TrellisNet, which is inspired by VD in RNNs as well as Theo(a) Left: variational dropout (VD) in an RNN. Right: VD in a (b) Auxiliary loss on intermediate layers TrellisNet. Each color indicates a different dropout mask. in a TrellisNet.
|
| 391 |
+
|
| 392 |
+

|
| 393 |
+
Figure 7: (a) RNN-inspired variational dropout. (b) ConvNet-inspired auxiliary losses.
|
| 394 |
+
|
| 395 |
+
rem 1. In each iteration, we apply the same mask on the post-activation outputs, at every time step in both the temporal dimension and depth dimension. That is, based on Eq. (6) in Theorem 1, we adapt VD to the TrellisNet setting by assuming $h _ { t , t ^ { \prime } \pm \delta } \approx h _ { t , t ^ { \prime } }$ ; see Figure 7a. Empirically, we found this dropout to work significantly better than other dropout schemes (e.g. drop certain channels entirely).
|
| 396 |
+
|
| 397 |
+
Recurrent weight dropout/DropConnect. We apply DropConnect on the TrellisNet kernel. Merity et al. (2018b) showed that regularizing hidden-to-hidden weights $W _ { h h }$ can be useful in optimizing LSTM language models, and we carry this scheme over to trellis networks.
|
| 398 |
+
|
| 399 |
+
# B.2 FROM CONVOLUTIONAL NETWORKS
|
| 400 |
+
|
| 401 |
+
Dense convolutional kernel. Generalizing the convolution from a mixed group (sparse) convolution to a general (dense) one means the connections are no longer recurrent and we are computing directly on the hidden units with a large kernel, just like any temporal ConvNet.
|
| 402 |
+
|
| 403 |
+
Deep supervision. Recall that for sparse TrellisNet to recover truncated RNN, at each level the hidden units are of the form $h _ { t , t ^ { \prime } }$ , representing the state at time $t$ if we assume that history started at time $t ^ { \prime }$ (Eq. (6)). We propose to inject the loss function at intermediate layers of the convolutional network (e.g. after every $\ell$ layers of transformations, where we call $\ell$ the auxiliary loss frequency). For example, during training, to predict an output at time $t$ with a $L$ -layer TrellisNet, besides $ { \boldsymbol { z } } _ { t } ^ { ( L ) }$ in the last layer, we can also apply the loss function on $\boldsymbol { z } _ { t } ^ { ( L - \ell ) }$ , $z _ { t } ^ { ( L - 2 \bar { \ell } ) }$ , etc. – where hidden units will predict with a shorter history because they are at lower levels of the network. This had been introduced for convolutional models in computer vision (Lee et al., 2015; Xie & Tu, 2015). The eventual loss of the network will be
|
| 404 |
+
|
| 405 |
+
$$
|
| 406 |
+
\mathcal { L } _ { \mathrm { t o t a l } } = \mathcal { L } _ { \mathrm { o r i g } } + \lambda \cdot \mathcal { L } _ { \mathrm { a u x } } ,
|
| 407 |
+
$$
|
| 408 |
+
|
| 409 |
+
where $\lambda$ is a fixed scaling factor that controls the weight of the auxiliary loss.
|
| 410 |
+
|
| 411 |
+
Note that this technique is not directly transferable (or applicable) to RNNs.
|
| 412 |
+
|
| 413 |
+
Larger kernel and dilations (Yu & Koltun, 2016). These techniques have been used in convolutional networks to more quickly increase the receptive field. They can be immediately applied to trellis networks. Note that the activation function $f$ of TrellisNet may need to change if we change the kernel size or dilation settings (e.g. with dilation $d$ and kernel size 2, the activation will be $f ( \hat { z } _ { 1 : T } ^ { ( i ) } , z _ { 1 : T - d } ^ { ( i ) } ) )$ .
|
| 414 |
+
|
| 415 |
+
Weight normalization (Salimans & Kingma, 2016). Weight normalization (WN) is a technique that learns the direction and the magnitude of the weight matrix independently. Applying WN on the convolutional kernel was used in some prior works on temporal convolutional architectures (Dauphin et al., 2017; Bai et al., 2018), and have been found useful in regularizing the convolutional filters and boosting convergence.
|
| 416 |
+
|
| 417 |
+
Parallelism. Because TrellisNet is convolutional in nature, it can easily leverage the parallel processing in the convolution operation (which slides the kernel across the input features). We note that when the input sequence is relatively long, the predictions of the first few time steps will have insufficient history context compared to the predictions later in the sequence. This can be addressed by either history padding (mentioned in Appendix B.1) or chopping off the loss incurred by the first few time steps.
|
| 418 |
+
|
| 419 |
+
# C BENCHMARK TASKS
|
| 420 |
+
|
| 421 |
+
Word-level language modeling on Penn Treebank (PTB). The original Penn Treebank (PTB) dataset selected 2,499 stories from a collection of almost 100K stories published in Wall Street Journal (WSJ) (Marcus et al., 1993). After Mikolov et al. (2010) processed the corpus, the PTB dataset contains 888K words for training, 70K for validation and 79K for testing, where each sentence is marked with an $< \ominus \hphantom { . 0 0 0 }$ tag at its end. All of the numbers (e.g. in financial news) were replaced with a ? symbol with many punctuations removed. Though small, PTB has been a highly studied dataset in the domain of language modeling (Miyamoto & Cho, 2016; Zilly et al., 2017; Merity et al., 2018b; Melis et al., 2018; Yang et al., 2018). Due to its relatively small size, many computational models can easily overfit on word-level PTB. Therefore, good regularization methods and optimization techniques designed for sequence models are especially important on this benchmark task (Merity et al., 2018b).
|
| 422 |
+
|
| 423 |
+
Word-level language modeling on WikiText-103. WikiText-103 (WT103) is 110 times larger than PTB, containing a training corpus from 28K lightly processed Wikipedia articles (Merity et al., 2017). In total, WT103 features a vocabulary size of about $2 6 8 \mathrm { K } ^ { 2 }$ , with 103M words for training, 218K words for validation, and 246K words for testing/evaluation. The WT103 corpus also retains the original case, punctuation and numbers in the raw data, all of which were removed from the PTB corpus. Moreover, since WT103 is composed of full articles (whereas PTB is sentence-based), it is better suited for testing long-term context retention. For these reasons, WT103 is typically considered much more representative and realistic than PTB (Merity et al., 2018a).
|
| 424 |
+
|
| 425 |
+
Character-level language modeling on Penn Treebank (PTB). When used for character-level language modeling, PTB is a medium size dataset that contains 5M chracters for training, 396K for validation, and 446K for testing, with an alphabet size of 50 (note: the $< \ominus \hphantom { . 0 0 0 }$ tag that marks the end of a sentence in word-level tasks is now considered one character). While the alphabet size of char-level PTB is much smaller compared to the word-level vocabulary size (10K), there is much longer sequential token dependency because a sentence contains many more characters than words.
|
| 426 |
+
|
| 427 |
+
Sequential and permuted MNIST classification. The MNIST handwritten digits dataset (LeCun et al., 1989) contains 60K normalized training images and 10K testing images, all of size $2 8 \times 2 8$ . In the sequential MNIST task, MNIST images are presented to the sequence model as a flattened $7 8 4 \times 1$ sequence for digit classification. Accurate predictions therefore require good long-term memory of the flattened pixels – longer than in most language modeling tasks. In the setting of permuted MNIST (PMNIST), the order of the sequence is permuted at random, so the network can no longer rely on local pixel features for classification.
|
| 428 |
+
|
| 429 |
+
Sequential CIFAR-10 classification. The CIFAR-10 dataset (Krizhevsky & Hinton, 2009) contains 50K images for training and 10K for testing, all of size $3 2 \times 3 2$ . In the sequential CIFAR-10 task, these images are passed into the model one at each time step, flattended as in the MNIST tasks. Compared to sequential MNIST, this task is more challenging. For instance, CIFAR-10 contains more complex image structures and intra-class variations, and there are 3 channels to the input. Moreover, as the images are larger, a sequence model needs to have even longer memory than in sequential MNIST or PMNIST (Trinh et al., 2018).
|
| 430 |
+
|
| 431 |
+
# D HYPERPARAMETERS AND ABLATION STUDY
|
| 432 |
+
|
| 433 |
+
Table 5 specifies the trellis networks used for the various tasks. There are a few things to note while reading the table. First, in training, we decay the learning rate once the validation error plateaus for a while (or according to some fixed schedule, such as after 100 epochs). Second, for auxiliary loss (see Appendix B for more details), we insert the loss function after every fixed number of layers in the network. This “frequency” is included below under the “Auxiliary Frequency” entry. Finally, the hidden dropout in the Table refers to the variational dropout we translated from RNNs (see Appendix B), which is applied at all hidden layers of the TrellisNet. Due to the insight from Theorem 1, many techniques in TrellisNet were translated directly from RNNs or TCNs. Thus, most of the hyperparameters were based on the numbers reported in prior works (e.g. embedding size, embedding dropout, hidden dropout, output dropout, optimizer, weight-decay, etc.) with minor adjustments (Merity et al., 2018b; Yang et al., 2018; Bradbury et al., 2017; Merity et al., 2018a; Trinh et al., 2018; Bai et al., 2018; Santoro et al., 2018). For factors such as auxiliary loss weight and frequency, we perform a basic grid search.
|
| 434 |
+
|
| 435 |
+
Table 5: Models and hyperparameters used in experiments. “–” means not applicable/used.
|
| 436 |
+
|
| 437 |
+
<table><tr><td></td><td>Word-PTB (w/o MoS)</td><td>Word-PTB(w/MoS)</td><td>Word-WT103</td><td>Char-PTB</td><td>(P)MNIST/CIFAR-10</td></tr><tr><td>Optimizer</td><td>SGD</td><td>SGD</td><td>Adam</td><td>Adam</td><td>Adam</td></tr><tr><td>Initial Learning Rate</td><td>20</td><td>20</td><td>1e-3</td><td>2e-3</td><td>2e-3</td></tr><tr><td>Hidden Size (i.e. ht)</td><td>1000</td><td>1000</td><td>2000</td><td>1000</td><td>100</td></tr><tr><td>Output Size (only for MoS)</td><td>1</td><td>480</td><td>1</td><td>1</td><td>1</td></tr><tr><td># of Experts (only for MoS)</td><td>1</td><td>15</td><td>1</td><td>1</td><td>1</td></tr><tr><td>Embedding Size</td><td>400</td><td>280</td><td>512</td><td>200</td><td>1</td></tr><tr><td>Embedding Dropout</td><td>0.1</td><td>0.05</td><td>0.0</td><td>0.0</td><td>1</td></tr><tr><td>Hidden (VD-based) Dropout</td><td>0.28</td><td>0.28</td><td>0.1</td><td>0.3</td><td>0.2</td></tr><tr><td>Output Dropout</td><td>0.45</td><td>0.4</td><td>0.1</td><td>0.1</td><td>0.2</td></tr><tr><td>Weight Dropout</td><td>0.5</td><td>0.45</td><td>0.1</td><td>0.25</td><td>0.1</td></tr><tr><td># of Layers</td><td>55</td><td>55</td><td>70</td><td>125</td><td>16</td></tr><tr><td>Auxiliary Loss 入</td><td>0.05</td><td>0.05</td><td>0.08</td><td>0.3</td><td>1</td></tr><tr><td>Auxiliary Frequency</td><td>16</td><td>16</td><td>25</td><td>70</td><td></td></tr><tr><td>Weight Normalization</td><td>1</td><td>1</td><td>√</td><td>√</td><td>√</td></tr><tr><td>Gradient Clip</td><td>0.225</td><td>0.2</td><td>0.1</td><td>0.2</td><td>0.5</td></tr><tr><td>Weight Decay</td><td>1e-6</td><td>1e-6</td><td>0.0</td><td>1e-6</td><td>1e-6</td></tr><tr><td>Model Size</td><td>24M</td><td>25M</td><td>180M</td><td>13.4M</td><td>8M</td></tr></table>
|
| 438 |
+
|
| 439 |
+
We have also performed an ablation study on TrellisNet to study the influence of various ingredients and techniques on performance. The results are reported in Table 6. We conduct the study on wordlevel PTB using a TrellisNet with 24M parameters. When we study one factor (e.g. removing hidden dropout), all hyperparameters and settings remain the same as in column 1 of Table 5 (except for “Dense Kernel”, where we adjust the number of hidden units so that the model size remains the same).
|
| 440 |
+
|
| 441 |
+
Table 6: Ablation study on word-level PTB (w/o MoS)
|
| 442 |
+
|
| 443 |
+
<table><tr><td></td><td>Model Size</td><td>Test ppl</td><td>△SOTA</td></tr><tr><td>TrellisNet</td><td>24.1M</td><td>56.97</td><td>1 ↓7.72</td></tr><tr><td>-Hidden(VD-based) Dropout</td><td>24.1M</td><td>64.69</td><td>↓6.85</td></tr><tr><td>- Weight Dropout - Auxiliary Losses</td><td>24.1M 24.1M</td><td>63.82 57.99</td><td>↓1.02</td></tr><tr><td>-Long Seq.Parallelism</td><td>24.1M</td><td>57.35</td><td>↓0.38</td></tr><tr><td>-Dense Kernel (i.e.mixed group conv)</td><td>24.1M</td><td>59.18</td><td>↓2.21</td></tr><tr><td>-Injected Input (every 2 layers instead)</td><td>24.1M</td><td>57.44</td><td>↓0.47</td></tr><tr><td>Injected Input (every 5 layers instead)</td><td>24.1M</td><td>59.75</td><td>↓2.78</td></tr><tr><td>-Injected Input (every1O layers instead)</td><td>24.1M</td><td></td><td></td></tr><tr><td>-Injected Input (every 2O layers instead)</td><td>24.1M</td><td>60.70 74.91</td><td>↓3.73 ↓17.94</td></tr></table>
|
md/train/HyrCWeWCb/HyrCWeWCb.md
ADDED
|
@@ -0,0 +1,428 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# TRUST-PCL: AN OFF-POLICY TRUST REGION METHOD FOR CONTINUOUS CONTROL
|
| 2 |
+
|
| 3 |
+
Ofir Nachum, Mohammad Norouzi, Kelvin Xu, & Dale Schuurmans∗ {ofirnachum,mnorouzi,kelvinxx,schuurmans}@google.com Google Brain
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Trust region methods, such as TRPO, are often used to stabilize policy optimization algorithms in reinforcement learning (RL). While current trust region strategies are effective for continuous control, they typically require a large amount of on-policy interaction with the environment. To address this problem, we propose an off-policy trust region method, Trust-PCL, which exploits an observation that the optimal policy and state values of a maximum reward objective with a relative-entropy regularizer satisfy a set of multi-step pathwise consistencies along any path. The introduction of relative entropy regularization allows Trust-PCL to maintain optimization stability while exploiting off-policy data to improve sample efficiency. When evaluated on a number of continuous control tasks, Trust-PCL significantly improves the solution quality and sample efficiency of TRPO.1
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
The goal of model-free reinforcement learning (RL) is to optimize an agent’s behavior policy through trial and error interaction with a black box environment. Value-based RL algorithms such as Q-learning (Watkins, 1989) and policy-based algorithms such as actor-critic (Konda & Tsitsiklis, 2000) have achieved well-known successes in environments with enumerable action spaces and predictable but possibly complex dynamics, e.g., as in Atari games (Mnih et al., 2013; Van Hasselt et al., 2016; Mnih et al., 2016). However, when applied to environments with more sophisticated action spaces and dynamics (e.g., continuous control and robotics), success has been far more limited.
|
| 12 |
+
|
| 13 |
+
In an attempt to improve the applicability of Q-learning to continuous control, Silver et al. (2014) and Lillicrap et al. (2015) developed an off-policy algorithm DDPG, leading to promising results on continuous control environments. That said, current off-policy methods including DDPG often improve data efficiency at the cost of optimization stability. The behaviour of DDPG is known to be highly dependent on hyperparameter selection and initialization (Metz et al., 2017); even when using optimal hyperparameters, individual training runs can display highly varying outcomes.
|
| 14 |
+
|
| 15 |
+
On the other hand, in an attempt to improve the stability and convergence speed of policy-based RL methods, Kakade (2002) developed a natural policy gradient algorithm based on Amari (1998), which subsequently led to the development of trust region policy optimization (TRPO) (Schulman et al., 2015). TRPO has shown strong empirical performance on difficult continuous control tasks often outperforming value-based methods like DDPG. However, a major drawback is that such methods are not able to exploit off-policy data and thus require a large amount of on-policy interaction with the environment, making them impractical for solving challenging real-world problems.
|
| 16 |
+
|
| 17 |
+
Efforts at combining the stability of trust region policy-based methods with the sample efficiency of value-based methods have focused on using off-policy data to better train a value estimate, which can be used as a control variate for variance reduction (Gu et al., 2017a;b).
|
| 18 |
+
|
| 19 |
+
In this paper, we investigate an alternative approach to improving the sample efficiency of trust region policy-based RL methods. We exploit the key fact that, under entropy regularization, the optimal policy and value function satisfy a set of pathwise consistency properties along any sampled path (Nachum et al., 2017), which allows both on and off-policy data to be incorporated in an actor-critic algorithm, PCL. The original PCL algorithm optimized an entropy regularized maximum reward objective and was evaluated on relatively simple tasks. Here we extend the ideas of PCL to achieve strong results on standard, challenging continuous control benchmarks. The main observation is that by alternatively augmenting the maximum reward objective with a relative entropy regularizer, the optimal policy and values still satisfy a certain set of pathwise consistencies along any sampled trajectory. The resulting objective is equivalent to maximizing expected reward subject to a penalty-based constraint on divergence from a reference (i.e., previous) policy.
|
| 20 |
+
|
| 21 |
+
We exploit this observation to propose a new off-policy trust region algorithm, Trust-PCL, that is able to exploit off-policy data to train policy and value estimates. Moreover, we present a simple method for determining the coefficient on the relative entropy regularizer to remain agnostic to reward scale, hence ameliorating the task of hyperparameter tuning. We find that the incorporation of a relative entropy regularizer is crucial for good and stable performance. We evaluate TrustPCL against TRPO, and observe that Trust-PCL is able to solve difficult continuous control tasks, while improving the performance of TRPO both in terms of the final reward achieved as well as sample-efficiency.
|
| 22 |
+
|
| 23 |
+
# 2 RELATED WORK
|
| 24 |
+
|
| 25 |
+
Trust Region Methods. Gradient descent is the predominant optimization method for neural networks. A gradient descent step is equivalent to solving a trust region constrained optimization,
|
| 26 |
+
|
| 27 |
+
$$
|
| 28 |
+
\mathrm { m i n i m i z e } ~ { \boldsymbol { \ell } } ( { \boldsymbol { \theta } } + \mathrm { d } { \boldsymbol { \theta } } ) \approx { \boldsymbol { \ell } } ( { \boldsymbol { \theta } } ) + { \boldsymbol { \nabla } } { \boldsymbol { \ell } } ( { \boldsymbol { \theta } } ) ^ { \top } \mathrm { d } { \boldsymbol { \theta } } \qquad { \mathrm { s . t . } } \quad \mathrm { d } { \boldsymbol { \theta } } ^ { \top } \mathrm { d } { \boldsymbol { \theta } } \leq \epsilon ,
|
| 29 |
+
$$
|
| 30 |
+
|
| 31 |
+
which yields the locally optimal update $\mathrm { d } \theta = - \eta \nabla \ell ( \theta )$ such that $\eta ~ = ~ { \sqrt { \epsilon } } / \| \nabla \ell ( \theta ) \|$ ; hence by considering a Euclidean ball, gradient descent assumes the parameters lie in a Euclidean space.
|
| 32 |
+
|
| 33 |
+
However, in machine learning, particularly in the context of multi-layer neural network training, Euclidean geometry is not necessarily the best way to characterize proximity in parameter space. It is often more effective to define an appropriate Riemannian metric that respects the loss surface (Amari, 2012), which allows much steeper descent directions to be identified within a local neighborhood (e.g., Amari (1998); Martens & Grosse (2015)). Whenever the loss is defined in terms of a Bregman divergence between an (unknown) optimal parameter $\theta ^ { * }$ and model parameter $\theta$ , i.e., $\ell ( \theta ) \equiv D _ { \mathrm { { F } } } ( \theta ^ { * } , \theta )$ , it is natural to use the same divergence to form the trust region:
|
| 34 |
+
|
| 35 |
+
$$
|
| 36 |
+
\mathrm { m i n i m i z e } D _ { \mathrm { F } } ( \theta ^ { * } , \theta + \mathrm { d } \theta ) \mathrm { s . t . } D _ { \mathrm { F } } ( \theta , \theta + \mathrm { d } \theta ) \leq \epsilon .
|
| 37 |
+
$$
|
| 38 |
+
|
| 39 |
+
The natural gradient (Amari, 1998) is a generalization of gradient descent where the Fisher information matrix $F ( \theta )$ is used to define the local geometry of the parameter space around $\theta$ . If a parameter update is constrained by $\mathrm { d } \theta ^ { \mathsf { T } } F ( \theta ) \mathrm { d } \theta \leq \epsilon$ , a descent direction of $\mathrm { d } \theta \equiv - \eta F ( \theta ) ^ { - 1 } \nabla \ell ( \theta )$ is obtained. This geometry is especially effective for optimizing the log-likelihood of a conditional probabilistic model, where the objective is in fact the KL divergence $D _ { \mathrm { K L } } ( \theta ^ { * } , \theta )$ . The local optimization is,
|
| 40 |
+
|
| 41 |
+
$$
|
| 42 |
+
\mathrm { m i n i m i z e } D _ { \mathrm { K L } } ( \theta ^ { * } , \theta + \mathrm { d } \theta ) \quad \mathrm { ~ s . t . ~ } \quad D _ { \mathrm { K L } } ( \theta , \theta + \mathrm { d } \theta ) \approx \mathrm { d } \theta ^ { \mathsf { T } } F ( \theta ) \mathrm { d } \theta \leq \epsilon .
|
| 43 |
+
$$
|
| 44 |
+
|
| 45 |
+
Thus, natural gradient approximates the trust region by $D _ { \mathrm { { K L } } } ( a , b ) \approx ( a - b ) ^ { \mathsf { T } } F ( a ) ( a - b )$ , which is accurate up to a second order Taylor approximation. Previous work (Kakade, 2002; Bagnell $\&$ Schneider, 2003; Peters & Schaal, 2008; Schulman et al., 2015) has applied natural gradient to policy optimization, locally improving expected reward subject to variants of $\mathrm { d } \theta ^ { \mathsf { T } } F ( \theta ) \mathrm { d } \theta \leq \epsilon$ . Recently, TRPO (Schulman et al., 2015; 2016) has achieved state-of-the-art results in continuous control by adding several approximations to the natural gradient to make nonlinear policy optimization feasible.
|
| 46 |
+
|
| 47 |
+
Another approach to trust region optimization is given by proximal gradient methods (Parikh et al., 2014). The class of proximal gradient methods most similar to our work are those that replace the hard constraint in (2) with a penalty added to the objective. These techniques have recently become popular in RL (Wang et al., 2016; Heess et al., 2017; Schulman et al., 2017b), although in terms of final reward performance on continuous control benchmarks, TRPO is still considered to be the state-of-the-art.
|
| 48 |
+
|
| 49 |
+
Norouzi et al. (2016) make the observation that entropy regularized expected reward may be expressed as a reversed KL divergence $D _ { \mathrm { K L } } ( \theta , \theta ^ { * } )$ , which suggests that an alternative to the constraint in (3) should be used when such regularization is present:
|
| 50 |
+
|
| 51 |
+
$$
|
| 52 |
+
D _ { \mathrm { K L } } ( \boldsymbol \theta + \mathrm { d } \boldsymbol \theta , \boldsymbol \theta ^ { * } ) \qquad \mathrm { s . t . } \qquad D _ { \mathrm { K L } } ( \boldsymbol \theta + \mathrm { d } \boldsymbol \theta , \boldsymbol \theta ) \approx \mathrm { d } \boldsymbol \theta ^ { \mathsf { T } } \boldsymbol F ( \boldsymbol \theta + \mathrm { d } \boldsymbol \theta ) \mathrm { d } \boldsymbol \theta \leq \epsilon .
|
| 53 |
+
$$
|
| 54 |
+
|
| 55 |
+
Unfortunately, this update requires computing the Fisher matrix at the endpoint of the update. The use of $F ( \theta )$ in previous work can be considered to be an approximation when entropy regularization is present, but it is not ideal, particularly if $\mathrm { d } \theta$ is large. In this paper, by contrast, we demonstrate that the optimal $\mathrm { d } \theta$ under the reverse KL constraint $\bar { D _ { \mathrm { K L } } } ( \theta + \mathrm { d } \bar { \theta } , \bar { \theta } ) \leq \dot { \epsilon }$ can indeed be characterized. Defining the constraint in this way appears to be more natural and effective than that of TRPO.
|
| 56 |
+
|
| 57 |
+
Softmax Consistency. To comply with the information geometry over policy parameters, previous work has used the relative entropy (i.e., KL divergence) to regularize policy optimization; resulting in a softmax relationship between the optimal policy and state values (Peters et al., 2010; Azar et al., 2012; 2011; Fox et al., 2016; Rawlik et al., 2013) under single-step rollouts. Our work is unique in that we leverage consistencies over multi-step rollouts.
|
| 58 |
+
|
| 59 |
+
The existence of multi-step softmax consistencies has been noted by prior work—first by Nachum et al. (2017) in the presence of entropy regularization. The existence of the same consistencies with relative entropy has been noted by Schulman et al. (2017a). Our work presents multi-step consistency relations for a hybrid relative entropy plus entropy regularized expected reward objective, interpreting relative entropy regularization as a trust region constraint. This work is also distinct from prior work in that the coefficient of relative entropy can be automatically determined, which we have found to be especially crucial in cases where the reward distribution changes dramatically during training.
|
| 60 |
+
|
| 61 |
+
Most previous work on softmax consistency (e.g., Fox et al. (2016); Azar et al. (2012); Nachum et al. (2017)) have only been evaluated on relatively simple tasks, including grid-world and discrete algorithmic environments. Rawlik et al. (2013) conducted evaluations on simple variants of the CartPole and Pendulum continuous control tasks. More recently, Haarnoja et al. (2017) showed that soft Qlearning (a single-step special case of PCL) can succeed on more challenging environments, such as a variant of the Swimmer task we consider below. By contrast, this paper presents a successful application of the softmax consistency concept to difficult and standard continuous-control benchmarks, resulting in performance that is competitive with and in some cases beats the state-of-the-art.
|
| 62 |
+
|
| 63 |
+
# 3 NOTATION & BACKGROUND
|
| 64 |
+
|
| 65 |
+
We model an agent’s behavior by a policy distribution $\pi ( a | s )$ over a set of actions (possibly discrete or continuous). At iteration $t$ , the agent encounters a state $s _ { t }$ and performs an action $a _ { t }$ sampled from $\pi ( \boldsymbol { a } \mid \boldsymbol { s } _ { t } )$ . The environment then returns a scalar reward $\displaystyle r _ { t } \sim r ( s _ { t } , a _ { t } )$ and transitions to the next state $s _ { t + 1 } \sim \rho ( s _ { t } , a _ { t } )$ . When formulating expectations over actions, rewards, and state transitions we will often omit the sampling distributions, $\pi , r$ , and $\rho$ , respectively.
|
| 66 |
+
|
| 67 |
+
Maximizing Expected Reward. The standard objective in RL is to maximize expected future discounted reward. We formulate this objective on a per-state basis recursively as
|
| 68 |
+
|
| 69 |
+
$$
|
| 70 |
+
O _ { \mathrm { E R } } ( s , \pi ) = \mathbb { E } _ { a , r , s ^ { \prime } } \left[ r + \gamma O _ { \mathrm { E R } } ( s ^ { \prime } , \pi ) \right] .
|
| 71 |
+
$$
|
| 72 |
+
|
| 73 |
+
The overall, state-agnostic objective is the expected per-state objective when states are sampled from interactions with the environment:
|
| 74 |
+
|
| 75 |
+
$$
|
| 76 |
+
O _ { \mathrm { E R } } ( \pi ) = \mathbb { E } _ { s } [ O _ { \mathrm { E R } } ( s , \pi ) ] .
|
| 77 |
+
$$
|
| 78 |
+
|
| 79 |
+
Most policy-based algorithms, including REINFORCE (Williams & Peng, 1991) and actorcritic (Konda & Tsitsiklis, 2000), aim to optimize $O _ { \mathrm { E R } }$ given a parameterized policy.
|
| 80 |
+
|
| 81 |
+
Path Consistency Learning (PCL). Inspired by Williams & Peng (1991), Nachum et al. (2017) augment the objective $O _ { \mathrm { E R } }$ in (5) with a discounted entropy regularizer to derive an objective,
|
| 82 |
+
|
| 83 |
+
$$
|
| 84 |
+
O _ { \mathrm { E N T } } ( s , \pi ) = O _ { \mathrm { E R } } ( s , \pi ) + \tau \mathbb { H } ( s , \pi ) ,
|
| 85 |
+
$$
|
| 86 |
+
|
| 87 |
+
where $\tau \geq 0$ is a user-specified temperature parameter that controls the degree of entropy regularization, and the discounted entropy $\mathbb { H } ( s , \pi )$ is recursively defined as
|
| 88 |
+
|
| 89 |
+
$$
|
| 90 |
+
\begin{array} { r } { \mathbb { H } ( s , \pi ) = \mathbb { E } _ { a , s ^ { \prime } } [ - \log \pi ( a \mid s ) + \gamma \mathbb { H } ( s ^ { \prime } , \pi ) ] . } \end{array}
|
| 91 |
+
$$
|
| 92 |
+
|
| 93 |
+
Note that the objective $O _ { \mathrm { E N T } } ( s , \pi )$ can then be re-expressed recursively as,
|
| 94 |
+
|
| 95 |
+
$$
|
| 96 |
+
O _ { \mathrm { E N T } } ( s , \pi ) = \mathbb { E } _ { a , r , s ^ { \prime } } [ r - \tau \log \pi ( a \mid s ) + \gamma O _ { \mathrm { E N T } } ( s ^ { \prime } , \pi ) ] .
|
| 97 |
+
$$
|
| 98 |
+
|
| 99 |
+
Nachum et al. (2017) show that the optimal policy $\pi ^ { * }$ for $O _ { \mathrm { E N T } }$ and $V ^ { * } ( s ) = O _ { \mathrm { E N T } } ( s , \pi ^ { * } )$ mutually satisfy a softmax temporal consistency constraint along any sequence of states $s _ { 0 } , \ldots , s _ { d }$ starting at $s _ { 0 }$ and a corresponding sequence of actions $a _ { 0 } , \ldots , a _ { d - 1 }$ :
|
| 100 |
+
|
| 101 |
+
$$
|
| 102 |
+
V ^ { * } ( s _ { 0 } ) = \underset { r _ { i } , s _ { i } } { \mathbb { E } } \left[ \gamma ^ { d } V ^ { * } ( s _ { d } ) + \sum _ { i = 0 } ^ { d - 1 } \gamma ^ { i } ( r _ { i } - \tau \log \pi ^ { * } ( a _ { i } | s _ { i } ) ) \right] .
|
| 103 |
+
$$
|
| 104 |
+
|
| 105 |
+
This observation led to the development of the PCL algorithm, which attempts to minimize squared error between the LHS and RHS of (10) to simultaneously optimize parameterized $\pi _ { \theta }$ and $V _ { \phi }$ . Importantly, PCL is applicable to both on-policy and off-policy trajectories.
|
| 106 |
+
|
| 107 |
+
Trust Region Policy Optimization (TRPO). As noted, standard policy-based algorithms for maximizing $O _ { \mathrm { E R } }$ can be unstable and require small learning rates for training. To alleviate this issue, Schulman et al. (2015) proposed to perform an iterative trust region optimization to maximize $O _ { \mathrm { E R } }$ . At each step, a prior policy $\tilde { \pi }$ is used to sample a large batch of trajectories, then $\pi$ is subsequently optimized to maximize $O _ { \mathrm { E R } }$ while remaining within a constraint defined by the average per-state KL-divergence with $\tilde { \pi }$ . That is, at each iteration TRPO solves the constrained optimization problem,
|
| 108 |
+
|
| 109 |
+
$$
|
| 110 |
+
\begin{array} { r } { \operatornamewithlimits { m a x i m i z e } O _ { \mathrm { E R } } ( \pi ) \mathrm { s . t . } \mathbb { E } _ { s \sim \pi , \rho } [ \mathrm { K L } \left( \pi ( - | s ) \| \pi ( - | s ) \right) ] \leq \epsilon . } \end{array}
|
| 111 |
+
$$
|
| 112 |
+
|
| 113 |
+
The prior policy is then replaced with the new policy $\pi$ , and the process is repeated.
|
| 114 |
+
|
| 115 |
+
# 4 METHOD
|
| 116 |
+
|
| 117 |
+
To enable more stable training and better exploit the natural information geometry of the parameter space, we propose to augment the entropy regularized expected reward objective $O _ { \mathrm { E N T } }$ in (7) with a discounted relative entropy trust region around a prior policy $\tilde { \pi }$ ,
|
| 118 |
+
|
| 119 |
+
$$
|
| 120 |
+
\operatorname* { m a x i m i z e } _ { \pi } \mathbb { E } _ { s } [ O _ { \mathrm { E N T } } ( \pi ) ] \mathrm { ~ s . t . ~ } \mathbb { E } _ { s } [ \mathbb { G } ( s , \pi , { \tilde { \pi } } ) ] \leq \epsilon ,
|
| 121 |
+
$$
|
| 122 |
+
|
| 123 |
+
where the discounted relative entropy is recursively defined as
|
| 124 |
+
|
| 125 |
+
$$
|
| 126 |
+
\mathbb { G } ( s , \pi , \tilde { \pi } ) = \mathbb { E } _ { a , s ^ { \prime } } \left[ \log \pi ( a | s ) - \log \tilde { \pi } ( a | s ) + \gamma \mathbb { G } ( s ^ { \prime } , \pi , \tilde { \pi } ) \right] .
|
| 127 |
+
$$
|
| 128 |
+
|
| 129 |
+
This objective attempts to maximize entropy regularized expected reward while maintaining natural proximity to the previous policy. Although previous work has separately proposed to use relative entropy and entropy regularization, we find that the two components serve different purposes, each of which is beneficial: entropy regularization helps improve exploration, while the relative entropy improves stability and allows for a faster learning rate. This combination is a key novelty.
|
| 130 |
+
|
| 131 |
+
Using the method of Lagrange multipliers, we cast the constrained optimization problem in (13) into maximization of the following objective,
|
| 132 |
+
|
| 133 |
+
$$
|
| 134 |
+
{ \cal O } _ { \mathrm { R E L E N T } } ( s , \pi ) = { \cal O } _ { \mathrm { E N T } } ( s , \pi ) - \lambda \mathbb { G } ( s , \pi , { \tilde { \pi } } ) .
|
| 135 |
+
$$
|
| 136 |
+
|
| 137 |
+
Again, the environment-wide objective is the expected per-state objective when states are sampled from interactions with the environment,
|
| 138 |
+
|
| 139 |
+
$$
|
| 140 |
+
O _ { \mathrm { R E L E N T } } ( \pi ) = \mathbb { E } _ { s } [ O _ { \mathrm { R E L E N T } } ( s , \pi ) ] .
|
| 141 |
+
$$
|
| 142 |
+
|
| 143 |
+
# 4.1 PATH CONSISTENCY WITH RELATIVE ENTROPY
|
| 144 |
+
|
| 145 |
+
A key technical observation is that the $O _ { \mathrm { R E L E N T } }$ objective has a similar decomposition structure to $O _ { \mathrm { E N T } }$ , and one can cast $O$ RELENT as an entropy regularized expected reward objective with a set of transformed rewards, i.e.,
|
| 146 |
+
|
| 147 |
+
$$
|
| 148 |
+
O _ { \mathrm { R E L E N T } } ( s , \pi ) = \widetilde { O } _ { \mathtt { E R } } ( s , \pi ) + ( \tau + \lambda ) \mathbb { H } ( s , \pi ) ,
|
| 149 |
+
$$
|
| 150 |
+
|
| 151 |
+
where $\tilde { O } _ { \mathrm { E R } } ( s , \pi )$ is an expected reward objective on a transformed reward distribution function $\tilde { r } ( s , a ) = r ( s , a ) + \lambda \log \tilde { \pi } ( a | s )$ . Thus, in what follows, we derive a corresponding form of the multi-step path consistency in (10).
|
| 152 |
+
|
| 153 |
+
Let $\pi ^ { * }$ denote the optimal policy, defined as $\pi ^ { * } = \operatorname { a r g m a x } _ { \pi } O _ { \mathrm { R E L E N T } } ( \pi )$ . As in PCL (Nachum et al., 2017), this optimal policy may be expressed as
|
| 154 |
+
|
| 155 |
+
$$
|
| 156 |
+
\pi ^ { * } ( a _ { t } | s _ { t } ) = \exp \left\{ \frac { \mathbb { E } _ { \tilde { r } _ { t } \sim \tilde { r } ( s _ { t } , a _ { t } ) , s _ { t + 1 } } [ \tilde { r } _ { t } + \gamma V ^ { * } ( s _ { t + 1 } ) ] - V ^ { * } ( s _ { t } ) } { \tau + \lambda } \right\} ,
|
| 157 |
+
$$
|
| 158 |
+
|
| 159 |
+
where $V ^ { * }$ are the softmax state values defined recursively as
|
| 160 |
+
|
| 161 |
+
$$
|
| 162 |
+
V ^ { * } ( s _ { t } ) = ( \tau + \lambda ) \log \int _ { A } \exp \left. \frac { \mathbb { E } _ { \tilde { r } _ { t } \sim \tilde { r } ( s _ { t } , a ) , s _ { t + 1 } } [ \tilde { r } _ { t } + \gamma V ^ { * } ( s _ { t + 1 } ) ] } { \tau + \lambda } \right. \mathrm { d } a .
|
| 163 |
+
$$
|
| 164 |
+
|
| 165 |
+
We may re-arrange (17) to yield
|
| 166 |
+
|
| 167 |
+
$$
|
| 168 |
+
\begin{array} { r c l } { V ^ { * } ( s _ { t } ) } & { = } & { \mathbb { E } _ { \tilde { r } _ { t } \sim \tilde { r } ( s _ { t } , a _ { t } ) , s _ { t + 1 } } [ \tilde { r } _ { t } - ( \tau + \lambda ) \log \pi ^ { * } ( a _ { t } | s _ { t } ) + \gamma V ^ { * } ( s _ { t + 1 } ) ] } \\ & { = } & { \mathbb { E } _ { r _ { t } , s _ { t + 1 } } [ r _ { t } - ( \tau + \lambda ) \log \pi ^ { * } ( a _ { t } | s _ { t } ) + \lambda \log \tilde { \pi } ( a _ { t + i } | s _ { t + i } ) + \gamma V ^ { * } ( s _ { t + 1 } ) ] . } \end{array}
|
| 169 |
+
$$
|
| 170 |
+
|
| 171 |
+
This is a single-step temporal consistency which may be extended to multiple steps by further expanding $V ^ { \ast } ( s _ { t + 1 } )$ on the RHS using the same identity. Thus, in general we have the following softmax temporal consistency constraint along any sequence of states defined by a starting state $s _ { t }$ and a sequence of actions $a _ { t } , \ldots , a _ { t + d - 1 }$ :
|
| 172 |
+
|
| 173 |
+
$$
|
| 174 |
+
r ^ { * } ( s _ { t } ) = \underset { r _ { t + i } , s _ { t + i } } { \mathbb { E } } \left[ \gamma ^ { d } V ^ { * } ( s _ { t + d } ) + \sum _ { i = 0 } ^ { d - 1 } \gamma ^ { i } \left( r _ { t + i } - ( \tau + \lambda ) \log \pi ^ { * } ( a _ { t + i } | s _ { t + i } ) + \lambda \log \tilde { \pi } ( a _ { t + i } | s _ { t + i } ) \right) \right] .
|
| 175 |
+
$$
|
| 176 |
+
|
| 177 |
+
# 4.2 TRUST-PCL
|
| 178 |
+
|
| 179 |
+
We propose to train a parameterized policy $\pi _ { \theta }$ and value estimate $V _ { \phi }$ to satisfy the multi-step consistencies in (21). Thus, we define a consistency error for a sequence of states, actions, and rewards st:t+d ≡ (st, at, rt, . . . , st+d−1, at+d−1, rt+d−1, st+d) sampled from the environment as
|
| 180 |
+
|
| 181 |
+
$$
|
| 182 |
+
\begin{array} { r c l } { { C ( s _ { t : t + d } , \theta , \phi ) ~ { = } ~ - { V _ { \phi } ( s _ { t } ) + \gamma ^ { d } V _ { \phi } ( s _ { t + d } ) ~ + } } } & { { } } & { { } } \\ { { } } & { { } } & { { { \displaystyle \sum _ { i = 0 } ^ { d - 1 } \gamma ^ { i } \left( r _ { t + i } - ( { \tau + } \lambda ) \log { \pi _ { \theta } ( a _ { t + i } | s _ { t + i } ) } + \lambda \log { \pi _ { \bar { \theta } } ( a _ { t + i } | s _ { t + i } ) } \right) ~ . } } } \end{array}
|
| 183 |
+
$$
|
| 184 |
+
|
| 185 |
+
loss for a given batch of episodes (or sub-episodes) We aim to minimize the squared consistency error on every sub-trajectory of length $S = \{ s _ { 0 : T _ { k } } ^ { ( k ) } \} _ { k = 1 } ^ { B }$ is $d$ . That is, the
|
| 186 |
+
|
| 187 |
+
$$
|
| 188 |
+
\mathcal { L } ( S , \theta , \phi ) = \sum _ { k = 1 } ^ { B } \sum _ { t = 0 } ^ { T _ { k } - 1 } C ( s _ { t : t + d } ^ { ( k ) } , \theta , \phi ) ^ { 2 } .
|
| 189 |
+
$$
|
| 190 |
+
|
| 191 |
+
We perform gradient descent on $\theta$ and $\phi$ to minimize this loss. In practice, we have found that it is beneficial to learn the parameter $\phi$ at least as fast as $\theta$ , and accordingly, given a mini-batch of episodes we perform a single gradient update on $\theta$ and possibly multiple gradient updates on $\phi$ (see Appendix for details).
|
| 192 |
+
|
| 193 |
+
In principle, the mini-batch $S$ may be taken from either on-policy or off-policy trajectories. In our implementation, we utilized a replay buffer prioritized by recency. As episodes (or sub-episodes) are sampled from the environment they are placed in a replay buffer and a priority $p { \big ( } s _ { 0 : T } )$ is given to a trajectory $s _ { 0 : T }$ equivalent to the current training step. Then, to sample a batch for training, $B$ episodes are sampled from the replay buffer proportional to exponentiated priority $\exp \{ \beta p ( s _ { 0 : T } ) \}$ for some hyperparameter $\beta \geq 0$ .
|
| 194 |
+
|
| 195 |
+
For the prior policy $\pi _ { \tilde { \theta } }$ , we use a lagged geometric mean of the parameters. At each training step, we update $\tilde { \theta } \alpha \tilde { \theta } + ( 1 - \alpha ) \theta$ . Thus on average our training scheme attempts to maximize entropy regularized expected reward while penalizing divergence from a policy roughly $1 / ( 1 - \alpha )$ training steps in the past.
|
| 196 |
+
|
| 197 |
+
# 4.3 AUTOMATIC TUNING OF THE LAGRANGE MULTIPLIER $\lambda$
|
| 198 |
+
|
| 199 |
+
The use of a relative entropy regularizer as a penalty rather than a constraint introduces several difficulties. The hyperparameter $\lambda$ must necessarily adapt to the distribution of rewards. Thus, $\lambda$ must be tuned not only to each environment but also during training on a single environment, since the observed reward distribution changes as the agent’s behavior policy improves. Using a constraint form of the regularizer is more desirable, and others have advocated its use in practice (Schulman et al., 2015) specifically to robustly allow larger updates during training.
|
| 200 |
+
|
| 201 |
+
To this end, we propose to redirect the hyperparameter tuning from $\lambda$ to $\epsilon$ . Specifically, we present a method which, given a desired hard constraint on the relative entropy defined by $\epsilon$ , approximates the equivalent penalty coefficient $\lambda ( \epsilon )$ . This is a key novelty of our work and is distinct from previous attempts at automatically tuning a regularizing coefficient, which iteratively increase and decrease the coefficient based on observed training behavior (Schulman et al., 2017b; Heess et al., 2017).
|
| 202 |
+
|
| 203 |
+
We restrict our analysis to the undiscounted setting $\gamma = 1$ with entropy regularizer $\tau = 0$ . Additionally, we assume deterministic, finite-horizon environment dynamics. An additional assumption we make is that the expected KL-divergence over states is well-approximated by the KL-divergence starting from the unique initial state $s _ { 0 }$ . Although in our experiments these restrictive assumptions are not met, we still found our method to perform well for adapting $\lambda$ during training.
|
| 204 |
+
|
| 205 |
+
In this setting the optimal policy of (14) is proportional to exponentiated scaled reward. Specifically, for a full episode $s _ { 0 : T } = ( s _ { 0 } , a _ { 0 } , r _ { 0 } , \ldots , s _ { T - 1 } , a _ { T - 1 } , r _ { T - 1 } , s _ { T } )$ , we have
|
| 206 |
+
|
| 207 |
+
$$
|
| 208 |
+
\pi ^ { * } ( s _ { 0 : T } ) \propto \tilde { \pi } ( s _ { 0 : T } ) \exp \left\{ \frac { R ( s _ { 0 : T } ) } { \lambda } \right\} ,
|
| 209 |
+
$$
|
| 210 |
+
|
| 211 |
+
where $\begin{array} { r } { \pi ( s _ { 0 : T } ) = \prod _ { i = 0 } ^ { T - 1 } \pi ( a _ { i } | s _ { i } ) } \end{array}$ and $\begin{array} { r } { R ( s _ { 0 : T } ) = \sum _ { i = 0 } ^ { T - 1 } r _ { i } } \end{array}$ . The normalization factor of $\pi ^ { * }$
|
| 212 |
+
|
| 213 |
+
$$
|
| 214 |
+
Z = \mathbb { E } _ { s _ { 0 : T } \sim \tilde { \pi } } \left[ \exp \left\{ \frac { R ( s _ { 0 : T } ) } { \lambda } \right\} \right] .
|
| 215 |
+
$$
|
| 216 |
+
|
| 217 |
+
We would like to approximate the trajectory-wide KL-divergence between $\pi ^ { * }$ and $\tilde { \pi }$ . We may express the KL-divergence analytically:
|
| 218 |
+
|
| 219 |
+
$$
|
| 220 |
+
\begin{array} { r l } & { K L ( \pi ^ { * } | | \tilde { \pi } ) = \mathbb { E } _ { s _ { 0 : T } \sim \pi ^ { * } } \left[ \log \left( \frac { \pi ^ { * } \left( s _ { 0 : T } \right) } { \tilde { \pi } \left( s _ { 0 : T } \right) } \right) \right] } \\ & { \qquad = \mathbb { E } _ { s _ { 0 : T } \sim \pi ^ { * } } \left[ \frac { R \left( s _ { 0 : T } \right) } { \lambda } - \log Z \right] } \\ & { \qquad = - \log Z + \mathbb { E } _ { s _ { 0 : T } \sim \tilde { \pi } } \left[ \frac { R \left( s _ { 0 : T } \right) } { \lambda } \cdot \frac { \pi ^ { * } \left( s _ { 0 : T } \right) } { \tilde { \pi } \left( s _ { 0 : T } \right) } \right] } \\ & { \qquad = - \log Z + \mathbb { E } _ { s _ { 0 : T } \sim \tilde { \pi } } \left[ \frac { R \left( s _ { 0 : T } \right) } { \lambda } \exp \{ R ( s _ { 0 : T } ) / \lambda - \log Z \} \right] . } \end{array}
|
| 221 |
+
$$
|
| 222 |
+
|
| 223 |
+
Since all expectations are with respect to $\tilde { \pi }$ , this quantity is tractable to approximate given episodes sampled from $\tilde { \pi }$
|
| 224 |
+
|
| 225 |
+
Therefore, in Trust-PCL, given a set of episodes sampled from the prior policy $\pi _ { \tilde { \theta } }$ and a desired maximum divergence $\epsilon$ , we can perform a simple line search to find a suitable $\lambda ( \epsilon )$ which yields $K L ( \pi ^ { * } | | \pi _ { \tilde { \theta } } )$ as close as possible to $\epsilon$ .
|
| 226 |
+
|
| 227 |
+
The preceding analysis provided a method to determine $\lambda ( \epsilon )$ given a desired maximum divergence $\epsilon$ . However, there is still a question of whether $\epsilon$ should change during training. Indeed, as episodes may possibly increase in length, $K L ( \pi ^ { * } | | \tilde { \pi } )$ naturally increases when compared to the average perstate $K L ( \pi ^ { * } ( - | s ) | | \tilde { \pi } ( - | s ) )$ , and vice versa for decreasing length. Thus, in practice, given an $\epsilon$ and a set of sampled episodes $\dot { S } = \{ s _ { 0 : T _ { k } } ^ { ( k ) } \} _ { k = 1 } ^ { N }$ , we approximate the best $\lambda$ which yields a maximum divergence of $\begin{array} { r } { \frac { \epsilon } { N } \sum _ { k = 1 } ^ { N } T _ { k } } \end{array}$ . This makes it so that $\epsilon$ corresponds more to a constraint on the lengthaveraged KL-divergence.
|
| 228 |
+
|
| 229 |
+
To avoid incurring a prohibitively large number of interactions with the environment for each parameter update, in practice we use the last 100 episodes as the set of sampled episodes $S$ . While this is not exactly the same as sampling episodes from $\pi _ { \tilde { \theta } }$ , it is not too far off since $\pi _ { \tilde { \theta } }$ is a lagged version of the online policy $\pi _ { \theta }$ . Moreover, we observed this protocol to work well in practice. A more sophisticated and accurate protocol may be derived by weighting the episodes according to the importance weights corresponding to their true sampling distribution.
|
| 230 |
+
|
| 231 |
+
# 5 EXPERIMENTS
|
| 232 |
+
|
| 233 |
+
We evaluate Trust-PCL against TRPO on a number of benchmark tasks. We choose TRPO as a baseline since it is a standard algorithm known to achieve state-of-the-art performance on the continuous control tasks we consider (see e.g., leaderboard results on the OpenAI Gym website (Brockman et al., 2016)). We find that Trust-PCL can match or improve upon TRPO’s performance in terms of both average reward and sample efficiency.
|
| 234 |
+
|
| 235 |
+
# 5.1 SETUP
|
| 236 |
+
|
| 237 |
+
We chose a number of control tasks available from OpenAI Gym (Brockman et al., 2016). The first task, Acrobot, is a discrete-control task, while the remaining tasks (HalfCheetah, Swimmer, Hopper, Walker2d, and Ant) are well-known continuous-control tasks utilizing the MuJoCo environment (Todorov et al., 2012).
|
| 238 |
+
|
| 239 |
+
For TRPO we trained using batches of $Q \ = \ 2 5 , 0 0 0$ steps (12, 500 for Acrobot), which is the approximate batch size used by other implementations (Duan et al., 2016; Schulman, 2017). Thus, at each training iteration, TRPO samples 25, 000 steps using the policy $\pi _ { \tilde { \theta } }$ and then takes a single step within a KL-ball to yield a new $\pi _ { \theta }$ .
|
| 240 |
+
|
| 241 |
+
Trust-PCL is off-policy, so to evaluate its performance we alternate between collecting experience and training on batches of experience sampled from the replay buffer. Specifically, we alternate between collecting $P = 1 0$ steps from the environment and performing a single gradient step based on a batch of size $Q = 6 4$ sub-episodes of length $P$ from the replay buffer, with a recency weight of $\beta = 0 . 0 0 1$ on the sampling distribution of the replay buffer. To maintain stability we use $\alpha = 0 . 9 9$ and we modified the loss from squared loss to Huber loss on the consistency error. Since our policy is parameterized by a unimodal Gaussian, it is impossible for it to satisfy all path consistencies, and so we found this crucial for stability.
|
| 242 |
+
|
| 243 |
+
For each of the variants and for each environment, we performed a hyperparameter search to find the best hyperparameters. The plots presented here show the reward achieved during training on the best hyperparameters averaged over the best 4 seeds of 5 randomly seeded training runs. Note that this reward is based on greedy actions (rather than random sampling).
|
| 244 |
+
|
| 245 |
+
Experiments were performed using Tensorflow (Abadi et al., 2016). Although each training step of Trust-PCL (a simple gradient step) is considerably faster than TRPO, we found that this does not have an overall effect on the run time of our implementation, due to a combination of the fact that each environment step is used in multiple training steps of Trust-PCL and that a majority of the run time is spent interacting with the environment. A detailed description of our implementation and hyperparameter search is available in the Appendix.
|
| 246 |
+
|
| 247 |
+
# 5.2 RESULTS
|
| 248 |
+
|
| 249 |
+
We present the reward over training of Trust-PCL and TRPO in Figure 1. We find that Trust-PCL can match or beat the performance of TRPO across all environments in terms of both final reward and sample efficiency. These results are especially significant on the harder tasks (Walker2d and Ant). We additionally present our results compared to other published results in Table 1. We find that even when comparing across different implementations, Trust-PCL can match or beat the state-of-the-art.
|
| 250 |
+
|
| 251 |
+
# 5.2.1 HYPERPARAMETER ANALYSIS
|
| 252 |
+
|
| 253 |
+
The most important hyperparameter in our method is $\epsilon$ , which determines the size of the trust region and thus has a critical role in the stability of the algorithm. To showcase this effect, we present the reward during training for several different values of $\epsilon$ in Figure 2. As $\epsilon$ increases, instability increases as well, eventually having an adverse effect on the agent’s ability to achieve optimal reward.
|
| 254 |
+
|
| 255 |
+

|
| 256 |
+
Figure 1: The results of Trust-PCL against a TRPO baseline. Each plot shows average greedy reward with single standard deviation error intervals capped at the min and max across 4 best of 5 randomly seeded training runs after choosing best hyperparameters. The $\mathbf { X }$ -axis shows millions of environment steps. We observe that Trust-PCL is consistently able to match and, in many cases, beat TRPO’s performance both in terms of reward and sample efficiency.
|
| 257 |
+
|
| 258 |
+

|
| 259 |
+
Figure 2: The results of Trust-PCL across several values of $\epsilon$ , defining the size of the trust region. Each plot shows average greedy reward across 4 best of 5 randomly seeded training runs after choosing best hyperparameters. The $\mathbf { X }$ -axis shows millions of environment steps. We observe that instability increases with $\epsilon$ , thus concluding that the use of trust region is crucial.
|
| 260 |
+
|
| 261 |
+
Note that standard PCL (Nachum et al., 2017) corresponds to $\epsilon \infty$ (that is, $\lambda = 0$ ). Therefore, standard PCL would fail in these environments, and the use of trust region is crucial.
|
| 262 |
+
|
| 263 |
+
The main advantage of Trust-PCL over existing trust region methods for continuous control is its ability to learn in an off-policy manner. The degree to which Trust-PCL is off-policy is determined by a combination of the hyparparameters $\alpha , \beta$ , and $P$ . To evaluate the importance of training off-policy, we evaluate Trust-PCL with a hyperparameter setting that is more on-policy. We set $\alpha = 0 . 9 5$ , $\beta = 0 . 1$ , and $P = 1 , 0 0 0$ . In this setting, we also use large batches of $Q = 2 5$ episodes of length $P$ (a total of 25, 000 environment steps per batch). Figure 3 shows the results of Trust-PCL with our original parameters and this new setting. We note a dramatic advantage in sample efficiency when using off-policy training. Although Trust-PCL (on-policy) can achieve state-of-the-art reward performance, it requires an exorbitant amount of experience. On the other hand, Trust-PCL (off
|
| 264 |
+
|
| 265 |
+

|
| 266 |
+
Figure 3: The results of Trust-PCL varying the degree of on/off-policy. We see that Trust-PCL (on-policy) has a behavior similar to TRPO, achieving good final reward but requiring an exorbitant number of experience collection. When collecting less experience per training step in Trust-PCL (off-policy), we are able to improve sample efficiency while still achieving a competitive final reward.
|
| 267 |
+
|
| 268 |
+
<table><tr><td>Domain</td><td>TRPO-GAE</td><td>TRPO (rllab)</td><td>TRPO (ours)</td><td>Trust-PCL</td><td>IPG</td></tr><tr><td>HalfCheetah</td><td>4871.36</td><td>2889</td><td>4343.6</td><td>7057.1</td><td>4767</td></tr><tr><td>Swimmer</td><td>137.25</td><td>1</td><td>288.1</td><td>297.0</td><td></td></tr><tr><td>Hopper</td><td>3765.78</td><td>1</td><td>3516.7</td><td>3804.9</td><td>一</td></tr><tr><td>Walker2d</td><td>6028.73</td><td>1487</td><td>2838.4</td><td>5027.2</td><td>3047</td></tr><tr><td>Ant</td><td>2918.25</td><td>1520</td><td>4347.5</td><td>6104.2</td><td>4415</td></tr></table>
|
| 269 |
+
|
| 270 |
+
Table 1: Results for best average reward in the first 10M steps of training for our implementations (TRPO (ours) and Trust-PCL) and external implementations. TRPO-GAE are results of Schulman (2017) available on the OpenAI Gym website. TRPO (rllab) and IPG are taken from Gu et al. (2017b). These results are each on different setups with different hyperparameter searches and in some cases different evaluation protocols (e.g.,TRPO (rllab) and IPG were run with a simple linear value network instead of the two-hidden layer network we use). Thus, it is not possible to make any definitive claims based on this data. However, we do conclude that our results are overall competitive with state-of-the-art external implementations.
|
| 271 |
+
|
| 272 |
+
policy) can be competitive in terms of reward while providing a significant improvement in sample efficiency.
|
| 273 |
+
|
| 274 |
+
One last hyperparameter is $\tau$ , determining the degree of exploration. Anecdotally, we found $\tau$ to not be of high importance for the tasks we evaluated. Indeed many of our best results use $\tau =$ 0. Including $\tau > 0$ had a marginal effect, at best. The reason for this is likely due to the tasks themselves. Indeed, other works which focus on exploration in continuous control have found the need to propose exploration-advanageous variants of these standard benchmarks (Haarnoja et al., 2017; Houthooft et al., 2016).
|
| 275 |
+
|
| 276 |
+
# 6 CONCLUSION
|
| 277 |
+
|
| 278 |
+
We have presented Trust-PCL, an off-policy algorithm employing a relative-entropy penalty to impose a trust region on a maximum reward objective. We found that Trust-PCL can perform well on a set of standard control tasks, improving upon TRPO both in terms of average reward and sample efficiency. Our best results on Trust-PCL are able to maintain the stability and solution quality of TRPO while approaching the sample-efficiency of value-based methods (see e.g., Metz et al. (2017)). This gives hope that the goal of achieving both stability and sample-efficiency without trading-off one for the other is attainable in a single unifying RL algorithm.
|
| 279 |
+
|
| 280 |
+
# 7 ACKNOWLEDGMENT
|
| 281 |
+
|
| 282 |
+
We thank Matthew Johnson, Luke Metz, Shane Gu, and the Google Brain team for insightful comments and discussions.
|
| 283 |
+
|
| 284 |
+
# REFERENCES
|
| 285 |
+
|
| 286 |
+
Mart´ın Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, Michael Isard, et al. Tensorflow: A system for largescale machine learning. arXiv:1605.08695, 2016.
|
| 287 |
+
|
| 288 |
+
Shun-Ichi Amari. Natural gradient works efficiently in learning. Neural Comput., 10, 1998.
|
| 289 |
+
|
| 290 |
+
Shun-Ichi Amari. Differential-geometrical methods in statistics, volume 28. Springer Science & Business Media, 2012.
|
| 291 |
+
|
| 292 |
+
Mohammad Gheshlaghi Azar, Vicenc¸ Gomez, and Hilbert J Kappen. Dynamic policy programming ´ with function approximation. AISTATS, 2011.
|
| 293 |
+
|
| 294 |
+
Mohammad Gheshlaghi Azar, Vicenc¸ Gomez, and Hilbert J Kappen. Dynamic policy programming. ´ JMLR, 13, 2012.
|
| 295 |
+
|
| 296 |
+
J Andrew Bagnell and Jeff Schneider. Covariant policy search. 2003.
|
| 297 |
+
|
| 298 |
+
Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. OpenAI Gym. arXiv:1606.01540, 2016.
|
| 299 |
+
|
| 300 |
+
Yan Duan, Xi Chen, Rein Houthooft, John Schulman, and Pieter Abbeel. Benchmarking deep reinforcement learning for continuous control. 2016.
|
| 301 |
+
|
| 302 |
+
Roy Fox, Ari Pakman, and Naftali Tishby. G-learning: Taming the noise in reinforcement learning via soft updates. Uncertainty in Artifical Intelligence, 2016. URL http://arxiv.org/abs/ 1512.08562.
|
| 303 |
+
|
| 304 |
+
Shixiang Gu, Timothy Lillicrap, Zoubin Ghahramani, Richard E Turner, and Sergey Levine. Q-prop: Sample-efficient policy gradient with an off-policy critic. ICLR, 2017a.
|
| 305 |
+
|
| 306 |
+
Shixiang Gu, Timothy Lillicrap, Zoubin Ghahramani, Richard E Turner, Bernhard Scholkopf, and ¨ Sergey Levine. Interpolated policy gradient: Merging on-policy and off-policy gradient estimation for deep reinforcement learning. arXiv preprint arXiv:1706.00387, 2017b.
|
| 307 |
+
|
| 308 |
+
Tuomas Haarnoja, Haoran Tang, Pieter Abbeel, and Sergey Levine. Reinforcement learning with deep energy-based policies. arXiv preprint arXiv:1702.08165, 2017.
|
| 309 |
+
|
| 310 |
+
Nicolas Heess, Srinivasan Sriram, Jay Lemmon, Josh Merel, Greg Wayne, Yuval Tassa, Tom Erez, Ziyu Wang, Ali Eslami, Martin Riedmiller, et al. Emergence of locomotion behaviours in rich environments. arXiv preprint arXiv:1707.02286, 2017.
|
| 311 |
+
|
| 312 |
+
Rein Houthooft, Xi Chen, Yan Duan, John Schulman, Filip De Turck, and Pieter Abbeel. Vime: Variational information maximizing exploration. In Advances in Neural Information Processing Systems, pp. 1109–1117, 2016.
|
| 313 |
+
|
| 314 |
+
Sham M Kakade. A natural policy gradient. In NIPS, 2002.
|
| 315 |
+
|
| 316 |
+
Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. ICLR, 2015.
|
| 317 |
+
|
| 318 |
+
Vijay R Konda and John N Tsitsiklis. Actor-critic algorithms, 2000.
|
| 319 |
+
|
| 320 |
+
Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015.
|
| 321 |
+
|
| 322 |
+
James Martens and Roger Grosse. Optimizing neural networks with kronecker-factored approximate curvature. In ICML, 2015.
|
| 323 |
+
|
| 324 |
+
Luke Metz, Julian Ibarz, Navdeep Jaitly, and James Davidson. Discrete sequential prediction of continuous actions for deep RL. CoRR, abs/1705.05035, 2017. URL http://arxiv.org/ abs/1705.05035.
|
| 325 |
+
|
| 326 |
+
Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, and Martin A. Riedmiller. Playing atari with deep reinforcement learning. arXiv:1312.5602, 2013.
|
| 327 |
+
|
| 328 |
+
Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy P Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. ICML, 2016.
|
| 329 |
+
|
| 330 |
+
Ofir Nachum, Mohammad Norouzi, Kelvin Xu, and Dale Schuurmans. Bridging the gap between value and policy based reinforcement learning. CoRR, abs/1702.08892, 2017. URL http: //arxiv.org/abs/1702.08892.
|
| 331 |
+
|
| 332 |
+
Mohammad Norouzi, Samy Bengio, Zhifeng Chen, Navdeep Jaitly, Mike Schuster, Yonghui Wu, and Dale Schuurmans. Reward augmented maximum likelihood for neural structured prediction. NIPS, 2016.
|
| 333 |
+
|
| 334 |
+
Neal Parikh, Stephen Boyd, et al. Proximal algorithms. Foundations and Trends $\textsuperscript { \textregistered }$ in Optimization, 1(3):127–239, 2014.
|
| 335 |
+
|
| 336 |
+
Jan Peters and Stefan Schaal. Reinforcement learning of motor skills with policy gradients. Neural networks, 21, 2008.
|
| 337 |
+
|
| 338 |
+
Jan Peters, Katharina Mulling, and Yasemin Altun. Relative entropy policy search. In AAAI, 2010.
|
| 339 |
+
|
| 340 |
+
Konrad Rawlik, Marc Toussaint, and Sethu Vijayakumar. On stochastic optimal control and reinforcement learning by approximate inference. In Twenty-Third International Joint Conference on Artificial Intelligence, 2013.
|
| 341 |
+
|
| 342 |
+
John Schulman. Modular rl. http://github.com/joschu/modular_rl, 2017. Accessed: 2017-06-01.
|
| 343 |
+
|
| 344 |
+
John Schulman, Sergey Levine, Pieter Abbeel, Michael Jordan, and Philipp Moritz. Trust region policy optimization. In ICML, 2015.
|
| 345 |
+
|
| 346 |
+
John Schulman, Philipp Moritz, Sergey Levine, Michael Jordan, and Pieter Abbeel. Highdimensional continuous control using generalized advantage estimation. ICLR, 2016.
|
| 347 |
+
|
| 348 |
+
John Schulman, Pieter Abbeel, and Xi Chen. Equivalence between policy gradients and soft qlearning. arXiv preprint arXiv:1704.06440, 2017a.
|
| 349 |
+
|
| 350 |
+
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017b.
|
| 351 |
+
|
| 352 |
+
David Silver, Guy Lever, Nicolas Heess, Thomas Degris, Daan Wierstra, and Martin Riedmiller. Deterministic policy gradient algorithms. In Proceedings of the 31st International Conference on Machine Learning (ICML-14), pp. 387–395, 2014.
|
| 353 |
+
|
| 354 |
+
Emanuel Todorov, Tom Erez, and Yuval Tassa. Mujoco: A physics engine for model-based control. In Intelligent Robots and Systems (IROS), 2012 IEEE/RSJ International Conference on, pp. 5026– 5033. IEEE, 2012.
|
| 355 |
+
|
| 356 |
+
Hado Van Hasselt, Arthur Guez, and David Silver. Deep reinforcement learning with double qlearning. AAAI, 2016.
|
| 357 |
+
|
| 358 |
+
Ziyu Wang, Victor Bapst, Nicolas Heess, Volodymyr Mnih, Remi Munos, Koray Kavukcuoglu, and Nando de Freitas. Sample efficient actor-critic with experience replay. arXiv preprint arXiv:1611.01224, 2016.
|
| 359 |
+
|
| 360 |
+
Christopher John Cornish Hellaby Watkins. Learning from delayed rewards. PhD thesis, University of Cambridge England, 1989.
|
| 361 |
+
|
| 362 |
+
Ronald J Williams and Jing Peng. Function optimization using connectionist reinforcement learning algorithms. Connection Science, 1991.
|
| 363 |
+
|
| 364 |
+
# A IMPLEMENTATION BENEFITS OF TRUST-PCL
|
| 365 |
+
|
| 366 |
+
We have already highlighted the ability of Trust-PCL to use off-policy data to stably train both a parameterized policy and value estimate, which sets it apart from previous methods. We have also noted the ease with which exploration can be incorporated through the entropy regularizer. We elaborate on several additional benefits of Trust-PCL.
|
| 367 |
+
|
| 368 |
+
Compared to TRPO, Trust-PCL is much easier to implement. Standard TRPO implementations perform second-order gradient calculations on the KL-divergence to construct a Fisher information matrix (more specifically a vector product with the inverse Fisher information matrix). This yields a vector direction for which a line search is subsequently employed to find the optimal step. Compare this to Trust-PCL which employs simple gradient descent. This makes implementation much more straightforward and easily realizable within standard deep learning frameworks.
|
| 369 |
+
|
| 370 |
+
Even if one replaces the constraint on the average KL-divergence of TRPO with a simple regularization penalty (as in proximal policy gradient methods (Schulman et al., 2017b; Wang et al., 2016)), optimizing the resulting objective requires computing the gradient of the KL-divergence. In Trust-PCL, there is no such necessity. The per-state KL-divergence need not have an analytically computable gradient. In fact, the KL-divergence need not have a closed form at all. The only requirement of Trust-PCL is that the log-density be analytically computable. This opens up the possible policy parameterizations to a much wider class of functions. While continuous control has traditionally used policies parameterized by unimodal Gaussians, with Trust-PCL the policy can be replaced with something much more expressive—for example, mixtures of Gaussians or autoregressive policies as in Metz et al. (2017).
|
| 371 |
+
|
| 372 |
+
We have yet to fully explore these additional benefits in this work, but we hope that future investigations can exploit the flexibility and ease of implementation of Trust-PCL to further the progress of RL in continuous control environments.
|
| 373 |
+
|
| 374 |
+
# B EXPERIMENTAL SETUP
|
| 375 |
+
|
| 376 |
+
We describe in detail the experimental setup regarding implementation and hyperparameter search.
|
| 377 |
+
|
| 378 |
+
# B.1 ENVIRONMENTS
|
| 379 |
+
|
| 380 |
+
In Acrobot, episodes were cut-off at step 500. For the remaining environments, episodes were cutoff at step $1 , 0 0 0$ .
|
| 381 |
+
|
| 382 |
+
Acrobot, HalfCheetah, and Swimmer are all non-terminating environments. Thus, for these environments, each episode had equal length and each batch contained the same number of episodes. Hopper, Walker2d, and Ant are environments that can terminate the agent. Thus, for these environments, the batch size throughout training remained constant in terms of steps but not in terms of episodes.
|
| 383 |
+
|
| 384 |
+
There exists an additional common MuJoCo task called Humanoid. We found that neither our implementation of TRPO nor Trust-PCL could make more than negligible headway on this task, and so omit it from the results. We are aware that TRPO with the addition of GAE and enough finetuning can be made to achieve good results on Humanoid (Schulman et al., 2016). We decided to not pursue a GAE implementation to keep a fair comparison between variants. Trust-PCL can also be made to incorporate an analogue to GAE (by maintaining consistencies at varying time scales), but we leave this to future work.
|
| 385 |
+
|
| 386 |
+
# B.2 IMPLEMENTATION DETAILS
|
| 387 |
+
|
| 388 |
+
We use fully-connected feed-forward neural networks to represent both policy and value.
|
| 389 |
+
|
| 390 |
+
The policy $\pi _ { \theta }$ is represented by a neural network with two hidden layers of dimension 64 with tanh activations. At time step $t$ , the network is given the observation $s _ { t }$ . It produces a vector $\mu _ { t }$ , which is combined with a learnable (but $t$ -agnostic) parameter $\xi$ to parametrize a unimodal Gaussian with mean $\mu _ { t }$ and standard deviation $\exp ( \xi )$ . The next action $a _ { t }$ is sampled randomly from this Gaussian.
|
| 391 |
+
|
| 392 |
+
The value network $V _ { \phi }$ is represented by a neural network with two hidden layers of dimension 64 with tanh activations. At time step $t$ the network is given the observation $s _ { t }$ and the component-wise squared observation $s _ { t } \odot s _ { t }$ . It produces a single scalar value.
|
| 393 |
+
|
| 394 |
+
# B.2.1 TRPO LEARNING
|
| 395 |
+
|
| 396 |
+
At each training iteration, both the policy and value parameters are updated. The policy is trained by performing a trust region step according to the procedure described in Schulman et al. (2015).
|
| 397 |
+
|
| 398 |
+
The value parameters at each step are solved using an LBFGS optimizer. To avoid instability, the value parameters are solved to fit a mixture of the empirical values and the expected values. That is, we determine $\phi$ to minimize $\begin{array} { r } { \sum _ { s \in \mathrm { b a t c h } } ( V _ { \phi } ( s ) - \kappa V _ { \tilde { \phi } } ( s ) - ( 1 - \kappa ) \hat { V } _ { \tilde { \phi } } ( s ) ) ^ { 2 } } \end{array}$ , where again $\tilde { \phi }$ is the previous value parameterization. We use $\kappa = 0 . 9$ . This method for training $\phi$ is according to that used in Schulman (2017).
|
| 399 |
+
|
| 400 |
+
# B.2.2 TRUST-PCL LEARNING
|
| 401 |
+
|
| 402 |
+
At each training iteration, both the policy and value parameters are updated. The specific updates are slightly different between Trust-PCL (on-policy) and Trust-PCL (off-policy).
|
| 403 |
+
|
| 404 |
+
For Trust-PCL (on-policy), the policy is trained by taking a single gradient step using the Adam optimizer (Kingma & Ba, 2015) with learning rate 0.001. The value network update is inspired by that used in TRPO we perform 5 gradients steps with learning rate 0.001, calculated with regards to a mix between the empirical values and the expected values according to the previous $\tilde { \phi }$ . We use $\kappa = 0 . 9 5$ .
|
| 405 |
+
|
| 406 |
+
For Trust-PCL (off-policy), both the policy and value parameters are updated in a single step using the Adam optimizer with learning rate 0.0001. For this variant, we also utilize a target value network (lagged at the same rate as the target policy network) to replace the value estimate at the final state for each path. We do not mix between empirical and expected values.
|
| 407 |
+
|
| 408 |
+
# B.3 HYPERPARAMETER SEARCH
|
| 409 |
+
|
| 410 |
+
We found the most crucial hyperparameters for effective learning in both TRPO and TrustPCL to be $\epsilon$ (the constraint defining the size of the trust region) and $d$ (the rollout determining how to evaluate the empirical value of a state). For TRPO we performed a grid search over $\epsilon \in \{ 0 . 0 1 , 0 . 0 2 , 0 . 0 5 , 0 . 1 \} , d \in \{ 1 0 , 5 0 \}$ . For Trust-PCL we performed a grid search over $\epsilon \in \{ 0 . 0 0 1 , 0 . 0 0 2 , 0 . 0 0 5 , 0 . 0 1 \} , d \in \{ 1 0$ $d \in \{ 1 0 , 5 0 \}$ . For Trust-PCL we also experimented with the value of $\tau$ , either keeping it at a constant 0 (thus, no exploration) or decaying it from 0.1 to 0.0 by a smoothed exponential rate of 0.1 every 2,500 training iterations.
|
| 411 |
+
|
| 412 |
+
We fix the discount to $\gamma = 0 . 9 9 5$ for all environments.
|
| 413 |
+
|
| 414 |
+
# C PSEUDOCODE
|
| 415 |
+
|
| 416 |
+
A simplified pseudocode for Trust-PCL is presented in Algorithm 1.
|
| 417 |
+
|
| 418 |
+
# Algorithm 1 Trust-PCL
|
| 419 |
+
|
| 420 |
+
Input: Environment $E N V$ , trust region constraint $\epsilon$ , learning rates $\eta _ { \pi } , \eta _ { v }$ , discount factor $\gamma$ , rollout $d$ , batch size $Q$ , collect steps per train step $P$ , number of training steps $N$ , replay buffer $R B$ with exponential lag $\beta$ , lag on prior policy $\alpha$ .
|
| 421 |
+
|
| 422 |
+
function Gradients $( \{ s _ { t : t + P } ^ { ( k ) } \} _ { k = 1 } ^ { B } )$ $/ / C$ is thpute $\begin{array} { r } { \Delta \theta = \sum _ { k = 1 } ^ { B } \sum _ { p = 0 } ^ { P - 1 } C ( s _ { t + p : t + p + d } ^ { ( k ) } , \theta , \phi ) \nabla _ { \theta } C ( s _ { t + p : t + p + d } ^ { ( k ) } , \theta , \phi ) . } \end{array}$ $\begin{array} { r } { \Delta \phi = \sum _ { k = 1 } ^ { B } \sum _ { p = 0 } ^ { P - 1 } C ( s _ { t + p : t + p + d } ^ { ( k ) } , \theta , \phi ) \nabla _ { \phi } C ( s _ { t + p : t + p + d } ^ { ( k ) } , \theta , \phi ) . } \end{array}$ Return $\Delta \theta , \Delta \phi$
|
| 423 |
+
end function
|
| 424 |
+
Initialize $\theta , \phi , \lambda$ , set $\tilde { \theta } = \theta$ .
|
| 425 |
+
Initialize empty replay buffer $R B ( \beta )$ .
|
| 426 |
+
for $i = 0$ to $N - 1$ do // Collect Sample $P$ steps $s _ { t : t + P } \sim \pi _ { \theta }$ on $E N V$ . Insert $s _ { t : t + P }$ to $R B$ . // Train
|
| 427 |
+
Sample batch $\{ s _ { t : t + P } ^ { ( k ) } \} _ { k = 1 } ^ { B }$ from $R B$ to contain a total of $Q$ transitions $( B \approx Q / P )$ . $\Delta \theta , \Delta \phi = \mathrm { G r a d i e n t s } \big ( \{ s _ { t : t + P } ^ { ( k ) } \} _ { k = 1 } ^ { B } \big )$ . Update $\theta \theta - \eta _ { \pi } \Delta \theta$ . Update $\phi \phi - \eta _ { v } \Delta \phi$ . // Update auxiliary variables Update $\tilde { \theta } = \alpha \tilde { \theta } + \mathrm { \Gamma } ( 1 - \alpha ) \theta$ . Update $\lambda$ in terms of $\epsilon$ according to Section 4.3.
|
| 428 |
+
end for
|
md/train/HysBZSqlx/HysBZSqlx.md
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# PLAYING SNES IN THE RETRO LEARNING ENVIRONMENT
|
| 2 |
+
|
| 3 |
+
Nadav Bhonker\*, Shai Rozenberg\* and Itay Hubara
|
| 4 |
+
|
| 5 |
+
Department of Electrical Engineering
|
| 6 |
+
Technion, Israel Institute of Technology
|
| 7 |
+
$( ^ { * } )$ indicates equal contribution
|
| 8 |
+
{nadavbh,shairoz}@tx.technion.ac.il
|
| 9 |
+
itayhubara@gmail.com
|
| 10 |
+
|
| 11 |
+
# ABSTRACT
|
| 12 |
+
|
| 13 |
+
Mastering a video game requires skill, tactics and strategy. While these attributes may be acquired naturally by human players, teaching them to a computer program is a far more challenging task. In recent years, extensive research was carried out in the field of reinforcement learning and numerous algorithms were introduced, aiming to learn how to perform human tasks such as playing video games. As a result, the Arcade Learning Environment (ALE) (Bellemare et al., 2013) has become a commonly used benchmark environment allowing algorithms to train on various Atari 2600 games. In many games the state-of-the-art algorithms outperform humans. In this paper we introduce a new learning environment, the Retro Learning Environment — RLE, that can run games on the Super Nintendo Entertainment System (SNES), Sega Genesis and several other gaming consoles. The environment is expandable, allowing for more video games and consoles to be easily added to the environment, while maintaining the same interface as ALE. Moreover, RLE is compatible with Python and Torch. SNES games pose a significant challenge to current algorithms due to their higher level of complexity and versatility.
|
| 14 |
+
|
| 15 |
+
# 1 INTRODUCTION
|
| 16 |
+
|
| 17 |
+
Controlling artificial agents using only raw high-dimensional input data such as image or sound is a difficult and important task in the field of Reinforcement Learning (RL). Recent breakthroughs in the field allow its utilization in real-world applications such as autonomous driving (Shalev-Shwartz et al., 2016), navigation (Bischoff et al., 2013) and more. Agent interaction with the real world is usually either expensive or not feasible, as the real world is far too complex for the agent to perceive. Therefore in practice the interaction is simulated by a virtual environment which receives feedback on a decision made by the algorithm. Traditionally, games were used as a RL environment, dating back to Chess (Campbell et al., 2002), Checkers (Schaeffer et al., 1992), backgammon (Tesauro, 1995) and the more recent Go (Silver et al., 2016). Modern games often present problems and tasks which are highly correlated with real-world problems. For example, an agent that masters a racing game, by observing a simulated driver’s view screen as input, may be usefull for the development of an autonomous driver. For high-dimensional input, the leading benchmark is the Arcade Learning Environment (ALE) (Bellemare et al., 2013) which provides a common interface to dozens of Atari 2600 games, each presents a different challenge. ALE provides an extensive benchmarking platform, allowing a controlled experiment setup for algorithm evaluation and comparison. The main challenge posed by ALE is to successfully play as many Atari 2600 games as possible (i.e., achieving a score higher than an expert human player) without providing the algorithm any game-specific information (i.e., using the same input available to a human - the game screen and score). A key work to tackle this problem is the Deep Q-Networks algorithm (Mnih et al., 2015), which made a breakthrough in the field of Deep Reinforcement Learning by achieving human level performance on 29 out of 49 games. In this work we present a new environment — the Retro Learning Environment (RLE). RLE sets new challenges by providing a unified interface for Atari 2600 games as well as more advanced gaming consoles. As a start we focused on the Super Nintendo Entertainment
|
| 18 |
+
|
| 19 |
+
System (SNES). Out of the five SNES games we tested using state-of-the-art algorithms, only one was able to outperform an expert human player. As an additional feature, RLE supports research of multi-agent reinforcement learning (MARL) tasks (Bus¸oniu et al., 2010). We utilize this feature by training and evaluating the agents against each other, rather than against a pre-configured in-game AI. We conducted several experiments with this new feature and discovered that agents tend to learn how to overcome their current opponent rather than generalize the game being played. However, if an agent is trained against an ensemble of different opponents, its robustness increases. The main contributions of the paper are as follows:
|
| 20 |
+
|
| 21 |
+
• Introducing a novel RL environment with significant challenges and an easy agent evaluation technique (enabling agents to compete against each other) which could lead to new and more advanced RL algorithms.
|
| 22 |
+
• A new method to train an agent by enabling it to train against several opponents, making the final policy more robust.
|
| 23 |
+
• Encapsulating several different challenges to a single RL environment.
|
| 24 |
+
|
| 25 |
+
# 2 RELATED WORK
|
| 26 |
+
|
| 27 |
+
# 2.1 ARCADE LEARNING ENVIRONMENT
|
| 28 |
+
|
| 29 |
+
The Arcade Learning Environment is a software framework designed for the development of RL algorithms, by playing Atari 2600 games. The interface provided by ALE allows the algorithms to select an action and receive the Atari screen and a reward in every step. The action is the equivalent to a human’s joystick button combination and the reward is the difference between the scores at time stamp $t$ and $t - 1$ . The diversity of games for Atari provides a solid benchmark since different games have significantly different goals. Atari 2600 has over 500 games, currently over 70 of them are implemented in ALE and are commonly used for algorithm comparison.
|
| 30 |
+
|
| 31 |
+
# 2.2 INFINITE MARIO
|
| 32 |
+
|
| 33 |
+
Infinite Mario (Togelius et al., 2009) is a remake of the classic Super Mario game in which levels are randomly generated. On these levels the Mario AI Competition was held. During the competition, several algorithms were trained on Infinite Mario and their performances were measured in terms of the number of stages completed. As opposed to ALE, training is not based on the raw screen data but rather on an indication of Mario’s (the player’s) location and objects in its surrounding. This environment no longer poses a challenge for state of the art algorithms. Its main shortcoming lie in the fact that it provides only a single game to be learnt. Additionally, the environment provides hand-crafted features, extracted directly from the simulator, to the algorithm. This allowed the use of planning algorithms that highly outperform any learning based algorithm.
|
| 34 |
+
|
| 35 |
+
# 2.3 OPENAI GYM
|
| 36 |
+
|
| 37 |
+
The OpenAI gym (Brockman et al., 2016) is an open source platform with the purpose of creating an interface between RL environments and algorithms for evaluation and comparison purposes. OpenAI Gym is currently very popular due to the large number of environments supported by it. For example ALE, Go, MouintainCar and VizDoom (Zhu et al., 2016), an environment for the learning of the 3D first-person-shooter game ”Doom”. OpenAI Gym’s recent appearance and wide usage indicates the growing interest and research done in the field of RL.
|
| 38 |
+
|
| 39 |
+
# 2.4 OPENAI UNIVERSE
|
| 40 |
+
|
| 41 |
+
Universe (Universe, 2016) is a platform within the OpenAI framework in which RL algorithms can train on over a thousand games. Universe includes very advanced games such as GTA V, Portal as well as other tasks (e.g. browser tasks). Unlike RLE, Universe doesn’t run the games locally and requires a VNC interface to a server that runs the games. This leads to a lower frame rate and thus longer training times.
|
| 42 |
+
|
| 43 |
+
# 2.5 MALMO
|
| 44 |
+
|
| 45 |
+
Malmo (Johnson et al., 2016) is an artificial intelligence experimentation platform of the famous game ”Minecraft”. Although Malmo consists of only a single game, it presents numerous challenges since the ”Minecraft” game can be configured differently each time. The input to the RL algorithms include specific features indicating the ”state” of the game and the current reward.
|
| 46 |
+
|
| 47 |
+
# 2.6 DEEPMIND LAB
|
| 48 |
+
|
| 49 |
+
DeepMind Lab (Dee) is a first-person 3D platform environment which allows training RL algorithms on several different challenges: static/random map navigation, collect fruit (a form of reward) and a laser-tag challenge where the objective is to tag the opponents controlled by the in-game AI. In LAB the agent observations are the game screen (with an additional depth channel) and the velocity of the character. LAB supports four games (one game - four different modes).
|
| 50 |
+
|
| 51 |
+
# 2.7 DEEP Q-LEARNING
|
| 52 |
+
|
| 53 |
+
In our work, we used several variant of the Deep Q-Network algorithm (DQN) (Mnih et al., 2015), an RL algorithm whose goal is to find an optimal policy (i.e., given a current state, choose action that maximize the final score). The state of the game is simply the game screen, and the action is a combination of joystick buttons that the game responds to (i.e., moving ,jumping). DQN learns through trial and error while trying to estimate the ”Q-function”, which predicts the cumulative discounted reward at the end of the episode given the current state and action while following a policy $\pi$ . The Q-function is represented using a convolution neural network that receives the screen as input and predicts the best possible action at it’s output. The Q-function weights $\theta$ are updated according to:
|
| 54 |
+
|
| 55 |
+
$$
|
| 56 |
+
\theta _ { t + 1 } ( s _ { t } , a _ { t } ) = \theta _ { t } + \alpha ( R _ { t + 1 } + \gamma \operatorname* { m a x } _ { a } ( Q _ { t } ( s _ { t + 1 } , a ; \theta _ { t } ^ { \prime } ) ) - Q _ { t } ( s _ { t } , a _ { t } ; \theta _ { t } ) ) \nabla _ { \theta } Q _ { t } ( s _ { t } , a _ { t } ; \theta _ { t } ) ,
|
| 57 |
+
$$
|
| 58 |
+
|
| 59 |
+
where $s _ { t }$ , $s _ { t + 1 }$ are the current and next states, $a _ { t }$ is the action chosen, $\alpha$ is the step size, $\gamma$ is the discounting factor $R _ { t + 1 }$ is the reward received by applying $a _ { t }$ at $s _ { t }$ . $\theta ^ { \prime }$ represents the previous weights of the network that are updated periodically. Other than DQN, we examined two leading algorithms on the RLE: Double Deep Q-Learning (D-DQN) (Van Hasselt et al., 2015), a DQN based algorithm with a modified network update rule. Dueling Double DQN (Wang et al., 2015), a modification of D-DQN’s architecture in which the $\mathbf { Q }$ -function is modeled using a state (screen) dependent estimator and an action dependent estimator.
|
| 60 |
+
|
| 61 |
+
# 3 THE RETRO LEARNING ENVIRONMENT
|
| 62 |
+
|
| 63 |
+
# 3.1 SUPER NINTENDO ENTERTAINMENT SYSTEM
|
| 64 |
+
|
| 65 |
+
The Super Nintendo Entertainment System (SNES) is a home video game console developed by Nintendo and released in 1990. A total of 783 games were released, among them, the iconic Super Mario World, Donkey Kong Country and The Legend of Zelda. Table (1) presents a comparison between Atari 2600, Sega Genesis and SNES game consoles, from which it is clear that SNES and Genesis games are far more complex.
|
| 66 |
+
|
| 67 |
+
# 3.2 IMPLEMENTATION
|
| 68 |
+
|
| 69 |
+
To allow easier integration with current platforms and algorithms, we based our environment on the ALE, with the aim of maintaining as much of its interface as possible. While the ALE is highly coupled with the Atari emulator, Stella1, RLE takes a different approach and separates the learning environment from the emulator. This was achieved by incorporating an interface named LibRetro (libRetro site), that allows communication between front-end programs to game-console emulators. Currently, LibRetro supports over 15 game consoles, each containing hundreds of games, at an estimated total of over 7,000 games that can potentially be supported using this interface. Examples of supported game consoles include Nintendo Entertainment System, Game Boy, N64, Sega Genesis,
|
| 70 |
+
|
| 71 |
+
Saturn, Dreamcast and Sony PlayStation. We chose to focus on the SNES game console implemented using the $\operatorname { s n e s } 9 \mathrm { x } ^ { 2 }$ as it’s games present interesting, yet plausible to overcome challenges. Additionally, we utilized the Genesis-Plus- $\mathbf { \Delta } G \mathbf { X } ^ { 3 }$ emulator, which supports several Sega consoles: Genesis/Mega Drive, Master System, Game Gear and SG-1000.
|
| 72 |
+
|
| 73 |
+
# 3.3 SOURCE CODE
|
| 74 |
+
|
| 75 |
+
RLE is fully available as open source software for use under GNU’s General Public License4. The environment is implemented in $\mathrm { C } { + } { + }$ with an interface to algorithms in $\mathrm { C } { + } { + }$ , Python and Lua. Adding a new game to the environment is a relatively simple process.
|
| 76 |
+
|
| 77 |
+
# 3.4 RLE INTERFACE
|
| 78 |
+
|
| 79 |
+
RLE provides a unified interface to all games in its supported consoles, acting as an RL-wrapper to the LibRetro interface. Initialization of the environment is done by providing a game (ROM file) and a gaming-console (denoted by ’core’). Upon initialization, the first state is the initial frame of the game, skipping all menu selection screens. The cores are provided with the RLE and installed together with the environment. Actions have a bit-wise representation where each controller button is represented by a one-hot vector. Therefore a combination of several buttons is possible using the bit-wise OR operator. The number of valid buttons combinations is larger than 700, therefore only the meaningful combinations are provided. The environments observation is the game screen, provided as a 3D array of 32 bit per pixel with dimensions which vary depending on the game. The reward can be defined differently per game, usually we set it to be the score difference between two consecutive frames. By setting different configuration to the environment, it is possible to alter in-game properties such as difficulty (i.e easy, medium, hard), its characters, levels, etc.
|
| 80 |
+
|
| 81 |
+
Table 1: Atari 2600, SNES and Genesis comparison
|
| 82 |
+
|
| 83 |
+
<table><tr><td></td><td>Atari 2600</td><td>SNES</td><td>Genesis</td></tr><tr><td>Number of Games</td><td>565</td><td>783</td><td>928</td></tr><tr><td>CPU speed</td><td>1.19MHz</td><td>3.58MHz</td><td>7.6 MHz</td></tr><tr><td>ROM size</td><td>2-4KB</td><td>0.5-6MB</td><td>16 MBytes</td></tr><tr><td>RAM size</td><td>128 bytes</td><td>128KB</td><td>72KB</td></tr><tr><td>Color depth</td><td>8 bit</td><td>16 bit</td><td>16 bit</td></tr><tr><td>Screen Size</td><td>160x210</td><td>256x224 or 512x448</td><td>320x224</td></tr><tr><td>Number of controller buttons</td><td>5</td><td>12</td><td>11</td></tr><tr><td>Possible buttons combinations</td><td>18</td><td>over 720</td><td>over100</td></tr></table>
|
| 84 |
+
|
| 85 |
+
# 3.5 ENVIRONMENT CHALLENGES
|
| 86 |
+
|
| 87 |
+
Integrating SNES and Genesis with RLE presents new challenges to the field of RL where visual information in the form of an image is the only state available to the agent. Obviously, SNES games are significantly more complex and unpredictable than Atari games. For example in sports games, such as NBA, while the player (agent) controls a single player, all the other nine players’ behavior is determined by pre-programmed agents, each exhibiting random behavior. In addition, many SNES games exhibit delayed rewards in the course of their play (i.e., reward for an actions is given many time steps after it was performed). Similarly, in some of the SNES games, an agent can obtain a reward that is indirectly related to the imposed task. For example, in platform games, such as Super Mario, reward is received for collecting coins and defeating enemies, while the goal of the challenge is to reach the end of the level which requires to move to keep moving to the right. Moreover, upon completing a level, a score bonus is given according to the time required for its completion. Therefore collecting coins or defeating enemies is not necessarily preferable if it consumes too much time. Analysis of such games is presented in section 4.2. Moreover, unlike Atari that consists of eight directions and one action button, SNES has eight-directions pad and six actions buttons. Since combinations of buttons are allowed, and required at times, the actual actions space may be larger than 700, compared to the maximum of 18 actions in Atari. Furthermore, the background in SNES is very rich, filled with details which may move locally or across the screen, effectively acting as non-stationary noise since it provided little to no information regarding the state itself. Finally, we note that SNES utilized the first 3D games. In the game Wolfenstein, the player must navigate a maze from a first-person perspective, while dodging and attacking enemies. The SNES offers plenty of other 3D games such as flight and racing games which exhibit similar challenges. These games are much more realistic, thus inferring from SNES games to ”real world” tasks, as in the case of self driving cars, might be more beneficial. A visual comparison of two games, Atari and SNES, is presented in Figure (1).
|
| 88 |
+
|
| 89 |
+

|
| 90 |
+
Figure 1: Atari 2600 and SNES game screen comparison: Left: ”Boxing” an Atari 2600 fighting game , Right: ”Mortal Kombat” a SNES fighting game. Note the exceptional difference in the amount of details between the two games. Therefore, distinguishing a relevant signal from noise is much more difficult.
|
| 91 |
+
|
| 92 |
+
Table 2: Comparison between RLE and the latest RL environments
|
| 93 |
+
|
| 94 |
+
<table><tr><td>Characteristics</td><td>RLE</td><td>OpenAI Universe</td><td>Inifinte Mario</td><td>ALE</td><td>Project Malmo</td><td>DeepMind Lab</td></tr><tr><td>Number of Games</td><td>8 out of 7000+</td><td>1000+</td><td>1</td><td>74</td><td>1</td><td>4</td></tr><tr><td>In game adjustments1</td><td>Yes</td><td>NO</td><td>No</td><td>No</td><td>Yes</td><td>Yes</td></tr><tr><td>Frame rate</td><td>530fps(SNES)</td><td>60fps</td><td>5675fps2</td><td>120fps</td><td><7000fps</td><td><1000fps</td></tr><tr><td>Observation (Input)</td><td>screen, RAM</td><td>Screen</td><td>hand crafted features</td><td>screen, RAM</td><td>hand crafted features</td><td>screen+depth and velocity</td></tr></table>
|
| 95 |
+
|
| 96 |
+
1 Allowing changes in-the game configurations (e.g., changing difficulty, characters, etc.) 2 Measured on an i7-5930k CPU
|
| 97 |
+
|
| 98 |
+
# 4 EXPERIMENTS
|
| 99 |
+
|
| 100 |
+
# 4.1 EVALUATION METHODOLOGY
|
| 101 |
+
|
| 102 |
+
The evaluation methodology that we used for benchmarking the different algorithms is the popular method proposed by (Mnih et al., 2015). Each examined algorithm is trained until either it reached convergence or 100 epochs (each epoch corresponds to 50,000 actions), thereafter it is evaluated by performing 30 episodes of every game. Each episode ends either by reaching a terminal state or after 5 minutes. The results are averaged per game and compared to the average result of a human player. For each game the human player was given two hours for training, and his performances were evaluated over 20 episodes. As the various algorithms don’t use the game audio in the learning process, the audio was muted for both the agent and the human. From both, humans and agents score, a random agent score (an agent performing actions randomly) was subtracted to assure that learning indeed occurred. It is important to note that DQN’s $\epsilon$ -greedy approach (select a random action with a small probability ) is present during testing thus assuring that the same sequence of actions isn’t repeated. While the screen dimensions in SNES are larger than those of Atari, in our experiments we maintained the same pre-processing of DQN (i.e., downscaling the image to $8 4 \mathrm { x } 8 4$ pixels and converting to gray-scale). We argue that downscaling the image size doesn’t affect a human’s ability to play the game, therefore suitable for RL algorithms as well. To handle the large action space, we limited the algorithm’s actions to the minimal button combinations which provide unique behavior. For example, on many games the R and L action buttons don’t have any use therefore their use and combinations were omitted.
|
| 103 |
+
|
| 104 |
+
# 4.1.1 RESULTS
|
| 105 |
+
|
| 106 |
+
A thorough comparison of the four different agents’ performances on SNES games can be seen in Figure (). The full results can be found in Table (3). Only in the game Mortal Kombat a trained agent was able to surpass a expert human player performance as opposed to Atari games where the same algorithms have surpassed a human player on the vast majority of the games.
|
| 107 |
+
|
| 108 |
+
One example is Wolfenstein game, a 3D first-person shooter game, requires solving 3D vision tasks, navigating in a maze and detecting object. As evident from figure (2), all agents produce poor results indicating a lack of the required properties. By using $\epsilon$ -greedy approach the agents weren’t able to explore enough states (or even other rooms in our case). The algorithm’s final policy appeared as a random walk in a 3D space. Exploration based on visited states such as presented in Bellemare et al. (2016) might help addressing this issue. An interesting case is Gradius III, a side-scrolling, flight-shooter game. While the trained agent was able to master the technical aspects of the game, which includes shooting incoming enemies and dodging their projectiles, it’s final score is still far from a human’s. This is due to a hidden game mechanism in the form of ”power-ups”, which can be accumulated, and significantly increase the players abilities. The more power-ups collected without being use — the larger their final impact will be. While this game-mechanism is evident to a human, the agent acts myopically and uses the power-up straight away5.
|
| 109 |
+
|
| 110 |
+
# 4.2 REWARD SHAPING
|
| 111 |
+
|
| 112 |
+
As part of the environment and algorithm evaluation process, we investigated two case studies. First is a game on which DQN had failed to achieve a better-than-random score, and second is a game on which the training duration was significantly longer than that of other games.
|
| 113 |
+
|
| 114 |
+
In the first case study, we used a 2D back-view racing game ”F-Zero”. In this game, one is required to complete four laps of the track while avoiding other race cars. The reward, as defined by the score of the game, is only received upon completing a lap. This is an extreme case of a reward delay. A lap may last as long as 30 seconds, which span over 450 states (actions) before reward is received. Since DQN’s exploration is a simple $\epsilon$ -greedy approach, it was not able to produce a useful strategy. We approached this issue using reward shaping, essentially a modification of the reward to be a function of the reward and the observation, rather than the reward alone. Here, we define the reward to be the sum of the score and the agent’s speed (a metric displayed on the screen of the game). Indeed when the reward was defined as such, the agents learned to finish the race in first place within a short training period.
|
| 115 |
+
|
| 116 |
+
The second case study is the famous game of Super Mario. In this game the agent, Mario, is required to reach the right-hand side of the screen, while avoiding enemies and collecting coins. We found this case interesting as it involves several challenges at once: dynamic background that can change drastically within a level, sparse and delayed rewards and multiple tasks (such as avoiding enemies and pits, advancing rightwards and collecting coins). To our surprise, DQN was able to reach the end of the level without any reward shaping, this was possible since the agent receives rewards for events (collecting coins, stomping on enemies etc.) that tend to appear to the right of the player, causing the agent to prefer moving right. However, the training time required for convergence was significantly longer than other games. We defined the reward as the sum of the in-game reward and a bonus granted according the the player’s position, making moving right preferable. This reward proved useful, as training time required for convergence decreased significantly. The two games above can be seen in Figure (3).
|
| 117 |
+
|
| 118 |
+

|
| 119 |
+
Figure 2: DQN, DDQN and Duel-DDQN performance. Results were normalized by subtracting the a random agent’s score and dividing by the human player score. Thus 100 represents a human player and zero a random agent.
|
| 120 |
+
|
| 121 |
+
Figure (4) illustrates the agent’s average value function . Though both were able complete the stage trained upon, the convergence rate with reward shaping is significantly quicker due to the immediate realization of the agent to move rightwards.
|
| 122 |
+
|
| 123 |
+

|
| 124 |
+
Figure 3: Left: The game Super Mario with added bonus for moving right, enabling the agent to master them game after less training time. Right: The game $F$ -Zero. By granting a reward for speed the agent was able to master this game, as oppose to using solely the in-game reward.
|
| 125 |
+
|
| 126 |
+

|
| 127 |
+
Figure 4: Averaged action-value (Q) for Super Mario trained with reward bonus for moving right (blue) and without (red).
|
| 128 |
+
|
| 129 |
+
# 4.3 MULTI-AGENT REINFORCEMENT LEARNING
|
| 130 |
+
|
| 131 |
+
In this section we describe our experiments with RLE’s multi-agent capabilities. We consider the case where the number of agents, $n = 2$ and the goals of the agents are opposite, as in $r _ { 1 } = - r _ { 2 }$ . This scheme is known as fully competitive (Bus¸oniu et al., 2010). We used the simple singleagent RL approach (as described by Bus¸oniu et al. (2010) section 5.4.1) which is to apply to single agent approach to the multi-agent case. This approach was proved useful in Crites and Barto (1996) and Mataric (1997). More elaborate schemes are possible such as the minimax-Q algo-´ rithm (Littman, 1994), (Littman, 2001). These may be explored in future works. We conducted three experiments on this setup: the first use was to train two different agents against the in-game AI, as done in previous sections, and evaluate their performance by letting them compete against each other. Here, rather than achieving the highest score, the goal was to win a tournament which consist of 50 rounds, as common in human-player competitions. The second experiment was to initially train two agents against the in-game AI, and resume the training while competing against each other. In this case, we evaluated the agent by playing again against the in-game AI, separately. Finally, in our last experiment we try to boost the agent capabilities by alternated it’s opponents, switching between the in-game AI and other trained agents.
|
| 132 |
+
|
| 133 |
+
# 4.3.1 MULTI-AGENT REINFORCEMENT LEARNING RESULTS
|
| 134 |
+
|
| 135 |
+
We chose the game Mortal Kombat, a two character side viewed fighting game (a screenshot of the game can be seen in Figure (1), as a testbed for the above, as it exhibits favorable properties: both players share the same screen, the agent’s optimal policy is heavily dependent on the rival’s behavior, unlike racing games for example. In order to evaluate two agents fairly, both were trained using the same characters maintaining the identity of rival and agent. Furthermore, to remove the impact of the starting positions of both agents on their performances, the starting positions were initialized randomly.
|
| 136 |
+
|
| 137 |
+
In the first experiment we evaluated all combinations of DQN against D-DQN and Dueling D-DQN. Each agent was trained against the in-game AI until convergence. Then 50 matches were performed between the two agents. DQN lost 28 out of 50 games against Dueling D-DQN and 33 against D-DQN. D-DQN lost 26 time to Dueling D-DQN. This win balance isn’t far from the random case, since the algorithms converged into a policy in which movement towards the opponent is not required rather than generalize the game. Therefore, in many episodes, little interaction between the two agents occur, leading to a semi-random outcome.
|
| 138 |
+
|
| 139 |
+
In our second experiment, we continued the training process of a the D-DQN network by letting it compete against the Dueling D-DQN network. We evaluated the re-trained network by playing 30 episodes against the in-game AI. After training, D-DQN was able to win 28 out of 30 games, yet when faced again against the in-game AI its performance deteriorated drastically (from an average of 17000 to an average of -22000). This demonstrated a form of catastrophic forgetting (Goodfellow et al., 2013) even though the agents played the same game.
|
| 140 |
+
|
| 141 |
+
In our third experiment, we trained a Dueling D-DQN agent against three different rivals: the ingame AI, a trained DQN agent and a trained Dueling-DQN agent, in an alternating manner, such that in each episode a different rival was playing as the opponent with the intention of preventing the agent from learning a policy suitable for just one opponent. The new agent was able to achieve a score of 162,966 (compared to the ”normal” dueling D-DQN which achieved 169,633). As a new and objective measure of generalization, we’ve configured the in-game AI difficulty to be ”very hard” (as opposed to the default ”medium” difficulty). In this metric the alternating version achieved 83,400 compared to -33,266 of the dueling D-DQN which was trained in default setting. Thus, proving that the agent learned to generalize to other policies which weren’t observed while training.
|
| 142 |
+
|
| 143 |
+
# 4.4 FUTURE CHALLENGES
|
| 144 |
+
|
| 145 |
+
As demonstrated, RLE presents numerous challenges that have yet to be answered. In addition to being able to learn all available games, the task of learning games in which reward delay is extreme, such as F-Zero without reward shaping, remains an unsolved challenge. Additionally, some games, such as Super Mario, feature several stages that differ in background and the levels structure. The task of generalizing platform games, as in learning on one stage and being tested on the other, is another unexplored challenge. Likewise surpassing human performance remains a challenge since current state-of-the-art algorithms still struggling with the many SNES games.
|
| 146 |
+
|
| 147 |
+
# 5 CONCLUSION
|
| 148 |
+
|
| 149 |
+
We introduced a rich environment for evaluating and developing reinforcement learning algorithms which presents significant challenges to current state-of-the-art algorithms. In comparison to other environments RLE provides a large amount of games with access to both the screen and the ingame state. The modular implementation we chose allows extensions of the environment with new consoles and games, thus ensuring the relevance of the environment to RL algorithms for years to come (see Table (2)). We’ve encountered several games in which the learning process is highly dependent on the reward definition. This issue can be addressed and explored in RLE as reward definition can be done easily. The challenges presented in the RLE consist of: 3D interpretation, delayed reward, noisy background, stochastic AI behavior and more. Although some algorithms were able to play successfully on part of the games, to fully overcome these challenges, an agent must incorporate both technique and strategy. Therefore, we believe, that the RLE is a great platform for future RL research.
|
| 150 |
+
|
| 151 |
+
# 6 ACKNOWLEDGMENTS
|
| 152 |
+
|
| 153 |
+
The authors are grateful to the Signal and Image Processing Lab (SIPL) staff for their support, Alfred Agrell and the LibRetro community for their support and Marc G. Bellemare for his valuable inputs.
|
| 154 |
+
|
| 155 |
+
# REFERENCES
|
| 156 |
+
|
| 157 |
+
M. G. Bellemare, Y. Naddaf, J. Veness, and M. Bowling. The arcade learning environment: An evaluation platform for general agents. Journal of Artificial Intelligence Research, 47:253–279, jun 2013.
|
| 158 |
+
|
| 159 |
+
M. G. Bellemare, S. Srinivasan, G. Ostrovski, T. Schaul, D. Saxton, and R. Munos. Unifying countbased exploration and intrinsic motivation. arXiv preprint arXiv:1606.01868, 2016.
|
| 160 |
+
|
| 161 |
+
B. Bischoff, D. Nguyen-Tuong, I.-H. Lee, F. Streichert, and A. Knoll. Hierarchical reinforcement learning for robot navigation. In ESANN, 2013.
|
| 162 |
+
G. Brockman, V. Cheung, L. Pettersson, J. Schneider, J. Schulman, J. Tang, and W. Zaremba. Openai gym. arXiv preprint arXiv:1606.01540, 2016.
|
| 163 |
+
L. Bus¸oniu, R. Babuska, and B. De Schutter. Multi-agent reinforcement learning: An overview. In ˇ Innovations in Multi-Agent Systems and Applications-1, pages 183–221. Springer, 2010.
|
| 164 |
+
M. Campbell, A. J. Hoane, and F.-h. Hsu. Deep blue. Artificial Intelligence, 134(1):57–83, 2002.
|
| 165 |
+
R. Crites and A. Barto. Improving elevator performance using reinforcement learning. In Advances in Neural Information Processing Systems 8. Citeseer, 1996.
|
| 166 |
+
I. J. Goodfellow, M. Mirza, D. Xiao, A. Courville, and Y. Bengio. An empirical investigation of catastrophic forgetting in gradient-based neural networks. arXiv preprint arXiv:1312.6211, 2013.
|
| 167 |
+
M. Johnson, K. Hofmann, T. Hutton, and D. Bignell. The malmo platform for artificial intelligence experimentation. In International Joint Conference On Artificial Intelligence (IJCAI), page 4246, 2016.
|
| 168 |
+
libRetro site. Libretro. www.libretro.com. Accessed: 2016-11-03.
|
| 169 |
+
M. L. Littman. Markov games as a framework for multi-agent reinforcement learning. In Proceedings of the eleventh international conference on machine learning, volume 157, pages 157–163, 1994.
|
| 170 |
+
M. L. Littman. Value-function reinforcement learning in markov games. Cognitive Systems Research, 2(1):55–66, 2001.
|
| 171 |
+
M. J. Mataric. Reinforcement learning in the multi-robot domain. In ´ Robot colonies, pages 73–83. Springer, 1997.
|
| 172 |
+
V. Mnih, K. Kavukcuoglu, D. Silver, A. A. Rusu, J. Veness, M. G. Bellemare, A. Graves, M. Riedmiller, A. K. Fidjeland, G. Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015.
|
| 173 |
+
J. Schaeffer, J. Culberson, N. Treloar, B. Knight, P. Lu, and D. Szafron. A world championship caliber checkers program. Artificial Intelligence, 53(2):273–289, 1992.
|
| 174 |
+
S. Shalev-Shwartz, N. Ben-Zrihem, A. Cohen, and A. Shashua. Long-term planning by short-term prediction. arXiv preprint arXiv:1602.01580, 2016.
|
| 175 |
+
D. Silver, A. Huang, C. J. Maddison, A. Guez, L. Sifre, G. Van Den Driessche, J. Schrittwieser, I. Antonoglou, V. Panneershelvam, M. Lanctot, et al. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016.
|
| 176 |
+
G. Tesauro. Temporal difference learning and td-gammon. Communications of the ACM, 38(3): 58–68, 1995.
|
| 177 |
+
J. Togelius, S. Karakovskiy, J. Koutn´ık, and J. Schmidhuber. Super mario evolution. In 2009 IEEE Symposium on Computational Intelligence and Games, pages 156–161. IEEE, 2009.
|
| 178 |
+
Universe. Universe. universe.openai.com, 2016. Accessed: 2016-12-13.
|
| 179 |
+
H. Van Hasselt, A. Guez, and D. Silver. Deep reinforcement learning with double q-learning. CoRR, abs/1509.06461, 2015.
|
| 180 |
+
Z. Wang, N. de Freitas, and M. Lanctot. Dueling network architectures for deep reinforcement learning. arXiv preprint arXiv:1511.06581, 2015.
|
| 181 |
+
Y. Zhu, R. Mottaghi, E. Kolve, J. J. Lim, A. Gupta, L. Fei-Fei, and A. Farhadi. Target-driven visual navigation in indoor scenes using deep reinforcement learning. arXiv preprint arXiv:1609.05143, 2016.
|
| 182 |
+
|
| 183 |
+
# Appendices
|
| 184 |
+
|
| 185 |
+
Experimental Results
|
| 186 |
+
|
| 187 |
+
Table 3: Average results of DQN, D-DQN, Dueling D-DQN and a Human player
|
| 188 |
+
|
| 189 |
+
<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>DQN</td><td rowspan=1 colspan=1>D-DQN</td><td rowspan=1 colspan=1> Dueling D-DQN</td><td rowspan=1 colspan=1>Human</td></tr><tr><td rowspan=1 colspan=1>F-Zer0</td><td rowspan=1 colspan=1>3116</td><td rowspan=1 colspan=1>3636</td><td rowspan=1 colspan=1>5161</td><td rowspan=1 colspan=1>6298</td></tr><tr><td rowspan=1 colspan=1>Gradius III</td><td rowspan=1 colspan=1>7583</td><td rowspan=1 colspan=1>12343</td><td rowspan=1 colspan=1>16929</td><td rowspan=1 colspan=1>24440</td></tr><tr><td rowspan=1 colspan=1>Mortal Kombat</td><td rowspan=1 colspan=1>83733</td><td rowspan=1 colspan=1>56200</td><td rowspan=1 colspan=1>169300</td><td rowspan=1 colspan=1>132441</td></tr><tr><td rowspan=1 colspan=1> Super Mario</td><td rowspan=1 colspan=1>11765</td><td rowspan=1 colspan=1>16946</td><td rowspan=1 colspan=1>20030</td><td rowspan=1 colspan=1>36386</td></tr><tr><td rowspan=1 colspan=1>Wolfenstein</td><td rowspan=1 colspan=1>100</td><td rowspan=1 colspan=1>83</td><td rowspan=1 colspan=1>40</td><td rowspan=1 colspan=1>2952</td></tr></table>
|
md/train/KOtxfjpQsq/KOtxfjpQsq.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
md/train/M3tw78MH1Bk/M3tw78MH1Bk.md
ADDED
|
@@ -0,0 +1,431 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ToM2C: Target-oriented Multi-agent Communication and Cooperation with Theory of Mind
|
| 2 |
+
|
| 3 |
+
Anonymous Author(s)
|
| 4 |
+
Affiliation
|
| 5 |
+
Address
|
| 6 |
+
email
|
| 7 |
+
|
| 8 |
+
# Abstract
|
| 9 |
+
|
| 10 |
+
Being able to predict the mental states of others is a key factor to effective social interaction. It is also crucial to distributed multi-agent systems, where agents are required to communicate and cooperate with others. In this paper, we introduce such an important social-cognitive skill, i.e. Theory of Mind (ToM), to build socially intelligent agents who are able to communicate and cooperate effectively to accomplish challenging tasks. With ToM, each agent is able to infer the mental states and intentions of others according to its (local) observation. Based on the inferred states, the agents decide “when” and with “whom” to share their intentions. With the information observed, inferred, and received, the agents decide their subgoals and reach a consensus among the team. In the end, the low-level executors independently take primitive actions according to the sub-goals. We demonstrate the idea in a typical target-oriented multi-agent task, namely multi-sensor target coverage problems. The experiments show that the proposed model not only outperforms the state-of-the-art methods in sample efficiency and target coverage rate but also has good generalization across different scales of the environment.
|
| 11 |
+
|
| 12 |
+
# 16 1 Introduction
|
| 13 |
+
|
| 14 |
+
17 Cooperation is a key component of human society, which enables people to divide labor and achieve
|
| 15 |
+
18 common goals that no individual can reach on his/her own. In particular, human are able to form
|
| 16 |
+
19 an ad-hoc team with partners and communicate cooperatively with one another [1]. Cognitive
|
| 17 |
+
20 studies [2, 3, 4] show that the ability to model others’ mental states (intentions, beliefs, and desires),
|
| 18 |
+
21 called Theory of Mind (ToM) [5], is important for such social interaction. Considering a simple
|
| 19 |
+
22 real-world scenario (Fig. 1), where three people (Alice, Bob, and Carol) are required to take the
|
| 20 |
+
23 fruits (apple, orange, and pear) with shortest path. To achieve it, the individual will take four steps
|
| 21 |
+
24 sequentially: 1) observing their surrounding; 2) Inferring the observation and intention of others; 3)
|
| 22 |
+
25 communicate with others to share the local observation or intention if necessary; 4) making a decision
|
| 23 |
+
26 and taking action to get the chosen fruits without conflict. In this process, the ToM is naturally
|
| 24 |
+
27 adopted in inferring others (Step 2) and also guides the communication among agents (Step 3).
|
| 25 |
+
28 Motivated by this, machine learning researchers have takes efforts on developing the machine ToM [6]
|
| 26 |
+
29 or modeling opponents [7] for multi-agent learning [8, 9, 10]. But most of the existing computing
|
| 27 |
+
30 models are only used in toy environments, where are only a few agents (two or three) performing
|
| 28 |
+
31 simple tasks. It is still challenging to implement such a thinking mechanism for social agents,
|
| 29 |
+
32 especially in cases of many agents. That is because the mental state of one agent will be impacted by
|
| 30 |
+
33 many other agents, leading to the accuracy and efficiency of the ToM drop.
|
| 31 |
+
34 In this paper, we study the Target-oriented Multi-Agent Cooperation problem (ToMAC). In ToMAC,
|
| 32 |
+
35 the agents need to cooperatively reach and keep specific relations among the agents and targets. Such
|
| 33 |
+
36 problem setting widely exists in real-world applications, e.g. collecting multiple objects (Fig. 1),
|
| 34 |
+
37 navigating to multiple landmarks [11], monitoring a group of pedestrians [12]. When running,
|
| 35 |
+
38 each agent is required to choose a subset of interesting targets and reaching them to contribute
|
| 36 |
+
39 to the team goal. In this case, the key to realizing high-quality cooperation is how to reach a
|
| 37 |
+
40 consensus among agents to avoid the inner conflict in the team. However, the existing multi-agent
|
| 38 |
+
41 reinforcement learning methods still do not handle it well, as they only implicitly model others in the
|
| 39 |
+
42 state representation and are inefficient in communication.
|
| 40 |
+
43 Here we propose a Target-oriented Multi-agent Communication and Cooperation mechanism
|
| 41 |
+
44 (ToM2C) using the Theory of Mind, shown as Fig. 2. In ToM2C, each agent is of a two-level
|
| 42 |
+
45 hierarchy. The high level policy (planner) needs to cooperatively choose certain interesting targets as
|
| 43 |
+
46 a sub-goal to deal with, such as tracking certain moving objects or navigating to a specific landmark.
|
| 44 |
+
47 Then low level policy (executor) takes primitive actions to reach the selected goals for $k$ steps. To be
|
| 45 |
+
48 more specific, each agent receives local observation of targets, and estimate the local observation of
|
| 46 |
+
49 others in the ToM Net. Combining the observed and inferred state, the ToM net will predict/infer the
|
| 47 |
+
50 target choices (intentions) of other agents. After that, each agent decide ‘whom’ to communicate with
|
| 48 |
+
51 according to local observation filtered by the inferred goals and the estimated observation of others.
|
| 49 |
+
52 The message is rather simple and comprehensible, which is only the predicted goals of the message
|
| 50 |
+
53 receiver, inferred by the sender. In the end, all the agents decide its own goals by leveraging the
|
| 51 |
+
54 observed, inferred, and received information. Thanks to the inferring and sharing of intentions, the
|
| 52 |
+
55 agents can easily reach a consensus to cooperatively adjust the target-agent relations to the expected.
|
| 53 |
+
56 Furthermore, we also introduce a communication reduction method to remove the redundant message
|
| 54 |
+
57 passing among agents. Take the advantage of the centralized training decentralized execution (CTDE)
|
| 55 |
+
58 paradigm, we measure the effect of the received messages on each agents, by comparing the output
|
| 56 |
+
59 of the planner with and without messages. Hence, we can figure out the unnecessary connection
|
| 57 |
+
60 among agents. Then we train the connection choice network to cut these dispensable channels in
|
| 58 |
+
61 a supervised manner. Eventually, ToM2C systemically solves the problem of ’when’, ’who’ and
|
| 59 |
+
62 ’what’ in multi-agent communication, providing a compact, efficient and interpretable communication
|
| 60 |
+
63 protocol.
|
| 61 |
+
64 The experiments are conducted in a challenging multi-sensor multi-target covering scenario. The team
|
| 62 |
+
65 goal of sensors is to adjust their orientation to cover as many targets as possible. It is shown that our
|
| 63 |
+
66 method achieves the highest coverage ratio among several state-of-the-art MARL methods [13, 12] in
|
| 64 |
+
67 the case of 4 sensors and 5 targets. Moreover, we also demonstrate the strong scalability of ToM2C
|
| 65 |
+
68 in different populations of sensors and targets. We further take an ablation study to evaluate the
|
| 66 |
+
69 contribution of each key component of our model.
|
| 67 |
+
71 Multi-agent Cooperation. The cooperation of multiple agents is crucial yet challenging in dis
|
| 68 |
+
72 tributed systems. Agents’ policies continue to shift during training, leading to non-stationary en
|
| 69 |
+
73 vironment and difficulty in model convergence. Recent work [11, 14, 15, 16, 17] in multi agent
|
| 70 |
+
74 reinforcement learning (MARL) mainly adopts centralized training decentralized execution (CTDE)
|
| 71 |
+
75 paradigm to mitigate non-stationarity. However, such training method only implicitly guides agents
|
| 72 |
+
76 to adapt to certain policy patterns of others. As a result, cooperation collapses even if there is only a
|
| 73 |
+
77 slight change in the team formation, making the model extremely impractical and poor of scalability.
|
| 74 |
+
78 Furthermore, some existing work tries to make use of communication to promote cooperation, such
|
| 75 |
+
79 as [18, 19, 20]. Unfortunately, they all require a broadcast communication channel that pose a huge
|
| 76 |
+
80 pressure on bandwidth. Besides, even though I2C [13] proposes a individual communication method,
|
| 77 |
+
81 the message is just the encoding of observation, which is not only costly but also uninterpretable.
|
| 78 |
+
82 Compared with existing methods, ToM2C does not only apply ToM to explicitly model intentions
|
| 79 |
+
83 and mental states but also to improve the efficiency of communication to further promote cooperation.
|
| 80 |
+
84 For the target-oriented multi-agent cooperation, HiT-MAC [12] propose a hierarchical multi-agent
|
| 81 |
+
85 coordination framework to decomposes the target coverage problem into two-level tasks: assigning
|
| 82 |
+
86 targets by centralized coordinator and tracking assigned targets by decentralized executors. The
|
| 83 |
+
87 agents in ToM2C are also of a two-level hierarchy. Differently, thanks to the use of ToM, both levels
|
| 84 |
+
88 are enabled to perform distributedly.
|
| 85 |
+
89 Theory of Mind. Theory of Mind is a long-studied conception in cognitive science [2, 3, 4]. However,
|
| 86 |
+
90 how to apply the discover in cognitive science to building cooperative multi-agent systems still
|
| 87 |
+
91 remains a challenge. Most previous work make use of Theory of Mind to interpret agent behaviours,
|
| 88 |
+
92 but fail to take a step forward to enhance cooperation. For example, Machine Theory of Mind [6]
|
| 89 |
+
93 proposes a meta-learning method to learn a ToMnet that predicts the behaviours or characteristics of
|
| 90 |
+
94 a single agent. Besides, [21] studies how to apply Bayesian inference to understand the behaviours
|
| 91 |
+
95 of a group and predict the group structure. [22] introduces the concept of Satisficing Theory of Mind,
|
| 92 |
+
96 which means the sufficing and satisfying model of others. None of these work looks into the problem
|
| 93 |
+
97 of multi-agent cooperation. [10] considers a 2-player scenario and employs Bayesian Theory of
|
| 94 |
+
98 Mind to promote collaboration. Nevertheless, the task is too simple and it requires the model of other
|
| 95 |
+
99 agents to do the inference. On the other hand, opponent modeling [7, 8, 9] is another kind of methods
|
| 96 |
+
100 comparable with Theory of Mind. Agents endowed with opponent modeling can explicitly represent
|
| 97 |
+
101 the model of others, and therefore plan with awareness of current status of others. Nevertheless, these
|
| 98 |
+
102 methods rely on the access to the observation of others, which means they are not truly decentralized
|
| 99 |
+
103 paradigms.
|
| 100 |
+
|
| 101 |
+

|
| 102 |
+
Figure 1: A fruits collection example. The agents are required to cooperatively collect the three target objects (apple, pear, and orange) in the room as fast as possible. The whole process can be divided into 4 steps. In the first step, 3 agents observes the environment and obtains the state of the visible targets. In the second step, each agent tries to infer what other agents have seen, and which targets they shall choose as goals. In the third step, each agent decides whom to communicate with according to the previous inference. In the fourth step, each agent decides its own goal of target based on what it observed, inferred, and received.
|
| 103 |
+
|
| 104 |
+
# 04 3 Methods
|
| 105 |
+
|
| 106 |
+
105 In this section, we will explain how to build a target-oriented social agent to realize efficient multi
|
| 107 |
+
106 agent communication and cooperation. We formulate the target-oriented cooperative task as a
|
| 108 |
+
107 Dec-POMDP [23]. The aim of all agents is to maximize the team reward. Furthermore, agents are
|
| 109 |
+
108 allowed to communicate with each other to enhance cooperation. The overall network architecture is
|
| 110 |
+
109 shown in Fig. 2 from the perspective of agent $i$ . The model is mainly composed of four functional
|
| 111 |
+
110 networks: Observation encoder, ToM net, Communication choice net, and actor-critic net. To be
|
| 112 |
+
111 specific, it receives a local partial observation $o _ { i }$ , which includes the information of visible targets.
|
| 113 |
+
112 What’s more, it obtains the current pose $\left( \phi _ { 1 } , . . . , \phi _ { n } \right)$ of all the agents, where $n$ is the number of agents.
|
| 114 |
+
113 The raw observation will be encoded into $E _ { i }$ by an attention-based encoder. Then the agent starts to
|
| 115 |
+
114 do Theory of Mind inference with the ToM net. It first estimates the observation representation $\epsilon$
|
| 116 |
+
115 of each other agents according to their poses. $\epsilon _ { j }$ can be used for inferring the current visible targets
|
| 117 |
+
116 of agent $j$ , which is an auxiliary task that will be discussed later. Based on $\epsilon _ { j }$ and $E _ { i }$ , agent $i$ infers
|
| 118 |
+
117 the probability of agent $j$ choosing these targets as its goals, denoted as $G _ { i , j } ^ { * }$ . After that, agent $i$
|
| 119 |
+
118 119 decides whom to communicate with. choice net. The node feature of agent $j$ e employ a graph neurais the concatenation of $\epsilon _ { j }$ etwoand $E _ { i }$ here as the filtered by $G _ { i , j } ^ { * }$ munication. The final
|
| 120 |
+
120 communication connection is sampled according to computed graph edge features. Agent will
|
| 121 |
+
121 send $G _ { i , j } ^ { * }$ to agent $j$ if there exists a communication edge from $i$ to $j$ . Finally, $G _ { i } ^ { * } , E _ { i }$ and received
|
| 122 |
+
122 messages is concatenated as $\eta _ { i }$ for planner(actor) and critic. Planner $\pi _ { i } ^ { H } ( g _ { i } | o _ { i } )$ is the high level policy
|
| 123 |
+
123 that chooses the goals $g _ { i }$ , which guides the low-level executor $\pi _ { i } ^ { L } ( a _ { i } | o _ { i } , g _ { i } )$ to perform primitive
|
| 124 |
+
124 actions.
|
| 125 |
+
|
| 126 |
+

|
| 127 |
+
Figure 2: The architecture of ToM2C for each individual. There are 4 key components: Observation encoder, Theory of Mind net, Message sender and Decision maker.
|
| 128 |
+
|
| 129 |
+
125 In the following sections, we will illustrate the key components of ToM2C in details.
|
| 130 |
+
|
| 131 |
+
# 3.1 Observation Encoder
|
| 132 |
+
|
| 133 |
+
We employ the attention module [24] to encode the local observation. There are two prominent advantages of this module. On one hand, it is population-invariant and order-invariant, which is crucial for scalability. On the other hand, global information can be encoded into single feature due to the weighted sum mechanism. In this paper, we use scaled dot-product self-attention similar to [12]. $m$ is the number of targets. The input is the local observation $\vec { o } _ { i } \in \mathbb { R } _ { m \times d _ { o b s } }$ and the output is $\vec { E } _ { i } \in \mathbb { R } _ { m \times d _ { a t t } }$ , where $\vec { o } _ { i , q }$ and $\vec { E } _ { i , q }$ represent the raw and encoded feature of target $q$ to agent $i$ respectively.
|
| 134 |
+
|
| 135 |
+
# 3.2 Theory of Mind Network (ToM Net)
|
| 136 |
+
|
| 137 |
+
Inspired by the Machine Theory of Mind [6], we introduce ToM net that enables agents to infer the observation and intentions of others. Most previous work [7, 8, 10] consider two-player scenarios, where the agent only needs to model one other agent. Instead, we take a step forward to evaluate our model in a more complex multi-agent scenario consisting of $\mathbf { n } ( > 3 )$ agents. Therefore, the entire ToM net of agent $i$ is actually composed of n-1 separate ToM nets, each utilized to model the corresponding agent. The single ToM net is made up of two functional modules: Observation Estimation and Goal Inference. The overall ToM net takes the poses of agents and local observation as input. Then it outputs the inferred observation representation and goals of others.
|
| 138 |
+
|
| 139 |
+
143 Observation Estimation. The first step of ToM inference is to estimate the observation representation
|
| 140 |
+
144 of the other agent. The term refers to the visibility of the environment. Intuitively, when an agent
|
| 141 |
+
145 tries to infer the intention of others, it should first infer which targets are seen by them. Take Bob in
|
| 142 |
+
146 fig. 1 as an example. Before he tries to infer the goals of Alice and Carol, he first infers that Alice
|
| 143 |
+
147 cannot observe the apple but Carol can. Similarly, Agent i infers the observation of agent $j$ , denoted
|
| 144 |
+
148 as $\epsilon _ { j }$ , with the pose $\phi _ { j }$ . Note that $\epsilon _ { j }$ is only a representation of the observation. To better learn this
|
| 145 |
+
149 representation, we introduce an auxiliary task here. Agent $i$ needs to infer which targets are in the
|
| 146 |
+
150 observation field of agent $j$ , based on this representation $\epsilon _ { j }$ and local observation $\vec { E } _ { i }$ . In practice, we
|
| 147 |
+
151 employ a GRU to model the observation of others on time series.
|
| 148 |
+
152 Goal Inference. After agent $i$ finishes the observation estimation of others, it is able to predict which
|
| 149 |
+
153 targets will be chosen by them at this step. Just like human, the agent infers the intentions of others
|
| 150 |
+
154 based on what it sees and what it thinks that others see. If we denote this goal inference network as
|
| 151 |
+
155 a function GI, then the process can be formulated as : ${ \cal G } _ { i , j , q } ^ { * } = { G I } ( \vec { E } _ { i , q , \underline { { { \epsilon } } } { j } } )$ . $G _ { i , j , q } ^ { * }$ stands for the
|
| 152 |
+
156 probability of agent j choosing target q, inferred by i. Since there are a total of n agents and $\mathbf { m }$ targets
|
| 153 |
+
157 in the environment, $\vec { G } _ { i } ^ { * } \in \mathbb { R } _ { ( n - 1 ) \times m }$ .
|
| 154 |
+
158 With ToM net, each agent holds a belief on the observation and goal intentions of others. Such belief
|
| 155 |
+
159 is not only taken into account for final self decision, but also serves as a indispensable component in
|
| 156 |
+
160 communication choice. The details will be discussed in the next section.
|
| 157 |
+
|
| 158 |
+
# 3.3 Message Sender
|
| 159 |
+
|
| 160 |
+
162 Learning to communicate has been studied in a number of multi-agent reinforcement learning works.
|
| 161 |
+
163 However, most of them either require a public communication channel or a centralized mechanism to
|
| 162 |
+
164 decide the communication connection, which is definitely unrealistic for real multi-agent systems.
|
| 163 |
+
165 Moreover, the message is usually an encoded feature, making it both uninterpretable and lengthy.
|
| 164 |
+
166 Instead, we introduce a message sender by leveraging the information inferred by ToM net. Each
|
| 165 |
+
167 agent decides ‘when’ and with ‘whom’ to communicate completely on its own. And the message
|
| 166 |
+
168 is the inferred ToM goals of the receiver. To achieve this, we use a graph neural network similar
|
| 167 |
+
169 to [25, 26]. The details is in the next paragraph. After the model is trained, we further propose a
|
| 168 |
+
170 communication reduction method to remove useless connections and improve the efficiency of the
|
| 169 |
+
171 communication network.
|
| 170 |
+
172 Inferred-goal Filter. As stated before, we use Graph Neural Network (GNN) to learn the connection
|
| 171 |
+
173 in an end-to-end manner. In previous works [27], there is only one global graph that collects all the
|
| 172 |
+
174 observation as node features. Such implementation breaks the individuality. Instead, we propose a
|
| 173 |
+
175 method to make use of the inferred state and intention to generate local graphs. Specifically, in the
|
| 174 |
+
176 perspectifollows. e of agent is a prob $i$ , the feature of agebility threshold, if $j$ arget feature, then agent filtered by the inferred goals considers it as the goal that $G _ { i , j } ^ { * }$ as be
|
| 175 |
+
177 $\delta$ $G _ { i , j , q } ^ { * } > \delta$ $i$
|
| 176 |
+
178 chosen by agent
|
| 177 |
+
|
| 178 |
+
$$
|
| 179 |
+
E _ { i , j } ^ { \prime } = \sum _ { q = 1 } ^ { m } \left( G _ { i , j , q } ^ { * } > \delta \right) \cdot E _ { i , q }
|
| 180 |
+
$$
|
| 181 |
+
|
| 182 |
+
179 Then we concatenate the filtered feature $E _ { i , j } ^ { \prime }$ with the estimated observation representation $\epsilon _ { j }$ , to
|
| 183 |
+
180 form the estimated node feature $u _ { i , j } = ( E _ { i , j } ^ { \prime } , \bar { \epsilon } _ { j } )$ . For agent $i$ itself, $\begin{array} { r } { u _ { i , i } = ( \sum _ { q } E _ { i , q } , \epsilon _ { i } ) } \end{array}$ , where $\epsilon _ { i }$ is
|
| 184 |
+
181 also computed by Observation Estimation module with the pose of $i$ .
|
| 185 |
+
182 Connection Choice. For a scenario consisting of $n$ agents, there is a total of $n$ directed graphs
|
| 186 |
+
183 ${ \mathcal { G } } = ( { \mathcal { G } } _ { 1 } , { \mathcal { G } } _ { 2 } , . . . { \mathcal { G } } _ { n } )$ . $\mathcal { G } _ { i } = ( \nu _ { i } , \mathcal { E } _ { i } )$ is the local graph for agent $i$ to compute the communication
|
| 187 |
+
184 connection from agent $i$ . The vertices $\mathcal { V } _ { i } = \{ f ( \bar { u _ { i , j } } ) \}$ , where $f$ is a node feature encoder. Edges
|
| 188 |
+
185 $\mathcal { E } _ { i } = \{ \sigma ( u _ { i , j } , u _ { i , k } ) \}$ , where $\sigma$ is an edge feature encoder. Like the Interaction Networks (IN) [26],
|
| 189 |
+
186 we propagate the node and edge features spatially to obtain node and edge effect. For convenience,
|
| 190 |
+
187 we will describe only graph $\mathcal { G } _ { i }$ in the following formula and omit the index $i$ . Let $V _ { j }$ be the encoded
|
| 191 |
+
188 node feature of $j$ , and $h _ { j }$ be the node effect. Similarly, let $\mathcal { E } _ { j , k }$ be the encoded edge feature, $h _ { j , k }$ be
|
| 192 |
+
189 the edge effect. Initially, $h _ { j } = V _ { j } , h _ { j , k } = \mathcal { E } _ { j , k }$ . Then the graph iterates for several times to propagate
|
| 193 |
+
190 the effect:
|
| 194 |
+
|
| 195 |
+
191
|
| 196 |
+
|
| 197 |
+
$$
|
| 198 |
+
\begin{array} { c } { { h _ { j } = \Psi ^ { \mathrm { n o d e } } ( V _ { j } , h _ { j } , \displaystyle \sum _ { k } h _ { k , j } ) } } \\ { { { } } } \\ { { h _ { j , k } = \Psi ^ { \mathrm { e d g e } } ( h _ { j } , h _ { k } , h _ { j , k } ) } } \end{array}
|
| 199 |
+
$$
|
| 200 |
+
|
| 201 |
+
192 In the end, we obtain edge $( \mathcal { E } _ { i , j } , h _ { i , j } )$ , and compute the probabilistic distribution over the type of the
|
| 202 |
+
193 edge (cut or retain). Here we apply the Gumbel-Softmax trick [28, 29] to sample the discrete edge
|
| 203 |
+
194 type, so the gradients can be back-propagated in end-to-end training. Considering that it is the local
|
| 204 |
+
195 communication graph of agent $i$ , only the types of $\mathcal { E } _ { i , - i }$ are sampled. If edge $\mathcal { E } _ { i , j }$ is retained, agent $i$
|
| 205 |
+
196 will send a the inferred goals of $j$ to it.
|
| 206 |
+
197 Communication Reduction (CR). The communication choice network learns in an end-to-end man
|
| 207 |
+
198 ner. If no regularization is applied here, the network tends to learn a relatively dense communication
|
| 208 |
+
199 connection graph. However, some of these connections are actually redundant. In fact, some receivers
|
| 209 |
+
200 choose the same goals with and without these messages. Therefore, we can figure out the necessity
|
| 210 |
+
201 of certain communication edges. Formally, we estimate the effect of the received messages to agent
|
| 211 |
+
202 $i$ by measuring the KL-divergence between $g _ { i }$ and $g _ { i } ^ { - }$ , referred as $\chi = D _ { K L } ( g _ { i } ^ { - } | | g _ { i } ) { \overline { { \ u { \chi } } } }$ . Note that
|
| 212 |
+
203 $g _ { i } ^ { - }$ denotes the probability distribution over the goals of agent $i$ when all the messages sent to $i$ are
|
| 213 |
+
204 masked. If $\chi < \tau$ , we regard that the messages are redundant to agent $i$ . Thus the edges pointing at $i$
|
| 214 |
+
205 will be ‘cut’. Otherwise $( \chi > \tau )$ , we ‘retain’ all the edges to agent $i$ . Here $\tau$ is a constant, regarded
|
| 215 |
+
06 as a threshold. Supervised by the generated pseudo labels, the model learns to cut the redundant
|
| 216 |
+
07 connections easily, leading to a more efficient communication network.
|
| 217 |
+
|
| 218 |
+
# 208 3.4 Decision Making
|
| 219 |
+
|
| 220 |
+
Once the agent receives all the messages, it can decide its own goals of targets based on its $\begin{array} { r } { \eta _ { i } = ( \vec { E } _ { i } , \mathrm { m a x } _ { k } \vec { G } _ { i , k } ^ { * } , \sum _ { s } \vec { G } _ { s , k } ^ { * } ) } \end{array}$ others and received messages. Therefore, the actor-critic feature. The second term refers to the max inferred probability of an target to be chosen by another agent. The third term refers to the sum of the messages from others, indicating how much certain others infer that agent $i$ should choose the target. The actor decides its goals $g _ { i }$ according to $\eta _ { i }$ . The centralized critic obtain global feature $( \eta _ { 1 } , . . . \eta _ { n } )$ to compute value. The low level executor
|
| 221 |
+
|
| 222 |
+
$$
|
| 223 |
+
\pi _ { i } ^ { L } ( a _ { i } | o _ { i } , g _ { i } )
|
| 224 |
+
$$
|
| 225 |
+
|
| 226 |
+
209 takes primitive action to accomplish the sub-goal. Although this executor can also be trained by
|
| 227 |
+
210 reinforcement learning (RL) as [12], we find a simple rule-based policy can also work well in most
|
| 228 |
+
211 cases. In this way, other methods without a hierarchical structure only need to learn the high-level
|
| 229 |
+
212 policy, so we can compare them with our method fairly.
|
| 230 |
+
|
| 231 |
+
# 3.5 Training
|
| 232 |
+
|
| 233 |
+
214 The model can be divided as ToM net and other parts. ToM net is trained in supervised learning with
|
| 234 |
+
215 the true state of others. Other parts are trained by reinforcement learning (RL). We adopt standard
|
| 235 |
+
216 A2C [30] as the RL training algorithm, while any MARL method with CTDE framework is also
|
| 236 |
+
217 applicable, such as PPO [31, 32].
|
| 237 |
+
218 Learning ToM Net. We introduce two classification tasks for learning the ToM Net, which is
|
| 238 |
+
219 parameterized by $\theta ^ { \mathrm { T o M } }$ . First, the ToM net infers the goals $\vec { G } _ { i } ^ { * }$ of others. Note that $g _ { i , j , q } ^ { * }$ indicates the
|
| 239 |
+
220 probability of agent $j$ choosing target $q$ , inferred by $i$ . Meanwhile, agent $j$ decides its real goals $g _ { j }$
|
| 240 |
+
221 Therefore, $g _ { j }$ can be the label of $g _ { i , j } ^ { * }$ . The Goal Inference loss is the binary cross entropy loss of this
|
| 241 |
+
222 classification task:
|
| 242 |
+
|
| 243 |
+
$$
|
| 244 |
+
L ^ { G I } = - \frac { 1 } { N } \sum _ { i } \sum _ { j \neq i } \sum _ { q } [ g _ { j , q } \cdot \log ( g _ { i , j , q } ^ { * } ) + ( 1 - g _ { j , q } ) \cdot \log ( 1 - g _ { i , j , q } ^ { * } ) ]
|
| 245 |
+
$$
|
| 246 |
+
|
| 247 |
+
223 Secondly, the estimated observation representation $\epsilon$ is trained in the auxiliary task mentioned before.
|
| 248 |
+
224 The agent $i$ infers which targets are in the observation of $j$ , denoted as $c _ { i , j } ^ { * }$ . The ground truth is the
|
| 249 |
+
225 real observation field $c _ { j }$ . $c _ { j , q } = 1$ indicates that agent $j$ observes target $q$ . Similar to the previous
|
| 250 |
+
226 Goal Inference task, this Observation Estimation learning also adopts binary cross entropy loss:
|
| 251 |
+
|
| 252 |
+
$$
|
| 253 |
+
{ \cal L } ^ { O E } = - \frac { 1 } { N } \sum _ { i } \sum _ { j \neq i } \sum _ { q } \left[ c _ { j , q } \cdot \log ( c _ { i , j , q } ^ { * } ) + ( 1 - c _ { j , q } ) \cdot \log ( 1 - c _ { i , j , q } ^ { * } ) \right]
|
| 254 |
+
$$
|
| 255 |
+
|
| 256 |
+
$$
|
| 257 |
+
L ( \theta ^ { \mathrm { T o M } } ) = L ^ { G I } + L ^ { O E }
|
| 258 |
+
$$
|
| 259 |
+
|
| 260 |
+
227 Training Strategy. We find that it is hard for an agent to learn long-term planning from scratch.
|
| 261 |
+
228 Therefore, we set the initialize episode length $L$ and discount factor $\gamma$ to a low value, forcing agents
|
| 262 |
+
229 to learn short-term planning first. During training, the episode length and discount factor $\gamma$ increase
|
| 263 |
+
230 gradually, leading the agents to estimate the value on a longer horizon.
|
| 264 |
+
231 Furthermore, we freeze the ToM net while the other parts of the model is updated through RL. The
|
| 265 |
+
232 reason is that the ToM net infers the goals of others, and the policy network is continuously updated
|
| 266 |
+
233 during RL training. Meanwhile, the output of ToM net is a part of the input to policy network. If we
|
| 267 |
+
234 train them simultaneously, they are likely to influence each other in a nest loop. Therefore, we only
|
| 268 |
+
235 collect the ToM inferred data into a batch during RL training. Once the batch is large enough, we
|
| 269 |
+
236 stop RL and start ToM training to minimize ToM loss in Eq. 6.
|
| 270 |
+
|
| 271 |
+
238 We evaluate ToM2C in the challenging multi-sensor target coverage problem. Sensors need to cooperate with others to reach a maximum target coverage rate. We compare our method with 3 state-of-the-art MARL methods: I2C [13], HiT-MAC [12], A2C [30], and a reference greedy search policy. We also conduct an ablation study to validate the contribution of ToM net and message sender. Finally, we show that our model can generalize to different size of agents and targets.
|
| 272 |
+
|
| 273 |
+
# 43 4.1 Environment
|
| 274 |
+
|
| 275 |
+
The environment is modified based on the one used in HiT-MAC [12], and it inherits most of the characters. As is shown in Fig.3, it is a 2D environment that simulates the real target coverage problem in directional sensor networks. Each sensor can only see the targets in the sector, if not blocked by any obstacle. There 2 types of target: destination-navigation and random walking. The former one moves in the shortest path to reach a previously sampled destination. The latter one moves randomly at each time step. At the beginning of each episode, the location of sensors, targets and obstacles are randomly sampled. Besides, the targets type is also sampled according to a pre-defined probability.
|
| 276 |
+
|
| 277 |
+

|
| 278 |
+
Figure 3: An example of the target coverage environment with obstacles.
|
| 279 |
+
|
| 280 |
+
Observation Space. At each time step, the local observation $o _ { i }$ is a set of agent-target pairs: $\left( o _ { i , 1 } , . . . o _ { i , m } \right)$ . If target $q$ is visible to agent $i$ , then $o _ { i , q } = ( i , q , d _ { i , q } , \alpha _ { i , q } )$ , where $d _ { i , q }$ is the distance and $\alpha _ { i , q }$ is the relative angle. If target $q$ is not visible to $i$ , then $o _ { i , q } ^ { \mathrm { ~ \tiny ~ " ~ } } = ( 0 , 0 , \dot { 0 , } 0 )$ . Therefore, $o _ { i } \in \mathbb { R } _ { m \times 4 }$ .
|
| 281 |
+
|
| 282 |
+
Action Space. The primitive action for a sensor is to stay or rotate $+ 5 / - 5$ degrees. For our method, the high level action is the chosen goals $g _ { i }$ , which is a binary vector of length m. $g _ { i , q } = 1$ means the agent chooses target $q$ as one of its goals. $g _ { i , q } = 0$ means not. Although the low-level executor can be trained by reinforcement learning (RL) as [12], we find a simple rule-based policy can also work well in most cases. Therefore we only train the high-level policy. In this way, other methods without a hierarchical structure are comparable with our method.
|
| 283 |
+
|
| 284 |
+
Reward. Reward is the coverage rate of targets: $\begin{array} { r } { r = \frac { 1 } { m } \sum _ { q } I _ { q } } \end{array}$ , where $I _ { q } = 1$ if $q$ is covered by any sensor. If there is no target covered by sensors, we punish the team with a reward $r = - 0 . 1$ .
|
| 285 |
+
|
| 286 |
+
# 4.2 Baselines
|
| 287 |
+
|
| 288 |
+
We compare our methods with 4 baselines. HiT-MAC [12] is a hierarchical method that uses a coordinator to enhance cooperation. I2C [13] proposes a individual communication mechanism, which is also achieved by ToM2C. A2C [30] is a standard reinforcement learning algorithm. Here we employ A2C to train a single agent that selects the goals for all the sensors. Finally, we implement a heuristic search algorithm as a reference policy. This policy searches in one step for the primitive actions of all the sensors to minimize the sum of minimum angle distance of a target to a sensor.
|
| 289 |
+
|
| 290 |
+
# 4.3 Results
|
| 291 |
+
|
| 292 |
+
As fig.4(a) shows, ToM2C achieves the second highest reward (75) in the setting of 4 sensors and 5 targets, only lower than the searching policy (80). The vanilla A2C shows a similar performance to random policy, indicating that the task is not trivial. The reward performance of HiT-MAC is around 62, lower than the result presented in the original paper. This could be attributed to the addition of obstacles. I2C reaches a fair reward of 66, but we will show that such performance is still lower than our ablation models.
|
| 293 |
+
|
| 294 |
+
Ablation Study. We conduct this study to evaluate the 2 key components of our model: ToM net and Message sender. The ToM2C-Comm model abandons communication, so the actor makes decisions
|
| 295 |
+
|
| 296 |
+

|
| 297 |
+
Figure 4: The learning curve of our method with baselines and reference policies. The learning-based methods are all trained in environment with 4 sensors and 5 targets. (a) comparing ours with baselines; (b) comparing ours with its ablations.
|
| 298 |
+
|
| 299 |
+

|
| 300 |
+
Figure 5: Communication performance analysis of our method compared with other algorithms. (a) comparison of the communication edges numbers; (b) comparison of the communication bandwidth.
|
| 301 |
+
|
| 302 |
+
87 only based on local observation and inferred goals of others. The ToM2C-ToM abandons ToM net, but
|
| 303 |
+
88 keeps the Messages sender. However, as explained before, the local graph node feature is computed
|
| 304 |
+
89 based on the ToM net output. To deal with this problem, we use the encoded observation $E _ { j }$ to
|
| 305 |
+
90 replace the original node feature $u _ { i , j }$ . In this way, the n local graphs degrades into one global graph,
|
| 306 |
+
91 so the ToM2C-ToM model actually breaks the local communication mechanism. We show in fig.4(b)
|
| 307 |
+
92 that if we abandon one of key components, the performance will drop. Specifically, ToM2C-Comm
|
| 308 |
+
93 reaches 72, and ToM2C-ToM reaches 68, both higher than I2C. Considering that ToM2C-Comm
|
| 309 |
+
94 outperforms ToM2C-ToM and ToM net is actually essential for communication, we argue that ToM
|
| 310 |
+
95 net mainly contributes to our method.
|
| 311 |
+
96 Communication Analysis. We compare our method with several candidates in regard of communi
|
| 312 |
+
97 cation expense. There are 2 metrics here: the number of communication edges and communication
|
| 313 |
+
98 bandwidth. The latter metric considers both the count of edges and the length of a single message.
|
| 314 |
+
99 There are 5 candidates here. FC refers to fully connected communication in ToM2C. ToM2C w/o
|
| 315 |
+
00 CR refers to the ToM2C model without communication reduction. The communication in HiT-MAC
|
| 316 |
+
01 is between the executors and the coordinator. As is shown in fig.5(a), ToM2C performs the least
|
| 317 |
+
02 communication in regard of edge count, but this doesn’t fully demonstrate the advantage of ToM2C
|
| 318 |
+
03 over other methods. In fig.5(b), the communication bandwidth of ToM2C, ToM2C without CR, and
|
| 319 |
+
04 even FC is much lower than I2C and HiT-MAC. It is because in ToM2C the message is only the
|
| 320 |
+
05 inferred goals, while I2C and HiT-MAC have to send the local observation. Therefore, the single
|
| 321 |
+
06 message in ToM2C is much simpler than that of I2C and HiT-MAC. As a result, the communication
|
| 322 |
+
07 cost of ToM2C is extremely less than existing methods.
|
| 323 |
+
308 Scalability. We evaluate the scalability of our method to different number of sensors and targets.
|
| 324 |
+
309 Note that the model is only trained in the setting of 4 sensors and 5 targets, so this could be regarded
|
| 325 |
+
310 as zero-shot transfer. In fig.6(a), the number of sensors is fixed to 4, and in fig.6(b), the number of
|
| 326 |
+
311 targets is fixed to 5. We also report the result of heuristic search because it is not learnt policy and has
|
| 327 |
+
312 a good generalization in different settings. It is clear in the figures that the variation of coverage rate
|
| 328 |
+
313 in ToM2C follows the trend of heuristic search when the difficulty of the setting changes. In this way,
|
| 329 |
+
314 we show that ToM2C has rather stable generalization among different sizes of sensors and targets.
|
| 330 |
+
|
| 331 |
+

|
| 332 |
+
Figure 6: Analyzing the scalability of our method in scenarios with different sizes of sensors and targets. (a) $n { = } 4$ , $m$ is from 3 to 7; (b) $m = 5$ , $n$ is from 2 to 6
|
| 333 |
+
|
| 334 |
+
# 5 Conclusion and Discussion
|
| 335 |
+
|
| 336 |
+
In this work, we study the target-oriented multi-agent cooperation (ToMAC) problem. Inspired by the cognitive study in Theory of Mind (ToM), we propose an effective Target-orient Multi-agent Cooperation and Communication mechanism (ToM2C) for ToMAC. For each agent, ToM2C is composed of an observation encoder, ToM net, message sender, and decision-maker. The ToM net is designed for estimating the observation and inferring the goals (intentions) of others. It is also deeply used by the message sender and decision-making. Besides, an communication reduction method is proposed to further improve the efficiency of the communication. Empirical results demonstrated that our method can deal with challenging scenes and outperform the state-of-the-art MARL methods (I2C, HiT-MAC).
|
| 337 |
+
|
| 338 |
+
325 Although impressive improvements have achieved, there is still a number of limitations of this work
|
| 339 |
+
326 leaving for addressed by future works. 1) The model is only evaluated in a simulated scenario. But
|
| 340 |
+
327 the environment we used contains most features that other applications, e.g. partial observation,
|
| 341 |
+
328 team reward structure. And each component in the model is general. So we are confident to extend
|
| 342 |
+
329 ToM2C in other application scenarios, e.g. cooperative searching in the future. 2) Besides, the
|
| 343 |
+
330 communication reeducation method can also be further optimized, as the pseudo labels we generated
|
| 344 |
+
331 for communication reduction are noisy in some cases.
|
| 345 |
+
|
| 346 |
+
# 332 Broader Impact
|
| 347 |
+
|
| 348 |
+
333 The target-oriented multi-agent cooperation problem widely exists in a lot of real-world applications.
|
| 349 |
+
334 So a great number of robot tasks will benefit from our work, e.g. cooperatively searching for disaster
|
| 350 |
+
335 victims, cleaning trash, scene reconstruction, actively capturing sports videos. They all will make
|
| 351 |
+
336 our life more convenient and better. The use of ToM in multi-agent cooperation and communication
|
| 352 |
+
337 will also promote the intersection of multi-agent systems and cognitive science, making them mutual
|
| 353 |
+
338 benefit. But there is also the potential of being misused in the military field, e.g. using directional
|
| 354 |
+
339 radars to monitor missiles/aircraft or controlling unmanned vehicles to attacks targets. If our method
|
| 355 |
+
340 fails, some targets in the corner would be neglected by the agents.
|
| 356 |
+
|
| 357 |
+
# 341 References
|
| 358 |
+
|
| 359 |
+
[2] I. Sher, M. Koenig, and A. Rustichini, “Children’s strategic theory of mind,” Proceedings of the National Academy of Sciences, vol. 111, no. 37, pp. 13307–13312, 2014.
|
| 360 |
+
[3] A. G. Sanfey, C. Civai, and P. Vavra, “Predicting the other in cooperative interactions,” Trends in cognitive sciences, vol. 19, no. 7, pp. 364–365, 2015.
|
| 361 |
+
[4] E. Etel and V. Slaughter, “Theory of mind and peer cooperation in two play contexts,” Journal of Applied Developmental Psychology, vol. 60, pp. 87–95, 2019.
|
| 362 |
+
[5] D. Premack and G. Woodruff, “Does the chimpanzee have a theory of mind?,” Behavioral and brain sciences, vol. 1, no. 4, pp. 515–526, 1978.
|
| 363 |
+
[6] N. Rabinowitz, F. Perbet, F. Song, C. Zhang, S. A. Eslami, and M. Botvinick, “Machine theory of mind,” in International conference on machine learning, pp. 4218–4227, PMLR, 2018.
|
| 364 |
+
[7] H. He, J. Boyd-Graber, K. Kwok, and H. Daumé III, “Opponent modeling in deep reinforcement learning,” in International Conference on Machine Learning, pp. 1804–1813, PMLR, 2016.
|
| 365 |
+
[8] R. Raileanu, E. Denton, A. Szlam, and R. Fergus, “Modeling others using oneself in multi-agent reinforcement learning,” in International Conference on Machine Learning, pp. 4257–4266, PMLR, 2018.
|
| 366 |
+
[9] A. Grover, M. Al-Shedivat, J. Gupta, Y. Burda, and H. Edwards, “Learning policy representations in multiagent systems,” in International Conference on Machine Learning, pp. 1802–1811, PMLR, 2018.
|
| 367 |
+
[10] T. X. Lim, S. Tio, and D. C. Ong, “Improving multi-agent cooperation using theory of mind,” arXiv preprint arXiv:2007.15703, 2020.
|
| 368 |
+
[11] R. Lowe, Y. Wu, A. Tamar, J. Harb, O. P. Abbeel, and I. Mordatch, “Multi-agent actor-critic for mixed cooperative-competitive environments,” in Advances in Neural Information Processing Systems, pp. 6379– 6390, 2017.
|
| 369 |
+
[12] J. Xu, F. Zhong, and Y. Wang, “Learning multi-agent coordination for enhancing target coverage in directional sensor networks,” in Advances in Neural Information Processing Systems, vol. 33, pp. 10053– 10064, 2020.
|
| 370 |
+
[13] g. Ding, T. Huang, and Z. Lu, “Learning individually inferred communication for multi-agent cooperation,” in Advances in Neural Information Processing Systems, vol. 33, pp. 22069–22079, 2020.
|
| 371 |
+
[14] J. N. Foerster, G. Farquhar, T. Afouras, N. Nardelli, and S. Whiteson, “Counterfactual multi-agent policy gradients,” in Thirty-Second AAAI Conference on Artificial Intelligence, 2018.
|
| 372 |
+
[15] P. Sunehag, G. Lever, A. Gruslys, W. M. Czarnecki, V. F. Zambaldi, M. Jaderberg, M. Lanctot, N. Sonnerat, J. Z. Leibo, K. Tuyls, et al., “Value-decomposition networks for cooperative multi-agent learning based on team reward.,” in AAMAS, pp. 2085–2087, 2018.
|
| 373 |
+
[16] T. Rashid, M. Samvelyan, C. Schroeder, G. Farquhar, J. Foerster, and S. Whiteson, “Qmix: Monotonic value function factorisation for deep multi-agent reinforcement learning,” in International Conference on Machine Learning, pp. 4295–4304, PMLR, 2018.
|
| 374 |
+
[17] S. Iqbal and F. Sha, “Actor-attention-critic for multi-agent reinforcement learning,” in International Conference on Machine Learning, pp. 2961–2970, PMLR, 2019.
|
| 375 |
+
[18] S. Sukhbaatar, a. szlam, and R. Fergus, “Learning multiagent communication with backpropagation,” vol. 29, 2016.
|
| 376 |
+
[19] A. Das, T. Gervet, J. Romoff, D. Batra, D. Parikh, M. Rabbat, and J. Pineau, “Tarmac: Targeted multi-agent communication,” in International Conference on Machine Learning, pp. 1538–1546, PMLR, 2019.
|
| 377 |
+
[20] A. Singh, T. Jain, and S. Sukhbaatar, “Individualized controlled continuous communication model for multiagent cooperative and competitive tasks,” in International conference on learning representations, 2019.
|
| 378 |
+
[21] M. Shum, M. Kleiman-Weiner, M. L. Littman, and J. B. Tenenbaum, “Theory of minds: Understanding behavior in groups through inverse planning,” in Proceedings of the AAAI Conference on Artificial Intelligence, vol. 33, pp. 6163–6170, 2019.
|
| 379 |
+
[22] S. I. A. Track, J. Pöppel, and S. Kopp, “Satisficing models of bayesian theory of mind for explaining behavior of differently uncertain agents,” in Proceedings of the 17th International Conference on Autonomous Agents and Multiagent Systems, Stockholm, Sweden, pp. 10–15, 2018.
|
| 380 |
+
[23] D. S. Bernstein, R. Givan, N. Immerman, and S. Zilberstein, “The complexity of decentralized control of markov decision processes,” Mathematics of operations research, vol. 27, no. 4, pp. 819–840, 2002.
|
| 381 |
+
[24] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. Kaiser, and I. Polosukhin, “Attention is all you need,” arXiv preprint arXiv:1706.03762, 2017.
|
| 382 |
+
[25] Y. Li, A. Torralba, A. Anandkumar, D. Fox, and A. Garg, “Causal discovery in physical systems from videos,” Advances in Neural Information Processing Systems, vol. 33, 2020.
|
| 383 |
+
[26] P. Battaglia, R. Pascanu, M. Lai, D. J. Rezende, and K. kavukcuoglu, “Interaction networks for learning about objects, relations and physics,” in Proceedings of the 30th International Conference on Neural Information Processing Systems, pp. 4509–4517, 2016.
|
| 384 |
+
[27] J. Jiang, C. Dun, T. Huang, and Z. Lu, “Graph convolutional reinforcement learning,” in International Conference on Learning Representations, 2019.
|
| 385 |
+
[28] E. Jang, S. Gu, and B. Poole, “Categorical reparameterization with gumbel-softmax,” arXiv preprint arXiv:1611.01144, 2016.
|
| 386 |
+
[29] C. J. Maddison, A. Mnih, and Y. W. Teh, “The concrete distribution: A continuous relaxation of discrete random variables,” arXiv preprint arXiv:1611.00712, 2016.
|
| 387 |
+
[30] V. Mnih, A. P. Badia, M. Mirza, A. Graves, T. Lillicrap, T. Harley, D. Silver, and K. Kavukcuoglu, “Asynchronous methods for deep reinforcement learning,” in International Conference on Machine Learning, pp. 1928–1937, 2016.
|
| 388 |
+
[31] J. Schulman, F. Wolski, P. Dhariwal, A. Radford, and O. Klimov, “Proximal policy optimization algorithms,” arXiv preprint arXiv:1707.06347, 2017.
|
| 389 |
+
[32] C. Yu, A. Velu, E. Vinitsky, Y. Wang, A. Bayen, and Y. Wu, “The surprising effectiveness of mappo in cooperative, multi-agent games,” arXiv preprint arXiv:2103.01955, 2021.
|
| 390 |
+
|
| 391 |
+
# Checklist
|
| 392 |
+
|
| 393 |
+
The checklist follows the references. Please read the checklist guidelines carefully for information on how to answer these questions. For each question, change the default [TODO] to [Yes] , [No] , or [N/A] . You are strongly encouraged to include a justification to your answer, either by referencing the appropriate section of your paper or providing a brief inline description. For example:
|
| 394 |
+
|
| 395 |
+
• Did you include the license to the code and datasets? [Yes] See Section ??.
|
| 396 |
+
• Did you include the license to the code and datasets? [No] The code and the data are proprietary.
|
| 397 |
+
• Did you include the license to the code and datasets? [N/A]
|
| 398 |
+
|
| 399 |
+
Please do not modify the questions and only use the provided macros for your answers. Note that the Checklist section does not count towards the page limit. In your paper, please delete this instructions block and only keep the Checklist section heading above along with the questions/answers below.
|
| 400 |
+
|
| 401 |
+
1. For all authors...
|
| 402 |
+
|
| 403 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
|
| 404 |
+
(b) Did you describe the limitations of your work? [Yes]
|
| 405 |
+
(c) Did you discuss any potential negative societal impacts of your work? [Yes]
|
| 406 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 407 |
+
|
| 408 |
+
2. If you are including theoretical results...
|
| 409 |
+
|
| 410 |
+
(a) Did you state the full set of assumptions of all theoretical results? [N/A] (b) Did you include complete proofs of all theoretical results? [N/A]
|
| 411 |
+
|
| 412 |
+
3. If you ran experiments...
|
| 413 |
+
|
| 414 |
+
(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 supplemental material
|
| 415 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] See supplemental material.
|
| 416 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes]
|
| 417 |
+
(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 supplemental material.
|
| 418 |
+
|
| 419 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 420 |
+
|
| 421 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes] The environments are based on [12], and the baselines are from the official repository[12, 13]
|
| 422 |
+
(b) Did you mention the license of the assets? [N/A]
|
| 423 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [Yes] In the supplemental material.
|
| 424 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [No] The environment we used are from a open source repository. According to the license, it is allowed to modify and use the environments for research purposes.
|
| 425 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [No] The experiments are conducted on a simulator.
|
| 426 |
+
|
| 427 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 428 |
+
|
| 429 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 430 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 431 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|
md/train/Q-PA3D1OsDz/Q-PA3D1OsDz.md
ADDED
|
@@ -0,0 +1,285 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# MetaAvatar: Learning Animatable Clothed Human Models from Few Depth Images
|
| 2 |
+
|
| 3 |
+
Shaofei Wang1 shaofei.wang@inf.ethz.ch
|
| 4 |
+
|
| 5 |
+
Marko Mihajlovic1 marko.mihajlovic@inf.ethz.ch
|
| 6 |
+
|
| 7 |
+
Qianli Ma1,2 qianli.ma@tue.mpg.de
|
| 8 |
+
|
| 9 |
+
Andreas Geiger2,3 a.geiger@uni-tuebingen.de
|
| 10 |
+
|
| 11 |
+
# Siyu Tang1
|
| 12 |
+
|
| 13 |
+
siyu.tang@inf.ethz.ch
|
| 14 |
+
|
| 15 |
+
1ETH Zürich 2Max Planck Institute for Intelligent Systems, Tübingen 3University of Tübingen
|
| 16 |
+
|
| 17 |
+
# Abstract
|
| 18 |
+
|
| 19 |
+
In this paper, we aim to create generalizable and controllable neural signed distance fields (SDFs) that represent clothed humans from monocular depth observations. Recent advances in deep learning, especially neural implicit representations, have enabled human shape reconstruction and controllable avatar generation from different sensor inputs. However, to generate realistic cloth deformations from novel input poses, watertight meshes or dense full-body scans are usually needed as inputs. Furthermore, due to the difficulty of effectively modeling pose-dependent cloth deformations for diverse body shapes and cloth types, existing approaches resort to per-subject/cloth-type optimization from scratch, which is computationally expensive. In contrast, we propose an approach that can quickly generate realistic clothed human avatars, represented as controllable neural SDFs, given only monocular depth images. We achieve this by using meta-learning to learn an initialization of a hypernetwork that predicts the parameters of neural SDFs. The hypernetwork is conditioned on human poses and represents a clothed neural avatar that deforms non-rigidly according to the input poses. Meanwhile, it is metalearned to effectively incorporate priors of diverse body shapes and cloth types and thus can be much faster to fine-tune, compared to models trained from scratch. We qualitatively and quantitatively show that our approach outperforms state-of-the-art approaches that require complete meshes as inputs while our approach requires only depth frames as inputs and runs orders of magnitudes faster. Furthermore, we demonstrate that our meta-learned hypernetwork is very robust, being the first to generate avatars with realistic dynamic cloth deformations given as few as 8 monocular depth frames.
|
| 20 |
+
|
| 21 |
+
# 1 Introduction
|
| 22 |
+
|
| 23 |
+
Representing clothed humans as neural implicit functions is a rising research topic in the computer vision community. Earlier works in this direction address geometric reconstruction of clothed humans from static monocular images [35, 36, 63, 64], RGBD videos [37, 38, 71, 78, 80] or sparse point clouds [12] as direct extensions of neural implicit functions for rigid objects [11, 45, 46, 52]. More recent works advocate to learn shapes in a canonical pose [7, 27, 75] in order to not only handle reconstruction, but also build controllable neural avatars from sensor inputs. However, these works do not model pose-dependent cloth deformation, limiting their realism.
|
| 24 |
+
|
| 25 |
+

|
| 26 |
+
Figure 1: Given as few as 8 monocular depth images and their SMPL fittings, our meta-learned model yields a controllable neural SDF in 2 minutes which synthesizes realistic cloth deformations for unseen body poses. Here we show results of two different subjects wearing different clothes.
|
| 27 |
+
|
| 28 |
+
On the other hand, traditional parametric human body models [41, 50, 54, 77] can represent pose-dependent soft tissue deformations of minimally-clothed human bodies. Several recent methods [13, 48] proposed to learn neural implicit functions to approximate such parametric models from watertight meshes. However, they cannot be straightforwardly extended to model clothed humans. SCANimate [65] proposed to learn canonicalized dynamic neural Signed Distance Fields (SDFs) controlled by human pose inputs and trained with Implicit Geometric Regularization (IGR [21]), thus circumventing the requirement of watertight meshes. However, SCANimate works only on dense full-body scans with accurate surface normals and further requires expensive per-subject/cloth-type training. These factors limit the applicability of SCANimate for building personalized human avatars from commodity RGBD sensors.
|
| 29 |
+
|
| 30 |
+
Contrary to all the aforementioned works, we propose to use meta-learning to effectively incorporate priors of dynamic neural SDFs of clothed humans, thus enabling fast fine-tuning (few minutes) for generating new avatars given only a few monocular depth images of unseen clothed humans as inputs. More specifically, we build upon recently proposed ideas of meta-learned initialization for implicit representations [67, 72] to enable fast fine-tuning. Similar to [67], we represent a specific category of objects (in our case, clothed human bodies in the canonical pose) with a neural implicit function and use meta-learning algorithms such as [16, 49] to learn a meta-model. However, unlike [67, 72], where the implicit functions are designed for static reconstruction, we target the generation of dynamic neural SDFs that are controllable by user-specified body poses. We observe that directly conditioning neural implicit functions (represented as a multi-layer perceptron) on body poses lacks the expressiveness to capture high-frequency details of diverse cloth types, and hence propose to meta-learn a hypernetwork [25] that predicts the parameters of the neural implicit function. Overall, the proposed approach, which we name MetaAvatar, yields controllable neural SDFs with dynamic surfaces in minutes via fast fine-tuning, given only a few depth observations of an unseen clothed human and the underlying SMPL [41] fittings (Fig. 1) as inputs. Code and data are public at https://neuralbodies.github.io/metavatar/.
|
| 31 |
+
|
| 32 |
+
# 2 Related Work
|
| 33 |
+
|
| 34 |
+
Our approach lies at the intersection of clothed human body modeling, neural implicit representations, and meta-learning. We review related works in the following.
|
| 35 |
+
|
| 36 |
+
Clothed Human Body Modeling: Earlier works for clothed human body modeling utilize parametric human body models [5, 26, 28, 41, 50, 54, 77] combined with deformation layers [2, 3, 7, 8] to model cloth deformations. However, these approaches cannot model fine clothing details due to their fixed topology, and they cannot handle pose-dependent cloth deformations. Mesh-based approaches that handle articulated deformations of clothes either require accurate surface registration [33, 43, 79, 83] or synthetic data [22, 24, 53] for training. Such requirement for data can be freed by using neural implicit surfaces [10, 51, 65, 73]. For example, SCANimate [65] proposed a weakly supervised approach to learn dynamic clothed human body models from 3D full-body scans which only requires minimally-clothed body registration. However, its training process usually takes one day for each subject/cloth-type combination and requires accurate surface normal information extracted from dense scans. Recent explicit clothed human models [9, 42, 44, 81] can also be learned from unregistered data. Like our method, concurrent work [44] also models pose-dependent shapes across different subjects/cloth-types, but it requires full-body scans for training. In contrast, our approach enables learning of clothed body models in minutes from as few as 8 depth images.
|
| 37 |
+
|
| 38 |
+
Neural Implicit Representations: Neural implicit representations [11, 45, 46, 52, 55] have been used to tackle both image-based [27, 35, 36, 57, 59, 63, 64, 87] and point cloud-based [7, 12] clothed human reconstruction. Among these works, ARCH [27] was the first one to represent clothed human bodies as a neural implicit function in a canonical pose. However, ARCH does not handle posedependent cloth deformations. Most recently, SCANimate [65] proposed to condition neural implicit functions on joint-rotation vectors (in the form of unit quaternions), such that the canonicalized shapes of the neural avatars change according to the joint angles of the human body, thus representing pose-dependent cloth deformations. However, diverse and complex cloth deformations make it hard to learn a unified prior from different body shapes and cloth types, thus SCANimate resorts to per-subject/cloth-type training which is computationally expensive.
|
| 39 |
+
|
| 40 |
+
Meta-Learning: Meta-learning is typically used to address few-shot learning, where a few training examples of a new task are given, and the model is required to learn from these examples to achieve good performance on the new task [1, 14, 15, 17–19, 23, 29, 32, 58, 60, 62, 66, 70, 74, 76, 82, 86]. We focus on optimization-based meta-learning, where Model-Agnostic Meta Learning (MAML [16]), Reptile [49] and related alternatives are typically used to learn such models [4, 6, 20, 34, 39, 61]. In general, this line of algorithms tries to learn a "meta-model" that can be updated quickly from new observations with only few gradient steps. Recently, meta-learning has been used to learn a universal initialization of implicit representations for static neural SDFs [67] and radiance fields [72]. MetaSDF [67] demonstrates that only a few gradient update steps are needed to achieve comparable or better results than slower auto-decoder-based approaches [52]. However, [67, 72] only meta-learn static representations, whereas we are interested in dynamic representations conditioned on human body poses. To our best knowledge, we are the first to meta-learn the hypernetwork to generate the parameters of neural SDF networks.
|
| 41 |
+
|
| 42 |
+
# 3 Fundamentals
|
| 43 |
+
|
| 44 |
+
We start by briefly reviewing the linear blend skinning (LBS) method [41] and the recent implicit skinning networks [48, 65] that learn to predict skinning weights of cloth surfaces in a weakly supervised manner. Using the learned implicit skinning networks allows us to canonicalize meshes or depth observations of clothed humans, given only minimally-clothed human body model registrations to the meshes. Canonicalization of meshes or points is a necessary step as the dynamic neural SDFs introduced in Section 4 are modeled in canonical space.
|
| 45 |
+
|
| 46 |
+
# 3.1 Linear Blend Skinning
|
| 47 |
+
|
| 48 |
+
Linear blend skinning (LBS) is a commonly used technique to deform parametric human body models [5, 26, 41, 50, 54, 77] according to user-specified rigid bone transformations. Given a set of $N$ points in a canonical space, $\hat { \mathbf { X } } = \{ \hat { \mathbf { x } } ^ { ( i ) } \} _ { i = 1 } ^ { N }$ , LBS takes a set of rigid bone transformations (in our case we use 23 local transformations plus one global transformation, assuming an underlying SMPL model) $\{ \mathbf { B } _ { b } \} _ { b = 1 } ^ { 2 4 }$ as inputs, each $\mathbf { B } _ { b }$ being a $4 \times 4$ rotation-translation matrix. For a 3D point xˆ(i) ∈ Xˆ 1, a skinning weight vector is a probability simplex w(i) ∈ [0, 1]24, s.t. P24b=1 $\begin{array} { r } { \sum _ { b = 1 } ^ { 2 4 } \mathbf { w } _ { b } ^ { ( i ) } = 1 } \end{array}$ , that defines the affinity of the point $\hat { \mathbf { x } } ^ { ( i ) }$ to each of the bone transformations $\{ \mathbf { B } _ { b } \} _ { b = 1 } ^ { 2 4 }$ . The set of transformed points $\mathbf { X } = \{ \mathbf { x } ^ { ( i ) } \} _ { i = 1 } ^ { N }$ of the clothed human is related to $\hat { \mathbf X }$ via:
|
| 49 |
+
|
| 50 |
+
$$
|
| 51 |
+
\begin{array} { l } { { \displaystyle { \bf x } ^ { ( i ) } = L B S \left( \hat { { \bf x } } ^ { ( i ) } , \{ { \bf B } _ { b } \} , { \bf w } ^ { ( i ) } \right) = \left( \sum _ { b = 1 } ^ { 2 4 } { \bf w } _ { b } ^ { ( i ) } { \bf B } _ { b } \right) \hat { \bf x } ^ { ( i ) } } , ~ \forall i = 1 , \ldots , N } \\ { { \displaystyle \hat { \bf x } ^ { ( i ) } = L B S ^ { - 1 } \left( { \bf x } ^ { ( i ) } , \{ { \bf B } _ { b } \} , { \bf w } ^ { ( i ) } \right) = \left( \sum _ { b = 1 } ^ { 2 4 } { \bf w } _ { b } ^ { ( i ) } { \bf B } _ { b } \right) ^ { - 1 } { \bf x } ^ { ( i ) } } , ~ \forall i = 1 , \ldots , N } \end{array}
|
| 52 |
+
$$
|
| 53 |
+
|
| 54 |
+
where Eq. (1) is referred to as the LBS function and Eq. (2) is referred to as the inverse-LBS function. The process of applying Eq. (1) to all points in $\hat { \bf X }$ is often referred to as forward skinning while the process of applying Eq. (2) is referred to as inverse skinning.
|
| 55 |
+
|
| 56 |
+
# 3.2 Implicit Skinning Networks
|
| 57 |
+
|
| 58 |
+
Recent articulated implicit representations [48, 65] have proposed to learn functions that predict the forward/inverse skinning weights for arbitrary points in $\bar { \mathbb { R } ^ { 3 } }$ . We follow this approach, but take advantage of a convolutional point-cloud encoder [56] for improved generalization. Formally, we define the implicit forward and inverse skinning networks as $h _ { \mathrm { f w d } } ( \cdot , \cdot ) : ( \mathbb { R } ^ { 3 \times K } , \mathbb { R } ^ { 3 } ) \mapsto \mathbb { R } ^ { 2 \bar { 4 } }$ and $h _ { \mathrm { i n v } } ( \cdot , \cdot ) : ( \mathbb { R } ^ { 5 \times K } , \mathbb { R } ^ { 3 } ) \mapsto \mathbb { R } ^ { 2 4 }$ , respectively. Both networks take as input a point cloud with $K$ points and a query point for which they predict skinning weights. Therefore, we can analogously re-define Eq. $\displaystyle ( \begin{array} { l l } \end{array} , \begin{array} { \ l } \end{array} )$ respectively as:
|
| 59 |
+
|
| 60 |
+
$$
|
| 61 |
+
\begin{array} { l } { { \displaystyle { \bf x } ^ { ( i ) } = \left( \sum _ { b = 1 } ^ { 2 4 } h _ { \mathrm { f w d } } ( \hat { { \bf X } } , \hat { { \bf x } } ^ { ( i ) } ) _ { b } { \bf B } _ { b } \right) \hat { { \bf x } } ^ { ( i ) } } , ~ \forall i = 1 , \ldots , N } \\ { { \displaystyle { \hat { \bf x } ^ { ( i ) } = \left( \sum _ { b = 1 } ^ { 2 4 } h _ { \mathrm { i n v } } ( { \bf X } , { \bf x } ^ { ( i ) } ) _ { b } { \bf B } _ { b } \right) ^ { - 1 } { \bf x } ^ { ( i ) } } , ~ \forall i = 1 , \ldots , N } } \end{array}
|
| 62 |
+
$$
|
| 63 |
+
|
| 64 |
+
Training the Skinning Network: We follow the setting of SCANimate [65], where a dataset of
|
| 65 |
+
|
| 66 |
+
observed point clouds $\{ { \bf X } \}$ and their underlying SMPL registration are known. For a sample $\mathbf { X }$ in the dataset, we first define the re-projected points $\bar { \mathbf { X } } = \{ \bar { \mathbf { x } } \} _ { i = 1 } ^ { N }$ as $\mathbf { X }$ mapped to canonical space via Eq. (4) and then mapped back to transformed space via Eq. (3). We then define the training loss:
|
| 67 |
+
|
| 68 |
+
$$
|
| 69 |
+
\mathcal { L } ( \mathbf { X } ) = \lambda _ { r } \mathcal { L } _ { r } + \lambda _ { s } \mathcal { L } _ { s } + \lambda _ { s k i n } \mathcal { L } _ { s k i n } ,
|
| 70 |
+
$$
|
| 71 |
+
|
| 72 |
+
where $\mathcal { L } _ { r }$ represents a re-projection loss that penalizes the L2 distance between an input point $\mathbf { x }$ and the re-projected point $\bar { \bf x }$ , $\mathcal { L } _ { s }$ represents L1 distances between the predicted forward skinning weights and inverse skinning weights, and $\mathcal { L } _ { s k i n }$ represents the L1 distances between the predicted (forward and inverse) skinning weights and the barycentrically interpolated skinning weights $\mathbf { w } ^ { ( i ) }$ on the registered SMPL shape that is closest to point $\mathbf { x } ^ { ( i ) }$ ; please refer to the Supp. Mat. for hyperparameters and details.
|
| 73 |
+
|
| 74 |
+
We train two skinning network types, the first one takes a partial point cloud extracted from a depth image as input and performs the inverse skinning, while the second one takes a full point cloud sampled from iso-surface points generated from the dynamic neural SDF in the canonical space and performs forward skinning.
|
| 75 |
+
|
| 76 |
+
Canonicalization: We use the learned inverse skinning network to canonicalize complete or partial point clouds $\{ \hat { \bf X } \}$ via Eq. (4) which are further used to learn the canonicalized dynamic neural SDFs.
|
| 77 |
+
|
| 78 |
+
# 4 MetaAvatar
|
| 79 |
+
|
| 80 |
+
Our approach meta-learns a unified clothing deformation prior from the training set that consists of different subjects wearing different clothes. This meta-learned model is further efficiently fine-tuned to produce a dynamic neural SDF from an arbitrary amount of fine-tuning data of unseen subjects. In extreme cases, MetaAvatar requires as few as 8 depth frames and takes only 2 minutes for fine-tuning to yield a subject/cloth-type-specific dynamic neural SDF (Fig. 1).
|
| 81 |
+
|
| 82 |
+
We assume that each subject/cloth-type combination in the training set has a set of registered bone transformations and canonicalized points, denoted as $\{ \{ \mathbf { B } _ { b } \} _ { b = 1 } ^ { 2 4 } , \hat { \mathbf { X } } \}$ . Points in $\hat { \bf X }$ are normalized to the range $[ - 1 , 1 ] ^ { 3 }$ according to their corresponding registered SMPL shape. With slight abuse of notation, we also define $\mathbf { X }$ as all possible points in $[ - \bar { 1 } , 1 ] ^ { 3 }$ . Our goal is to meta-learn a hypernetwork [25, 69] which takes $\{ \mathbf { B } _ { b } \} _ { b = 1 } ^ { 2 4 }$ ( $\{ { \bf B } _ { b } \}$ for shorthand) as inputs and predicts parameters of the neural SDFs in the canonical space. Denoting the hypernetwork as $g _ { \psi } ( \left\{ \bar { \mathbf { B } } _ { b } \right\} )$ and the predicted neural SDF as $f _ { \phi } ( \mathbf { x } ) \vert _ { \phi = g _ { \psi } ( \{ \mathbf { B } _ { b } \} ) }$ , we use the following IGR [21] loss to supervise the learning of $g$ :
|
| 83 |
+
|
| 84 |
+
$$
|
| 85 |
+
\begin{array} { l } { { \displaystyle \dot { \mathrm { ~ \ l ~ } } _ { { \mathrm { L G R } } } \big ( f _ { \phi } \big ( \hat { \bf X } \big ) \big | _ { \phi = g _ { \psi } ( { \{ { \bf B } _ { b } \} } ) } \big ) = \sum _ { { \bf x } \in \hat { \bf X } } \lambda _ { s d f } \Big | f _ { \phi } \big ( { \bf x } \big ) \big | _ { \phi = g _ { \psi } ( { \{ { \bf B } _ { b } \} } ) } \Big | + \lambda _ { \bf n } \left( 1 - \langle { \bf n } ( { \bf x } ) , \nabla _ { { \bf x } } f _ { \phi } ( { \bf x } ) \big | _ { \phi = g _ { \psi } ( { \{ { \bf B } _ { b } \} } ) } \rangle \right) } } \\ { { \displaystyle \qquad + \lambda _ { E } \Big | \big | \nabla _ { { \bf x } } f _ { \phi } \big ( { \bf x } \big ) \big | _ { \phi = g _ { \psi } ( \{ { { \bf B } _ { b } \} } ) } \big | \big | _ { 2 } - 1 \Big | \qquad \quad \mathrm { ( o n \mathrm { - s u r f a c e ~ l o s s } ) } } } \\ { { \displaystyle \qquad + \sum _ { { \bf x } \sim { \bf X } \backslash \hat { \bf X } } \qquad \quad - \alpha \cdot \Big | f _ { \phi } \big ( { \bf x } \big ) \big | _ { \phi = g _ { \psi } ( \{ { { \bf B } _ { b } \} } ) } \Big | \Big ) } } \\ { { \displaystyle \qquad + \lambda _ { E } \Big | \big | \nabla _ { { \bf x } } f _ { \phi } \big ( { \bf x } \big ) \big | _ { \phi = g _ { \psi } ( \{ { { \bf B } _ { b } \} } ) } \big | \big | _ { 2 } - 1 \Big | \qquad \mathrm { ( o f f \mathrm { - s u r f a c e ~ l o s s } ) } } } \end{array}
|
| 86 |
+
$$
|
| 87 |
+
|
| 88 |
+
where $\mathbf { n _ { x } }$ is the surface normal of point $\mathbf { x }$ . We assume that this information, along with the groundtruth correspondences from transformed space to canonical space is available when learning the meta-model on the training set, but do not require this for fine-tuning $g$ on unseen subjects.
|
| 89 |
+
|
| 90 |
+
In practice, we found that directly learning the hypernetwork $g _ { \psi }$ via Eq. (6) does not converge, and thus we decompose the meta-learning of $g _ { \psi }$ into two steps. First, we learn a meta-SDF [67] (without conditioning on $\{ \mathbf { B } _ { b } \}$ , Sec. 4.1), and then we meta-learn a hypernetwork that takes $\{ { \bf B } _ { b } \}$ as input and predicts the residuals to the parameters of the previously learned meta-SDF (Sec. 4.2).
|
| 91 |
+
|
| 92 |
+
# 4.1 Meta-learned Initialization of Static Neural SDFs
|
| 93 |
+
|
| 94 |
+
To effectively learn a statistical prior of clothed human bodies, we ignore the input bone transformations $\{ { \bf B } _ { b } \}$ and meta-learn the static neural SDF $f _ { \phi } ( \mathbf { \dot { x } } ) : [ - 1 , 1 ] ^ { 3 } \mapsto \mathbb { R }$ , parameterized by $\phi$ , from all canonicalized points of subjects with different genders, body shapes, cloth types, and poses. Furthermore, for faster and more stable convergence, the neural SDF $f _ { \phi }$ function additionally leverages the periodic activation functions [68].
|
| 95 |
+
|
| 96 |
+

|
| 97 |
+
Figure 2: Overview of the meta-SDF network. We use a 5-layer SIREN [67] network with 256 neurons for each layer.
|
| 98 |
+
|
| 99 |
+
The full meta-learning algorithm for the static neural SDFs is described in Alg. 1.
|
| 100 |
+
|
| 101 |
+
# Algorithm 1 Meta-learning SDF with Reptile [49]
|
| 102 |
+
|
| 103 |
+
Initialize: meta-network parameters $\phi$ , meta learning rate $\beta$ , inner learning rate $\alpha$ , max training
|
| 104 |
+
iteration $N$ , inner-loop iteration $m$ , batch size $M$
|
| 105 |
+
1: for $i = 1 , \ldots , N$ do
|
| 106 |
+
2: Sample a batch of $M$ training samples $\{ \hat { \mathbf { X } } ^ { ( j ) } \} _ { j = 1 } ^ { M }$
|
| 107 |
+
3: for $\begin{array} { r l } & { \mathbf { \Lambda } _ { [ = 1 , \dots , M \mathbf { \delta } ] \mathbf { \delta } \mathbf { 1 } } ^ { [ = 1 , \dots , M \mathbf { \delta } ] \mathbf { \delta } \mathbf { 0 } } } \\ & { \mathbf { \Phi } _ { \mathbf { 0 } } ^ { ( j ) } = \phi } \\ & { \mathbf { \Phi } \mathbf { 0 } \mathbf { r } \ k = 1 , \dots , m \mathbf { \delta } \mathbf { d } \mathbf { \mathbf { 0 } } } \\ & { \quad \phi _ { k } ^ { ( j ) } = \phi _ { k - 1 } ^ { ( j ) } - \alpha \nabla _ { \phi } \mathcal { L } _ { \mathrm { I G R } } \big ( f _ { \phi } ( \hat { \mathbf { X } } ^ { ( j ) } ) \big | _ { \phi = \phi _ { k - 1 } ^ { ( j ) } } \big ) } \end{array}$
|
| 108 |
+
4: φ(j) =
|
| 109 |
+
5: f
|
| 110 |
+
6:
|
| 111 |
+
7: end for
|
| 112 |
+
8: 9: $\begin{array} { r l } & { \mathrel { \phantom { = } } \phi \phi + \beta \frac { 1 } { M } \sum _ { j = 1 } ^ { M } ( \phi _ { m } ^ { ( j ) } - \phi ) } \end{array}$
|
| 113 |
+
10: end for
|
| 114 |
+
|
| 115 |
+
# 4.2 Meta-learned Initialization of HyperNetwork for Dynamic Neural SDFs
|
| 116 |
+
|
| 117 |
+
The meta-learned static neural SDF explained in the previous section can efficiently adapt to new observations, however it is not controllable by user-specified bone transformations $\{ \bar { \mathbf { B } } _ { b } \}$ . Therefore, to enable non-rigid pose-dependent cloth deformations, we further meta-learn a hypernetwork [25] to predict residuals to the learned parameters of the meta-SDF in Alg. 1.
|
| 118 |
+
|
| 119 |
+
The key motivation for meta-learning the hypernetwork is to build an effective unified prior for articulated clothed humans, which enables the recovery of the non-rigid clothing deformations at test time via the efficient fine-tuning process from several depth images of unseen subjects.
|
| 120 |
+
|
| 121 |
+
# Algorithm 2 Meta-learning hypernetwork with Modified Reptile
|
| 122 |
+
|
| 123 |
+
Initialize: meta-hypernetwork parameters $\psi$ , pre-trained meta-SDF parameters $\phi ^ { * }$ , meta learning rate $\beta$ , inner learning rate $\alpha$ , max training iteration $N$ , inner-loop iteration $m$ . 1: for $i = 1 , \ldots , N$ do 2: $\psi _ { 0 } = \psi$ 3: Randomly choose a subject/cloth-type combination $n$ 4: Uniformly sample $M \sim \{ 1 , \dots , D ^ { ( n ) } \}$ where $D ^ { ( n ) }$ is the number of datapoints of subject/cloth-type combination $n$ 5: Sample $M$ datapoints from subject/cloth-type combination $n$ , denoting these datapoints as $\mathcal { S } = \{ \{ \bar { \bf B } _ { b } \} ^ { ( j ) } , \hat { \bf X } ^ { ( j ) } \} _ { j = 1 } ^ { M }$ 6: for $k = 1 , \ldots , m$ do 7: L = 1M P({Bb},Xˆ )∈S LIGR(fφ(Xˆ )|φ=gψk−1 ({Bb})+φ∗ ) 8: ψk = ψk−1 − α∇ψk−1L 9: end for 10: $\psi \psi + \beta ( \psi _ { m } - \psi _ { 0 } )$ 11: end for
|
| 124 |
+
|
| 125 |
+
Denoting the meta-SDF learned by Alg. 1 as $\phi ^ { * }$ and our hypernetwork as $g _ { \psi } ( \{ \mathbf { B } _ { b } \} )$ , we implement Alg. 2. This algorithm differs from the original Reptile [49] algorithm in that it tries to optimize the inner-loop on arbitrary amount of data. Note that for brevity the loss in the innerloop (line 7-line 8) is computed over the whole batch $s$ , whereas in practice we used stochastic gradient descent (SGD) with fixed mini-batch size over $s$ since $s$ can contain hundreds of samples; SGD is used with the mini-batch size of 12 for the inner-loop.
|
| 126 |
+
|
| 127 |
+

|
| 128 |
+
Figure 3: Overview of the meta-hypernetwork. It predicts residuals to $\phi ^ { * }$ which is learned in Sec. 4.1
|
| 129 |
+
|
| 130 |
+
Inference: At test-time, we are given a small fine-tuning set {{Bb}f ine,(j), Xˆ f ine,(j)}Mj= and the validation set {{Bb}val,(j)}Kj= The fine-tuning set is used to optimize the hypernetwork parameters $\psi$ ( $m = 2 5 6$ SGD epochs) that
|
| 131 |
+
|
| 132 |
+
are then used to generate neural SDFs from bone transformations available in the validation set. The overall inference pipeline including the inverse and the forward LBS stages is shown in Fig. 4.
|
| 133 |
+
|
| 134 |
+
Bone Transformation Encoding: We found that a small hierarchical MLP proposed in LEAP [48] for encoding bone transformations works slightly better than the encoding of unit quaternions used in SCANimate [65]. Thus, we employ the hierarchical MLP encoder to encode $\{ \mathbf { B } _ { b } \}$ for $g$ unless specified otherwise; we ablate different encoding types in the experiment section.
|
| 135 |
+
|
| 136 |
+
# 5 Experiments
|
| 137 |
+
|
| 138 |
+
We validate the proposed MetaAvatar model for learning meta-models and controllable dynamic neural SDFs of clothed humans by first comparing our MetaAvatar to the established approaches [13, 48, 65]. Then, we ablate the modeling choices for the proposed controllable neural SDFs. And lastly, we demonstrate MetaAvatar’s capability to tackle the challenging task of learning animatable clothed human models from reduced data, to the point that only 8 depth images are available as input.
|
| 139 |
+
|
| 140 |
+
Datasets: We use the CAPE dataset [43] as the major test bed for our experiments. This dataset consists of 148584 pairs of clothed meshes, capturing 15 human subjects wearing different clothes while performing different actions. We use 10 subjects for meta-learning, which we denote as the training set. We use four unseen subjects (00122, 00134, 00215, 03375)2 for fine-tuning and validation; for each of these four subjects, the corresponding action sequences are split into finetuning set and validation set. The fine-tuning set is used for fine-tuning the MetaAvatar models, it is also used to evaluate pose interpolation task. The validation set is used for evaluating novel pose extrapolation. Among the four unseen subjects, two of them (00122, 00215) perform actions that are present in the training set for the meta-learning; we randomly split actions of these two subjects with $70 \%$ fine-tuning and $30 \%$ validation. Subject 00134 and 03375 perform two trials of actions unseen in the training set for meta-learning. We use the first trial as the fine-tuning set and the second trial as the validation set. Subject 03375 also has one cloth type (blazer) that is unseen during meta-learning.
|
| 141 |
+
|
| 142 |
+

|
| 143 |
+
Figure 4: Overview of our inference pipeline. The inverse LBS net (Sec. 3.2) takes a small set of input depth frames together with their underlying SMPL registrations to canonicalize the depth points; then the meta-learned hypernetwork (Sec. 4.2) is fine-tuned to represent the instance specific dynamic SDF; given novel poses, the updated hypernetwork generates pose-dependent cloth-deformations in canonical space, and the animated meshes are obtained via the forward LBS network (Sec. 3.2).
|
| 144 |
+
|
| 145 |
+
Baselines: We use NASA [13], LEAP [48], and SCANimate [65] as our baselines. NASA and SCANimate cannot handle multi-subject-cloth with a single model so we train per-subject/cloth-type models from scratch for each of them on the fine-tuning set. LEAP is a generalizable neural-implicit human body model that has shown to work on minimally-clothed bodies. We extend LEAP by adding a one-hot encoding to represent different cloth types (similarly to [43]) and train it jointly on the full training and the fine-tuning set.
|
| 146 |
+
|
| 147 |
+
As for the input format, we use depth frames rendered from CAPE meshes for our MetaAvatar. To render the depth frames, we fixed the camera and rotate the CAPE meshes around the y-axis (in SMPL space) at different angles with an interval of 45 degrees; note that for each mesh we only render it on one angle, simulating a monocular camera taking a round-view of a moving person. For the baselines, we use watertight meshes and provide the occupancy [45] loss to supervise the training of NASA and LEAP, while sampling surface points and normals on watertight meshes to provide the IGR loss supervision for SCANimate. Note that our model is at great disadvantage, as for fine-tuning we only use discrete monocular depth observations without accurate surface normal information.
|
| 148 |
+
|
| 149 |
+
Tasks and Evaluation: Our goal is to generate realistic clothing deformations from arbitrary input human pose parameters. To systematically understand the generalization capability of the MetaAvatar representation, we validate the baselines and MetaAvatar on two tasks, pose interpolation and extrapolation. For interpolation, we sample every 10th frame on the fine-tuning set for training/finetuning, and sample every 5th frame (excluding the training frames) also on the fine-tuning set for validation. For extrapolation, we sample every 5th frame on the fine-tuning set for training, and sample every 5th frame on the validation set for validation.
|
| 150 |
+
|
| 151 |
+
Interpolation is evaluated using three metrics: point-based ground-truth-to-mesh distance $( D _ { p } \downarrow ,$ in cm), face-based ground-truth-to-mesh distance $( D _ { f } \downarrow ,$ , in cm), and point-based ground-truth-to-mesh normal consistency $( N C \uparrow$ , in range $[ - 1 , 1 ] )$ . For computing these interpolation metrics we ignore non-clothed body parts such as hands, feet, head, and neck. For extrapolation, we note that clothdeformation are often stochastic; in such a case, predicting overly smooth surfaces can result in lower distances and higher normal consistency. Thus, we also conduct a large-scale perceptual study using
|
| 152 |
+
|
| 153 |
+

|
| 154 |
+
Figure 5: Qualitative comparison on extrapolation results with blazer outfit. NASA shows consistent blocky artifacts. LEAP predicts overly smooth surfaces missing the tails of the blazer outfit. SCANimate does not generalize as this specific pose has not been seen during training. Directly meta-learning a SIREN [68] network that conditions on input poses produces a smooth surface that does not capture the blazer tails well.
|
| 155 |
+
|
| 156 |
+

|
| 157 |
+
Figure 6: Qualitative comparison on extrapolation results when reducing fine-tuning data on subject 00215 wearing poloshirt. The caption indicates the amount of fine-tuning data used to fine-tune the meta-hypernetwork on this unseen subject. Our meta-learned model captures for this unseen subject the sliding effect of the poloshirt at this pose in which the person raising arms, even fine-tuned with just 8 depth images.
|
| 158 |
+
|
| 159 |
+
Amazon Mechanical Turk, and report the perceptual scores $( \mathrm { P S } \uparrow )$ which reflects the percentage of users who favor the outputs of baselines over MetaAvatar. Details about user study design can be found in the Supp. Mat.
|
| 160 |
+
|
| 161 |
+
# 5.1 Evaluation Against Baselines
|
| 162 |
+
|
| 163 |
+
In this section, we report results on both interpolation and extrapolation tasks against various baselines described above. For NASA and SCANimate, we train one model for each subject/clothtype combination on the fine-tuning set. For them it usually takes several thousand of epochs to converge for each subject/cloth-type combination, which roughly equals to 10-24 hours of training. For LEAP, we train a single model on both the training and the fine-tuning set using two days. For the MetaAvatar, we meta-learn a single model on the training set, and for each subject/cloth-type combination we fine-tune the model for 256 epochs to produce subject/cloth-type specific models. The exact fine-tuning time ranges from 40 minutes to 3 hours depending on the amount of available data since we are running a fixed number of epochs; see the Supp. Mat. for detailed runtime comparison on each subject/cloth-type combination. Note that MetaAvatar uses partial depth observations while the other baselines are trained on complete meshes. The results are reported in Table 1.
|
| 164 |
+
|
| 165 |
+
Importantly, models of NASA and SCANimate are over-fitted to each subject/cloth-type combination as they cannot straightforwardly leverage prior knowledge from multiple training subjects. LEAP is trained on all training and fine-tuning data with input encodings to distinguish different body shapes and cloth types, but it fails to capture high-frequency details of clothes, often predicting smooth surfaces (Fig. 5); this is evidenced by its lower perceptual scores (PS) compared to SCANimate and our MetaAvatar. In contrast to these baselines, MetaAvatar successfully captures a unified clothing deformation prior of diverse body shapes and cloth types, which generalizes well to unseen body shapes (00122, 00215), unseen poses (00134, 03375), and unseen cloth types (03375 with blazer outfit); although we did not outperform LEAP on the interpolation task for subject 00134 and 03375, we note that 1) our method uses only 2.5D input for fine-tuning, while LEAP has access to groundtruth canonical meshes during training; 2) subject 00134 and 03375 comprise much more missing frames than subject 00122 and 00215, resulting in higher stochasticity and thus predicting smooth surfaces (such as LEAP) may yield better performance; this is also evidenced by LEAP’s much lower perceptual scores on subject 00134 and 03375, although obtaining the best performance for pose interpolation. We encourage the readers to watch the side-by-side comparison videos available on our project page: https://neuralbodies.github.io/metavatar/.
|
| 166 |
+
|
| 167 |
+
<table><tr><td></td><td></td><td colspan="2">3DInput</td><td>2.5D Input</td></tr><tr><td></td><td>NASA</td><td>LEAP</td><td>SCANimate</td><td>Ours</td></tr><tr><td colspan="5">Subj 100122,00215</td></tr><tr><td>Ex.</td><td>PS↑</td><td>0.078</td><td>0.314 0.333</td><td>0.5</td></tr><tr><td rowspan="3">Int.</td><td>Dp↓</td><td>0.484</td><td>0.454 0.586</td><td>0.450</td></tr><tr><td>Df↓</td><td>0.327 0.293</td><td>0.489</td><td>0.273</td></tr><tr><td>NC↑</td><td>0.752</td><td>0.807 0.793</td><td>0.821</td></tr><tr><td colspan="5">Subj 00134,03375</td></tr><tr><td>Ex.</td><td>PS↑</td><td>0.182 0.224</td><td>0.481</td><td>0.5</td></tr><tr><td rowspan="3">Int.</td><td>Dp↓</td><td>0.595</td><td>0.483</td><td>0.518</td></tr><tr><td>Df↓</td><td>0.469 0.340</td><td>0.542</td><td>0.367</td></tr><tr><td>NC↑</td><td>0.693 0.780</td><td>0.755</td><td>0.773</td></tr><tr><td colspan="5">Averge per-model training/fine-tuning time (hours)</td></tr><tr><td colspan="2">>10</td><td>1</td><td>>10</td><td>1.60</td></tr></table>
|
| 168 |
+
|
| 169 |
+
Table 1: Comparison to baselines. $D _ { p } , D _ { f }$ and $N C$ are reported for interpolation (Int.) while PS is reported for extrapolation $\left( \mathrm { E x . } \right)$ . Note that MetaAvatar is fine-tuned on depth images while all other baselines are trained on complete meshes. The training/fine-tuning times are just rough estimates, as ours does not include the time for meta-learning, while many factors, including varying training schedules, disk-IOs and hardware setups, can affect the final speed.
|
| 170 |
+
|
| 171 |
+
<table><tr><td></td><td></td><td>MLP</td><td>PosEnc</td><td>SIREN</td><td>Hyper Quat</td><td>Hyper BoneEnc</td></tr><tr><td colspan="7">Subj 00122,00215</td></tr><tr><td rowspan="3">Int.</td><td>Dp↓</td><td>3.278</td><td>1.806</td><td>0.472</td><td>0.460</td><td>0.461</td></tr><tr><td>D↓</td><td>2.201</td><td>0.998</td><td>0.301</td><td>0.288</td><td>0.288</td></tr><tr><td>NC↑</td><td>-0.279</td><td>-0.045</td><td>0.815</td><td>0.818</td><td>0.820</td></tr><tr><td colspan="7">Subj 100134,03375</td></tr><tr><td rowspan="3">Int.</td><td>Dp↓</td><td>3.320</td><td>1.498</td><td>0.532</td><td>0.526</td><td>0.523</td></tr><tr><td>Df↓</td><td>2.190</td><td>0.772</td><td>0.385</td><td>0.378</td><td>0.374</td></tr><tr><td>NC↑</td><td>-0.300</td><td>-0.099</td><td>0.773</td><td>0.772</td><td>0.772</td></tr></table>
|
| 172 |
+
|
| 173 |
+
Table 2: Ablation for different architectures on the interpolation task. Hyper-Quat is our model that takes the relative joint-rotations (in the form of unit quaternions) as inputs. HyperBoneEnc is our full model with hierarchical bone encoding MLP of LEAP [48]. Models in the table are fine-tuned for 128 epochs.
|
| 174 |
+
|
| 175 |
+
# 5.2 Ablation Study on Model Architectures
|
| 176 |
+
|
| 177 |
+
We further ablate model architecture choices for MetaAvatar. We compare against (1) a plain MLP that takes the concatenation of the relative joint-rotations (in the form of unit quaternions) and query points as input (MLP), (2) a MLP that takes the concatenation of the relative joint-rotations and the positional encodings of query point coordinates as input (PosEnc), and (3) a SIREN network that takes the concatenation of the relative joint-rotations and query points as input (SIREN). The evaluation task is interpolation; results are reported in Table 2. For the baselines (MLP, PosEnc and SIREN), we directly use Alg. 2 to meta-learn the corresponding models with $\phi ^ { * } = 0$ . For MLP and PosEnc, the corresponding models fail to produce reasonable shapes. For SIREN, it produces unnaturally smooth surfaces which cannot capture fine clothing details such as wrinkles (Fig. 5).
|
| 178 |
+
|
| 179 |
+
# 5.3 Few-shot learning of MetaAvatar
|
| 180 |
+
|
| 181 |
+
In this section, we evaluate the few-shot learning capabilities of MetaAvatar. As shown in Table 3, we reduce the amount of data on the fine-tuning set, and report the performance of models finetuned on reduced amount of data. Note that with $< 1 \%$ data, we require only one frame from each action sequence available for a subject/cloth-type combination, this roughly equals to 8-20 depth frames depending on the amount of data for that subject/cloth-type combination. For interpolation, the performance drops because the stochastic nature of cloth deformation becomes dominant when the amount of fine-tuning data decreases. On the other hand, the perceptual scores (PS) are better than NASA and LEAP even with ${ \tt c 1 \% }$ data in the form of partial depth observations, and better
|
| 182 |
+
|
| 183 |
+
Table 3: Ablation for few-shot learning. We report performance of MetaAvatar on reduced amount of fine-tuning data. Fine-tuning time scales linearly with the amount of data, since we run for a fixed number of epochs.
|
| 184 |
+
|
| 185 |
+
<table><tr><td>Fine-tune data (%)</td><td></td><td>100</td><td>50</td><td>20</td><td>10</td><td>5</td><td><1</td></tr><tr><td colspan="8">Subj 00122,00215</td></tr><tr><td>Ex.</td><td>PS个</td><td>0.5</td><td>0.471</td><td>0.509</td><td>0.473</td><td>0.373</td><td>0.510</td></tr><tr><td rowspan="3">Int.</td><td>Dp↓</td><td>-</td><td>0.450</td><td>0.480</td><td>0.512</td><td>0.543</td><td>0.592</td></tr><tr><td>D↓</td><td>=</td><td>0.273</td><td>0.310</td><td>0.353</td><td>0.391</td><td>0.450</td></tr><tr><td>NC↑</td><td>-</td><td>0.821</td><td>0.808</td><td>0.795</td><td>0.785</td><td>0.768</td></tr><tr><td colspan="8">Subj 00134, ,03375</td></tr><tr><td>Ex.</td><td>PS个</td><td>0.5</td><td>0.476</td><td>0.424</td><td>0.463</td><td>0.439</td><td>0.387</td></tr><tr><td rowspan="3">Int.</td><td>Dp↓</td><td>1</td><td>0.518</td><td>0.545</td><td>0.576</td><td>0.603</td><td>0.619</td></tr><tr><td>Df↓</td><td></td><td>0.367</td><td>0.400</td><td>0.438</td><td>0.471</td><td>0.489</td></tr><tr><td>NC↑</td><td>-</td><td>0.773</td><td>0.762</td><td>0.753</td><td>0.745</td><td>0.737</td></tr><tr><td colspan="8">Average per-model training/fine-tuning time ( (hours) 0.08 0.02</td></tr><tr><td colspan="8">1.60 0.8 0.32 0.16</td></tr></table>
|
| 186 |
+
|
| 187 |
+
than or comparable to SCANimate in most cases. The qualitative comparison on extrapolation results of reduced fine-tuning data is shown in Fig. 6. Please see the Supp. Mat. for more qualitative results on few-shot learning, including results on depth from raw scans, results on real depth images and comparison with pre-trained SCANimate model.
|
| 188 |
+
|
| 189 |
+
# 6 Conclusion
|
| 190 |
+
|
| 191 |
+
We introduced MetaAvatar, a meta-learned hypernetwork that represents controllable dynamic neural SDFs applicable for generating clothed human avatars. Compared to existing methods, MetaAvatar learns from less data (temporally discrete monocular depth frames) and requires less time to represent novel unseen clothed humans. We demonstrated that the meta-learned deformation prior is robust and can be used to effectively generate realistic clothed human avatars in 2 minutes from as few as 8 depth observations.
|
| 192 |
+
|
| 193 |
+
MetaAvatar is compatible with automatic registration methods [8, 75], human motion models [84, 85], implicit hand models [30, 31] and rendering primitives [40, 47] that could jointly enable an efficient end-to-end photo-realistic digitization of humans from commodity RGBD sensors, which has broad applicability in movies, games, and telepresence applications. However, this digitization may raise privacy concerns that need to be addressed carefully before deploying the introduced technology.
|
| 194 |
+
|
| 195 |
+
# 7 Acknowledgment
|
| 196 |
+
|
| 197 |
+
Siyu Tang acknowledges funding by the Swiss National Science Foundation under project 200021_204840. Andreas Geiger was supported by the ERC Starting Grant LEGO-3D (850533) and DFG EXC number 2064/1 - project number 390727645. We thank Jinlong Yang for providing results of SCANimate on the CAPE dataset. We thank Yebin Liu for sharing POSEFusion [38] data and results during the rebuttal period. We also thank Yan Zhang, Siwei Zhang and Korrawe Karunratanakul for proof reading the paper.
|
| 198 |
+
|
| 199 |
+
# References
|
| 200 |
+
|
| 201 |
+
[1] Ferran Alet, Tomas Lozano-Perez, and Leslie P. Kaelbling. Modular meta-learning. In Proc. of The 2nd Conference on Robot Learning, 2018. 3
|
| 202 |
+
[2] Thiemo Alldieck, Marcus Magnor, Bharat Lal Bhatnagar, Christian Theobalt, and Gerard Pons-Moll. Learning to reconstruct people in clothing from a single RGB camera. In Proc. of CVPR, 2019. 2
|
| 203 |
+
[3] Thiemo Alldieck, Marcus Magnor, Weipeng Xu, Christian Theobalt, and Gerard Pons-Moll. Video based reconstruction of 3d people models. In Proc. of CVPR, 2018. 2
|
| 204 |
+
[4] Marcin Andrychowicz, Misha Denil, Sergio Gómez, Matthew W Hoffman, David Pfau, Tom Schaul, Brendan Shillingford, and Nando de Freitas. Learning to learn by gradient descent by gradient descent. In Proc. of NeurIPS, 2016. 3
|
| 205 |
+
[5] Dragomir Anguelov, Praveen Srinivasan, Daphne Koller, Sebastian Thrun, Jim Rodgers, and James Davis. Scape: shape completion and animation of people. ACM Transasctions Graphics, 24, 2005. 2, 3
|
| 206 |
+
[6] Antreas Antoniou, Harrison Edwards, and Amos Storkey. How to train your maml. In Proc. of ICLR, 2019. 3
|
| 207 |
+
[7] Bharat Lal Bhatnagar, Cristian Sminchisescu, Christian Theobalt, and Gerard Pons-Moll. Combining implicit function learning and parametric models for 3d human reconstruction. In Proc. of ECCV, 2020. 1, 2, 3
|
| 208 |
+
[8] Bharat Lal Bhatnagar, Cristian Sminchisescu, Christian Theobalt, and Gerard Pons-Moll. Loopreg: Selfsupervised learning of implicit surface correspondences, pose and shape for 3d human mesh registration. In Proc. of NeurIPS, 2020. 2, 10
|
| 209 |
+
[9] Andrei Burov, Matthias Nießner, and Justus Thies. Dynamic surface function networks for clothed human bodies. In Proc. of ICCV, 2021. 2
|
| 210 |
+
[10] Xu Chen, Yufeng Zheng, Michael J Black, Otmar Hilliges, and Andreas Geiger. SNARF: Differentiable forward skinning for animating non-rigid neural implicit shapes. In Proc. of ICCV, 2021. 2
|
| 211 |
+
[11] Zhiqin Chen and Hao Zhang. Learning implicit fields for generative shape modeling. In Proc. of CVPR, 2019. 1, 3
|
| 212 |
+
[12] Julian Chibane, Thiemo Alldieck, and Gerard Pons-Moll. Implicit functions in feature space for 3d shape reconstruction and completion. In Proc. of CVPR, 2020. 1, 3
|
| 213 |
+
[13] Boyang Deng, JP Lewis, Timothy Jeruzalski, Gerard Pons-Moll, Geoffrey Hinton, Mohammad Norouzi, and Andrea Tagliasacchi. Nasa: Neural articulated shape approximation. In Proc. of ECCV, 2020. 2, 6, 7
|
| 214 |
+
[14] Nanqing Dong and Eric P. Xing. Few-shot semantic segmentation with prototype learning. In Proc. of BMVC, 2018. 3
|
| 215 |
+
[15] SM Ali Eslami, Danilo Jimenez Rezende, Frederic Besse, Fabio Viola, Ari S Morcos, Marta Garnelo, Avraham Ruderman, Andrei A Rusu, Ivo Danihelka, Karol Gregor, et al. Neural scene representation and rendering. Science, 360(6394):1204–1210, 2018. 3
|
| 216 |
+
[16] Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In Proc. of ICML, 2017. 2, 3 Yee Whye Teh, Danilo J. Rezende, and S. M. Ali Eslami. Conditional neural processes. In Proc. of ICML, 2018. 3
|
| 217 |
+
[18] Marta Garnelo, Jonathan Schwarz, Dan Rosenbaum, Fabio Viola, Danilo J. Rezende, S. M. Ali Eslami, and Yee Whye Teh. Neural processes. In ICML Workshop on Theoretical Foundations and Applications of Deep Generative Models, 2018.
|
| 218 |
+
[19] Jonathan Gordon, John Bronskill, Matthias Bauer, Sebastian Nowozin, and Richard E. Turner. Metalearning probabilistic inference for prediction. In Proc. of ICLR, 2019. 3
|
| 219 |
+
[20] Edward Grefenstette, Brandon Amos, Denis Yarats, Phu Mon Htut, Artem Molchanov, Franziska Meier, Douwe Kiela, Kyunghyun Cho, and Soumith Chintala. Generalized inner loop meta-learning, 2019. 3
|
| 220 |
+
[21] Amos Gropp, Lior Yariv, Niv Haim, Matan Atzmon, and Yaron Lipman. Implicit geometric regularization for learning shapes. In Proc. of ICML, 2020. 2, 5
|
| 221 |
+
[22] Peng Guan, Loretta Reiss, David A. Hirshberg, Er Weiss, and Michael J. Black. Drape: Dressing any person. ACM Transasctions Graphics, 31(4), 2012. 2
|
| 222 |
+
[23] Liang-Yan Gui, Yu-Xiong Wang, Deva Ramanan, and Jose M. F. Moura. Few-shot human motion prediction via meta-learning. In Proc. of ECCV, 2018. 3
|
| 223 |
+
[24] Erhan Gundogdu, Victor Constantin, Amrollah Seifoddini, Minh Dang, Mathieu Salzmann, and Pascal Fua. Garnet: A two-stream network for fast and accurate 3d cloth draping. In Proc. of ICCV, 2019. 2
|
| 224 |
+
[25] David Ha, Andrew Dai, and Quoc V. Le. Hypernetworks. In Proc. of ICLR, 2017. 2, 4, 5
|
| 225 |
+
[26] N. Hasler, C. Stoll, M. Sunkel, B. Rosenhahn, and H.-P. Seidel. A Statistical Model of Human Pose and Body Shape. Computer Graphics Forum, 28:337–346, 2009. 2, 3
|
| 226 |
+
[27] Zeng Huang, Yuanlu Xu, Christoph Lassner, Hao Li, and Tony Tung. ARCH: Animatable Reconstruction of Clothed Humans. In Proc. of CVPR, 2020. 1, 3
|
| 227 |
+
[28] Hanbyul Joo, Tomas Simon, and Yaser Sheikh. Total capture: A 3d deformation model for tracking faces, hands, and bodies. In Proc. of CVPR, 2018. 2
|
| 228 |
+
[29] Bingyi Kang, Zhuang Liu, Xin Wang, Fisher Yu, Jiashi Feng, and Trevor Darrell. Few-shot object detection via feature reweighting. In Proc. of ICCV, 2019. 3
|
| 229 |
+
[30] Korrawe Karunratanakul, Adrian Spurr, Zicong Fan, Otmar Hilliges, and Siyu Tang. A skeleton-driven neural occupancy representation for articulated hands. In Proc. of 3DV, 2021. 10
|
| 230 |
+
[31] Korrawe Karunratanakul, Jinlong Yang, Yan Zhang, Michael Black, Krikamol Muandet, and Siyu Tang. Grasping field: Learning implicit representations for human grasps. In Proc. of 3DV, 2020. 10
|
| 231 |
+
[32] Hyunjik Kim, Andriy Mnih, Jonathan Schwarz, Marta Garnelo, Ali Eslami, Dan Rosenbaum, Oriol Vinyals, and Yee Whye Teh. Attentive neural processes. In Proc. of ICLR, 2019. 3
|
| 232 |
+
[33] Zorah Lähner, Daniel Cremers, and Tony Tung. Deepwrinkles: Accurate and realistic clothing modeling. In Proc. of ECCV, 2018. 2
|
| 233 |
+
[34] Ke Li and Jitendra Malik. Learning to optimize. In Proc. of ICLR, 2017. 3
|
| 234 |
+
[35] Ruilong Li, Yuliang Xiu, Shunsuke Saito, Zeng Huang, Kyle Olszewski, and Hao Li. Monocular real-time volumetric performance capture. In Proc. of ECCV, 2020. 1, 3
|
| 235 |
+
[36] Zhongguo Li, Magnus Oskarsson, and Anders Heyden. Geo-pifu: Geometry and pixel aligned implicit functions for single-view human reconstruction. In Proc. of NeurIPS, 2020. 1, 3
|
| 236 |
+
[37] Zhe Li, Tao Yu, Chuanyu Pan, Zerong Zheng, and Yebin Liu. Robust 3d self-portraits in seconds. In Proc. of CVPR, 2020. 1
|
| 237 |
+
[38] Zhe Li, Tao Yu, Zerong Zheng, Kaiwen Guo, and Yebin Liu. Posefusion: Pose-guided selective fusion for single-view human volumetric capture. In Proc. of CVPR, 2021. 1, 10
|
| 238 |
+
[39] Zhenguo Li, Fengwei Zhou, Fei Chen, and Hang Li. Meta-sgd: Learning to learn quickly for few-shot learning, 2017. 3
|
| 239 |
+
[40] Stephen Lombardi, Tomas Simon, Gabriel Schwartz, Michael Zollhoefer, Yaser Sheikh, and Jason Saragih. Mixture of volumetric primitives for efficient neural rendering. ACM Transactions on Graphics (TOG), 2021. 10
|
| 240 |
+
[41] Matthew Loper, Naureen Mahmood, Javier Romero, Gerard Pons-Moll, and Michael J. Black. SMPL: A skinned multi-person linear model. ACM Transasctions Graphics, 34(6), 2015. 2, 3
|
| 241 |
+
[42] Qianli Ma, Shunsuke Saito, Jinlong Yang, Siyu Tang, and Michael J. Black. SCALE: Modeling clothed humans with a surface codec of articulated local elements. In Proc. of CVPR, 2021. 2
|
| 242 |
+
[43] Qianli Ma, Jinlong Yang, Anurag Ranjan, Sergi Pujades, Gerard Pons-Moll, Siyu Tang, and Michael J. Black. Learning to dress 3D people in generative clothing. In Proc. of CVPR, 2020. 2, 6, 7
|
| 243 |
+
[44] Qianli Ma, Jinlong Yang, Siyu Tang, and Michael J. Black. The power of points for modeling humans in clothing. In Proc. of ICCV, 2021. 2
|
| 244 |
+
[45] Lars Mescheder, Michael Oechsle, Michael Niemeyer, Sebastian Nowozin, and Andreas Geiger. Occupancy networks: Learning 3d reconstruction in function space. In Proc. of CVPR, 2019. 1, 3, 7
|
| 245 |
+
[46] Mateusz Michalkiewicz, Jhony K. Pontes, Dominic Jack, Mahsa Baktashmotlagh, and Anders Eriksson. Implicit surface representations as layers in neural networks. In Proc. of ICCV, 2019. 1, 3
|
| 246 |
+
[47] Marko Mihajlovic, Silvan Weder, Marc Pollefeys, and Martin R Oswald. DeepSurfels: Learning online appearance fusion. In Proc. of CVPR, 2021. 10
|
| 247 |
+
[48] Marko Mihajlovic, Yan Zhang, Michael J. Black, and Siyu Tang. LEAP: Learning articulated occupancy of people. In Proc. of CVPR, 2021. 2, 3, 4, 6, 7, 9
|
| 248 |
+
[49] Alex Nichol, Joshua Achiam, and John Schulman. On first-order meta-learning algorithms, 2018. 2, 3, 5, 6
|
| 249 |
+
[50] Ahmed A. A. Osman, Timo Bolkart, and Michael J. Black. Star: Sparse trained articulated human body regressor. In Proc. of ECCV, 2020. 2, 3 3d deformable shapes. In Proc. of ICCV, 2021. 2
|
| 250 |
+
[52] Jeong Joon Park, Peter Florence, Julian Straub, Richard Newcombe, and Steven Lovegrove. Deepsdf: Learning continuous signed distance functions for shape representation. In Proc. of CVPR, 2019. 1, 3
|
| 251 |
+
[53] Chaitanya Patel, Zhouyingcheng Liao, and Gerard Pons-Moll. Tailornet: Predicting clothing in 3d as a function of human pose, shape and garment style. In Proc. of CVPR, 2020. 2
|
| 252 |
+
[54] Georgios Pavlakos, Vasileios Choutas, Nima Ghorbani, Timo Bolkart, Ahmed A. A. Osman, Dimitrios Tzionas, and Michael J. Black. Expressive body capture: 3d hands, face, and body from a single image. In Proc. of CVPR, 2019. 2, 3
|
| 253 |
+
[55] Songyou Peng, Chiyu "Max" Jiang, Yiyi Liao, Michael Niemeyer, Marc Pollefeys, and Andreas Geiger. Shape as points: A differentiable poisson solver. In Proc. of NeurIPS, 2021. 3
|
| 254 |
+
[56] Songyou Peng, Michael Niemeyer, Lars Mescheder, Marc Pollefeys, and Andreas Geiger. Convolutional occupancy networks. In Proc. of ECCV, 2020. 4
|
| 255 |
+
[57] Sida Peng, Yuanqing Zhang, Yinghao Xu, Qianqian Wang, Qing Shuai, Hujun Bao, and Xiaowei Zhou. Neural body: Implicit neural representations with structured latent codes for novel view synthesis of dynamic humans. In Proc. of CVPR, 2021. 3
|
| 256 |
+
[58] Juan-Manuel Perez-Rua, Xiatian Zhu, Timothy M. Hospedales, and Tao Xiang. Incremental few-shot object detection. In Proc. of CVPR, 2020. 3
|
| 257 |
+
[59] Amit Raj, Julian Tanke, James Hays, Minh Vo, Carsten Stoll, and Christoph Lassner. Anr-articulated neural rendering for virtual avatars. In Proc. of CVPR, 2021. 3
|
| 258 |
+
[60] Kate Rakelly, Evan Shelhamer, Trevor Darrell, Alexei A. Efros, and Sergey Levine. Few-shot segmentation propagation with guided networks. In Proc. of ICML, 2019. 3
|
| 259 |
+
[61] Sachin Ravi and Hugo Larochelle. Optimization as a model for fewshot learning. In Proc. of ICLR, 2017. 3
|
| 260 |
+
[62] Scott Reed, Yutian Chen, Thomas Paine, Aäron van den Oord, S. M. Ali Eslami, Danilo Rezende, Oriol Vinyals, and Nando de Freitas. Few-shot autoregressive density estimation: Towards learning to learn distributions. In Proc. of ICLR, 2018. 3
|
| 261 |
+
[63] Shunsuke Saito, , Zeng Huang, Ryota Natsume, Shigeo Morishima, Angjoo Kanazawa, and Hao Li. Pifu: Pixel-aligned implicit function for high-resolution clothed human digitization. In Proc. of ICCV, 2019. 1, 3
|
| 262 |
+
[64] Shunsuke Saito, Tomas Simon, Jason Saragih, and Hanbyul Joo. Pifuhd: Multi-level pixel-aligned implicit function for high-resolution 3d human digitization. In Proc. of CVPR, 2020. 1, 3
|
| 263 |
+
[65] Shunsuke Saito, Jinlong Yang, Qianli Ma, and Michael J. Black. SCANimate: Weakly supervised learning of skinned clothed avatar networks. In Proc. of CVPR, 2021. 2, 3, 4, 6, 7
|
| 264 |
+
[66] Amirreza Shaban, Shray Bansal, Zhen Liu, Irfan Essa, and Byron Boots. One-shot learning for semantic segmentation. In Proc. of BMVC, 2017. 3
|
| 265 |
+
[67] Vincent Sitzmann, Eric R. Chan, Richard Tucker, Noah Snavely, and Gordon Wetzstein. Metasdf: Metalearning signed distance functions. In Proc. of NeurIPS, 2020. 2, 3, 5
|
| 266 |
+
[68] Vincent Sitzmann, Julien N.P. Martel, Alexander W. Bergman, David B. Lindell, and Gordon Wetzstein. Implicit neural representations with periodic activation functions. In Proc. of NeurIPS, 2020. 5, 8
|
| 267 |
+
[69] Vincent Sitzmann, Michael Zollhöfer, and Gordon Wetzstein. Scene representation networks: Continuous 3d-structure-aware neural scene representations. In Proc. of NeurIPS, 2019. 4
|
| 268 |
+
[70] Jake Snell, Kevin Swersky, and Richard S. Zemel. Prototypical networks for few-shot learning. In Proc. of NeurIPS, 2017. 3
|
| 269 |
+
[71] Zhuo Su, Lan Xu, Zerong Zheng, Tao Yu, Yebin Liu, and Lu Fang. Robustfusion: Human volumetric capture with data-driven visual cues using a rgbd camera. In Proc. of ECCV, 2020.
|
| 270 |
+
[72] Matthew Tancik, Ben Mildenhall, Terrance Wang, Divi Schmidt, Pratul P. Srinivasan, Jonathan T. Barron, and Ren Ng. Learned initializations for optimizing coordinate-based neural representations. In Proc. of CVPR, 2021. 2, 3
|
| 271 |
+
[73] Garvita Tiwari, Nikolaos Sarafianos, Tony Tung, and Gerard Pons-Moll. Neural-GIF: Neural generalized implicit functions for animating people in clothing. In Proc. of ICCV, 2021. 2
|
| 272 |
+
[74] Kaixin Wang, Jun Hao Liew, Yingtian Zou, Daquan Zhou, and Jiashi Feng. Panet: Few-shot image semantic segmentation with prototype alignment. In Proc. of ICCV, 2019. 3
|
| 273 |
+
[75] Shaofei Wang, Andreas Geiger, and Siyu Tang. Locally aware piecewise transformation fields for 3d human mesh registration. In Conference on Computer Vision and Pattern Recognition (CVPR), 2021. 1, 10
|
| 274 |
+
[76] Ting-Chun Wang, Ming-Yu Liu, Andrew Tao, Guilin Liu, Jan Kautz, and Bryan Catanzaro. Few-shot video-to-video synthesis. In Proc. of NeurIPS, 2019. 3
|
| 275 |
+
[77] Hongyi Xu, Eduard Gabriel Bazavan, Andrei Zanfir, William T. Freeman, Rahul Sukthankar, and Cristian Sminchisescu. Ghum & ghuml: Generative 3d human shape and articulated pose models. In Proc. of CVPR, 2020. 2, 3
|
| 276 |
+
[78] Lan Xu, Zhuo Su, Lei Han, Tao Yu, Yebin Liu, and Lu Fang. Unstructuredfusion: Real-time 4d geometry and texture reconstruction using commercial rgbd cameras. IEEE Transactions on Pattern Analysis and Machine Intelligence, 42, 2020. 1
|
| 277 |
+
[79] Jinlong Yang, Jean-Sébastien Franco, Franck Hétroy-Wheeler, and Stefanie Wuhrer. Analyzing clothing layer deformation statistics of 3d human motions. In Proc. of ECCV, 2018. 2
|
| 278 |
+
[80] Tao Yu, Zerong Zheng, Kaiwen Guo, Jianhui Zhao, Qionghai Dai, Hao Li, Gerard Pons-Moll, and Yebin Liu. Doublefusion: Real-time capture of human performances with inner body shapes from a single depth sensor. In Proc. of CVPR, 2018. 1
|
| 279 |
+
[81] Ilya Zakharkin, Kirill Mazur, Artur Grigorev, and Victor Lempitsky. Point-based modeling of human clothing. In Proc. of ICCV, 2021. 2
|
| 280 |
+
[82] Egor Zakharov, Aliaksandra Shysheya, Egor Burkov, and Victor Lempitsky. Few-shot adversarial learning of realistic neural talking head models. In Proc. of ICCV, 2019. 3
|
| 281 |
+
[83] Chao Zhang, Sergi Pujades, Michael J. Black, and Gerard Pons-Moll. Detailed, accurate, human shape estimation from clothed 3d scan sequences. In Proc. of CVPR, 2017. 2
|
| 282 |
+
[84] Siwei Zhang, Yan Zhang, Federica Bogo, Pollefeys Marc, and Siyu Tang. Learning motion priors for 4d human body capture in 3d scenes. In Proc. of ICCV, 2021. 10
|
| 283 |
+
[85] Yan Zhang, Michael J. Black, and Siyu Tang. We are more than our joints: Predicting how 3D bodies move. In Proc. of CVPR, 2021. 10
|
| 284 |
+
[86] Dominic Zhao, Johannes von Oswald, Seijin Kobayashi, João Sacramento, and Benjamin F. Grewe. Metalearning via hypernetworks. In 4th Workshop on Meta-Learning at NeurIPS 2020, Vancouver, Canada, 2020. 3
|
| 285 |
+
[87] Z. Zheng, T. Yu, Y. Liu, and Q. Dai. Pamir: Parametric model-conditioned implicit representation for image-based human reconstruction. IEEE Transactions on Pattern Analysis and Machine Intelligence, pages 1–1, 2021. 3
|
md/train/S1_pAu9xl/S1_pAu9xl.md
ADDED
|
@@ -0,0 +1,263 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# TRAINED TERNARY QUANTIZATION
|
| 2 |
+
|
| 3 |
+
Chenzhuo Zhu∗
|
| 4 |
+
Tsinghua University
|
| 5 |
+
zhucz13@mails.tsinghua.edu.cn
|
| 6 |
+
|
| 7 |
+
Song Han Stanford University songhan@stanford.edu
|
| 8 |
+
|
| 9 |
+
Huizi Mao Stanford University huizi@stanford.edu
|
| 10 |
+
|
| 11 |
+
William J. Dally Stanford University NVIDIA dally@stanford.edu
|
| 12 |
+
|
| 13 |
+
# ABSTRACT
|
| 14 |
+
|
| 15 |
+
Deep neural networks are widely used in machine learning applications. However, the deployment of large neural networks models can be difficult to deploy on mobile devices with limited power budgets. To solve this problem, we propose Trained Ternary Quantization (TTQ), a method that can reduce the precision of weights in neural networks to ternary values. This method has very little accuracy degradation and can even improve the accuracy of some models (32, 44, 56-layer ResNet) on CIFAR-10 and AlexNet on ImageNet. And our AlexNet model is trained from scratch, which means it’s as easy as to train normal full precision model. We highlight our trained quantization method that can learn both ternary values and ternary assignment. During inference, only ternary values (2-bit weights) and scaling factors are needed, therefore our models are nearly $1 6 \times$ smaller than fullprecision models. Our ternary models can also be viewed as sparse binary weight networks, which can potentially be accelerated with custom circuit. Experiments on CIFAR-10 show that the ternary models obtained by trained quantization method outperform full-precision models of ResNet-32,44,56 by $0 . 0 4 \%$ , $0 . 1 6 \%$ , $0 . 3 6 \%$ , respectively. On ImageNet, our model outperforms full-precision AlexNet model by $0 . 3 \%$ of Top-1 accuracy and outperforms previous ternary models by $3 \%$ .
|
| 16 |
+
|
| 17 |
+
# 1 INTRODUCTION
|
| 18 |
+
|
| 19 |
+
Deep neural networks are becoming the preferred approach for many machine learning applications. However, as networks get deeper, deploying a network with a large number of parameters on a small device becomes increasingly difficult. Much work has been done to reduce the size of networks. Halfprecision networks (Amodei et al., 2015) cut sizes of neural networks in half. XNOR-Net (Rastegari et al., 2016), DoReFa-Net (Zhou et al., 2016) and network binarization (Courbariaux et al.; 2015; Lin et al., 2015) use aggressively quantized weights, activations and gradients to further reduce computation during training. While weight binarization benefits from $3 2 \times$ smaller model size, the extreme compression rate comes with a loss of accuracy. Hubara et al. (2016) and Li & Liu (2016) propose ternary weight networks to trade off between model size and accuracy.
|
| 20 |
+
|
| 21 |
+
In this paper, we propose Trained Ternary Quantization which uses two full-precision scaling coefficients $\boldsymbol { W } _ { l } ^ { p }$ , $W _ { l } ^ { n }$ for each layer $l$ , and quantize the weights to $\{ - W _ { l } ^ { n } , 0 , \bar { + } W _ { l } ^ { p } \}$ instead of traditional $\{ - 1 , 0 , + 1 \}$ or $\{ \mathrm { - } \mathrm { E } , 0 , + \mathrm { E } \}$ where E is the mean of the absolute weight value, which is not learned. Our positive and negative weights have different absolute values $\bar { W } _ { l } ^ { p }$ and $W _ { l } ^ { n }$ that are trainable parameters. We also maintain latent full-precision weights at training time, and discard them at test time. We back propagate the gradient to both $W _ { l } ^ { p }$ , $W _ { l } ^ { n }$ and to the latent full-precision weights. This makes it possible to adjust the ternary assignment (i.e. which of the three values a weight is assigned).
|
| 22 |
+
|
| 23 |
+
Our quantization method, achieves higher accuracy on the CIFAR-10 and ImageNet datasets. For AlexNet on ImageNet dataset, our method outperforms previously state-of-art ternary network(Li &
|
| 24 |
+
|
| 25 |
+
Liu, 2016) by $3 . 0 \%$ of Top-1 accuracy and the full-precision model by $1 . 6 \%$ . By converting most of the parameters to 2-bit values, we also compress the network by about 16x. Moreover, the advantage of few multiplications still remains, because $W _ { l } ^ { p }$ and $W _ { l } ^ { n }$ are fixed for each layer during inference. On custom hardware, multiplications can be pre-computed on activations, so only two multiplications per activation are required.
|
| 26 |
+
|
| 27 |
+
# 2 MOTIVATIONS
|
| 28 |
+
|
| 29 |
+
The potential of deep neural networks, once deployed to mobile devices, has the advantage of lower latency, no reliance on the network, and better user privacy. However, energy efficiency becomes the bottleneck for deploying deep neural networks on mobile devices because mobile devices are battery constrained. Current deep neural network models consist of hundreds of millions of parameters. Reducing the size of a DNN model makes the deployment on edge devices easier.
|
| 30 |
+
|
| 31 |
+
First, a smaller model means less overhead when exporting models to clients. Take autonomous driving for example; Tesla periodically copies new models from their servers to customers’ cars. Smaller models require less communication in such over-the-air updates, making frequent updates more feasible. Another example is on Apple Store; apps above $1 0 0 { \bf M B }$ will not download until you connect to Wi-Fi. It’s infeasible to put a large DNN model in an app. The second issue is energy consumption. Deep learning is energy consuming, which is problematic for battery-constrained mobile devices. As a result, iOS 10 requires iPhone to be plugged with charger while performing photo analysis. Fetching DNN models from memory takes more than two orders of magnitude more energy than arithmetic operations. Smaller neural networks require less memory bandwidth to fetch the model, saving the energy and extending battery life. The third issue is area cost. When deploying DNNs on Application-Specific Integrated Circuits (ASICs), a sufficiently small model can be stored directly on-chip, and smaller models enable a smaller ASIC die.
|
| 32 |
+
|
| 33 |
+
Several previous works aimed to improve energy and spatial efficiency of deep networks. One common strategy proven useful is to quantize 32-bit weights to one or two bits, which greatly reduces model size and saves memory reference. However, experimental results show that compressed weights usually come with degraded performance, which is a great loss for some performancesensitive applications. The contradiction between compression and performance motivates us to work on trained ternary quantization, minimizing performance degradation of deep neural networks while saving as much energy and space as possible.
|
| 34 |
+
|
| 35 |
+
# 3 RELATED WORK
|
| 36 |
+
|
| 37 |
+
# 3.1 BINARY NEURAL NETWORK (BNN)
|
| 38 |
+
|
| 39 |
+
Lin et al. (2015) proposed binary and ternary connections to compress neural networks and speed up computation during inference. They used similar probabilistic methods to convert 32-bit weights into binary values or ternary values, defined as:
|
| 40 |
+
|
| 41 |
+
$$
|
| 42 |
+
\begin{array} { r } { w ^ { b } \sim \mathrm { B e r n o u l l i } ( \frac { \tilde { w } + 1 } { 2 } ) \times 2 - 1 } \\ { w ^ { t } \sim \mathrm { B e r n o u l l i } ( | \tilde { w } | ) \times \mathrm { s i g n } ( \tilde { w } ) } \end{array}
|
| 43 |
+
$$
|
| 44 |
+
|
| 45 |
+
Here $w ^ { b }$ and $w ^ { t }$ denote binary and ternary weights after quantization. $\tilde { w }$ denotes the latent full precision weight.
|
| 46 |
+
|
| 47 |
+
During back-propagation, as the above quantization equations are not differentiable, derivatives of expectations of the Bernoulli distribution are computed instead, yielding the identity function:
|
| 48 |
+
|
| 49 |
+
$$
|
| 50 |
+
\frac { \partial L } { \partial \tilde { w } } = \frac { \partial L } { \partial w ^ { b } } = \frac { \partial L } { \partial w ^ { t } }
|
| 51 |
+
$$
|
| 52 |
+
|
| 53 |
+
Here $L$ is the loss to optimize.
|
| 54 |
+
|
| 55 |
+
For BNN with binary connections, only quantized binary values are needed for inference. Therefore a $3 2 \times$ smaller model can be deployed into applications.
|
| 56 |
+
|
| 57 |
+
# 3.2 DOREFA-NET
|
| 58 |
+
|
| 59 |
+
Zhou et al. (2016) proposed DoReFa-Net which quantizes weights, activations and gradients of neural networks using different widths of bits. Therefore with specifically designed low-bit multiplication algorithm or hardware, both training and inference stages can be accelerated.
|
| 60 |
+
|
| 61 |
+
They also introduced a much simpler method to quantize 32-bit weights to binary values, defined as:
|
| 62 |
+
|
| 63 |
+
$$
|
| 64 |
+
w ^ { b } = { \cal E } ( | \tilde { w } | ) \times \mathrm { s i g n } ( \tilde { w } )
|
| 65 |
+
$$
|
| 66 |
+
|
| 67 |
+
Here $E ( | \tilde { w } | )$ calculates the mean of absolute values of full precision weights $\tilde { w }$ as layer-wise scaling factors. During back-propagation, Equation 2 still applies.
|
| 68 |
+
|
| 69 |
+
# 3.3 TERNARY WEIGHT NETWORKS
|
| 70 |
+
|
| 71 |
+
Li $\&$ Liu (2016) proposed TWN (Ternary weight networks), which reduce accuracy loss of binary networks by introducing zero as a third quantized value. They use two symmetric thresholds $\pm \Delta _ { l }$ and a scaling factor $W _ { l }$ for each layer $l$ to quantize weighs into $\{ - W _ { l } , 0 , + W _ { l } \}$ :
|
| 72 |
+
|
| 73 |
+
$$
|
| 74 |
+
w _ { l } ^ { t } = \left\{ \begin{array} { c } { W _ { l } : \tilde { w } _ { l } > \Delta _ { l } } \\ { 0 : | \tilde { w } _ { l } | \leq \Delta _ { l } } \\ { - W _ { l } : \tilde { w } _ { l } < - \Delta _ { l } } \end{array} \right.
|
| 75 |
+
$$
|
| 76 |
+
|
| 77 |
+
They then solve an optimization problem of minimizing L2 distance between full precision and ternary weights to obtain layer-wise values of $W _ { l }$ and $\Delta _ { l }$ :
|
| 78 |
+
|
| 79 |
+
$$
|
| 80 |
+
\begin{array} { r l } & { \Delta _ { l } = 0 . 7 \times E ( | \tilde { w } _ { l } | ) } \\ & { W _ { l } = \pmb { { E } } } \\ & { \qquad i \in \{ i | \tilde { w } _ { l } ( i ) | > \Delta \} } \end{array} ( | \tilde { w } _ { l } ( i ) | )
|
| 81 |
+
$$
|
| 82 |
+
|
| 83 |
+
And again Equation 2 is used to calculate gradients. While an additional bit is required for ternary weights, TWN achieves a validation accuracy that is very close to full precision networks according to their paper.
|
| 84 |
+
|
| 85 |
+
# 3.4 DEEP COMPRESSION
|
| 86 |
+
|
| 87 |
+
Han et al. (2015) proposed deep compression to prune away trivial connections and reduce precision of weights. Unlike above models using zero or symmetric thresholds to quantize high precision weights, Deep Compression used clusters to categorize weights into groups. In Deep Compression, low precision weights are fine-tuned from a pre-trained full precision network, and the assignment of each weight is established at the beginning and stay unchanged, while representative value of each cluster is updated throughout fine-tuning.
|
| 88 |
+
|
| 89 |
+
# 4 METHOD
|
| 90 |
+
|
| 91 |
+
Our method is illustrated in Figure 1. First, we normalize the full-precision weights to the range $[ - 1 , + 1 ]$ by dividing each weight by the maximum weight. Next, we quantize the intermediate full-resolution weights to $\{ - 1 , 0 , + 1 \}$ by thresholding. The threshold factor $t$ is a hyper-parameter that is the same across all the layers in order to reduce the search space. Finally, we perform trained quantization by back propagating two gradients, as shown in the dashed lines in Figure 1. We back-propagate gradien $\ ! t _ { 1 }$ to the full-resolution weights and gradient $^ { \mathrm { i } } 2$ to the scaling coefficients. The former enables learning the ternary assignments, and the latter enables learning the ternary values.
|
| 92 |
+
|
| 93 |
+
At inference time, we throw away the full-resolution weights and only use ternary weights.
|
| 94 |
+
|
| 95 |
+
# 4.1 LEARNING BOTH TERNARY VALUES AND TERNARY ASSIGNMENTS
|
| 96 |
+
|
| 97 |
+
During gradient descent we learn both the quantized ternary weights (the codebook), and choose which of these values is assigned to each weight (choosing the codebook index).
|
| 98 |
+
|
| 99 |
+

|
| 100 |
+
Figure 1: Overview of the trained ternary quantization procedure.
|
| 101 |
+
|
| 102 |
+
To learn the ternary value (codebook), we introduce two quantization factors $\mathbf { } W _ { l } ^ { p }$ and $W _ { l } ^ { n }$ for positive and negative weights in each layer $l$ . During feed-forward, quantized ternary weights $w _ { l } ^ { t }$ are calculated as:
|
| 103 |
+
|
| 104 |
+
$$
|
| 105 |
+
w _ { l } ^ { t } = \left\{ \begin{array} { c } { W _ { l } ^ { p } : \tilde { w } _ { l } > \Delta _ { l } } \\ { 0 : | \tilde { w } _ { l } | \leq \Delta _ { l } } \\ { - W _ { l } ^ { n } : \tilde { w } _ { l } < - \Delta _ { l } } \end{array} \right.
|
| 106 |
+
$$
|
| 107 |
+
|
| 108 |
+
Unlike previous work where quantized weights are calculated from 32-bit weights, the scaling coefficients $\mathbf { } W _ { l } ^ { p }$ and $W _ { l } ^ { n }$ are two independent parameters and are trained together with other parameters. Following the rule of gradient descent, derivatives of $W _ { l } ^ { p }$ and $W _ { l } ^ { n }$ are calculated as:
|
| 109 |
+
|
| 110 |
+
$$
|
| 111 |
+
\frac { \partial L } { \partial W _ { l } ^ { p } } = \sum _ { i \in I _ { l } ^ { p } } \frac { \partial L } { \partial w _ { l } ^ { t } ( i ) } , \frac { \partial L } { \partial W _ { l } ^ { n } } = \sum _ { i \in I _ { l } ^ { n } } \frac { \partial L } { \partial w _ { l } ^ { t } ( i ) }
|
| 112 |
+
$$
|
| 113 |
+
|
| 114 |
+
Here $I _ { l } ^ { p } = \{ i | \tilde { w } _ { l } ( i ) > \Delta _ { l } \}$ and $I _ { l } ^ { n } = \{ i | ( i ) \tilde { w } _ { l } < - \Delta _ { l } \}$ . Furthermore, because of the existence of two scaling factors, gradients of latent full precision weights can no longer be calculated by Equation 2. We use scaled gradients for 32-bit weights:
|
| 115 |
+
|
| 116 |
+
$$
|
| 117 |
+
\frac { \partial L } { \partial \tilde { w } _ { l } } = \left\{ \begin{array} { l l } { \displaystyle W _ { l } ^ { p } \times \frac { \partial L } { \partial w _ { l } ^ { t } } : \tilde { w } _ { l } > \Delta _ { l } } \\ { \displaystyle 1 \times \frac { \partial L } { \partial w _ { l } ^ { t } } : | \tilde { w } _ { l } | \leq \Delta _ { l } } \\ { \displaystyle W _ { l } ^ { n } \times \frac { \partial L } { \partial w _ { l } ^ { t } } : \tilde { w } _ { l } < - \Delta _ { l } } \end{array} \right.
|
| 118 |
+
$$
|
| 119 |
+
|
| 120 |
+
Note we use scalar number 1 as factor of gradients of zero weights. The overall quantization process is illustrated as Figure 1. The evolution of the ternary weights from different layers during training is shown in Figure 2. We observe that as training proceeds, different layers behave differently: for the first quantized conv layer, the absolute values of $W _ { l } ^ { p }$ and $W _ { l } ^ { n }$ get smaller and sparsity gets lower, while for the last conv layer and fully connected layer, the absolute values of $\boldsymbol { W } _ { l } ^ { p }$ and $W _ { l } ^ { n }$ get larger and sparsity gets higher.
|
| 121 |
+
|
| 122 |
+
We learn the ternary assignments (index to the codebook) by updating the latent full-resolution weights during training. This may cause the assignments to change between iterations. Note that the thresholds are not constants as the maximal absolute values change over time. Once an updated weight crosses the threshold, the ternary assignment is changed.
|
| 123 |
+
|
| 124 |
+
The benefits of using trained quantization factors are: i) The asymmetry of $W _ { l } ^ { p } \neq W _ { l } ^ { n }$ enables neural networks to have more model capacity. ii) Quantized weights play the role of "learning rate multipliers" during back propagation.
|
| 125 |
+
|
| 126 |
+
# 4.2 QUANTIZATION HEURISTIC
|
| 127 |
+
|
| 128 |
+
In previous work on ternary weight networks, Li & Liu (2016) proposed Ternary Weight Networks (TWN) using $\pm \Delta _ { l }$ as thresholds to reduce 32-bit weights to ternary values, where $\pm \Delta _ { l }$ is defined as Equation 5. They optimized value of $\pm \Delta _ { l }$ by minimizing expectation of L2 distance between full precision weights and ternary weights. Instead of using a strictly optimized threshold, we adopt different heuristics: 1) use the maximum absolute value of the weights as a reference to the layer’s threshold and maintain a constant factor $t$ for all layers:
|
| 129 |
+
|
| 130 |
+

|
| 131 |
+
Figure 2: Ternary weights value (above) and distribution (below) with iterations for different layers of ResNet-20 on CIFAR-10.
|
| 132 |
+
|
| 133 |
+
$$
|
| 134 |
+
\Delta _ { l } = t \times \operatorname* { m a x } ( | \tilde { w } | )
|
| 135 |
+
$$
|
| 136 |
+
|
| 137 |
+
and 2) maintain a constant sparsity $r$ for all layers throughout training. By adjusting the hyperparameter $r$ we are able to obtain ternary weight networks with various sparsities. We use the first method and set $t$ to 0.05 in experiments on CIFAR-10 and ImageNet dataset and use the second one to explore a wider range of sparsities in section 5.1.1.178 0.0813999995589256
|
| 138 |
+
|
| 139 |
+
We perform our experiments on CIFAR-10 (Krizhevsky & Hinton, 2009) and ImageNet (Russakovsky179 0.08060000091791150.110799998044968 0.086499996483326 et al., 2015). Our network is implemented on both TensorFlow (Abadi & et. al o, 2015) and Caffe (Jia et al., 2014) frameworks.
|
| 140 |
+
|
| 141 |
+
# 4.3 CIFAR-10
|
| 142 |
+
|
| 143 |
+
# 5 EXPERIMENTS
|
| 144 |
+
|
| 145 |
+
CIFAR-10 is an image classification benchmark containing images of size $3 2 \times 3 2 \mathrm { R G B }$ pixels in a training set of 50000 and a test set of 10000. ResNet (He et al., 2015) structure is used for our experiments.
|
| 146 |
+
|
| 147 |
+
We use parameters pre-trained from a full precision ResNet to initialize our model. Learning rate is set to 0.1 at beginning and scaled by 0.1 at epoch 80, 120 and 300. A L2-normalized weight decay of 0.0002 is used as regularizer. Most of our models converge after 160 epochs. We take a moving average on errors of all epochs to filter off fluctuations when reporting error rate.
|
| 148 |
+
|
| 149 |
+

|
| 150 |
+
Figure 3: ResNet-20 on CIFAR-10 with different weight precision.
|
| 151 |
+
|
| 152 |
+
We compare our model with the full-precision model and a binary-weight model. We train a a full precision ResNet (He et al., 2016) on CIFAR-10 as the baseline (blue line in Figure 3). We fine-tune the trained baseline network as a 1-32-32 DoReFa-Net where weights are 1 bit and both activations and gradients are 32 bits giving a significant loss of accuracy (green line) . Finally, we fine-tuning the baseline with trained ternary weights (red line). Our model has substantial accuracy improvement over the binary weight model, and our loss of accuracy over the full precision model is small. We also compare our model to Tenary Weight Network (TWN) on ResNet-20. Result shows our model improves the accuracy by $\sim 0 . 2 5 \%$ on CIFAR-10.
|
| 153 |
+
|
| 154 |
+
We expand our experiments to ternarize ResNet with 32, 44 and 56 layers. All ternary models are fine-tuned from full precision models. Our results show that we improve the accuracy of ResNet-32, ResNet-44 and ResNet-56 by $0 . 0 4 \%$ , $0 . 1 6 \%$ and $0 . 3 6 \%$ . The deeper the model, the larger the improvement. We conjecture that this is due to ternary weights providing the right model capacity and preventing overfitting for deeper networks.
|
| 155 |
+
|
| 156 |
+
Table 1: Error rates of full-precision and ternary ResNets on Cifar-10
|
| 157 |
+
|
| 158 |
+
<table><tr><td>Model</td><td>Full resolution</td><td>Ternary (Ours)</td><td>Improvement</td></tr><tr><td>ResNet-20</td><td>8.23</td><td>8.87</td><td>-0.64</td></tr><tr><td>ResNet-32</td><td>7.67</td><td>7.63</td><td>0.04</td></tr><tr><td>ResNet-44</td><td>7.18</td><td>7.02</td><td>0.16</td></tr><tr><td>ResNet-56</td><td>6.80</td><td>6.44</td><td>0.36</td></tr></table>
|
| 159 |
+
|
| 160 |
+
# 5.1 IMAGENET
|
| 161 |
+
|
| 162 |
+
We further train and evaluate our model on ILSVRC12(Russakovsky et al. (2015)). ILSVRC12 is a 1000-category dataset with over 1.2 million images in training set and 50 thousand images in validation set. Images from ILSVRC12 also have various resolutions. We used a variant of AlexNet(Krizhevsky et al. (2012)) structure by removing dropout layers and add batch normalization(Ioffe & Szegedy, 2015) for all models in our experiments. The same variant is also used in experiments described in the paper of DoReFa-Net.
|
| 163 |
+
|
| 164 |
+
Our ternary model of AlexNet uses full precision weights for the first convolution layer and the last fully-connected layer. Other layer parameters are all quantized to ternary values. We train our model on ImageNet from scratch using an Adam optimizer (Kingma & Ba (2014)). Minibatch size is set to 128. Learning rate starts at $1 0 ^ { - 4 }$ and is scaled by 0.2 at epoch 56 and 64. A L2-normalized weight decay of $5 \times 1 0 ^ { - 6 }$ is used as a regularizer. Images are first resized to $2 5 6 \times 2 5 6$ then randomly cropped to $2 2 4 \times 2 2 4$ before input. We report both top 1 and top 5 error rate on validation set.
|
| 165 |
+
|
| 166 |
+
We compare our model to a full precision baseline, 1-32-32 DoReFa-Net and TWN. After around 64 epochs, validation error of our model dropped significantly compared to other low-bit networks as well as the full precision baseline. Finally our model reaches top 1 error rate of $4 2 . 5 \%$ , while DoReFa-Net gets $4 6 . 1 \%$ and TWN gets $4 5 . 5 \%$ . Furthermore, our model still outperforms full precision AlexNet (the batch normalization version, $4 4 . 1 \%$ according to paper of DoReFa-Net) by $1 . 6 \%$ , and is even better than the best AlexNet results reported $( 4 2 . 8 \bar { \% } ^ { 1 } )$ . The complete results are listed in Table 2.
|
| 167 |
+
|
| 168 |
+
Table 2: Top1 and Top5 error rate of AlexNet on ImageNet
|
| 169 |
+
|
| 170 |
+
<table><tr><td>Error</td><td>Full precision</td><td>1-bit (DoReFa)</td><td>2-bit (TWN)</td><td>2-bit (Ours)</td></tr><tr><td>Top1</td><td>42.8%</td><td>46.1%</td><td>45.5%</td><td>42.5%</td></tr><tr><td>Top5</td><td>19.7%</td><td>23.7%</td><td>23.2%</td><td>20.3%</td></tr></table>
|
| 171 |
+
|
| 172 |
+

|
| 173 |
+
Figure 4: Training and validation accuracy of AlexNet on ImageNet
|
| 174 |
+
|
| 175 |
+
We draw the process of training in Figure 4, the baseline results of AlexNet are marked with dashed lines. Our ternary model effectively reduces the gap between training and validation performance, which appears to be quite great for DoReFa-Net and TWN. This indicates that adopting trainable $\boldsymbol { W } _ { l } ^ { p }$ and $W _ { l } ^ { n }$ helps prevent models from overfitting to the training set.
|
| 176 |
+
|
| 177 |
+
We also report the results of our methods on ResNet-18B in Table 3. The full-precision error rates are obtained from Facebook’s implementation. Here we cite Binarized Weight Network(BWN)Rastegari et al. (2016) results with all layers quantized and TWN finetuned based on a full precision network, while we train our TTQ model from scratch. Compared with BWN and TWN, our method obtains a substantial improvement.
|
| 178 |
+
|
| 179 |
+
Table 3: Top1 and Top5 error rate of ResNet-18 on ImageNet
|
| 180 |
+
|
| 181 |
+
<table><tr><td>Error</td><td>Full precision</td><td>1-bit (BWN)</td><td>2-bit (TWN)</td><td>2-bit (Ours)</td></tr><tr><td>Top1 Top5</td><td>30.4% 10.8%</td><td>39.2% 17.0%</td><td>34.7% 13.8%</td><td>33.4% 12.8%</td></tr></table>
|
| 182 |
+
|
| 183 |
+
# 6 DISCUSSION
|
| 184 |
+
|
| 185 |
+
In this section we analyze performance of our model with regard to weight compression and inference speeding up. These two goals are achieved through reducing bit precision and introducing sparsity. We also visualize convolution kernels in quantized convolution layers to find that basic patterns of edge/corner detectors are also well learned from scratch even precision is low.
|
| 186 |
+
|
| 187 |
+
# 6.1 SPATIAL AND ENERGY EFFICIENCY
|
| 188 |
+
|
| 189 |
+
We save storage for models by $1 6 \times$ by using ternary weights. Although switching from a binaryweight network to a ternary-weight network increases bits per weight, it brings sparsity to the weights, which gives potential to skip the computation on zero weights and achieve higher energy efficiency.
|
| 190 |
+
|
| 191 |
+
# 6.1.1 TRADE-OFF BETWEEN SPARSITY AND ACCURACY
|
| 192 |
+
|
| 193 |
+
Figure 5 shows the relationship between sparsity and accuracy. As the sparsity of weights grows from 0 (a pure binary-weight network) to 0.5 (a ternary network with $50 \%$ zeros), both the training and validation error decrease. Increasing sparsity beyond $50 \%$ reduces the model capacity too far, 1increasing error. Minimum error occurs with sparsity between $30 \%$ and $50 \%$ .
|
| 194 |
+
|
| 195 |
+
We introduce only one hyper-parameter to reduce search space. This hyper-parameter can be either sparsity, or the threshold $t$ w.r.t the max value in Equation 6. We find that using threshold produces better results. This is because fixing the threshold allows the sparsity of each layer to vary (Figure reffig:weights).
|
| 196 |
+
|
| 197 |
+

|
| 198 |
+
Figure 5: Accuracy v.s. Sparsity on ResNet-20
|
| 199 |
+
|
| 200 |
+
# 6.1.2 SPARSITY AND EFFICIENCY OF ALEXNET
|
| 201 |
+
|
| 202 |
+
We further analyze parameters from our AlexNet model. We calculate layer-wise density (complement of sparsity) as shown in Table 4. Despite we use different $\boldsymbol { W } _ { l } ^ { p }$ and $W _ { l } ^ { n }$ for each layer, ternary weights can be pre-computed when fetched from memory, thus multiplications during convolution and inner product process are still saved. Compared to Deep Compression, we accelerate inference speed using ternary values and more importantly, we reduce energy consumption of inference by saving memory references and multiplications, while achieving higher accuracy.
|
| 203 |
+
|
| 204 |
+
We notice that without all quantized layers sharing the same $t$ for Equation 9, our model achieves considerable sparsity in convolution layers where the majority of computations takes place. Therefore we are able to squeeze forward time to less than $30 \%$ of full precision networks.
|
| 205 |
+
|
| 206 |
+
As for spatial compression, by substituting 32-bit weights with 2-bit ternary weights, our model is approximately $1 6 \times$ smaller than original 32-bit AlexNet.
|
| 207 |
+
|
| 208 |
+
# 6.2 KERNEL VISUALIZATION
|
| 209 |
+
|
| 210 |
+
We visualize quantized convolution kernels in Figure 6. The left matrix is kernels from the second convolution layer $( 5 \times 5 )$ and the right one is from the third $\left( 3 \times 3 \right)$ . We pick first 10 input channels and first 10 output channels to display for each layer. Grey, black and white color represent zero, negative and positive weights respectively.
|
| 211 |
+
|
| 212 |
+
We observe similar filter patterns as full precision AlexNet. Edge and corner detectors of various directions can be found among listed kernels. While these patterns are important for convolution neural networks, the precision of each weight is not. Ternary value filters are capable enough extracting key features after a full precision first convolution layer while saving unnecessary storage.
|
| 213 |
+
|
| 214 |
+
Furthermore, we find that there are a number of empty filters (all zeros) or filters with single non-zero value in convolution layers. More aggressive pruning can be applied to prune away these redundant kernels to further compress and speed up our model.
|
| 215 |
+
|
| 216 |
+
Table 4: Alexnet layer-wise sparsity
|
| 217 |
+
|
| 218 |
+
<table><tr><td rowspan=1 colspan=2>Layer</td><td rowspan=1 colspan=1>Full precisionDensity Width</td><td rowspan=1 colspan=1>Pruning (NIPS'15)Density Width</td><td rowspan=1 colspan=1>OursDensity Width</td></tr><tr><td rowspan=1 colspan=2>conv1</td><td rowspan=1 colspan=1>100% 32 bit</td><td rowspan=1 colspan=1>84% 8bit</td><td rowspan=1 colspan=1>100% 32 bit</td></tr><tr><td rowspan=2 colspan=2>conv2conv3</td><td rowspan=1 colspan=1>100% 32 bit</td><td rowspan=1 colspan=1>38% 8bit</td><td rowspan=1 colspan=1>23% 2bit</td></tr><tr><td rowspan=4 colspan=2>conv3conv4conv5</td><td rowspan=1 colspan=1>100% 32 bit</td><td rowspan=1 colspan=1>35% 8bit</td><td rowspan=1 colspan=1>24% 2 bit</td></tr><tr><td rowspan=2 colspan=1>4</td><td></td><td></td><td></td></tr><tr><td rowspan=1 colspan=1>100% 32 bit</td><td rowspan=1 colspan=1>37% 8bit</td><td rowspan=1 colspan=1>40% 2bit</td></tr><tr><td rowspan=1 colspan=1>100% 32 bit</td><td rowspan=1 colspan=1>37% 8bit</td><td rowspan=1 colspan=1>43% 2bit</td></tr><tr><td rowspan=1 colspan=2>conv total</td><td rowspan=1 colspan=1>100% -</td><td rowspan=1 colspan=1>37% 1</td><td rowspan=1 colspan=1>33% 1</td></tr><tr><td rowspan=2 colspan=2>fc1fc2fc3</td><td rowspan=1 colspan=1>100% 32bit100% 32 bit</td><td rowspan=1 colspan=1>9% 5bit9% 5bit</td><td rowspan=2 colspan=1>30% 2 bit36% 2bit100% 32 bit</td></tr><tr><td rowspan=1 colspan=1>100% 32 bit</td><td rowspan=1 colspan=1>25% 5bit</td></tr><tr><td rowspan=1 colspan=2>fc total</td><td rowspan=1 colspan=1>100% -</td><td rowspan=1 colspan=1>10% -</td><td rowspan=1 colspan=1>37% -</td></tr><tr><td rowspan=1 colspan=2>All total</td><td rowspan=1 colspan=1>100% -</td><td rowspan=1 colspan=1>11% -</td><td rowspan=1 colspan=1>37% -</td></tr></table>
|
| 219 |
+
|
| 220 |
+

|
| 221 |
+
Figure 6: Visualization of kernels from Ternary AlexNet trained from Imagenet.
|
| 222 |
+
|
| 223 |
+
# 7 CONCLUSION
|
| 224 |
+
|
| 225 |
+
We introduce a novel neural network quantization method that compresses network weights to ternary values. We introduce two trained scaling coefficients $W _ { p } ^ { l }$ and $\hat W _ { n } ^ { l }$ for each layer and train these coefficients using back-propagation. During training, the gradients are back-propagated both to the latent full-resolution weights and to the scaling coefficients. We use layer-wise thresholds that are proportional to the maximum absolute values to quantize the weights. When deploying the ternary network, only the ternary weights and scaling coefficients are needed, which reducing parameter size by at least $1 6 \times$ . Experiments show that our model reaches or even surpasses the accuracy of full precision models on both CIFAR-10 and ImageNet dataset. On ImageNet we exceed the accuracy of prior ternary networks (TWN) by $3 \%$ .
|
| 226 |
+
|
| 227 |
+
# REFERENCES
|
| 228 |
+
|
| 229 |
+
Martín Abadi and et. al o. TensorFlow: Large-scale machine learning on heterogeneous systems, 2015. URL http://tensorflow.org/. Software available from tensorflow.org.
|
| 230 |
+
|
| 231 |
+
Dario Amodei, Rishita Anubhai, Eric Battenberg, Carl Case, Jared Casper, Bryan Catanzaro, Jingdong Chen, Mike Chrzanowski, Adam Coates, Greg Diamos, et al. Deep speech 2: End-to-end speech recognition in english and mandarin. arXiv preprint arXiv:1512.02595, 2015.
|
| 232 |
+
|
| 233 |
+
Matthieu Courbariaux, Itay Hubara, COM Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. Binarized neural networks: Training neural networks with weights and activations constrained $^ \mathrm { t o + 1 }$ or-.
|
| 234 |
+
|
| 235 |
+
Matthieu Courbariaux, Yoshua Bengio, and Jean-Pierre David. Binaryconnect: Training deep neural networks with binary weights during propagations. In Advances in Neural Information Processing Systems, pp. 3123–3131, 2015.
|
| 236 |
+
|
| 237 |
+
Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural network with pruning, trained quantization and huffman coding. CoRR, abs/1510.00149, 2, 2015.
|
| 238 |
+
|
| 239 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. arXiv preprint arXiv:1512.03385, 2015.
|
| 240 |
+
|
| 241 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. arXiv preprint arXiv:1603.05027, 2016.
|
| 242 |
+
|
| 243 |
+
Itay Hubara, Matthieu Courbariaux, Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. Quantized neural networks: Training neural networks with low precision weights and activations. arXiv preprint arXiv:1609.07061, 2016.
|
| 244 |
+
|
| 245 |
+
Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015.
|
| 246 |
+
|
| 247 |
+
Yangqing Jia, Evan Shelhamer, Jeff Donahue, Sergey Karayev, Jonathan Long, Ross Girshick, Sergio Guadarrama, and Trevor Darrell. Caffe: Convolutional architecture for fast feature embedding. arXiv preprint arXiv:1408.5093, 2014.
|
| 248 |
+
|
| 249 |
+
Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 250 |
+
|
| 251 |
+
Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. 2009.
|
| 252 |
+
|
| 253 |
+
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. Imagenet classification with deep convolutional neural networks. In F. Pereira, C. J. C. Burges, L. Bottou, and K. Q. Weinberger (eds.), Advances in Neural Information Processing Systems 25, pp. 1097–1105. Curran Associates, Inc., 2012. URL http://papers.nips.cc/paper/ 4824-imagenet-classification-with-deep-convolutional-neural-networks. pdf.
|
| 254 |
+
|
| 255 |
+
Fengfu Li and Bin Liu. Ternary weight networks. arXiv preprint arXiv:1605.04711, 2016.
|
| 256 |
+
|
| 257 |
+
Zhouhan Lin, Matthieu Courbariaux, Roland Memisevic, and Yoshua Bengio. Neural networks with few multiplications. arXiv preprint arXiv:1510.03009, 2015.
|
| 258 |
+
|
| 259 |
+
Mohammad Rastegari, Vicente Ordonez, Joseph Redmon, and Ali Farhadi. Xnor-net: Imagenet classification using binary convolutional neural networks. arXiv preprint arXiv:1603.05279, 2016.
|
| 260 |
+
|
| 261 |
+
Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision (IJCV), 115(3):211–252, 2015. doi: 10.1007/s11263-015-0816-y.
|
| 262 |
+
|
| 263 |
+
Shuchang Zhou, Zekun Ni, Xinyu Zhou, He Wen, Yuxin Wu, and Yuheng Zou. Dorefa-net: Training low bitwidth convolutional neural networks with low bitwidth gradients. arXiv preprint arXiv:1606.06160, 2016.
|
md/train/SJBr9Mcxl/SJBr9Mcxl.md
ADDED
|
@@ -0,0 +1,228 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# UNDERSTANDING TRAINED CNNS BY INDEXING NEURON SELECTIVITY
|
| 2 |
+
|
| 3 |
+
Ivet Rafegas & Maria Vanrell
|
| 4 |
+
|
| 5 |
+
Computer Vision Center
|
| 6 |
+
Universitat Autonoma de Barcelona \`
|
| 7 |
+
Bellaterra, Barcelona (Spain)
|
| 8 |
+
{ivet.rafegas, maria.vanrell}@uab.cat
|
| 9 |
+
Lu´ıs A. Alexandre
|
| 10 |
+
Department of Computer Science
|
| 11 |
+
Universidade da Beira Interior
|
| 12 |
+
Covilha , Portugal ˜
|
| 13 |
+
lfbaa@ubi.pt
|
| 14 |
+
|
| 15 |
+
# ABSTRACT
|
| 16 |
+
|
| 17 |
+
The impressive performance and plasticity of convolutional neural networks to solve different vision problems are shadowed by their black-box nature and its consequent lack of full understanding. To reduce this gap we propose to describe the activity of individual neurons by quantifying their inherent selectivity to specific properties. Our approach is based on the definition of feature selectivity indexes that allow the ranking of neurons according to specific properties. Here we report the results of exploring selectivity indexes for: (a) an image feature (color); and (b) an image label (class membership). Our contribution is a framework to seek or classify neurons by indexing on these selectivity properties. It helps to find color selective neurons, such as a red-mushroom neuron in layer conv4 or class selective neurons such as dog-face neurons in layer conv5, and establishes a methodology to derive other selectivity properties. Indexing on neuron selectivity can statistically draw how features and classes are represented through layers at a moment when the size of trained nets is growing and automatic tools to index can be helpful.
|
| 18 |
+
|
| 19 |
+
# 1 INTRODUCTION
|
| 20 |
+
|
| 21 |
+
In parallel with the success of CNNs to solve vision problems, there is a growing interest in developing methodologies to understand and visualize the internal representations of these networks. How the responses of a trained CNN encode the visual information is a fundamental question for computer and eventually for human vision.
|
| 22 |
+
|
| 23 |
+
Several works have proposed different methodologies to address the understanding problem. Recently, in Li et al. (2016) two main groups of works are mentioned. On one side those works that deal with the problem from a theoretical point of view. These are works such as Montavon et al. (2011) where kernel sequences are used to conclude that deep networks create increasingly better representations as the number of layer increases, Paul & Venkatasubramanian (2014) which explains why a deep learning network learns simple features first and that the representation complexity increases as the layers get deeper, Goodfellow et al. (2014) where an explanation for why an adversarial example created for one network is still valid in many others and they usually assign it the same (wrong) class, or Arora et al. (2014) that presents algorithms for training certain deep generative models with provable polynomial running time. On the other side, an empirical point of view, which comprises approaches that pursuit methodologies to visualize intermediate features in the image space, or approaches that analyze the effect of modifying a given feature map in a neuron activation. Our work is framed in the first subset of empirical approaches.
|
| 24 |
+
|
| 25 |
+
Visualizing intermediate features seeks to describe the activity of individual neurons. This description is the basis of this work hypothesis that is based on the idea that a proper understanding of the activity of the individual neurons allow us to draw a map of the CNN behavior. This behavior can be understood either in terms of relevant image features or in terms of the discriminative power of the neurons across the full architecture.
|
| 26 |
+
|
| 27 |
+
The first and most obvious way to describe the activity of a single neuron is given by the inherent set of weights of the learned filters. These weights can be used to compare neurons between them, either within the same layer or versus neurons in similar CNNs which have been trained under different initialization conditions, as it is proposed by Li et al. (2016). A direct visualization of these weights is intuitive when they belong to neurons of a first convolutional layer. However, when layers are stacked, that intuition disappears and the capability to understand the neuron activity is lost.
|
| 28 |
+
|
| 29 |
+
A second method to describe neuron activity is projecting the filter weights into the image space, trying to get the inherent feature that maximally activates the filter. The projection can be computed by composing the inversion of the layer operators under a specific neuron towards the image space: this was called a Decoded Filter (DF) in Rafegas & Vanrell (2016). The resulting image represents an estimation of the feature that should highly activate such neuron. The disentangling algorithm that inverts the filter would give a good estimation of the feature image if most of the layer operators were invertible. However, when the number of non-invertible operators increases, the estimation becomes unintelligible. The appearance of the DFs can be seen in Fig. 1 of Rafegas & Vanrell (2016). They have also been explored by Springenberg et al. (2015) for architectures with no pooling layers since pooling is the less invertible operator. They point out the interest of obtaining such a representation, since it would allow the understanding of neuron activity independently of the input image. However, the majority of proficient CNNs contain pooling layers.
|
| 30 |
+
|
| 31 |
+
A third way to describe neuron activity is by exploring the images that maximally activate the neuron. One of the most relevant works pursuing the visualization of intermediate features, is the one proposed by Zeiler & Fergus (2014), where they project intrinsic features of neurons from the image that have provoked a maximum spike to a certain neuron, the network representation is projected into the image space by isolating them in the deconvolution approach Zeiler et al. (2010). By observing different projections that maximally activate a certain neuron they get the intuition about the main features learned on the network. Later on, in Springenberg et al. (2015) the guided backpropagation improves the deconvolution approach by a new way of inverting rectified linear (ReLu) nonlinearities, achieving better visualizations of the activations. These approaches present a main drawback, their feature visualization is image-specific, since the maximum activation of a neuron not always generalize the intrinsic feature of the neuron. To solve this problem, in some works instead of using the image that provokes the maximum activation, they use optimization techniques to generate an image that maximizes the activation. The key point of these works is using an appropriate regularization in the generation process, otherwise, the resulting image appearance is unrealistic and difficult to understand. Simonyan et al. (2014) propose a method to generate an image which is representative of a certain class by maximizing the score of this image to be classified in a certain class (or highly activates the specified neuron) with an $L _ { 2 }$ -regularization. A similar work was performed afterwards in Yosinski et al. (2015) but taking advantage of combining three different regularizations to achieve more recognizable images. Although they have explored different regularizations to achieve more realistic intrinsic feature representations, their visualizations present important artifacts that complicate the understanding of the intrinsic property.
|
| 32 |
+
|
| 33 |
+
Finally, other works focus on proposing approaches able to reconstruct the input image given a feature map, going further of analyzing the individual neuron activity. Mahendran & Vedaldi (2015) make use of optimization algorithms to search for an image whose feature map best matches a given feature map by incorporating natural image priors. Contrary, in Dosovitskiy & Brox (2015), the authors propose to reconstruct the input image from its feature maps of a given convolutional network by training a new deconvolutional network to learn filter weights that minimize the image reconstruction error when these filters are applied to the image feature maps. With this approach they are also able to get an image reconstruction with natural priors.
|
| 34 |
+
|
| 35 |
+
In the second subset of empirical approaches, Alexey Dosovitskiy (2015) train a generative deconvolutional network to create images from neuron activations. With this methodology, the variation of the activations enables the visualization of the differences in the generated images. A similar analysis is done by Aubry & Russell (2015), but instead of forward-propagate different activations to the image space and comparing them, they observe the changes on neuron activations when similar computer-generated images with different scene factors are introduced into a CNN. These works contribute in giving a deeper understanding on the internal CNN behavior. Both works conclude that there are specific neurons which are sensitive to color changes, point of views, scale or lighting configurations.
|
| 36 |
+
|
| 37 |
+
Likewise, in Zeiler & Fergus (2014) in this work we pursuit visualizing the intrinsic feature of a neuron by analyzing the images that maximally activates a specific neuron. However, to avoid the lack of generality of this approach, we define the Neuron Feature which is not based on a single maximum activation. The Neuron Feature is a weighted average version of a set of maximum activation images that capture the essential properties shared by the most important activations and makes it not to be image-specific. Additionally, our Neuron Feature overcomes the problem of unrealistic representation we metnioned earlier, by directly averaging on the image space. In this way we achieve two main advantages: (a) keeping the properties of the natural images, and (b) providing a very straightforward approach to compute it.
|
| 38 |
+
|
| 39 |
+

|
| 40 |
+
Figure 1: Normalized activations of a subset of neurons for the first 400 ranked images through all convolutional layers. For each layer we plot the normalized activation for the neurons with highest and smallest AUC (Area Under Curve), and some other examples in between these extremes. For all neurons the highest normalized activations is 1, and the percentage of AUC is computed with respect to the neuron AUC achieving the biggest area in the entire network.
|
| 41 |
+
|
| 42 |
+
Afterwards, we introduce the concept of neuron selectivity index, that is used in human vision research to characterize the response of specific cells to specific stimuli (Shapley & Hawken (2011)). This concept allows to achieve a higher level of abstraction in the understanding of a single neuron. In this work we provide two selectivity indexes which are different in their essence: a color selectivity index that quantifies the degree of response of a neuron to a specific color; a class selectivity index that quantifies the degree of response of a neuron to a specific class label. Indexes are derived from the neuron feature or directly from the set of images with maximum activations. We analyze both indexes on a VGG-M network (Chatfield et al. (2014)) trained on ImageNet (Deng et al. (2009)) and we confirm their flexibility to cluster neurons according to their index values and extract conclusions in terms of their task in the net. By selecting color selective neurons we are able to outline how color is represented by the network. Curiously we found some parallelism between color representation in the first convolutional layer and known evidences about the representation in the human visual system. Color selective-neurons also show some preferences towards specific colors which coincide with ImageNet color biases. Indexing on class selectivity neurons we found highly class selective neurons like digital-clock at conv2, cardoon at conv3 and ladybug at conv5, much before the fully connected layers.
|
| 43 |
+
|
| 44 |
+
# 2 NEURON FEATURE
|
| 45 |
+
|
| 46 |
+
As we mentioned in the previous section we propose to visualize the image feature that activates a neuron, whenever is possible, by directly computing a weighted average of the $N$ -th first images that maximally activate this neuron. We will refer to it as the Neuron Feature (NF).
|
| 47 |
+
|
| 48 |
+
In order to build the NF we need to calculate the activations associated to each individual neuron. They need to be accordingly ranked with the rest of activations of the layer. For each neuron we select the set of images that achieve a minimum normalized activation value but constrained to a maximum number of images for practical reasons. By normalized activation we mean the value of the maximum activation of a neuron for a specific input image, which is normalized by the maximum of these values achieved by the same neuron over all the images in the dataset.
|
| 49 |
+
|
| 50 |
+
In Fig. 1 we can see the behavior of the ranked normalized responses of a subset of neurons for every convolution layer of the VGG-M CNN trained on ImageNet by Chatfield et al. (2014). The y-axis represents the normalized activation value of a single neuron to an image of the dataset. Images are ranked on the $\mathbf { X }$ -axis according with their activation value, from highest to lowest activation (we just plot the first 400 images for each neuron). Therefore, the first relative activation value is always 1 for all neurons and then the normalized activation values decrease monotonically. This normalization allows to compare different neuron behaviors, from neurons which are activated by most of the images (flatter behavior), to neurons that highly activates only for a subset of images and have very little activation for the rest (steeper behavior). In this figure we also provide the percentage of area for each plotted curve. This percentage is computed over the area of the neuron that presents the maximum AUC in the entire architecture. We can observe different behaviors in all layers. In general, we can state that in deeper layers the behavior of the neurons is steeper (lower AUC), i.e. neurons highly spike for a small number of images. However, in shallower layers the behavior is flatter, i.e. neurons highly spike for a lot of images. This is an expected behavior, since the image features spiking neurons in first layers (e.g. oriented edges) are shared by almost all the images, while the features spiking shallow neurons are more selective features (e.g. faces) that only spike for specific images. The observation of the responses confirms the adequacy of our assumption to fix a minimum value for the activation and a maximum number of images to capture the most important activations for all the neurons. Similar observations have been made for other networks like VGG-S and VGG-F Chatfield et al. (2014) 1.
|
| 51 |
+
|
| 52 |
+

|
| 53 |
+
Figure 2: Neuron Feature (NF) visualizations (top) for 5 neuronsof the different convolutional layers of VGG-M with their corresponding 100 cropped images (bottom). We scale all layers to the same size due to space constraints.
|
| 54 |
+
|
| 55 |
+

|
| 56 |
+
Figure 3: Examples of NFs for each convolutional layer of the network VGG-M (see section 4.1. (a) 20 examples of structured NF, (b), blurred NF. Although sizes of NF increments through layers, we scale them into the same size. Original sizes are: 7x7x3 , 27x27x3, 75x75x3, $1 0 7 \mathrm { x } 1 0 7 \mathrm { x } 3$ and $1 3 9 \mathrm { x } 1 3 9 \mathrm { x } 3$ for conv1, conv2, conv3, conv4 and conv5, respectively.
|
| 57 |
+
|
| 58 |
+
Thus, the NF is computed as:
|
| 59 |
+
|
| 60 |
+
$$
|
| 61 |
+
N F ( n ^ { L , i } ) = \frac { 1 } { N _ { m a x } } \sum _ { j = 1 } ^ { N _ { m a x } } w _ { j , i , L } I _ { j }
|
| 62 |
+
$$
|
| 63 |
+
|
| 64 |
+
where $w _ { j , i , L }$ is the relative activation of the $j$ -th cropped image, denoted as $I _ { j }$ , of the $i$ -th neuron $n ^ { L , i }$ at layer $L$ . The relative activation is the activation $a _ { j , i }$ of a neuron, given a input image, with respect to its maximum activation obtained for any image, $\begin{array} { r } { \dot { w } _ { j , i , L } = \frac { a _ { j , i } } { a _ { m a x , i } } } \end{array}$ where $a _ { m a x , i } = \operatorname* { m a x } a _ { k , i } , \forall k$ .
|
| 65 |
+
|
| 66 |
+
In Fig. 2 we can see some NFs and their corresponding set of first 100 maximum activations, and in Fig. 3 (a) we can see a selected subset of $2 0 \mathrm { N F }$ per layer. In this image we can identify specific shapes that display the intrinsic property that fires a single neuron. At first glance, we can see how in this particular network the first two layers are devoted to basic properties. Oriented edges of different frequencies and in different colors in the first layer; textures, blobs, bars and more specific curves in the second layer. The rest of the layers seem to be devoted to more complex objects. We can see that dog and human faces, cars and flowers are detected at different scales in different layers, since the size of the NF and their corresponding cropped images increase with depth. This visualization of the neuron activity can be seen as a way to visualize a trained vocabulary of the CNN that opens multiple ways to analyze the global behavior of the network from its single units. However, not all neurons present such a clear tuning to an identifiable shape. Some neurons present a blurred version of NF, such as, those in Fig. 3(b). The level of blurring is directly related to a high variability between the maximally activated images for a neuron.
|
| 67 |
+
|
| 68 |
+
At this point, we want to make a short parenthesis to relate the previous representational observations with the scientific problem about neural coding that is focus of attention in visual brain research (Kriegeskorte & Kreiman (2011)). We are referring to the hypothesis about distributed representations that encode object information in neuron population codes, that co-exist with strong evidences of neurons which are only activated by a very specific object. In line with this idea, we invite to speculate about neurons presenting a highly structured NF could be closer to localist code neurons while neurons with a blurred NF as closer to a distributed code. We return on this discussion later on at sections 4.3 and 5.
|
| 69 |
+
|
| 70 |
+
Finally, we want to add a further analysis about how neuron feature is related to the neuron activity is representing. In Fig. 4 we plot the level of the neuron responses when the input image is its own NF. We can observe a high degree of activation (in green) between the NF and the response of the net to this feature. However we have some disagreements between the NF and the neuron activations: an important example is shown in layer 2, that is curiously bigger than in layer 3 and 4. This is explained by the high number of dead neurons2 and also by a higher presence of texture selective neurons, that is observed in Fig. 3. Another example, which is more understandable, is the clear increase of disagreement that happens through layers 3, 4 and 5, that seems to be explained by an increase in invariance that is obvious when the size of the image increases.
|
| 71 |
+
|
| 72 |
+

|
| 73 |
+
Figure 4: Number of neurons and degree of activation as a response to their own NF. Activations values are normalized to a specific range within each layer.
|
| 74 |
+
|
| 75 |
+

|
| 76 |
+
Figure 5: Conv1 NFs sorted by their color selectivity index.
|
| 77 |
+
|
| 78 |
+
# 3 NEURON SELECTIVITY INDEX
|
| 79 |
+
|
| 80 |
+
In this section we propose to describe neurons by their inherent response to a specific property, using an index. The index has to allow to rank them in a proportional order between their response and the existence of the property in the input image. Therefore, we translate the problem of describing neuron activity to the problem of proposing methods which are able to quantify specific image facets that correlate with the degree of activation of the neuron holding such a property. A selectivity index of a single unit is a flexible an independent method for discriminating or clustering between neurons inside the same network. Selectivity indexes can be defined either for image features or for image labels. In what follows, we propose two selectivity indexes one on each group.
|
| 81 |
+
|
| 82 |
+
# 3.1 COLOR SELECTIVITY INDEX
|
| 83 |
+
|
| 84 |
+
Color selectivity is a property that can be proved in specific neurons of the human brain. The level of activation of the neuron when the observer is exposed to a stimulus with a strong color bias, and its corresponding low activation when the color is not present, is the object of attention in vision research that pursuits the understanding of how color is coded in the human visual system (Shapley & Hawken (2011),Conway & Tsao (2009)).
|
| 85 |
+
|
| 86 |
+
Here we propose a method to compute a color selectivity index for neurons in artificial neural networks. We propose to base it directly on the image properties of the NF we have defined above. We quantify the selectivity to a specific chromaticity directly from the color distribution of the NF. We define this index as the angle between the first principal component (v) of the color distribution of the NF and the intensity axis (b) of the Opponent Color Space (OPP). To compute (v) we use a weighted Principal Component Analysis Delchambre (2014) that allows to strengthen the selectivity of small color areas. Weights are applied to each pixel in order to reinforce those pixels that are shared by most cropped images and that highly contribute to the NF. Therefore, the weights are the inverse of the standard deviation. In this way, a NF defined by cropped images with different colors will tend to be represented by a grayish image and its principal component will be close to the intensity axis in the OPP color space and it will receive a low selectivity index. We formulate this index (in degrees) as follows:
|
| 87 |
+
|
| 88 |
+
$$
|
| 89 |
+
\alpha ( n ^ { L , i } ) = { \frac { 1 } { 9 0 } } \operatorname { a r c c o s } \left( { \frac { \mathbf { b } \cdot \mathbf { v } } { \| \mathbf { b } \| \| \mathbf { v } \| } } \right)
|
| 90 |
+
$$
|
| 91 |
+
|
| 92 |
+
Other selectivity indexes that can be derived from this, are those related to color attributes. We can easily extract color name labels using a color naming approach such as Benavente et al. (2008) and directly define color selectivity to basic names such as red, or green, among others.
|
| 93 |
+
|
| 94 |
+
# 3.2 CLASS SELECTIVITY INDEX
|
| 95 |
+
|
| 96 |
+
Class selectivity is a property of a neuron that can help to establish its discriminative power for one specific class or can allow to cluster neurons accordingly with the ontological properties of their class labels.
|
| 97 |
+
|
| 98 |
+
We propose a method to compute a class selectivity index for individual neurons by compiling the class labels of the images that maximally activates this neuron in a single descriptor. We define class selectivity from the set of class labels of the $N$ images used to build the NF. To quantify this index we build the class label distribution of the full set of images. As in the color selectivity index, we weight the significance of a class label by the relative activation of its image. Thus, the relative frequency of each class $c$ for a certain neuron is defined as:
|
| 99 |
+
|
| 100 |
+
$$
|
| 101 |
+
f _ { c } ( n ^ { i , L } ) = \frac { \sum _ { j } ^ { N _ { c } } w _ { j , i , L } } { \sum _ { l } ^ { N } w _ { l , i , L } }
|
| 102 |
+
$$
|
| 103 |
+
|
| 104 |
+
where $N _ { c }$ refers to the number of images, among the $N$ cropped images activating this neuron, that belong to class $c$ .
|
| 105 |
+
|
| 106 |
+
Given the densities for all the classes. Finally, our class selectivity index is defined as follows:
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\gamma ( n ^ { L , i } ) = \frac { N - M } { N - 1 }
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
where $M$ is the minimum number of classes that covers a pre-fixed ratio, $^ { t h }$ , of the neuron activation, this can be denoted as $\begin{array} { r } { \sum _ { c } ^ { M } f _ { c } \geq t h } \end{array}$ . This threshold allow to avoid considering class labels with very small activation weight. Jointly with the index value the selectivity provides the set of $M$ classes that describe the neuron selectivity and their corresponding relative frequency values.
|
| 113 |
+
|
| 114 |
+
Therefore, a low class selectivity index indicates a poor contribution of this neuron to a single class (minimum is 0 when $M = N$ ), while a high value (maximum is 1) indicates a strong contribution of this neuron to a single class. In between we can have different degrees of selectivity to different number of classes. Obviously, this index is irrelevant for the last fully connected layers in a CNN, but it allows to group related neurons across different convolutional layers.
|
| 115 |
+
|
| 116 |
+
Here we want to point out, that this index can also contribute to give some insights about the problem of how information is coded through layers, in the debate of localist and distributed neural codes we mentioned before (Kriegeskorte & Kreiman (2011)). Neurons with high class selectivity index should be in line with a localist code, while neurons with low class selectivity index should be part of a distributed code. This way the index is defined allow a large range of interpretations in between these two kinds of coding as it has been outlined in the visual coding literature.
|
| 117 |
+
|
| 118 |
+
# 4 RESULTS
|
| 119 |
+
|
| 120 |
+
In this section we report some empirical results to show how the proposed selectivity indexes perform and what representational conclusions we can extract from the subsets of neurons sharing indexed properties.
|
| 121 |
+
|
| 122 |
+
# 4.1 EXPERIMENTAL SETUP
|
| 123 |
+
|
| 124 |
+
In this paper we analyze the neurons of a CNN architecture trained on ImageNet ILSVRC dataset Deng et al. (2009) (using a subset of 1.2M images classified in 1.000 categories). We report the results for the VGG-M CNN that was trained by Chatfield et al. (2014) for a generic visual task of object recognition. The details of the CNN architecture are given in table 1. We selected this network since it has a similar structure to those which have been reported as having a representational performance that competes with human performance (as was proved in Cadieu et al. (2014)). Nevertheless, we have obtained similar results for VGG-F and VGG-S that are provided in Chatfield et al. (2014). We used the Matconvnet library provided by Vedaldi & Lenc (2015) for all the experiments.
|
| 125 |
+
|
| 126 |
+
<table><tr><td rowspan=1 colspan=1>conv1</td><td rowspan=1 colspan=1>conv2</td><td rowspan=1 colspan=1>conv3</td><td rowspan=1 colspan=1>conv4</td><td rowspan=1 colspan=1>conv5</td><td rowspan=1 colspan=1>full6</td><td rowspan=1 colspan=1>ful17</td><td rowspan=1 colspan=1>ful18</td></tr><tr><td rowspan=1 colspan=1>96x7x7st.2, pad.0LRN, x2 pool</td><td rowspan=1 colspan=1>256x5x5st.2, pad.1LRN, x2 pool</td><td rowspan=1 colspan=1>512x3x3st.1, pad.1</td><td rowspan=1 colspan=1>512x3x3st.1, pad.1</td><td rowspan=1 colspan=1>512x3x3st.1, pad.1x2 pool</td><td rowspan=1 colspan=1>4096dropout</td><td rowspan=1 colspan=1>4096dropout</td><td rowspan=1 colspan=1>1000softmax</td></tr></table>
|
| 127 |
+
|
| 128 |
+
Table 1: VGG-M architecture designed by Chatfield et al. (2014), where $M \times N \times P$ corresponds to number of filters, number of rows and columns of the filters respectively. $S t .$ . and pad. refers to stride and padding respectively; LRN is a ReLU and the corresponding pooling $( p o o l )$ if applied.
|
| 129 |
+
|
| 130 |
+

|
| 131 |
+
Figure 6: Neurons with different color selectivity indexes. Images in 4 rows (1st and 3rd row are NFs, 2nd and 4th rows are sets of cropped images that maximally activates the neuron).
|
| 132 |
+
|
| 133 |
+
# 4.2 COLOR SELECTIVITY
|
| 134 |
+
|
| 135 |
+
General purpose CNN architectures are usually trained on RGB color images. However there is a strong belief in the computer vision community that color is a dispensable property. The results we obtain by indexing color selective neurons make us conclude that there is no basis for such a belief. Results show that color is strongly entangled at all levels of the CNN representation. In a preliminary experiment we have tested a subset of ImageNet images with VGG-M in their original color and the same subset in a gray scale representation. Classification results show a considerable decrease: while original RGB images are classified with a $2 7 . 5 0 \%$ top-1 error and $1 0 . 1 4 \%$ top-5 error, gray scale image versions present $5 1 . 1 2 \%$ and $2 6 . 3 7 \%$ errors, top-1 and top-5 errors respectively.
|
| 136 |
+
|
| 137 |
+
In a first experiment we extract how many NFs are related to color in each convolutional layer using the proposed color selectivity index. The bars in Fig. 8 plot the relative quantity of neurons that are color selective compared to those that are not. Grey represents the ratio of neurons that do not spike for the presence of a color and reddish represent neurons that are highly activated by the presence of a color. In the graphic we can observe that shallow layers are the main responsible for the color representation on the images: $5 0 \%$ and $4 0 \%$ of neurons are color selective in layers conv1 and conv2, respectively. Nevertheless, we also still found around $2 5 \%$ of color selective neurons in in deeper layers. Therefore, although neurons in deeper layers tend to be color invariant, an important part of the representation is devoted to color, that reinforces the discriminative power of color in object recognition. In Fig. 6 we show some examples of NFs with different degrees of color selectivity at different layers of the network and showing the corresponding cropped images.
|
| 138 |
+
|
| 139 |
+
Regarding color representation in layer 1 we want to point out two more observations derived from the NFs (see Fig. 5): (a) selectivity to different spatial-frequencies is only tackled by gray-level neurons; and (b) four main color axis emerge (black-white, blue-yellow, orange-cyan and cyanmagenta). Curiously, these two observations correlate with evidences in the human visual system (Shapley & Hawken (2011)).
|
| 140 |
+
|
| 141 |
+

|
| 142 |
+
Figure 7: Distribution of color selective neurons on a hue color space through layers. Maximum activation images for 4 top color selective neurons for each layer. Dashed rings connect NFs of color selective neurons through layers, from inner ring (conv1) to outer ring (conv5).
|
| 143 |
+
|
| 144 |
+

|
| 145 |
+
Figure 8: Number of neurons and degree of color selectivity through layers. Grayish bars are for low index values and reddish for high index values.
|
| 146 |
+
|
| 147 |
+

|
| 148 |
+
Figure 9: Number of neurons and degree of class selectivity through layers. Grayish bars are for low index values and bluish for high index values.
|
| 149 |
+
|
| 150 |
+
In a second experiment, we analyze how color selective neurons from all layers cover the color space. Figure 7 displays the distribution of color selective neurons with $\alpha \ge 0 . 4 0$ . Each NF is plotted on the hue angle that represents the projection of its first principal component on the OPP chromaticity plane (red-green and blue-yellow components). Dashed rings identify different convolutional layers from conv1 (inner ring) to conv5 (outer ring) linking the NFs that belong to the same layer. We can appreciate the emergence of an axis (from orange to cyan) that connects a crowded area of color selective neurons. We can add a low population of NFs in the magenta area, that becomes more crowded on the opposite side where green and yellow selectivity has several neurons. The interest of this explanation relies on the fact that a similar distribution appears in the ImageNet color distribution, that is plotted at the bottom of the same images, where a similar interpretation in terms of emergent axes can be done. A more in depth study is required to prove this correlation, but we illustrate how neuron selectivity helps in the understanding of how a specific property is represented by the CNN.
|
| 151 |
+
|
| 152 |
+
# 4.3 CLASS SELECTIVITY
|
| 153 |
+
|
| 154 |
+
Following with the analysis of ranking neurons by their response to a certain property, here we focus on the proposed selectivity index that relates to image labels instead of to an image property, is the class selectivity index, which only applies for classification networks. We report the results of different experiments where we have fixed $t h = 1$ , which means we consider all the class labels for the $N = 1 0 0$ images that maximally activates the neuron. As we mentioned before, this index can enlighten how classes are encoded through the net layers, that again it can be related to the scientific problem of how general object recognition is encoded in the human brain. Here we hypothesize that the difference between localist or distributed codes could correlate with the idea of neurons highly selective to a single class and neurons highly selective to several classes, we resume on this later at section 5.
|
| 155 |
+
|
| 156 |
+
In a first experiment we analyze how many neurons present different degrees of class selectivity through layers. The bars in Fig. 9 plot the relative quantity of neurons that are class selective compared to those that are not. Grey represents the ratio of neurons that are not activated by a single class and bluish represent neurons that are highly activated by a single class. Opposite to what we showed about color selectivity, we found most of class selective neurons in deeper layers, and no class selectivity in shallow layers, as expected. We have moved from a very basic image property, color, to a very high level property, class label. This fact corroborates the idea that CNNs start by defining basic feature detectors that are share by most of the classes, and the neurons become more specialized when they belong to deeper layers representing larger areas in the image space and therefore more complex shapes. We start to have neurons with relevant class selectivity in layer conv3, where a $5 \%$ of neurons is quite class selective and we found some neurons with a degree of selective close to 1. These ratios progressively increase up to layer conv5 where we have more than a $5 0 \%$ of neurons with a class selectivity index greater than 0.6, that means that we have less than 40 different classes activating this neuron, which is a very selective ratio considering the number of classes of the ImageNet dataset. In the same layer a $2 0 \%$ of neurons present a high class selectivity index, than means less than 20 different classes. Further experiments should explore how this graphic evolves by moving from current class labels which are on the leaves of the ImageNet ontology towards higher nodes with more generic classes.
|
| 157 |
+
|
| 158 |
+
Secondly, we have visualized the properties of a set of images presenting different degrees of class selectivity in Fig. 10 for different levels of depth. We visualize each neuron with their NF visualization and the corresponding cropped images. We also show two tag clouds of each neuron. They visualize the importance of each class label. With an orange frame we plot the leave classes of the ImageNet ontology, while in the green frame we plot generic classes. This second analysis could help finding neurons that are specialized to a general semantic concept that different final classes share. Note that neurons with high class selectivity index have a set of cropped images that we can identify as belonging to the same class.
|
| 159 |
+
|
| 160 |
+
Finally we stress the utility of ranking images by selectivity indexes in Fig. 11, where we show interesting neurons in different convolutional layers that present high values for both selectivity indexes, neurons which are both, color and class selective.
|
| 161 |
+
|
| 162 |
+
# 5 CONCLUSIONS
|
| 163 |
+
|
| 164 |
+
In this paper we propose a framework to analyze a trained CNN by dissecting individual neurons using their indexes of selectivity to specific properties. We have proposed two properties of different nature: (a) color, that is a low-level image property that we have shown to be entangled in all the representations levels of the net; (b) class label, that is a high-level image property that can be analyzed at different levels of abstraction. We have shown that while the number of color selective neurons decreases with depth, the number of class selective neuron increases. In this line of describing the activity of individual images, we have also proposed to visualize the activity with what we have called the neuron feature (NF), that allows to arise interesting structures that are shared by the images that highly activate a neuron.
|
| 165 |
+
|
| 166 |
+
The proposed work have made us to speculate about two different ways to address the coding properties of individual neurons (localist versus distributed). Firstly, we have mentioned the possibility that a blurred NF, i.e. without a clear structure, belongs to a neuron that can be part of a distributed code where the neuron does not represent a selectivity to a single shape, maybe to diverse shapes than can be part of a code in deeper neurons. Secondly, we speculate about the possibility that neurons with high class selective index can represent a localist code, and part of a distributed when is low. In parallel, the analysis of the color selective neurons have made to arise some parallelism between color representation in the 1st convolutional layer and known evidences about the representation in the human visual system.
|
| 167 |
+
|
| 168 |
+

|
| 169 |
+
Figure 10: Neurons with different class selectivity indexes. For each neuron two images (top: NF, bottom: cropped images) and two tag clouds (top: leave classes, bottom: all classes in the ontology).
|
| 170 |
+
|
| 171 |
+

|
| 172 |
+
Figure 11: Examples of neurons with high color and class selectivity indexes.
|
| 173 |
+
|
| 174 |
+
As further work we need to fully exploit the potential of the indexes in different CNN architectures, and defining new selectivity indexes like shape or texture, that could be a perfect complement to current ones.
|
| 175 |
+
|
| 176 |
+
# ACKNOWLEDGMENTS
|
| 177 |
+
|
| 178 |
+
Project funded by MINECO Ref. TIN (TIN2014-61068-R)
|
| 179 |
+
|
| 180 |
+
# REFERENCES
|
| 181 |
+
|
| 182 |
+
Thomas Brox Alexey Dosovitskiy, Jost Tobias Springenberg. Learning to generate chairs with convolutional neural networks. In CVPR, 2015.
|
| 183 |
+
|
| 184 |
+
Sanjeev Arora, Aditya Bhaskara, Rong Ge, and Tengyu Ma. Provable bounds for learning some deep representations. In ICML, pp. 584–592, 2014.
|
| 185 |
+
|
| 186 |
+
Mathieu Aubry and Bryan C. Russell. Understanding deep features with computer-generated imagery. In ICCV, 2015.
|
| 187 |
+
|
| 188 |
+
Robert Benavente, Maria Vanrell, and Ramon Baldrich. Parametric fuzzy sets for automatic color naming. JOSA, 25(10):2582–2593, Oct 2008.
|
| 189 |
+
|
| 190 |
+
Charles F Cadieu, Ha Hong, Daniel L K Yamins, Nicolas Pinto, Diego Ardila, Ethan A Solomon, Najib J Majaj, and James J DiCarlo. Deep neural networks rival the representation of primate it cortex for core visual object recognition. PLoS computational biology, 10, 2014 Dec 2014.
|
| 191 |
+
|
| 192 |
+
K. Chatfield, K. Simonyan, A. Vedaldi, and A. Zisserman. Return of the devil in the details: Delving deep into convolutional nets. In BMVC, 2014.
|
| 193 |
+
|
| 194 |
+
Bevil R. Conway and Doris Y. Tsao. Color-tuned neurons are spatially clustered according to color preference within alert macaque posterior inferior temporal cortex. Proc Natl Acad Sci U S A., 42 (106):18034–18039, 2009.
|
| 195 |
+
|
| 196 |
+
L. Delchambre. Weighted principal component analysis: a weighted covariance eigendecomposition approach. MNRAS, 446:3545–3555, 2014.
|
| 197 |
+
|
| 198 |
+
J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. ImageNet: A Large-Scale Hierarchical Image Database. In CVPR09, 2009.
|
| 199 |
+
|
| 200 |
+
Alexey Dosovitskiy and Thomas Brox. Inverting visual representations with convolutional networks. CoRR, abs/1506.02753, 2015. URL http://arxiv.org/abs/1506.02753.
|
| 201 |
+
|
| 202 |
+
Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. CoRR, abs/1412.6572, 2014. URL http://arxiv.org/abs/1412.6572.
|
| 203 |
+
|
| 204 |
+
Nicolaus Kriegeskorte and Gabriel Kreiman. Visual Population Codes - Toward a Common Multivariate Framework for Cell Recording and Functional Imaging. MIT Press, 2011.
|
| 205 |
+
|
| 206 |
+
Yixuan Li, Jason Yosinski, Jeff Clune, Hod Lipson, and John E. Hopcroft. Convergent learning: Do different neural networks learn the same representations? In ICLR, 2016.
|
| 207 |
+
|
| 208 |
+
Aravindh Mahendran and Andrea Vedaldi. Understanding deep image representations by inverting them. CVPR, 2015.
|
| 209 |
+
|
| 210 |
+
Gregoire Montavon, Mikio Braun, and Klaus-Robert M ´ uller. Kernel analysis of deep networks.¨ JMLR, 12:2563–2581, 2011.
|
| 211 |
+
|
| 212 |
+
Arnab Paul and Suresh Venkatasubramanian. Why does deep learning work? - A perspective from group theory. CoRR, abs/1412.6621, 2014. URL http://arxiv.org/abs/1412.6621.
|
| 213 |
+
|
| 214 |
+
Ivet Rafegas and Maria Vanrell. Color spaces emerging from deep convolutional networks. In CIC, 2016.
|
| 215 |
+
|
| 216 |
+
Robert Shapley and Michael J. Hawken. Color in the cortex: Single- and double-opponent cells. VR, 51(7):701–717, 4 2011.
|
| 217 |
+
|
| 218 |
+
Karen Simonyan, Andrea Vedaldi, and Andrew Zisserman. Deep inside convolutional networks: Visualising image classification models and saliency maps. In In ICLR Workshop 2014, 2014.
|
| 219 |
+
|
| 220 |
+
Jost Tobias Springenberg, Alexey Dosovitskiy, Thomas Brox, and Martin A. Riedmiller. Striving for simplicity: The all convolutional net. ICLR, 2015.
|
| 221 |
+
|
| 222 |
+
A. Vedaldi and K. Lenc. Matconvnet – convolutional neural networks for matlab. 2015.
|
| 223 |
+
|
| 224 |
+
Jason Yosinski, Jeff Clune, Anh Nguyen, Thomas Fuchs, and Hod Lipson. Understanding neural networks through deep visualization. In Deep Learning Workshop, (ICML), 2015.
|
| 225 |
+
|
| 226 |
+
Matthew D. Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In ECCV, 2014.
|
| 227 |
+
|
| 228 |
+
Matthew D. Zeiler, Dilip Krishnan, Graham W. Taylor, and Rob Fergus. Deconvolutional networks. In CVPR, 2010.
|
md/train/SRDuJssQud/SRDuJssQud.md
ADDED
|
@@ -0,0 +1,458 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# NEURAL APPROXIMATE SUFFICIENT STATISTICS FOR IMPLICIT MODELS
|
| 2 |
+
|
| 3 |
+
Yanzhi Chen1∗, Dinghuai Zhang2∗, Michael U. Gutmann1, Aaron Courville2, Zhanxing $\mathbf { Z } \mathbf { h } \mathbf { u } ^ { 3 }$ 1The University of Edinburgh, 2MILA, 3Beijing Institute of Big Data Research
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
We consider the fundamental problem of how to automatically construct summary statistics for implicit generative models where the evaluation of the likelihood function is intractable but sampling data from the model is possible. The idea is to frame the task of constructing sufficient statistics as learning mutual information maximizing representations of the data with the help of deep neural networks. The infomax learning procedure does not need to estimate any density or density ratio. We apply our approach to both traditional approximate Bayesian computation and recent neural likelihood methods, boosting their performance on a range of tasks.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Many data generating processes can be well-described by a parametric statistical model that can be easily simulated forward but does not possess an analytical likelihood function. These models are called implicit generative models (Diggle & Gratton, 1984) or simulator-based models (Lintusaari et al., 2017) and are widely used in science and engineering domains, including physics (Sjöstrand et al., 2008), genetics (Järvenpää et al., 2018), computer graphics (Mansinghka et al., 2013), robotics (Lopez-Guevara et al., 2017), finance (Bansal & Yaron, 2004), cosmology (Weyant et al., 2013), ecology (Wood, 2010) and epidemiology (Chinazzi et al., 2020). For example, the number of infected/healthy people in an outbreak could be well modelled by stochastic differential equations (SDE) simulated by Euler-Maruyama discretization but the likelihood function of a SDE is generally non-analytical. Directly inferring the parameters of these implicit models is often very challenging.
|
| 12 |
+
|
| 13 |
+
The techniques coined as likelihood-free inference open us a door for performing Bayesian inference in such circumstances. Likelihood-free inference needs to evaluate neither the likelihood function nor its derivatives. Rather, it only requires the ability to sample (i.e. simulate) data from the model. Early approaches in approximate Bayesian computation (ABC) perform likelihood-free inference by repeatedly simulating data from the model, and pick a small subset of the simulated data close to the observed data to build the posterior (Pritchard et al., 1999; Marjoram et al., 2003; Beaumont et al., 2009; Sisson et al., 2007). Recent advances make use of flexible neural density estimators to approximate either the intractable likelihood (Papamakarios et al., 2019) or directly the posterior (Papamakarios & Murray, 2016; Lueckmann et al., 2017; Greenberg et al., 2019).
|
| 14 |
+
|
| 15 |
+
Despite the algorithmic differences, a shared ingredient in likelihood-free inference methods is the choice of summary statistics. Well-chosen summary statistics have been proven crucial for the performance of likelihood-free inference methods (Blum et al., 2013; Fearnhead & Prangle, 2012; Sisson et al., 2018). Unfortunately, in practice it is often difficult to determine low-dimensional and informative summary statistic without domain knowledge from experts. In this work, we propose a novel deep neural network-based approach for automatic construction of summary statistics. Neural networks have been previously applied to learning summary statistics for likelihood-free inference (Jiang et al., 2017; Dinev & Gutmann, 2018; Alsing et al., 2018; Brehmer et al., 2020). Our approach is unique in that our learned statistics directly target global sufficiency. The main idea is to exploit the link between statistical sufficiency and information theory, and to formulate the task of learning sufficient statistic as the task of learning information-maximizing representations of data. We achieve this with distribution-free mutual information estimators or their proxies (Székely et al., 2014; Hjelm et al., 2018). Importantly, our statistics can be learned jointly with the posterior, resulting in fast learning where the two can refine each other iteratively. To sum up, our main contributions are:
|
| 16 |
+
|
| 17 |
+
• We propose a new neural approach to automatically extract compact, near-sufficient statistics from raw data. The approach removes the need for careful handcrafted design of summary statistics. • With the proposed statistics, we develop two new likelihood-free inference methods namely SMC$\mathrm { { \bf A } C + }$ and ${ \mathrm { S N L } } +$ . Experiments on tasks with various types of data demonstrate their effectiveness.
|
| 18 |
+
|
| 19 |
+
# 2 BACKGROUND
|
| 20 |
+
|
| 21 |
+
Likelihood-free inference. LFI considers the task of Bayesian inference when the likelihood function of the model is intractable but simulating (sampling) data from the model is possible:
|
| 22 |
+
|
| 23 |
+
$$
|
| 24 |
+
\pi ( \pmb { \theta } | \mathbf { x } _ { o } ) \propto \pi ( \pmb { \theta } ) \underbrace { p ( \mathbf { x } _ { o } | \pmb { \theta } ) } _ { ? }
|
| 25 |
+
$$
|
| 26 |
+
|
| 27 |
+
where $\mathbf { x } _ { o }$ is the observed data, $\pi ( \pmb \theta )$ is the prior over the model parameters $\pmb \theta$ , $p ( \mathbf { x } _ { o } | \pmb { \theta } )$ is the (possibly) non-analytical likelihood function and $\pi ( \pmb { \theta } | \mathbf { x } _ { o } )$ is the posterior over $\pmb \theta$ . We assume that, while we do not have access to the exact likelihood, we can still sample (simulate) data from the model with a simulator: $\mathbf { x } \sim p ( \mathbf { x } | \pmb { \theta } )$ . The task is then to infer $\pi ( \pmb { \theta } | \mathbf { \bar { x } } _ { o } )$ given $\mathbf { x } _ { o }$ and the sampled data: $\mathcal { D } = \{ \pmb { \theta } _ { i } , \mathbf { x } _ { i } \} _ { i = 1 } ^ { n }$ where $\pmb { \theta } _ { i } \sim p ( \pmb { \theta } ) , \mathbf { x } _ { i } \sim p ( \mathbf { x } | \pmb { \theta } _ { i } )$ . Note that $p ( \pmb \theta )$ is not necessarily the prior $\pi ( \pmb \theta )$ .
|
| 28 |
+
|
| 29 |
+
Curse of dimensionality. Different likelihood-free inference algorithms might learn $\pi ( \pmb { \theta } | \mathbf { x } _ { o } )$ in different ways, nevertheless most existing methods suffer from the curse of dimensionality. For example, traditional ABC methods use a small subset of $\mathcal { D }$ closest to $\mathbf { x } _ { o }$ under some metric to build the posterior (Pritchard et al., 1999; Marjoram et al., 2003; Beaumont et al., 2009; Sisson et al., 2007), however in high-dimensional space measuring the distance sensibly is notoriously hard (Sorzano et al., 2014; Xie et al., 2017). On the other hand, recent advances (Papamakarios et al., 2019; Lueckmann et al., 2017; Papamakarios & Murray, 2016; Greenberg et al., 2019) utilize neural density estimators (NDE) to model the intractable likelihood or the posterior. Unfortunately, modeling high-dimensional distributions with NDE accurately is also known to be very difficult (Rippel & Adams, 2013; Van Oord et al., 2016), especially when the available training data is scarce.
|
| 30 |
+
|
| 31 |
+
Our interest here is not to design a new inference algorithm, but to find a low-dimensional statistic $\mathbf { s } = s ( \mathbf { x } )$ that is (Bayesian) sufficient:
|
| 32 |
+
|
| 33 |
+
$$
|
| 34 |
+
\pi ( \pmb \theta | \mathbf x _ { o } ) \approx \pi ( \pmb \theta | \mathbf s _ { o } ) \propto \pi ( \pmb \theta ) p ( \mathbf s _ { o } | \pmb \theta ) ,
|
| 35 |
+
$$
|
| 36 |
+
|
| 37 |
+
where $s : \mathcal { X } \to \mathcal { S }$ is a deterministic function also learned from $\mathcal { D }$ . We conjecture that the learning of $s ( \cdot )$ might be an easier task than direct density estimation. The resultant statistic s could then be applied to a wide range of likelihood-free inference algorithms as we will elaborate in Section 3.2.
|
| 38 |
+
|
| 39 |
+
# 3 METHODOLOGY
|
| 40 |
+
|
| 41 |
+
# 3.1 NEURAL SUFFICIENT STATISTICS
|
| 42 |
+
|
| 43 |
+
Our new deep neural network-based approach for automatic construction of near-sufficient statistics is based on the infomax principle, as illustrated by the following proposition (also see Figure 1):
|
| 44 |
+
|
| 45 |
+
Proposition 1. Let $\pmb \theta \sim p ( \pmb \theta )$ , $\mathbf { x } \sim p ( \mathbf { x } | \pmb \theta )$ , and $s : \mathcal { X } \to \mathcal { S }$ be a deterministic function. Then $\mathbf { s } = s ( \mathbf { x } )$ is a sufficient statistic for $p ( \mathbf { x } | \pmb \theta )$ if and only if
|
| 46 |
+
|
| 47 |
+
$$
|
| 48 |
+
s = \underset { S : \mathcal { X } S } { \arg \operatorname* { m a x } } I ( \pmb { \theta } ; S ( \mathbf { x } ) ) ,
|
| 49 |
+
$$
|
| 50 |
+
|
| 51 |
+
where $S$ is deterministic mapping and $I ( \cdot ; \cdot )$ is the mutual information between random variables.
|
| 52 |
+
|
| 53 |
+
Proof. We defer the complete proof to the appendix. This proposition is a variant of Theorem 8 in (Shamir et al., 2010) with an adaption to the likelihood-free inference scenario. □
|
| 54 |
+
|
| 55 |
+
This important result suggests that we could find the sufficient statistic $\mathbf { s } = s ( \mathbf { x } )$ for a likelihood function $p ( \mathbf { x } | \pmb { \theta } )$ by maximizing the mutual information (MI) $I ( \pmb \theta ; \mathbf s ) = K L [ p ( \pmb \theta , \mathbf s ) \| p ( \pmb \theta ) p ( \mathbf s ) ]$ between $\pmb \theta$ and s. Moreover, as our interest is in maximizing MI rather than knowing its precise value,
|
| 56 |
+
|
| 57 |
+

|
| 58 |
+
Figure 1: Left. Traditional likelihood-free inference algorithm needs handcrafted design of summary statistic, which requires expert knowledge. Right. Our method automatically mines a low dimensional, near-sufficient statistic s of $\mathbf { x }$ via the infomax principle, which removes the need for careful summary statistic design. Furthermore, this statistics can be re-learned as the posterior inference proceeds.
|
| 59 |
+
|
| 60 |
+
we can maximize a non-KL surrogate, which may have an advantage in e.g. estimation accuracy or computational efficiency (Székely et al., 2014; Hjelm et al., 2018; Ozair et al., 2019). To this end, we utilize the following two non-KL estimators:
|
| 61 |
+
|
| 62 |
+
Jensen-Shannon divergence (JSD) (Hjelm et al., 2018): this non-KL estimator is shown to be more robust than KL-based ones. More specifically, it is defined as:
|
| 63 |
+
|
| 64 |
+
$$
|
| 65 |
+
\hat { I } ^ { \mathrm { J S D } } ( \pmb \theta ; \mathbf s ) = \operatorname* { s u p } _ { T : \Theta \times S \mathbb { R } } \mathbb { E } _ { p ( \pmb \theta , \mathbf s ) } [ - \mathrm { s p } ( - T ( \pmb \theta , \mathbf s ) ) ] - \mathbb { E } _ { p ( \pmb \theta ) p ( \mathbf s ) } [ \mathrm { s p } ( T ( \pmb \theta , \mathbf s ) ) ] ,
|
| 66 |
+
$$
|
| 67 |
+
|
| 68 |
+
where $\operatorname { s p } ( t ) = \log ( 1 + \exp ( t ) )$ is the softplus function. With this estimator, we set up the following objective for learning the sufficient statistics, which simultaneously estimates and maximizes the MI:
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
\operatorname* { m a x } _ { S , T } \mathcal { L } ( S , T ) = \mathbb { E } _ { p ( \pmb { \theta } , \mathbf { x } ) } \left[ - \operatorname { s p } \left( - T ( \pmb { \theta } , S ( \mathbf { x } ) ) \right) \right] - \mathbb { E } _ { p ( \pmb { \theta } ) p ( \mathbf { x } ) } \left[ \operatorname { s p } \left( T ( \pmb { \theta } , S ( \mathbf { x } ) ) \right] , \right.
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+
where the two deterministic mappings $S$ and $T$ are parameterized by two neural networks. Note that we have used the law of the unconscious statistician (LOTUS) from equation 3 to equation 4. The mini-batch version of this objective is given in the appendix.
|
| 75 |
+
|
| 76 |
+
Distance correlation (DC) (Székely et al., 2014): unlike the JSD estimator, this estimator does not need to learn an additional network $T$ , and can be learned much faster. It is defined as:
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
\hat { I } ^ { \mathrm { D C } } ( \pmb { \theta } ; \mathbf { s } ) = \frac { \mathbb { E } _ { p ( \pmb { \theta } , \mathbf { s } ) p ( \pmb { \theta } ^ { \prime } , \mathbf { s } ^ { \prime } ) } \left[ h ( \pmb { \theta } , \pmb { \theta } ^ { \prime } ) h ( \mathbf { s } , \mathbf { s } ^ { \prime } ) \right] } { \sqrt { \mathbb { E } _ { p ( \pmb { \theta } ) p ( \pmb { \theta } ^ { \prime } ) } \left[ h ^ { 2 } ( \pmb { \theta } , \pmb { \theta } ^ { \prime } ) \right] } \cdot \sqrt { \mathbb { E } _ { p ( \mathbf { s } ) p ( \mathbf { s } ^ { \prime } ) } \left[ h ^ { 2 } ( \mathbf { s } , \mathbf { s } ^ { \prime } ) \right] } } ,
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
where h $( \mathbf { a } , \mathbf { b } ) = \| \mathbf { a } - \mathbf { b } \| - \mathbb { E } _ { p ( \mathbf { b } ^ { \prime } ) } [ \| \mathbf { a } - \mathbf { b } ^ { \prime } \| ] - \mathbb { E } _ { p ( \mathbf { a } ^ { \prime } ) } [ \| \mathbf { a } ^ { \prime } - \mathbf { b } \| ] + \mathbb { E } _ { p ( \mathbf { a } ^ { \prime } ) p ( \mathbf { b } ^ { \prime } ) } [ \| \mathbf { a } ^ { \prime } - \mathbf { b } ^ { \prime } \| ]$ . Similar to the case of the JSD estimator, we set up the following objective for learning the sufficient statistics:
|
| 83 |
+
|
| 84 |
+
$$
|
| 85 |
+
\operatorname* { m a x } _ { S } \ \mathcal { L } ( S ) = \frac { \mathbb { E } _ { p ( \pmb { \theta } , \mathbf { x } ) p ( \pmb { \theta } ^ { \prime } , \mathbf { x } ^ { \prime } ) } [ h ( \pmb { \theta } , \pmb { \theta } ^ { \prime } ) h ( S ( \mathbf { x } ) , S ( \mathbf { x } ^ { \prime } ) ) ] } { \sqrt { \mathbb { E } _ { p ( \pmb { \theta } ) p ( \pmb { \theta } ^ { \prime } ) } [ h ^ { 2 } ( \pmb { \theta } , \pmb { \theta } ^ { \prime } ) ] \cdot } \sqrt { \mathbb { E } _ { p ( \mathbf { x } ) p ( \mathbf { x } ^ { \prime } ) } [ h ^ { 2 } ( S ( \mathbf { x } ) , S ( \mathbf { x } ^ { \prime } ) ) ] } } ,
|
| 86 |
+
$$
|
| 87 |
+
|
| 88 |
+
where the deterministic mapping $S$ is parameterized by a neural network. Again LOTUS is used from equation 5 to equation 6. The mini-batch version of this objective is given in the appendix.
|
| 89 |
+
|
| 90 |
+
A comparison between the accuracy and efficiency of these two MI estimators (as well as other estimators (Belghazi et al., 2018; Ozair et al., 2019)) for infomax statistics learning is in the appendix.
|
| 91 |
+
|
| 92 |
+
With enough training samples and powerful neural networks, we can obtain near-sufficient statistics with either $s = \arg \operatorname* { m a x } _ { S } \operatorname* { m a x } _ { T } { \mathcal { L } } ( S , T )$ or $s = \arg \operatorname* { m a x } _ { S } \mathcal { L } ( S )$ , depending on the estimator. The statistic s of data $\mathbf { x }$ is then given by
|
| 93 |
+
|
| 94 |
+
$$
|
| 95 |
+
\begin{array} { r } { \mathbf { s } = s ( \mathbf { x } ) . } \end{array}
|
| 96 |
+
$$
|
| 97 |
+
|
| 98 |
+
In the above construction, we have not specified the form of the networks $S$ and $T$ . For $S$ , any prior knowledge about the data $\mathbf { x }$ could in principle be incorporated into its design. For example, for sequential data we can realize $S$ as a transformer (Vaswani et al., 2017), and for exchangeable data we can realize $S$ as a exchangeable neural network (Chan et al., 2018). Here we simply adopt a fully-connected architecture for $S$ , and leave the problem-specific design of $S$ as future work. For $T$ , we choose it to be a split architecture $T ( \pmb \theta , S ( \mathbf x ) ) = T ^ { \prime } ( \bar { H } ( \pmb \theta ) , S ( \mathbf x ) )$ where $T ^ { \prime } ( \cdot , \cdot ) , H ( \cdot )$ are both MLPs. Therefore we separately learn low-dimensional representations for $\mathbf { x }$ and $\pmb \theta$ before processing them together. This could be seen as that we incorporate the inductive bias into the design of the networks that $\mathbf { x }$ and $\pmb \theta$ should not interact with each other directly, based on their true relationship (for example, consider the likelihood function of exponential family: $L ( \pmb \theta ; \mathbf x ) \propto \mathrm { e x p } ( H ( \pmb \theta ) ^ { \top } S ( \mathbf x ) ) ^ { \top }$ .
|
| 99 |
+
|
| 100 |
+
We are left with the problem of how to select $d$ , the dimensionality of the sufficient statistics. The Pitman-Koopman-Darmois theorem (Koopman, 1936) tells us that sufficient statistics with fixed dimensionality only exists for exponential family, so there is no universal way to select $d$ . Here, we propose to use the following simple heuristics to determine $d$ :
|
| 101 |
+
|
| 102 |
+
$$
|
| 103 |
+
d = 2 K
|
| 104 |
+
$$
|
| 105 |
+
|
| 106 |
+
where $K$ is the dimensionality of $\pmb \theta$ (which typically satisfies $K \ll D$ ). The rationale behind this heuristics is that the dimensionality of the sufficient statistics in the exponential family is $K$ , and exponential family has been proven reasonably accurate for posterior approximation (see e.g. Thomas et al., 2021; Pacchiardi & Dutta, 2020). By doubling the dimensionality of the statistics to $2 K$ we are likely to have a better representative power than the exponential family while still keeping $d$ small.
|
| 107 |
+
|
| 108 |
+
Furthermore, we have the following proposition comparing our method to the existing posteriormean-as-statistic approaches (Fearnhead & Prangle, 2012; Jiang et al., 2017).
|
| 109 |
+
|
| 110 |
+
Proposition 2. Let $\pmb \theta \sim p ( \pmb \theta )$ and $\mathbf { x } \sim p ( \mathbf { x } | \pmb { \theta } )$ . Let $s ( \cdot )$ be a deterministic function that satisfies
|
| 111 |
+
|
| 112 |
+
$$
|
| 113 |
+
s = \underset { S : \mathscr { X } S } { \arg \operatorname* { m i n } } \mathbb { E } _ { p ( \pmb { \theta } , \mathbf { x } ) } [ \| S ( \mathbf { x } ) - \pmb { \theta } \| _ { 2 } ^ { 2 } ] ,
|
| 114 |
+
$$
|
| 115 |
+
|
| 116 |
+
then $\mathbf { s } = s ( \mathbf { x } )$ is generally not a maximizer of $I ( S ( { \bf x } ) ; \mathbf { \pmb \theta } )$ and hence it is not a sufficient statistic.
|
| 117 |
+
|
| 118 |
+
Proof. We defer the proof to the appendix.
|
| 119 |
+
|
| 120 |
+
This proposition tells us that unlike our method, the existing (posterior-)mean-as-statistic approaches widely used in likelihood-free inference community lose information about the posterior, and it is only optimal for predicting the posterior mean (Fearnhead & Prangle, 2012; Jiang et al., 2017). When using this statistics in inference, it may yield inaccurate estimates of e.g. the posterior uncertainty. Nonetheless which statistics to use depends on the task, e.g. full posterior vs. point estimation.
|
| 121 |
+
|
| 122 |
+
# 3.2 DYNAMIC STATISTICS-POSTERIOR LEARNING
|
| 123 |
+
|
| 124 |
+
The above neural sufficient statistic could, in principle, be learned via a pilot run before the inference starts, as, for example, done in the work by Drovandi et al. (2011); Fearnhead & Prangle (2012); Jiang et al. (2017). Such a strategy requires extra simulation cost, and the learned statistic is kept fixed during inference. We propose a dynamic learning strategy below to overcome these limitations.
|
| 125 |
+
|
| 126 |
+
Our idea is to jointly learn the statistic and the posterior in multiple rounds. More concretely, at round $j$ , we use the current statistic $s ( \cdot )$ to build the $j$ -th estimate to the posterior: $q _ { j } ( \pmb \theta | \mathbf s _ { o } ) \tilde { \approx } \pi ( \pmb \theta | \mathbf x _ { o } )$ , and at round $j { + } 1$ , this estimate is used as the new proposal distribution to simulate data: $p _ { j + 1 } ( \pmb \theta ) $ $q _ { j } ( \pmb \theta | \mathbf s _ { o } ) , \pmb \theta _ { i } \sim p _ { j + 1 } ( \pmb \theta ) , \mathbf x _ { i } \sim p ( \mathbf x | \pmb \theta _ { i } )$ . We then re-learn $s ( \cdot )$ and $q ( \cdot )$ with all the data up to the new round. In this process, $s ( \cdot )$ and $q ( \cdot )$ refine each other: a good $s ( \cdot )$ helps to learn $q ( \cdot )$ more accurately, whereas an improved $q ( \cdot )$ as a better proposal in turn helps to learn $s ( \cdot )$ more efficiently.
|
| 127 |
+
|
| 128 |
+
The theoretical basis of this multi-rounds strategy is provided by Proposition 1, which tells us that the sufficiency of the learned statistics is insensitive to the choice of $p ( \pmb \theta )$ , the marginal distribution of $\pmb \theta$ in sampled data $\mathcal { D } = \{ \mathbf { x } _ { i } , \pmb { \theta } _ { i } \} _ { i = 1 } ^ { n j }$ . This means that we are indeed safe to use any proposal distribution $p _ { l } ( \pmb \theta )$ at any round $l$ in multi-rounds learning, and in such case $p ( \pmb \theta )$ after round $j$ will be a mixture distribution formed by the proposal distributions of the previous rounds, i.e. $\begin{array} { r } { p ( \pmb { \theta } ) = \frac { 1 } { j } \sum _ { l = 1 } ^ { j } p _ { l } ( \pmb { \theta } ) } \end{array}$ .
|
| 129 |
+
|
| 130 |
+
# Algorithm 1 SMC-ABC+
|
| 131 |
+
|
| 132 |
+
# Algorithm 2 SNL+
|
| 133 |
+
|
| 134 |
+
Input: prior $\pi ( \pmb \theta )$ , observed data $\mathbf { x } _ { o }$
|
| 135 |
+
Output: estimated posterior ${ \hat { \pi } } ( \pmb { \theta } | \mathbf { x } ^ { o } )$
|
| 136 |
+
Initialization: ${ \mathcal { D } } = \emptyset , p _ { 1 } ( \pmb \theta ) = \pi ( \pmb \theta )$
|
| 137 |
+
for $j$ in 1 to $r$ do repeat sample $\pmb \theta _ { i } \sim p _ { j } ( \pmb \theta )$ ; simulate $\mathbf { x } _ { i } \sim \mathbf { \bar { p } } ( \mathbf { x } | \pmb \theta _ { i } )$ ; until $n$ samples $\mathcal { D } \mathcal { D } \cup \{ { \mathbf { \bar { \theta } } } _ { i } , { \mathbf { x } } _ { i } \} _ { i = 1 } ^ { n }$ fit statistic net $s ( \cdot )$ with $\mathcal { D }$ by equation 4 ; sort $\mathcal { D }$ according to $\| s ( \mathbf { x } _ { i } ) - s ( \mathbf { x } _ { o } ) \|$ ; fit $p ( \pmb { \theta } | \mathbf { s } _ { o } )$ with the top $m \pmb { \theta } \mathbf { s }$ in $\mathcal { D }$ ; $\begin{array} { r } { q _ { j } ( \pmb { \theta } | \mathbf { s } _ { o } ) \propto p ( \pmb { \theta } | \mathbf { s } _ { o } ) \pi ( \pmb { \theta } ) / \sum _ { l } ^ { j } p _ { l } ( \pmb { \theta } ) ; } \end{array}$ $\dot { p _ { j + 1 } } ( \pmb { \theta } ) q _ { j } ( \pmb { \theta } | \mathbf { s } _ { o } )$ ;
|
| 138 |
+
end for
|
| 139 |
+
return ${ \hat { \pi } } ( \pmb { \theta } | \mathbf { x } _ { o } ) = q _ { r } ( \pmb { \theta } | \mathbf { s } _ { o } )$
|
| 140 |
+
Input: prior $\pi ( \pmb \theta )$ , observed data $\mathbf { x } _ { o }$
|
| 141 |
+
Output: estimated posterior ${ \hat { \pi } } ( \pmb { \theta } | \mathbf { x } ^ { o } )$
|
| 142 |
+
Initialization: $\mathcal { D } = \emptyset , p _ { 1 } ( \pmb \theta ) = \pi ( \pmb \theta )$
|
| 143 |
+
for $j$ in 1 to $r$ do repeat sample $\pmb \theta _ { i } \sim p _ { j } ( \pmb \theta )$ ; simulate $\mathbf { x } _ { i } \sim \mathbf { \bar { \rho } } p ( \mathbf { x } | \pmb { \theta } _ { i } )$ ; until $\mathcal { D } \mathcal { D } \cup \{ { \mathbf { \bar { \theta } } } _ { i } , { \mathbf { x } } _ { i } \} _ { i = 1 } ^ { n }$ $n$ samples fit statistic net $s ( \cdot )$ with $\mathcal { D }$ by equation 4; convert $\mathcal { D }$ with the learned $s ( \cdot )$ ; fit $q ( \mathbf { s } | \pmb { \theta } )$ with converted $\mathcal { D }$ by equation 11; $q _ { j } ( \pmb \theta | \mathbf s _ { o } ) \propto \pi ( \pmb \theta ) \cdot q ( \mathbf s _ { o } | \pmb \theta )$ ; $\dot { p _ { j + 1 } } ( \pmb { \theta } ) q _ { j } ( \pmb { \theta } | \mathbf { s } _ { o } )$ ;
|
| 144 |
+
end for
|
| 145 |
+
return $\hat { \pi } ( \pmb { \theta } | \mathbf { x } _ { o } ) = q _ { r } ( \pmb { \theta } | \mathbf { s } _ { o } )$
|
| 146 |
+
|
| 147 |
+
In practice, any likelihood-free inference algorithm that learns the posterior sequentially naturally fits well within the above joint statistic-posterior learning strategy. Here we study two such instances:
|
| 148 |
+
|
| 149 |
+
Sequential Monte Carlo ABC (SMC-ABC) (Beaumont et al., 2009). This classical algorithm learns the posterior in a non-parametric way within multiple rounds. Here, we consider a variant of it to better make use of the above neural sufficient statistic, and to re-use all previous simulated data. The new SMC-ABC algorithm estimates the posterior $q _ { j } ( \pmb { \theta } | \mathbf { s } _ { o } )$ at the $j$ -th round as follows. We first sort data in $\mathcal { D } = \{ \mathbf { x } _ { i } , \pmb { \theta } _ { i } \} _ { i = 1 } ^ { n j }$ according to the distances $\| s ( \mathbf { x } _ { i } ) - s ( \mathbf { x } _ { o } ) \|$ . We then pick the top- $. m \pmb { \theta } \mathrm { { s } }$ whose corresponding distances are the smallest. The picked ${ \pmb \theta } \mathrm { s }$ then follow $\pmb { \theta } \sim p ( \pmb { \theta } \mid \mathbf { s } _ { o } )$ as below:
|
| 150 |
+
|
| 151 |
+
$$
|
| 152 |
+
p ( \pmb \theta | \mathbf { s } _ { o } ) \propto \sum _ { l = 1 } ^ { j } p _ { l } ( \pmb \theta ) \cdot \operatorname* { P r } \bigl ( \lVert \mathbf { s } - \mathbf { s } _ { o } \rVert < \epsilon | \pmb \theta \bigr ) ,
|
| 153 |
+
$$
|
| 154 |
+
|
| 155 |
+
where the threshold $\epsilon$ is implicitly defined by the ratio $\textstyle { \frac { m } { n j } }$ (which automatically goes to zero as $j \to \infty ,$ ). We then fit $p ( \pmb { \theta } | \mathbf { s } _ { o } )$ with the collected $\pmb { \theta \mathrm { s } }$ by a flexible parametric model (e.g. a Gaussian copula), with which we can obtain the $j$ -th estimate to the posterior by importance (re-)weighting:
|
| 156 |
+
|
| 157 |
+
$$
|
| 158 |
+
q _ { j } ( \pmb \theta \mid \mathbf { s } _ { o } ) \propto p ( \pmb \theta \mid \mathbf { s } _ { o } ) \pi ( \pmb \theta ) / \sum _ { l = 1 } ^ { j } p _ { l } ( \pmb \theta ) .
|
| 159 |
+
$$
|
| 160 |
+
|
| 161 |
+
The whole procedure of this new inference algorithm, SMC-ABC+, is summarized in Algorithm 1.
|
| 162 |
+
|
| 163 |
+
Sequential Neural Likelihood (SNL) (Papamakarios et al., 2019). This recent algorithm learns the posterior in a parametric way, also in multiple rounds. The original SNL method approximates the likelihood function $p ( \mathbf { x } | \pmb { \theta } )$ by a conditional neural density estimator $q ( \mathbf { x } | \pmb { \theta } )$ , which could be difficult to learn if the dimensionality of $\mathbf { x }$ is high. Here, we alleviate such difficulty with our neural statistic. The new SNL algorithm estimates the posterior $q _ { j } ( \pmb { \theta } | \mathbf { s } _ { o } )$ at the $j$ -th round as follows. At round $j$ , where we have $n j$ simulated data $\mathcal { D } = \{ \pmb { \theta } _ { i } , \mathbf { x } _ { i } \} _ { i = 1 } ^ { n j }$ , we fit a neural density estimator $q ( \mathbf { s } | \pmb { \theta } )$ as:
|
| 164 |
+
|
| 165 |
+
$$
|
| 166 |
+
q ( \mathbf { s } \mid { \pmb \theta } ) = \underset { { \cal Q } } { \operatorname { a r g m a x } } \sum _ { i = 1 } ^ { n j } \log Q ( s ( \mathbf { x } _ { i } ) \mid { \pmb \theta } _ { i } ) ,
|
| 167 |
+
$$
|
| 168 |
+
|
| 169 |
+
where $s ( \cdot )$ is the current statistic network and $Q$ is a neural density estimator (e.g. Durkan et al. (2019); Papamakarios et al. (2017)). With $n j$ being moderately large and $Q$ flexible enough, this would yield us $q ( \mathbf { s } | \pmb { \theta } ) \approx p ( \mathbf { s } | \pmb { \theta } )$ . We then obtain the $j$ -th estimate of the posterior by Bayes rule:
|
| 170 |
+
|
| 171 |
+
$$
|
| 172 |
+
q _ { j } ( \pmb \theta \mid \mathbf s ^ { o } ) \propto \pi ( \pmb \theta ) \cdot q ( \mathbf { s } ^ { o } \mid \pmb \theta ) .
|
| 173 |
+
$$
|
| 174 |
+
|
| 175 |
+
The whole procedure of this new SNL algorithm, denoted as ${ \mathrm { S N L } } +$ , is summarized in Algorithm 2.
|
| 176 |
+
|
| 177 |
+
# 4 RELATED WORKS
|
| 178 |
+
|
| 179 |
+
Approximate Bayesian computation. ABC denotes techniques for likelihood-free inference which work by repeatedly simulating data from the model and picking those similar to the observed data to estimate the posterior (Sisson et al., 2018). Naive ABC performs simulation with the prior, whereas MCMC-ABC (Marjoram et al., 2003; Meeds et al., 2015) and SMC-ABC (Beaumont et al., 2009; Sisson et al., 2007) use informed proposals, and more advanced methods employ experimental design or active learning to accelerate the inference (Gutmann & Corander, 2016; Järvenpää et al., 2019). To measure the similarity to the observed data, it is often wise to use low-dimensional summary statistics rather than the raw data. Here we develop a way to learn compact sufficient statistics for ABC.
|
| 180 |
+
|
| 181 |
+
Neural density estimator-based inference. Apart from ABC, a recent line of research uses a conditional neural density estimator to (sequentially) learn the intractable likelihood (e.g SNL Papamakarios et al. (2019); Lueckmann et al. (2019)) or directly the posterior (e.g SNPE Papamakarios & Murray (2016); Lueckmann et al. (2017); Greenberg et al. (2019)). Likelihood-targeting approaches have the advantage that they could readily make use of any proposal distribution in sequential learning, but they rely on low-dimensional, well-chosen summary statistic. Posterior-targeting methods on the contrary need no design of summary statistic, but they require non-trivial efforts to facilitate sequential learning. Our approach (e.g SNL+) can be seen as taking the advantages from both worlds.
|
| 182 |
+
|
| 183 |
+
Automatic construction of summary statistics. A set of works have been proposed to automatically construct low-dimensional summary statistics. Two lines of them are most related to our approach. The first line (Fearnhead & Prangle, 2012; Jiang et al., 2017; Chan et al., 2018; Wiqvist et al., 2019; Dinev & Gutmann, 2018) train a neural network to predict the posterior mean and use this prediction as the summary statistic. These mean-as-statistic approaches, as analyzed previously in Proposition 2, indeed do not guarantee sufficiency. Rather than taking the predicted mean, the works (Alsing et al., 2018; Brehmer et al., 2020) take the score function $\nabla _ { \pmb \theta } \log p ( \mathbf { x } | \pmb \theta ) | _ { \pmb \theta = \pmb \theta ^ { * } }$ around some fiducial parameter $\pmb { \theta } ^ { * }$ as the summary statistic. However, these score-as-statistic methods are only locally sufficient around $\pmb { \theta } ^ { * }$ . Our approach differs from all these methods as it is globally sufficient for all $\pmb \theta$ .
|
| 184 |
+
|
| 185 |
+
MI and ratio estimation. It has been shown in the literature that many variational MI estimators $I ( X ; Y )$ also estimate the ratio $p ( X , Y ) / p ( X ) p ( Y )$ up to a constant (Nowozin et al., 2016; Nguyen et al., 2010). Therefore our MI-based statistic learning method is closely related to ratio estimating approaches to posterior inference (Hermans et al., 2020; Thomas et al., 2021). The differences are 1) we decouple the task of statistics learning from the task of density estimation for LFI, which grants us the privilege to use any infomax representation learning methods that are ratio-free (Székely et al., 2014; Ozair et al., 2019); and 2) even if we do estimate the ratio, we do this in the low-dimensional space based on a sufficient statistics perspective, which is typically easier than in the original space.
|
| 186 |
+
|
| 187 |
+
# 5 EXPERIMENTS
|
| 188 |
+
|
| 189 |
+
# 5.1 SETUP
|
| 190 |
+
|
| 191 |
+
Baselines. We apply the proposed statistics to two aforementioned likelihood-free inference methods: (i) SMC-ABC (Beaumont et al., 2009) and (ii) SNL (Papamakarios et al., 2019). We compare the performance of the algorithms augmented with our neural statistics (dubbed as SMC-ABC $^ +$ and ${ \mathrm { S N L } } +$ ) to their original versions as well as the versions based on expert-designed statistics (details presented later; we call the corresponding methods SMC-ABC’ and SNL’). We also compare to the sequential neural posterior estimate (SNPE) method1 which needs no statistic design, as well as the sequential ratio estimate (SRE) method (Hermans et al., 2020) which is closely related to our MI-based method2. All methods are run for 10 rounds with 1,000 simulations each. The results presented below are for the JSD estimator; the DC estimator achieves similar accuracy (see appendix).
|
| 192 |
+
|
| 193 |
+
Evaluation metric. To assess the quality of the estimated posterior, we compare the Jensen-Shannon divergence (JSD) between the approximate posterior $Q$ and the true posterior $P$ for each method
|
| 194 |
+
|
| 195 |
+

|
| 196 |
+
|
| 197 |
+
Figure 2: Ising model. (a) The 64D observed data $\mathbf { x } _ { o } \in \{ - 1 , 1 \} ^ { 6 4 }$ . (b) The JSD between the true and the learned posteriors. (c) The relationship between the learned statistics and the sufficient statistic.
|
| 198 |
+
|
| 199 |
+
<table><tr><td>SMC'</td><td>SMC+</td><td>SNL'</td><td>SNL+</td><td>SRE</td><td>SNPE</td></tr><tr><td>0.008 ± 0.006</td><td>0.046 ± 0.051</td><td>0.007 ± 0.002</td><td>0.015 ±0.011</td><td>0.083 ± 0.029</td><td>0.058 ± 0.039</td></tr></table>
|
| 200 |
+
|
| 201 |
+
Table 1: Ising model. The JSD between the learned and true posterior with 10,000 simulations. Here SMC’ and SNL’ utilize the ground-truth sufficient statistics guided by human prior knowledge.
|
| 202 |
+
|
| 203 |
+
(see appendix). For the problems we consider, the true posterior $P$ is either analytically available, or can be accurately approximated by a standard rejection ABC algorithm (Pritchard et al., 1999) with known low-dimensional sufficient statistic (e.g $s ( \mathbf { x } ) \in \mathbb { Z }$ ) and extensive simulations $\mathrm { ( e . g 1 0 ^ { 6 } ) }$ ).
|
| 204 |
+
|
| 205 |
+
# 5.2 RESULTS
|
| 206 |
+
|
| 207 |
+
We demonstrate the effectiveness of our method on three models: (a) an Ising model; (b) a Gaussian copula model; (c) an Ornstein-Uhlenbeck process. The Ising model does not have an analytical likelihood but the posterior can be approximated accurately by rejection ABC due to the existence of low-dimensional, discrete sufficient statistic. The last two models have analytical likelihoods and hence analytical posteriors. These models cover the cases of graph data, i.i.d data and sequence data.3
|
| 208 |
+
|
| 209 |
+
Ising model. The first model we consider is a mathematical model in statistical physics that describes the states of atomic spins on a $8 \times 8$ lattice (see Figure 1(a)). Each spin has two states described by a discrete random variable $x _ { i } \in \{ - 1 , + 1 \}$ , and is only allowed to interact with its neighbour. Given parameters $\pmb { \theta } = \{ \theta _ { 1 } , \theta _ { 2 } \}$ , the probability density function of the Ising model is:
|
| 210 |
+
|
| 211 |
+
$$
|
| 212 |
+
p ( \mathbf { x } | \pmb { \theta } ) \propto \mathrm { e x p } ( - H ( \mathbf { x } ; \pmb { \theta } ) ) ,
|
| 213 |
+
$$
|
| 214 |
+
|
| 215 |
+
$$
|
| 216 |
+
H ( \mathbf { x } ; \pmb { \theta } ) = - \theta _ { 1 } \sum _ { \langle i , j \rangle } x _ { i } x _ { j } - \theta _ { 2 } \sum _ { i } x _ { i } .
|
| 217 |
+
$$
|
| 218 |
+
|
| 219 |
+
where $\langle i , j \rangle$ denotes that spin $i$ and spin $j$ are neighbours. $H$ is also called the Hamiltonian of the model. The likelihood function of this model is not analytical due to the intractable normalizing constant $\begin{array} { r } { Z ( \pmb { \theta } ) = \sum _ { \mathbf { x } \in \{ - 1 , 1 \} ^ { m \cdot m } } \exp [ - H ( \mathbf { x } ; \pmb { \theta } ) ] } \end{array}$ . However, sampling from the model by MCMC is possible. Note that the sufficient statistics are known for this model: $\begin{array} { r } { s ^ { * } ( \mathbf { x } ) = \{ \sum _ { \langle i , j \rangle } x _ { i } x _ { j } , \sum _ { i } x _ { i } \} . } \end{array}$ . The true posterior can easily be approximated by rejection ABC with the low-dimensional sufficient statistics and extensive simulations. Here, we assume that $\theta _ { 2 }$ is known, and the task is to infer the posterior of $\theta _ { 1 }$ under an uniform prior $\theta _ { 1 } \sim \mathcal { U } ( 0 , 1 . 5 )$ (in this case the sufficient statistic becomes only 1D: $\begin{array} { r } { s ^ { * } ( \mathbf { x } ) = \sum _ { \langle i , j \rangle } x _ { i } x _ { j } ) } \end{array}$ . The true parameters are $\pmb { \theta } ^ { * } = \{ 0 . 3 , 0 . 1 \}$ .
|
| 220 |
+
|
| 221 |
+
In Figure 1(c), we investigate whether the proposed statistic could achieve sufficiency. Ideally, if the learned statistic $s$ in our method does recover the true sufficient statistic $s ^ { * }$ well, the relationship between $s$ and $s ^ { * }$ should be nearly monotonic (note that both $s$ and $s ^ { * }$ are here 1D). To verify this,
|
| 222 |
+
|
| 223 |
+

|
| 224 |
+
|
| 225 |
+
Figure 3: Gaussian copula. (a) The observed data $\mathbf { x } _ { o }$ in this problem, which is comprised of a population of 200 i.i.d samples. (b) The JSD between the true/learned posteriors. (c) The contours.
|
| 226 |
+
|
| 227 |
+
<table><tr><td>SMC'</td><td>SMC+</td><td>SNL'</td><td>SNL+</td><td>SRE</td><td>SNPE</td></tr><tr><td>0.183± 0.014</td><td>0.047±0.009</td><td>0.054± 0.016</td><td>0.042 ± 0.006</td><td>0.052 ± 0.032</td><td>0.037 ± 0.018</td></tr></table>
|
| 228 |
+
|
| 229 |
+
Table 2: Gaussian copula. The JSD between the learned and true posterior with 10,000 simulations.
|
| 230 |
+
Here SMC’ and SNL’ utilize the hand-crafted summary statistics guided by human prior knowledge.
|
| 231 |
+
|
| 232 |
+
we plot the relationship between $s ^ { * }$ and $s$ . We see from the figure that $s$ learned by our method does, approximately, increase monotonically with $s ^ { * }$ , suggesting that $s$ recovers $s ^ { * }$ reasonably well. In comparison, the statistics learned with the widely-used posterior-mean-as-statistics approach only weakly depends on the true sufficient statistic; it is nearly indistinguishable for different $s ^ { * }$ . In other words, it loses sufficiency. The result empirically verifies our theoretical result in Proposition 2.
|
| 233 |
+
|
| 234 |
+
Figure 1(b) further shows the JSD between the true and learned posterior for different methods across the rounds (the vertical lines indicates standard derivation, each JSD is obtained by calculating the average of 5 independent runs. The results shown in the below experiments have the same setup). It can be seen from the figure that for this model, likelihood-free inference methods augmented with the proposed statistic $( \mathbf { S } \mathbf { M } \mathbf { C } \mathbf { - } \mathbf { A } \mathbf { B } \mathbf { C } + \mathbf { \Gamma }$ , ${ \mathrm { S N L } } +$ ) outperform their original counterparts (SMC-ABC, SNL) by a large margin. In Table 1, we further compare our statistics with the expert designed statistics, from which one can see their close performance (here the expert statistics is taken as the true sufficient statistics $\mathbf { s } ^ { * }$ ). We further see that our method also outperforms SRE which directly estimates the ratio $t ( \mathbf { x } , \pmb \theta ) = p ( \mathbf { x } , \pmb \theta ) / p ( \mathbf { x } ) p ( \pmb \theta ) \propto L ( \pmb \theta ; \mathbf { x } )$ in high-dimensional space (note that the true likelihood is of the form $L ( \pmb \theta ; \mathbf x ) = \exp ( \pmb \theta s ^ { * } ( \mathbf x ) ) / Z ( \pmb \theta ) )$ as well as SNPE (version B). The reason why SNPE(-B) does not perform more satisfactorily might be that it relies on importance weights to facilitate sequential learning, which can induce high variance that makes the training unstable.
|
| 235 |
+
|
| 236 |
+
Gaussian copula. The second model we consider is a 2D Gaussian copula model (Chen & Gutmann, 2019). Data $\mathbf { x }$ for this model can be generated with aid of a latent variable $\mathbf { z }$ as follows:
|
| 237 |
+
|
| 238 |
+
$$
|
| 239 |
+
\mathbf { z } \sim { \mathcal { N } } { \Big ( } \mathbf { z } ; \mathbf { 0 } , { \Big [ } { \big ] } _ { \theta _ { 3 } } ^ { 1 , \quad \theta _ { 3 } { \Big ] } } { \Big ) } ,
|
| 240 |
+
$$
|
| 241 |
+
|
| 242 |
+
$$
|
| 243 |
+
x _ { 1 } = F _ { 1 } ^ { - 1 } ( \Phi ( z _ { 1 } ) ; \theta _ { 1 } ) , \quad x _ { 2 } = F _ { 2 } ^ { - 1 } ( \Phi ( z _ { 2 } ) ; \theta _ { 2 } ) ,
|
| 244 |
+
$$
|
| 245 |
+
|
| 246 |
+
$$
|
| 247 |
+
f _ { 1 } ( x _ { 1 } ; \theta _ { 1 } ) = \mathrm { B e t a } ( x _ { 1 } ; \theta _ { 1 } , 2 ) , \quad f _ { 2 } ( x _ { 2 } ; \theta _ { 2 } ) = \theta _ { 2 } { \cal N } ( x _ { 2 } ; 1 , 1 ) + ( 1 - \theta _ { 2 } ) { \cal N } ( x _ { 2 } ; 4 , 1 / 4 ) .
|
| 248 |
+
$$
|
| 249 |
+
|
| 250 |
+
where $\Phi ( \cdot ) , F _ { 1 } ( x _ { 1 } ; \theta _ { 1 } ) , F _ { 2 } ( x _ { 2 } ; \theta _ { 2 } )$ are the cumulative distribution function (CDF) of the standard normal distribution, the CDF of total number of 200 samples athat serves as our observed data. $f _ { 1 } ( x _ { 1 } ; \theta _ { 1 } )$ and the CDF of wn from this mo the likelihood o $f _ { 2 } ( x _ { 2 } ; \theta _ { 2 } )$ respectively. Weng a population el can be comput $\mathbf { X } = \{ \mathbf { x } _ { i } \} _ { i = 1 } ^ { 2 0 0 }$ by the law of variable transformation. To perform inference, we compute a rudimentary statistic to describe $\mathbf { X }$ , namely (a) the 20-equally spaced quantiles of the marginal distributions of $\mathbf { X }$ and (b) the correlation between the latent variables $z _ { 1 } , z _ { 2 }$ in $\mathbf { X }$ , resulting in a statistic of dimensionality 41. A uniform prior is used: $\theta _ { 1 } \sim \mathcal { U } ( 0 . 5 , 1 2 . 5 ) , \theta _ { 2 } \sim \mathcal { U } ( 0 , 1 ) , \theta _ { 3 } \sim \mathcal { U } ( 0 . 4 , 0 . 8 )$ and $\pmb { \theta } ^ { * } = \{ 6 , 0 . 5 , 0 . 6 \}$ .
|
| 251 |
+
|
| 252 |
+
In Figure $2 ( \mathbf { b } )$ , we demonstrate the power of our neural sufficient statistic learning method on the Gaussian copula problem. Overall, we see that the proposed method improves the accuracy of existing likelihood-free inference methods, as well as their robustness, see e.g. the reduced variability for ${ \mathrm { S N L } } +$ (the high variability in SNL may be due to the lack of training data required to learn the 41-dimensional likelihood function well). This is also confirmed by the contours plots in Figure 2(c). In Table 2 we further compare the proposed statistic with the expert-designed low-dimension statistic (here the expert statistic is taken to be the 5-equally spaced marginal quantiles and the correlations between $z _ { 1 } , z _ { 2 } )$ , from which we see that our proposed statistic achieves a better performance. For this model, the average performance of our method is slightly worse than that of SNPE. However, SNPE has a higher variability, so that the difference in performance is actually not significant.
|
| 253 |
+
|
| 254 |
+

|
| 255 |
+
|
| 256 |
+
Figure 4: OU process. (a) The observed time-series data $\mathbf { x } _ { o } = \{ x _ { t } \} _ { t = 1 } ^ { 5 0 }$ . (b) The JSD between the true and the learned posteriors. (c) The contours of the true posterior and the learned posteriors.
|
| 257 |
+
Table 3: OU process. The JSD between the learned and the true posterior with 10,000 simulations. Here SMC’ and SNL’ utilize the hand-crafted summary statistics guided by human prior knowledge.
|
| 258 |
+
|
| 259 |
+
<table><tr><td>SMC'</td><td>SMC+</td><td>SNL'</td><td>SNL+</td><td>SRE</td><td>SNPE</td></tr><tr><td>0.040 ± 0.006</td><td>0.044± 0.018</td><td>0.004 ± 0.001</td><td>0.009 ±0.002</td><td>0.022 ± 0.013</td><td>0.019 ± 0.009</td></tr></table>
|
| 260 |
+
|
| 261 |
+
Ornstein-Uhlenbeck process. The last model we consider is a stochastic differential equation (SDE). Data $\mathbf { x } = \{ x _ { t } \} _ { t = 1 } ^ { D }$ in this model is sequentially generated as:
|
| 262 |
+
|
| 263 |
+
$$
|
| 264 |
+
\boldsymbol { x } _ { t + 1 } = \boldsymbol { x } _ { t } + \Delta \boldsymbol { x } _ { t } ,
|
| 265 |
+
$$
|
| 266 |
+
|
| 267 |
+
$$
|
| 268 |
+
\Delta x _ { t } = \theta _ { 1 } ( \exp ( \theta _ { 2 } ) - x _ { t } ) \Delta t + 0 . 5 \epsilon , \quad \epsilon \sim \mathcal { N } ( \epsilon ; 0 , \Delta t ) .
|
| 269 |
+
$$
|
| 270 |
+
|
| 271 |
+
where $D = 5 0$ , $\Delta t = 0 . 2$ and $x _ { 0 } = 1 0$ . This SDE can be simulated by the Euler-Maruyama method, and has an analytical likelihood. It has a wide application in financial mathematics and the physical sciences. Here, the parameters of interest are $\pmb { \theta } = \{ \theta _ { 1 } , \theta _ { 2 } \}$ , and a uniform prior is placed on them: $\theta _ { 1 } \sim \mathcal { U } ( 0 , 1 ) , \theta _ { 1 } \sim \bar { \mathcal { U } } ( - 2 . 0 , 2 . 0 )$ . The true parameters are set to be $\pmb { \theta } ^ { * } = \{ 0 . 5 , 1 . 0 \}$ .
|
| 272 |
+
|
| 273 |
+
Figure 3(b) compares the JSD of each method against the simulation cost. Again, we find that the proposed neural sufficient statistics greatly improve the performance of both SMC-ABC and SNL. In Table 3, we compare our statistics to expert statistics (here the expert statistics are taken as the mean, standard error and autocorrelation with lag 1, 2, 3 of the time series). It can be seen that our statistics perform comparably to the expert statistics. Our method also seems to outperform SRE and SNPE.
|
| 274 |
+
|
| 275 |
+
# 6 CONCLUSION
|
| 276 |
+
|
| 277 |
+
We proposed a new deep learning-based approach for automatically constructing low-dimensional sufficient statistics for likelihood-free inference. The obtained neural approximate sufficient statistics can be applied to both traditional ABC-based and recent NDE-based methods. Our main hypothesis is that learning such sufficient statistics via the infomax principle might be easier than estimating the density itself. We verify this hypothesis by experiments on various tasks with graphs, i.i.d and sequence data. Our method establishes a link between representation learning and likelihood-free inference communities. For future works, we can consider further infomax representation learning approaches, as well as more principle ways to determine the dimensionality of the sufficient statistics.
|
| 278 |
+
|
| 279 |
+
# REFERENCES
|
| 280 |
+
|
| 281 |
+
Justin Alsing, Benjamin Wandelt, and Stephen Feeney. Massive optimal data compression and density estimation for scalable, likelihood-free inference in cosmology. Monthly Notices of the Royal Astronomical Society, 477(3):2874–2885, 2018.
|
| 282 |
+
|
| 283 |
+
Ravi Bansal and Amir Yaron. Risks for the long run: A potential resolution of asset pricing puzzles. The journal of Finance, 59(4):1481–1509, 2004.
|
| 284 |
+
|
| 285 |
+
Mark A Beaumont, Jean-Marie Cornuet, Jean-Michel Marin, and Christian P Robert. Adaptive approximate Bayesian computation. Biometrika, 96(4):983–990, 2009.
|
| 286 |
+
|
| 287 |
+
Mohamed Ishmael Belghazi, Aristide Baratin, Sai Rajeshwar, Sherjil Ozair, Yoshua Bengio, Aaron Courville, and Devon Hjelm. Mutual information neural estimation. In International Conference on Machine Learning, pp. 531–540. PMLR, 2018.
|
| 288 |
+
|
| 289 |
+
Michael GB Blum, Maria Antonieta Nunes, Dennis Prangle, Scott A Sisson, et al. A comparative review of dimension reduction methods in approximate bayesian computation. Statistical Science, 28(2):189–208, 2013.
|
| 290 |
+
|
| 291 |
+
Johann Brehmer, Gilles Louppe, Juan Pavez, and Kyle Cranmer. Mining gold from implicit models to improve likelihood-free inference. Proceedings of the National Academy of Sciences, 117(10): 5242–5249, 2020.
|
| 292 |
+
|
| 293 |
+
Jeffrey Chan, Valerio Perrone, Jeffrey Spence, Paul Jenkins, Sara Mathieson, and Yun Song. A likelihood-free inference framework for population genetic data using exchangeable neural networks. In Advances in Neural Information Processing Systems, pp. 8594–8605, 2018.
|
| 294 |
+
|
| 295 |
+
Yanzhi Chen and Michael U Gutmann. Adaptive gaussian copula abc. In The 22nd International Conference on Artificial Intelligence and Statistics, pp. 1584–1592. PMLR, 2019.
|
| 296 |
+
|
| 297 |
+
Matteo Chinazzi, Jessica T Davis, Marco Ajelli, Corrado Gioannini, Maria Litvinova, Stefano Merler, Ana Pastore y Piontti, Kunpeng Mu, Luca Rossi, Kaiyuan Sun, et al. The effect of travel restrictions on the spread of the 2019 novel coronavirus (covid-19) outbreak. Science, 368(6489):395–400, 2020.
|
| 298 |
+
|
| 299 |
+
Tm Cover, Ja Thomas, and J Wiley. Elements of information theory. Tsinghua University Pres, 2003.
|
| 300 |
+
|
| 301 |
+
Peter J Diggle and Richard J Gratton. Monte Carlo methods of inference for implicit statistical models. Journal of the Royal Statistical Society. Series B, pp. 193–227, 1984.
|
| 302 |
+
|
| 303 |
+
Traiko Dinev and Michael U Gutmann. Dynamic likelihood-free inference via ratio estimation (dire). arXiv preprint arXiv:1810.09899, 2018.
|
| 304 |
+
|
| 305 |
+
Christopher C Drovandi, Anthony N Pettitt, and Malcolm J Faddy. Approximate Bayesian computation using indirect inference. Journal of the Royal Statistical Society: Series C (Applied Statistics), 60(3):317–337, 2011.
|
| 306 |
+
|
| 307 |
+
Conor Durkan, Artur Bekasov, Iain Murray, and George Papamakarios. Neural spline flows. arXiv preprint arXiv:1906.04032, 2019.
|
| 308 |
+
|
| 309 |
+
Conor Durkan, Iain Murray, and George Papamakarios. On contrastive learning for likelihood-free inference. arXiv preprint arXiv:2002.03712, 2020.
|
| 310 |
+
|
| 311 |
+
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.
|
| 312 |
+
|
| 313 |
+
David Greenberg, Marcel Nonnenmacher, and Jakob Macke. Automatic posterior transformation for likelihood-free inference. In International Conference on Machine Learning, pp. 2404–2414, 2019.
|
| 314 |
+
|
| 315 |
+
Michael Gutmann and Jukka Corander. Bayesian optimization for likelihood-free inference of simulator-based statistical models. Journal of Machine Learning Research, 17(1):4256–4302, 2016.
|
| 316 |
+
|
| 317 |
+
Joeri Hermans, Volodimir Begy, and Gilles Louppe. Likelihood-free mcmc with amortized approximate ratio estimators. In International Conference on Machine Learning, pp. 4239–4248. PMLR, 2020.
|
| 318 |
+
|
| 319 |
+
R Devon Hjelm, Alex Fedorov, Samuel Lavoie-Marchildon, Karan Grewal, Phil Bachman, Adam Trischler, and Yoshua Bengio. Learning deep representations by mutual information estimation and maximization. In International Conference on Learning Representations, 2018.
|
| 320 |
+
|
| 321 |
+
M. Järvenpää, M.U. Gutmann, A. Vehtari, and P. Marttinen. Gaussian process modeling in approximate Bayesian computation to estimate horizontal gene transfer in bacteria. Annals of Applied Statistics, 2018.
|
| 322 |
+
|
| 323 |
+
M. Järvenpää, M.U. Gutmann, A. Vehtari, and P. Marttinen. Efficient acquisition rules for modelbased approximate Bayesian computation. Bayesian Analysis, 14(2):595–622, 2019. doi: doi: 10.1214/18-BA1121.
|
| 324 |
+
|
| 325 |
+
Bai Jiang, Tung-yu Wu, Charles Zheng, and Wing H Wong. Learning summary statistic for approximate bayesian computation via deep neural network. Statistica Sinica, pp. 1595–1618, 2017.
|
| 326 |
+
|
| 327 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 328 |
+
|
| 329 |
+
Bernard Osgood Koopman. On distributions admitting a sufficient statistic. Transactions of the American Mathematical society, 39(3):399–409, 1936.
|
| 330 |
+
|
| 331 |
+
J. Lintusaari, M.U. Gutmann, R. Dutta, S. Kaski, and J. Corander. Fundamentals and recent developments in approximate Bayesian computation. Systematic Biology, 66(1):e66–e82, January 2017.
|
| 332 |
+
|
| 333 |
+
T. Lopez-Guevara, N.K. Taylor, M.U. Gutmann, S. Ramamoorthy, and K. Subr. Adaptable pouring: Teaching robots not to spill using fast but approximate fluid simulation. In Sergey Levine, Vincent Vanhoucke, and Ken Goldberg (eds.), Proceedings of the 1st Annual Conference on Robot Learning (CoRL), volume 78 of Proceedings of Machine Learning Research, pp. 77–86, November 2017.
|
| 334 |
+
|
| 335 |
+
Jan-Matthis Lueckmann, Pedro J Goncalves, Giacomo Bassetto, Kaan Öcal, Marcel Nonnenmacher, and Jakob H Macke. Flexible statistical inference for mechanistic models of neural dynamics. In Advances in Neural Information Processing Systems, pp. 1289–1299, 2017.
|
| 336 |
+
|
| 337 |
+
Jan-Matthis Lueckmann, Giacomo Bassetto, Theofanis Karaletsos, and Jakob H Macke. Likelihoodfree inference with emulator networks. In Symposium on Advances in Approximate Bayesian Inference, pp. 32–53, 2019.
|
| 338 |
+
|
| 339 |
+
Jan-Matthis Lueckmann, Jan Boelts, David S Greenberg, Pedro J Gonçalves, and Jakob H Macke. Benchmarking simulation-based inference. arXiv preprint arXiv:2101.04653, 2021.
|
| 340 |
+
|
| 341 |
+
Vikash K Mansinghka, Tejas D Kulkarni, Yura N Perov, and Josh Tenenbaum. Approximate bayesian image interpretation using generative probabilistic graphics programs. In Advances in Neural Information Processing Systems, pp. 1520–1528, 2013.
|
| 342 |
+
|
| 343 |
+
Paul Marjoram, John Molitor, Vincent Plagnol, and Simon Tavaré. Markov chain Monte Carlo without likelihoods. Proceedings of the National Academy of Sciences, 100(26):15324–15328, 2003.
|
| 344 |
+
|
| 345 |
+
Edward Meeds, Robert Leenders, and Max Welling. Hamiltonian abc. In Proceedings of the Thirty-First Conference on Uncertainty in Artificial Intelligence, pp. 582–591, 2015.
|
| 346 |
+
|
| 347 |
+
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.
|
| 348 |
+
|
| 349 |
+
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.
|
| 350 |
+
|
| 351 |
+
Sherjil Ozair, Corey Lynch, Yoshua Bengio, Aaron Van den Oord, Sergey Levine, and Pierre Sermanet. Wasserstein dependency measure for representation learning. In Advances in Neural Information Processing Systems, pp. 15604–15614, 2019.
|
| 352 |
+
|
| 353 |
+
Lorenzo Pacchiardi and Ritabrata Dutta. Score matched conditional exponential families for likelihood-free inference. arXiv preprint arXiv:2012.10903, 2020.
|
| 354 |
+
|
| 355 |
+
George Papamakarios and Iain Murray. Fast $\varepsilon$ -free inference of simulation models with bayesian conditional density estimation. In Advances in Neural Information Processing Systems, pp. 1028– 1036, 2016.
|
| 356 |
+
|
| 357 |
+
George Papamakarios, Theo Pavlakou, and Iain Murray. Masked autoregressive flow for density estimation. In Advances in Neural Information Processing Systems, pp. 2338–2347, 2017.
|
| 358 |
+
|
| 359 |
+
George Papamakarios, David Sterratt, and Iain Murray. Sequential neural likelihood: Fast likelihoodfree inference with autoregressive flows. In The 22nd International Conference on Artificial Intelligence and Statistics, pp. 837–848. PMLR, 2019.
|
| 360 |
+
|
| 361 |
+
Jonathan K Pritchard, Mark T Seielstad, Anna Perez-Lezaun, and Marcus W Feldman. Population growth of human y chromosomes: a study of y chromosome microsatellites. Molecular biology and evolution, 16(12):1791–1798, 1999.
|
| 362 |
+
|
| 363 |
+
Oren Rippel and Ryan Prescott Adams. High-dimensional probability estimation with deep density models. arXiv preprint arXiv:1302.5125, 2013.
|
| 364 |
+
|
| 365 |
+
Ohad Shamir, Sivan Sabato, and Naftali Tishby. Learning and generalization with the information bottleneck. Theoretical Computer Science, 411(29-30):2696–2711, 2010.
|
| 366 |
+
|
| 367 |
+
S.A. Sisson, Y Fan, and M.A. Beaumont. Handbook of Approximate Bayesian Computation., chapter Overview of Approximate Bayesian Computation. Chapman and Hall/CRC Press, 2018.
|
| 368 |
+
|
| 369 |
+
Scott A Sisson, Yanan Fan, and Mark M Tanaka. Sequential Monte Carlo without likelihoods. Proceedings of the National Academy of Sciences, 104(6):1760–1765, 2007.
|
| 370 |
+
|
| 371 |
+
Torbjörn Sjöstrand, Stephen Mrenna, and Peter Skands. A brief introduction to pythia 8.1. Computer Physics Communications, 178(11):852–867, 2008.
|
| 372 |
+
|
| 373 |
+
Carlos Oscar Sánchez Sorzano, Javier Vargas, and A Pascual Montano. A survey of dimensionality reduction techniques. arXiv preprint arXiv:1403.2877, 2014.
|
| 374 |
+
|
| 375 |
+
Gábor J Székely, Maria L Rizzo, et al. Partial distance correlation with methods for dissimilarities. Annals of Statistics, 42(6):2382–2412, 2014.
|
| 376 |
+
|
| 377 |
+
Owen Thomas, Ritabrata Dutta, Jukka Corander, Samuel Kaski, Michael U Gutmann, et al. Likelihood-free inference by ratio estimation. Bayesian Analysis, 2021.
|
| 378 |
+
|
| 379 |
+
Aaron Van Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. In International Conference on Machine Learning, pp. 1747–1756. PMLR, 2016.
|
| 380 |
+
|
| 381 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. arXiv preprint arXiv:1706.03762, 2017.
|
| 382 |
+
|
| 383 |
+
Anja Weyant, Chad Schafer, and W Michael Wood-Vasey. Likelihood-free cosmological inference with type ia supernovae: approximate Bayesian computation for a complete treatment of uncertainty. The Astrophysical Journal, 764(2), 2013.
|
| 384 |
+
|
| 385 |
+
Samuel Wiqvist, Pierre-Alexandre Mattei, Umberto Picchini, and Jes Frellsen. Partially exchangeable networks and architectures for learning summary statistics in approximate bayesian computation. In International Conference on Machine Learning, pp. 6798–6807, 2019.
|
| 386 |
+
|
| 387 |
+
Simon N Wood. Statistical inference for noisy nonlinear ecological dynamic systems. Nature, 466 (7310):1102, 2010.
|
| 388 |
+
|
| 389 |
+
Haozhe Xie, Jie Li, and Hanqing Xue. A survey of dimensionality reduction techniques based on random projection. arXiv preprint arXiv:1706.04371, 2017.
|
| 390 |
+
|
| 391 |
+
# A THEORETICAL PROOFS
|
| 392 |
+
|
| 393 |
+
# A.1 PROOF OF PROPOSITION 1
|
| 394 |
+
|
| 395 |
+
Proof. Firstly, assume $s ( \cdot )$ is a sufficient statistic. By the definition of sufficient statistic we know $p ( \mathbf { x } | \mathbf { \dot { \theta } } ) = p \dot { ( } \mathbf { x } | \mathbf { s } ) p ( \mathbf { s } | \pmb { \theta } )$ . Then we have the Markov chain $\pmb \theta \textbf { s } \textbf { x }$ for the data generating process. On the other hand, since $\mathbf { x } \sim p ( \mathbf { x } | \pmb { \theta } )$ and $S$ is a deterministic function we have the Markov chain $\pmb \theta \mathbf x \mathbf s$ . By data processing inequality we have $I ( \pmb \theta ; s ( \mathbf x ) ) \leq I ( \pmb \theta ; \mathbf x )$ for the first chain and $I ( \pmb \theta ; \mathbf x ) \le I ( \pmb \theta ; s ( \mathbf x ) )$ for the second chain. This implies that $I ( \pmb \theta ; \mathbf x ) = I ( \pmb \theta ; s ( \mathbf x ) )$ i.e $s$ is the maximizer of $I ( \pmb \theta ; S ( \mathbf x ) )$ . For the other direction, since $I ( \pmb \theta ; s ( \mathbf x ) ) = \operatorname* { m a x } _ { S } I ( \pmb \theta ; S ( \mathbf x ) )$ , we have $I ( \pmb \theta ; s ( \mathbf x ) ) = I ( \pmb \theta ; \mathbf x )$ . Note that $\pmb \theta \mathbf x \mathbf s$ is a Markov chain, from Theorem 2.8.1 of Cover et al. (2003) we can get $\pmb \theta$ and $X$ is conditionally independent given s. This implies $s$ is sufficient. 紅□
|
| 396 |
+
|
| 397 |
+
# A.2 PROOF OF PROPOSITION 2
|
| 398 |
+
|
| 399 |
+
Proof. We can write the objective as $\begin{array} { r } { \mathbb { E } _ { p ( \pmb { \theta } , \mathbf { x } ) } [ \| S ( \mathbf { x } ) - \pmb { \theta } \| _ { 2 } ^ { 2 } ] = \int p ( \pmb { \theta } , \mathbf { x } ) \log e ^ { \| S ( \mathbf { x } ) - \pmb { \theta } \| _ { 2 } ^ { 2 } } d \mathbf { x } d \pmb { \theta } . } \end{array}$ . On the other hand we have $\begin{array} { r } { I ( \pmb \theta ; S ( \mathbf x ) ) = \int p ( \pmb \theta , \mathbf x ) \log p ( S ( \mathbf x ) \vert \pmb \theta ) / p ( S ( \mathbf x ) ) d \mathbf x d \pmb \theta . } \end{array}$ By comparing them, we see they are generally not equivalent. Equivalence only holds in special cases (e.g. Gaussians).
|
| 400 |
+
|
| 401 |
+
# B MORE EXPERIMENTAL DETAILS AND RESULTS
|
| 402 |
+
|
| 403 |
+
# B.1 DETAILED EXPERIMENTAL SETTINGS
|
| 404 |
+
|
| 405 |
+
Neural networks settings. For the statistic network $S$ in our method (for both JSD and DC estimators), we adopt a $D$ -100-100- $d$ fully-connected architecture with $D$ being the dimensionality of input data and $d$ the dimensionality of the statistic. For the network $H$ used to extract the representation of $\pmb \theta$ , we adopt a $K { \cdot } 1 0 0 { \cdot } 1 0 0 { \cdot } K$ fully-connected architecture with $K$ being the dimensionality of the model parameters $\pmb \theta$ . For the critic network, we adopt a $( d + K )$ -100-1 fully connected architecture. ReLU is adopted as the non-linearity in all networks. For SRE, which is closely related to our method, we use a $( D + K )$ -144-144-100-1 architecture. This architecture has a similar complexity as our networks. All these neural networks are trained with Adam (Kingma & Ba, 2014) with a learning rate of $1 \times 1 0 ^ { - 4 }$ and a batch size of 200. No weight decay is applied. We take $20 \%$ of the data for validation, and stop training if the validation error does not improve after 100 epochs. We take the snapshot with the best validation error as the final result.
|
| 406 |
+
|
| 407 |
+
For the neural density estimator in SNL/SNPE, which is realized by a Masked Autoregressive Flow (MAF) (Papamakarios et al., 2017), we adopt 5 autoregressive layers, each of which has two hidden layers with 50 tanh units. This is the same settings as in SNL. The MAF is trained with Adam with a learning rate of $5 \times 1 0 ^ { - 4 }$ and a batch size of 500 and a slight weight decay $( 1 \times 1 0 ^ { - 4 } )$ . Similar to the case of MI networks, we take $20 \%$ of the data for validation, and stop training if the validation error does not improve after 100 epochs. The snapshot with the best validation error is taken as the result.
|
| 408 |
+
|
| 409 |
+
Sampling from the approximate posterior/learnt proposal. For fair comparison, we adopt simple rejection sampling for all LFI methods (ABC, SNL, SNPE, SRE) when sampling from the learnt posterior, so that each LFI method only differs in the way they learn the posterior. No MCMC is used.
|
| 410 |
+
|
| 411 |
+
Empirical version of objective functions. Recall that in the JSD estimator, the statistic network $S ( \cdot )$ is trained with the following objective together with the critic network $T ( \cdot )$ :
|
| 412 |
+
|
| 413 |
+
maxi $\begin{array}{c} { \tiny \begin{array} { c } { { \boldsymbol { \cdot } } _ { S , T } } \end{array} } { \mathcal { L } } ( S , T ) = \mathbb { E } _ { p ( \pmb { \theta } , \mathbf { x } ) } \left[ - \operatorname { s p } \left( - T ( \pmb { \theta } , S ( \mathbf { x } ) ) \right) \right] - \mathbb { E } _ { p ( \pmb { \theta } ) p ( \mathbf { x } ) } \left[ \operatorname { s p } \left( T ( \pmb { \theta } , S ( \mathbf { x } ) ) \right) \right] \end{array}$ the mini-batch approximation to this objective is:
|
| 414 |
+
|
| 415 |
+
$$
|
| 416 |
+
\mathcal { L } ( S , T ) \approx \frac { 1 } { n } \sum _ { i } ^ { n } \left[ - \operatorname { s p } \left( - T ( \pmb { \theta _ { i } } , S ( \mathbf { x _ { i } } ) ) \right) \right] - \frac { 1 } { m } \frac { 1 } { n } \sum _ { j } ^ { m } \sum _ { i } ^ { n } \left[ \operatorname { s p } \left( T ( \pmb { \theta _ { j _ { i } } } , S ( \mathbf { x _ { i } } ) ) \right) \right]
|
| 417 |
+
$$
|
| 418 |
+
|
| 419 |
+
where $\{ j _ { 1 } , j _ { 2 } , . . . , j _ { n } \}$ is the $j$ -th random permutation of the indexes $\{ 1 , 2 , . . . , n \}$ and the pair $( \pmb \theta _ { i } , \mathbf x _ { i } )$ are randomly picked from the data $\mathcal { D } = \mathrm { \bar { \{ \pmb { \theta } } _ { i } , \mathbf { x } _ { i } \} } _ { i = 1 } ^ { N }$ . Here we set $m = 4 0 0$ and $n$ is the batch size.
|
| 420 |
+
|
| 421 |
+
In the DC estimator, the statistic network is trained by the following objective:
|
| 422 |
+
|
| 423 |
+
$$
|
| 424 |
+
\operatorname { m a x i m i z e } _ { S } ~ \mathcal { L } ( S ) = \frac { \mathbb { E } _ { p ( \pmb { \theta } , \mathbf { x } ) p ( \pmb { \theta } ^ { \prime } , \mathbf { x } ^ { \prime } ) } [ h ( \pmb { \theta } , \pmb { \theta } ^ { \prime } ) h ( S ( \mathbf { x } ) , S ( \mathbf { x } ^ { \prime } ) ) ] } { \sqrt { \mathbb { E } _ { p ( \pmb { \theta } ) p ( \pmb { \theta } ^ { \prime } ) } [ h ^ { 2 } ( \pmb { \theta } , \pmb { \theta } ^ { \prime } ) ] } \cdot \sqrt { \mathbb { E } _ { p ( \mathbf { x } ) p ( \mathbf { x } ^ { \prime } ) } [ h ^ { 2 } ( S ( \mathbf { x } ) , S ( \mathbf { x } ^ { \prime } ) ) ] } } ,
|
| 425 |
+
$$
|
| 426 |
+
|
| 427 |
+
where $h ( \mathbf { a } , \mathbf { b } ) = \| \mathbf { a } - \mathbf { b } \| - \mathbb { E } _ { p ( \mathbf { b } ^ { \prime } ) } [ \| \mathbf { a } - \mathbf { b } ^ { \prime } \| ] - \mathbb { E } _ { p ( \mathbf { a } ^ { \prime } ) } [ \| \mathbf { a } ^ { \prime } - \mathbf { b } \| ] + \mathbb { E } _ { p ( \mathbf { a } ^ { \prime } ) p ( \mathbf { b } ^ { \prime } ) } [ \| \mathbf { a } ^ { \prime } - \mathbf { b } ^ { \prime } \| ]$ . The mini-batch approximation to this objective is:
|
| 428 |
+
|
| 429 |
+
$$
|
| 430 |
+
\mathcal { L } ( S ) \approx \frac { \sum _ { i , j } ^ { n , n } \widetilde { h } ( \pmb \theta _ { i } , \pmb \theta _ { j } ) \widetilde { h } ( S ( \mathbf x _ { i } ) , S ( \mathbf x _ { j } ) ) } { \sqrt { \sum _ { i , j } ^ { n , n } \widetilde { h } ^ { 2 } ( \pmb \theta _ { i } , \pmb \theta _ { j } ) } \cdot \sqrt { \sum _ { i , j } ^ { n , n } \widetilde { h } ^ { 2 } ( S ( \mathbf x _ { i } ) , S ( \mathbf x _ { j } ) ) } } ,
|
| 431 |
+
$$
|
| 432 |
+
|
| 433 |
+
where $\begin{array} { r } { \tilde { h } ( { \mathbf a } _ { i } , { \mathbf b } _ { j } ) = \| { \mathbf a } _ { i } - { \mathbf b } _ { j } \| - \frac { 1 } { n - 2 } \sum _ { j ^ { \prime } } ^ { n } \| { \mathbf a } _ { i } - { \mathbf b } _ { j ^ { \prime } } \| - \frac { 1 } { n - 2 } \sum _ { i ^ { \prime } } ^ { n } \| { \mathbf a } _ { i ^ { \prime } } - { \mathbf b } _ { j } \| + \frac { 1 } { ( n - 1 ) ( n - 2 ) } \sum _ { i ^ { \prime } , j ^ { \prime } } ^ { n , n } \| { \mathbf a } _ { i ^ { \prime } } - { \mathbf b } _ { j ^ { \prime } } \| ^ { 2 } . } \end{array}$ $\mathbf { b } _ { j ^ { \prime } } \|$ . Here $i , j , i ^ { \prime } , j ^ { \prime }$ are the indexes in the mini-batch. $n$ is again the batch size.
|
| 434 |
+
|
| 435 |
+
JSD calculation between true posterior and approximate posterior. The calculation of the JensenShannon divergence between the true posterior $P$ and approximate posterior $Q$ , namely $\mathrm { J S D } ( P , Q ) =$ $\scriptstyle { \frac { 1 } { 2 } } \mathbf { K L } [ P | | ( P + \mathbf { \bar { Q } } ) / 2 ] + { \frac { 1 } { 2 } } \mathbf { K L } [ Q | | ( P + \mathbf { \bar { Q } } ) / 2 ]$ , is done numerically by a Riemann sum over $3 0 ^ { \dot { K } }$ equally spaced grid points with $K$ being the dimensionality of $\pmb \theta$ . The region of these grid points is defined by the min and max values of 500 samples drawn from $P$ . When we only have samples from the true posterior (e.g. the Ising model), we approximate $P$ by a mixture of Gaussian with 8 components.
|
| 436 |
+
|
| 437 |
+
# B.2 ADDITIONAL EXPERIMENTAL RESULTS
|
| 438 |
+
|
| 439 |
+
Comparison of different MI estimators. We compare the performances of four MI estimator for infomax statistics learning: Donsker-Varadhan (DV) estimator (Belghazi et al., 2018), JensenShannon divergence (JSD) estimator (Hjelm et al., 2018), distance correlation (DC) Székely et al. (2014) and Wasserstein distance (WD) (Ozair et al., 2019). We highlight that the last two estimators (DC and WD) are ratio-free. We compare the discrepancy between the true posterior and the posterior inferred with the statistics learned by each estimator, as well as the execution time per each mini-batch. The results, which are averaged over 5 independent runs, are shown in the figure and the table below.
|
| 440 |
+
|
| 441 |
+
From the figure we see that the JSD estimator generally yields the best accuracy among the four estimators. In terms of execution time, the DC estimator is clearly the winner, with its execution time being only 1/15 of the other estimators. However, the accuracy of the DC estimator is still comparable to the JSD estimator, especially when the number of training samples is large (e.g. 10,000). According to these results, we suggest using JSD in small-scale settings (e.g. early rounds in sequential learning), and use DC in large-scale ones (e.g. later rounds in sequential learning).
|
| 442 |
+
|
| 443 |
+

|
| 444 |
+
Figure 5: Comparing the accuracy of different MI estimator for infomax statistics learning.
|
| 445 |
+
|
| 446 |
+
<table><tr><td colspan="4">Ising model</td><td colspan="5">Gaussian copula</td><td colspan="4">OU process</td></tr><tr><td>DV</td><td>JSD</td><td>DC</td><td>WD</td><td>DV</td><td>JSD</td><td>DC</td><td>WD</td><td>DV</td><td>JSD</td><td>DC</td><td>WD</td></tr><tr><td>115</td><td>124</td><td>6</td><td>230</td><td>154</td><td>167</td><td>10</td><td>288</td><td>143</td><td>158</td><td>13</td><td>256</td></tr></table>
|
| 447 |
+
|
| 448 |
+
Table 4: Comparing the execution time (ms) of different MI estimator for infomax statistics learning.
|
| 449 |
+
|
| 450 |
+
Contrastive learning v.s. MLE. In the experiment in the main text, we discover that our method does not always achieve the best performance; it does not work better than SNPE-B on the Gaussian copula problem. Here we would like to investigate why this happens.
|
| 451 |
+
|
| 452 |
+
Upon a closer look, we discover that SRE, which is closely related to our method when used with the JSD estimator, is outperformed by SNPE-B on the Gaussian copula problem. Remark that both SRE and our method, when used with the JSD estimator, uses contrastive learning rather than MLE. Since both of these two contrastive learning methods do not perform better than the MLE-based SNPE-B, it makes us suspect the reason is due to imperfect contrastive learning. To verify this, we further conduct experiments for SNPE-C, which shares the same loss function with SRE but with a different parameterization to the density ratio (SRE: fully-connected network; SNPE-C: NDE-based parameterization. This NDE is the same as in SNL). The result is as follows:
|
| 453 |
+
|
| 454 |
+
<table><tr><td colspan="4">Ising model</td><td colspan="4">Gaussian copula</td><td colspan="4">OU process</td></tr><tr><td>SRE</td><td>SNPE-B</td><td>SNPE-C</td><td>SNL+</td><td>SRE</td><td>SNPE-B</td><td>SNPE-C</td><td>SNL+</td><td>SRE</td><td>SNPE-B</td><td>SNPE-C</td><td>SNL+</td></tr><tr><td>0.083</td><td>0.058</td><td>0.030</td><td>0.017</td><td>0.052</td><td>0.037</td><td>0.047</td><td>0.042</td><td>0.022</td><td>0.018</td><td>0.016</td><td>0.009</td></tr></table>
|
| 455 |
+
|
| 456 |
+
Table 5: Commparing the the JSD of contrastive learning-based methods (SRE, SNPE-C, ${ \mathrm { S N L } } +$ and MLE-based method (SNPE-B) on the three models considered in the experiments in the main text.
|
| 457 |
+
|
| 458 |
+
Surprisingly, we find that SNPE-C also perform less satisfactorily than SNPE-B on the Gaussian copula problem. This suggests that contrastive learning might be less preferable than MLE on the Gaussian copula problem, which might also explain the less satisfactory performance of our method.
|
md/train/Sk2Im59ex/Sk2Im59ex.md
ADDED
|
@@ -0,0 +1,280 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# UNSUPERVISED CROSS-DOMAIN IMAGE GENERATION
|
| 2 |
+
|
| 3 |
+
Yaniv Taigman, Adam Polyak & Lior Wolf
|
| 4 |
+
|
| 5 |
+
Facebook AI Research
|
| 6 |
+
Tel-Aviv, Israel
|
| 7 |
+
{yaniv,adampolyak,wolf}@fb.com
|
| 8 |
+
|
| 9 |
+
# ABSTRACT
|
| 10 |
+
|
| 11 |
+
We study the problem of transferring a sample in one domain to an analog sample in another domain. Given two related domains, $S$ and $T$ , we would like to learn a generative function $G$ that maps an input sample from $S$ to the domain $T$ , such that the output of a given representation function $f$ , which accepts inputs in either domains, would remain unchanged. Other than $f$ , the training data is unsupervised and consist of a set of samples from each domain, without any mapping between them. The Domain Transfer Network (DTN) we present employs a compound loss function that includes a multiclass GAN loss, an $f$ preserving component, and a regularizing component that encourages $G$ to map samples from $T$ to themselves. We apply our method to visual domains including digits and face images and demonstrate its ability to generate convincing novel images of previously unseen entities, while preserving their identity.
|
| 12 |
+
|
| 13 |
+
# 1 INTRODUCTION
|
| 14 |
+
|
| 15 |
+
Humans excel in tasks that require making analogies between distinct domains, transferring elements from one domain to another, and using these capabilities in order to blend concepts that originated from multiple source domains. Our experience tells us that these remarkable capabilities are developed with very little, if any, supervision that is given in the form of explicit analogies.
|
| 16 |
+
|
| 17 |
+
Recent achievements replicate some of these capabilities to some degree: Generative Adversarial Networks (GANs) are able to convincingly generate novel samples that match that of a given training set; style transfer methods are able to alter the visual style of images; domain adaptation methods are able to generalize learned functions to new domains even without labeled samples in the target domain and transfer learning is now commonly used to import existing knowledge and to make learning much more efficient.
|
| 18 |
+
|
| 19 |
+
These capabilities, however, do not address the general analogy synthesis problem that we tackle in this work. Namely, given separated but otherwise unlabeled samples from domains $S$ and $T$ and a perceptual function $f$ , learn a mapping $G : S T$ such that $f ( x ) \sim f ( G ( x ) )$ .
|
| 20 |
+
|
| 21 |
+
In order to solve this problem, we make use of deep neural networks of a specific structure in which the function $G$ is a composition of the input function $f$ and a learned function $g$ . A compound loss that integrates multiple terms is used. One term is a Generative Adversarial Network (GAN) term that encourages the creation of samples $G ( x )$ that are indistinguishable from the training samples of the target domain, regardless of $x \in S$ or $x \in T$ . The second loss term enforces that for every $x$ in the source domain training set, $| | f ( x ) - f ( G ( x ) ) | |$ is small. The third loss term is a regularizer that encourages $G$ to be the identity mapping for all $x \in T$ .
|
| 22 |
+
|
| 23 |
+
The type of problems we focus on in our experiments are visual, although our methods are not limited to visual or even to perceptual tasks. Typically, $f$ would be a neural network representation that is taken as the activations of a network that was trained, e.g., by using the cross entropy loss, in order to classify or to capture identity.
|
| 24 |
+
|
| 25 |
+
As a main application challenge, we tackle the problem of emoji generation for a given facial image. Despite a growing interest in emoji and the hurdle of creating such personal emoji manually, no system has been proposed, to our knowledge, that can solve this problem. Our method is able to produce face emoji that are visually appealing and capture much more of the facial characteristics than the emoji created by well-trained human annotators who use the conventional tools.
|
| 26 |
+
|
| 27 |
+
# 2 RELATED WORK
|
| 28 |
+
|
| 29 |
+
As far as we know, the domain transfer problem we formulate is novel despite being ecological (i.e., appearing naturally in the real-world), widely applicable, and related to cognitive reasoning (Fauconnier & Turner, 2003). In the discussion below, we survey recent GAN work, compare our work to the recent image synthesis work and make links to unsupervised domain adaptation.
|
| 30 |
+
|
| 31 |
+
GAN (Goodfellow et al., 2014) methods train a generator network $G$ that synthesizes samples from a target distribution given noise vectors. $G$ is trained jointly with a discriminator network $D$ , which distinguishes between samples generated by $G$ and a training set from the target distribution. The goal of $G$ is to create samples that are classified by $D$ as real samples.
|
| 32 |
+
|
| 33 |
+
While originally proposed for generating random samples, GANs can be used as a general tool to measure equivalence between distributions. Specifically, the optimization of $D$ corresponds to taking the most discriminative $D$ achievable, which in turn implies that the indistinguishability is true for every $D$ . Formally, Ganin et al. (2016) linked the GAN loss to the H-divergence between two distributions of Ben-david et al. (2006).
|
| 34 |
+
|
| 35 |
+
The generative architecture that we employ is based on the successful architecture of Radford et al. (2015). There has recently been a growing concern about the uneven distribution of the samples generated by $G -$ that they tend to cluster around a set of modes in the target domain (Salimans et al., 2016). In general, we do not observe such an effect in our results, due to the requirement to generate samples that satisfy specific $f$ -constancy criteria.
|
| 36 |
+
|
| 37 |
+
A few contributions (“Conditional GANs”) have employed GANs in order to generate samples from a specific class (Mirza & Osindero, 2014), or even based on a textual description (Reed et al., 2016). When performing such conditioning, one can distinguish between samples that were correctly generated but fail to match the conditional constraint and samples that were not correctly generated. This is modeled as a ternary discriminative function $D$ (Reed et al., 2016; Brock et al., 2016).
|
| 38 |
+
|
| 39 |
+
The recent work by Dosovitskiy & Brox (2016), has shown promising results for learning to map embeddings to their pre-images, given input-target pairs. Like us, they employ a GAN as well as additional losses in the feature- and the pixel-space. Their method is able to invert the midlevel activations of AlexNet and reconstruct the input image. In contrast, we solve the problem of unsupervised domain transfer and apply the loss terms in different domains: pixel loss in the target domain, and feature loss in the source domain.
|
| 40 |
+
|
| 41 |
+
Another class of very promising generative techniques that has recently gained traction is neural style transfer. In these methods, new images are synthesized by minimizing the content loss with respect to one input sample and the style loss with respect to one or more input samples. The content loss is typically the encoding of the image by a network training for an image categorization task, similar to our work. The style loss compares the statistics of the activations in various layers of the neural network. We do not employ style losses in our method. While initially style transfer was obtained by a slow optimization process (Gatys et al., 2016), recently, the emphasis was put on feed-forward methods (Ulyanov et al., 2016; Johnson et al., 2016).
|
| 42 |
+
|
| 43 |
+
There are many links between style transfer and our work: both are unsupervised and generate a sample under $f$ constancy given an input sample. However, our work is much more general in its scope and does not rely on a predefined family of perceptual losses. Our method can be used in order to perform style transfer, but not the other way around. Another key difference is that the current style transfer methods are aimed at replicating the style of one or several images, while our work considers a distribution in the target space. In many applications, there is an abundance of unlabeled data in the target domain $T$ , which can be modeled accurately in an unsupervised manner.
|
| 44 |
+
|
| 45 |
+
Given the impressive results of recent style transfer work, in particular for face images, one might get the false impression that emoji are just a different style of drawing faces. By way of analogy, this claim is similar to stating that a Siamese cat is a Labrador in a different style. Emoji differ from facial photographs in both content and style. Style transfer can create visually appealing face images; However, the properties of the target domain are compromised.
|
| 46 |
+
|
| 47 |
+
In the computer vision literature, work has been done to automatically generate sketches from images, see Kyprianidis et al. (2013) for a survey. These systems are able to emphasize image edges and facial features in a convincing way. However, unlike our method, they require matching pairs of samples, and were not shown to work across two distant domains as in our method. Due to the lack of supervised training data, we did not try to apply such methods to our problems. However, one can assume that if such methods were appropriate for emoji synthesis, automatic face emoji services would be available.
|
| 48 |
+
|
| 49 |
+
Unsupervised domain adaptation addresses the following problem: given a labeled training set in $S \times Y$ , for some target space $Y$ , and an unlabeled set of samples from domain $T$ , learn a function $h : T Y$ (Chen et al., 2012; Ganin et al., 2016). One can solve the sample transfer problem (our problem) using domain adaptation and vice versa. In both cases, the solution is indirect. In order to solve domain adaptation using domain transfer, one would learn a function from $S$ to $Y$ and use it as the input method of the domain transfer algorithm in order to obtain a map from $S$ to $T ^ { 1 }$ . The training samples could then be transferred to $T$ and used to learn a classifier there.
|
| 50 |
+
|
| 51 |
+
In the other direction, given the function $f$ , one can invert $f$ in the domain $T$ by generating training samples $( f ( x ) , x )$ for $x \in T$ and learn from them a function $h$ from $f ( T ) = \{ f ( x ) | x \in T \}$ to $T$ . Domain adaptation can then be used in order to map $f ( S ) = \{ f ( x ) | x \in S \}$ to $T$ , thus achieving domain transfer. Based on the work by Zhmoginov & Sandler (2016), we expect that $h$ , even in the target domain of emoji, will be hard to learn, making this solution hypothetical at this point.
|
| 52 |
+
|
| 53 |
+
# 3 A BASELINE PROBLEM FORMULATION
|
| 54 |
+
|
| 55 |
+
Given a set s of unlabeled samples in a source domain $S$ sampled i.i.d according to some distribution $\mathcal { D } _ { S }$ , a set of samples in the target domain t $\subset T$ sampled i.i.d from distribution $\mathcal { D } _ { T }$ , a function $f$ from the domain $S \cup T$ , some metric $d$ , and a weight $\alpha$ , we wish to learn a function $G : S T$ that minimizes the combined risk $R = R _ { \mathrm { G A N } } + \alpha R _ { \mathrm { C O N S T } }$ , which is comprised of
|
| 56 |
+
|
| 57 |
+
$$
|
| 58 |
+
R _ { \mathrm { G A N } } = \operatorname* { m a x } _ { D } \mathbb { E } _ { { x } \sim \mathcal { D } _ { S } } \log [ 1 - D ( G ( x ) ) ] + \mathbb { E } _ { { x } \sim \mathcal { D } _ { T } } \log [ D ( x ) ] ,
|
| 59 |
+
$$
|
| 60 |
+
|
| 61 |
+
where $D$ is a binary classification function from $T$ , $D ( x )$ the probability of the class 1 it assigns for a sample $x \in T$ , and
|
| 62 |
+
|
| 63 |
+
$$
|
| 64 |
+
R _ { \mathrm { C O N S T } } = \mathbb { E } _ { x \sim \mathcal { D } _ { S } } d ( f ( x ) , f ( G ( x ) ) )
|
| 65 |
+
$$
|
| 66 |
+
|
| 67 |
+
The first term is the adversarial risk, which requires that for every discriminative function $D$ , the samples from the target domain would be indistinguishable from the samples generated by $G$ for samples in the source domain. An adversarial risk is not the only option. An alternative term that does not employ GANs would directly compare the distribution $\mathcal { D } _ { T }$ to the distribution of $G ( x )$ where $x \sim \mathcal { D } _ { S }$ , e.g., by using KL-divergence.
|
| 68 |
+
|
| 69 |
+
The second term is the $f$ -constancy term, which requires that $f$ is invariant under $G$ . In practice, we have experimented with multiple forms of $d$ including Mean Squared Error (MSE) and cosine distance, as well as other variants including metric learning losses (hinge) and triplet losses. The performance is mostly unchanged, and we report results using the simplest MSE solution.
|
| 70 |
+
|
| 71 |
+
Similarly to other GAN formulations, one can minimize the loss associated with the risk $R$ over $G$ , while maximizing it over $D$ , where $G$ and $D$ are deep neural networks, and the expectations in $R$ are replaced by summations over the corresponding training sets. However, this baseline solution, as we will show experimentally, does not produce desirable results.
|
| 72 |
+
|
| 73 |
+

|
| 74 |
+
Figure 1: The Domain Transfer Network. Losses are drawn with dashed lines, input/output with solid lines. After training, the forward model $\mathbf { G }$ is used for the sample transfer.
|
| 75 |
+
|
| 76 |
+
# 4 THE DOMAIN TRANSFER NETWORK
|
| 77 |
+
|
| 78 |
+
We suggest to employ a more elaborate architecture that contains two high level modifications. First, we employ $f ( x )$ as the baseline representation to the function $G$ . Second, we consider, during training, the generated samples $G ( x )$ for $x \in \mathbf { t } .$ .
|
| 79 |
+
|
| 80 |
+
The first change is stated as $G = g \circ f$ , for some learned function $g$ . By applying this, we focus the learning effort of $G$ on the aspects that are most relevant to $R _ { \mathrm { C O N S T } }$ . In addition, in most applications, $f$ is not as accurate on $T$ as it on $S$ . The composed function, which is trained on samples from both $S$ and $T$ , adds layers on top of $f$ , which adapt it.
|
| 81 |
+
|
| 82 |
+
The second change alters the form of $L _ { \mathrm { G A N } }$ , making it multiclass instead of binary. It also introduces a new term $L _ { T I D }$ that requires $G$ to be the identity matrix on samples from $T$ . Taken together and written in terms of training loss, we now have two losses $L _ { D }$ and $L _ { G } = L _ { \mathrm { G A N G } } + \alpha L _ { \mathrm { C O N S T } } +$ $\beta L _ { \mathrm { T I D } } + \gamma L _ { \mathrm { T V } }$ , for some weights $\alpha , \beta , \gamma$ , where
|
| 83 |
+
|
| 84 |
+
$$
|
| 85 |
+
\begin{array} { r l } & { - \displaystyle \sum _ { x \in { \bf s } } \log D _ { 1 } ( g ( f ( x ) ) ) - \displaystyle \sum _ { x \in { \bf t } } \log D _ { 2 } ( g ( f ( x ) ) ) - \sum _ { x \in { \bf t } } \log D _ { 3 } ( f ( x ) ) } \\ & { L _ { \sf G A N G } = - \displaystyle \sum _ { x \in { \bf s } } \log D _ { 3 } ( g ( f ( x ) ) ) - \sum _ { x \in { \bf t } } \log D _ { 3 } ( g ( f ( x ) ) ) } \\ & { ~ L _ { \sf C O N S T } = \displaystyle \sum _ { x \in { \bf s } } d ( f ( x ) , f ( g ( f ( x ) ) ) ) } \\ & { ~ L _ { \sf T I D } = \displaystyle \sum _ { x \in { \bf t } } d _ { 2 } ( x , G ( x ) ) } \end{array}
|
| 86 |
+
$$
|
| 87 |
+
|
| 88 |
+
and where $D$ is a ternary classification function from the domain $T$ to $1 , 2 , 3$ , and $D _ { i } ( x )$ is the probability it assigns to class $i = { 1 , 2 , 3 }$ for an input sample $x$ , and $d _ { 2 }$ is a distance function in $T$ . During optimization, $L _ { G }$ is minimized over $g$ and $L _ { D }$ is minimized over $D$ . See Fig. 1 for an illustration of our method.
|
| 89 |
+
|
| 90 |
+
Eq. 3 and 4 make sure that the generated analogy, i.e., the output of $G$ , is in the target space $T$ . Since $D$ is ternary and can therefore confuse classes in more than one way, this role, which is captured by Eq. 1 in the baseline formulation, is split into two. However, the two equations do not enforce any similarity between the source sample $x$ and the generated $G ( x )$ . This is done by Eq. 5 and 6: Eq. 5 enforces $f$ -constancy for $x \in S$ , while Eq. 6 enforces that for samples $x \in T$ , which are already in the target space, $G$ is the identity mapping. The latter is a desirable behavior, e.g., for the cartooning task, given an input emoji, one would like it to remain constant under the mapping of $G$ . It can also be seen as an autoencoder type of loss, applied only to samples from $T$ . The experiments reported in Sec. 5 evaluate the contributions of $L _ { C O N S T }$ and $L _ { T I D }$ and reveal that at least one of these is required, and that when employing only one loss, $L _ { C O N S T }$ leads to a better performance than $L _ { T I D }$ .
|
| 91 |
+
|
| 92 |
+

|
| 93 |
+
Figure 2: Domain transfer in two visual domains. Input in odd columns; output in even columns. (a) Transfer from SVHN to MNIST. (b) Transfer from face photos (Facescrub dataset) to emoji.
|
| 94 |
+
|
| 95 |
+
The last loss, $L _ { \mathrm { T V } }$ is an anisotropic total variation loss (Rudin et al., 1992; Mahendran & Vedaldi, 2015), which is added in order to slightly smooth the resulting image. The loss is defined on the generated image $z = [ z _ { i j } ] = G ( x )$ as
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
L _ { T V } ( z ) = \sum _ { i , j } \left( ( z _ { i , j + 1 } - z _ { i j } ) ^ { 2 } + ( z _ { i + 1 , j } - z _ { i j } ) ^ { 2 } \right) ^ { \frac { B } { 2 } } ,
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
where we employ $B = 1$ .
|
| 102 |
+
|
| 103 |
+
In our work, MSE is used for both $d$ and $d _ { 2 }$ . We also experimented with replacing $d _ { 2 }$ , which, in visual domains, compares images, with a second GAN. No noticeable improvement was observed. Throughout the experiments, the adaptive learning rate method Adam by Kingma & Ba (2016) is used as the optimization algorithm.
|
| 104 |
+
|
| 105 |
+
# 5 EXPERIMENTS
|
| 106 |
+
|
| 107 |
+
The Domain Transfer Network (DTN) is evaluated in two application domains: digits and face images. In the first domain, we transfer images from the Street View House Number (SVHN) dataset of Netzer et al. (2011) to the domain of the MNIST dataset by LeCun & Cortes (2010). In
|
| 108 |
+
|
| 109 |
+
Table 1: Accuracy of the MNIST classifier on the sampled transferred by our DTN method from SHVN to MNIST.
|
| 110 |
+
|
| 111 |
+
<table><tr><td colspan="2">Method Accuracy</td></tr><tr><td>Baseline method (Sec.3)</td><td>13.71%</td></tr><tr><td>DTN</td><td>90.66%</td></tr><tr><td>DTN w/0 LTID DTN W/O LCONST</td><td>88.40%</td></tr><tr><td>DTN IG does not contain f</td><td>74.55% 36.90%</td></tr><tr><td>DTN w/O LD and LGANG DTN W/O LCONST & LTID</td><td>34.70%</td></tr><tr><td>Original SHVN image</td><td>5.28% 40.06%</td></tr></table>
|
| 112 |
+
|
| 113 |
+
Table 2: Domain adaptation from SVHN to MNIST
|
| 114 |
+
|
| 115 |
+
<table><tr><td colspan="2">Method Accuracy</td></tr><tr><td>SA Fernando et al. (2013)</td><td>59.32%</td></tr><tr><td>DANN Ganin et al. (2016) DTN on SVHN transferring</td><td>73.85%</td></tr><tr><td>the train split s</td><td>84.44%</td></tr><tr><td>DTN on SVHN transferring the test split</td><td>79.72%</td></tr></table>
|
| 116 |
+
|
| 117 |
+
the face domain, we transfer a set of random and unlabeled face images to a space of emoji images.
|
| 118 |
+
In both cases, the source and target domains differ considerably.
|
| 119 |
+
|
| 120 |
+
# 5.1 DIGITS: FROM SVHN TO MNIST
|
| 121 |
+
|
| 122 |
+
For working with digits, we employ the extra training split of SVHN, which contains 531,131 images for two purposes: learning the function $f$ and as an unsupervised training set s for the domain transfer method. The evaluation is done on the test split of SVHN, comprised of 26,032 images. The architecture of $f$ consists of four convolutional layers with 64, 128, 256, 128 filters respectively, each followed by max pooling and ReLU non-linearity. The error on the test split is $4 . 9 5 \%$ . Even tough this accuracy is far from the best reported results, it seems to be sufficient for the purpose of domain transfer. Within the DTN, $f$ maps a $3 2 \times 3 2$ RGB image to the activations of the last convolutional layer of size $1 2 8 \times 1 \times 1$ (post a $4 \times 4$ max pooling and before the ReLU). In order to apply $f$ on MNIST images, we replicate the grayscale image three times.
|
| 123 |
+
|
| 124 |
+
The set t contains the test set of the MNIST dataset. For supporting quantitative evaluation, we have trained a classifier on the train set of the MNIST dataset, consisting of the same architecture as $f$ . The accuracy of this classifier on the test set approaches perfect performance at $9 9 . 4 \%$ accuracy, and is, therefore, trustworthy as an evaluation metric. In comparison, the network $f$ , achieves $7 6 . 0 8 \%$ accuracy on t.
|
| 125 |
+
|
| 126 |
+
Network $g$ , inspired by Radford et al. (2015), maps SVHN-trained $f$ ’s 128D representations to $3 2 \times$ 32 grayscale images. $g$ employs four blocks of deconvolution, batch-normalization, and ReLU, with a hyperbolic tangent terminal. The architecture of $D$ consists of four batch-normalized convolutional layers and employs ReLU. See Radford et al. (2015) for more details on the networks architecture. In the digit experiments, the results were obtained with the tradeoff hyperparamemters $\alpha = \beta = 1 5$ . We did not observe a need to add a smoothness term and the weight of $L _ { \mathrm { T V } }$ was set to $\gamma = 0$ .
|
| 127 |
+
|
| 128 |
+
Despite not being very accurate on both domains (and also considerably worse than the SVHN state of the art), we were able to achieve visually appealing domain transfer, as shown in Fig. 2(a). In order to evaluate the contribution of each of the method’s components, we have employed the MNIST network on the set of samples ${ \cal G } ( { \bf s } _ { T E S T } ) = \{ G ( x ) | x \in \mathrm { { \bf \bar { s } } } _ { T E S T } \}$ , using the true SVHN labels of the test set.
|
| 129 |
+
|
| 130 |
+
We first compare to the baseline method of Sec. 3, where the generative function, which works directly with samples in $S$ , is composed out of a few additional layers at the bottom of $G$ . The results, shown in Tab. 1, demonstrate that DTN has a clear advantage over the baseline method. In addition, the contribution of each one of the terms in the loss function is shown in the table. The regularization term $L _ { T I D }$ seems less crucial than the constancy term. However, at least one of them is required in order to obtain good performance. The GAN constraints are also important. Finally, the inclusion of $f$ within the generator function $G$ has a dramatic influence on the results.
|
| 131 |
+
|
| 132 |
+
As explained in Sec. 2, domain transfer can be used in order to perform unsupervised domain adaptation. For this purposes, we transformed the set s to the MNIST domain (as above), and using the true labels of s employed a simple nearest neighbor classifier there. The choice of classifier was to emphasize the simplicity of the approach; However, the constraints of the unsupervised domain transfer problem would be respected for any classifier trained on $G ( \mathbf { s } )$ . The results of this experiment are reported in Tab. 2, which shows a clear advantage over the state of the art method of Ganin et al. (2016). This is true both when transferring the samples of the set s and when transferring the test set of SVHN, which is much smaller and was not seen during the training of the DTN.
|
| 133 |
+
|
| 134 |
+
Table 3: Comparison of recognition accuracy of the digit 3 as generated in MNIST
|
| 135 |
+
|
| 136 |
+
<table><tr><td>Method</td><td>Accuracy of ‘3'</td></tr><tr><td></td><td></td></tr><tr><td>DTN</td><td>94.67%</td></tr><tr><td>‘3’ was not shown in s</td><td>93.33%</td></tr><tr><td>‘3' was not shown in t</td><td>40.13%</td></tr><tr><td>‘3’ was not shown in both s or t</td><td>60.02%</td></tr><tr><td>`3’ was not shown in s,t,and during the training of f</td><td>4.52 %</td></tr></table>
|
| 137 |
+
|
| 138 |
+
# 5.1.1 UNSEEN DIGITS
|
| 139 |
+
|
| 140 |
+
Another set of experiments was performed in order to study the ability of the domain transfer network to overcome the omission of a class of samples. This type of ablation can occur in the source or the target domain, or during the training of $f$ and can help us understand the importance of each of these inputs. The results are shown visually in Fig. 3, and qualitatively in Tab. 3, based on the accuracy of the MNIST classifier only on the transferred samples from the test set of SVHN that belong to class $\cdot _ { 3 } ,$ .
|
| 141 |
+
|
| 142 |
+
It is evident that not including the class in the source domain is much less detrimental than eliminating it from the target domain. This is the desirable behavior: never seeing any $\cdot _ { 3 } ,$ -like shapes in t, the generator should not generate such samples. Results are better when not observing $\cdot _ { 3 } \cdot$ in both s, t than when not seeing it only in t since in the latter case, $G$ learns to map source samples of $\cdot _ { 3 } \cdot$ to target images of other classes.
|
| 143 |
+
|
| 144 |
+

|
| 145 |
+
Figure 3: A random subset of the digit $_ 3 \cdot$ from SVHN, transferred to MNIST. (a) The input images. (b) Results of our DTN. In all plots, the cases keep their respective locations, and are sorted by the probability of $\cdot _ { 3 } \cdot$ as inferred by the MNIST classifier on the results of our DTN. (c) The obtained results, in which the digit 3 was not shown as part of the set s unlabeled samples from SVNH. (d) The obtained results, in which the digit 3 was not shown as part of the set t of unlabeled samples in MNIST. (e) The digit 3 was not shown in both s and t. (f) The digit 3 was not shown in s, t, and during the training of $f$ .
|
| 146 |
+
|
| 147 |
+
Table 4: Comparison of retrieval accuracy out of a set of 100,001 face images for either manually created emoji or the one created by the DTN method.
|
| 148 |
+
|
| 149 |
+
<table><tr><td>Measure</td><td>Manual</td><td>Emoji by DTN</td></tr><tr><td>Medianrank</td><td>16311</td><td>16</td></tr><tr><td>Mean rank</td><td>27,992.34</td><td>535.47</td></tr><tr><td>Rank-1 accuracy</td><td>0%</td><td>22.88%</td></tr><tr><td>Rank-5 accuracy</td><td>0%</td><td>34.75%</td></tr></table>
|
| 150 |
+
|
| 151 |
+
# 5.2 FACES: FROM PHOTOS TO EMOJI
|
| 152 |
+
|
| 153 |
+
For face images, we use a set s of one million random images without identity information. The set t consists of assorted facial avatars (emoji) created by an online service (bitmoji.com). The emoji images were processed by a fully automatic process that localizes, based on a set of heuristics, the center of the irides and the tip of the nose. Based on these coordinates, the emoji were centered and scaled into $1 5 2 \times 1 5 2$ RGB images.
|
| 154 |
+
|
| 155 |
+
As the function $f$ , we employ the representation layer of the DeepFace network Taigman et al. (2014). This representation is 256-dimensional and was trained on a labeled set of four million images that does not intersect the set s. Network D takes $1 5 2 \times 1 5 2$ RGB images (either natural or scaled-up emoji) and consists of 6 blocks, each containing a convolution with stride 2, batch normalization, and a leaky ReLU with a parameter of 0.2. Network $g$ maps $f$ ’s 256D representations to $6 4 \times 6 4$ RGB images through a network with 5 blocks, each consisting of an upscaling convolution, batch-normalization and ReLU. Adding $1 \times 1$ convolution to each block resulted in lower $L _ { \mathrm { C O N S T } }$ training errors, and made $g 9 .$ -layers deep. We set $\alpha = 1 0 0$ , $\beta = 1$ , $\gamma = 0 . 0 5$ as the tradeoff hyperparameters within $L _ { G }$ via validation. As expected, higher values of $\alpha$ resulted in better $f$ -constancy, however introduced artifacts such as general noise or distortions. The network was trained for 3 epochs, the point where no further reduction of validation error was observed on LCONST.
|
| 156 |
+
|
| 157 |
+
In order to upscale the $6 4 \times 6 4$ output to print quality, we used the method of Dong et al. (2015), which was shown to work well on art. We did not retrain this network for our application, and apply the published one to the final output of our method after its training was finished. Results without this upscale are shown, for comparison, in Appendix C.
|
| 158 |
+
|
| 159 |
+
Comparison With Human Annotators For evaluation purposes only, a team of professional annotators manually created an emoji, using a web service, for 118 random images from the CelebA dataset (Yang et al., 2015). Fig. 4 shows side by side samples of the original image, the human generated emoji and the emoji generated by the learned generator function $G$ . As can be seen, the automatically generated emoji tend to be more informative, albeit less restrictive than the ones created manually.
|
| 160 |
+
|
| 161 |
+
In order to evaluate the identifiability of the resulting emoji, we have collected a second example for each identity in the set of 118 CelebA images and a set $\mathbf { s } ^ { \prime }$ of 100,000 random face images, which were not included in s. We then employed the VGG face CNN descriptor of Parkhi et al. (2015) in order to perform retrieval as follows. For each image $x$ in our manually annotated set, we create a gallery $\bar { \mathbf { s } ^ { \prime } } \cup { x } ^ { \prime }$ , where $x ^ { \prime }$ is the other image of the person in $x$ . We then perform retrieval using the VGG face descriptor using either the manually created emoji or $G ( x )$ as probe.
|
| 162 |
+
|
| 163 |
+
The VGG network is used in order to avoid a bias that might be caused by using $f$ both for training the DTN and for evaluation. The results are reported in Tab. 4. As can be seen, the emoji generated by $G$ are much more discriminative than the emoji created manually and obtain a median rank of 16 in cross-domain identification out of $1 0 ^ { 5 }$ distractors.
|
| 164 |
+
|
| 165 |
+
Multiple Images Per Person We evaluate the visual quality that is obtained per person and not just per image, by testing DTN on the Facescrub dataset (Ng & Winkler, 2014). For each person $p$ , we considered the set of their images $X _ { p }$ , and selected the emoji that was most similar to their
|
| 166 |
+
|
| 167 |
+

|
| 168 |
+
Figure 4: Shown, side by side are sample images from the CelebA dataset, the emoji images created manually using a web interface (for validation only), and the result of the unsupervised DTN. See Tab. 4 for retrieval performance.
|
| 169 |
+
|
| 170 |
+
source image:
|
| 171 |
+
|
| 172 |
+
$$
|
| 173 |
+
\underset { x \in X _ { p } } { \arg \operatorname* { m i n } } \left| \left| f ( x ) - f ( G ( x ) ) \right| \right|
|
| 174 |
+
$$
|
| 175 |
+
|
| 176 |
+
This simple heuristic seems to work well in practice; The general problem of mapping a set $X \subset S$ to a single output in $T$ is left for future work. Fig. 2(b) contains several examples from the Facescrub dataset. For the complete set of identities, see Appendix A.
|
| 177 |
+
|
| 178 |
+
Transferring both identity and expression We also experimented with multiple expressions. As it turns out the face identification network $f$ encodes enough expression information to support a successful transfer of both identity as well as expression, see Appendix B.
|
| 179 |
+
|
| 180 |
+
Network Visualization The obtained mapping $g$ can serve as a visualization tool for studying the properties of the face representation. This is studied in Appendix D by computing the emoji generated for the standard basis of $\mathbb { R } ^ { 2 5 6 }$ . The resulting images present a large amount of variability, indicating that $g$ does not present a significant mode effect.
|
| 181 |
+
|
| 182 |
+
# 5.3 STYLE TRANSFER AS A SPECIFIC DOMAIN TRANSFER TASK
|
| 183 |
+
|
| 184 |
+
Fig. 5(a-c) demonstrates that neural style transfer Gatys et al. (2016) cannot solve the photo to emoji transfer task in a convincing way. The output image is perhaps visually appealing; However, it does not belong to the space t of emoji. Our result are given in Fig. 5(d) for comparison. Note that DTN is able to fix the missing hair in the image.
|
| 185 |
+
|
| 186 |
+
Domain transfer is more general than style transfer in the sense that we can perform style transfer using a DTN. In order to show this, we have transformed, using the method of Johnson et al. (2016), the training images of CelebA based on the style of a single image (shown in Fig. 5(e)). The original photos were used as the set s, and the transformed images were used as t. Applying DTN, using face representation $f$ , we obtained styled face images such as the one shown in the figure 5(f).
|
| 187 |
+
|
| 188 |
+

|
| 189 |
+
Figure 5: Style transfer as a specific case of Domain Transfer. (a) The input content photo. (b) An emoji taken as the input style image. (c) The result of applying the style transfer method of Gatys et al. (2016). (d) The result of the emoji DTN. (e) Source image for style transfer. (f) The result, on the same input image, of a DTN trained to perform style transfer.
|
| 190 |
+
|
| 191 |
+
# 6 DISCUSSION AND LIMITATIONS
|
| 192 |
+
|
| 193 |
+
Asymmetry is central to our work. Not only does our solution handle the two domains $S$ and $T$ differently, the function $f$ is unlikely to be equally effective in both domains since in most practical cases, $f$ would be trained on samples from one domain. While an explicit domain adaptation step can be added in order to make $f$ more effective on the second domain, we found it to be unnecessary. Adaptation of $f$ occurs implicitly due to the application of $D$ downstream.
|
| 194 |
+
|
| 195 |
+
Using the same function $f$ , we can replace the roles of the two domains, $S$ and $T$ . For example, we can synthesize an SVHN image that resembles a given MNIST image, or synthesize a face that matches an emoji. As expected, this yields less appealing results due to the asymmetric nature of $f$ and the lower information content in these new source domains, see Appendix E.
|
| 196 |
+
|
| 197 |
+
Domain transfer, as an unsupervised method, could prove useful across a wide variety of computational tasks. Here, we demonstrate the ability to use domain transfer in order to perform unsupervised domain adaptation. While this is currently only shown in a single experiment, the simplicity of performing domain adaptation and the fact that state of the art results were obtained effortlessly with a simple nearest neighbor classifier suggest it to be a promising direction for future research.
|
| 198 |
+
|
| 199 |
+
# REFERENCES
|
| 200 |
+
|
| 201 |
+
Shai Ben-david, John Blitzer, Koby Crammer, and Fernando Pereira. Analysis of representations for domain adaptation. In NIPS, pp. 137–144. 2006.
|
| 202 |
+
Andrew Brock, Theodore Lim, and Nick Ritchie, J. M.and Weston. Neural photo editing with introspective adversarial networks. arXiv preprint arXiv:1609.07093, 2016.
|
| 203 |
+
Minmin Chen, Zhixiang Xu, Kilian Weinberger, and Fei Sha. Marginalized denoising autoencoders for domain adaptation. In ICML, pp. 767–774. 2012.
|
| 204 |
+
Chao Dong, Chen Change Loy, Kaiming He, and Xiaoou Tang. Image super-resolution using deep convolutional networks. arXiv preprint arXiv:1501.00092, 2015.
|
| 205 |
+
Alexey Dosovitskiy and Thomas Brox. Generating images with perceptual similarity metrics based on deep networks. CoRR, abs/1602.02644, 2016.
|
| 206 |
+
Gilles Fauconnier and Mark Turner. The Way We Think: Conceptual Blending and the Mind’s Hidden Complexities. Basic Books, 2003.
|
| 207 |
+
Basura Fernando, Amaury Habrard, Marc Sebban, and Tinne Tuytelaars. Unsupervised visual domain adaptation using subspace alignment. In ICCV, pp. 2960–2967, 2013.
|
| 208 |
+
Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, Franc¸ois Laviolette, Mario Marchand, and Victor Lempitsky. Domain-adversarial training of neural networks. JMLR, 17(1):2096–2030, January 2016.
|
| 209 |
+
Leon A. Gatys, Alexander S. Ecker, and Matthias Bethge. Image style transfer using convolutional neural networks. In CVPR, 2016.
|
| 210 |
+
|
| 211 |
+
Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NIPS, pp. 2672–2680. 2014.
|
| 212 |
+
|
| 213 |
+
Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In ECCV, 2016.
|
| 214 |
+
|
| 215 |
+
D.P. Kingma and J. Ba. Adam: A method for stochastic optimization. In The International Conference on Learning Representations (ICLR), 2016.
|
| 216 |
+
|
| 217 |
+
J. E. Kyprianidis, J. Collomosse, T. Wang, and T. Isenberg. State of the “art”: A taxonomy of artistic stylization techniques for images and video. IEEE Transactions on Visualization and Computer Graphics, 19(5):866–885, 2013.
|
| 218 |
+
|
| 219 |
+
Yann LeCun and Corinna Cortes. MNIST handwritten digit database. 2010. URL http://yann. lecun.com/exdb/mnist/.
|
| 220 |
+
|
| 221 |
+
A. Mahendran and A. Vedaldi. Understanding deep image representations by inverting them. In CVPR, 2015.
|
| 222 |
+
|
| 223 |
+
Mehdi Mirza and Simon Osindero. Conditional generative adversarial nets. arXiv preprint arXiv:1411.1784, 2014.
|
| 224 |
+
|
| 225 |
+
Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y. Ng. Reading digits in natural images with unsupervised feature learning. In NIPS Workshop on Deep Learning and Unsupervised Feature Learning, 2011.
|
| 226 |
+
|
| 227 |
+
H.W. $\mathrm { N g }$ and S. Winkler. A data-driven approach to cleaning large face datasets. In Proc. IEEE International Conference on Image Processing (ICIP), Paris, France, 2014.
|
| 228 |
+
|
| 229 |
+
O. M. Parkhi, A. Vedaldi, and A. Zisserman. Deep face recognition. In British Machine Vision Conference, 2015.
|
| 230 |
+
|
| 231 |
+
Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015.
|
| 232 |
+
|
| 233 |
+
Scott Reed, Zeynep Akata, Xinchen Yan, Lajanugen Logeswaran, Bernt Schiele, and Honglak Lee. Generative adversarial text to image synthesis. In ICML, 2016.
|
| 234 |
+
|
| 235 |
+
Leonid I. Rudin, Stanley Osher, and Emad Fatemi. Nonlinear total variation based noise removal algorithms. In International Conference of the Center for Nonlinear Studies on Experimental Mathematics : Computational Issues in Nonlinear Science, pp. 259–268, 1992.
|
| 236 |
+
|
| 237 |
+
Tim Salimans, Ian J. Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. arXiv preprint arXiv:1606.03498, 2016.
|
| 238 |
+
|
| 239 |
+
Yaniv Taigman, Ming Yang, Marc’Aurelio Ranzato, and Lior Wolf. Deepface: Closing the gap to human-level performance in face verification. In CVPR, 2014.
|
| 240 |
+
|
| 241 |
+
D. Ulyanov, V. Lebedev, A. Vedaldi, and V. Lempitsky. Texture networks: Feed-forward synthesis of textures and stylized images. In ICML, 2016.
|
| 242 |
+
|
| 243 |
+
Shuo Yang, Ping Luo, Chen Change Loy, and Xiaoou Tang. From facial parts responses to face detection: A deep learning approach. In ICCV, pp. 3676–3684, 2015.
|
| 244 |
+
|
| 245 |
+
Andrey Zhmoginov and Mark Sandler. Inverting face embeddings with convolutional neural networks. arXiv preprint arXiv:1606.04189, 2016.
|
| 246 |
+
|
| 247 |
+
# A FACESCRUB DATASET GENERATIONS
|
| 248 |
+
|
| 249 |
+
In Fig. 6 we show the full set of identities of the Facescrub dataset, and their corresponding generated emoji.
|
| 250 |
+
|
| 251 |
+

|
| 252 |
+
Figure 6: All 80 identities of the Facescrub dataset. The even columns show the results obtained for the images in the odd column to the left. Best viewed in color and zoom.
|
| 253 |
+
|
| 254 |
+

|
| 255 |
+
Figure 7: Maintaining expression in the domain transfer. In order to support a smiling expression, random smiling emoji were added to set of unlabeled samples from the domain $T$ and the DTN was re-trained. Each quadruplet include two pairs of {face, emoji} of the same identity in the two modes respectively: not-smiling and smiling. Odd columns are input; Subsequent even columns are output.
|
| 256 |
+
|
| 257 |
+
# B TRANSFERRING NON-IDENTITY DATA
|
| 258 |
+
|
| 259 |
+
$f$ may encode, in addition to identity, other data that is desirable to transfer. In the example of faces, this information might include expression, facial hair, glasses, pose, etc. In order to transfer such information, it is important that the set of samples in the target domain t present variability along the desirable dimensions. Otherwise, the GAN applied in the target domain (Eq. 4) would maintain these dimensions fixed. The set t employed throughout our experiments in Sec. 5.2 was constructed by sampling emoji of neutral expression. To support a smiling expression for example, we simply added to set $t$ random smiling emoji and re-trained the DTN. The results, presented in Fig. 7, demonstrate that $f$ contains expression information in addition to identity information, and that this information is enough in order to transfer smiling photos to smiling emoji.
|
| 260 |
+
|
| 261 |
+
# C THE EFFECT OF SUPER-RESOLUTION
|
| 262 |
+
|
| 263 |
+
As mentioned in Sec. 5, in order to upscale the $6 4 \times 6 4$ output to print quality, the method of Dong et al. (2015) is used. Fig. 8 shows the effect of applying this postprocessing step.
|
| 264 |
+
|
| 265 |
+
# D THE BASIS ELEMENTS OF THE FACE REPRESENTATION
|
| 266 |
+
|
| 267 |
+
Fig. 9 depicts the face emoji generated by $g$ for the standard basis of the face representation (Taigman et al., 2014), viewed as the vector space $\bar { \mathbb { R } } ^ { 2 5 6 }$ .
|
| 268 |
+
|
| 269 |
+
# E DOMAIN TRANSFER IN THE REVERSE DIRECTION
|
| 270 |
+
|
| 271 |
+
For completion, we present, in Fig. 10 results obtained by performing domain transfer using DTNs in the reverse direction of the one reported in Sec. 5.
|
| 272 |
+
|
| 273 |
+

|
| 274 |
+
Figure 8: The images in Fig. 4 above with (right version) and without (left version) applying superresolution. Best viewed on screen.
|
| 275 |
+
|
| 276 |
+

|
| 277 |
+
Figure 9: The emoji visualization of the standard basis vectors in the space of the face representation, i.e., $g ( e _ { 1 } ) , . . . , \bar { g ( e _ { 2 5 6 } ) }$ , where $e _ { i }$ is the $i$ standard basis vector in $\mathbb { R } ^ { 2 5 \hat { 6 } }$ .
|
| 278 |
+
|
| 279 |
+

|
| 280 |
+
Figure 10: Domain transfer in the other direction (see limitations in Sec. 6). Input (output) in odd (even) columns. (a) Transfer from MNIST to SVHN. (b) Transfer from emoji to face photos.
|
md/train/Skgy464Kvr/Skgy464Kvr.md
ADDED
|
@@ -0,0 +1,314 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# DETECTING AND DIAGNOSING ADVERSARIALIMAGES WITH CLASS-CONDITIONAL CAPSULERECONSTRUCTIONS
|
| 2 |
+
|
| 3 |
+
Yao Qin∗
|
| 4 |
+
UC San Diego
|
| 5 |
+
yaq007@eng.ucsd.edu
|
| 6 |
+
|
| 7 |
+
Nicholas Frosst∗ Google Brain frosst@google.com
|
| 8 |
+
|
| 9 |
+
Sara Sabour
|
| 10 |
+
Google Brain
|
| 11 |
+
sasabour@google.com
|
| 12 |
+
Colin Raffel
|
| 13 |
+
Google Brain
|
| 14 |
+
craffel@google.com
|
| 15 |
+
|
| 16 |
+
Garrison Cottrell UC San Diego gary@eng.ucsd.edu
|
| 17 |
+
|
| 18 |
+
Geoffrey Hinton
|
| 19 |
+
Google Brain
|
| 20 |
+
geoffhinton@google.com
|
| 21 |
+
|
| 22 |
+
# ABSTRACT
|
| 23 |
+
|
| 24 |
+
Adversarial examples raise questions about whether neural network models are sensitive to the same visual features as humans. In this paper, we first detect adversarial examples or otherwise corrupted images based on a class-conditional reconstruction of the input. To specifically attack our detection mechanism, we propose the Reconstructive Attack which seeks both to cause a misclassification and a low reconstruction error. This reconstructive attack produces undetected adversarial examples but with much smaller success rate. Among all these attacks, we find that CapsNets always perform better than convolutional networks. Then, we diagnose the adversarial examples for CapsNets and find that the success of the reconstructive attack is highly related to the visual similarity between the source and target class. Additionally, the resulting perturbations can cause the input image to appear visually more like the target class and hence become non-adversarial. This suggests that CapsNets use features that are more aligned with human perception and have the potential to address the central issue raised by adversarial examples.
|
| 25 |
+
|
| 26 |
+
# 1 INTRODUCTION
|
| 27 |
+
|
| 28 |
+
Adversarial examples (Szegedy et al., 2013) are inputs that are designed by an adversary to cause a machine learning system to make a misclassification. A series of studies on adversarial attacks have shown that it is easy to cause misclassifications using visually imperceptible changes to an image under $\ell _ { p }$ -norm based similarity metrics (Goodfellow et al., 2014; Kurakin et al., 2016; Madry et al., 2017; Carlini & Wagner, 2017b; Goodfellow et al., 2018). Since the discovery of adversarial examples, there has been a constant “arms race” between better attacks and better defenses. Many new defenses have been proposed (Song et al., 2017; Gong et al., 2017; Grosse et al., 2017; Metzen et al., 2017), only to be broken shortly thereafter (Carlini & Wagner, 2017a; Athalye et al., 2018). Hinton et al. (2018) showed that capsule models are more robust to simple adversarial attacks than CNNs but Michels et al. (2019) showed that this is not the case for all attacks.
|
| 29 |
+
|
| 30 |
+
The cycle of attacks and defenses motivates us to rethink both how we can improve the general robustness of neural networks as well as the high-level motivation for this pursuit. One potential path forward is to detect adversarial inputs, instead of attempting to accurately classify them (Schott et al., 2018; Roth et al., 2019). Recent work (Jetley et al., 2018; Gilmer et al., 2018b) argue that adversarial examples can exist within the data distribution, which implies that detecting adversarial examples based on an estimate of the data distribution alone might be insufficient. Instead, in this paper we develop methods for detecting adversarial examples by making use of class-conditional reconstruction networks. These sub-networks, first proposed by Sabour et al. (2017) as part of a Capsule Network (CapsNet), allow a model to produce a reconstruction of its input based on the identity and instantiation parameters of the winning capsule. Interestingly, we find that reconstructing an input from the capsule corresponding to the correct class results in a much lower reconstruction error than reconstructing the input from capsules corresponding to incorrect classes, as shown in Figure 1(a). Motivated by this, we propose using the reconstruction sub-network in a CapsNet as an attack-independent detection mechanism. Specifically, we reconstruct a given input from the pose parameters of the winning capsule and then detect adversarial examples by comparing the difference between the reconstruction distributions for natural and adversarial (or otherwise corrupted) images.
|
| 31 |
+
|
| 32 |
+

|
| 33 |
+
Figure 1: (a) The histogram of $\ell _ { 2 }$ distances between the input and the reconstruction using the correct capsule or other capsules in CapsNet on the real MNIST images. Notice the stark difference between the distributions of reconstructions of the capsule corresponding to the correct class and other capsules. (b) The histograms of $\ell _ { 2 }$ distances between the reconstruction and the input for real and adversarial images for the three models explored in this paper on the MNIST dataset. We use PGD (Madry et al., 2017) with the $\ell _ { \infty }$ bound $\epsilon = 0 . 3$ to create the attacks.
|
| 34 |
+
|
| 35 |
+
We extend this detection mechanism to standard convolutional neural networks (CNNs) and show its effectiveness against black box and white box attacks on three image datasets; MNIST, FashionMNIST and SVHN. We show that capsule models achieve the strongest attack detection rates and accuracy on these attacks. We then test our method against a stronger attack, the Reconstructive Attack, specifically designed to attack our detection mechanism by generating adversarial examples with a small reconstruction error. With this attack we are able to create undetected adversarial examples, but we show that this attack is less successful in fooling the classifier than a non-reconstructive attack.
|
| 36 |
+
|
| 37 |
+
Among all these attacks, we find CapsNets perform the best in detecting adversarial examples. To explain the success of CapsNets over CNNs, we further diagnose the adversarial examples for CapsNets and find that 1) the success of the targeted reconstructive attack is highly dependent on the visual similarity between the source image and the target class. 2) many of the resultant attacks resemble members of the target class and so cease to be “adversarial” – i.e., they may also be misclassified by humans. These findings suggest that CapsNets with class conditional reconstructions have the potential to address the real issue with adversarial examples – networks should make predictions based on the same properties of the image that people use rather than using features that can be manipulated by an imperceptible adversarial attack.
|
| 38 |
+
|
| 39 |
+
In summary, our main contributions are:
|
| 40 |
+
|
| 41 |
+
• We propose a class-conditional capsule reconstruction based detection method to detect standard white-box/black-box adversarial examples on three datasets. This detection mechanism is attack-agnostic and is successfully extended to standard convolutional neural networks. We test our detection mechanism on the corrupted MNIST dataset and show that it can work as a general out-of-distribution detector.
|
| 42 |
+
• A stronger reconstructive attack is specifically designed to attack our detection mechanism but becomes less successful in fooling the classifier.
|
| 43 |
+
• We perform extensive qualitative studies to explain the superior performance of CapsNets in detecting adversarial examples compared to CNNs. The results suggest that the features captured by CapsNets are more aligned with human perception.
|
| 44 |
+
|
| 45 |
+
# 2 RELATED WORK
|
| 46 |
+
|
| 47 |
+
Adversarial examples were first introduced in (Biggio et al., 2013; Szegedy et al., 2013), where a given image was modified by following the gradient of a classifier’s output with respect to the image’s pixels. Goodfellow et al. (2014) then developed the more efficient Fast Gradient Sign method (FGSM), which can change the label of the input image $X$ with a similarly imperceptible perturbation that is constructed by taking an $\epsilon$ step in the direction of the gradient. Later, the Basic Iterative Method (BIM) (Kurakin et al., 2016) and Projected Gradient Descent (Madry et al., 2017) can generate stronger attacks improved on FGSM by taking multiple steps in the direction of the gradient. In addition, Carlini & Wagner (2017b) proposed another iterative optimization-based method to construct strong adversarial examples with small perturbations.
|
| 48 |
+
|
| 49 |
+
An early approach to reducing vulnerability to adversarial examples was proposed by (Goodfellow et al., 2014), where a network was trained on both clean images and adversarially perturbed ones. Since then, there has been a constant “arms race” between better attacks and better defenses; Kurakin et al. (2018) provide an overview of this field. However, many defenses against adversarial examples have been demonstrated to be an effect of “obfuscated gradients” and can be further circumvented under the white-box setting (Athalye et al., 2018).
|
| 50 |
+
|
| 51 |
+
Another line of work attempts to circumvent adversarial examples by detecting them with a separatelytrained classifier (Gong et al., 2017; Grosse et al., 2017; Metzen et al., 2017) or using statistical properties (Hendrycks & Gimpel, 2016; Li & Li, 2017; Feinman et al., 2017; Grosse et al., 2017). However, many of these approaches were subsequently shown to be flawed (Carlini & Wagner, 2017a; Athalye et al., 2018). The most recent work in detecting adversarial examples (Roth et al., 2019) that has a $9 9 \%$ true positive rate on CIFAR-10 dataset (Krizhevsky, 2009) has also been fully bypassed by later work (Hosseini et al., 2019) which decreased the true positive rate to less than $2 \%$ .
|
| 52 |
+
|
| 53 |
+
Similar to our work, Schott et al. (2018) also investigated the effectiveness of a class-conditional generative model as a defense mechanism for MNIST digits. However, we differ in some important ways. Their model is in some ways the opposite of ours - they first attempt to generate the input, and then make a classification on the resulting generated images, whereas our method attempts to first classify the input, making use of an otherwise unchanged capsule classification model, and then generates the input from a high level representation. As such, our method does not increase the computational overhead of classifying the input, compared to the approach of Schott et al. (2018). In addition, the work of Schott et al. (2018) is only applied to MNIST, so our results on the more complex datasets represent an improvement.
|
| 54 |
+
|
| 55 |
+
# 3 PRELIMINARIES
|
| 56 |
+
|
| 57 |
+
Adversarial Examples Given a clean test image $x$ , its corresponding label $y$ , and a classifier $f ( \cdot )$ which predicts a class label given an input, we refer to $x ^ { \prime } = x + \delta$ as an adversarial example if it is able to fool the classifier into making a wrong prediction $f ( x ^ { \prime } ) \neq f ( x ) = y .$ . The small adversarial perturbation $\delta$ (where “small” is measured under some norm) causes the adversarial example $x ^ { \prime }$ to appear visually similar to the clean image $x$ but to be classified differently. In the unrestricted case where we only require that $f ( x ^ { \prime } ) \neq y$ , we refer to $x ^ { \prime }$ as an “untargeted adversarial example”. A more powerful attack is to generate a “targeted adversarial example”: instead of simply fooling the classifier to make a wrong prediction, we force the classifier to predict some targeted label $f ( x ^ { \prime } ) = t \neq y$ . In this paper, the target label $t$ is selected uniformly at random as any label which is not the ground-truth correct label. As is standard practice in the literature, in this paper we test our detection mechanism on three $\ell _ { \infty }$ norm based attacks (fast gradient sign method (FGSM) (Goodfellow et al., 2014), the basic iterative method (BIM) (Kurakin et al., 2016), projected gradient descent (PGD) (Madry et al., 2017)) and one $\ell _ { 2 }$ norm based attack (Carlini-Wagner (CW) (Carlini & Wagner, 2017b)).
|
| 58 |
+
|
| 59 |
+
Capsule Networks Capsule Networks (CapsNets) are an alternative architecture for neural networks (Sabour et al., 2017; Hinton et al., 2018). In this work we make use of the CapsNet architecture detailed by (Sabour et al., 2017). Unlike a standard neural network which is made up of layers of scalar-valued units, CapsNets are made up of layers of capsules, that output a vector or matrix. Intuitively, just as one can think of the activation of a unit in a normal neural network as the presence of a feature in the input, the activation of a capsule can be thought of as both the presence of a feature and the pose parameters that represent attributes of that feature. A top-level capsule in a classification network therefore outputs both a classification and pose parameters that represent the instance of that class in the input. This high level representation allows us to train a reconstruction network.
|
| 60 |
+
|
| 61 |
+
Threat Model In this paper, we test our detection mechanism against both white-box and black-box attacks. For white-box attacks, the adversary has full access to the model as well as its parameters. In particular, the adversary is allowed to compute the gradient through the model to generate adversarial examples. To perform black-box attacks, the adversary is allowed to know the network architecture but not its parameters. Therefore, we retrain a substitute model that has the same architecture as the target model and generate adversarial examples by attacking the substitute model. Then we transfer these attacks to the target model. For $\ell _ { \infty }$ based attacks, we always control the $\ell _ { \infty }$ norm of the adversarial perturbation to be within a relatively small bound $\epsilon _ { \infty }$ , specific to each dataset.
|
| 62 |
+
|
| 63 |
+
# 4 DETECTING ADVERSARIAL IMAGES BY RECONSTRUCTION
|
| 64 |
+
|
| 65 |
+
To detect adversarial images, we make use of the reconstruction network proposed in (Sabour et al., 2017), which takes pose parameters $v$ as input and outputs the reconstructed image $r ( v )$ . The reconstruction network is simply a fully connected neural network with two ReLU hidden layers with 512 and 1024 units respectively, with a sigmoid output with the same dimensionality as the dataset. The reconstruction network is trained to minimize the $\ell _ { 2 }$ distance between the input image and the reconstructed image. This same network architecture is used for all the models and datasets we explore. The only difference is what is given to the reconstruction network as input.
|
| 66 |
+
|
| 67 |
+
# 4.1 MODELS
|
| 68 |
+
|
| 69 |
+
CapsNet The reconstruction network of the CapsNet is class-conditional: It takes in the pose parameters of all the class capsules and masks all values to 0 except for the pose parameters of the predicted class. We use this reconstruction network for detecting adversarial attacks by measuring the Euclidean distance between the input and a class conditional reconstruction. Specifically, for any given input $x$ , the CapsNet outputs a prediction $f ( x )$ as well as the pose parameters $v$ for all classes. The reconstruction network takes in the pose parameters and then selects the pose parameter corresponding to the predicted class, denoted as $v _ { f ( x ) }$ , to generate a reconstruction $r ( v _ { f ( x ) } )$ . Then we compute the $\ell _ { 2 }$ reconstruction distance $d ( \boldsymbol { x } ) = \| r ( \boldsymbol { v } _ { f ( \boldsymbol { x } ) } ) , \boldsymbol { x } \| _ { 2 }$ between the reconstructed image and the input image, and compare it with a pre-defined detection threshold $\theta$ (described below in Section 4.2). If the reconstruction distance ${ \bar { d } } ( x )$ is higher than the detection threshold $\theta$ , we flag the input as an adversarial example. Figure 1 (b) shows an example of histograms of reconstruction distances for natural images and typical adversarial examples.
|
| 70 |
+
|
| 71 |
+
$\mathbf { C N N + C R }$ Although our strategy is inspired by the reconstruction networks used in CapsNets, the strategy can be extended to standard convolutional neural networks (CNNs). We create a similar architecture, CNN with conditional reconstruction $( \mathrm { C N N + C R } )$ ), by dividing the penultimate hidden layer of a CNN into groups corresponding to each class. The sum of each neuron group serves as the logit for that particular class and the group itself serves the same purpose as the pose parameters in the CapsNet. We use the same masking mechanism as Sabour et al. (2017) to select the pose parameter corresponding to the predicted label $v _ { f ( x ) }$ and generate the reconstruction based on the selected pose parameters. In this way we extend the class-conditional reconstruction network to standard CNNs.
|
| 72 |
+
|
| 73 |
+
$\mathbf { C N N + R }$ We can also create a more na¨ıve implementation of our strategy by simply computing the reconstruction from the activations in the entire penultimate layer without any masking mechanism. We call this model the $\mathrm { " C N N { + } R } \mathrm { " }$ model. In this way we are able to study the effect of conditioning on the predicted class.
|
| 74 |
+
|
| 75 |
+
# 4.2 DETECTION THRESHOLD
|
| 76 |
+
|
| 77 |
+
We find the threshold $\theta$ for detecting adversarial inputs by measuring the reconstruction error between a validation input image and its reconstruction. If the distance between the input and the reconstruction is above the chosen threshold $\theta$ , we classify the data as adversarial. Choosing the detection threshold $\theta$ involves a trade-off between false positive and false negative detection rates. The optimal threshold depends on the probability of the system being attacked. Such a trade-off is discussed by Gilmer et al. (2018a). In our experiments we don’t tune this parameter and simply set it as the 95th percentile of validation distances. This means our false positive rate on real validation data is $5 \%$ .
|
| 78 |
+
|
| 79 |
+
Table 1: Success Rate / Undetected Rate of white-box targeted and untargeted attacks on the MNIST dataset. In the table, $S _ { t } / R _ { t }$ is shown for targeted attacks and $S _ { u } / R _ { u }$ is presented for untargeted attacks. A smaller success rate and undetected rate means a stronger defense model. Full results for FashionMNIST and SVHN can be seen in Table 5 in the Appendix.
|
| 80 |
+
|
| 81 |
+
<table><tr><td rowspan="2">Networks</td><td colspan="4">Targeted (%)</td><td colspan="4">Untargeted (%)</td></tr><tr><td>FGSM</td><td>BIM</td><td>PGD</td><td>CW</td><td>FGSM</td><td>BIM</td><td>PGD</td><td>CW</td></tr><tr><td>CapsNet</td><td>3/0</td><td>82/0</td><td>86/0</td><td>99/2</td><td>11/0</td><td>99/0</td><td>99/0</td><td>100/19</td></tr><tr><td>CNN+CR</td><td>16/0</td><td>93/0</td><td>95/0</td><td>89/8</td><td>85/0</td><td>100/0</td><td>100/0</td><td>100/28</td></tr><tr><td>CNN+R</td><td>37/0</td><td>100/0</td><td>100/0</td><td>100/47</td><td>64/0</td><td>100/0</td><td>100/0</td><td>100/63</td></tr></table>
|
| 82 |
+
|
| 83 |
+
# 4.3 EVALUATION METRICS
|
| 84 |
+
|
| 85 |
+
We use Success Rate to measure the success of attacks. For targeted attacks, the success rate $S _ { t }$ is defined as the proportion of inputs which are classified as the target class, $\begin{array} { r } { S _ { t } = \frac { 1 } { N } \sum _ { i } ^ { N } ( f ( x _ { i } ^ { \prime } ) = } \end{array}$ $t _ { i }$ ), while the success rate for untargeted attacks is defined as the proportion of inputs which are misclassified, $\begin{array} { r } { S _ { u } ~ = ~ \frac { 1 } { N } \sum _ { i } ^ { N } ( f ( x _ { i } ^ { \prime } ) ~ \neq ~ y _ { i } ) } \end{array}$ . Previous work (Carlini & Wagner, $2 0 1 7 \mathrm { a }$ ; Hosseini et al., 2019) used the True Positive Rate to measure the proportion of adversarial examples that are detected, which alone is insufficient to measure the ability of different detection mechanism because the unsuccessful adversarial examples do not have to be detected. Therefore, in this paper, we propose to use the Undetected Rate: the proportion of attacks that are successful and undetected to evaluate the detection mechanism. For targeted attacks, the undetected rate is defined as $\begin{array} { r } { R _ { t } = \frac { 1 } { N } \sum _ { i } ^ { N } ( f ( x _ { i } ^ { \prime } ) = t _ { i } ) \cap ( d ( x _ { i } ^ { \prime } ) \leq \theta ) } \end{array}$ , where $d ( \cdot )$ computes the reconstruction distance of the input and $\theta$ denotes the detection threshold introduced in Section 4.2. Similarly, the undetected rate for untargeted attacks Ru can be defined as Ru = 1N PNi (f (x0i) 6= yi) ∩ (d(x0i) ≤ θ). The smaller undetected rate can also be used to evaluate the attacks (higher is better). We also plot the Undetected Rate vs. False Positive Rate curve to compare the detection performance between different models, where False Positive Rate is defined as the proportion of clean examples that are misclassified as the adversarial example by the detection method.
|
| 86 |
+
|
| 87 |
+
# 4.4 TEST MODELS AND DATASETS
|
| 88 |
+
|
| 89 |
+
In all experiments, all three models (CapsNet, $\mathrm { C N N + R }$ , and $\mathbf { C N N + C R }$ ) have the same number of parameters and were trained with Adam (Kingma & Ba, 2014) for the same number of epochs. In general, all models achieved similar test accuracy. We did not do an exhaustive hyperparameter search on these models, instead we chose hyperparameters that allowed each model to perform roughly equivalently on the test sets. We run experiments on three datasets: MNIST (LeCun et al., 1998), FashionMNIST (Xiao et al., 2017), and SVHN (Netzer et al., 2011). The test error rate for each model on these three datasets, as well as details of the model architectures, can be seen in Section A and Section B in the Appendix.
|
| 90 |
+
|
| 91 |
+
# 5 EXPERIMENTS
|
| 92 |
+
|
| 93 |
+
We first demonstrate how reconstruction networks can detect standard white and black-box attacks in addition to naturally corrupted images. Then, we introduce the “reconstructive attack”, which is specifically designed to circumvent our defense and show that it is a more powerful attack in this setting. Based on this finding, we qualitatively study the kind of misclassifications caused by the reconstructive attack and argue that they suggest that CapsNets learn features that are better aligned with human perception.
|
| 94 |
+
|
| 95 |
+
# 5.1 STANDARD ATTACKS
|
| 96 |
+
|
| 97 |
+
White Box We present the success and undetected rates for several targeted and untargeted attacks on MNIST (Table 1), FashionMNIST, and SVHN (Table 5 presented in the Appendix). Our method is able to accurately detect many attacks with very low undetected rates. Capsule models almost always have the lowest undetected rates out of our three models. It is worth noting that this method performs best with the simplest dataset, MNIST, and that the highest undetected rates are found with the Carlini-Wagner attack on the SVHN dataset. This illustrates both the strength of this attack and a shortcoming of our defense, namely that our detection mechanism relies on $\ell _ { 2 }$ image distance as a proxy for visual similarity, and in the case of higher dimensional color datasets such as SVHN, this proxy is less meaningful.
|
| 98 |
+
|
| 99 |
+
Table 2: Error Rate/Undetected Rate on the Corrupted MNIST dataset. A smaller error rate and undetected rate means a better defense model.
|
| 100 |
+
|
| 101 |
+
<table><tr><td>Corruption</td><td>Clean</td><td>Gaussian Noise</td><td>Gaussian Blur</td><td>Line</td><td>Dotted Line</td><td>Elastic Transform</td></tr><tr><td>CapsNet</td><td>0.6/0.2</td><td>12.1/0.0</td><td>10.3/4.1</td><td>19.6/0.1</td><td>4.3/0.0</td><td>11.3/0.8</td></tr><tr><td>CNN+CR</td><td>0.7/0.3</td><td>9.8/0.0</td><td>6.7/4.2</td><td>17.6/0.1</td><td>4.2/0.0</td><td>11.1/1.1</td></tr><tr><td>CNN+R</td><td>0.6/0.4</td><td>6.7/0.0</td><td>8.9/6.4</td><td>18.9/0.1</td><td>3.1/0.0</td><td>12.2/2.1</td></tr><tr><td>Corruption</td><td>Saturate</td><td>JPEG</td><td>Quantize</td><td>Sheer</td><td>Spatter</td><td>Rotate</td></tr><tr><td>CapsNet</td><td>3.5/0.0</td><td>0.8/0.4</td><td>0.7/0.1</td><td>1.6/0.4</td><td>1.9/0.2</td><td>6.5/2.2</td></tr><tr><td>CNN+CR</td><td>1.5/0.0</td><td>0.8/0.5</td><td>0.9/0.1</td><td>2.1/0.4</td><td>1.8/0.4</td><td>6.1/1.6</td></tr><tr><td>CNN+R</td><td>1.2/0.0</td><td>0.7/0.5</td><td>0.7/0.2</td><td>2.2/0.7</td><td>1.8/0.4</td><td>6.5/3.4</td></tr><tr><td>Corruption</td><td>Contrast</td><td>Inverse</td><td>Canny Edge</td><td>Fog</td><td>Frost</td><td>Zigzag</td></tr><tr><td>CapsNet</td><td>92.0/0.0</td><td>91.0/0.0</td><td>21.5/0.0</td><td>83.7/0.0</td><td>70.6/0.0</td><td>16.9/0.0</td></tr><tr><td>CNN+CR</td><td>72.0/32.6</td><td>78.1/0.0</td><td>34.6/0.0</td><td>66.0/0.5</td><td>37.6/0.0</td><td>18.4/0.0</td></tr><tr><td>CNN+R</td><td>73.4/49.4</td><td>88.1/0.0</td><td>23.4/0.0</td><td>65.6/0.1</td><td>36.2/0.0</td><td>17.5/0.0</td></tr></table>
|
| 102 |
+
|
| 103 |
+
Black Box We also tested our detection mechanism results on black box attacks. Given the low undetected rates in the white-box settings, it is not surprising that our detection method is able to detect black box attacks as well. In fact, on the MNIST dataset the capsule model is able to detect all targeted and untargeted PGD attacks. Both the CNN-R and the CNN-CR models are able to detect the black box attacks as well, but with a relatively higher undetected rate. A table of these results can be seen in Table 7 in the Appendix.
|
| 104 |
+
|
| 105 |
+
# 5.2 CORRUPTION ATTACKS
|
| 106 |
+
|
| 107 |
+
Recent work has argued that improving the robustness of neural networks to $\ell _ { p }$ norm bounded adversarial attacks should not come at the expense of increasing error rates under distributional shifts that do not affect human classification rates and are likely to be encountered in the “realworld” (Gilmer et al., 2018a). For example, if an image is corrupted due to adverse weather, lighting, or occlusion, we might hope that our model can continue to provide reliable predictions or detect the distributional shift. We can test our detection method on its ability to detect these distributional shifts by making use of the Corrupted MNIST dataset (Mu & Gilmer, 2019). This data set contains many visual transformations of MNIST that do not seem to affect human performance, but nevertheless are strongly misclassified by state-of-the-art MNIST models. Our three models can almost always detect these distributional shifts (in all corruptions CapsNets have either a small undetected rate or an undetected rate of 0). The error rate (the proportion of misclassified input) and undetected rate of three test models on the Corrupted MNIST dataset is shown in Table 2. Please refer to Figure 7 and Figure 8 in the Appendix for visualization of Corrupted MNIST.
|
| 108 |
+
|
| 109 |
+
# 5.3 RECONSTRUCTIVE ATTACKS
|
| 110 |
+
|
| 111 |
+
Thus far we have only evaluated previously-defined attacks. Following the suggestion in (Carlini & Wagner, 2017a) that detection methods need to show effectiveness towards defense-aware attacks, we introduce an attack specifically designed to take into account our defense mechanism. In order to construct adversarial examples that cannot be detected by the network, we propose a two-stage optimization method to generate a “reconstructive attack”.
|
| 112 |
+
|
| 113 |
+
Table 3: Success rate and the worst case undetected rate of white-box targeted and untargeted reconstructive attacks. $S _ { t } / R _ { t }$ is shown for targeted attacks and $S _ { u } / R _ { u }$ is presented for untargeted attacks. The worst case undetected rate is reported via tuning the hyperparameter $\beta$ in Eqn 1 and Eqn 2. The best defense models are shown in bold (smaller success rate and undetected rate is better). All the numbers are shown in $\%$ . A full table with more attacks can be seen in Table 6 in Appendix.
|
| 114 |
+
|
| 115 |
+
<table><tr><td></td><td colspan="2">MNIST</td><td colspan="2">FASHION</td><td colspan="2">SVHN</td></tr><tr><td></td><td>Targeted R-PGD</td><td>Untargeted R-PGD</td><td>Targeted R-PGD</td><td>Untargeted R-PGD</td><td>Targeted R-PGD</td><td>Untargeted R-PGD</td></tr><tr><td>CapsNet</td><td>50.7/33.7</td><td>88.1/37.9</td><td>53.7/29.8</td><td>84.9/75.5</td><td>82.0/79.2</td><td>98.9/97.5</td></tr><tr><td>CNN+CR</td><td>98.6/68.1</td><td>99.4/87.7</td><td>89.8/84.4</td><td>91.5/86.0</td><td>99.0/97.9</td><td>99.9/99.5</td></tr><tr><td>CNN+R</td><td>95.5/71.2</td><td>95.1/70.5</td><td>94.6/88.4</td><td>98.9/90.0</td><td>99.5/99.3</td><td>100.0/99.9</td></tr></table>
|
| 116 |
+
|
| 117 |
+

|
| 118 |
+
Figure 2: The undetected rate of the white-box targeted defense-aware R-PGD attack versus the False Positive Rate on the MNIST, Fashion-MNIST and SVHN datasets.
|
| 119 |
+
|
| 120 |
+
Untargeted Reconstructive Attacks To construct untargeted reconstructive attacks, we first update the perturbation based on the gradient of the cross-entropy loss function following a standard FGSM attack (Goodfellow et al., 2014), that is:
|
| 121 |
+
|
| 122 |
+
$$
|
| 123 |
+
\delta \gets \mathrm { c l i p } _ { \epsilon } ( \delta + c \cdot \beta \cdot \mathrm { s i g n } ( \nabla _ { \delta } \ell _ { n e t } ( f ( x + \delta ) , y ) ) ) ,
|
| 124 |
+
$$
|
| 125 |
+
|
| 126 |
+
where $\ell _ { n e t } ( f ( \cdot ) , y )$ is the cross-entropy loss function, $\epsilon$ is the $\ell _ { \infty }$ bound for our attacks, $c$ is a hyperparameter controlling the step size in each iteration and $\beta$ is a hyperparameter which balances the importance of the cross-entropy loss and the reconstruction loss (explained further below). In the second stage, we focus on constraining the reconstructed image from the newly predicted label to have a small reconstruction distance by updating $\delta$ according to
|
| 127 |
+
|
| 128 |
+
$$
|
| 129 |
+
\delta \gets \mathrm { c l i p } _ { \epsilon } ( \delta - c \cdot ( 1 - \beta ) \cdot \mathrm { s i g n } ( \nabla _ { \delta } ( \| r ( v _ { f ( x + \delta ) } ) - ( x + \delta ) \| _ { 2 } ) ) ) ,
|
| 130 |
+
$$
|
| 131 |
+
|
| 132 |
+
where $r \big ( v _ { f ( x + \delta ) } \big )$ is the class-conditional reconstruction based on the predicted label $f ( x + \delta )$ in a CapsNet or $\mathrm { C N N + C R }$ network. The $\delta$ used here is the optimized $\delta$ from the first stage. $\| r ( v _ { f ( x + \delta ) } ) -$ $( x + \delta ) \| _ { 2 }$ is the $\ell _ { 2 }$ reconstruction distance between the reconstructed image and the input image. Since the $\mathrm { C N N + R }$ network does not use the class conditional reconstruction, we simply use the reconstructed image without the masking mechanism. According to Eqn 1 and Eqn 2, we can see that $\beta$ balances the importance between the success rate of attacks and the reconstruction distance. This hyperparameter was tuned for each model and each dataset in order to create the strongest attacks. The success rate and undetected rate change as this parameter, which is shown in Figure 9 in Appendix.
|
| 133 |
+
|
| 134 |
+
Targeted Reconstructive Attacks We perform a similar two-stage optimization to construct targeted reconstructive attacks, by defining a target label and attempting to maximize the classification probability of this label, and minimize the reconstruction error from corresponding capsule. Because the targeted label is given, another way to construct targeted reconstructive attacks is to combine these two stages into one stage via minimizing the loss function $\ell = \boldsymbol { \beta } \cdot \ell _ { n e t } ( f ( x + \delta ) , y ) + ( 1 - \beta ) \cdot \| \boldsymbol { r } ( v _ { f ( x + \delta ) } ) - ( x + \delta ) \| _ { 2 }$ . We implemented both of these targeted reconstructive attacks and found that the two-stage version is a stronger attack. Therefore, all the Reconstructive Attack experiments performed in this paper are based on two-stage optimization.
|
| 135 |
+
|
| 136 |
+

|
| 137 |
+
Figure 3: The defense-aware R-PGD attack is tested on the CIFAR-10 dataset with $\epsilon _ { \infty } = 8 / 2 5 5$ . Left: The undetected rate of white-box/black-box defense-aware R-PGD versus the Fasle Positive Rate for the clean examples. The test model is our CapsNet. Right: The undetected rate of white-box defense-aware R-PGD versus the Fasle Positive Rate for the clean examples. The test model is our CapsNet using class-conditional reconstruction, “CapsNet All” using all capsule information, and the DeepCaps (Rajasegaran et al., 2019) using class-independent capsule information.
|
| 138 |
+
|
| 139 |
+
We build our reconstructive attack based on the standard PGD attack, denoted as R-PGD, and test the performance of our detection models against this reconstructive attack in a white-box setting (white-box Reconstructive FGSM and BIM are reported in Table 6 in the Appendix). Comparing Table 1 and Table 3, we can see that the Reconstructive Attack is significantly less successful at changing the models prediction (lower success rates than the standard attack). However, this attack is more successful at fooling our detection method. For all attacks and datasets the capsule model has the lowest attack success rate and the lowest undetected rate. We report results for black-box R-PGD attacks in Table 7 in the Appendix, which suggest similar conclusions.
|
| 140 |
+
|
| 141 |
+
In addition, we report the undetected rate of the white-box targeted defense-aware R-PGD attack versus the False Positive Rate on the MNIST, Fashion-MNIST and SVHN datasets in Figure 2. We can clearly see that the undetected rate of the defense-aware attack against CapsNet is significantly smaller than the CNN-based networks, which suggests that CapsNets are more robust against adversarial attacks. Furthermore, CNN with class-conditional reconstruction $\mathrm { C N N + C R }$ ) has smaller undetected rate at the same False Positive Rate compared to the CNN without class-conditional reconstruction $( \mathrm { C N N + R } )$ , which suggests the class-conditional information is helpful in our models to improve the robustness against adversarial attacks.
|
| 142 |
+
|
| 143 |
+
# 5.4 CIFAR-10 DATASET
|
| 144 |
+
|
| 145 |
+
In order to show that our method based on CapsNet is capable to scale up to more complex datasets, we test our detection method with a deeper reconstruction network on CIFAR-10 (Krizhevsky, 2009). The classification accuracy on the clean test dataset is $9 2 . 2 \%$ . In addition, we display the undetected rate of the white-box/black-box defense-aware R-PGD attack against CapsNets versus the False Positive Rate in Figure 3 (Left), where we can see a significant drop of the undetected rate of black-box R-PGD compared to the white-box setting. This indicates the CapsNets greatly reduce the attack transferability and the threat of black-box attacks.
|
| 146 |
+
|
| 147 |
+
Class-conditional Information To investigate the effectiveness of the class-conditional information in the reconstruction network, we compare our CapsNet based on (Sabour et al., 2017) with the other two variants of CapsNets: “CapsNet All” and “DeepCaps” (Rajasegaran et al., 2019). In “CapsNet All”, we remove the masking mechanism in the CapsNet and use all the capsules to do the reconstruction. In “DeepCaps”, we extract the winning-capsule information as a single vector and used it as the input for the reconstruction network instead of using a masking mechanism to mask out the losing capsules information. In this way, the class information in DeepCaps is more explicitly fed into the reconstruction network. As shown in Figure 3 (right), our CapsNet has the best detection performance (the lowest undetected rate at the same False Positive Rate) compared to the other two
|
| 148 |
+
|
| 149 |
+

|
| 150 |
+
|
| 151 |
+

|
| 152 |
+
Figure 4: This diagram visualizes the adversarial success rates for each source/target pair for targeted R-PGD attacks on Fashion-MNIST with $\epsilon _ { \infty } = 2 5 / 2 5 5$ . The size of the box at position x, y represents the success rate of adversarially perturbing inputs of class $\mathbf { X }$ to be classified as class y. We can see that there is significantly higher variance for the CapsNet model than for the two CNN models.
|
| 153 |
+
Figure 5: These are randomly sampled (not cherry picked) successful and undetected adversarial attacks created by R-PGD with a target class of 0 for each model on the SVHN dataset $\epsilon _ { \infty } = 2 5 / 2 5 5 )$ . We can see that for the capsule model, many of the attacks are not “adversarial” as they resemble members of the target class.
|
| 154 |
+
|
| 155 |
+
Capsule models. “DeepCaps” performs slightly worse than our “CapsNet” and “CapsNet All” has the worst detection performance. Therefore, we conclude that the class-conditional information used in the reconstruction network increases the model’s robustness to adversarial attack. This also holds true to CNN-based networks because $\mathrm { C N N + C R }$ has a better detection performance than $\mathrm { C N N + R }$ , shown in Figure 2.
|
| 156 |
+
|
| 157 |
+
# 6 VISUAL COHERENCE OF THE RECONSTRUCTIVE ATTACK
|
| 158 |
+
|
| 159 |
+
The great success of CapsNet over CNN-based models motivates us to further diagnose the generated adversarial examples for CapsNets. If our true aim in adversarial robustness research is to create models that make predictions based on reasonable and human-observable features, then we would prefer models that are more likely to misclassify a “shirt” as a “t-shirt” (in the case of FashionMNIST) than to misclassify a “bag” as a “sweater”. For a model to behave ideally, the success of an adversarial perturbation would be related to the visual similarity between the source and the target class. By visualizing a matrix of adversarial success rates between each pair of classes (shown in Figure 4), we can see that for the capsule model there is a great variance between the source and target class pairs and that the success rate of attacks is highly related to the visual similarity of the classes. However, this is not the case for either of the other two CNN-based models.
|
| 160 |
+
|
| 161 |
+
Thus far we have treated all attacks as equal. However, a key component of an adversarial example is that it is visually similar to the source image, and that it does not resemble the adversarial target class. The adversarial research community makes use of a small epsilon bound as a mechanism for ensuring that the resultant adversarial attacks are visually unchanged from the source image. For standard attacks against CNN-based models this heuristic is sufficient, because taking gradient steps in the image space in order to have a network misclassify an image normally results in something visually similar to the source image. But this is not the case for adversarial attacks against CapsNets. As shown in Figure 5, when we use R-PGD to attack the CapsNet, many of the resultant attacks resemble members of the target class. In this way, they stop being “adversarial”. As such, an attack detection method which does not detect them as adversarial is arguably behaving correctly. This puts the previously undetected rates presented earlier in a new light, and illustrates a difficulty in the evaluation of adversarial attacks and defenses. In addition, it should be noted that this phenomenon rarely occurs in a standard convolutional neural network, which suggests that the features captured by CapsNet are more aligned with human perception.
|
| 162 |
+
|
| 163 |
+
# 7 DISCUSSION
|
| 164 |
+
|
| 165 |
+
Our detection mechanism relies on a similarity metric (i.e. a measure of reconstruction error) between the reconstruction and the input. This metric is required both during training in order to train the reconstruction network and during test time in order to flag adversarial examples. In the four datasets we have evaluated, the distance between examples roughly correlates with semantic similarity. However, this may not be the case for images in more complex datasets such as the SUN dataset (Xiao et al., 2010) and ImageNet (Deng et al., 2009), in which two images may be similar in terms of semantic content but nevertheless have significant $\ell _ { 2 }$ distance. A better similarity metric (Theis et al., 2015; Zhang et al., 2018) can be further explored to extend our methods to more complex problems. Furthermore our reconstruction network is trained on a hidden representation of one class but is trained to reconstruct the entire input. In datasets without distractors or backgrounds, this is not a problem. But in the case of ImageNet, in which the object responsible for the classification is not the only object in the image, attempting to reconstruct the entire input from a class encoding seems misguided.
|
| 166 |
+
|
| 167 |
+
# 8 CONCLUSION
|
| 168 |
+
|
| 169 |
+
We have presented a class-conditional reconstruction-based detection method that does not rely on a specific predefined adversarial attack. We have shown that by reconstructing the input from the internal class-conditional representation, our system is able to accurately detect black-box and white-box FGSM, BIM, PGD, and CW attacks. We then proposed a new attack to beat our defense - the Reconstructive Attack - in which the adversary optimizes not only the classification loss but also minimizes the reconstruction loss. We showed that this attack was able to fool our detection mechanism but with a much smaller success rate than a standard attack.
|
| 170 |
+
|
| 171 |
+
Compared to CNN-based models, we showed that the CapsNet was able to detect adversarial examples with greater accuracy on all the datasets we explored. To further explain the success of CapsNet, we qualitatively showed that the success of the reconstructive attack was highly related to the visual similarity between the target class and the source class for the CapsNet. In addition, we showed that images generated by this reconstructive attack to attack the CapsNet are not typically adversarial, i.e. many of the resultant attacks resemble members of the target class even with a small $\ell _ { \infty }$ norm bound. These are not the case for the CNN-based models. The extensive qualitative studies indicate that the capsule model relies on visual features similar to those used by humans. We believe this is a step towards solving the true problem posed by adversarial examples.
|
| 172 |
+
|
| 173 |
+
# REFERENCES
|
| 174 |
+
|
| 175 |
+
Anish Athalye, Nicholas Carlini, and David A. Wagner. Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. In International Conference on Machine Learning, 2018.
|
| 176 |
+
|
| 177 |
+
Battista Biggio, Igino Corona, Davide Maiorca, Blaine Nelson, Nedim Srndi ˇ c, Pavel Laskov, Giorgio ´ Giacinto, and Fabio Roli. Evasion attacks against machine learning at test time. In Joint European conference on machine learning and knowledge discovery in databases, pp. 387–402. Springer, 2013.
|
| 178 |
+
|
| 179 |
+
Nicholas Carlini and David Wagner. Adversarial examples are not easily detected: Bypassing ten detection methods. In Proceedings of the 10th ACM Workshop on Artificial Intelligence and Security, pp. 3–14. ACM, 2017a.
|
| 180 |
+
|
| 181 |
+
Nicholas Carlini and David Wagner. Towards evaluating the robustness of neural networks. In 2017 IEEE Symposium on Security and Privacy (SP), pp. 39–57. IEEE, 2017b.
|
| 182 |
+
|
| 183 |
+
Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. ImageNet: A large-scale hierarchical image database. In IEEE Conference on Computer Vision and Pattern Recognition, 2009.
|
| 184 |
+
|
| 185 |
+
Reuben Feinman, Ryan R. Curtin, Saurabh Shintre, and Andrew B. Gardner. Detecting adversarial samples from artifacts. arXiv preprint arXiv:1703.00410, 2017.
|
| 186 |
+
|
| 187 |
+
Justin Gilmer, Ryan P. Adams, Ian Goodfellow, David Andersen, and George E. Dahl. Motivating the rules of the game for adversarial example research. arXiv preprint arXiv:1807.06732, 2018a.
|
| 188 |
+
|
| 189 |
+
Justin Gilmer, Luke Metz, Fartash Faghri, Samuel S. Schoenholz, Maithra Raghu, Martin Wattenberg, and Ian Goodfellow. Adversarial spheres. In International Conference on Learning Representations, 2018b.
|
| 190 |
+
|
| 191 |
+
Zhitao Gong, Wenlu Wang, and Wei-Shinn Ku. Adversarial and clean data are not twins. arXiv preprint arXiv:1704.04960, 2017.
|
| 192 |
+
|
| 193 |
+
Ian Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In International Conference on Learning Representations, 2014.
|
| 194 |
+
|
| 195 |
+
Ian Goodfellow, Yao Qin, and David Berthelot. Evaluation methodology for attacks against confidence thresholding models. 2018.
|
| 196 |
+
|
| 197 |
+
Kathrin Grosse, Praveen Manoharan, Nicolas Papernot, Michael Backes, and Patrick McDaniel. On the (statistical) detection of adversarial examples. arXiv preprint arXiv:1702.06280, 2017.
|
| 198 |
+
|
| 199 |
+
Dan Hendrycks and Kevin Gimpel. Early methods for detecting adversarial images. In International Conference on Learning Representations, 2016.
|
| 200 |
+
|
| 201 |
+
Geoffrey E. Hinton, Sara Sabour, and Nicholas Frosst. Matrix capsules with em routing. In International Conference on Learning Representations, 2018.
|
| 202 |
+
|
| 203 |
+
Hossein Hosseini, Sreeram Kannan, and Radha Poovendran. Are odds really odd? bypassing statistical detection of adversarial examples. arXiv preprint arXiv:1907.12138, 2019.
|
| 204 |
+
|
| 205 |
+
Saumya Jetley, Nicholas A. Lord, and Philip H. S. Torr. With friends like these, who needs adversaries? In Advances in Neural Information Processing Systems, 2018.
|
| 206 |
+
|
| 207 |
+
Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations, 2014.
|
| 208 |
+
|
| 209 |
+
Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, University of Toronto, 2009.
|
| 210 |
+
|
| 211 |
+
Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial examples in the physical world. In International Conference on Learning Representations, 2016.
|
| 212 |
+
|
| 213 |
+
Alexey Kurakin, Ian Goodfellow, Samy Bengio, Yinpeng Dong, Fangzhou Liao, Ming Liang, Tianyu Pang, Jun Zhu, Xiaolin Hu, Cihang Xie, et al. Adversarial attacks and defences competition. arXiv preprint arXiv:1804.00097, 2018.
|
| 214 |
+
|
| 215 |
+
Yann LeCun, Leon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to ´ document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
|
| 216 |
+
|
| 217 |
+
Xin Li and Fuxin Li. Adversarial examples detection in deep networks with convolutional filter statistics. In Proceedings of the IEEE International Conference on Computer Vision, 2017.
|
| 218 |
+
|
| 219 |
+
Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. In International Conference on Learning Representations, 2017.
|
| 220 |
+
|
| 221 |
+
Jan Hendrik Metzen, Tim Genewein, Volker Fischer, and Bastian Bischoff. On detecting adversarial perturbations. In International Conference on Learning Representations, 2017.
|
| 222 |
+
|
| 223 |
+
Felix Michels, Tobias Uelwer, Eric Upschulte, and Stefan Harmeling. On the vulnerability of capsule networks to adversarial attacks. arXiv preprint arXiv:1906.03612, 2019.
|
| 224 |
+
|
| 225 |
+
Norman Mu and Justin Gilmer. Mnist-c: A robustness benchmark for computer vision. In ICML 2019 Workshop on Uncertainty and Robustness in Deep Learning, 2019.
|
| 226 |
+
|
| 227 |
+
Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y. Ng. Reading digits in natural images with unsupervised feature learning. In NIPS workshop on deep learning and unsupervised feature learning, volume 2011, pp. 5, 2011.
|
| 228 |
+
|
| 229 |
+
Jathushan Rajasegaran, Vinoj Jayasundara, Sandaru Jayasekara, Hirunima Jayasekara, Suranga Seneviratne, and Ranga Rodrigo. Deepcaps: Going deeper with capsule networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 10725–10733, 2019.
|
| 230 |
+
|
| 231 |
+
Kevin Roth, Yannic Kilcher, and Thomas Hofmann. The odds are odd: A statistical test for detecting adversarial examples. In International Conference on Machine Learning, 2019.
|
| 232 |
+
|
| 233 |
+
Sara Sabour, Nicholas Frosst, and Geoffrey E. Hinton. Dynamic routing between capsules. In Advances in Neural Information Processing Systems, pp. 3856–3866, 2017.
|
| 234 |
+
|
| 235 |
+
Lukas Schott, Jonas Rauber, Wieland Brendel, and Matthias Bethge. Robust perception through analysis by synthesis. arXiv preprint arXiv:1805.09190, 2018.
|
| 236 |
+
|
| 237 |
+
Yang Song, Taesup Kim, Sebastian Nowozin, Stefano Ermon, and Nate Kushman. Pixeldefend: Leveraging generative models to understand and defend against adversarial examples. In International Conference on Learning Representations, 2017.
|
| 238 |
+
|
| 239 |
+
Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In International Conference on Learning Representations, 2013.
|
| 240 |
+
|
| 241 |
+
Lucas Theis, Aaron van den Oord, and Matthias Bethge. A note on the evaluation of generative ¨ models. In International Conference on Learning Representations, 2015.
|
| 242 |
+
|
| 243 |
+
Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms. arXiv preprint arXiv:1708.07747, 2017.
|
| 244 |
+
|
| 245 |
+
Jianxiong Xiao, James Hays, Krista A Ehinger, Aude Oliva, and Antonio Torralba. Sun database: Large-scale scene recognition from abbey to zoo. In 2010 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pp. 3485–3492. IEEE, 2010.
|
| 246 |
+
|
| 247 |
+
Richard Zhang, Phillip Isola, Alexei A Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 586–595, 2018.
|
| 248 |
+
|
| 249 |
+
# APPENDIX
|
| 250 |
+
|
| 251 |
+
# A NETWORK ARCHITECTURES
|
| 252 |
+
|
| 253 |
+
Figure 6 shows the architecute of the capsule network, the CNN reconstruction model and the CNN conditional reconstruction model used for experiments on MNIST, FashionMNIST and SVHN dataset. MNIST and Fashion MNIST have exactly the same architectures while we use larger models for SVHN. Note that the only difference between the CNN reconstruction $( \mathrm { C N N + R } )$ ) and the CNN conditional reconstruction $\mathbf { \left( C N N + C R \right) }$ ) is the masking procedure on the input to the reconstruction network based on the predicted class. All three models have the same number of parameters.
|
| 254 |
+
|
| 255 |
+

|
| 256 |
+
Figure 6: The architecture for the CapsNet, $\mathrm { C N N + R }$ and $\mathrm { C N N + C R }$ model used for our experiments on MNIST (LeCun et al., 1998), FashionMNIST (Xiao et al., 2017), and SVHN (Netzer et al., 2011).
|
| 257 |
+
|
| 258 |
+
# B TEST MODELS
|
| 259 |
+
|
| 260 |
+
The error rate of each test model used in the paper are presented in Table 4. We ensure that they have similar performance.
|
| 261 |
+
|
| 262 |
+
Table 4: Error rate of each model when the input are clean test images in each dataset.
|
| 263 |
+
|
| 264 |
+
<table><tr><td>Dataset</td><td>CapsNet</td><td>CNN+CR</td><td>CNN+R</td></tr><tr><td>MNIST</td><td>0.6%</td><td>0.7%</td><td>0.6%</td></tr><tr><td>FashionMNIST</td><td>9.6%</td><td>9.5%</td><td>9.3%</td></tr><tr><td>SVHN</td><td>10.7%</td><td>9.3%</td><td>9.5%</td></tr></table>
|
| 265 |
+
|
| 266 |
+
# C IMPLEMENTATION DETAILS
|
| 267 |
+
|
| 268 |
+
For all the $\ell _ { \infty }$ based adversarial examples, the $\ell _ { \infty }$ norm of the perturbations is bound by $\epsilon$ , which is set to 0.3, 0.1, 0.1 for MNIST, Fashion MNIST and SVHN dataset respectively following previous work (Madry et al., 2017; Song et al., 2017). In FGSM based attacks, the step size $c$ is 0.05. In BIM-based (Kurakin et al., 2016) and PGD-based (Madry et al., 2017) attacks, the step size $c$ is 0.01 for all the datasets and the number of iterations are 1000, 500 and 200 for MNIST, Fashion MNIST and SVHN dataset respectively. We choose a sufficiently large number of iterations to ensure the attacks has converged.
|
| 269 |
+
|
| 270 |
+
We use the publicly released code from the authors of (Carlini & Wagner, 2017b) to perform the CW attack for our models. The number of iterations are set to 1000 for all three datasets.
|
| 271 |
+
|
| 272 |
+
# D WHITE BOX STANDARD ATTACKS
|
| 273 |
+
|
| 274 |
+
The results of four white box standard attacks on the three datasets are shown in Table 5.
|
| 275 |
+
|
| 276 |
+
Table 5: Success rate and undetected rate of white-box targeted and untargeted attacks. In the table, $S _ { t } / R _ { t }$ is shown for targeted attacks and $S _ { u } / R _ { u }$ is presented for untargeted attacks.
|
| 277 |
+
|
| 278 |
+
<table><tr><td rowspan="2">Networks</td><td colspan="4">Targeted (%) FGSM</td><td colspan="4">Untargeted (%) BIM</td></tr><tr><td>BIM</td><td></td><td>PGD</td><td>CW</td><td>FGSM</td><td></td><td>PGD</td><td>CW</td></tr><tr><td colspan="9">MNIST Dataset</td></tr><tr><td>CapsNet CNN+CR</td><td>3/0</td><td>82/0</td><td>86/0</td><td>99/2</td><td>11/0</td><td>99/0</td><td>99/0</td><td>100/19</td></tr><tr><td></td><td>16/0</td><td>93/0</td><td>95/0</td><td>89/8</td><td>85/0</td><td>100/0</td><td>100/0</td><td>100/28</td></tr><tr><td>CNN+R</td><td>37/0</td><td>100/0</td><td>100/0</td><td>100/47</td><td>64/0</td><td>100/0</td><td>100/0</td><td>100/63</td></tr><tr><td colspan="9">FASHION I MNISTDataset</td></tr><tr><td>CapsNet</td><td>715</td><td>54/9</td><td>55/10</td><td>100/26</td><td>35/29</td><td>86/50</td><td>87/51</td><td>100/68</td></tr><tr><td>CNN+CR</td><td>19/13</td><td>89/28</td><td>89/28</td><td>87/37</td><td>74/33</td><td>100/25</td><td>100/24</td><td>100/72</td></tr><tr><td>CNN+R</td><td>23/16</td><td>98/19</td><td>98/19</td><td>99/81</td><td>62/48</td><td>100/35</td><td>100/34</td><td>100/87</td></tr><tr><td colspan="9"> SVHN Dataset</td></tr><tr><td>CapsNet</td><td>22/20</td><td>83/45</td><td>84/46</td><td>100/90</td><td>74/67</td><td>99/70</td><td>99/68</td><td>100/94</td></tr><tr><td>CNN+CR CNN+R</td><td>24/23</td><td>99/90</td><td>99/90</td><td>99/93</td><td>87/82</td><td>100/90</td><td>100/89</td><td>100/90</td></tr><tr><td></td><td>26/24</td><td>100/86</td><td>100/86</td><td>100/94</td><td>88/82</td><td>100/92</td><td>100/92</td><td>100/95</td></tr></table>
|
| 279 |
+
|
| 280 |
+
# E VISUALIZATION OF CORRUPTED MNIST DATASET
|
| 281 |
+
|
| 282 |
+
Visualization of examples from Corrupted MNIST dataset (Mu & Gilmer, 2019) and the corresponding reconstructed images for each model are shown in Figure 7 and Figure 8.
|
| 283 |
+
|
| 284 |
+

|
| 285 |
+
Figure 7: Examples of Corrupted MNIST and the reconstructed image for each model. A red box represent that this input is flagged as an adversarial example while a green box represent this input has been misclassified and not been detected.
|
| 286 |
+
|
| 287 |
+

|
| 288 |
+
Figure 8: Examples of Corrupted MNIST and the reconstructed image for each model. A red box represents that this input is flagged as an adversarial example while a green box represents that this input has been misclassified and not been detected.
|
| 289 |
+
|
| 290 |
+
# F RECONSTRUCTIVE ATTACKS
|
| 291 |
+
|
| 292 |
+
The results of Reconstructive FGSM, BIM and PGD on the three datasets are reported in Table 6.
|
| 293 |
+
|
| 294 |
+
Table 6: Success rate and the worst case undetected rate of white-box targeted and untargeted reconstructive attacks. Below $S _ { t } / R _ { t }$ is shown for targeted attacks and $S _ { u } \bar { / } R _ { u }$ is presented for untargeted attacks.
|
| 295 |
+
|
| 296 |
+
<table><tr><td>Networks</td><td>R-FGSM</td><td>Targeted (%) R-BIM</td><td>R-PGD</td><td>R-FGSM</td><td>Untargeted (%) R-BIM</td><td>R-PGD</td></tr><tr><td colspan="7">MNIST Dataset</td></tr><tr><td>CapsNet</td><td>1.8/0.3</td><td>51.0/33.8</td><td>50.7/33.7</td><td>6.1/1.0</td><td>84.5/35.1</td><td>88.1/37.9</td></tr><tr><td>CNN+CR</td><td>7.6/0.5</td><td>98.0/68.1</td><td>98.6/68.1</td><td>41.7/3.2</td><td>96.5/86.8</td><td>99.4/87.7</td></tr><tr><td>CNN+R</td><td>16.9/3.3</td><td>86.3/65.9</td><td>95.5/71.2</td><td>25.9/8.1</td><td>82.9/67.8</td><td>95.1/70.5</td></tr><tr><td colspan="7">FASHION MNIST Dataset</td></tr><tr><td>CapsNet</td><td>6.5/5.8</td><td>53.3/28.4</td><td>53.7/29.8</td><td>33.3/29.9</td><td>85.3/75.9</td><td>84.9/75.5</td></tr><tr><td>CNN+CR</td><td>17.7/14.0</td><td>80.3/72.4</td><td>78.1/72.0</td><td>68.0/57.3</td><td>89.8/84.4</td><td>91.5/86.0</td></tr><tr><td>CNN+R</td><td>19.4/17.6</td><td>95.2/88.8</td><td>94.6/88.4</td><td>58.6/53.5</td><td>98.8/90.1</td><td>98.9/90.0</td></tr><tr><td colspan="7">SVHN Dataset</td></tr><tr><td>CapsNet</td><td>21.6/21.2</td><td>81.1/78.3</td><td>82.0/79.2</td><td>71.6/68.3</td><td>98.9/97.5</td><td>98.9/97.5</td></tr><tr><td>CNN+CR</td><td>24.2/22.6</td><td>98.5/97.6</td><td>99.0/97.9</td><td>86.0/82.3</td><td>99.9/99.5</td><td>99.9/99.5</td></tr><tr><td>CNN+R</td><td>26.6/25.8</td><td>99.6/99.4</td><td>99.5/99.3</td><td>87.1/84.5</td><td>100.0/99.9</td><td>100.0/99.9</td></tr></table>
|
| 297 |
+
|
| 298 |
+
Figure 9 shows the plot of success rate and undetected rate versus the hyperparameter $\beta$ which balances the importance between attacking the classifier and fooling the detection mechanism in the targeted reconstructive PGD attacks on the MNIST dataset.
|
| 299 |
+
|
| 300 |
+

|
| 301 |
+
Figure 9: An example shows the plot of the success rate in (a) and undetected rate in (b) of targeted reconstructive PGD attack vesus the hyperparameter beta $\beta$ for each model on the MNIST test set. We set the max $\ell _ { \infty }$ norm $\epsilon = 0 . 3$ to create the attacks.
|
| 302 |
+
|
| 303 |
+
# G BLACK BOX ATTACKS
|
| 304 |
+
|
| 305 |
+
Table 7: Success rate and undetected rate of black-box targeted and untargeted attacks. In the table, $S _ { t } / R _ { t }$ is shown for targeted attacks and $S _ { u } / R _ { u }$ is presented for untargeted attacks. All the numbers are shown in $\%$ .
|
| 306 |
+
H VISUALIZATION OF ADVERSARIAL EXAMPLES AND RECONSTRUCTIONS
|
| 307 |
+
|
| 308 |
+
<table><tr><td colspan="8">MNIST Dataset</td></tr><tr><td>Targeted</td><td>CapsNet</td><td>CNN-CR</td><td>CNN-R</td><td>Untargeted</td><td>CapsNet</td><td>CNN-CR</td><td>CNN-R</td></tr><tr><td>PGD</td><td>1.5/0.0</td><td>7.8/0.0</td><td>7.4/0.0</td><td>PGD</td><td>8.5/0.0</td><td>32.6/0.0</td><td>27.6/0.0</td></tr><tr><td>R-PGD</td><td>4.2/1.0</td><td>18.3/11.0</td><td>11.3/4.8</td><td>R-PGD</td><td>10.4/2.4</td><td>42.7/24.9</td><td>25.2/8.9</td></tr></table>
|
| 309 |
+
|
| 310 |
+

|
| 311 |
+
Figure 10: The source clean image is presented in the first row with its reconstruction in the second row. For each model, the top row are the targeted adversarial examples and the bottom are the corresponding reconstruction image when the input are the PGD on the MNIST (left), R-PGD on the Fashion-MNIST (middle), CW on the SVHN (right).
|
| 312 |
+
|
| 313 |
+

|
| 314 |
+
Figure 11: These are randomly sampled (not cherry picked) inputs (top row) and the result of adversarially perturbing them with targeted R-PGD against the CapsNet model (other rows). Many of these attacks are not successful. Note the visual similarity between many of the attacks and the target class.
|
md/train/Sklgs0NFvr/Sklgs0NFvr.md
ADDED
|
@@ -0,0 +1,258 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LEARNING THE DIFFERENCE THAT MAKES A DIFFERENCE WITH COUNTERFACTUALLY-AUGMENTED DATA
|
| 2 |
+
|
| 3 |
+
Divyansh Kaushik, Eduard Hovy, Zachary C. Lipton
|
| 4 |
+
Carnegie Mellon University
|
| 5 |
+
Pittsburgh PA, USA
|
| 6 |
+
{dkaushik, hovy, zlipton}@cmu.edu
|
| 7 |
+
|
| 8 |
+
# ABSTRACT
|
| 9 |
+
|
| 10 |
+
Despite alarm over the reliance of machine learning systems on so-called spurious patterns, the term lacks coherent meaning in standard statistical frameworks. However, the language of causality offers clarity: spurious associations are due to confounding (e.g., a common cause), but not direct or indirect causal effects. In this paper, we focus on natural language processing, introducing methods and resources for training models less sensitive to spurious patterns. Given documents and their initial labels, we task humans with revising each document so that it (i) accords with a counterfactual target label; (ii) retains internal coherence; and (iii) avoids unnecessary changes. Interestingly, on sentiment analysis and natural language inference tasks, classifiers trained on original data fail on their counterfactually-revised counterparts and vice versa. Classifiers trained on combined datasets perform remarkably well, just shy of those specialized to either domain. While classifiers trained on either original or manipulated data alone are sensitive to spurious features (e.g., mentions of genre), models trained on the combined data are less sensitive to this signal. Both datasets are publicly available1.
|
| 11 |
+
|
| 12 |
+
# 1 INTRODUCTION
|
| 13 |
+
|
| 14 |
+
What makes a document’s sentiment positive? What makes a loan applicant creditworthy? What makes a job candidate qualified? When does a photograph truly depict a dolphin? Moreover, what does it mean for a feature to be relevant to such a determination?
|
| 15 |
+
|
| 16 |
+
Statistical learning offers one framework for approaching these questions. First, we swap out the semantic question for a more readily answerable associative question. For example, instead of asking what conveys a document’s sentiment, we recast the question as which documents are likely to be labeled as positive (or negative)? Then, in this associative framing, we interpret as relevant, those features that are most predictive of the label. However, despite the rapid adoption and undeniable commercial success of associative learning, this framing seems unsatisfying.
|
| 17 |
+
|
| 18 |
+
Alongside deep learning’s predictive wins, critical questions have piled up concerning spurious patterns, artifacts, robustness, and discrimination, that the purely associative perspective appears ill-equipped to answer. For example, in computer vision, researchers have found that deep neural networks rely on surface-level texture (Jo & Bengio, 2017; Geirhos et al., 2018) or clues in the image’s background to recognize foreground objects even when that seems both unnecessary and somehow wrong: the beach is not what makes a seagull a seagull. And yet, researchers struggle to articulate precisely why models should not rely on such patterns.
|
| 19 |
+
|
| 20 |
+
In natural language processing (NLP), these issues have emerged as central concerns in the literature on annotation artifacts and societal biases. Across myriad tasks, researchers have demonstrated that models tend to rely on spurious associations (Poliak et al., 2018; Gururangan et al., 2018; Kaushik & Lipton, 2018; Kiritchenko & Mohammad, 2018). Notably, some models for question-answering tasks may not actually be sensitive to the choice of the question (Kaushik & Lipton, 2018), while in Natural Language Inference (NLI), classifiers trained on hypotheses only (vs hypotheses and premises) perform surprisingly well (Poliak et al., 2018; Gururangan et al., 2018). However, papers seldom make clear what, if anything, spuriousness means within the standard supervised learning framework. ML systems are trained to exploit the mutual information between features and a label to make accurate predictions. The standard statistical learning toolkit does not offer a conceptual distinction between spurious and non-spurious associations.
|
| 21 |
+
|
| 22 |
+

|
| 23 |
+
Figure 1: Pipeline for collecting and leveraging counterfactually-altered data
|
| 24 |
+
|
| 25 |
+
Causality, however, offers a coherent notion of spuriousness. Spurious associations owe to confounding rather than to a (direct or indirect) causal path. We might consider a factor of variation to be spuriously correlated with a label of interest if intervening upon it would not impact the applicability of the label or vice versa. While our paper does not call upon the mathematical machinery of causality, we draw inspiration from the underlying philosophy to design a new dataset creation procedure in which humans counterfactually revise documents.
|
| 26 |
+
|
| 27 |
+
Returning to NLP, although we lack automated tools for mapping between raw text and disentangled factors, we nevertheless describe documents in terms of these abstract representations. Moreover, it seems natural to speak of manipulating these factors directly (Hovy, 1987). Consider, for example, the following interventions: (i) Revise the letter to make it more positive; (ii) Edit the second sentence so that it appears to contradict the first. These edits might be thought of as intervening on only those aspects of the text that are necessary to make the counterfactual label applicable.
|
| 28 |
+
|
| 29 |
+
In this exploratory paper, we design a human-in-the-loop system for counterfactually manipulating documents. Our hope is that by intervening only upon the factor of interest, we might disentangle the spurious and non-spurious associations, yielding classifiers that hold up better when spurious associations do not transport out of domain. We employ crowd workers not to label documents, but rather to edit them, manipulating the text to make a targeted (counterfactual) class applicable. For sentiment analysis, we direct the worker to revise this negative movie review to make it positive, without making any gratuitous changes. We might regard the second part of this directive as a least action principle, ensuring that we perturb only those spans necessary to alter the applicability of the label. For NLI, a 3-class classification task (entailment, contradiction, neutral), we ask the workers to modify the premise while keeping the hypothesis intact, and vice versa, collecting edits corresponding to each of the (two) counterfactual classes. Using this platform, we collect thousands of counterfactually-manipulated examples for both sentiment analysis and NLI, extending the IMDb (Maas et al., 2011) and SNLI (Bowman et al., 2015) datasets, respectively. The result is two new datasets (each an extension of a standard resource) that enable us to both probe fundamental properties of language and train classifiers less reliant on spurious signal.
|
| 30 |
+
|
| 31 |
+
We show that classifiers trained on original IMDb reviews fail on counterfactually-revised data and vice versa. We further show that spurious correlations in these datasets are even picked up by linear models. However, augmenting the revised examples breaks up these correlations (e.g., genre ceases to be predictive of sentiment). For a Bidirectional LSTM (Graves & Schmidhuber, 2005) trained on IMDb reviews, classification accuracy goes down from $7 9 . 3 \%$ to $5 5 . 7 \%$ when evaluated on original vs revised reviews. The same classifier trained on revised reviews achieves an accuracy of $8 9 . 1 \%$ on revised reviews compared to $6 2 . 5 \%$ on their original counterparts. These numbers go to $8 1 . 7 \%$ and $9 2 . 0 \%$ on original and revised data, respectively, when the classifier is retrained on the combined dataset. Similar patterns are observed for linear classifiers. We discovered that BERT (Devlin et al., 2019) is more resilient to such drops in performance on sentiment analysis.
|
| 32 |
+
|
| 33 |
+
Additionally, SNLI models appear to rely on spurious associations as identified by Gururangan et al. (2018). Our experiments show that when fine-tuned on original SNLI sentence pairs, BERT fails on pairs with revised premise and vice versa, suffering more than a 30 point drop in accuracy. Fine-tuned on the combined set, BERT’s performance improves significantly across all datasets. Similarly, a Bi-LSTM trained on (original) hypotheses alone can accurately classify $6 9 \%$ of pairs correctly but performs worse than the blind classifier when evaluated on the revised dataset. When trained on hypotheses only from the combined dataset, its performance is not appreciably better than random guessing.
|
| 34 |
+
|
| 35 |
+
# 2 RELATED WORK
|
| 36 |
+
|
| 37 |
+
Several papers demonstrate cases where NLP systems appear not to learn what humans consider to be the difference that makes the difference. For example, otherwise state-of-the-art models have been shown to be vulnerable to synthetic transformations such as distractor phrases (Jia & Liang, 2017; Wallace et al., 2019), to misclassify paraphrased task (Iyyer et al., 2018; Pfeiffer et al., 2019) and to fail on template-based modifications (Ribeiro et al., 2018). Glockner et al. (2018) demonstrate that simply replacing words by synonyms or hypernyms, which should not alter the applicable label, nevertheless breaks ML-based NLI systems. Gururangan et al. (2018) and Poliak et al. (2018) show that classifiers correctly classified the hypotheses alone in about $6 9 \%$ of SNLI corpus. They further discover that crowd workers adopted specific annotation strategies and heuristics for data generation. Chen et al. (2016) identify similar issues exist with automatically-constructed benchmarks for question-answering (Hermann et al., 2015). Kaushik & Lipton (2018) discover that reported numbers in question-answering benchmarks could often be achieved by the same models when restricted to be blind either to the question or to the passages. Dixon et al. (2018); Zhao et al. (2018) and Kiritchenko & Mohammad (2018) showed how imbalances in training data lead to unintended bias in the resulting models, and, consequently, potentially unfair applications. Shen et al. (2018) substitute words to test the behavior of sentiment analysis algorithms in the presence of stylistic variation, finding that similar word pairs produce significant differences in sentiment score.
|
| 38 |
+
|
| 39 |
+
Several papers explore richer feedback mechanisms for classification. Some ask annotators to highlight rationales, spans of text indicative of the label (Zaidan et al., 2007; Zaidan & Eisner, 2008; Poulis & Dasgupta, 2017). For each document, Zaidan et al. remove the rationales to generate contrast documents, learning classifiers to distinguish original documents from their contrasting counterparts. While this feedback is easier to collect than ours, how to leverage it for training deep NLP models, where features are not neatly separated, remains less clear.
|
| 40 |
+
|
| 41 |
+
Lu et al. (2018) programmatically alter text to invert gender bias and combined the original and manipulated data yielding gender-balanced dataset for learning word embeddings. In the simplest experiments, they swap each gendered word for its other-gendered counterpart. For example, the doctor ran because he is late becomes the doctor ran because she is late. However, they do not substitute names even if they co-refer to a gendered pronoun. Building on their work, Zmigrod et al. (2019) describe a data augmentation approach for mitigating gender stereotypes associated with animate nouns for morphologically-rich languages like Spanish and Hebrew. They use a Markov random field to infer how the sentence must be modified while altering the grammatical gender of particular nouns to preserve morpho-syntactic agreement. In contrast, Maudslay et al. (2019) describe a method for probabilistic automatic in-place substitution of gendered words in a corpus. Unlike Lu et al., they propose an explicit treatment of first names by pre-defining name-pairs for swapping, thus expanding Lu et al.’s list of gendered word pairs significantly.
|
| 42 |
+
|
| 43 |
+
# 3 DATA COLLECTION
|
| 44 |
+
|
| 45 |
+
We use Amazon’s Mechanical Turk crowdsourcing platform to recruit editors to revise each document. To ensure high quality of the collected data, we restricted the pool to U.S. residents that had already completed at least $5 0 0 ~ \mathrm { H I T s }$ and had an over $9 7 \%$ HIT approval rate. For each HIT, we conducted pilot tests to identify appropriate compensation per assignment, receive feedback from workers and revise our instructions accordingly. A total of 713 workers contributed throughout the whole process, of which 518 contributed edits reflected in the final datasets.
|
| 46 |
+
|
| 47 |
+

|
| 48 |
+
Figure 2: Annotation platform for collecting counterfactually annotated data for sentiment analysis
|
| 49 |
+
|
| 50 |
+
Table 1: Percentage of inter-editor agreement for counterfactually-revised movie reviews
|
| 51 |
+
|
| 52 |
+
<table><tr><td colspan="10">Number of tokens</td></tr><tr><td>Type</td><td>0-50</td><td>51-100</td><td>101-150</td><td>151-200</td><td>201-250</td><td>251-300</td><td>301-329</td><td>Full</td></tr><tr><td>Replacement</td><td>35.6</td><td>25.7</td><td>20.0</td><td>17.2</td><td>15.0</td><td>14.8</td><td>11.6</td><td>19.3</td></tr><tr><td>Insertion</td><td>27.7</td><td>20.8</td><td>14.4</td><td>12.2</td><td>11.0</td><td>11.5</td><td>07.6</td><td>14.3</td></tr><tr><td>Combined</td><td>41.6</td><td>32.7</td><td>26.3</td><td>23.4</td><td>21.6</td><td>20.3</td><td>16.2</td><td>25.5</td></tr></table>
|
| 53 |
+
|
| 54 |
+
Sentiment Analysis The original IMDb dataset consists of $5 0 k$ reviews divided equally across train and test splits. To keep the task of editing from growing unwieldy, we filter out the longest $20 \%$ of reviews, leaving $2 0 k$ reviews in the train split from which we randomly sample $2 . 5 k$ reviews, enforcing a 50:50 class balance. Following revision by the crowd workers, we partition this dataset into train/validation/test splits containing 1707, 245 and 488 examples, respectively. We present each review to two workers, instructing them to revise the review such that (a) the counterfactual label applies; (b) the document remains coherent; and (c) no unecessary modifications are made.
|
| 55 |
+
|
| 56 |
+
Over a four week period, we manually inspected each generated review and rejected the ones that were outright wrong (sentiment was still the same or the review was a spam). After review, we rejected roughly $2 \%$ of revised reviews. For 60 original reviews, we did not approve any among the counterfactually-revised counterparts supplied by the workers. To construct the new dataset, we chose one revised review (at random) corresponding to each original review. In qualitative analysis, we identified eight common patterns among the edits (Table 2).
|
| 57 |
+
|
| 58 |
+
By comparing original reviews to their counterfactually-revised counterparts we gain insight into which aspects are causally relevant. To analyze inter-editor agreement, we mark indices corresponding to replacements and insertions, representing the edits in each original review by a binary vector. Using these representations, we compute the Jaccard similarity between the two reviews (Table 1), finding it to be negatively correlated with the length of the review.
|
| 59 |
+
|
| 60 |
+
Natural Language Inference Unlike sentiment analysis, SNLI is 3-way classification task, with inputs consisting of two sentences, a premise and a hypothesis and the three possible labels being entailment, contradiction, and neutral. The label is meant to describe the relationship between the facts stated in each sentence. We randomly sampled 1750, 250, and 500 pairs from the train, validation, and test sets of SNLI respectively, constraining the new data to have balanced classes. In one HIT, we asked workers to revise the hypothesis while keeping the premise intact, seeking edits corresponding to each of the two counterfactual classes. We refer to this data as Revised Hypothesis (RH). In another HIT, we asked workers to revise the original premise, while leaving the original hypothesis intact, seeking similar edits, calling it Revised Premise (RP).
|
| 61 |
+
|
| 62 |
+
Table 2: Most prominent categories of edits performed by humans for sentiment analysis (Original/Revised, in order). Red spans were replaced by Blue spans.
|
| 63 |
+
|
| 64 |
+
<table><tr><td>Types of Revisions</td><td>Examples</td></tr><tr><td>Recasting fact as hoped for</td><td>The world of Atlantis,hidden beneath the earth's core,is fantastic The world of Atlantis,hidden beneath the earth's core is supposed to be fantastic</td></tr><tr><td>Suggesting sarcasm</td><td>thoroughly captivating thriller-drama, taking a deep and real- istic view thoroughly mind numbing “thriller-drama", taking a “deep"</td></tr><tr><td>Inserting modifiers</td><td>and “realistic”(who are they kidding?) view The presentation of simply Atlantis' landscape and setting</td></tr><tr><td>Replacing modifiers</td><td>The presentation of Atlantis’ predictable landscape and setting “Election” is a highly fascinating and thoroughly captivating thriller-drama</td></tr><tr><td>Inserting phrases</td><td>“Election” is a highly expected and thoroughly mind numbing "thriller-drama" Although there's hardly any action, the ending is still shocking. Although there's hardly any action (or reason to continue watch-</td></tr><tr><td>Diminishing via qualifiers</td><td>ing past 10 minutes), the ending is still shocking. which,while usually containing some reminder of harshness,be- come more and more intriguing.</td></tr><tr><td>Differing perspectives</td><td>which,usually containing some reminder of harshness,became only slightly more intriguing. Granted, not all of the story makes full sense, but the film doesn't feature any amazing new computer-generated visual effects.</td></tr><tr><td>Changing ratings</td><td>Granted, some of the story makes sense, but the film doesn't feature any amazing new computer-generated visual effects. one of the worst ever scenes in a sports movie. 3 stars out of 10. one of the wildest ever scenes in a sports movie. 8 stars out of 10.</td></tr></table>
|
| 65 |
+
|
| 66 |
+
Following data collection, we employed a different set of workers to verify whether the given label accurately described the relationship between each premise-hypothesis pair. We presented each pair to three workers and performed a majority vote. When all three reviewers were in agreement, we approved or rejected the pair based on their decision, else, we verified the data ourselves. Finally, we only kept premise-hypothesis pairs for which we had valid revised data in both RP and RH, corresponding to both counterfactual labels. As a result, we discarded $\approx 9 \%$ data. RP and RH, each comprised of 3332 pairs in train, 400 in validation, and 800 in test, leading to a total of 6664 pairs in train, 800 in validation, and 1600 in test in the revised dataset. In qualitative analysis, we identified some common patterns among hypothesis and premise edits (Table 3, 4).
|
| 67 |
+
|
| 68 |
+
We collected all data after IRB approval and measured the time taken to complete each HIT to ensure that all workers were paid more than the federal minimum wage. During our pilot studies, workers spent roughly 5 minutes per revised review, and 4 minutes per revised sentence (for NLI). We paid workers $\$ 0.65$ per revision, and $\$ 0.15$ per verification, totalling $\$ 10778.14$ for the study.
|
| 69 |
+
|
| 70 |
+
# 4 MODELS
|
| 71 |
+
|
| 72 |
+
Our experiments rely on the following five models: Support Vector Machines (SVMs), Na¨ıve Bayes (NB) classifiers, Bidirectional Long Short-Term Memory Networks (Bi-LSTMs; Graves & Schmidhuber, 2005), ELMo models with LSTM, and fine-tuned BERT models (Devlin et al., 2019). For brevity, we discuss only implementation details necessary for reproducibility.
|
| 73 |
+
|
| 74 |
+
Table 3: Analysis of edits performed by humans for NLI hypotheses. P denotes Premise, OH denotes Original Hypothesis, and NH denotes New Hypothesis.
|
| 75 |
+
|
| 76 |
+
<table><tr><td>Types of Revisions</td><td>Examples</td></tr><tr><td>Modifying/removing actions</td><td>P: A young dark-haired woman crouches on the banks of a river while washing dishes. OH: A woman washes dishes in the river while camping. (Neu- tral)</td></tr><tr><td>Substituting entities</td><td>NH:A woman washes dishes in the river.(Entailment) P:Students are inside of a lecture hall. OH: Students are indoors. (Entailment)</td></tr><tr><td>Adding details to entities</td><td>NH: Students are on the soccer field. (Contradiction) P:An older man with glasses raises his eyebrows in surprise. OH: The man has no glasses. (Contradiction)</td></tr><tr><td>Inserting relationships</td><td>NH: The man wears bifocals. (Neutral) P:A blond woman speaking to a brunette woman with her arms crossed. OH:A woman is talking to another woman. (Entailment)</td></tr><tr><td>Numerical modifications</td><td>NH: A woman is talking to a family member. (Neutral) P: Several farmers bent over working on the fields while lady with a baby and four other children accompany them. OH:The lady has three children.(Contradiction)</td></tr><tr><td>Using/Removing negation</td><td>NH: The lady has many children. (Entailment) P:An older man with glasses raises his eyebrows in surprise. OH: The man has no glasses. (Contradiction)</td></tr><tr><td>Unrelated hypothesis</td><td>NH: The man wears glasses. (Entailment) P:A female athlete in crimson top and dark blue shorts is run- ning on the street. OH: A woman is sitting on a white couch. (Contradiction)</td></tr></table>
|
| 77 |
+
|
| 78 |
+
Standard Methods We use scikit-learn (Pedregosa et al., 2011) implementations of SVMs and Na¨ıve Bayes for sentiment analysis. We train these models on TF-IDF bag of words feature representations of the reviews. We identify parameters for both classifiers using grid search conducted over the validation set.
|
| 79 |
+
|
| 80 |
+
Bi-LSTM When training Bi-LSTMs for sentiment analysis, we restrict the vocabulary to the most frequent $2 0 k$ tokens, replacing out-of-vocabulary tokens by UNK. We fix the maximum input length at 300 tokens and pad smaller reviews. Each token is represented by a randomly-initialized 50-dimensional embedding. Our model consists of a bidirectional LSTM (hidden dimension 50) with recurrent dropout (probability 0.5) and global max-pooling following the embedding layer. To generate output, we feed this (fixed-length) representation through a fully-connected hidden layer with ReLU (Nair & Hinton, 2010) activation (hidden dimension 50), and then a fully-connected output layer with softmax activation. We train all models for a maximum of 20 epochs using Adam (Kingma & Ba, 2015), with a learning rate of $\mathrm { 1 e { - } 3 }$ and a batch size of 32. We apply early stopping when validation loss does not decrease for 5 epochs. We also experimented with a larger Bi-LSTM which led to overfitting. We use the architecture due to Poliak et al. (2018) to evaluate hypothesisonly baselines.2
|
| 81 |
+
|
| 82 |
+
ELMo-LSTM We compute contextualized word representations (ELMo) using character-based word representations and bidirectional LSTMs (Peters et al., 2018). The module outputs a 1024- dimensional weighted sum of representations from the 3 Bi-LSTM layers used in ELMo. We represent each word by a 128-dimensional embedding concatenated to the resulting 1024-dimensional ELMo representation, leading to a 1152-dimensional hidden representation. Following Batch Normalization, this is passed through an LSTM (hidden size 128) with recurrent dropout (probability
|
| 83 |
+
|
| 84 |
+
Table 4: Analysis of edits performed by humans for NLI premises. OP denotes Original Premise, NP denotes New Premise, and H denotes Hypothesis.
|
| 85 |
+
|
| 86 |
+
<table><tr><td>Types of Revisions</td><td>Examples</td></tr><tr><td>Introducing direct evidence</td><td>OP: Man walking with tall buildings with reflections behind him. (Neutral) NP: Man walking away from his friend, with tall buildings</td></tr><tr><td>Introducing indirect evidence</td><td>with reflections behind him. (Contradiction) H: The man was walking to meet a friend. OP:An Indian man standing on the bank of a river. (Neutral) NP: An Indian man standing with only a camera on the bank of a river. (Contradiction)</td></tr><tr><td>Substituting entities</td><td>H: He is fishing. OP:A young man in front of a grill laughs while pointing at something to his left. (Entailment) NP: A young man in front of a chair laughs while pointing at</td></tr><tr><td>Numerical modifications</td><td>something to his left. (Neutral) H:A man is outside OP:The exhaustion in the woman's face while she continues to ride her bicycle in the competition.(Neutral) NP: The exhaustion in the woman's face while she continues to ride her bicycle in the competition for people above 7 ft.</td></tr><tr><td>Reducing evidence</td><td>(Entailment) H: A tall person on a bike OP: The girl in yellow shorts and white jacket has a tennis ball in her left pocket. (Entailment) NP: The girl in yellow shorts and white jacket has a tennis ball.</td></tr><tr><td>Using abstractions</td><td>(Neutral) H: A girl with a tennis ball in her pocket. OP: An elderly woman in a crowd pushing a wheelchair. (En- tailment)</td></tr><tr><td>Substituting evidence</td><td>NP: An elderly person in a crowd pushing a wheelchair. (Neu- tral) H: There is an elderly woman in a crowd. OP: A woman is cutting something with scissors. (Entail- ment) NP: A woman is reading something about scissors. (Contra- diction)</td></tr></table>
|
| 87 |
+
|
| 88 |
+
0.2). The output from this LSTM is then passed to a fully-connected output layer with softmax activation. We train this model for up to 20 epochs with same early stopping criteria as for Bi-LSTM, using the Adam optimizer with a learning rate of $\mathrm { 1 e { - } 3 }$ and a batch size of 32.
|
| 89 |
+
|
| 90 |
+
BERT We use an off-the-shelf uncased BERT Base model, fine-tuning for each task.3 To account for BERT’s sub-word tokenization, we set the maximum token length is set at 350 for sentiment analysis and 50 for NLI. We fine-tune BERT up to 20 epochs with same early stopping criteria as for Bi-LSTM, using the BERT Adam optimizer with a batch size of 16 (to fit on a Tesla V-100 GPU). We found learning rates of $5 \mathrm { e } { - 5 }$ and $1 \mathrm { e } { - } 5$ to work best for sentiment analysis and NLI respectively.
|
| 91 |
+
|
| 92 |
+

|
| 93 |
+
Figure 3: Most important features learned by an SVM classifier trained on TF-IDF bag of words.
|
| 94 |
+
|
| 95 |
+
# 5 EXPERIMENTAL RESULTS
|
| 96 |
+
|
| 97 |
+
Sentiment Analysis We find that for sentiment analysis, linear models trained on the original $1 . 7 k$ reviews achieve $8 0 \%$ accuracy when evaluated on original reviews but only $5 1 \%$ (level of random guessing) on revised reviews (Table 5). Linear models trained on revised reviews achieve $9 1 \%$ accuracy on revised reviews but only $5 8 . 3 \%$ on the original test set. We see similar pattern for Bi-LSTMs where accuracy drops substantially in both directions. Interestingly, while BERT models suffer drops too, they are less pronounced, perhaps a benefit of the exposure to a larger dataset where the spurious patterns may not have held. Classifiers trained on combined datasets perform well on both, often within $\approx 3$ pts of models trained on the same amount of data taken only from the original distribution. Thus, there may be a price to pay for breaking the reliance on spurious associations, but it may not be substantial.
|
| 98 |
+
|
| 99 |
+
We also conduct experiments to evaluate our sentiment models vis-a-vis their generalization out-ofdomain to new domains. We evaluate models on Amazon reviews (Ni et al., 2019) on data aggregated over six genres: beauty, fashion, appliances, giftcards, magazines, and software, the Twitter sentiment dataset (Rosenthal et al., 2017),4 and Yelp reviews released as part of the Yelp dataset challenge. We show that in almost all cases, models trained on the counterfactually-augmented IMDb dataset perform better than models trained on comparable quantities of original data.
|
| 100 |
+
|
| 101 |
+
To gain intuition about what is learnable absent the edited spans, we tried training several models on passages where the edited spans have been removed from training set sentences (but not test set). SVM, Na¨ıve Bayes, and Bi-LSTM achieve $5 7 . 8 \%$ , $5 9 . 1 \%$ , $6 0 . 2 \%$ accuracy, respectively, on this task. Notably, these passages are predictive of the (true) label despite being semantially compatible with the counterfactual label. However, BERT performs worse than random guessing.
|
| 102 |
+
|
| 103 |
+
In one simple demonstration of the benefits of our approach, we note that seemingly irrelevant words such as: romantic, will, my, has, especially, life, works, both, it, its, lives and gives (correlated with positive sentiment), and horror, own, jesus, cannot, even, instead, minutes, your, effort, script, seems and something (correlated with negative sentiment) are picked up as high-weight features by linear models trained on either original or revised reviews as top predictors. However, because humans never edit these during revision owing to their lack of semantic relevance, combining the original and revised datasets breaks these associations and these terms cease to be predictive of sentiment (Fig 4). Models trained on original data but at the same scale as combined data are able to perform slightly better on the original test set but still fail on the revised reviews. All models trained on $1 9 k$ original reviews receive a slight boost in accuracy on revised data (except Na¨ıve Bayes), yet their performance significantly worse compared to specialized models. Retraining models on a combination of the original $1 9 k$ reviews with revised $1 . 7 k$ reviews leads to significant increases in accuracy for all models on classifying revised reviews, while slightly improving the accuracy on classifying the original reviews. This underscores the importance of including counterfactuallyrevised examples in training data.
|
| 104 |
+
|
| 105 |
+
Natural Language Inference Fine-tuned on $1 . 6 7 k$ original sentence pairs, BERT achieves $7 2 . 2 \%$ accuracy on SNLI dataset but it is only able to accurately classify $3 9 . 7 \%$ sentence pairs from the RP set (Table 7). Fine-tuning BERT on the full SNLI training set ( $5 0 0 k$ sentence pairs) results in similar behavior. Fine-tuning it on RP sentence pairs improves its accuracy to $6 6 . 3 \%$ on RP but causes a drop of roughly 20 pts on SNLI. On RH sentence pairs, this results in an accuracy of $6 7 \%$ on RH and $\bar { 7 } 1 . 9 \%$ on SNLI test set but $4 7 . 4 \%$ on the RP set. To put these numbers in context, each individual hypothesis sentence in RP is associated with two labels, each in the presence of a different premise. A model that relies on hypotheses only would at best perform slightly better than choosing the majority class when evaluated on this dataset. However, fine-tuning BERT on a combination of RP and RH leads to consistent performance on all datasets as the dataset design forces models to look at both premise and hypothesis. Combining original sentences with RP and RH improves these numbers even further. We compare this with the performance obtained by fine-tuning it on $8 . 3 k$ sentence pairs sampled from SNLI training set, and show that while the two perform roughly within 4 pts of each other when evaluated on SNLI, the former outperforms latter on both RP and RH.
|
| 106 |
+
|
| 107 |
+
Table 5: Accuracy of various models for sentiment analysis trained with various datasets. Orig. denotes original, Rev. denotes revised, and Orig. - Edited denotes the original dataset where the edited spans have been removed.
|
| 108 |
+
|
| 109 |
+
<table><tr><td> Training data</td><td colspan="2">SVM</td><td colspan="2">NB</td><td colspan="2">ELMo</td><td colspan="2">Bi-LSTM</td><td colspan="2">BERT</td></tr><tr><td></td><td>0</td><td>R</td><td>0</td><td>R</td><td>0</td><td>R</td><td>0</td><td>R</td><td>0</td><td>R</td></tr><tr><td>Orig. (1.7k)</td><td>80.0</td><td>51.0</td><td>74.9</td><td>47.3</td><td>81.9</td><td>66.7</td><td>79.3</td><td>55.7</td><td>87.4</td><td>82.2</td></tr><tr><td>Rev. (1.7k)</td><td>58.3</td><td>91.2</td><td>50.9</td><td>88.7</td><td>63.8</td><td>82.0</td><td>62.5</td><td>89.1</td><td>80.4</td><td>90.8</td></tr><tr><td>Orig. -Edited</td><td>57.8</td><td>1</td><td>59.1</td><td>1</td><td>50.3</td><td>1</td><td>60.2</td><td>1</td><td>49.2</td><td>1</td></tr><tr><td>Orig. & Rev. (3.4k)</td><td>83.7</td><td>87.3</td><td>86.1</td><td>91.2</td><td>85.0</td><td>92.0</td><td>81.5</td><td>92.0</td><td>88.5</td><td>95.1</td></tr><tr><td>Orig. (3.4k)</td><td>85.1</td><td>54.3</td><td>82.4</td><td>48.2</td><td>82.4</td><td>61.1</td><td>80.4</td><td>59.6</td><td>90.2</td><td>86.1</td></tr><tr><td>Orig. (19k)</td><td>87.8</td><td>60.9</td><td>84.3</td><td>42.8</td><td>86.5</td><td>64.3</td><td>86.3</td><td>68.0</td><td>93.2</td><td>88.3</td></tr><tr><td>Orig. (19k)& Rev.</td><td>87.8</td><td>76.2</td><td>85.2</td><td>48.4</td><td>88.3</td><td>84.6</td><td>88.7</td><td>79.5</td><td>93.2</td><td>93.9</td></tr></table>
|
| 110 |
+
|
| 111 |
+
Table 6: Accuracy of various sentiment analysis models on out-of-domain data
|
| 112 |
+
|
| 113 |
+
<table><tr><td>Training data</td><td>SVM</td><td>NB</td><td>ELMo</td><td>Bi-LSTM</td><td>BERT</td></tr><tr><td></td><td>Accuracy on Amazon Reviews</td><td></td><td></td><td></td><td></td></tr><tr><td>Orig. & Rev. (3.4k)</td><td>77.1</td><td>82.6</td><td>78.4</td><td>82.7</td><td>85.1</td></tr><tr><td>Orig. (3.4k)</td><td>74.7</td><td>66.9</td><td>79.1</td><td>65.9</td><td>80.0</td></tr><tr><td>Accuracy on Semeval 2017 (Twitter)</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Orig. & Rev. (3.4k)</td><td>66.5</td><td>73.9</td><td>70.0</td><td>68.7</td><td>82.9</td></tr><tr><td>Orig. (3.4k)</td><td>61.2</td><td>64.6</td><td>69.5</td><td>55.3</td><td>79.3</td></tr><tr><td></td><td>Accuracy </td><td></td><td> on Yelp Reviews</td><td></td><td></td></tr><tr><td>Orig. & Rev. (3.4k)</td><td>87.6</td><td>89.6</td><td>87.2</td><td>86.2</td><td>89.4</td></tr><tr><td>Orig. (3.4k)</td><td>81.8</td><td>77.5</td><td>82.0</td><td>78.0</td><td>85.3</td></tr></table>
|
| 114 |
+
|
| 115 |
+
Table 7: Accuracy of BERT on NLI with various train and eval sets.
|
| 116 |
+
|
| 117 |
+
<table><tr><td>Train/Eval</td><td>Original</td><td>RP</td><td>RH</td><td>RP&RH</td></tr><tr><td>Original (1.67k)</td><td>72.2</td><td>39.7</td><td>59.5</td><td>49.6</td></tr><tr><td>Revised Premise (RP; 3.3k)</td><td>50.6</td><td>66.3</td><td>50.1</td><td>58.2</td></tr><tr><td>Revised Hypothesis (RH; 3.3k)</td><td>71.9</td><td>47.4</td><td>67.0</td><td>57.2</td></tr><tr><td>RP & RH(6.6k)</td><td>64.7</td><td>64.6</td><td>67.8</td><td>66.2</td></tr><tr><td>Original w/RP & RH(8.3k)</td><td>73.5</td><td>64.6</td><td>69.6</td><td>67.1</td></tr><tr><td>Original (8.3k)</td><td>77.8</td><td>44.6</td><td>66.1</td><td>55.4</td></tr><tr><td>Original (500k)</td><td>90.4</td><td>54.3</td><td>74.3</td><td>64.3</td></tr></table>
|
| 118 |
+
|
| 119 |
+
Table 8: Accuracy of Bi-LSTM classifier trained on hypotheses only
|
| 120 |
+
|
| 121 |
+
<table><tr><td>Train/Test</td><td>Original</td><td>RP</td><td>RH</td><td>RP&RH</td></tr><tr><td>Majority class</td><td>34.7</td><td>34.6</td><td>34.6</td><td>34.6</td></tr><tr><td>RP & RH(6.6k)</td><td>32.4</td><td>35.1</td><td>33.4</td><td>34.2</td></tr><tr><td>Original w/RP & RH (8.3k)</td><td>44.0</td><td>25.8</td><td>43.2</td><td>34.5</td></tr><tr><td>Original (8.3k)</td><td>60.2</td><td>20.5</td><td>46.6</td><td>33.6</td></tr><tr><td>Original (500k)</td><td>69.0</td><td>15.4</td><td>53.2</td><td>34.3</td></tr></table>
|
| 122 |
+
|
| 123 |
+
Table 9: Accuracy of models trained to differentiate between original and revised data
|
| 124 |
+
|
| 125 |
+
<table><tr><td>Model</td><td>IMDb</td><td>SNLI/RP</td><td>SNLI/RH</td></tr><tr><td>Majority class</td><td>50.0</td><td>66.7</td><td>66.7</td></tr><tr><td>SVM</td><td>67.4</td><td>46.6</td><td>51.0</td></tr><tr><td>NB</td><td>69.2</td><td>66.7</td><td>66.6</td></tr><tr><td>BERT</td><td>77.3</td><td>64.8</td><td>69.7</td></tr></table>
|
| 126 |
+
|
| 127 |
+
To further isolate this effect, Bi-LSTM trained on SNLI hypotheses only achieves $6 9 \%$ accuracy on SNLI test set, which drops to $4 4 \%$ if it is retrained on combination of original, RP and RH data (Table 8). Note that this combined dataset consists of five variants of each original premisehypothesis pair. Of these five pairs, three consist of the same hypothesis sentence, each associated with different truth value given the respective premise. Using these hypotheses only would provide conflicting feedback to a classifier during training, thus causing the drop in performance. Further, we notice that the gain of the latter over majority class baseline comes primarily from the original data, as the same model retrained only on RP and RH data experiences a further drop of $1 1 . 6 \%$ in accuracy, performing worse than just choosing the majority class at all times.
|
| 128 |
+
|
| 129 |
+
One reasonable concern might be that our models would simply distinguish whether an example were from the original or revised dataset and thereafter treat them differently. The fear might be that our models would exhibit a hypersensitivity (rather than insensitivity) to domain. To test the potential for this behavior, we train several models to distinguish between original and revised data (Table 9). BERT identifies original reviews from revised reviews with $7 7 . 3 \%$ accuracy. In case of NLI, BERT and Na¨ıve Bayes perform roughly within 3 pts of the majority class baseline $( 6 6 . 7 \% )$ whereas SVM performs substantially worse.
|
| 130 |
+
|
| 131 |
+
# 6 CONCLUSION
|
| 132 |
+
|
| 133 |
+
By leveraging humans not only to provide labels but also to intervene upon the data, revising documents to accord with various labels, we can elucidate the difference that makes a difference. Moreover, we can leverage the augmented data to train classifiers less dependent on spurious associations. Our study demonstrates the promise of leveraging human-in-the-loop feedback to disentangle the spurious and non-spurious associations, yielding classifiers that hold up better when spurious associations do not transport out of domain. Our methods appear useful on both sentiment analysis and NLI, two contrasting tasks. In sentiment analysis, expressions of opinion matter more than stated facts, while in NLI this is reversed. SNLI poses another challenge in that it is a 3-class classification task using two input sentences. In future work, we will extend these techniques, leveraging humans in the loop to build more robust systems for question answering and summarization.
|
| 134 |
+
|
| 135 |
+
# ACKNOWLEDGEMENTS
|
| 136 |
+
|
| 137 |
+
The authors are grateful to Amazon AWS and NVIDIA for providing GPUs to conduct the experiments, Salesforce Research and Facebook AI for their generous grants that made the data collection possible, Sina Fazelpour, Sivaraman Balakrishnan, Shruti Rijhwani, Shruti Palaskar, Aishwarya Kamath, Michael Collins, Rajesh Ranganath and Sanjoy Dasgupta for their valuable feedback, and Tzu-Hsiang Lin for his generous help in creating the data collection platform. We also thank Abridge AI, UPMC, the Center for Machine Learning in Health, and the AI Ethics and Governance Fund for their support of our broader research on robust machine learning.
|
| 138 |
+
|
| 139 |
+
# REFERENCES
|
| 140 |
+
|
| 141 |
+
Samuel R Bowman, Gabor Angeli, Christopher Potts, and Christopher D Manning. A large annotated corpus for learning natural language inference. In Empirical Methods in Natural Language Processing (EMNLP), 2015.
|
| 142 |
+
|
| 143 |
+
Danqi Chen, Jason Bolton, and Christopher D Manning. A thorough examination of the cnn/daily mail reading comprehension task. In Association for Computational Linguistics (ACL), 2016.
|
| 144 |
+
|
| 145 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT), 2019.
|
| 146 |
+
|
| 147 |
+
Lucas Dixon, John Li, Jeffrey Sorensen, Nithum Thain, and Lucy Vasserman. Measuring and mitigating unintended bias in text classification. In AAAI/ACM Conference on AI, Ethics, and Society. ACM, 2018.
|
| 148 |
+
|
| 149 |
+
Robert Geirhos, Patricia Rubisch, Claudio Michaelis, Matthias Bethge, Felix A Wichmann, and Wieland Brendel. Imagenet-trained cnns are biased towards texture; increasing shape bias improves accuracy and robustness. arXiv preprint arXiv:1811.12231, 2018.
|
| 150 |
+
|
| 151 |
+
Max Glockner, Vered Shwartz, and Yoav Goldberg. Breaking nli systems with sentences that require simple lexical inferences. In Association for Computational Linguistics (ACL), 2018.
|
| 152 |
+
|
| 153 |
+
Alex Graves and Jurgen Schmidhuber. Framewise phoneme classification with bidirectional lstm ¨ and other neural network architectures. Neural networks, 18(5-6), 2005.
|
| 154 |
+
|
| 155 |
+
Suchin Gururangan, Swabha Swayamdipta, Omer Levy, Roy Schwartz, Samuel Bowman, and Noah A Smith. Annotation artifacts in natural language inference data. In North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACLHLT), 2018.
|
| 156 |
+
|
| 157 |
+
Karl Moritz Hermann, Tomas Kocisky, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa Suleyman, and Phil Blunsom. Teaching machines to read and comprehend. In Advances in Neural Information Processing Systems (NeurIPS), 2015.
|
| 158 |
+
|
| 159 |
+
Eduard Hovy. Generating natural language under pragmatic constraints. Journal of Pragmatics, 1987.
|
| 160 |
+
|
| 161 |
+
Mohit Iyyer, John Wieting, Kevin Gimpel, and Luke Zettlemoyer. Adversarial example generation with syntactically controlled paraphrase networks. In North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT), 2018.
|
| 162 |
+
|
| 163 |
+
Robin Jia and Percy Liang. Adversarial examples for evaluating reading comprehension systems. In Empirical Methods in Natural Language Processing (EMNLP), 2017.
|
| 164 |
+
|
| 165 |
+
Jason Jo and Yoshua Bengio. Measuring the tendency of cnns to learn surface statistical regularities. arXiv preprint arXiv:1711.11561, 2017.
|
| 166 |
+
|
| 167 |
+
Divyansh Kaushik and Zachary C Lipton. How much reading does reading comprehension require? a critical investigation of popular benchmarks. In Empirical Methods in Natural Language Processing (EMNLP), 2018.
|
| 168 |
+
|
| 169 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations (ICLR), 2015.
|
| 170 |
+
|
| 171 |
+
Svetlana Kiritchenko and Saif Mohammad. Examining gender and race bias in two hundred sentiment analysis systems. In Joint Conference on Lexical and Computational Semantics $( { } ^ { * } S E M )$ , 2018.
|
| 172 |
+
|
| 173 |
+
Kaiji Lu, Piotr Mardziel, Fangjing Wu, Preetam Amancharla, and Anupam Datta. Gender bias in neural natural language processing. arXiv preprint arXiv:1807.11714, 2018.
|
| 174 |
+
|
| 175 |
+
Andrew L Maas, Raymond E Daly, Peter T Pham, Dan Huang, Andrew $\mathrm { \Delta Y N g }$ , and Christopher Potts. Learning word vectors for sentiment analysis. In Association for Computational Linguistics: Human Language Technologies (ACL-HLT), 2011.
|
| 176 |
+
|
| 177 |
+
Rowan Hall Maudslay, Hila Gonen, Ryan Cotterell, and Simone Teufel. It’s all in the name: Mitigating gender bias with name-based counterfactual data substitution. arXiv preprint arXiv:1909.00871, 2019.
|
| 178 |
+
|
| 179 |
+
Vinod Nair and Geoffrey E Hinton. Rectified linear units improve restricted boltzmann machines. In International Conference on Machine Learning (ICML), 2010.
|
| 180 |
+
|
| 181 |
+
Jianmo Ni, Jiacheng Li, and Julian McAuley. Justifying recommendations using distantly-labeled reviews and fine-grained aspects. In Empirical Methods in Natural Language Processing and International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), 2019. URL https://www.aclweb.org/anthology/D19-1018.
|
| 182 |
+
|
| 183 |
+
F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research (JMLR), 12, 2011.
|
| 184 |
+
|
| 185 |
+
Matthew E Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. Deep contextualized word representations. In North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT), 2018.
|
| 186 |
+
|
| 187 |
+
Jonas Pfeiffer, Aishwarya Kamath, Iryna Gurevych, and Sebastian Ruder. What do deep networks like to read? arXiv preprint arXiv:1909.04547, 2019.
|
| 188 |
+
|
| 189 |
+
Adam Poliak, Jason Naradowsky, Aparajita Haldar, Rachel Rudinger, and Benjamin Van Durme. Hypothesis Only Baselines in Natural Language Inference. In Joint Conference on Lexical and Computational Semantics (\*Sem), 2018.
|
| 190 |
+
|
| 191 |
+
Stefanos Poulis and Sanjoy Dasgupta. Learning with feature feedback: from theory to practice. In Artificial Intelligence and Statistics (AISTATS), 2017.
|
| 192 |
+
|
| 193 |
+
Marco Tulio Ribeiro, Sameer Singh, and Carlos Guestrin. Semantically equivalent adversarial rules for debugging nlp models. In Association for Computational Linguistics (ACL), 2018.
|
| 194 |
+
|
| 195 |
+
Sara Rosenthal, Noura Farra, and Preslav Nakov. SemEval-2017 task 4: Sentiment analysis in twitter. In International Workshop on Semantic Evaluation (SemEval), 2017. URL https: //www.aclweb.org/anthology/S17-2088.
|
| 196 |
+
|
| 197 |
+
Judy Hanwen Shen, Lauren Fratamico, Iyad Rahwan, and Alexander M Rush. Darling or babygirl? investigating stylistic bias in sentiment analysis. 5th Workshop on Fairness, Accountability, and Transparency in Machine Learning (FATML), 2018.
|
| 198 |
+
|
| 199 |
+
Eric Wallace, Shi Feng, Nikhil Kandpal, Matt Gardner, and Sameer Singh. Universal adversarial triggers for nlp. arXiv preprint arXiv:1908.07125, 2019.
|
| 200 |
+
|
| 201 |
+
Omar Zaidan, Jason Eisner, and Christine Piatko. Using annotator rationales to improve machine learning for text categorization. In North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT), 2007.
|
| 202 |
+
|
| 203 |
+
Omar F Zaidan and Jason Eisner. Modeling annotators: A generative approach to learning from annotator rationales. In Empirical Methods in Natural Language Processing (EMNLP). Association for Computational Linguistics, 2008.
|
| 204 |
+
|
| 205 |
+
Jieyu Zhao, Tianlu Wang, Mark Yatskar, Vicente Ordonez, and Kai-Wei Chang. Gender bias in coreference resolution: Evaluation and debiasing methods. In North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT), 2018.
|
| 206 |
+
|
| 207 |
+
Ran Zmigrod, Sebastian J. Mielke, Hanna Wallach, and Ryan Cotterell. Counterfactual data augmentation for mitigating gender stereotypes in languages with rich morphology. In Association for Computational Linguistics (ACL), 2019.
|
| 208 |
+
|
| 209 |
+
# APPENDIX
|
| 210 |
+
|
| 211 |
+
Table 10: Most frequent insertions/deletions by human annotators for sentiment analysis.
|
| 212 |
+
|
| 213 |
+
<table><tr><td>Revision</td><td>Removed words</td><td>Inserted words</td></tr><tr><td>Positive to Negative</td><td>movie,film,great, like,good,re- ally, would, see,story, love</td><td>movie, film, one, like,bad,would, really,even,story, see</td></tr><tr><td>Negative to Positive</td><td>bad,even,worst, waste,nothing, never,much,would, like, litle</td><td>great, good,best, even, well, amaz- ing,much,many,watch,better</td></tr></table>
|
| 214 |
+
|
| 215 |
+
Table 11: Most frequent insertions/deletions by human annotators for SNLI.
|
| 216 |
+
|
| 217 |
+
<table><tr><td colspan="2">Revision Removed words</td><td>Inserted words</td></tr><tr><td colspan="2">Revising Premise</td><td></td></tr><tr><td>Entailment to Neutral</td><td>woman,walking,man,blue, sitting, men, girl, standing, looking,running</td><td>person, near, child, something, together, people, tall, vehicle, wall, holding</td></tr><tr><td>Neutral to Entailment</td><td>man,street,black,water, little, front,young,playing,woman, two</td><td>waiting,couple,playing,run- ning, getting,making, tall, game, black,happily</td></tr><tr><td>Entailment to Contradiction</td><td>blue,people,standing,girl, front,street,red,young,sit- ting,band</td><td>sitting, standing, inside, young, women, child, red, men, sits,one</td></tr><tr><td>Contradiction to Entailment</td><td>sitting,man,walking,black, blue,people,red,standing, white,street</td><td>man,sitting, sleeping,woman, sits,eating,playing,park, two, standing</td></tr><tr><td>Neutral to Contradiction</td><td>man, woman, people,boy, black,red,standing,young, two,water</td><td>man,woman, boy, men, alone, sitting,girl,dog,three,one</td></tr><tr><td>Contradiction to Neutral</td><td>man, sitting,black,blue,walk-1 ing,red,standing, street, white,street</td><td>man, sitting, woman, peo- ple,person, near, something, something,sits,black</td></tr><tr><td colspan="3">Revising Hypothesis</td></tr><tr><td>Entailment to Neutral</td><td>man, wearing, white, blue, black,shirt,one,young,peo- ple,woman</td><td>people,there,playing,man, person,wearing,outside,two, old, near</td></tr><tr><td>Neutral to Entailment</td><td>white,wearing,shirt,black, blue, man, two, standing, young, red</td><td>playing,wearing,man, two, there,woman,people,men, near,person</td></tr><tr><td>Entailment to Contradiction</td><td>man, wearing, white, blue, black,two,shirt,one,young, people</td><td>people,man, woman, playing, no,inside,person, two,wear- ing,women</td></tr><tr><td>Contradiction to Entailment</td><td>wearing, blue, black, man, white,two,red,shirt,young, one</td><td>people, there,man, two,wear- ing, playing, people,men, woman, outside</td></tr><tr><td>Neutral to Contradiction</td><td>white, man, wearing, shirt, black,blue,two,standing, woman, red</td><td>woman,man,there,playing, two,wearing, one,men,girl, no</td></tr><tr><td>Contradiction to Neutral</td><td>wearing,blue,black,man, white, two,red, sitting,young, standing</td><td>people,playing,man,woman, two,wearing,near, tall,men, old</td></tr></table>
|
| 218 |
+
|
| 219 |
+

|
| 220 |
+
Figure 4: Thirty most important features learned by an SVM classifier trained on TF-IDF bag of words.
|
| 221 |
+
|
| 222 |
+
The blue box contains a text passage and a label. Please edit this text in the textbox below, making a small number of changes such that:
|
| 223 |
+
|
| 224 |
+
(a) the document remains coherent and (b) the new label (colored) accurately describes the revised passage.
|
| 225 |
+
|
| 226 |
+
Do not change any portions of the passage unnecessarily.
|
| 227 |
+
|
| 228 |
+
After modifying the passage and checking it over to make sure that is coherent and matches the label.
|
| 229 |
+
|
| 230 |
+
(a) Revising IMDb movie reviews
|
| 231 |
+
|
| 232 |
+
The upper blue box contains Sentence 1. The lower blue box contains Sentence 2. Given that Sentence 1 is True, Sentence 2 (by implication), must either be (a) definitely True, (b) definitely False, or (c) May be True.
|
| 233 |
+
|
| 234 |
+
You are presented with an initial Sentence 1 and Sentence 2 and the correct initial relationship label (True, False, or May be True).
|
| 235 |
+
|
| 236 |
+
Please edit Sentence 2 in the textboxes, making a small number of changes such that:
|
| 237 |
+
|
| 238 |
+
(a) The new sentences are coherent and
|
| 239 |
+
(b) The target labels (in red) accurately describe the truthfulness of the modified Sentence 2 given the original Sentence 1.
|
| 240 |
+
|
| 241 |
+
Do not change any portions of the sentence unnecessarily.
|
| 242 |
+
|
| 243 |
+
After modifying the text and checking it over to make sure that it is coherent and matches the target label.
|
| 244 |
+
|
| 245 |
+
(b) Revising hypothesis in SNLI
|
| 246 |
+
|
| 247 |
+
The upper blue box contains Sentence 1. The lower blue box contains Sentence 2. Given that Sentence 1 is True, Sentence 2 (by implication), must either be (a) definitely True, (b) definitely False, or (c) May be True.
|
| 248 |
+
|
| 249 |
+
You are presented with an initial Sentence 1 and Sentence 2 and the correct initial relationship label (True, False, or May be True).
|
| 250 |
+
|
| 251 |
+
Please edit Sentence 1 in the textboxes, making a small number of changes such that:
|
| 252 |
+
|
| 253 |
+
(a) The new sentences are coherent and
|
| 254 |
+
(b) The target labels (in red) accurately describe the truthfulness of the original Sentence 2 given the modified Sentence 1.
|
| 255 |
+
|
| 256 |
+
After modifying the text and checking it over to make sure that it is coherent and matches the target label.
|
| 257 |
+
|
| 258 |
+
(c) Revising premise in SNLI
|
md/train/SygONjRqKm/SygONjRqKm.md
ADDED
|
@@ -0,0 +1,457 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# AMORTIZED CONTEXT VECTOR INFERENCE FOR SEQUENCE-TO-SEQUENCE NETWORKS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Neural attention (NA) has become a key component of sequence-to-sequence models that yield state-of-the-art performance in as hard tasks as abstractive document summarization (ADS), machine translation (MT), and video captioning (VC). NA mechanisms perform inference of context vectors; these constitute weighted sums of deterministic input sequence encodings, adaptively sourced over long temporal horizons. Inspired from recent work in the field of amortized variational inference (AVI), in this work we consider treating the context vectors generated by softattention (SA) models as latent variables, with approximate finite mixture model posteriors inferred via AVI. We posit that this formulation may yield stronger generalization capacity, in line with the outcomes of existing applications of AVI to deep networks. To illustrate our method, we implement it and experimentally evaluate it considering challenging ADS, VC, and MT benchmarks. This way, we exhibit its improved effectiveness over state-of-the-art alternatives.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Sequence-to-sequence $( s e q 2 s e q )$ or encoder-decoder models (Sutskever et al., 2014) constitute a novel solution to inferring relations between sequences of different lengths. They are broadly used for addressing tasks including machine translation (MT) (Bahdanau et al., 2015; Luong et al., 2015), abstractive document summarization (ADS), descriptive caption generation (DCG) (Xu et al., 2016), and question answering (QA) (Sukhbaatar et al., 2015), to name just a few. Seq2seq models comprise two distinct RNN models: an encoder RNN, and a decoder RNN. Their main principle of operation is based on the idea of learning to infer an intermediate context vector representation, c, which is “shared” among the two RNN modules of the model, i.e., the encoder and the decoder. Specifically, the encoder converts the source sequence to a context vector (e.g., the final state of the encoder RNN), while the decoder is presented with the inferred context vector to produce the target sequence.
|
| 12 |
+
|
| 13 |
+
Despite these merits, though, baseline seq2seq models cannot learn temporal dynamics over long horizons. This is due to the fact that a single context vector $^ c$ is capable of encoding rather limited temporal information. This major limitation has been addressed via the development of neural attention (NA) mechanisms (Bahdanau et al., 2015). NA has been a major breakthrough in Deep Learning for Natural Language Processing, as it enables the decoder modules of seq2seq models to adaptively focus on temporally-varying subsets of the source sequence. This capacity, in turn, enables flexibly capturing long temporal dynamics in a computationally efficient manner.
|
| 14 |
+
|
| 15 |
+
Among the large collection of recently devised NA variants, the vast majority build upon the concept of Soft Attention (SA) (Xu et al., 2016). Under this rationale, at each sequence generation (decoding) step, NA-obtained context vectors essentially constitute deterministic representations of the dynamics between the source sequence and the decodings obtained thus far. However, recent work in the field of amortized variational inference (AVI) (Jimenez Rezende & Mohamed, 2015; Kingma & Welling, 2013) has shown that it is often useful to treat representations generated by deep networks as latent random variables. Indeed, it is now well-understood that, under such an inferential setup, the trained deep learning models become more effective in inferring representations that offer stronger generalizaton capacity, instead of getting trapped to representations of poor generalizaton quality. Then, model training reduces to inferring posterior distributions over the introduced latent variables. This can be performed by resorting to variational inference (Attias, 2000), where the sought variational posteriors are parameterized via appropriate deep networks.
|
| 16 |
+
|
| 17 |
+
Motivated from these research advances, in this paper we consider a novel formulation of SA. Specifically, we propose an NA mechanism formulation where the generated context vectors are considered random latent variables with finite mixture model posteriors, over which AVI is performed. We dub our approach amortized context vector inference (ACVI). To exhibit the efficacy of ACVI, we implement it into: (i) Pointer-Generator Networks (See et al., 2017), which constitute a state-of-the-art approach for addressing ADS tasks; (ii) baseline seq2seq models with additive SA, applied to the task of VC; and (iii) baseline seq2seq models with multiplicative SA, applied to MT.
|
| 18 |
+
|
| 19 |
+
The remainder of this paper is organized as follows: In Section 2, we briefly present the seq2seq model variants in the context of which we implement our method and exhibit its efficacy. In Section 3, we introduce the proposed approach, and elaborate on its training and inference algorithms. In Section 4, we perform an extensive experimental evaluation of our approach using benchmark ADS, MT, and VC datasets. Finally, in the concluding Section, we summarize the contribution of this work.
|
| 20 |
+
|
| 21 |
+
# 2 METHODOLOGICAL BACKGROUND
|
| 22 |
+
|
| 23 |
+
# 2.1 ABSTRACTIVE DOCUMENT SUMMARIZATION
|
| 24 |
+
|
| 25 |
+
ADS consists in not only copying from an original document, but also learning to generate new sentences or novel words during the summarization process. The introduction of seq2seq models has rendered ADS both feasible and effective (Rush et al., 2015; Zeng et al., 2017). Dealing with out-ofvocabulary (OOV) words was one of the main difficulties that early ADS models were confronted with. Word and/or phrase repetition was a second issue. The pointer-generator model presented in (See et al., 2017) constitutes one of the most comprehensive efforts towards ameliorating these issues.
|
| 26 |
+
|
| 27 |
+
In a nutshell, this model comprises one bidirectional LSTM (Hochreiter & Schmidhuber, 1997) (BiLSTM) encoder, and a unidirectional LSTM decoder, which incorporates an SA mechanism (Bahdanau et al., 2015). The word embedding of each token, $\pmb { x } _ { i } , \ i \in \mathsf { \bar { \{ 1 , \dots , N \} } }$ , in the source sequence (document) is presented to the encoder BiLSTM; this obtains a representation (encoding) $h _ { i } = [ \overrightarrow { { h } } _ { i } ; \overleftarrow { { h } } _ { i } ]$ , where $\vec { \boldsymbol { h } _ { i } }$ is the corresponding forward LSTM state, and $\overleftarrow { \overline { { h } } } _ { i }$ is the corresponding backward LSTM state. Then, at each generation step, $t$ , the decoder LSTM gets as input the (word embedding of the) previous token in the target sequence. During training, this is the previous word in the available reference summary; during inference, this is the previous generated word. On this basis, the decoder updates its internal state, $\mathbf { \Delta } _ { \mathbf { \mathcal { S } } _ { t } }$ , which is then presented to the postulated SA network. Specifically, the attention distribution, $\mathbf { } \mathbf { a } _ { t }$ , is given by:
|
| 28 |
+
|
| 29 |
+
$$
|
| 30 |
+
e _ { t } ^ { i } = v ^ { T } \operatorname { t a n h } ( W _ { h } h _ { i } + W _ { s } s _ { t } + b _ { a t t n } )
|
| 31 |
+
$$
|
| 32 |
+
|
| 33 |
+
$$
|
| 34 |
+
{ \pmb a } _ { t } = \mathrm { s o f t m a x } ( { \pmb e } _ { t } ) , { \pmb e } _ { t } = [ { \pmb e } _ { t } ^ { i } ] _ { i }
|
| 35 |
+
$$
|
| 36 |
+
|
| 37 |
+
where the $W .$ · are trainable weight matrices, $b _ { a t t n }$ is a trainable bias vector, and $\textbf { { v } }$ is a trainable parameter vector of the same size as $\pmb { b } _ { a t t r }$ . Then, the model updates the maintained context vector, $\mathbf { } _ { c _ { t } }$ , by taking an weighted average of all the source token encodings; in that average, the used weights are the inferred attention probabilities. We obtain:
|
| 38 |
+
|
| 39 |
+
$$
|
| 40 |
+
c _ { t } = \sum _ { i } a _ { t } ^ { i } h _ { i }
|
| 41 |
+
$$
|
| 42 |
+
|
| 43 |
+
Eventually, the predictive distribution over the next generated word yields:
|
| 44 |
+
|
| 45 |
+
$$
|
| 46 |
+
P _ { t } ^ { v o c a b } = \mathrm { s o f t m a x } ( V ^ { \prime } \mathrm { t a n h } ( V [ s _ { t } ; c _ { t } ] + b ) + b ^ { ' } )
|
| 47 |
+
$$
|
| 48 |
+
|
| 49 |
+
where $V$ and $V ^ { \prime }$ are trainable weight matrices, while $^ { b }$ and $\pmb { b } ^ { \prime }$ are trainable bias vectors.
|
| 50 |
+
|
| 51 |
+
In parallel, the network also computes an additional probability, $p _ { t } ^ { g e n }$ , which expresses whether the next output should be generated by sampling from the predictive distribution, $\dot { P } _ { t } ^ { v o c a b }$ , or the model should simply copy one of the already available source sequence tokens. This mechanism allows for the model to cope with OOV words; it is defined via a simple sigmoid layer of the form:
|
| 52 |
+
|
| 53 |
+
$$
|
| 54 |
+
p _ { t } ^ { g e n } = \sigma ( \boldsymbol { w } _ { c } ^ { T } \boldsymbol { c } _ { t } + \boldsymbol { w } _ { s } ^ { T } \boldsymbol { s } _ { t } + \boldsymbol { w } _ { x } ^ { T } \boldsymbol { x } _ { t } + b _ { p t r } )
|
| 55 |
+
$$
|
| 56 |
+
|
| 57 |
+
where $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ is the decoder input, while the $\pmb { w }$ · and $b _ { p t r }$ are trainable parameter vectors. The probability of copying the $i$ th source sequence token is considered equal to the corresponding attention probability,
|
| 58 |
+
|
| 59 |
+
$a _ { t } ^ { i }$ . Eventually, the obtained probability that the next output word will be $\beta$ (found either in the vocabulary or among the source sequence tokens) yields:
|
| 60 |
+
|
| 61 |
+
$$
|
| 62 |
+
P _ { t } ( \beta ) = p _ { t } ^ { g e n } P _ { t } ^ { v o c a b } ( \beta ) + ( 1 - p _ { t } ^ { g e n } ) \sum _ { i : \beta _ { i } = \beta } a _ { t } ^ { i }
|
| 63 |
+
$$
|
| 64 |
+
|
| 65 |
+
Finally, a coverage mechanism may also be employed (Tu et al., 2016), as a means of penalizing words that have already received attention in the past, to prevent repetition. Specifically, the coverage vector, $k _ { t }$ , is defined as:
|
| 66 |
+
|
| 67 |
+
$$
|
| 68 |
+
k _ { t } = [ k _ { t } ^ { i } ] _ { i = 1 } ^ { N } = \sum _ { \tau = 0 } ^ { t - 1 } { \mathbf a } _ { \tau }
|
| 69 |
+
$$
|
| 70 |
+
|
| 71 |
+
Using the so-obtained coverage vector, expression (1) is modified as follows:
|
| 72 |
+
|
| 73 |
+
$$
|
| 74 |
+
e _ { t } ^ { i } = v ^ { T } \operatorname { t a n h } ( W _ { h } h _ { i } + W _ { s } s _ { t } + w _ { k } k _ { t } ^ { i } + b _ { a t t n } )
|
| 75 |
+
$$
|
| 76 |
+
|
| 77 |
+
where ${ \pmb w } _ { k }$ is a trainable parameter vector of size similar to $\textbf { { v } }$ . Model training is performed via minimization of the categorical cross-entropy, augmented with a coverage term of the form:
|
| 78 |
+
|
| 79 |
+
$$
|
| 80 |
+
\lambda \sum _ { i } \sum _ { t } \operatorname* { m i n } ( a _ { t } ^ { i } , c _ { t } ^ { i } )
|
| 81 |
+
$$
|
| 82 |
+
|
| 83 |
+
Here, $\lambda$ controls the influence of the coverage term; in the remainder of this work, we set $\lambda = 1$ .
|
| 84 |
+
|
| 85 |
+
# 2.2 VIDEO CAPTIONING
|
| 86 |
+
|
| 87 |
+
Seq2seq models with attention have been successfully applied to several datasets of multimodal nature. Video captioning constitutes a popular such application. In this work, we consider a simple seq2seq model with additive SA that comprises a BiLSTM encoder, an LSTM decoder, and an output distribution of the form (4). The used encoder is presented with visual features obtained from a pretrained convolutional neural network (CNN). Using a pretrained CNN as our employed visual feature extractor ensures that all the evaluated attention models are presented with identical feature descriptors of the available raw data. Hence, it facilitates fairness in the comparative evaluation of our proposed attention mechanism. We elaborate on the specific model configuration in Section 4.2.
|
| 88 |
+
|
| 89 |
+
# 2.3 MACHINE TRANSLATION
|
| 90 |
+
|
| 91 |
+
Machine translation constitutes one of the first sequential data modeling applications where seq2seq models were shown to obtain state-of-the-art performance. In this work, we perform MT by means of a baseline seq2seq model comprising a BiLSTM encoder, an LSTM decoder, a predictive distribution over the next generated word which is given by (4), and a multiplicative SA mechanism. The latter is described by (Luong et al., 2015):
|
| 92 |
+
|
| 93 |
+
$$
|
| 94 |
+
e _ { t } ^ { i } = h _ { i } W s _ { t }
|
| 95 |
+
$$
|
| 96 |
+
|
| 97 |
+
in conjunction with Eq. (2); therein, $W$ is a trainable weights matrix. Our consideration here of multiplicative SA both serves the purpose of implementing and evaluating our approach under diverse SA variants, and is congruent with the best reported results in the related literature.
|
| 98 |
+
|
| 99 |
+
# 3 PROPOSED APPROACH
|
| 100 |
+
|
| 101 |
+
We begin by introducing the core assumption that the computed context vectors, $\mathbf { } c _ { t }$ , constitute latent random variables. Further, we assume that, at each decoding step, $t$ , the corresponding context vector, $\mathbf { } _ { c _ { t } }$ $\{ h _ { i } \} _ { i = 1 } ^ { N }$ , is drawn from a distribution associated with one of the available source sequence encodings, . The selection of the source sequence encoding to associate with is determined from the output sequence via the decoder state, $\mathbf { \boldsymbol { s } } _ { t }$ , as we explain next.
|
| 102 |
+
|
| 103 |
+
Let us introduce the set of binary latent indicator variables, $\{ z _ { t } ^ { i } \} _ { i = 1 } ^ { N }$ , $z _ { t } ^ { i } \in \{ 0 , 1 \}$ , with $z _ { t } ^ { i } = 1$ denoting that the context vector $\mathbf { } c _ { t }$ is drawn from the $i$ th density, that is the density associated with the ith source encoding, $\boldsymbol { h } _ { i }$ , and $z _ { t } ^ { i } = 0$ otherwise. Then, we postulate the following hierarchical model:
|
| 104 |
+
|
| 105 |
+
$$
|
| 106 |
+
\begin{array} { r } { \begin{array} { r } { \boldsymbol { c } _ { t } | \boldsymbol { z } _ { t } ^ { i } = 1 ; \mathcal { D } \sim p ( \boldsymbol { \theta } ( h _ { i } ) ) } \end{array} } \end{array}
|
| 107 |
+
$$
|
| 108 |
+
|
| 109 |
+
$$
|
| 110 |
+
z _ { t } ^ { i } = 1 | \mathcal { D } \sim \pi _ { t } ^ { i } ( a _ { t } ^ { i } )
|
| 111 |
+
$$
|
| 112 |
+
|
| 113 |
+
where $\mathcal { D }$ comprises the set of both the source and target training sequences, $\pmb \theta$ denotes the parameters set of the context vector conditional density, and $\hat { \pi _ { t } ^ { i } }$ denotes the probability of drawing from the ith conditional at time $t$ . Notably, we assume that the component assignment probabilities, $\pi _ { t } ^ { i }$ , are functions of the attention probabilities, $a _ { t } ^ { i }$ . Thus, the selection of the mixture component density that we draw the context vector from at decoding time $t$ is directly determined from the value of the current decoder state, $\mathbf { \Delta } _ { \mathbf { \mathcal { S } } _ { t } }$ , via the corresponding attention probabilities. A higher affinity of the current decoder state $\mathbf { \Delta } _ { \mathbf { \mathcal { S } } _ { t } }$ with the $i$ th encoding, $\boldsymbol { h } _ { i }$ , at time $t$ , results in higher probability that the context vector be drawn from the corresponding conditional density.
|
| 114 |
+
|
| 115 |
+
Having defined the hierarchical model (11)-(12), it is important that we examine the resulting expression of the posterior density $p ( c _ { t } ; \mathcal { D } )$ . By marginalizing over (11) and (12), we obtain:
|
| 116 |
+
|
| 117 |
+
$$
|
| 118 |
+
p ( \boldsymbol { c } _ { t } ; \mathcal { D } ) = \sum _ { i = 1 } ^ { N } \pi _ { t } ^ { i } ( a _ { t } ^ { i } ) p ( \pmb { \theta } ( \boldsymbol { h } _ { i } ) )
|
| 119 |
+
$$
|
| 120 |
+
|
| 121 |
+
In other words, we obtain a finite mixture model posterior over the context vectors, with mixture conditional densities associated with the available source sequence encodings, and mixture weights that are functions of the corresponding attention vectors, and are therefore determined by the target sequences.
|
| 122 |
+
|
| 123 |
+
In addition, it is interesting to compare this expression to the definition of context vectors under the conventional SA scheme. From (3), we observe that conventional SA is merely a special case of our proposed model, obtained by introducing two assumptions: (i) that the postulated mixture component assignment probabilities are identity functions of the associated attention probabilities, i.e.
|
| 124 |
+
|
| 125 |
+
$$
|
| 126 |
+
\begin{array} { r l } & { p ( z _ { t } ; \mathcal { D } ) = \mathrm { C a t } ( z _ { t } | \pi _ { t } ) , z _ { t } = [ z _ { t } ^ { i } ] _ { i = 1 } ^ { N } , \pi _ { t } = [ \pi _ { t } ^ { i } ( a _ { t } ^ { i } ) ] _ { i = 1 } ^ { N } } \\ & { \mathrm { s . t . } \quad \pi _ { t } ^ { i } ( a _ { t } ^ { i } ) \triangleq p ( z _ { t } ^ { i } = 1 ; \mathcal { D } ) = a _ { t } ^ { i } = \mathrm { s o f t m a x } ( e _ { t } ) ; } \end{array}
|
| 127 |
+
$$
|
| 128 |
+
|
| 129 |
+
and (ii) that the conditional densities of the context vectors have all their mass concentrated on $\boldsymbol { h } _ { i }$ , that is they collapse onto the single point, $\boldsymbol { h } _ { i }$ :
|
| 130 |
+
|
| 131 |
+
$$
|
| 132 |
+
p ( \pmb { c } _ { t } | z _ { t } ^ { i } = 1 ; \mathcal { D } ) = \delta ( \pmb { h } _ { i } )
|
| 133 |
+
$$
|
| 134 |
+
|
| 135 |
+
Indeed, by combining (13) - (15), we yield:
|
| 136 |
+
|
| 137 |
+
$$
|
| 138 |
+
p ( \boldsymbol { c } _ { t } ; \mathcal { D } ) = \sum _ { i = 1 } ^ { N } a _ { t } ^ { i } \delta ( \boldsymbol { h } _ { i } )
|
| 139 |
+
$$
|
| 140 |
+
|
| 141 |
+
whence we obtain (3) with probability 1.
|
| 142 |
+
|
| 143 |
+
Thus, our approach replaces the simplistic conditional density expression (15) with a more appropriate family $p ( \pmb { \theta } ( h _ { i } ) )$ , as in (13). Based on the literature of AVI, e.g. (Jimenez Rezende & Mohamed, 2015; Kingma & Welling, 2013; Sønderby et al., 2016), we posit that such a stochastic latent variable consideration may result in significant advantages for the postulated seq2seq model. Specifically, our trained model becomes more agile in searching for effective context representations, as opposed to getting trapped to poor local solutions.
|
| 144 |
+
|
| 145 |
+
In the following, we examine conditional densities of Gaussian form. Adopting the inferential rationale of AVI, we consider that these conditional Gaussians are parameterized via the postulated BiLSTM encoder. Specifically, we assume:
|
| 146 |
+
|
| 147 |
+
$$
|
| 148 |
+
p ( \pmb { c } _ { t } | z _ { t } ^ { i } = 1 ; \mathcal { D } ) = \mathcal { N } \big ( \pmb { c } _ { t } | \pmb { h } _ { i } , \mathrm { d i a g } ( \pmb { \sigma } ^ { 2 } ( \pmb { h } _ { i } ) ) \big )
|
| 149 |
+
$$
|
| 150 |
+
|
| 151 |
+
where
|
| 152 |
+
|
| 153 |
+
$$
|
| 154 |
+
\log \sigma ^ { 2 } ( h ) = \mathrm { R e L U } ( h )
|
| 155 |
+
$$
|
| 156 |
+
|
| 157 |
+
ReLU(·) is a trainable ReLU layer of size $\dim ( h )$ , and the encodings, $\boldsymbol { h } _ { i }$ , are obtained from a BiLSTM encoder, similar to conventional models. Hence:
|
| 158 |
+
|
| 159 |
+
$$
|
| 160 |
+
p ( { c } _ { t } ; \mathcal { D } ) = \sum _ { i = 1 } ^ { N } a _ { t } ^ { i } \mathcal { N } \big ( c _ { t } | h _ { i } , \mathrm { d i a g } ( \sigma ^ { 2 } ( h _ { i } ) ) \big )
|
| 161 |
+
$$
|
| 162 |
+
|
| 163 |
+
Thus, we have arrived at an approximate (variational) posterior expression for the context vectors, $\mathbf { } _ { c _ { t } }$ . In our variational treatment, both the component-conditional means, $\boldsymbol { h } _ { i }$ , and their variances, $\sigma ^ { 2 } ( h _ { i } )$ , are obtained from (amortizing) neural networks presented with the source sequences. On the other hand, though, the assignment probabilities, $\pi _ { t } ^ { i }$ , in the variational posterior are taken as the attention probabilities, $a _ { t } ^ { i }$ . Thus, they are determined by the target sequences, which are generated from the decoder of the model. Hence, our treatment represents a valid approximate posterior formulation, overall conditioned on both the source and target sequences.
|
| 164 |
+
|
| 165 |
+
This concludes the formulation of ACVI.
|
| 166 |
+
|
| 167 |
+
Relation to Recent Work. From the above exhibition, it becomes apparent that our approach generalizes the concept of neural attention by introducing stochasticity in the computation of context vectors. As we have already discussed, the ultimate goal of this construction is to allow for inferring representations of better generalization capacity, by leveraging Bayesian inference arguments.
|
| 168 |
+
|
| 169 |
+
We emphasize that this is in stark contrast to recent efforts toward generalizing neural attention by deriving more complex attention distributions. For instance, (Kim et al., 2017) have recently introduced structured attention. In that work, the model infers complex posterior probabilities over the assignment latent variables, as opposed to using a simplistic gating function. Specifically, instead of considering independent assignments, they postulate the first-order Markov dynamics assumption:
|
| 170 |
+
|
| 171 |
+
$$
|
| 172 |
+
p ( \{ \boldsymbol { z } _ { t } \} _ { t = 1 } ^ { T } ; \mathcal { D } ) = p ( \boldsymbol { z } _ { 1 } ; \mathcal { D } ) \prod _ { t = 1 } ^ { T - 1 } p ( \boldsymbol { z } _ { t + 1 } | \boldsymbol { z } _ { t } ; \mathcal { D } )
|
| 173 |
+
$$
|
| 174 |
+
|
| 175 |
+
Thus, (Kim et al., 2017) compute posterior distributions over the attention assignments, while ACVI provides a method for obtaining improved representations through the inferred context vectors. Note also that Eq. (20) gives rise to the need of executing much more computationally complex algorithms to perform attention distribution inference, e.g. the forward-backward algorithm (Rabiner, 1989). In contrast, our method imposes computational costs comparable to conventional SA.
|
| 176 |
+
|
| 177 |
+
Similar is the innovation in the variational attention method, recently presented (Deng et al., 2018). In essence, its key conceptual difference from structured attention is the consideration of full independence between the attention assignments $\{ z _ { t } \} _ { t = 1 } ^ { T }$ . Among the several alternatives considered in (Deng et al., 2018) to obtain stochastic gradient estimators of low variance, it was found that an approach using REINFORCE (Williams, 1992) along with a specialized baseline was effective.
|
| 178 |
+
|
| 179 |
+
Another noteworthy recent work, closer related to ACVI, is the variational encoder-decoder (VED) method presented in (Bahuleyan et al., 2018). Among the several alternative formulations considered in that paper, the one that clearly outperformed the baselines in terms of the obtained accuracy (BLEU scores) combined seq2seq models with SA with an extra variational autoencoder (VAE) module. This way, apart from the context vector, which is computed under the standard SA scheme, an additional latent vector $\boldsymbol { \xi }$ is essentially inferred. The imposed prior over it is a standard $\mathcal { N } ( \mathbf { 0 } , \pmb { I } )$ , while the inferred posterior is a diagonal Gaussian parameterised by a BiLSTM network presented with the input sequence; the final BiLSTM state vector is presented to dense layers that output the posterior means and variances of the latent vectors $\boldsymbol { \xi }$ . Both the context vector, $^ c$ , as well as the latent vectors, $\boldsymbol { \xi }$ , are fed to the final softmax layer of the model that yields the generated output symbols.
|
| 180 |
+
|
| 181 |
+
We shall provide comparisons to all these related approaches in the experimental section of our paper.
|
| 182 |
+
|
| 183 |
+
Training Algorithm. To perform training of a seq2seq model equipped with the ACVI mechanism, we resort to maximization of the resulting evidence lower-bound (ELBO) expression. To this end, we need first to introduce some prior assumption over the context latent variables, $\mathbf { } c _ { t }$ . To serve the purpose of simplicity, and also offer a valid way to effect model regularization, we consider:
|
| 184 |
+
|
| 185 |
+
$$
|
| 186 |
+
p ( \pmb { c } _ { t } ) = \mathcal { N } \big ( \pmb { c } _ { t } | \mathbf { 0 } , I \big )
|
| 187 |
+
$$
|
| 188 |
+
|
| 189 |
+
On the grounds of these assumptions, it is easy to show that the resulting ELBO expression becomes:
|
| 190 |
+
|
| 191 |
+
$$
|
| 192 |
+
\mathcal { L } = \sum _ { t } \left\{ \mathbb { E } _ { p ( \boldsymbol { c } _ { t } ; \mathcal { D } ) } [ - J _ { t } ] - \mathrm { K L } [ p ( \boldsymbol { c } _ { t } ; \mathcal { D } ) | | p ( \boldsymbol { c } _ { t } ) ] \right\}
|
| 193 |
+
$$
|
| 194 |
+
|
| 195 |
+
In this expression, $\mathbb { E } _ { p ( \pmb { c } _ { t } ; \mathcal { D } ) } [ - J _ { t } ]$ is the posterior expectation of the model log-likelihood, which is an integral part of the ELBO definition. In the following, we approximate all the entailed ELBO terms by drawing MC samples from the context vector posterior. In this work, we are dealing with a one-out-of-many predictive selection; hence, the model likelihood is a simple Categorical. As such, $\mathbb { E } _ { p ( \pmb { c } _ { t } ; \mathcal { D } ) } [ - J _ { t } ]$ essentially reduces to the negative categorical cross-entropy of the model, averaged over multiple MC samples of the context vectors, drawn from (19). Besides, to ensure that the resulting MC estimators will be of low variance, we adopt the reparameterization trick. To this end, we rely on the posterior expressions (17) and (14); we express the drawn MC samples as follows:
|
| 196 |
+
|
| 197 |
+
Table 1: Abstractive Document Summarization: Scores on the test set.
|
| 198 |
+
|
| 199 |
+
<table><tr><td rowspan=2 colspan=1>Method</td><td rowspan=1 colspan=3>ROUGE</td><td rowspan=1 colspan=2>METEOR</td></tr><tr><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>L</td><td rowspan=1 colspan=1>ExactMatch</td><td rowspan=1 colspan=1>+ stem/syn/para</td></tr><tr><td rowspan=2 colspan=1>seq2seq with SApointer-generator + coverage: SA</td><td rowspan=1 colspan=1>31.33</td><td rowspan=1 colspan=1>11.81</td><td rowspan=1 colspan=1>28.83</td><td rowspan=1 colspan=1>12.03</td><td rowspan=1 colspan=1>13.20</td></tr><tr><td rowspan=1 colspan=1>39.53</td><td rowspan=1 colspan=1>17.28</td><td rowspan=1 colspan=1>36.38</td><td rowspan=1 colspan=1>17.32</td><td rowspan=1 colspan=1>18.72</td></tr><tr><td rowspan=1 colspan=1>transformer</td><td rowspan=1 colspan=1>24.40</td><td rowspan=1 colspan=1>5.89</td><td rowspan=1 colspan=1>17.60</td><td rowspan=1 colspan=1>10.38</td><td rowspan=1 colspan=1>10.72</td></tr><tr><td rowspan=1 colspan=1>pointer-generator + coverage:structured attention</td><td rowspan=1 colspan=1>40.12</td><td rowspan=1 colspan=1>17.61</td><td rowspan=1 colspan=1>36.74</td><td rowspan=1 colspan=1>17.38</td><td rowspan=1 colspan=1>18.93</td></tr><tr><td rowspan=1 colspan=1>pointer-generator + coverage:variational attention</td><td rowspan=1 colspan=1>40.04</td><td rowspan=1 colspan=1>17.37</td><td rowspan=1 colspan=1>36.45</td><td rowspan=1 colspan=1>17.14</td><td rowspan=1 colspan=1>18.66</td></tr><tr><td rowspan=1 colspan=1>pointer-generator+coverage:VED</td><td rowspan=1 colspan=1>41.28</td><td rowspan=1 colspan=1>18.05</td><td rowspan=1 colspan=1>38.12</td><td rowspan=1 colspan=1>17.63</td><td rowspan=1 colspan=1>18.87</td></tr><tr><td rowspan=1 colspan=1>pointer-generator+coverage:ACVI</td><td rowspan=1 colspan=1>42.71</td><td rowspan=1 colspan=1>19.24</td><td rowspan=1 colspan=1>39.05</td><td rowspan=1 colspan=1>18.47</td><td rowspan=1 colspan=1>20.09</td></tr></table>
|
| 200 |
+
|
| 201 |
+
$$
|
| 202 |
+
c _ { t } ^ { ( k ) } = \sum _ { i = 1 } ^ { N } z _ { t i } ^ { ( k ) } c _ { t i } ^ { ( k ) }
|
| 203 |
+
$$
|
| 204 |
+
|
| 205 |
+
In this expression, the c(k)ti are samples from the conditional Gaussians (17), which employ the standard reparameterization trick rationale, as applied to Gaussian variables:
|
| 206 |
+
|
| 207 |
+
$$
|
| 208 |
+
{ \boldsymbol { c } } _ { t i } ^ { ( k ) } = h _ { i } + \sigma ( h _ { i } ) \circ \epsilon _ { t i } ^ { ( k ) } , \ \epsilon \sim \mathcal { N } ( \mathbf { 0 } , I )
|
| 209 |
+
$$
|
| 210 |
+
|
| 211 |
+
On the other hand, the z(k)ti are samples from the Categorical distribution (14). To allow for performing backpropagation through these samples, while ensuring that the obtained gradients will be of low variance, we may draw $z _ { t i } ^ { ( k ) }$ by making use of the Gumbel-Softmax relaxation (Jang et al., 2017). We have empirically found it suffices that we employ the Gumbel-Softmax trick for the last $10 \%$ of the model training iterations1; previously, we merely adopt the following heuristic, without any statistically significant performance deviation: We use a simple weighted average of the samples $\mathbf { \Delta } _ { c _ { t i } } ^ { ( k ) }$ , with the weights being the attention probabilities, $a _ { t } ^ { i }$ :
|
| 212 |
+
|
| 213 |
+
$$
|
| 214 |
+
\boldsymbol { c } _ { t } ^ { ( k ) } \gets \sum _ { i = 1 } ^ { N } a _ { t } ^ { i } \boldsymbol { c } _ { t i } ^ { ( k ) }
|
| 215 |
+
$$
|
| 216 |
+
|
| 217 |
+
This way, we alleviate the computational costs of employing the Gumbel-Softmax relaxation, which dominates the costs of sampling from the mixture posterior (19).
|
| 218 |
+
|
| 219 |
+
Having obtained a reparameterization of the model ELBO that guarantees low variance estimators, we proceed to its maximization by resorting to a modern, off-the-shelf, stochastic gradient optimizer. Specifically, we adopt simple stochastic gradient descent (SGD) for the MT tasks, and Adam with its default settings (Kingma & Ba, 2015) for the rest.
|
| 220 |
+
|
| 221 |
+
Inference Algorithm. To perform target decoding by means of a seq2seq model that employs the ACVI mechanism, we resort to Beam search (Russel & Norvig). In our experiments, Beam width is set to five for the ADS and VC tasks (Sections 4.1 and 4.2), and to ten for the MT tasks (Section 4.3).
|
| 222 |
+
|
| 223 |
+
# 4 EXPERIMENTAL EVALUATION2
|
| 224 |
+
|
| 225 |
+
# 4.1 ABSTRACTIVE DOCUMENT SUMMARIZATION
|
| 226 |
+
|
| 227 |
+
Our experiments are based on the non-anonymized CNN/Daily Mail dataset, similar to the experiments of (See et al., 2017). To obtain some comparative results, we use pointer-generator networks as our evaluation platform (See et al., 2017); therein, we employ our ACVI mechanism, the standard SA mechanism used in (See et al., 2017), VED (Bahuleyan et al., 2018), variational attention (Deng et al., 2018), as well as structured attention using the first-order Markov assumption (20) (Kim et al., 2017). The observations presented to the encoder modules constitute 128-dimensional word embeddings of the original 50K-dimensional one-hot-vectors of the source tokens. Similarly, the observations presented to the decoder modules are 128-dimensional word embeddings pertaining to the summary tokens (reference tokens during training; generated tokens during inference). Both these embeddings are trained, as part of the overall training procedure of the evaluated models. To allow for faster training convergence, we split training into five phases, as suggested in (See et al., 2017). Following the suggestions in (See et al., 2017), we evaluate all approaches with LSTMs that comprise 256-dimensional states and do not employ Dropout. We have tested VED with various selections of the dimensionality of the autoencoder latent vectors, $\boldsymbol { \xi }$ ; we report results with 128-dimensional latent vectors, which yielded the best performance in our experiments3.
|
| 228 |
+
|
| 229 |
+
Table 2: Abstractive Document Summarization: Novel words generation rate and OOV words adoption rate obtained by using pointer-generator networks.
|
| 230 |
+
|
| 231 |
+
<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>SA</td><td rowspan=1 colspan=1>Structured Attention</td><td rowspan=1 colspan=1>Variational Attention</td><td rowspan=1 colspan=1>VED</td><td rowspan=1 colspan=1>ACVI</td></tr><tr><td rowspan=1 colspan=1>RateofNovel Words</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.12</td><td rowspan=1 colspan=1>0.38</td></tr><tr><td rowspan=1 colspan=1>Rate of OOVWordsAdoption</td><td rowspan=1 colspan=1>1.16</td><td rowspan=1 colspan=1>1.18</td><td rowspan=1 colspan=1>1.18</td><td rowspan=1 colspan=1>1.21</td><td rowspan=1 colspan=1>1.25</td></tr></table>
|
| 232 |
+
|
| 233 |
+
Table 3: Video Captioning: Performance of the considered alternatives.
|
| 234 |
+
|
| 235 |
+
<table><tr><td rowspan=1 colspan=1>Method</td><td rowspan=1 colspan=1>ROUGE:Valid. Set</td><td rowspan=1 colspan=1>ROUGE:Test Set</td><td rowspan=1 colspan=1>CIDEr:Valid.Set</td><td rowspan=1 colspan=1>CIDEr: Test Set</td></tr><tr><td rowspan=1 colspan=1>SA</td><td rowspan=1 colspan=1>0.5628</td><td rowspan=1 colspan=1>0.5701</td><td rowspan=1 colspan=1>0.4575</td><td rowspan=1 colspan=1>0.421</td></tr><tr><td rowspan=1 colspan=1>Structured Attention</td><td rowspan=1 colspan=1>0.5804</td><td rowspan=1 colspan=1>0.5712</td><td rowspan=1 colspan=1>0.5071</td><td rowspan=1 colspan=1>0.4283</td></tr><tr><td rowspan=1 colspan=1>Variational Attention</td><td rowspan=1 colspan=1>0.5809</td><td rowspan=1 colspan=1>0.5716</td><td rowspan=1 colspan=1>0.5103</td><td rowspan=1 colspan=1>0.4289</td></tr><tr><td rowspan=1 colspan=1>VED</td><td rowspan=1 colspan=1>0.5839</td><td rowspan=1 colspan=1>0.5749</td><td rowspan=1 colspan=1>0.5421</td><td rowspan=1 colspan=1>0.4298</td></tr><tr><td rowspan=1 colspan=1>ACVI</td><td rowspan=1 colspan=1>0.5968</td><td rowspan=1 colspan=1>0.5766</td><td rowspan=1 colspan=1>0.6039</td><td rowspan=1 colspan=1>0.4375</td></tr></table>
|
| 236 |
+
|
| 237 |
+
Finally, for completeness sake, we also evaluate the Transformer network (Vaswani et al., 2017), which is a popular alternative to seq2seq models with SA, based on the notion of self-attention. Following Fevry (2018), Transformer is evaluated with 256-dimensional word embeddings, 4 encoding and decoding layers of 256 units each, 4 heads, and a Dropout rate of 0.2.
|
| 238 |
+
|
| 239 |
+
We use ROUGE4 (Lin, 2004) and METEOR5 (Denkowski & Lavie, 2014) as our performance metrics. METEOR is evaluated both in exact match mode (rewarding only exact matches between words) and full mode (additionally rewarding matching stems, synonyms and paraphrases). In all our experiments, we restrict the used vocabulary to the 50K most common words in the considered dataset, similar to (See et al., 2017). Note that this is significantly smaller than typical in the literature (Nallapati et al., 2016). Our quantitative evaluation is provided in Table 1. Some indicative examples of generated summaries can be found in Appendix A (Tables 7-10).
|
| 240 |
+
|
| 241 |
+
As we observe, utilization of ACVI outperforms all the alternatives by a large margin. It is also interesting that the Transformer network yields the lowest performance among the considered alternatives; the obtained results are actually very poor. This is commensurate with the results reported by other researchers, e.g. Fevry (2018).
|
| 242 |
+
|
| 243 |
+
Finally, it is interesting to examine whether ACVI increases the propensity of a trained model towards generating novel words, that is words that are not found in the source document, as well as the capacity to adopt OOV words. The related results are provided in Table 2. We observe that ACVI increases the number of generated novel words by 3 times compared to the best performing alternative, that is VED (Bahuleyan et al., 2018). In a similar vein, ACVI appears to help the model better cope with OOV words.
|
| 244 |
+
|
| 245 |
+
Table 4: Translation results on the (En, Vi) and (En, Ro) pairs.
|
| 246 |
+
|
| 247 |
+
<table><tr><td rowspan=1 colspan=3></td><td rowspan=1 colspan=8>BLEU</td></tr><tr><td rowspan=1 colspan=3>Source->Target Language</td><td rowspan=1 colspan=2>En→Vi</td><td rowspan=1 colspan=2>Vi-→En</td><td rowspan=1 colspan=2>En-→Ro</td><td rowspan=1 colspan=2>Ro→En</td></tr><tr><td rowspan=5 colspan=1></td><td rowspan=5 colspan=2>BaselineStructured Attention</td><td rowspan=1 colspan=1>dev</td><td rowspan=1 colspan=1>test</td><td rowspan=1 colspan=1>dev</td><td rowspan=1 colspan=1>test</td><td rowspan=1 colspan=1>dev</td><td rowspan=1 colspan=1>test</td><td rowspan=1 colspan=1>dev</td><td rowspan=1 colspan=1>test</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>23.21</td><td rowspan=1 colspan=1>25.18</td><td rowspan=1 colspan=1>20.89</td><td rowspan=1 colspan=1>23.28</td><td rowspan=1 colspan=1>12.87</td><td rowspan=1 colspan=1>14.40</td><td rowspan=1 colspan=1>15.87</td><td rowspan=1 colspan=1>15.78</td></tr><tr><td rowspan=7 colspan=2>Structured AttentionVariational AttentionVEDACVITransformer</td><td rowspan=3 colspan=1>ntion</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td rowspan=1 colspan=1>ion</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td rowspan=1 colspan=1>23.81</td><td rowspan=1 colspan=1>25.00</td><td rowspan=1 colspan=1>21.19</td><td rowspan=1 colspan=1>23.08</td><td rowspan=1 colspan=1>14.04</td><td rowspan=1 colspan=1>15.08</td><td rowspan=1 colspan=1>17.02</td><td rowspan=1 colspan=1>17.68</td></tr><tr><td rowspan=4 colspan=1>Method</td><td rowspan=1 colspan=1>23.48</td><td rowspan=1 colspan=1>25.54</td><td rowspan=1 colspan=1>21.13</td><td rowspan=1 colspan=1>23.61</td><td rowspan=1 colspan=1>14.02</td><td rowspan=1 colspan=1>15.51</td><td rowspan=1 colspan=1>17.49</td><td rowspan=1 colspan=1>17.40</td></tr><tr><td rowspan=1 colspan=1>24.47</td><td rowspan=1 colspan=1>25.31</td><td rowspan=1 colspan=1>21.32</td><td rowspan=1 colspan=1>23.80</td><td rowspan=1 colspan=1>12.84</td><td rowspan=1 colspan=1>12.76</td><td rowspan=1 colspan=1>15.18</td><td rowspan=1 colspan=1>15.56</td></tr><tr><td rowspan=1 colspan=1>24.08</td><td rowspan=1 colspan=1>26.16</td><td rowspan=1 colspan=1>21.26</td><td rowspan=1 colspan=1>24.47</td><td rowspan=1 colspan=1>14.15</td><td rowspan=1 colspan=1>15.78</td><td rowspan=1 colspan=1>18.07</td><td rowspan=1 colspan=1>17.78</td></tr><tr><td rowspan=1 colspan=1>24.34</td><td rowspan=1 colspan=1>25.68</td><td rowspan=1 colspan=1>21.40</td><td rowspan=1 colspan=1>23.92</td><td rowspan=1 colspan=1>13.90</td><td rowspan=1 colspan=1>15.30</td><td rowspan=1 colspan=1>17.66</td><td rowspan=1 colspan=1>17.91</td></tr></table>
|
| 248 |
+
|
| 249 |
+
# 4.2 VIDEO CAPTIONING
|
| 250 |
+
|
| 251 |
+
Our evaluation of the proposed approach in the context of a VC application is based on the Youtube2Text video corpus (Yao et al., 2015). We split the available dataset into a training set comprising the first 1,200 video clips, a validation set composed of 100 clips, and a test set comprising the last 600 clips in the dataset. To reduce the entailed memory requirements, we process only the first 240 frames of each video. To obtain some initial video frame descriptors, we employ a pretrained GoogLeNet CNN (Szegedy et al., 2015) (implementation provided in Caffe (Jia et al., 2014)). Specifically, we use the features extracted at the pool5/7x7_s1 layer of this pretrained model. We select 24 equally-spaced frames out of the first 240 from each video, and feed them into the prescribed CNN to obtain a 1024 dimensional frame-wise feature vector. These are the visual inputs presented to the trained models. All employed LSTMs entail 1000-dimensional states. These are mapped to 100-dimensional features via the matrices $W _ { h }$ and $W _ { s }$ in Eq. (1). The autoencoder latent variables, $\boldsymbol { \xi }$ , of VED are also selected to be 100-dimensional vectors. The decoders are presented with 256-dimensional word embeddings, obtained in a fashion similar to our ADS experiments. In all cases, we use Dropout with a rate of 0.5.
|
| 252 |
+
|
| 253 |
+
We yield some comparative results by evaluating seq2seq models configured as described in Section 2.2; we use ACVI, structured attention in the form (20), VED, variational attention, or the conventional SA mechanism. Our quantitative evaluation is performed on the grounds of the ROUGE-L and CIDEr (Vedantam et al., 2015) scores, on both the validation set and the test set. The obtained results are depicted in Table 3; they show that our method outperforms the alternatives by an important margin. It is also characteristic that Structured Attention yields essentially identical results with Variational Attention. Thus, the first-order Markovian assumption does not offer practical benefits when generating short sequences like the ones involved in VC. Finally, we provide some indicative examples of the generated results in Appendix B (Figs. 1-8).
|
| 254 |
+
|
| 255 |
+
# 4.3 MACHINE TRANSLATION
|
| 256 |
+
|
| 257 |
+
Our experiments make use of publicly available corpora, namely WMT’16 English-to-Romanian $( \mathrm { E n \to R o } )$ and Romanian-to-English $( \mathrm { R o } \to \mathrm { E n } ) ,$ ), as well as IWSLT’15 English-to-Vietnamese $( \mathrm { E n \to V i } )$ ) and Vietnamese-to-English $( { \mathrm { V i } } \to { \mathrm { E n } } )$ ). We benchmark the evaluated models against word-based vocabularies, and present our results in terms of the BLEU score (Papineni et al., 2002).
|
| 258 |
+
|
| 259 |
+
Following the related literature, we utilize byte pair encoding (BPE) (Sennrich et al., 2016) in the case of the (En, Ro) pair. This allows for seamlessly handling rare words, by breaking a given vocabulary into a fixed-size vocabulary of variable-length character sequences (subwords). Subword vocabularies are shared among the languages of a source/destination pair. This way, we promote frequent subword units, thus improving the coverage of the available dictionary words.
|
| 260 |
+
|
| 261 |
+
We obtain some comparative performance results by evaluating seq2seq models using ACVI, conventional SA, structured attention, as well as both the variational alternatives (Bahuleyan et al., 2018; Deng et al., 2018) discussed in Section 3. The trained architecture is homogeneous across all our comparisons. Specifically, both the encoders and the decoders of the evaluated models are presented with 256-dimensional trainable word embeddings. We utilize 2-layer BiLSTM encoders, and 2-layer LSTM decoders; all comprise 256-dimensional hidden states on each layer, similar to the summarization task, and employ a Dropout rate of 0.2. For VED, we employ 100-dimensional latent variables $\boldsymbol { \xi }$ , following Bahuleyan et al. (2018). Finally, we also provide the performance of the
|
| 262 |
+
|
| 263 |
+
Table 5: Abstractive Document Summarization: Domain Adaptation Performance on DUC2004.
|
| 264 |
+
|
| 265 |
+
<table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>ROUGE-1</td><td rowspan=1 colspan=1>ROUGE-2</td><td rowspan=1 colspan=1>ROUGE-L</td></tr><tr><td rowspan=1 colspan=1>SA</td><td rowspan=1 colspan=1>27.02</td><td rowspan=1 colspan=1>7.44</td><td rowspan=1 colspan=1>22.69</td></tr><tr><td rowspan=1 colspan=1>Variational Attention</td><td rowspan=1 colspan=1>27.65</td><td rowspan=1 colspan=1>7.58</td><td rowspan=1 colspan=1>23.50</td></tr><tr><td rowspan=1 colspan=1>VED</td><td rowspan=1 colspan=1>30.68</td><td rowspan=1 colspan=1>9.97</td><td rowspan=1 colspan=1>27.02</td></tr><tr><td rowspan=1 colspan=1>ACVI</td><td rowspan=1 colspan=1>32.09</td><td rowspan=1 colspan=1>10.88</td><td rowspan=1 colspan=1>28.14</td></tr></table>
|
| 266 |
+
|
| 267 |
+
Transformer network. The trained Transformer network comprises 4 heads, 4 encoder/decoder layers of 256 units, and a Dropout rate of 0.1.
|
| 268 |
+
|
| 269 |
+
Our results in Table 4 show inferior performance for our variational inference-based competitors. We observe that VED is competitive to ACVI in two of the four development sets, but fails to generalize as well across test sets. Some indicative examples of generated outputs from the considered variational alternatives are provided in Appendix C, Tables 11-16.
|
| 270 |
+
|
| 271 |
+
# 4.4 FURTHER INVESTIGATION: DOMAIN ADAPTATION
|
| 272 |
+
|
| 273 |
+
Finally, we wish to examine the capability of ACVI to generalize across domains. We have already elaborated on our expectation that modeling the context vectors as latent random variables should yield improved generalization performance. We attribute to this fact the improved accuracy ACVI obtained in our experimental evaluations. However, if this is the case, one would probably expect the method to also generalize better across different domains.
|
| 274 |
+
|
| 275 |
+
To investigate this aspect, we use the trained ADS models described in Section 4.1 to generate summaries for the documents of the DUC2004 dataset 6. This is an English dataset comprising 500 documents. Each document contains 4 model summaries written by experts. In Table 5, we show how our method performs in this setting, and how it compares to the alternative variational methods considered in Section 4.1. We observe that ACVI yields a clear improvement over the alternatives, while all variational methods perform significantly better than baseline SA. These findings seem to support our theoretical intuitions.
|
| 276 |
+
|
| 277 |
+
# 5 CONCLUSIONS
|
| 278 |
+
|
| 279 |
+
In this work, we cast the problem of context vector computation for seq2seq-type models employing SA into amortized variational inference. We made this possible by considering that the sought context vectors are latent variables following a Gaussian mixture posterior; therein, the mixture component densities depend on the source sequence encodings, while the mixture weights depend on the target sequence attention probabilities. We exhibited the merits of our approach on seq2seq architectures addressing ADS, VC, and MT tasks; we used benchmark datasets in all cases.
|
| 280 |
+
|
| 281 |
+
We underline that our approach induces only negligible computational overheads compared to conventional SA. Specifically, the only extra trainable parameters that our approach postulates stem from Eq. (17); these are of extremely limited size compared to the overall model size, and correspond to merely few extra feedforward computations at inference time. Besides, our sampling strategy does not induce significant computational costs, since we adopt the reparameterization (25) for the most part of the model training algorithm. In the future, we aim to consider how ACVI can cope with power-law distributions (Chatzis & Demiris, 2012; Chatzis & Kosmopoulos, 2015); such a capacity is of importance to real-world natural language generation.
|
| 282 |
+
|
| 283 |
+
# REFERENCES
|
| 284 |
+
|
| 285 |
+
Martín Abadi et al. TensorFlow: Large-scale machine learning on heterogeneous systems, 2015. URL http://tensorflow.org/. Software available from tensorflow.org.
|
| 286 |
+
|
| 287 |
+
Hagai Attias. A variational baysian framework for graphical models. In Advances in neural information processing systems, pp. 209–215, 2000.
|
| 288 |
+
|
| 289 |
+
Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In Proc. ICLR, 2015.
|
| 290 |
+
|
| 291 |
+
Hareesh Bahuleyan, Lili Mou, Olga Vechtomova, and Pascal Poupart. Variational attention for sequence-to-sequence models. In Proc. COLING, 2018.
|
| 292 |
+
|
| 293 |
+
M. Cettolo, J. Niehues, S. Stuker, L. Bentivogli, R. Cattoni, and M. Federico. The IWSLT 2015 ¨ Evaluation Campaign. In Proc. IWSLT, 2015.
|
| 294 |
+
|
| 295 |
+
Sotirios P. Chatzis and Y. Demiris. Nonparametric mixtures of Gaussian processes with power-law behavior. IEEE Transactions on Neural Networks and Learning Systems, 23:1862–1871, Dec. 2012.
|
| 296 |
+
|
| 297 |
+
Sotirios P. Chatzis and Dimitrios Kosmopoulos. A Latent Manifold Markovian Dynamics Gaussian Process. IEEE Transactions on Neural Networks and Learning Systems, 25(1):70–83, 2015.
|
| 298 |
+
|
| 299 |
+
Yuntian Deng, Yoon Kim, Justin Chiu, Demi Guo, and Alexander M. Rush. Latent alignment and variational attention. In Proc. NIPS, 2018.
|
| 300 |
+
|
| 301 |
+
Michael Denkowski and Alon Lavie. METEOR universal: Language specific translation evaluation for any target language. In Proc. ACL Workshop on Statistical Machine Translation, 2014.
|
| 302 |
+
|
| 303 |
+
Thibault Fevry. Abstractive summarization OpenNMT, 2018. URL https://github.com/ Iwontbecreative/Abstractive-summarization-OpenNMT.
|
| 304 |
+
|
| 305 |
+
Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8): 1735–1780, 1997.
|
| 306 |
+
|
| 307 |
+
Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with Gumbel-Softmax. In Proc. ICLR, 2017.
|
| 308 |
+
|
| 309 |
+
Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S. Guadarrama, and T. Darrell. Caffe: Convolutional architecture for fast feature embedding. arXiv:1408.5093, 2014.
|
| 310 |
+
|
| 311 |
+
Danilo Jimenez Rezende and Shakir Mohamed. Variational inference with normalizing flows. In Proc. ICML, 2015.
|
| 312 |
+
|
| 313 |
+
Yoon Kim, Carl Denton, Luong Hoang, and Alexander M. Rush. Structured attention networks. In Proc. ICLR, 2017.
|
| 314 |
+
|
| 315 |
+
Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Proc. ICLR, 2015.
|
| 316 |
+
|
| 317 |
+
Diederik P Kingma and Max Welling. Auto-encoding variational bayes. In Proc. NIPS, 2013.
|
| 318 |
+
|
| 319 |
+
Chin-Yew Lin. Rouge: A package for automatic evaluation of summaries. Text Summarization Branches Out, 2004.
|
| 320 |
+
|
| 321 |
+
Minh-Thang Luong, Hieu Pham, and Christopher D Manning. Effective approaches to attention-based neural machine translation. In Proc. EMNLP, 2015.
|
| 322 |
+
|
| 323 |
+
Ramesh Nallapati, Bowen Zhou, Cicero Nogueira dos santos, Caglar Gulcehre, and Bing Xiang. Abstractive Text Summarization Using Sequence-to-Sequence RNNs and Beyond. In Proc. CoNLL, 2016.
|
| 324 |
+
|
| 325 |
+
K. Papineni, S. Roukos, T. Ward, and W.-J. Zhu. BLEU: a method for automatic evaluation of machine translation. In Proc. ACL, 2002.
|
| 326 |
+
|
| 327 |
+
L.R. Rabiner. A tutorial on hidden Markov models and selected applications in speech recognition. Proceedings of the IEEE, 77:245–255, 1989.
|
| 328 |
+
|
| 329 |
+
Alexander M Rush, Sumit Chopra, and Jason Weston. A neural attention model for abstractive sentence summarization. In Proc. EMNLP, 2015.
|
| 330 |
+
|
| 331 |
+
Stuart Russel and Peter Norvig. Artificial intelligence: A modern approach, 2003. EUA: Prentice Hall, 178.
|
| 332 |
+
|
| 333 |
+
Abigail See, Peter J. Liu, and Christopher D. Manning. Get to the point: Summarization with pointer-generator networks. In Proc. ACL, 2017.
|
| 334 |
+
Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. In Proc. ACL, 2016.
|
| 335 |
+
Casper Kaae Sønderby, Tapani Raiko, Lars Maaløe, Søren Kaae Sønderby, and Ole Winther. Ladder variational autoencoders. In Proc. NIPS, 2016.
|
| 336 |
+
Sainbayar Sukhbaatar, Jason Weston, et al. End-to-end memory networks. In Proc. NIPS, 2015.
|
| 337 |
+
Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In Proc. NIPS, 2014.
|
| 338 |
+
C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going deeper with convolutions. In Proc. CVPR, 2015.
|
| 339 |
+
Zhaopeng Tu, Zhengdong Lu, Yang Liu, Xiaohua Liu, and Hang Li. Modeling coverage for neural machine translation. In Proc. ACL, 2016.
|
| 340 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Proc. NIPS, 2017.
|
| 341 |
+
R. Vedantam, C. L. Zitnick, and D. Parikh. Cider: Consensus-based image description evaluation. In Proc. CVPR, 2015.
|
| 342 |
+
Ronald J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 8, 1992.
|
| 343 |
+
Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron Courville, Ruslan Salakhutdinov, Richard Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual attention. In Proc. ICML, 2016.
|
| 344 |
+
Li Yao, Atousa Torabi, Kyunghyun Cho, Nicolas Ballas, Christopher Pal, Hugo Larochelle, and Aaron Courville. Describing videos by exploiting temporal structure. In Proc. ICCV, 2015.
|
| 345 |
+
Wenyuan Zeng, Wenjie Luo, Sanja Fidler, and Raquel Urtasun. Efficient summarization with read-again and copy mechanism. Proc. ICLR, 2017.
|
| 346 |
+
|
| 347 |
+
Table 6: Abstractive Document Summarization: Training phases.
|
| 348 |
+
|
| 349 |
+
<table><tr><td rowspan=1 colspan=1>Phase</td><td rowspan=1 colspan=1>Iterations</td><td rowspan=1 colspan=1>Max encoding steps</td><td rowspan=1 colspan=1>Max decoding steps</td></tr><tr><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>0-71k</td><td rowspan=1 colspan=1>10</td><td rowspan=1 colspan=1>10</td></tr><tr><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>71k - 116k</td><td rowspan=1 colspan=1>50</td><td rowspan=1 colspan=1>50</td></tr><tr><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>116k - 184k</td><td rowspan=1 colspan=1>100</td><td rowspan=1 colspan=1>50</td></tr><tr><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>184k - 223k</td><td rowspan=1 colspan=1>200</td><td rowspan=1 colspan=1>50</td></tr><tr><td rowspan=1 colspan=1>5</td><td rowspan=1 colspan=1>223k-250k</td><td rowspan=1 colspan=1>400</td><td rowspan=1 colspan=1>100</td></tr></table>
|
| 350 |
+
|
| 351 |
+
# APPENDIX A
|
| 352 |
+
|
| 353 |
+
We provide some further details on the experimental setup of Section 4.1. To begin with, the used dataset comprises 287,226 training pairs of documents and reference summaries, 13,368 validation pairs, and 11,490 test pairs. In this dataset, the average article length is 781 tokens; the average summary length is 3.75 sentences, with the average summary being 56 tokens long.
|
| 354 |
+
|
| 355 |
+
To allow for faster training convergence, we split it into five phases, following See et al. (2017). On each phase, we employ a different number of maximum encoding steps for the evaluated models (i.e., the size of the inferred attention vectors), as well as for the maximum allowed number of decoding steps. We provide the related details in Table 6. During these phases, we train the employed models with the coverage mechanism being disabled; that is, we set $\pmb { w } _ { k } = \mathbf { 0 }$ . We enable this mechanism only after these five training phases conclude. Specifically, we perform a final 3K iterations of model training, during which we train the ${ \pmb w } _ { k }$ weights along with the rest of the model parameters.
|
| 356 |
+
|
| 357 |
+
In Tables 7-10, we provide some indicative examples of produced summaries. We also show what the initial document has been, as well as the available reference summary used for quantitative performance evaluation. In all cases, we annotate OOV words in italics, we highlight novel words in purple, we show contextual understanding in bold, while article fragments also included in the generated summary are highlighted in green.
|
| 358 |
+
|
| 359 |
+
Table 7: Example 223.
|
| 360 |
+
|
| 361 |
+
<table><tr><td>Article</td></tr><tr><td>lagos , nigeria -lrb- cnn -rrb- a day after winning nigeria 's presidency , muhammadu buhari told cnn 's christiane amanpour that he plans to aggressively fight corruption that has long plagued nigeria and go after the root of the nation ’s unrest . buhari said he 'll" rapidly give attention ” to curbing violence in the northeast part of nigeria ,where the terrorist group boko haram operates . by cooperating with neighboring nations chad ,cameroon and niger, he said his administration is confident it will be able to thwart criminals and others contributing to nigeria’s instability. for the first time in nigeria 's history , the opposition defeated the ruling party in democratic elections . buhari defeated incumbent goodluck jonathan by about 2 million votes , according to nigeria 's independent national electoral commission .the win comes after a long history of military rule , coups and botched attempts at democracy in africa 's most populous nation . in an exclusive live interview from abuja ,buhari told amanpour he was not concerned about reconciling the nation after a divisive campaign . he said now that he has been elected he will turn his focus to boko haram and“ plug holes ”in the“ corruption infrastructure”in the country.“ a new day and</td></tr><tr><td>a new nigeria are upon us ,”buhari said after his win tuesday .“ the victory is yours ,and the glory is that of our nation . earlier, jonathan phoned buhari to concede defeat . the outgoing president also offered a written statement to his nation .“i thank allnigerians once again for the</td></tr><tr><td>great opportunity i was given to lead this country ,and assure you that i will continue to do my best at the helm of national affairs until the end of my tenure ,” jonathan said .“ i promised the country free and fair elections . (...) ReferenceSummary</td></tr><tr><td>muhammadu buhari tells cnn 's christiane amanpour that he will fight corruption in nigeria . nigeria is the most populous country in africa and is grappling with violent boko haram extremists</td></tr><tr><td>. nigeria is also africa's biggest economy,but up to 7O % of nigerians live on less than a dollar a day. Generated Summary muhammadu buhari talks to cnn 's christiane amanpour about the nation 's unrest .for the</td></tr></table>
|
| 362 |
+
|
| 363 |
+
Table 8: Example 89.
|
| 364 |
+
|
| 365 |
+
<table><tr><td>Article</td></tr><tr><td>lrb- cnn -rrb- eyewitness video showing white north charleston police officer michael slager shooting to death an unarmed black man has exposed discrepancies in the reports of the first officers on the scene . slager has been fired and charged with murder in the death of 50-year-old walter scott . a bystander 's cell phone video , which began after an alleged struggle on the ground between slager and scot ,shows the five-year police veteran shooting at scott eight times as scott runs away . scott was hit five times . if words were exchanged between the men ,they 're are not audible on the tape . it ’s unclear what happened before scott ran ,or why he ran . the officer initially said that he used a taser on scot , who ,slager said ,tried to take the weapon . before slager opens fire ,the video shows a dark object falling behind scott and hiting the ground</td></tr><tr><td>. it 's unclear whether that is the taser .(...)</td></tr><tr><td>ReferenceSummary more questions than answers emerge in controversial s. c. police shooting . oficer michael slager</td></tr><tr><td>,charged with murder,was fired from the north charleston police department . Generated Summary</td></tr><tr><td>video shows white north charleston police offcer michael slager shooting to death . slager has been charged with murder in the death of 50-year-old walter scot . the video shows a dark object falling behind scott and hitting the ground .</td></tr></table>
|
| 366 |
+
|
| 367 |
+
Table 9: Example 1305.
|
| 368 |
+
|
| 369 |
+
<table><tr><td rowspan=1 colspan=1>Article</td></tr><tr><td rowspan=1 colspan=1> andy murray came close to giving himself some extra preparation time for his wedding nextweek before ensuring that he still has unfinished tennis business to attend to .the world no 4 is into the semi-finals of the miami open , but not before geting a scare from 21 year-old austriandominic thiem,who pushed him to 4-4 in the second set before going down 3-6 6-4,6-1 in an hour and three quarters . murray was awaiting the winner from the last eight match betweentomas berdych and argentina 's juan monaco . prior to this tournament thiem lost in the secondround of a challenger event to soon-to-be new brit aljaz bedene . andy murray pumps his firstafter defeating dominic thiem to reach the miami open semi finals . muray throws his sweatband into the crowd after completing a 3-6 , 6-4 , 6-1 victory in florida . murray shakes hands withthiem who he described as a‘ strong guy ’after the game . (..)</td></tr><tr><td rowspan=1 colspan=1>ReferenceSummary</td></tr><tr><td rowspan=1 colspan=1>british no 1 defeated dominic thiem in miami open quarter finals . andy murray celebrated his500th career win in the previous round . third seed will play the winner of tomas berdych and juan monaco in the semi finals of the atp masters 1OoO event in key biscayne</td></tr><tr><td rowspan=1 colspan=1>Generated Summary</td></tr><tr><td rowspan=1 colspan=1>the world no 4 is into the semi-finals of the miami open . murray is still ahead of his careerthrough the season .andy murray was awaiting the winner from the last eight match .murraythrows his sweatband into the crowd after a 6-4 6-1 victory in florida .</td></tr></table>
|
| 370 |
+
|
| 371 |
+
Table 10: Example 1710.
|
| 372 |
+
|
| 373 |
+
<table><tr><td>Article</td></tr><tr><td>steve clarke afforded himself a few smiles on the touchline and who could blame him ? this has been a strange old season for reading ,who are one win away from an fa cup semi-final against arsenal but have spent too long being too close to a championship relegation batle .at least this win will go some way to easing that load . they made it hard for themselves , but they had an in-form player in jamie mackie who was able to get the job done . he put reading in front in the first half and then scored a briliant winner just moments after chris o'grady had levelled with a penalty -- one of the only legitimate chances brighton had all night ,even if clarke was angry about the decision . reading frontman jamie mackie fires the royals ahead against brighton in tuesday 's championship fixture . mackie -lrb- centre -rrb- is congratulated by nathaniel chalobah and garath mccleary after neting reading 's opener . reading -lrb- 4-1-3-2 -rrb- : federici ; gunter ,hector,cooper,chalobah ; akpan ; mcleary,williams -lrb- keown 92 -rrb-,robson-kanu -lrb- pogrebnyak 76 -rrb- ; blackman ,mackie -lrb- norwood 79 -rrb- . subs not used : cox,yakubu,</td></tr><tr><td>andersen,taylor.scorer : mackie,24,56.booked : mcleary,pogrebnyak .brighton -lrb-4-3-3 -rrb- :stockdale ; halford,greer,dunk,bennet ; ince -lrb-best 75 -rrb-,kayal,forster-caskey; ledesma -lrb- bruno 86 -rrb-,o'grady,lualua .subs not used :ankergren,calderon,hughes ,</td></tr><tr><td>holla ,teixeira .scorer : o'grady -lrb- pen -rrb-,53 . booked : ince ,dunk ,bennett, greer . ref : andy haines .attendance : 14,748 .ratings by riath al-samarrai .(...)</td></tr><tr><td>ReferenceSummary reading are now 13 points above the championship drop zone .frontman jamie mackie scored twice to earn royals all three points .chris o'grady scored for chris hughton 's brighton from the</td></tr><tr><td>penalty spot . niall keown - son of sportsmail columnist martin - made reading debut . Generated Summary jamie mackie opened the scoring against brighton in tuesday 's championship fixture</td></tr></table>
|
| 374 |
+
|
| 375 |
+
# APPENDIX B
|
| 376 |
+
|
| 377 |
+
The considered Video Captioning task utilizes a dataset that comprises 1,970 video clips, each associated with multiple natural language descriptions. This results in a total of approximately 80,000 video / description pairs; the used vocabulary comprises approximately 16,000 unique words. The constituent topics cover a wide range of domains, including sports, animals and music. We preprocess the available descriptions only using the wordpunct tokenizer from the NLTK toolbox7.
|
| 378 |
+
|
| 379 |
+
Moving on, we provide some characteristic examples of generated video descriptions. In the captions of the figures that follow, we annotate minor deviations with blue color, and use red color to indicate major mistakes which imply wrong perception of the scene.
|
| 380 |
+
|
| 381 |
+

|
| 382 |
+
|
| 383 |
+

|
| 384 |
+
|
| 385 |
+
Figure 1: ACVI: a man is firing a gun VED: a man is firing a gun
|
| 386 |
+
Structured Attention: a man is firing a gun
|
| 387 |
+
Variational Attention: a man is firing a gun SA: a man is firing a gun Reference Description: a man is firing a gun at targets
|
| 388 |
+
|
| 389 |
+

|
| 390 |
+
|
| 391 |
+

|
| 392 |
+
|
| 393 |
+
Figure 2: ACVI: a woman is cutting a piece of pork VED: a woman is cutting a bed Structured Attention: a woman is cutting pork Variational Attention: a woman is cutting pork SA: a woman is putting butter on a bed Reference Description: someone is cutting a piece of meat
|
| 394 |
+
|
| 395 |
+

|
| 396 |
+
|
| 397 |
+

|
| 398 |
+
Figure 3: ACVI: a small animal is eating VED: a small woman is talking Structured Attention: a small woman is eating Variational Attention: a small woman is eating SA: a small woman is talking Reference Description: a hamster is eating
|
| 399 |
+
|
| 400 |
+

|
| 401 |
+
|
| 402 |
+
Figure 4: ACVI: the lady poured the something into a bowl VED: a woman is cracking an egg
|
| 403 |
+
Structured Attention: a woman poured an egg into a bowl
|
| 404 |
+
Variational Attention: a woman poured an egg into a bowl SA: a woman is cracking an egg Reference Description: someone is pouring something into a bowl Figure 5: ACVI: a woman is riding a horse VED: a woman is riding a horse
|
| 405 |
+
Structured Attention: a woman is riding a horse
|
| 406 |
+
Variational Attention: a woman is riding a horse SA: a woman is riding a horse Reference Description: a woman is riding a horse Figure 6: ACVI: several people are driving down a street VED: several people trying to jump
|
| 407 |
+
Structured Attention: several people are driving down the avenue
|
| 408 |
+
Variational Attention: several people are driving down the avenue SA: a boy trying to jump Reference Description: a car is driving down the road Figure 8: ACVI: the man is riding a bicycle VED: the man is riding a motorcycle
|
| 409 |
+
Structured Attention: the man is riding a motorcycle
|
| 410 |
+
Variational Attention: the man is riding a motorcycle SA: a man rides a motorcycle Reference Description: a girl is riding a bicycle
|
| 411 |
+
|
| 412 |
+

|
| 413 |
+
|
| 414 |
+

|
| 415 |
+
|
| 416 |
+

|
| 417 |
+
|
| 418 |
+

|
| 419 |
+
|
| 420 |
+

|
| 421 |
+
Figure 7: ACVI: a man is playing the guitar VED: a man is dancing Structured Attention: a high man is playing the guitar Variational Attention: a man is dancing SA: a high man is dancing Reference Description: a boy is playing the guitar
|
| 422 |
+
|
| 423 |
+

|
| 424 |
+
|
| 425 |
+
Table 11: V En, tst2012 - Example 84.
|
| 426 |
+
|
| 427 |
+
<table><tr><td rowspan=1 colspan=1>Source sentence</td></tr><tr><td rowspan=1 colspan=1>Hau hét y tuong cüa chung toi deu dien khung, nhung vai y tuong vo cung tuyet voi, va chung toitao ra dot pha.</td></tr><tr><td rowspan=1 colspan=1>Reference Translation</td></tr><tr><td rowspan=1 colspan=1>Most of our ideas were crazy, but a few were brilliant, and we broke through.</td></tr><tr><td rowspan=1 colspan=1>Generated Translation - Baseline</td></tr><tr><td rowspan=1 colspan=1>Most of our ideas were crazy, but some incredible ideas were awesome, and we created thebreakthrough.</td></tr><tr><td rowspan=1 colspan=1>Generated Translation - Structured Attention</td></tr><tr><td rowspan=1 colspan=1>Most of our ideas are crazy, but some [missing: verb] really wonderful ideas, and we created asudden.</td></tr><tr><td rowspan=1 colspan=1>Generated Translation-VED</td></tr><tr><td rowspan=1 colspan=1>Most of our ideas were crazy, but some [missing: verb] wonderful ideas, and we created abreakthrough.</td></tr><tr><td rowspan=1 colspan=1>Generated Translation - Variational Attention</td></tr><tr><td rowspan=1 colspan=1>Most of our ideas were insane, but some ideas were wonderful, and we created <unk>.</td></tr><tr><td rowspan=1 colspan=1>Generated Translation- ACVI</td></tr><tr><td rowspan=1 colspan=1>Most of our ideas were crazy, but some [missing: verb] wonderful ideas,and we made abreakthrough.</td></tr></table>
|
| 428 |
+
|
| 429 |
+
# APPENDIX C
|
| 430 |
+
|
| 431 |
+
Let us first provide some details on the datasets used in the context of our MT experiments. The WMT’16 task comprises of data from combining the Europarl v7, News Commentary v10 and Common Crawl corpora. For the (En, Ro) pair, this amounts to ${ \sim } 4 0 0 \mathrm { K }$ parallel sentences. The shared vocabulary sizes (obtained from BPE) total ${ \sim } 3 1 . 7 \mathrm { K }$ words. We use newsdev2016 as our development set ${ \mathrm { \Omega } } ^ { \prime } { \sim } 1 . 9 \mathrm { K }$ sentences), and newstest2016 as our test set ${ \mathrm { \Omega } } ^ { \prime } { \sim } 1 . 9 \mathrm { K }$ sentences) for the (En, Ro) pair.
|
| 432 |
+
|
| 433 |
+
On the other hand, the IWSLT’15 task boasts a dataset with ${ \sim } 1 3 3 \mathrm { K }$ training sentence pairs from translated TED talks, provided by the IWSLT 2015 Evaluation Campaign (Cettolo et al., 2015). Following the same preprocessing steps as in (Luong et al., 2015), we use TED tst2012 ${ \mathrm { \Omega } } ^ { \prime } { \sim } 1 . 5 \mathrm { K }$ sentences) as our validation set for hyperparameter tuning, and TED tst2013 $\mathrm { \sim } 1 . 3 \mathrm { K }$ sentences) as our test set. The Vietnamese and English vocabulary sizes are ${ \sim } 7 . 7 \mathrm { K }$ and ${ \sim } 1 7 . 2 \mathrm { K }$ , respectively.
|
| 434 |
+
|
| 435 |
+
We prefer default settings for the hyperparameters of the trained seq2seq models, as used in the code8. These hyper-parameters remain unchanged for the VED and Variational Attention implementations as well. We have migrated the code9 of the former, provided from the authors, to ensure identical data processing. For the latter, we use their codebase10 directly.
|
| 436 |
+
|
| 437 |
+
In conclusion, we provide some characteristic examples of generated translations for all examined models. In the Tables that follow, we annotate minor and major deviations from the reference translation with blue and red respectively. Synonyms are highlighted with green. We also indicate missing tokens by adding the [missing] identifier mid-sentence, i.e. verbs, articles, adjectives, etc.
|
| 438 |
+
|
| 439 |
+
Table 12: V $\dot { \lfloor \rfloor }$ En, tst2012 - Example 165.
|
| 440 |
+
|
| 441 |
+
<table><tr><td rowspan=1 colspan=1>Source sentence</td></tr><tr><td rowspan=1 colspan=1>diéu dau tien ba muon con hua la con phai luon yeu thuong me con</td></tr><tr><td rowspan=1 colspan=1>Reference Translation</td></tr><tr><td rowspan=1 colspan=1> She said, " The first thing I want you to promise me is that you 'll always love your mom. "</td></tr><tr><td rowspan=1 colspan=1>Generated Translation-Baseline</td></tr><tr><td rowspan=1 colspan=1>" The first thing she wants to revenge is she always loves her mother. "</td></tr><tr><td rowspan=1 colspan=1>Generated Translation - Structured Attention</td></tr><tr><td rowspan=1 colspan=1>" The first thing she wants to do is always love her. "</td></tr><tr><td rowspan=1 colspan=1>Generated Translation - VED</td></tr><tr><td rowspan=1 colspan=1>" The first thing she wanted me to do is to love my mother. "</td></tr><tr><td rowspan=1 colspan=1>Generated Translation - Variational Attention</td></tr><tr><td rowspan=1 colspan=1>" The first thing she wants to promise is that you have to love her mother. "</td></tr><tr><td rowspan=1 colspan=1>Generated Translation- ACVI</td></tr><tr><td rowspan=1 colspan=1> " The first thing she wanted you to promise you would have to do is to love your mother.</td></tr></table>
|
| 442 |
+
|
| 443 |
+
Table 13: Vi En, tst2012 - Example 1542.
|
| 444 |
+
|
| 445 |
+
<table><tr><td rowspan=1 colspan=1>Source sentence</td></tr><tr><td rowspan=1 colspan=1> Ho tham chi sé su dung nhung cong cu nhu Trojan Scuinst de lay nhiem vao may tinh cua ban ,va tu d6 ho c6 thé có dugc moi thong tin ban trao doi,có dugc moi cuoc hoi thoai qua mang cuaban , va có dugc mat khau cua ban .</td></tr><tr><td rowspan=1 colspan=1>Reference Translation</td></tr><tr><td rowspan=1 colspan=1>They will even use tools like State Trojan to infect your computer with a trojan , which enables them to watch all your communication ,to listen to your online discussions ,to collect yourpasswords .</td></tr><tr><td rowspan=1 colspan=1>Generated Translation - Baseline</td></tr><tr><td rowspan=1 colspan=1>They're even going to use tools like <unk> <unk> to infect your computer, and from that they can get all sorts of information that you traded, you get all the conversation through your lives, and there's been available to be able to get all of [missing: end of sentence]</td></tr><tr><td rowspan=1 colspan=1>Generated Translation - Structured Attention</td></tr><tr><td rowspan=1 colspan=1>They're even going to use your tools like <unk> <unk> to infect your computer, and from that they can get allte information you communicate, there's all kinds of conversations through your network, and you get your password.</td></tr><tr><td rowspan=1 colspan=1>Generated Translation-VED</td></tr><tr><td rowspan=1 colspan=1>They're even going to use tools like <unk> <unk> to infect your computer, and then they can get all sorts of information that you share, whether you can get all your <unk>.</td></tr><tr><td rowspan=1 colspan=1>Generated Translation- Variational Attention</td></tr><tr><td rowspan=1 colspan=1>They're even going to use tools like <unk> <unk> to infect your computer, and then they can be able to get allof the information that you can change, there's your conversation through your online, and there's your password.</td></tr><tr><td rowspan=1 colspan=1>Generated Translation- ACVI</td></tr><tr><td rowspan=1 colspan=1>They're even going to use tools like <unk> <unk> to infect your computer, and then they can get all the information you communicate, get all your conversations through your network, and getyour password.</td></tr></table>
|
| 446 |
+
|
| 447 |
+
Table 14: Ro En, newsdev2016 - Example 5.
|
| 448 |
+
|
| 449 |
+
<table><tr><td rowspan=1 colspan=1>Source sentence</td></tr><tr><td rowspan=1 colspan=1>Dirceu este cel mai vechi membru al Partidului Muncitorilor aflat la guvernare luat in custodie pentru legaturile cu aceasta schema.</td></tr><tr><td rowspan=1 colspan=1>Reference Translation</td></tr><tr><td rowspan=1 colspan=1>Dirceu is the most senior member of the ruling Workers ’ Party to be taken into custody inconnection with the scheme.</td></tr><tr><td rowspan=1 colspan=1>Generated Translation - Baseline</td></tr><tr><td rowspan=1 colspan=1>That is the most old Member of the People 's Party of Maiers to government in custody for tieswith this scheme.</td></tr><tr><td rowspan=1 colspan=1>Generated Translation - Structured Attention</td></tr><tr><td rowspan=1 colspan=1> It is the oldest member of the Mandi of the Massi in the government in the government.</td></tr><tr><td rowspan=1 colspan=1>Generated Translation - VED</td></tr><tr><td rowspan=1 colspan=1>(RO) Mr President, it is the oldest member of the Dutch Party on the government in custody forthe ties with this scheme .</td></tr><tr><td rowspan=1 colspan=1>Generated Translation - Variational Attention</td></tr><tr><td rowspan=1 colspan=1>It is the oldest Member of the Party of Women's Party of Government in custody for the ties withthis scheme.</td></tr><tr><td rowspan=1 colspan=1>Generated Translation- ACVI</td></tr><tr><td rowspan=1 colspan=1>Dirse is the oldest member of the People 's Party on government in custody for the links withthis scheme.</td></tr></table>
|
| 450 |
+
|
| 451 |
+
Table 15: Ro En, newsdev2016 - Example 7.
|
| 452 |
+
|
| 453 |
+
<table><tr><td rowspan=1 colspan=1>Source sentence</td></tr><tr><td rowspan=1 colspan=1>A fost arestat la inceputul lui august de acasa, unde deja se afla sub arest la domiciliu, cu o pedeapsä de 11 ani pentru implicarea intr-o schemä de cumpärare a voturilor in Congres cu peste10 ani in urma.</td></tr><tr><td rowspan=1 colspan=1>Reference Translation</td></tr><tr><td rowspan=1 colspan=1>He was arrested early August in his home, where he already was under house arrest serving an11-year sentence for his involvement in a cash-for-votes scheme in Congress more than 1O yearsago.</td></tr><tr><td rowspan=1 colspan=1>Generated Translation-Baseline</td></tr><tr><td rowspan=1 colspan=1>He was arrested at the beginning of August at home, where it is already under arrest at home, with a death penalty for the involvement of the votes in Congress on 10 years ago.</td></tr><tr><td rowspan=1 colspan=1>Generated Translation - Structured Attention</td></tr><tr><td rowspan=1 colspan=1>It has been arrested at the beginning of last August, which is already being found in home, with aban on a 11 years for the involvement of a ban in the reception scheme for more than 1O yearsago.</td></tr><tr><td rowspan=1 colspan=1>Generated Translation - VED</td></tr><tr><td rowspan=1 colspan=1>He was arrested at the beginning of August at home, where it is already under arrest at home, with a three-11 sentence for the involvement in a no-fly scheme on 1O years ago.</td></tr><tr><td rowspan=1 colspan=1>Generated Translation - Variational Attention</td></tr><tr><td rowspan=1 colspan=1> It was arrested at the beginning of August August, where already under home, with a 11 years[missing: noun], with a 11 years [missing: noun] for the involvement of a purchasing votes in10 years ago.</td></tr><tr><td rowspan=1 colspan=1>Generated Translation - ACVI</td></tr><tr><td rowspan=1 colspan=1>He was arrested at the beginning of August at home, where he is under house arrest, with apunishment of 1l years for involving a purchasing scheme in Congress over 1O years ago.</td></tr></table>
|
| 454 |
+
|
| 455 |
+
Table 16: Ro En, newsdev2016 - Example 182.
|
| 456 |
+
|
| 457 |
+
<table><tr><td rowspan=1 colspan=1>Source sentence</td></tr><tr><td rowspan=1 colspan=1>Reprezentantii grupurilor de interese au vorbit la unison despre speranta lor in abilitatea luiTurnbullde a satisface interesul public, de a ajunge la un acord politic si de a face lucrurile bine.</td></tr><tr><td rowspan=1 colspan=1>Reference Translation</td></tr><tr><td rowspan=1 colspan=1>With one voice the lobbyists talked about a hoped-for ability in Turnbul to make the public argument, to cut the political deal and get tough things done.</td></tr><tr><td rowspan=1 colspan=1>Generated Translation - Baseline</td></tr><tr><td rowspan=1 colspan=1>The representatives of interest groups have spoken about their hope in the capacity of tourism to meet public interest, to reach a political agreement and to do things well.</td></tr><tr><td rowspan=1 colspan=1>Generated Translation - Structured Attention</td></tr><tr><td rowspan=1 colspan=1>The representatives of the interest groups have spoken in mind about their hope to meet the public interest, to achieve a political and good thing.</td></tr><tr><td rowspan=1 colspan=1>Generated Translation - VED</td></tr><tr><td rowspan=1 colspan=1>The representatives of interest groups have spoken in unity about their hope in Turkey's ability to satisfy the public interest, to reach a political agreement and to make things right.</td></tr><tr><td rowspan=1 colspan=1>Generated Translation- Variational Attention</td></tr><tr><td rowspan=1 colspan=1>The representatives of the interest groups have talked about their hope about their hope of their Turk hope to meet the public interest, to reach a political agreement and to do so well.</td></tr><tr><td rowspan=1 colspan=1>Generated Translation- ACVI</td></tr><tr><td rowspan=1 colspan=1>Representatives of interest groups have spoken about their hope in Mr Turnchl 's ability to satisfythe public interest, to reach a political agreement and to do things well.</td></tr></table>
|
md/train/SygW0TEFwH/SygW0TEFwH.md
ADDED
|
@@ -0,0 +1,366 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SIGN BITS ARE ALL YOU NEED FOR BLACK-BOX ATTACKS
|
| 2 |
+
|
| 3 |
+
Abdullah Al-Dujaili CSAIL, MIT Cambridge, MA 02139 aldujail@mit.edu
|
| 4 |
+
|
| 5 |
+
Una-May O’Reilly CSAIL, MIT Cambridge, MA 02139 unamay@csail.mit.edu
|
| 6 |
+
|
| 7 |
+
# ABSTRACT
|
| 8 |
+
|
| 9 |
+
We present a novel black-box adversarial attack algorithm with state-of-the-art model evasion rates for query efficiency under $\ell _ { \infty }$ and $\ell _ { 2 }$ metrics. It exploits a sign-based, rather than magnitude-based, gradient estimation approach that shifts the gradient estimation from continuous to binary black-box optimization. It adaptively constructs queries to estimate the gradient, one query relying upon the previous, rather than re-estimating the gradient each step with random query construction. Its reliance on sign bits yields a smaller memory footprint and it requires neither hyperparameter tuning or dimensionality reduction. Further, its theoretical performance is guaranteed and it can characterize adversarial subspaces better than white-box gradient-aligned subspaces. On two public black-box attack challenges and a model robustly trained against transfer attacks, the algorithm’s evasion rates surpass all submitted attacks. For a suite of published models, the algorithm is $3 . 8 \times$ less failure-prone while spending $2 . 5 \times$ fewer queries versus the best combination of state of art algorithms. For example, it evades a standard MNIST model using just 12 queries on average. Similar performance is observed on a standard IMAGENET model with an average of 579 queries.
|
| 10 |
+
|
| 11 |
+
# 1 INTRODUCTION
|
| 12 |
+
|
| 13 |
+
Problem. Deep Neural Networks (DNNs) are vulnerable to adversarial examples, which are malicious inputs designed to fool the model’s prediction—see (Biggio and Roli, 2018) for a comprehensive, recent overview of adversarial examples. Research on generating these malicious inputs started in the white-box setting, where access to the gradients of the models is assumed. Since the gradient points to the direction of steepest ascent, an input can be perturbed along the gradient’s direction to maximize the network’s loss, thereby potentially causing misclassification under class prediction, e.g. with images, or evasion under detection, e.g. with malware. The assumption of access to the underlying gradient does not however reflect real world scenarios. Attack algorithms under a more realistic, restrictive black-box threat model, which assumes access to predictions in lieu of gradients, are therefore studied. Central to their approaches is estimating the gradient. To estimate the magnitudes and signs of the gradient, the community at large has formulated a continuous optimization problem of $O ( n )$ complexity where $n$ is the input dimensionality. Most recently work has sought to reduce this complexity by means of data-/time-dependent priors Ilyas et al. (2019). In this paper, we take a different tact and reduce the central problem to just estimating the signs of the gradients. Our intuition arises from observing that estimating the sign of the top $3 0 \%$ gradient coordinates by magnitude is enough to achieve a rough misclassification rate of $7 0 \%$ . Figure 1 reproducing Ilyas et al. (2019) illustrates this observation for the MNIST dataset–see Appendix A for other datasets. Therefore our goal is to recover the sign of the gradient with high query efficiency so we can use it to generate adversarial examples as effective as those generated by full gradient estimation approaches.
|
| 14 |
+
|
| 15 |
+
Related Work. We organize the related work in two themes, namely Adversarial Example Generation and Sign-Based Optimization. The literature of the first theme primarily divides into white-box and black-box settings. The white-box setting, while not the focus of this work, follows from the works of Biggio et al. (2013) and Goodfellow et al. (2015) who introduced the Fast Gradient Sign Method (FGSM), including several methods to produce adversarial examples for various learning tasks and threat perturbation constraints (Carlini and Wagner, 2017; Moosavi-Dezfooli et al., 2016; Hayes and
|
| 16 |
+
|
| 17 |
+
Danezis, 2017; Al-Dujaili et al., 2018; Kurakin et al., 2017; Shamir et al., 2019). Turning to the blackbox setting and iterative optimization schemes, Narodytska and Kasiviswanathan (2017), without using any gradient information, use a naive policy of perturbing random segments of an image to generate adversarial examples. Bhagoji et al. (2017) reduce the dimensions of the feature space using Principal Component Analysis (PCA) and random feature grouping, before estimating gradients. Chen et al. (2017) introduce a principled approach by using gradient based optimization. They employ finite differences, a zeroth-order optimization means, to estimate the gradient and then use it to design a gradient-based attack. While this approach successfully generates adversarial examples, it is expensive in how many times the model is queried. Ilyas et al. (2018) substitute traditional finite differences methods with Natural Evolutionary Strategies (NES) to obtain an estimate of the gradient. Tu et al. (2018) provide an adaptive random gradient estimation algorithm that balances query counts and distortion, and introduces a trained auto-encoder to achieve attack acceleration. Ilyas et al. (2019) extend this line of work by proposing the idea of gradient priors and bandits: BanditsTD. Our work contrasts with the general approach of these works in two ways: a) We focus on estimating the sign of the gradient and investigate whether this estimation suffices to efficiently generate adversarial examples. b) The above methods employ random sampling in constructing queries to the model while our construction is adaptive.1 Another approach involves learning adversarial examples for one model (with access to its gradient information) to transfer them against another (Liu et al., 2016; Papernot et al., 2017). Alternately, Xiao et al. (2018) use a Generative Adversarial Network (GAN) to generate adversarial examples which are based on small norm-bounded perturbations. These methods involve learning on a different model, which is expensive, and not amenable to comparison with setups—including ours—that directly query the model of interest.
|
| 18 |
+
|
| 19 |
+
Sign-Based Optimization. In the context of generalpurpose continuous optimization methods, signbased stochastic gradient descent was studied in both zeroth- and first-order setups. In the latter, Bernstein et al. (2018) analyzed signSGD, a sign-based Stochastic Gradient Descent, and showed that it enjoys a faster empirical convergence than SGD in addition to the cost reduction of communicating gradients across multiple workers. Liu et al. (2019) extended signSGD to zeroth-order setup with the ZO-SignSGD algorithm. ZO-SignSGD (Liu et al., 2019) was shown to outperform NES against a blackbox model on MNIST. These approaches use the sign of the gradient (or its zero-order estimate) to achieve better convergence, whereas our approach both estimates and uses the sign of the gradient.
|
| 20 |
+
|
| 21 |
+

|
| 22 |
+
Figure 1: Misclassification rate of an MNIST model on the noisy FGSM’s adversarial examples as a function of correctly estimated coordinates of $\mathrm { s i g n } ( \nabla _ { \pmb { x } } f ( \pmb { x } , y ) )$ on 1000 random MNIST images. Estimating the sign of the top $3 0 \%$ gradient coordinates (in terms of their magnitudes) is enough to achieve a rough misclassification rate of $7 0 \%$ . More details can be found in Appendix A.
|
| 23 |
+
|
| 24 |
+
Contributions. We present the following contributions at the intersection of adversarial machine learning and black-box (zeroth-order) optimization: 1) We exploit the separability property of the directional derivative of the loss function of the model under attack in the direction of $\{ \pm 1 \} ^ { n }$ vectors, to propose a divide-and-conquer, adaptive, memory-efficient algorithm, we name SignHunter, to estimate the gradient sign bits. 2) We provide a worst-case theoretical guarantee on the number of queries required by SignHunter to perform at least as well as FGSM (Goodfellow et al., 2015), which has access to the model’s gradient. To our knowledge, no black-box attack from the literature offers a similar performance guarantee. 3) We evaluate our approach on a rigorous set of experiments on both, standard and adversarially hardened models. All other previous works on this topic have published their results on a subset of the datasets and threat models we experimentally validate in this work. Through these experiments, we demonstrate that SignHunter’s adaptive search for the gradient sign allows it to craft adversarial examples within a mere fraction of the theoretical number of queries thus outperforming FGSM and state-of-the-art black-box attacks. 4) We release a software framework to systematically benchmark adversarial black-box attacks, including SignHunter’s, on MNIST, CIFAR10, and IMAGENET models in terms of success rate, query count, and other metrics. 5) We demonstrate how SignHunter can be used to characterize adversarial cones in a black-box setup and in doing so, highlight the gradient masking effect.
|
| 25 |
+
|
| 26 |
+
Notation. Let $n$ denote the dimension of datapoint $_ { \textbf { \em x } }$ . Denote a hidden $n$ -dimensional binary code by $\pmb q ^ { * }$ . That is, $\pmb { q } ^ { * } \in \mathcal { H } \equiv \{ - 1 , + 1 \} ^ { n }$ . Further, denote the directional derivative of some function $f$ at a point $_ { \textbf { \em x } }$ in the direction of a vector $\textbf { { v } }$ by $D _ { v } f ( \pmb { x } ) \equiv \pmb { v } ^ { T } \nabla _ { \pmb { x } } f ( \pmb { x } )$ which often can be approximated by the finite difference method. That is, for $\delta > 0$ , we have
|
| 27 |
+
|
| 28 |
+
$$
|
| 29 |
+
D _ { v } f ( { \pmb x } ) = { \pmb v } ^ { T } \nabla _ { \pmb x } f ( { \pmb x } ) \approx \frac { f ( { \pmb x } + \delta { \pmb v } ) - f ( { \pmb x } ) } { \delta } .
|
| 30 |
+
$$
|
| 31 |
+
|
| 32 |
+
Let $\Pi _ { S } ( \cdot )$ be the projection operator onto the set $S$ , $B _ { p } ( { \pmb x } , { \epsilon } )$ be the $\ell _ { p }$ ball of radius $\epsilon$ around $_ { \textbf { \em x } }$
|
| 33 |
+
|
| 34 |
+
# 2 GRADIENT ESTIMATION
|
| 35 |
+
|
| 36 |
+
At the heart of black-box adversarial attacks is generating a perturbation vector to slightly modify the original input $_ { \textbf { \em x } }$ so as to fool the network prediction of its true label $y$ . Put differently, an adversarial example $\mathbf { x } ^ { \prime }$ maximizes the network’s loss $L ( { \boldsymbol { x } } ^ { \prime } , { \boldsymbol { y } } )$ but still remains $\epsilon$ -close to the original input $_ { \textbf { \em x } }$ . Although the loss function $L$ can be non-concave, gradient-based techniques are often very successful in crafting an adversarial example Madry et al. (2017). That is, setting the perturbation vector as a step in the direction of $\nabla _ { \pmb { x } } L ( \pmb { x } , y )$ . Consequently, the bulk of black-box attack methods try to estimate the gradient by querying an oracle that returns, for a given input/label pair $( { \pmb x } , y )$ , the value of the network’s loss $L ( { \pmb x } , y )$ , consulting prediction or classification accuracy. Using only such value queries, the basic approach relies on the finite difference method to approximate the directional derivative (Eq. 1) of the function $L$ at the input/label pair $( { \pmb x } , y )$ in the direction of a vector $\pmb { v }$ , which corresponds to ${ \pmb v } ^ { T } \nabla _ { \pmb x } L ( { \pmb x } , y )$ . With $n$ linearly independent vectors $\{ { { \pmb v } _ { i } } ^ { T } \nabla _ { \pmb x } L ( { \pmb x } , y ) = d _ { i } \} _ { 1 \leq i \leq n }$ , one can construct a linear system of equations to recover the full gradient. Clearly, this approach’s query complexity is $O ( n )$ , which can be prohibitively expensive for large $n$ (e.g., $n = 2 6 8$ , 203 for the IMAGENET dataset). Recent works try to mitigate this issue by exploiting data- and/or time-dependent priors (Tu et al., 2018; Ilyas et al., 2018; 2019). However, the queries are not adaptive, they are constructed based on i.i.d. random vectors $\{ v _ { i } \}$ . They fail to make use of the past queries’ responses to construct the new query and recover the full gradient more efficiently. As stated in the introduction, we solve the smaller problem of gradient sign estimation with adaptive queries based on the observation that simply leveraging (noisy) sign bits of the gradient yields successful attacks–see Figure 1.
|
| 37 |
+
|
| 38 |
+
Definition 1. (Gradient Sign Estimation Problem) For an input/label pair $( { \pmb x } , y )$ and a loss function $L ,$ , let $\pmb { g } ^ { * } = \nabla _ { \pmb { x } } L ( \pmb { x } , y )$ be the gradient of $L$ at $( { \pmb x } , y )$ and $\pmb q ^ { * } = \mathrm { s i g n } ( \pmb g ^ { * } ) \in \mathcal { H }$ be the sign bit vector of $g ^ { * }$ .2 Then the goal of the gradient sign estimation problem is to find a binary vector $\mathbf { \pmb { q } } \in \mathcal { H }$ maximizing the directional derivative3
|
| 39 |
+
|
| 40 |
+
$$
|
| 41 |
+
\operatorname* { m a x } _ { \pmb q \in \mathcal { H } } D _ { \pmb q } L ( \pmb x , \pmb y ) \ ,
|
| 42 |
+
$$
|
| 43 |
+
|
| 44 |
+
from a limited number of (possibly adaptive) function value queries $L ( \boldsymbol { x } ^ { \prime } , \boldsymbol { y } )$ .
|
| 45 |
+
|
| 46 |
+
# 3 A METHOD FOR ESTIMATING SIGN OF THE GRADIENT FROM ADAPTIVE QUERIES
|
| 47 |
+
|
| 48 |
+
Our goal is to estimate the gradient sign bits of the loss function $L$ of the model under attack at an input/label pair $( { \pmb x } , y )$ from a limited number of loss value adaptive queries $L ( \mathbf { \boldsymbol { x } } ^ { \prime } , \boldsymbol { y } )$ . To this end, we examine the basic concept of directional derivatives that has been employed in recent black-box
|
| 49 |
+
|
| 50 |
+
adversarial attacks. Based on the definition of the directional derivative (Eq. 1), the following can be stated.
|
| 51 |
+
|
| 52 |
+
Property 1 (Separability of $D _ { \pmb { q } } L ( \pmb { x } , \pmb { y } ) )$ . The directional derivative $D _ { \pmb { q } } L ( \pmb { x } , \pmb { y } )$ of the loss function $L$ at an input/label pair $( { \pmb x } , y )$ in the direction of a binary code $\pmb q$ is separable. That is,
|
| 53 |
+
|
| 54 |
+
$$
|
| 55 |
+
\operatorname* { m a x } _ { \pmb { q } \in \mathcal { H } } D _ { \pmb { q } } L ( \pmb { x } , \pmb { y } ) = \operatorname* { m a x } _ { \pmb { q } \in \mathcal { H } } \pmb { q } ^ { T } \pmb { g } ^ { * } = \sum _ { i = 1 } ^ { n } \operatorname* { m a x } _ { \pmb { q } _ { i } \in \{ - 1 , + 1 \} } q _ { i } \pmb { g } _ { i } ^ { * } \ .
|
| 56 |
+
$$
|
| 57 |
+
|
| 58 |
+
This reformulates the gradient sign estimation problem from single $n$ -dimensional to $n$ 1-dimensional binary black-box optimization problems, reducing the search space of sign bits from $2 ^ { n }$ to $2 n$ . Subsequently, one could recover the gradient sign bits with $n + 2$ queries as follows: i. Start with an arbitrary sign vector $\pmb q$ and compute the directional derivative $D _ { \pmb { q } } L ( \pmb { x } , \pmb { y } )$ . Using Eq. 1, this requires two queries: $L ( { \pmb x } + \delta { \pmb q } , y )$ and $L ( { \pmb x } , y )$ . ii. For the remaining $n$ queries, flip $\pmb q$ ’s bits (coordinates) one by one and compute the corresponding directional derivative– one query each $L ( { \pmb x } + \delta { \pmb q } , y )$ . iii. Retain bit flips that maximize the directional derivative $D _ { q } L ( \pmb { x } , y )$ and revert those otherwise. This, however, still suffers from the $O ( n )$ complexity of full gradient estimation methods. Further, each query recovers at most one sign bit and the natural question to ask is: can we recover more sign bits per query?
|
| 59 |
+
|
| 60 |
+
Consider the case where all the gradient coordinates have the same magnitude, i.e., $| \{ \bar { | g _ { i } ^ { * } | } \} _ { 1 \leq i \leq n } | = 1$ , and let the initial guess $\pmb q _ { 1 }$ have $r$ correct bits and $n - r$ wrong ones. Instead of flipping its bits sequentially, we can flip them all at once to get $q _ { 2 } ~ = ~ - q _ { 1 }$ . If $D _ { q _ { 2 } } L ( { \pmb x } , y ) \geq D _ { { \pmb q } _ { 1 } } L ( { \pmb x } , y )$ , then we retain $\pmb { q } _ { 2 }$ as our best guess with $n \mathrm { ~ - ~ } r$ correct bits, otherwise $\pmb q _ { 1 }$ remains. In either cases, with three queries, we will recover $\operatorname* { m a x } ( r , n - r )$ sign bits. One can think of this flip/revert procedure as one of majority voting $g : { \mathcal { H } } \mathbb { R }$ : the black-box function to be maximized over the binary hypercube $\mathcal { H } \equiv \{ - 1 , + 1 \} ^ { n }$
|
| 61 |
+
|
| 62 |
+
def is_done() : return done
|
| 63 |
+
|
| 64 |
+
$$
|
| 65 |
+
\begin{array} { r l } & { \mathrm { t e p ( ) : } } \\ & { \mathrm { c \_ l e n } \gets \lceil n / 2 ^ { h } \rceil } \\ & { s [ \mathrm { i } ^ { \ast } \mathrm { c \_ l e n } ; ( \mathrm { i } + 1 ) ^ { \ast } \mathrm { c \_ l e n } ] ^ { \ast } \mathrm { = } - 1 } \\ & { \mathrm { i f } g ( s ) \ge g _ { b e s t } \mathrm { : } } \\ & { \mathrm { . ~ } g _ { b e s t } g ( s ) } \end{array}
|
| 66 |
+
$$
|
| 67 |
+
|
| 68 |
+
$$
|
| 69 |
+
s [ \mathrm { i ^ { * } c \_ l e n } \mathrm { : ( i + 1 ) ^ { * } c \_ l e n } ] \ ^ { * } = - 1
|
| 70 |
+
$$
|
| 71 |
+
|
| 72 |
+
$$
|
| 73 |
+
\mathrm { i f } \ h = = \lceil \log _ { 2 } ( n ) \rceil + 1 \colon
|
| 74 |
+
$$
|
| 75 |
+
|
| 76 |
+
def get_current_sign_estimate() :
|
| 77 |
+
|
| 78 |
+
return s
|
| 79 |
+
|
| 80 |
+
by the guess’s coordinates on whether they agree with their gradient sign’s counterparts. To see this, let $| g _ { i } ^ { * } | = 1$ for all $i$ , then the condition $D _ { q _ { 2 } } L ( { \pmb x } , y ) \geq D _ { { \pmb q } _ { 1 } } L ( { \pmb x } , y )$ can be written as $n - r - r \geq$ $r - n + r \implies n \geq 2 r$ . If the agree votes $r$ are less than half of the total votes $n$ , then $\pmb { q } _ { 2 }$ is retained. Besides flipping all the coordinates, one can employ the same procedure iteratively on a subset (chunk) of the coordinates $[ q _ { j } , \dotsc , q _ { j + n _ { i } } ]$ of the guess vector $\pmb q$ , recovering $\operatorname* { m a x } ( r _ { i } , n _ { i } - r _ { i } )$ sign bits, where $n _ { i }$ and $r _ { i }$ is the length of the ith chunk and the number of its correct signs, respectively.
|
| 81 |
+
|
| 82 |
+
While the magnitudes of gradient coordinates may not have the same value as assumed in the previous example; through empirical evaluation (see Appendix F), we found them to be concentrated. Consequently and with high probability, their votes on retaining or reverting chunks of sign flips are weighted (by their corresponding gradient magnitude) similarly. That said, if we are at a chunk where the distribution of the gradient coordinate magnitudes is uniform, then the flip/revert procedure could favor recovering few sign coordinates with large magnitude counterparts over many sign coordinates with small magnitude counterparts. From our experiments on the noisy FGSM, this still suffices to generate adversarial examples: an attack with $\bar { 3 0 \% }$ correct sign bits (that correspond to the top gradient coordinates magnitudes) is more effective than an attack with $5 0 \%$ correct arbitrary sign bits as shown in Figure 1. Put differently, we would like to recover as many sign bits as possible with as few queries as possible. However, if we can only recover few, they should be those that correspond to coordinates with large gradient magnitude. This notion is in line with the flip/revert procedure.
|
| 83 |
+
|
| 84 |
+
We employ the above observation in a divide-and-conquer search which we refer to as SignHunter. As outlined in Algorithm 1, the technique starts with an initial guess of the sign vector $\pmb q _ { 1 }$ (s in Algorithm 1). It then proceeds to flip the sign of all the coordinates to get a new sign vector $\pmb { q } _ { 2 }$ , and revert the flips if the loss oracle returned a value $L ( { \pmb x } + \delta { \pmb q } _ { 2 } , y )$ (or equivalently the directional derivative ) less than the best obtained so far $L ( { \pmb x } + \delta { \pmb q } _ { 1 } , { \pmb y } )$ . SignHunter applies the same rule to the first half of the coordinates, the second half, the first quadrant, the second quadrant, and so on. For a search space of dimension $n$ , SignHunter needs $\mathbf { \bar { 2 } } ^ { \lceil \log ( n ) + 1 \rceil } - 1$ sign flips to complete its search. If the query budget is not exhausted by then, one can update $_ { \textbf { \em x } }$ with the recovered signs and restart the procedure at the updated point with a new starting code $\pmb { s }$ . If we start with a sign vector whose Hamming distance to the optimal sign vector $\pmb q ^ { * }$ is $n / 2$ : agreeing with $\pmb q ^ { * }$ in the first half of coordinates. In this case, SignHunter needs just four queries to recover the entire sign vector independent of $n$ , whereas the sequential bit flipping still require $n + 2$ queries. In the next theorem, we show that SignHunter is guaranteed to perform at least as well as FGSM with $O ( n )$ oracle queries. Up to our knowledge, no such guarantees exist for any black-box attack from the literature.
|
| 85 |
+
|
| 86 |
+
Theorem 1. (Optimality of SignHunter) Given $2 ^ { \lceil \log ( n ) + 1 \rceil }$ queries and that the directional derivative is well approximated by the finite-difference (Eq. 1), SignHunter is at least as effective as FGSM (Goodfellow et al., 2015) in crafting adversarial examples.
|
| 87 |
+
|
| 88 |
+
The proof can be found in Appendix B. Theorem 1 provides an upper bound on the number of queries required for SignHunter to recover the gradient sign bits, and perform as well as FGSM. In practice (as will be shown in our experiments), SignHunter crafts adversarial examples with a small fraction of this upper bound. The rationale here is that we do not need to recover the sign bits exactly; we rather need a fast convergence to an adversarially helpful sign vector s. In our setup, we use the best sign estimation obtained $\pmb { s }$ so far in a similar fashion to FGSM, whereas full-gradient estimation approaches often employ an iterative scheme of $T$ steps within the perturbation ball $B _ { p } ( { \pmb x } , { \epsilon } )$ , calling the gradient estimation routine in every step leading to a search complexity of $n T$ . Instead, our gradient sign estimation routine runs at the top level of our adversarial example generation procedure. Further, SignHunter is amenable to parallel hardware architecture and has a smaller memory footprint (just sign bits) and thus can carry out attacks in batches more efficiently. Crafting black-box adversarial attacks with SignHunter is outlined in Algorithm 2.
|
| 89 |
+
|
| 90 |
+
# 4 EXPERIMENTS
|
| 91 |
+
|
| 92 |
+
We evaluate SignHunter and compare it with established algorithms from the literature: ZO-SignSGD Liu et al. (2019), NES Ilyas et al. (2018), and BanditsTD Ilyas et al. (2019) in terms of effectiveness in crafting (without loss of generality) untargeted black-box adversarial examples. To highlight SignHunter’s adaptive query construction, we introduce a variant of Algorithm 2, named Rand. At every iteration, Rand’s sign vector is sampled uniformly from $\mathcal { H } . ^ { 4 }$ . Both $\ell _ { \infty }$ and $\ell _ { 2 }$ threat models are considered on the MNIST, CIFAR10, and IMAGENET datasets. Code and data for the experiments can be found at https://bit.ly/3acIHoQ.
|
| 93 |
+
|
| 94 |
+
Algorithm 2 Black-Box Adversarial Example Generation
|
| 95 |
+
with SignHunter
|
| 96 |
+
${ \bf { x } } _ { i n i t }$ : input to be perturbed, $y _ { i n i t } : x _ { i n i t }$ ’s true label,
|
| 97 |
+
$B _ { p } ( . , \epsilon ) : \ell _ { p }$ perturbation ball of radius $\epsilon$
|
| 98 |
+
$L :$ loss function of the model under attack
|
| 99 |
+
1: $\delta \epsilon / /$ set finite-difference probe to perturbation bound
|
| 100 |
+
2: xo ← xinit
|
| 101 |
+
3: Define the function $g$ as $g ( \pmb q ) = \frac { L ( \Pi _ { B _ { p } ( \pmb x _ { i n i t } , \epsilon ) } ( \pmb x _ { o } + \delta \pmb q ) , y _ { i n i t } ) - L ( \pmb x _ { o } , y _ { i n i t } ) } { \delta }$ 4: SignHunter.init $( g )$ 5: $/ / C ( \cdot )$ returns top class 6: while $\mathbf { \bar { \mathbf { C } } } ( \mathbf { \bar { x } } ) = y _ { i n i t } ^ { \mathbf { \bar { \mathbf { \alpha } } } }$ do
|
| 102 |
+
7: SignHunter.step()
|
| 103 |
+
8: $s $ SignHunter.get_current_sign_estimate()
|
| 104 |
+
9: $\pmb { x } \gets \Pi _ { B _ { p } ( \pmb { x } _ { i n i t } , \epsilon ) } ( \pmb { x } _ { o } + \delta \pmb { s } )$
|
| 105 |
+
10: if SignHunter.is_done() then
|
| 106 |
+
11: $\mathbf { \boldsymbol { x } } _ { o } \gets \mathbf { \boldsymbol { x } }$
|
| 107 |
+
12: Define the function $g$ as in Line 3 (with $\scriptstyle { \mathbf { { \mathbf { x } } } _ { o } }$ update)
|
| 108 |
+
13: SignHunter.init $( g )$
|
| 109 |
+
14: return $_ { \textbf { \em x } }$
|
| 110 |
+
|
| 111 |
+
# Experiments Setup. Our experiment
|
| 112 |
+
|
| 113 |
+
setup is similar to (Ilyas et al., 2019). Each attacker is given a budget of 10, 000 oracle queries per attack attempt and is evaluated on 1000 images from the test sets of MNIST, CIFAR10, and the validation set of IMAGENET. We did not find a standard practice for setting the perturbation bound . For the $\ell _ { \infty }$ threat model, we use (Madry et al., 2017)’s bound for MNIST and (Ilyas et al., 2019)’s bounds for both CIFAR10 and IMAGENET. For the $\ell _ { 2 }$ threat model, (Ilyas et al., 2019)’s bound is used for IMAGENET. MNIST’s bound is set based on the sufficient distortions observed in (Liu et al.,
|
| 114 |
+
|
| 115 |
+

|
| 116 |
+
Figure 2: Performance of black-box attacks in the $\ell _ { \infty }$ and $\ell _ { 2 }$ perturbation constraint. The plots show the average number of queries used per successful image for each attack when reaching a specified success rate.
|
| 117 |
+
|
| 118 |
+
2019), which are smaller than the one used in (Madry et al., 2017). We use the observed bound in (Cohen et al., 2019) for CIFAR10. We show results based on standard models–i.e., models that are not adversarially hardened. For MNIST and CIFAR10, the naturally trained models from (Madry et al., 2017)’s MNIST and CIFAR10 challenges are used. For IMAGENET, TensorFlow’s Inception (v3) model is used. The loss oracle returns the cross-entropy loss of the respective model. See Appendix C for other general experimental setup details.
|
| 119 |
+
|
| 120 |
+
Hyperparameters Setup. While SignHunter does not have any hyperparameters, to fairly compare it with the other algorithms, we tuned their hyperparameters starting with the default values reported by the corresponding authors. The finite difference probe $\delta$ for SignHunter is set to the perturbation bound $\epsilon$ as it is used for both computing the finite difference and crafting the adversarial examples— see Line 1 in Algorithm 2. This tuning-free aspect of SignHunter offers a robustness advantage over algorithms which require expert hypertuning. Details on the hyperparameter setup are available in Appendix C.
|
| 121 |
+
|
| 122 |
+
Table 1: Summary of attacks effectiveness on CIFAR10 under $\ell _ { \infty }$ and $\ell _ { 2 }$ perturbation constraints, and with a query limit of 10, 000 queries. The Failure Rate $\in [ 0 , 1 ]$ column lists the fraction of failed attacks over 1000 images. The Avg. # Queries column reports the average number of queries made to the loss oracle only over successful attacks.
|
| 123 |
+
|
| 124 |
+
<table><tr><td></td><td colspan="2">Failure Rate</td><td colspan="2">Avg.#Queries</td></tr><tr><td>Attack</td><td>lo</td><td>l2</td><td>l</td><td>l</td></tr><tr><td>BanditsTD</td><td>0.95</td><td>0.39</td><td>432.24</td><td>1201.85</td></tr><tr><td>NES</td><td>0.37</td><td>0.67</td><td>312.57</td><td>496.99</td></tr><tr><td>Rand</td><td>0.20</td><td>0.89</td><td>422.16</td><td>1018.17</td></tr><tr><td>SignHunter</td><td>0.07</td><td>0.21</td><td>121.00</td><td>692.39</td></tr><tr><td>ZOSignSGD</td><td>0.37</td><td>0.80</td><td>161.28</td><td>528.35</td></tr></table>
|
| 125 |
+
|
| 126 |
+
Results. Figure 2 shows the trade-off between the success (evasion) rate and the mean number of queries (of the successful attacks, per convention) needed to generate an adversarial example for the MNIST, CIFAR10, and IMAGENET classifiers under the $\ell _ { \infty }$ and $\ell _ { 2 }$ perturbation constraints. These plots indicate the average number of queries required for a desired success rate. Table 1 represents a tabulated summary of plots (b) and (e) of Figure 2.5 We observe the following: For any given success rate, SignHunter dominates the previous state of the art approaches in all settings except the IMAGENET $\ell _ { 2 }$ setup, where Bandits $_ { T D }$ shows a better query efficiency when the desired success rate is roughly greater than 0.35. This is all the more remarkable because BanditsTD exploits tiles, a data-dependent prior, searching over $5 0 \times 5 0 \times 3$ dimensions for IMAGENET, while SignHunter searches over the explicit data $2 9 9 \times 2 9 9 \times 3$ dimensions: $3 6 \times$ more dimensions.
|
| 127 |
+
|
| 128 |
+
$\ell _ { \infty }$ vs. $\ell _ { 2 }$ Perturbation Threat. In view of Bandit $S T D$ ’s advantage, SignHunter is remarkably efficient in the $\ell _ { \infty }$ setup, achieving a $\mathbf { 1 0 0 \% }$ evasion using—on average—just 12 queries per image against the MNIST classifier! In the $\ell _ { 2 }$ setup, SignHunter’s performance degrades—yet it still outperforms the other algorithms. This is expected, since SignHunter perturbs all the coordinates with the same magnitude and the √ $\ell _ { 2 }$ perturbation bound $\epsilon _ { 2 }$ for all the datasets in our experiments is set such that $\bar { \epsilon _ { 2 } / \sqrt { n } }$ is significantly less than the $\ell _ { \infty }$ perturbation bound $\epsilon _ { \infty }$ . Take the case of MNIST $( n = 2 8 \times 2 8 )$ ), where $\epsilon _ { \infty } = 0 . 3$ and $\epsilon _ { 2 } = 3$ . For SignHunter, the $\ell _ { 2 }$ setup is equivalent to an $\ell _ { \infty }$ perturbation bound of $3 / 2 8 \approx 0 . 1$ . The employed $\ell _ { 2 }$ perturbation bounds give the state of the art—continuous optimization based—approaches more perturbation options. For instance, it is possible for NES to perturb just one pixel in an MNIST image by a magnitude of 3; two pixels by a√ √ magnitude of $3 / \sqrt { 2 } \approx 2 . 1$ each; ten pixels by a magnitude of $3 / \sqrt { 1 0 } \approx 0 . 9$ each, etc. On the other hand, the binary optimization view of SignHunter limits it to always perturb all $2 8 \times 2 8$ pixels by a magnitude of $3 / 2 8 \approx 0 . 1 $ . Despite its fewer degrees of freedom, SignHunter maintains its effectiveness in the $\ell _ { 2 }$ setup. The plots can also be interpreted as a sensitivity assessment of SignHunter as $\epsilon$ gets smaller going from $\ell _ { \infty }$ to the $\ell _ { 2 }$ perturbation threat.
|
| 129 |
+
|
| 130 |
+
SignHunter vs FGSM. The performance of SignHunter is in line with Theorem 1 when compared with the performance of FGSM (the noisy FGSM at $k = 1 0 0 \%$ in Figures 1 and 2 of Appendix A) in both $\ell _ { \infty }$ and $\ell _ { 2 }$ setups across all datasets. For instance, FGSM has a failure rate of 0.32 for CIFAR10 $\ell _ { 2 }$ (Appendix A, Figure 2 (b)), while SignHunter achieves a failure rate of 0.21 with $6 9 2 . 3 9 < 2 n = 2 \times 3 \times 3 2 \times 3 2 = 6 1 4 4$ queries (Appendix D, Table 8). Note that for IMAGENET, SignHunter outperforms FGSM with a query budget of 10, 000 queries, a fraction of the theoretical number of queries required $2 n = 5 3 6$ , 406 to perform at least as well. Incorporating SignHunter in an iterative framework of perturbing the data point $_ { \textbf { \em x } }$ till the query budget is exhausted (Lines 10 to 14 in Algorithm 2) supports the observation in white-box settings that iterative FGSM—or Projected Gradient Descent (PGD)—is stronger than FGSM (Madry et al., 2017; Al-Dujaili et al., 2018). This is evident by the upticks in SignHunter’s performance on the MNIST $\ell _ { 2 }$ case (Appendix D, Figure 4), which happens after every iteration (after every other $2 \times 2 8 \times 2 8$ queries).
|
| 131 |
+
|
| 132 |
+
Gradient Estimation. Plots of the Hamming similarity capture the number of recovered sign bits, while plots of the average cosine similarity capture the value of Eq. 2. Both SignHunter and Bandits $_ { T D }$ consistently optimize both metrics. In general, SignHunter (Bandits $_ { T D }$ ) converges faster especially on the Hamming(cosine) metric as it is estimating the signs(signs and magnitudes) compared to Bandit $S T D$ ’s full gradient (SignHunter’s gradient sign) estimation. This is most obvious in the IMAGENET $\ell _ { 2 }$ setup (Appendix D, Figure 6). Note that once an attack is successful, the estimated gradient sign at that point is used for the rest of the plot. This explains why, in the $\ell _ { \infty }$ settings, SignHunter’s plot does not improve compared to its $\ell _ { 2 }$ counterpart, as most of the attacks are successful in the very first few queries made to the loss oracle and no further refined estimation is required. Another possible reason is that the gradient direction can be very local and does not capture the global loss landscape compared to SignHunter’s estimation. More on this is discussed in Section 6.
|
| 133 |
+
|
| 134 |
+
SignHunter vs. Rand. Given these results, one could argue that SignHunter is effective, because it maximally perturbs datapoints to the vertices of their perturbation balls.6 However, Rand’s poor performance does not support this argument and highlights the effectiveness of SignHunter’s adaptive query construction. Except for MNIST and CIFAR10 $\ell _ { \infty }$ settings, Rand performs worse than the full-gradient estimation approaches, although it perturbs datapoints similar to SignHunter. Overall, SignHunter is $3 . 8 \times$ less failure-prone than the state-of-the-art approaches combined, and spends over all the images (successful and unsuccessful attacks) $2 . 5 \times$ less queries.7
|
| 135 |
+
|
| 136 |
+
# 5 SI G NHU N T E R VS. DEFENSES
|
| 137 |
+
|
| 138 |
+
To complement Section 4, we evaluate SignHunter against adversarial training, a way to improve the robustness of DNNs (Madry et al., 2017). Specifically, we attacked the secret models used in public challenges for MNIST and CIFAR10. For IMAGENET, we used ensemble adversarial training, a method that argues security against black-box attacks based on transferability Tramèr et al. (2017a). Appendix E reports the same metrics used in Section 4 as well as a tabulated summary for the results discussed below.
|
| 139 |
+
|
| 140 |
+
Public MNIST Black-Box Attack Challenge. In line with the challenge setup, 10, 000 test images were used with an $\ell _ { \infty }$ perturbation bound of $\epsilon = 0 . 3$ . Although the secret model is released, we treated it as a black box similar to our experiments in Section 4. No maximum query budget was specified, so we set it to $5 , 0 0 0$ queries. This is equal to the number of iterations given to a PGD attack in the white-box setup of the challenge: 100-steps with 50 random restarts. SignHunter’s attacks resulted in the lowest model accuracy of $\mathbf { 9 1 . 4 7 \% }$ , outperforming all the submitted attacks to the challenge, with an average number of queries of 233 per successful attack. Note that the attacks submitted to the challenge are based on transferability and do not query the model of interest. On the other hand, the most powerful white-box attack by Wang et al. (2018)—as of May 15, 2019—resulted in a model accuracy of $8 8 . 4 2 \%$ . Further, a PGD attack with 5, 000 back-propagations achieves $8 9 . 6 2 \%$ in contrast to SignHunter’s $9 1 . 4 7 \%$ with just 5, 000 forward-propagations.
|
| 141 |
+
|
| 142 |
+
Public CIFAR10 Black-Box Attack Challenge. This challenge setup is similar to the above, but with an $\ell _ { \infty }$ perturbation bound of $\epsilon = 8$ . SignHunter’s attacks resulted in the lowest model accuracy of $4 7 . 1 6 \%$ , outperforming all the submitted attacks to the challenge, with an average number of queries of 569 per successful attack. Similar to the MNIST challenge, all the submitted attacks are based on transferability. On the other hand, the most powerful white-box attack by Zheng et al. (2018)—as of May 15, 2019—resulted in a model accuracy of $4 4 . 7 1 \%$ . Further, a PGD attack with 200 back-propagations achieves $4 5 . 2 1 \%$ in contrast to SignHunter’s $4 7 . 1 6 \%$ with 5, 000 forward-propagations.
|
| 143 |
+
|
| 144 |
+
Ensemble Adversarial Training on IMAGENET. In line with Tramèr et al. (2017a), we set $\epsilon =$ 0.0625 and report the ${ \mathbf { v } } 3 _ { \mathrm { a d v - e n s 4 } }$ model’s misclassification over 10,000 random images from IMAGENET’s validation set. After 20 queries, SignHunter achieves a top-1 error of $4 0 . 6 1 \%$ greater than the $3 3 . 4 \%$ rate of a series of black-box attacks (including PGD with 20 iterations) transferred from a substitute model. With 1000 queries, SignHunter breaks the model’s robustness with a top-1 error of $9 0 . 7 5 \%$ !
|
| 145 |
+
|
| 146 |
+
# 6 CHARACTERIZING ADVERSARIAL CONES WITH SI G NHU N T E R
|
| 147 |
+
|
| 148 |
+
Estimating the size of adversarial cones, the space of adversarial examples in the vicinity of a point, for a model has been a topic of interest by the machine learning community Tramèr et al. (2017a); Ma et al. (2018); Lu et al. (2018). The Gradient-Aligned Adversarial Subspace (GAAS) method Tramèr et al. (2017b) provides an approximation of the adversarial cone dimensionality by finding a set of orthogonal perturbations of norm $\epsilon$ that are all adversarial with respect to the model. By linearizing the model’s loss function, this is reduced to finding orthogonal vectors that are maximally aligned with its gradient $g ^ { * }$ —or its gradient sign $\pmb q ^ { * }$ in the $\ell _ { \infty }$ setup Tramèr et al. (2017a). In Figure 3, we reproduce (Tramèr et al., 2017a, Fig. 2) and show that aligning the orthogonal vectors with SignHunter’s estimation (we refer to this approach as SAAS) instead of aligning them with the gradient (GAAS) results in a better approximation of the adversarial cone for the two IMAGENET models considered earlier, even when the number of queries given to SignHunter is just a fraction of the dimensionality $n$ . Through its query-efficient finite-difference sign estimation, SignHunter is able to quickly capture the larger-scale variation of the loss landscape in the point’s neighborhood, rather than the infinitesimal point-wise variation that the gradient provides, which can be very local. This is important in adversarial settings, where the loss landscape is analyzed in the vicinity of the point Moosavi-Dezfooli et al. (2018); Tramèr et al. (2017a). One interesting observation at $k = 1$ (note here, $\pmb { r } _ { 1 } = \pmb { q } ^ { * }$ ) across all $\epsilon$ is that GAAS finds adversarial directions for fewer points against the ${ \tt V } 3 _ { \mathrm { a d v - e n s 4 } }$ model than the naturally trained model v3, whereas SAAS reports similar probability of adversarial directions for both. This contrast suggests that ensemble adversarial training Tramèr et al. (2017a) still exhibits the gradient masking effect, where the gradient poorly approximates the global loss landscape.
|
| 149 |
+
|
| 150 |
+
# 7 CONCLUSION
|
| 151 |
+
|
| 152 |
+
Assuming a black-box threat model, we studied the problem of generating adversarial examples for neural nets and proposed the gradient sign estimation problem as the core challenge in crafting these examples. We formulate the problem as a binary black-box optimization one: maximizing the directional derivative in the direction of $\{ \pm 1 \} ^ { n }$ vectors, approximated by the finite difference of the queries’ loss values. The separability property of the directional derivative helped us devise SignHunter, a query-efficient, tuning-free divide-and-conquer algorithm with a small memory footprint that is guaranteed to perform at least as well as FGSM after $O ( n )$ queries. No similar guarantee is found in the literature. In practice, SignHunter needs a mere fraction of this number of queries to craft adversarial examples. The algorithm is one of its kind to construct adaptive queries instead of queries that are based on i.i.d. random vectors. Robust to gradient masking, SignHunter can also be used to estimate the dimensionality of adversarial cones. Moreover, SignHunter achieves the highest evasion rate on two public black-box attack challenges and breaks a model that argues robustness against substitute-model attacks.
|
| 153 |
+
|
| 154 |
+

|
| 155 |
+
Figure 3: Two estimations of the $\ell _ { \infty }$ adversarial cones for two IMAGENET models: v3 and ${ \mathbf { v } } 3 _ { \mathrm { a d v - e n s } 4 }$ . The first estimation (GAAS: Gradient-Aligned Adversarial Subspace) finds $k$ orthogonal vectors maximally aligned with the gradient sign $\pmb q ^ { * }$ Tramèr et al. (2017a). The second (SAAS: SignHunter-Aligned Adversarial Subspace) finds $k$ orthogonal vectors that are maximally aligned with SignHunter’s $\pmb { s }$ (Algorithm 2, Line 8) after $1 , 0 0 0$ queries. Similar to (Tramèr et al., 2017a, Figure 2), for 500 correctly classified points $_ { \textbf { \em x } }$ and $\epsilon \in \{ 4 , 1 0 , 1 6 \}$ , we plot the probability that we find at least $k$ orthogonal vectors $\mathbf { \nabla } _ { \mathbf { r } _ { i } }$ —computed based on (Tramèr et al., 2017a, Lemma 7)—such that $| | \boldsymbol { r } _ { i } | | _ { \infty } = \epsilon$ and $\mathbf { \boldsymbol { x } } + \mathbf { \boldsymbol { r } } _ { i }$ is misclassified. For both models and for the same points $_ { \textbf { \em x } }$ , SAAS finds more orthogonal adversarial vectors $\mathbf { \nabla } _ { r _ { i } }$ than GAAS, thereby providing a better characterization of the space of adversarial examples in the vicinity of a point, albeit without a white-box access to the models.
|
| 156 |
+
|
| 157 |
+
# ACKNOWLEDGMENTS
|
| 158 |
+
|
| 159 |
+
This work was supported by the MIT-IBM Watson AI Lab. We would like to thank Shashank Srikant for his timely help. We are grateful for feedback from Nicholas Carlini and Zico Kolter.
|
| 160 |
+
|
| 161 |
+
# REFERENCES
|
| 162 |
+
|
| 163 |
+
Abdullah Al-Dujaili, Alex Huang, Erik Hemberg, and Una-May O’Reilly. Adversarial deep learning for robust detection of binary encoded malware. In 2018 IEEE Security and Privacy Workshops (SPW), pages 76–82. IEEE, 2018.
|
| 164 |
+
Jeremy Bernstein, Yu-Xiang Wang, Kamyar Azizzadenesheli, and Animashree Anandkumar. signSGD: Compressed optimisation for non-convex problems. In Jennifer Dy and Andreas Krause, editors, Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pages 560–569, Stockholmsmässan, Stockholm Sweden, 10–15 Jul 2018. PMLR. URL http://proceedings.mlr.press/v80/bernstein18a.html.
|
| 165 |
+
Arjun Nitin Bhagoji, Warren He, Bo Li, and Dawn Song. Exploring the space of black-box attacks on deep neural networks. arXiv preprint arXiv:1712.09491, 2017.
|
| 166 |
+
Battista Biggio and Fabio Roli. Wild patterns: Ten years after the rise of adversarial machine learning. Pattern Recognition, 84:317–331, 2018.
|
| 167 |
+
Battista Biggio, Igino Corona, Davide Maiorca, Blaine Nelson, Nedim Šrndic, Pavel Laskov, Giorgio Giacinto, ´ and Fabio Roli. Evasion attacks against machine learning at test time. In Joint European conference on machine learning and knowledge discovery in databases, pages 387–402. Springer, 2013.
|
| 168 |
+
Nicholas Carlini and David Wagner. Towards evaluating the robustness of neural networks. In 2017 IEEE Symposium on Security and Privacy (SP), pages 39–57. IEEE, 2017.
|
| 169 |
+
|
| 170 |
+
Pin-Yu Chen, Huan Zhang, Yash Sharma, Jinfeng Yi, and Cho-Jui Hsieh. Zoo: Zeroth order optimization based black-box attacks to deep neural networks without training substitute models. In Proceedings of the 10th ACM Workshop on Artificial Intelligence and Security, pages 15–26. ACM, 2017.
|
| 171 |
+
|
| 172 |
+
Jeremy Cohen, Elan Rosenfeld, and J. Zico Kolter. Certified adversarial robustness via randomized smoothing. arXiv:1902.02918v1, 2019.
|
| 173 |
+
|
| 174 |
+
Ian Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In International Conference on Learning Representations, 2015. URL http://arxiv.org/abs/1412. 6572.
|
| 175 |
+
|
| 176 |
+
Chuan Guo, Jacob R Gardner, Yurong You, Andrew Gordon Wilson, and Kilian Q Weinberger. Simple black-box adversarial attacks. arXiv preprint arXiv:1905.07121, 2019.
|
| 177 |
+
|
| 178 |
+
Jamie Hayes and George Danezis. Machine learning as an adversarial service: Learning black-box adversarial examples. CoRR, abs/1708.05207, 2017.
|
| 179 |
+
|
| 180 |
+
Elad Hazan, Adam Klivans, and Yang Yuan. Hyperparameter optimization: A spectral approach. arXiv preprint arXiv:1706.00764, 2017.
|
| 181 |
+
|
| 182 |
+
Andrew Ilyas, Logan Engstrom, Anish Athalye, and Jessy Lin. Black-box adversarial attacks with limited queries and information. In Jennifer Dy and Andreas Krause, editors, Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pages 2137– 2146, Stockholmsmässan, Stockholm Sweden, 10–15 Jul 2018. PMLR. URL http://proceedings. mlr.press/v80/ilyas18a.html.
|
| 183 |
+
|
| 184 |
+
Andrew Ilyas, Logan Engstrom, and Aleksander Madry. Prior convictions: Black-box adversarial attacks with bandits and priors. In International Conference on Learning Representations, 2019. URL https: //openreview.net/forum?id $=$ BkMiWhR5K7.
|
| 185 |
+
|
| 186 |
+
Alexey Kurakin, Ian J. Goodfellow, and Samy Bengio. Adversarial machine learning at scale. 2017. URL https://arxiv.org/abs/1611.01236.
|
| 187 |
+
|
| 188 |
+
Sijia Liu, Pin-Yu Chen, Xiangyi Chen, and Mingyi Hong. signSGD via zeroth-order oracle. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id= BJe-DsC5Fm.
|
| 189 |
+
|
| 190 |
+
Yanpei Liu, Xinyun Chen, Chang Liu, and Dawn Song. Delving into transferable adversarial examples and black-box attacks. arXiv preprint arXiv:1611.02770, 2016.
|
| 191 |
+
|
| 192 |
+
Pei-Hsuan Lu, Pin-Yu Chen, and Chia-Mu Yu. On the limitation of local intrinsic dimensionality for characterizing the subspaces of adversarial examples. arXiv preprint arXiv:1803.09638, 2018.
|
| 193 |
+
|
| 194 |
+
Xingjun Ma, Bo Li, Yisen Wang, Sarah M Erfani, Sudanthi Wijewickrema, Grant Schoenebeck, Dawn Song, Michael E Houle, and James Bailey. Characterizing adversarial subspaces using local intrinsic dimensionality. arXiv preprint arXiv:1801.02613, 2018.
|
| 195 |
+
|
| 196 |
+
Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. arXiv preprint arXiv:1706.06083, 2017.
|
| 197 |
+
|
| 198 |
+
Seungyong Moon, Gaon An, and Hyun Oh Song. Parsimonious black-box adversarial attacks via efficient combinatorial optimization. arXiv preprint arXiv:1905.06635, 2019.
|
| 199 |
+
|
| 200 |
+
Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, and Pascal Frossard. Deepfool: a simple and accurate method to fool deep neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2574–2582, 2016.
|
| 201 |
+
|
| 202 |
+
Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Jonathan Uesato, and Pascal Frossard. Robustness via curvature regularization, and vice versa. arXiv preprint arXiv:1811.09716, 2018.
|
| 203 |
+
|
| 204 |
+
Nina Narodytska and Shiva Prasad Kasiviswanathan. Simple black-box adversarial attacks on deep neural networks. In CVPR Workshops, volume 2, 2017.
|
| 205 |
+
|
| 206 |
+
Nicolas Papernot, Patrick McDaniel, Ian Goodfellow, Somesh Jha, Z Berkay Celik, and Ananthram Swami. Practical black-box attacks against machine learning. In Proceedings of the 2017 ACM on Asia Conference on Computer and Communications Security, pages 506–519. ACM, 2017.
|
| 207 |
+
|
| 208 |
+
Adi Shamir, Itay Safran, Eyal Ronen, and Orr Dunkelman. A simple explanation for the existence of adversarial examples with small hamming distance. arXiv preprint arXiv:1901.10861, 2019.
|
| 209 |
+
|
| 210 |
+
Florian Tramèr, Alexey Kurakin, Nicolas Papernot, Ian Goodfellow, Dan Boneh, and Patrick McDaniel. Ensemble adversarial training: Attacks and defenses. arXiv preprint arXiv:1705.07204, 2017a.
|
| 211 |
+
Florian Tramèr, Nicolas Papernot, Ian Goodfellow, Dan Boneh, and Patrick McDaniel. The space of transferable adversarial examples. arXiv preprint arXiv:1704.03453, 2017b.
|
| 212 |
+
Chun-Chen Tu, Paishun Ting, Pin-Yu Chen, Sijia Liu, Huan Zhang, Jinfeng Yi, Cho-Jui Hsieh, and Shin-Ming Cheng. Autozoom: Autoencoder-based zeroth order optimization method for attacking black-box neural networks. arXiv preprint arXiv:1805.11770, 2018.
|
| 213 |
+
Shiqi Wang, Yizheng Chen, Ahmed Abdou, and Suman Jana. Mixtrain: Scalable training of formally robust neural networks. arXiv preprint arXiv:1811.02625, 2018.
|
| 214 |
+
Chaowei Xiao, Bo Li, Jun-Yan Zhu, Warren He, Mingyan Liu, and Dawn Song. Generating adversarial examples with adversarial networks, 2018. URL https://openreview.net/forum?id $\equiv$ HknbyQbC-.
|
| 215 |
+
Yun-Bin Zhao. Sparse optimization theory and methods. CRC Press, an imprint of Taylor and Francis, Boca Raton, FL, 2018. ISBN 978-1138080942.
|
| 216 |
+
Tianhang Zheng, Changyou Chen, and Kui Ren. Distributionally adversarial attack. arXiv preprint arXiv:1808.05537, 2018.
|
| 217 |
+
|
| 218 |
+
# APPENDIX A. NOISY FGSM
|
| 219 |
+
|
| 220 |
+
This section shows the performance of the noisy FGSM on standard models (described in Section 1 of the main paper) on the MNIST, CIFAR10 and IMAGENET datasets. In Figure 4, we consider the $\ell _ { \infty }$ threat perturbation constraint. Figure 5 reports the performance for the 2 setup. Similar to Ilyas et al. (2019), for each $k$ in the experiment, the top $k$ percent of the signs of the coordinates—chosen either randomly (random- $- \operatorname { k }$ ) or by the corresponding magnitude $\lvert \partial L ( \mathbf { x } , y ) / \partial x _ { i } \rvert$ (top-k)—are set correctly, and the rest are set to $^ { - 1 }$ or $+ 1$ at random. The misclassification rate shown considers only images that were correctly classified (with no adversarial perturbation). In accordance with the models’ accuracy, there were 987, 962, and 792 such images for MNIST, CIFAR10, and IMAGENET out of the sampled 1000 images, respectively. These figures also serve as a validation for Theorem 1 of the main paper when compared to SignHunter’s performance shown in Appendix D.
|
| 221 |
+
|
| 222 |
+

|
| 223 |
+
Figure 4: Misclassification rate of three neural nets (for (a) MNIST, (b) CIFAR10, and (c) IMAGENET, respectively) on the noisy FGSM’s adversarial examples as a function of correctly estimated coordinates of $\mathrm { s i g n } ( \nabla _ { \pmb { x } } f ( \pmb { x } , y ) )$ on random 1000 images from the corresponding evaluation dataset, with the maximum allowed $\ell _ { \infty }$ perturbation $\epsilon$ being set to 0.3, 12, and 0.05, respectively. Across all the models, estimating the sign of the top $3 0 \%$ gradient coordinates (in terms of their magnitudes) is enough to achieve a misclassification rate of $\sim 7 0 \%$ . Note that Plot (c) is similar to Ilyas et al. (2019)’s Figure 1, but it is produced with TensorFlow rather than PyTorch.
|
| 224 |
+
|
| 225 |
+

|
| 226 |
+
Figure 5: Misclassification rate of three neural nets (for (a) MNIST, (b) CIFAR10, and (c) IMAGENET, respectively) on the noisy FGSM’s adversarial examples as a function of correctly estimated coordinates of $\mathrm { s i g n } ( \nabla _ { \pmb { x } } f ( \pmb { x } , y ) )$ on random 1000 images from the corresponding evaluation dataset, with the maximum allowed $\ell _ { 2 }$ perturbation $\epsilon$ being set to 3, 127, and 5, respectively. Compared to Figure 4, the performance on MNIST and CIFAR10 drops significantly.
|
| 227 |
+
|
| 228 |
+
# APPENDIX B. PROOFS FOR THEOREMS IN THE MAIN PAPER
|
| 229 |
+
|
| 230 |
+
In this section, we present a proof of Theorem 1 of Section 3. Note that the theorem makes the assumption that the finite difference is a good approximation of the directional derivative. This assumption has been the core concept behind most of the black-box adversarial attack algorithms and we state it here for completeness.
|
| 231 |
+
|
| 232 |
+
Theorem 1. (Optimality of SignHunter) Given $2 ^ { \lceil \log ( n ) + 1 \rceil }$ queries and that the directional derivative is well approximated by the finite-difference (Eq. 1 in the main paper), SignHunter is at least as effective as FGSM (Goodfellow et al., 2015) in crafting adversarial examples.
|
| 233 |
+
|
| 234 |
+
Proof. Based on the separability property of the directional derivative, the ith coordinate of the gradient sign vector can be recovered as follows: construct two binary codes $\textbf { \em u }$ and $_ { v }$ such that only their ith bit is different. Therefore, we have
|
| 235 |
+
|
| 236 |
+
$$
|
| 237 |
+
\begin{array} { r c l } { { q _ { i } ^ { * } = \mathrm { s i g n } ( g _ { i } ^ { * } ) } } & { { = } } & { { \left\{ \begin{array} { c l } { { u _ { i } } } & { { \mathrm { i f } \ D _ { u } L ( x , y ) > D _ { v } L ( x , y ) , } } \\ { { v _ { i } } } & { { \mathrm { o t h e r w i s e } \ . } } \end{array} \right. } } \end{array}
|
| 238 |
+
$$
|
| 239 |
+
|
| 240 |
+
From the definition of SignHunter, this is carried out for all the $n$ coordinates after $2 ^ { \lceil \log ( n ) + 1 \rceil }$ queries. Put it differently, after 2dlog(n)+1e queries, SignHunter has flipped every coordinate alone recovering its sign exactly as shown in Eq. 4 above. Therefore, the gradient sign vector is fully recovered, and one can employ the FGSM attack to craft an adversarial example. Note that this is under the assumption that our finite difference approximation of the directional derivative (Eq. 1 in the main paper) is good enough (or at least rank-preserving). □
|
| 241 |
+
|
| 242 |
+
# APPENDIX C. EXPERIMENTS SETUP
|
| 243 |
+
|
| 244 |
+
This section outlines the experiments setup. To ensure a fair comparison among the considered algorithms, we did our best in tuning their hyperparameters. Initially, the hyperparameters were set to the values reported by the corresponding authors, for which we observed suboptimal performance. We made use of a synthetic concave loss function to efficiently tune the algorithms for each dataset $\times$ perturbation constraint combination. The performance curves on the synthetic loss function using the tuned values of the hyperparameters did show consistency with the reported results from the literature. For instance, we noted that ZO-SignSGD converges faster than NES, and that BanditsTD outperformed the rest of the algorithms towards the end of query budget. Further, in our adversarial examples generation experiments, we observed failure rate and query efficiency in line with the algorithms’ corresponding papers—e.g., compare the performance of BanditsTD and NES in Table 9 of Appendix D with (Ilyas et al., 2019, Table 1). That said, we invite the community to provide their best tuned attacks.
|
| 245 |
+
|
| 246 |
+
Note that SignHunter does not have any hyperparameters to tune. The finite difference probe $\delta$ for SignHunter is set to the perturbation bound $\epsilon$ as it is used for for both computing the finite difference and crafting the adversarial examples—see Line 1 in Algorithm 2 of the main paper. This tuning-free setup of SignHunter offers a robust edge over the state-of-the-art black-box attacks, which often require expert knowledge to carefully tune their parameters.
|
| 247 |
+
|
| 248 |
+
Table 3 describes the general setup for the experiments. Table 2 lists the sources of the models we attacked in this work, while Tables 4, 5, 6, and 7 outline the algorithms’ hyperparameters. Figure 6 shows the performance of the considered algorithms on a synthetic concave loss function after tuning their hyperparameters. All experiments were run on a CUDA-enabled NVIDIA Tesla V100 16GB.
|
| 249 |
+
|
| 250 |
+
A possible explanation of SignHunter’s superb performance is that the synthetic loss function is well-behaved in terms of its gradient given an image. That is, most of gradient coordinates share the same sign, since pixels tend to have the same values and the optimal value for all the pixels is the same $\frac { { \pmb x } _ { m i n } + { \pmb x } _ { m a x } } { 2 }$ . Thus, SignHunter will recover the true gradient sign with as few queries as possible (recall the example in Section 3 of the main paper). Moreover, given the structure of the synthetic loss function, the optimal loss value is always at the boundary of the perturbation region; the boundary is where SignHunter samples its perturbations.
|
| 251 |
+
|
| 252 |
+
Table 2: Source of attacked models.
|
| 253 |
+
|
| 254 |
+
<table><tr><td>Model</td><td>Source</td></tr><tr><td>MNIST models</td><td> https://github.com/MadryLab/mnist_challenge</td></tr><tr><td>CIFAR10 models</td><td>https://github.com/MadryLab/cifarl0_challenge</td></tr><tr><td>IMAGENET- v3 model</td><td>https://bit .ly/2vYDc4X</td></tr><tr><td>IMAGENET- v3adv-ens4 model</td><td>https://bit.ly/2XWTdKx</td></tr></table>
|
| 255 |
+
|
| 256 |
+
Table 3: General setup for all the attacks
|
| 257 |
+
|
| 258 |
+
<table><tr><td>Value</td><td colspan="6"></td></tr><tr><td></td><td>MNIST</td><td></td><td colspan="2">CIFAR10</td><td colspan="2">IMAGENET</td></tr><tr><td>Parameter</td><td>lo</td><td>l2</td><td>l8</td><td>l2</td><td>l8</td><td>l2</td></tr><tr><td>ε (allowed perturbation)</td><td>0.3</td><td>3</td><td>12</td><td>127</td><td>0.05</td><td>5</td></tr><tr><td>Max allowed queries</td><td></td><td></td><td></td><td>10000</td><td></td><td></td></tr><tr><td>Evaluation/Test set size</td><td></td><td></td><td></td><td>1000</td><td></td><td></td></tr><tr><td>Data (pixel value) Range</td><td>[0,1]</td><td></td><td></td><td>[0,255]</td><td></td><td>[0,1]</td></tr></table>
|
| 259 |
+
|
| 260 |
+
Table 4: Hyperparameters setup for NES
|
| 261 |
+
|
| 262 |
+
<table><tr><td></td><td colspan="6">Value</td></tr><tr><td></td><td colspan="2">MNIST l l2</td><td colspan="2">CIFAR10</td><td colspan="2">IMAGENET</td></tr><tr><td>Hyperparameter</td><td></td><td></td><td>l</td><td>l2</td><td>lo</td><td>l2</td></tr><tr><td>δ(finite difference probe)</td><td>0.1</td><td>0.1</td><td>2.55</td><td>2.55</td><td>0.1</td><td>0.1</td></tr><tr><td>η (image lp learning rate)</td><td>0.1</td><td>1</td><td>2</td><td>127</td><td>0.02</td><td>2</td></tr><tr><td>q (number of finite difference estimations per step)</td><td>10</td><td>20</td><td>20</td><td>4</td><td>100</td><td>50</td></tr></table>
|
| 263 |
+
|
| 264 |
+
Table 5: Hyperparameters setup for ZO-SignSGD
|
| 265 |
+
|
| 266 |
+
<table><tr><td></td><td colspan="6">Value MNIST</td></tr><tr><td></td><td colspan="2">l l</td><td colspan="2">CIFAR10 lo</td><td colspan="2">IMAGENET lo</td></tr><tr><td>Hyperparameter</td><td></td><td></td><td></td><td>l</td><td></td><td>l2</td></tr><tr><td>δ(finite difference probe)</td><td>0.1</td><td>0.1</td><td>2.55</td><td>2.55</td><td>0.1</td><td>0.1</td></tr><tr><td>n (image lp learning rate)</td><td>0.1</td><td>0.1</td><td>2</td><td>2</td><td>0.02</td><td>0.004</td></tr><tr><td>q (number of finite difference estimations per step)</td><td>10</td><td>20</td><td>20</td><td>4</td><td>100</td><td>50</td></tr></table>
|
| 267 |
+
|
| 268 |
+
Table 6: Hyperparameters setup for BanditsTD
|
| 269 |
+
|
| 270 |
+
<table><tr><td></td><td colspan="6">Value MNIST</td></tr><tr><td></td><td colspan="2"></td><td colspan="2">CIFAR10</td><td colspan="2">IMAGENET</td></tr><tr><td>Hyperparameter</td><td>l</td><td>l2</td><td>lg</td><td>l</td><td>lg</td><td>l2</td></tr><tr><td>η (image lp learning rate)</td><td>0.03</td><td>0.01</td><td>5</td><td>12</td><td>0.01</td><td>0.1</td></tr><tr><td>δ(finite difference probe)</td><td>0.1</td><td>0.1</td><td>2.55</td><td>2.55</td><td>0.1</td><td>0.1</td></tr><tr><td>T (online convex optimization learning rate)</td><td>0.001</td><td>0.0001</td><td>0.0001</td><td>1e-05</td><td>0.0001</td><td>0.1</td></tr><tr><td>Tile size (data-dependent prior)</td><td>8</td><td>10</td><td>20</td><td>20</td><td>50</td><td>50</td></tr><tr><td>S(bandit exploration)</td><td>0.01</td><td>0.1</td><td>0.1</td><td>0.1</td><td>0.01</td><td>0.1</td></tr></table>
|
| 271 |
+
|
| 272 |
+
Table 7: Hyperparameters setup for SignHunter
|
| 273 |
+
|
| 274 |
+
<table><tr><td>MNIST</td><td colspan="6">Value</td></tr><tr><td></td><td>l8</td><td>l</td><td>CIFAR10 l</td><td>l</td><td></td><td>IMAGENET l2</td></tr><tr><td>Hyperparameter</td><td></td><td></td><td></td><td></td><td>lo</td><td></td></tr><tr><td>δ (finite difference probe)</td><td>0.3</td><td>3</td><td>12</td><td>127</td><td>0.05</td><td>5</td></tr></table>
|
| 275 |
+
|
| 276 |
+

|
| 277 |
+
Figure 6: Tuning testbed for the attacks. A synthetic loss function was used to tune the performance of the attacks over a random sample of 25 images for each dataset and $\ell _ { p }$ perturbation constraint. The plots above show the average performance of the tuned attacks on the synthetic loss function $L ( \mathbf { x } , y ) = - ( \mathbf { x } - \mathbf { x } ^ { * } ) ^ { T } ( \mathbf { x } - \mathbf { x } ^ { * } )$ , where $\begin{array} { r } { \pmb { x } ^ { * } = \frac { \pmb { x } _ { m i n } + \pmb { x } _ { m a x } } { 2 } } \end{array}$ using a query limit of 1000 queries for each image. Note that in all, Bandits $_ { T D }$ outperforms both NES and ZO-SignSGD. Also, we observe the same behavior reported by Liu et al. (2019) on the fast convergence of ZO-SignSGD compared to NES. We did not tune SignHunter; it does not have any tunable parameters.
|
| 278 |
+
|
| 279 |
+
# APPENDIX D. RESULTS OF ADVERSARIAL BLACK-BOX EXAMPLES GENERATION
|
| 280 |
+
|
| 281 |
+
This section shows results of our experiments in crafting adversarial black-box examples on standard models in the form of tables and performance traces, namely Figures 7, 8, and 9; and Tables 8, 9, and 10.
|
| 282 |
+
|
| 283 |
+
Table 8: Summary of attacks effectiveness on MNIST under $\ell _ { \infty }$ and $\ell _ { 2 }$ perturbation constraints, and with a query limit of 10, 000 queries. The Failure Rate $\in [ 0 , 1 ]$ column lists the fraction of failed attacks over 1000 images. The Avg. # Queries column reports the average number of queries made to the loss oracle only over successful attacks.
|
| 284 |
+
|
| 285 |
+
<table><tr><td></td><td colspan="2">Failure Rate</td><td colspan="2">Avg.#Queries</td></tr><tr><td>Attack</td><td>lo</td><td>l2</td><td>lo</td><td>l2</td></tr><tr><td>BanditsTD</td><td>0.68</td><td>0.59</td><td>328.00</td><td>673.16</td></tr><tr><td>NES</td><td>0.63</td><td>0.63</td><td>235.07</td><td>361.42</td></tr><tr><td>Rand</td><td>0.33</td><td>0.96</td><td>847.77</td><td>1144.74</td></tr><tr><td>SignHunter</td><td>0.00</td><td>0.04</td><td>11.06</td><td>1064.22</td></tr><tr><td>ZOSignSGD</td><td>0.63</td><td>0.75</td><td>157.00</td><td>881.08</td></tr></table>
|
| 286 |
+
|
| 287 |
+
Table 9: Summary of attacks effectiveness on CIFAR10 under $\ell _ { \infty }$ and $\ell _ { 2 }$ perturbation constraints, and with a query limit of 10, 000 queries. The Failure Rate $\in [ 0 , 1 ]$ column lists the fraction of failed attacks over 1000 images. The Avg. # Queries column reports the average number of queries made to the loss oracle only over successful attacks.
|
| 288 |
+
|
| 289 |
+
<table><tr><td></td><td colspan="2">Failure Rate</td><td colspan="2">Avg.#Queries</td></tr><tr><td>Attack</td><td>lo</td><td>l2</td><td>l</td><td>l2</td></tr><tr><td>BanditsTD</td><td>0.95</td><td>0.39</td><td>432.24</td><td>1201.85</td></tr><tr><td>NES</td><td>0.37</td><td>0.67</td><td>312.57</td><td>496.99</td></tr><tr><td>Rand</td><td>0.20</td><td>0.89</td><td>422.16</td><td>1018.17</td></tr><tr><td>SignHunter</td><td>0.07</td><td>0.21</td><td>121.00</td><td>692.39</td></tr><tr><td>ZOSignSGD</td><td>0.37</td><td>0.80</td><td>161.28</td><td>528.35</td></tr></table>
|
| 290 |
+
|
| 291 |
+
Table 10: Summary of attacks effectiveness on IMAGENET under $\ell _ { \infty }$ and $\ell _ { 2 }$ perturbation constraints, and with a query limit of 10, 000 queries. The Failure Rate $\in [ 0 , 1 ]$ column lists the fraction of failed attacks over 1000 images. The Avg. # Queries column reports the average number of queries made to the loss oracle only over successful attacks.
|
| 292 |
+
|
| 293 |
+
<table><tr><td></td><td colspan="2">Failure Rate</td><td colspan="2">Avg.#Queries</td></tr><tr><td>Attack</td><td>lo</td><td>l</td><td>l</td><td>l2</td></tr><tr><td>BanditsTD</td><td>0.07</td><td>0.11</td><td>1010.05</td><td>1635.55</td></tr><tr><td>NES</td><td>0.26</td><td>0.42</td><td>1536.19</td><td>1393.86</td></tr><tr><td>Rand</td><td>0.72</td><td>0.93</td><td>688.77</td><td>418.02</td></tr><tr><td>SignHunter</td><td>0.02</td><td>0.23</td><td>578.56</td><td>1985.55</td></tr><tr><td>ZOSignSGD</td><td>0.23</td><td>0.52</td><td>1054.98</td><td>931.15</td></tr></table>
|
| 294 |
+
|
| 295 |
+

|
| 296 |
+
Figure 7: Performance curves of attacks on MNIST for $\ell _ { \infty }$ (first column) and $\ell _ { 2 }$ (second column) perturbation constraints. Plots of Avg. Loss row reports the loss as a function of the number of queries averaged over all images. The Avg. Hamming Similarity row shows the Hamming similarity of the sign of the attack’s estimated gradient $\hat { \pmb { g } }$ with true gradient’s sign $\pmb q ^ { * }$ , computed as $1 - | | \mathrm { s i g n } ( \hat { \pmb g } ) - \pmb q ^ { * } \bar { | } | _ { H } / n$ and averaged over all images. Likewise, plots of the Avg. Cosine Similarity row show the normalized dot product of $\hat { \pmb { g } }$ and $g ^ { * }$ averaged over all images. The Success Rate row reports the attacks’ cumulative distribution functions for the number of queries required to carry out a successful attack up to the query limit of 10, 000 queries. The Avg. # Queries row reports the average number of queries used per successful image for each attack when reaching a specified success rate: the more effective the attack, the closer its curve is to the bottom right of the plot.
|
| 297 |
+
|
| 298 |
+

|
| 299 |
+
Figure 8: Performance curves of attacks on CIFAR10 for $\ell _ { \infty }$ (first column) and $\ell _ { 2 }$ (second column) perturbation constraints. Plots of Avg. Loss row reports the loss as a function of the number of queries averaged over all images. The Avg. Hamming Similarity row shows the Hamming similarity of the sign of the attack’s estimated gradient $\hat { \pmb { g } }$ with true gradient’s sign $\pmb q ^ { * }$ , computed as $1 - | | \mathrm { s i g n } ( \hat { \pmb g } ) - \pmb q ^ { * } \bar { | } | _ { H } / n$ and averaged over all images. Likewise, plots of the Avg. Cosine Similarity row show the normalized dot product of $\hat { \pmb { g } }$ and $g ^ { * }$ averaged over all images. The Success Rate row reports the attacks’ cumulative distribution functions for the number of queries required to carry out a successful attack up to the query limit of 10, 000 queries. The Avg. # Queries row reports the average number of queries used per successful image for each attack when reaching a specified success rate: the more effective the attack, the closer its curve is to the bottom right of the plot.
|
| 300 |
+
|
| 301 |
+

|
| 302 |
+
Figure 9: Performance curves of attacks on IMAGENET for $\ell _ { \infty }$ (first column) and $\ell _ { 2 }$ (second column) perturbation constraints. Plots of $A \nu g$ . Loss row reports the loss as a function of the number of queries averaged over all images. The Avg. Hamming Similarity row shows the Hamming similarity of the sign of the attack’s estimated gradient $\hat { \pmb { g } }$ with true gradient’s sign $\pmb q ^ { * }$ , computed as $1 - | | \mathrm { s i g n } ( \hat { \pmb g } ) - \pmb q ^ { * } \bar { | } | _ { H } / n$ and averaged over all images. Likewise, plots of the Avg. Cosine Similarity row show the normalized dot product of $\hat { \pmb { g } }$ and $g ^ { * }$ averaged over all images. The Success Rate row reports the attacks’ cumulative distribution functions for the number of queries required to carry out a successful attack up to the query limit of 10, 000 queries. The Avg. # Queries row reports the average number of queries used per successful image for each attack when reaching a specified success rate: the more effective the attack, the closer its curve is to the bottom right of the plot.
|
| 303 |
+
|
| 304 |
+
# APPENDIX E. PUBLIC BLACK-BOX CHALLENGE RESULTS
|
| 305 |
+
|
| 306 |
+
This section shows results of our experiments in crafting adversarial black-box examples on adversarially trained models in the form of tables and performance traces, namely Tables 11, 12, 13, and Figure 10.
|
| 307 |
+
|
| 308 |
+
Table 11: Leaderboard of the MNIST black-box challenge. Adapted from the challenge’s website—as of May 15, 2019.
|
| 309 |
+
|
| 310 |
+
<table><tr><td>Black-Box Attack</td><td>Model Accuracy</td></tr><tr><td>SignHunter (Algorithm 2 in the main paper)</td><td>91.47%</td></tr><tr><td>Xiao et al. (2018)</td><td>92.76%</td></tr><tr><td>PGD against 3 independently & adversarially trained copies of the net- work</td><td>93.54%</td></tr><tr><td>FGSM on the CW loss for model B from (Tramer et al., 2017a)</td><td>94.36%</td></tr><tr><td>FGSM on the CW loss for the naturally trained public network</td><td>96.08%</td></tr><tr><td>PGD on the cross-entropy loss for the naturally trained public network</td><td>96.81%</td></tr><tr><td>Attack using Gaussian Filter for selected pixels on the adversarially trained public network</td><td>97.33%</td></tr><tr><td>FGSM on the cross-entropy loss for the adversarially trained public network</td><td>97.66%</td></tr><tr><td>PGD on the cross-entropy loss for the adversarially trained public net- work</td><td>97.79%</td></tr></table>
|
| 311 |
+
|
| 312 |
+
Table 12: Leaderboard of the CIFAR10 black-box challenge. Adapted from the challenge’s website— as of May 15, 2019.
|
| 313 |
+
|
| 314 |
+
<table><tr><td>Black-Box Attack</td><td>Model Accuracy</td></tr><tr><td>SignHunter (Algorithm 2 in the main paper)</td><td>47.16%</td></tr><tr><td>PGD on the cross-entropy loss for the adversarially trained public net- work</td><td>63.39%</td></tr><tr><td>PGD on the CW loss for the adversarially trained public network</td><td>64.38%</td></tr><tr><td>FGSM on the CW loss for the adversarially trained public network</td><td>67.25%</td></tr><tr><td>FGSM on the CW loss for the naturally trained public network</td><td>85.23%</td></tr></table>
|
| 315 |
+
|
| 316 |
+
Table 13: Top 1 Error Percentage. The numbers between brackets are computed on 10,000 images from the validation set. The rest are from (Tramèr et al., 2017a, Table 4).
|
| 317 |
+
|
| 318 |
+
<table><tr><td rowspan="2">Model</td><td rowspan="2">clean</td><td rowspan="2">Max. Black-box</td><td colspan="2">SignHunter</td></tr><tr><td>after 20 queries</td><td>after 1000 queries</td></tr><tr><td>v3adv-ens4</td><td>24.2 (26.73)</td><td>33.4</td><td>(40.61)</td><td>(90.75)</td></tr></table>
|
| 319 |
+
|
| 320 |
+

|
| 321 |
+
Figure 10: Performance curves of attacks on the public black-box challenges for MNIST (first column), CIFAR10 (second column) and IMAGENET (third column). Plots of Avg. Loss row reports the loss as a function of the number of queries averaged over all images. The Avg. Hamming Similarity row shows the Hamming similarity of the sign of the attack’s estimated gradient $\hat { \pmb { g } }$ with true gradient’s sign $\pmb q ^ { * }$ , computed as $\bar { 1 } - | | \mathrm { s i g n } ( \hat { \pmb g } ) - \pmb q ^ { * } | | _ { H } / n$ and averaged over all images. Likewise, plots of the Avg. Cosine Similarity row show the normalized dot product of $\hat { \pmb { g } }$ and $g ^ { * }$ averaged over all images. The Success Rate row reports the attacks’ cumulative distribution functions for the number of queries required to carry out a successful attack up to the query limit of 5, 000 queries for MNIST and CIFAR10 (1, 000 queries for IMAGENET). The Avg. # Queries row reports the average number of queries used per successful image for each attack when reaching a specified success rate: the more effective the attack, the closer its curve is to the bottom right of the plot.
|
| 322 |
+
|
| 323 |
+
# APPENDIX F. HISTOGRAM OF GRADIENT COORDINATES’ MAGNITUDES
|
| 324 |
+
|
| 325 |
+
This section illustrates our experiment on the distribution of the magnitudes of gradient coordinates as summarized in Figure 11. How to read the plots: Consider the first histogram in Plot (a) from below; it corresponds to the $\mathsf { \bar { 1 0 0 0 } } ^ { t h }$ image from the sampled MNIST evaluation set, plotting the histogram of the values $\{ | \partial L ( \pmb { x } , y ) / \partial x _ { i } | \} _ { 1 \leq i \leq n }$ , where the MNIST dataset has dimensionality $n = 7 8 4$ . These values are in the range $[ 0 , 0 . 0 0 2 ]$ . Overall, the values are fairly concentrated—with exceptions, in Plot (e) for instance, the magnitudes of the $\sim 4 0 0 ^ { t h }$ image’s gradient coordinates are spread from 0 to $\sim 0 . 0 5 5$ .
|
| 326 |
+
|
| 327 |
+

|
| 328 |
+
Figure 11: Magnitudes of gradient coordinates are concentrated: Plots (a), (b), and (c) show histograms of the magnitudes of gradient coordinates of the loss function $L ( { \pmb x } , y )$ with respect to the input point (image) $_ { \textbf { \em x } }$ for MNIST, CIFAR10, and IMAGENET neural net models over 1000 images from the corresponding evaluation set, respectively. Plots (d), (e), (f) show the same but at input points (images) sampled randomly within $\bar { \boldsymbol B } _ { \infty } ( { \pmb x } , \bar { \boldsymbol \epsilon } )$ : the $\ell _ { \infty }$ -ball of radius $\epsilon = 0 . 3$ , 12, and 0.05 around the images in Plots (a), (b), and (c), respectively.
|
| 329 |
+
|
| 330 |
+
# APPENDIX G. ON SCHEMES FOR SIGN FLIPS
|
| 331 |
+
|
| 332 |
+
In this section, we show the performance of different sign flip schemes in comparison to SignHunter. Results are summarized in Figure 12. SignHunter’s adaptive flips shows a clear advantage over other schemes despite having a worse upper-bound on the query complexity—e.g., Naive can retrieve the signs in $n + 2$ queries, as discussed in Section 3.
|
| 333 |
+
|
| 334 |
+

|
| 335 |
+
Figure 12: Performance of different sign flips patterns for Algorithm 2, Line 8 in the $\ell _ { \infty }$ and $\ell _ { 2 }$ perturbation constraints: our proposition (SignHunter), random sign flips (Rand), sequential single sign flips (Naive), stochastic hill climbing (SHC), which is similar to Rand but retain the flip only if it is better in terms of the observed model loss. With higher dimensions, SHC is comparable to SignHunter but does not enjoy a deterministic upper-bound on the query complexity.
|
| 336 |
+
|
| 337 |
+
# APPENDIX H. SIGNHUNTER AND RECENT RELATED WORK
|
| 338 |
+
|
| 339 |
+
In this section, we discuss recent work related to our proposition.
|
| 340 |
+
|
| 341 |
+
Parsimonious Black-Box Adversarial Attacks (Moon et al., 2019). Our experiment on the public CIFAR10 black-box attack challenge corresponds to [1, Table 1]. The authors report a $4 8 \%$ success rate $5 2 \%$ model accuracy) with an average number of queries of 1261. On the other hand, our proposed algorithm achieves a $5 2 . 8 4 \%$ success rate $( 4 7 . 1 6 \%$ model accuracy) with an average number of queries of 569. Further, (Moon et al., 2019, Table 2) corresponds to our results in Appendix D, Table 9; the paper reports a $9 8 . 5 \%$ success rate with an average number of queries of 722. Our proposed algorithm achieves a $9 8 \%$ success rate with 578.56 average number of queries. Based on these numbers, SignHunter demonstrates better performance than (Moon et al., 2019)’s attack.
|
| 342 |
+
|
| 343 |
+
Simple Black-Box Attack (SIMBA) (Guo et al., 2019). The main distinction is that SIMBA performs a ternary flip over $\{ - \delta , 0 , + \delta \}$ for one random single coordinate at an iteration with $\delta \leq \epsilon$ . On the other hand, SignHunter performs a binary flip $\{ - \epsilon , \epsilon \}$ for a group of coordinates at an iteration. Most of Guo et al. (2019)’s experiments were performed for the $\ell _ { 2 }$ perturbation constraint and against models different from those considered in this paper—except for the IMAGENET v3 model, which the authors find much more difficult to attack. The v3 curves at $1 0 , 0 0 0$ queries in (Guo et al., 2019, Figure 4) for SIMBA (and its variant SIMBA-DCT) look comparable to SignHunter’s of Figure 9. For completeness, we implemented SIMBA and evaluated it against the CIFAR10 model in Section 4. The results are shown in Figure 13. In line with Guo et al. (2019), SIMBA is a strong baseline in the $\ell _ { 2 }$ setup. However, its performance drops significantly in the $\ell _ { \infty }$ setup.
|
| 344 |
+
|
| 345 |
+

|
| 346 |
+
Figure 13: Performance of SIMBA and SignHunter in the $\ell _ { \infty }$ and $\ell _ { 2 }$ perturbation settings of Section 4 on CIFAR10. The plots show the average number of queries used per successful image for each attack when reaching a specified success rate. In line with Guo et al. (2019), we used a step size of $\delta = 5 0$ for $\ell _ { 2 }$ (the authors used $\delta = 0 . 2$ for $[ 0 , 1 ]$ -valued pixels, our setup takes images in $[ 0 , 2 5 5 ]$ so $\delta = 0 . 2 * 2 5 5 \sim 5 0 )$ . For $\ell _ { \infty }$ , we used $\delta = 2$ , following NES’s setup in Table 4.
|
| 347 |
+
|
| 348 |
+
Harmonica (Hazan et al., 2017). Both SignHunter and Harmonica seek to optimize a black-box function over the binary hypercube $\{ \pm 1 \} ^ { n }$ , albeit with different assumptions on the objective function. Harmonica assumes that the objective function can be approximated by a sparse and low degree polynomial in the Fourier basis. Our assumption with SignHunter is that the objective function is separable (Property 1, Section 3), this lets us optimize the black-box function with $O ( n )$ queries given an initial guess instead of searching over the $2 ^ { n }$ vertices. If this assumption is not met, we can restart SignHunter with another guess with a search complexity of $O ( m n )$ where $m$ is the number of restarts. With this difference in assumptions of the two algorithms, we conducted an empirical comparison using the two sample problems provided along with Harmonica’s authors implementation. As shown in Table 14 , the results show that SignHunter optimizes the two problems with $8 \times$ less number of queries than Harmonica, not to mention the significant computational advantage.
|
| 349 |
+
|
| 350 |
+
Table 14: Performance comparison of SignHunter and Harmonica on two sample problems from https://github.com/callowbird/Harmonica. The lower solution quality, the better.
|
| 351 |
+
|
| 352 |
+
<table><tr><td></td><td>Algorithm</td><td>Solution Quality</td><td>#queries</td><td>Time per Query</td></tr><tr><td rowspan="2">Problem 1</td><td>Harmonica</td><td>-50.0</td><td>4223</td><td>67.47 ms</td></tr><tr><td>SignHunter</td><td>-50.0</td><td>20</td><td>36.30μs</td></tr><tr><td rowspan="2">Problem 2</td><td>Harmonica</td><td>-916.22</td><td>4223</td><td>60.22 ms</td></tr><tr><td>SignHunter</td><td>-916.21</td><td>500</td><td>584.28μs</td></tr></table>
|
| 353 |
+
|
| 354 |
+
# APPENDIX I. ON THE $\ell _ { 2 } - \ell _ { \infty }$ PERFORMANCE GAP
|
| 355 |
+
|
| 356 |
+
As discussed in Section 4, in an $\epsilon - \ell _ { 2 }$ threat setup, black-box attacks that are based on continuous optimization (e.g., NES and BanditsTD) can vary each pixel √ √ $_ x$ within $[ x - \epsilon , x + \epsilon ]$ . On the other hand, SignHunter is restricted to $[ x - \epsilon / \sqrt { n } , x + \epsilon / \sqrt { n } ]$ . In other words, SignHunter in $\epsilon - \ell _ { 2 }$ perturbation setup behaves exactly the same when used in $\epsilon / \sqrt { n } - \ell _ { \infty }$ perturbation setup. This is illustrated in Figure 14
|
| 357 |
+
|
| 358 |
+
To highlight the additional perturbation space that other algorithms have over SignHunter in the $\ell _ { 2 }$ setup, we ran NES and Bandit $_ { S T D }$ as representative examples of standard and dimensionality-reduction-based algorithms against the CIFAR10 model used in Section 4 with an $\ell _ { \infty }$ perturbation setup of $\epsilon = 1 2 7 / \sqrt { n }$ . In this and and the $\ell _ { 2 }$ setup used in Section 4, SignHunter behaves the same, while the performance of NES and Bandits $_ { T D }$ drops significantly from their $\ell _ { 2 }$ performance due to the reduction in the perturbation space.
|
| 359 |
+
|
| 360 |
+
A possible fix to allow SignHunter to access the additional search space introduced in the $\ell _ { 2 }$ setup is to extend the notion of binary sign flips over $\{ + 1 , - 1 \}$ to ternary sign flips over $\{ + 1 , 0 , - 1 \}$ and we intend to explore this thoroughly in a future work.
|
| 361 |
+
|
| 362 |
+

|
| 363 |
+
Figure 14: Illustration of adversarial examples crafted by SignHunter in comparison to attacks that are based on the continuous optimization (e.g., NES and Bandit√ $S T D$ ) in both (a) $\ell _ { \infty }$ and (b) $\ell _ { 2 }$ settings. For both ${ \epsilon { - } } { \ell _ { 2 } }$ and $\epsilon / \sqrt { n } – \ell _ { \infty }$ perturbation balls, SignHunter behaves the same, while continuous attacks such as NES have access to more possible perturbations in the $\ell _ { 2 }$ setup compared to their perturbations in the $\ell _ { \infty }$ setup. This is demonstrated on CIFAR10 in Figure 15.
|
| 364 |
+
|
| 365 |
+

|
| 366 |
+
Figure 15: Performance of black-box attacks in the $\ell _ { \infty }$ and $\ell _ { 2 }$ perturbation constraints. The plots show the average number of queries used per successful image for each attack when reaching a specified success rate. Note that (b) is similar to the $\ell _ { 2 }$ setup examined in Section 4.
|
md/train/SyjjD1WRb/SyjjD1WRb.md
ADDED
|
@@ -0,0 +1,299 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# EVOLUTIONARY EXPECTATION MAXIMIZATION FOR GENERATIVE MODELS WITH BINARY LATENTS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
We establish a theoretical link between evolutionary algorithms and variational parameter optimization of probabilistic generative models with binary hidden variables. While the novel approach is independent of the actual generative model, here we use two such models to investigate its applicability and scalability: a noisy-OR Bayes Net (as a standard example of binary data) and Binary Sparse Coding (as a model for continuous data). Learning of probabilistic generative models is first formulated as approximate maximum likelihood optimization using variational expectation maximization (EM). We choose truncated posteriors as variational distributions in which discrete latent states serve as variational parameters. In the variational E-step, the latent states are then optimized according to a tractable free-energy objective. Given a data point, we can show that evolutionary algorithms can be used for the variational optimization loop by (A) considering the bit-vectors of the latent states as genomes of individuals, and by (B) defining the fitness of the individuals as the (log) joint probabilities given by the used generative model. As a proof of concept, we apply the novel evolutionary EM approach to the optimization of the parameters of noisy-OR Bayes nets and binary sparse coding on artificial and real data (natural image patches). Using point mutations and single-point cross-over for the evolutionary algorithm, we find that scalable variational EM algorithms are obtained which efficiently improve the data likelihood. In general we believe that, with the link established here, standard as well as recent results in the field of evolutionary optimization can be leveraged to address the difficult problem of parameter optimization in generative models.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Evolutionary algorithms (EA) have been introduced (e.g. Fogel et al., 1966; Rechenberg, 1965) as a technique for function optimization using methods inspired by biological evolutionary processes such as mutation, recombination, and selection. As such EAs are of interest as tools to solve Machine Learning problems, and they have been frequently applied to a number of tasks such as clustering (Pernkopf & Bouchaffra, 2005; Hruschka et al., 2009), reinforcement learning (Salimans et al., 2017), and hierarchical unsupervised (Myers et al., 1999) or deep supervised learning (e.g., Stanley & Miikkulainen 2002 and Suganuma et al. 2017; Real et al. 2017 for recent examples). In some of these tasks EAs have been investigated as alternatives to standard procedures (Hruschka et al., 2009), but most frequently EAs are used to solve specific sub-problems. For example, for classification with Deep Neural Networks (DNNs LeCun et al., 2015; Schmidhuber, 2015), EAs are frequently applied to solve the sub-problem of selecting the best DNN architectures for a given task (e.g. Stanley & Miikkulainen, 2002; Suganuma et al., 2017) or more generally to find the best hyper-parameters of a DNN (e.g. Loshchilov & Hutter, 2016; Real et al., 2017).
|
| 12 |
+
|
| 13 |
+
Inspired by these previous contributions, we here ask if EAs and learning algorithms can be linked more tightly. To address this question we make use of the theoretical framework of probabilistic generative models and expectation maximization (EM Dempster et al., 1977) approaches for parameter optimization. The probabilistic approach in combination with EM is appealing as it establishes a very general unifying framework able to encompass diverse algorithms from clustering and dimensionality reduction (Roweis, 1998; Tipping & Bishop, 1999) over feature learning and sparse coding (Olshausen & Field, 1997) to deep learning approaches (Patel et al., 2016). However, for most generative data models, EM is computationally intractable and requires approximations. Variational
|
| 14 |
+
|
| 15 |
+
EM is a very prominent such approximation and is continuously further developed to become more efficient, more accurate and more autonomously applicable. Variational EM seeks to approximately solve optimization problems of functions with potentially many local optima in potentially very high dimensional spaces. The key observation exploited in this study is that a variational EM algorithm can be formulated such that latent states serve as variational parameters. If the latent states are then considered as genomes of individuals, EAs emerge as a very natural choice for optimization in the variational loop of EM.
|
| 16 |
+
|
| 17 |
+
# 2 TRUNCATED VARIATIONAL EM
|
| 18 |
+
|
| 19 |
+
A probabilistic generative model stochastically generates data points $\vec { y }$ using a set of hidden (or latent) variables $\vec { s } ,$ . The generative process can be formally expressed in the form of joint probability $p ( \vec { s } , \vec { y } | \Theta )$ , where $\Theta$ are the model parameters. Given a set of $N$ data points, $\vec { y } ^ { ( 1 ) } , \dotsc , \vec { y } ^ { ( N ) } =$ $\vec { y } ^ { ( 1 : N ) }$ , learning seeks to change the parameters $\Theta$ so that the data generated by the generative model becomes as similar as possible to the $N$ real data points. One of the most popular approaches to achieve this goal is to seek maximum likelihood (ML) parameters $\Theta ^ { * }$ , i.e., parameters that maximize the data log-likelihood for a given generative model:
|
| 20 |
+
|
| 21 |
+
$$
|
| 22 |
+
L ( \Theta ) : = \log ( \mathcal { L } ( \Theta ) ) = \sum _ { n } \log \big ( \sum _ { \{ \vec { s } \} } p \left( \vec { y } ^ { n } , \vec { s } \mid \Theta \right) \big )
|
| 23 |
+
$$
|
| 24 |
+
|
| 25 |
+
To efficiently find (approximate) ML parameters we follow Saul & Jordan (1996); Neal & Hinton (1998); Jordan et al. (1999) who reformulated the problem in terms of a maximization of a lower bound of the log-likelihood, the free energy $\mathcal { F } ( \vec { q } , \Theta )$ . Free energies are given by
|
| 26 |
+
|
| 27 |
+
$$
|
| 28 |
+
\mathcal { F } ( q ^ { ( 1 : N ) } , \Theta ) = \sum _ { n = 1 } ^ { N } \Big ( \sum _ { \{ \vec { s } \} } q ^ { ( n ) } ( \vec { s } ) \log \big ( p ( \vec { s } , \vec { y } ^ { ( n ) } | \Theta ) \big ) \Big ) + \sum _ { n = 1 } ^ { N } H ( q ^ { ( n ) } ( \vec { s } ) ) ,
|
| 29 |
+
$$
|
| 30 |
+
|
| 31 |
+
where $q ^ { ( n ) } ( \vec { s } )$ are variational distributions, and where $H ( q )$ denotes the entropy of a distribution $q$ . For the purposes of this study, we consider elementary generative models which are difficult to train because of exponentially large state spaces. These models serve well for illustrating the approach but we stress that any generative model which gives rise to a joint distribution $p ( \bar { \vec { s } } , \bar { y } | \Theta ) \bar { \vec { s } }$ can be trained with the approach discussed here as long as the latents $\vec { s }$ are binary.
|
| 32 |
+
|
| 33 |
+
In order to find approximate maximum likelihood solutions, distributions $q ^ { ( n ) } ( \vec { s } )$ are sought that approximate the intractable posterior distributions $p ( \vec { s } | \vec { y } ^ { ( n ) } , \Theta )$ as well as possible, which results in the free-energy being as similar (or tight) as possible to the exact log-likelihood. At the same time variational distributions have to result in tractable parameter updates. Standard approaches include Gaussian variational distributions (e.g. Opper & Winther, 2005) or mean-field variational distributions (Jordan et al., 1999). If we denote the parameters of the variational distributions by $\Lambda$ , then a variational EM algorithm consists of iteratively maximizing $\mathcal { F } ( \Lambda , \Theta )$ w.r.t. $\Lambda$ in the variational E-step and w.r.t. $\Theta$ in the M-step. The M-step can hereby maintain the same functional form as for exact EM but the expectation values now have to be computed w.r.t. the variational distributions.
|
| 34 |
+
|
| 35 |
+
Instead of using parametric functions such as Gaussians or factored (mean-field) distributions, for our purposes we choose truncated variational distributions defined as a function of a finite set of states (Lucke & Eggert, 2010; Sheikh et al., 2014; Shelton et al., 2017). These states will later serve ¨ as populations of evolutionary algorithms. If we denote $\kappa ^ { n }$ a population of hidden states for a given data point $\vec { y } ^ { ( n ) }$ , then variational distributions and their corresponding expectation values are given by (e.g. Lucke & Eggert, 2010; Sheikh et al., 2014): ¨
|
| 36 |
+
|
| 37 |
+
$$
|
| 38 |
+
q ^ { n } ( \vec { s } \mid K ^ { n } , \Theta ) : = \frac { p \left( \vec { s } \mid \vec { y ^ { n } } , \Theta \right) } { \sum _ { \vec { s ^ { \prime } } \in K ^ { n } } p \left( \vec { s } ^ { \prime } \mid \vec { y ^ { n } } , \Theta \right) } \delta ( \vec { s } \in K ^ { n } ) , \langle g ( \vec { s } ) \rangle _ { q ^ { n } } = \frac { \sum _ { \vec { s } \in K ^ { n } } p ( \vec { s } , \vec { y ^ { n } } \mid \Theta ) g ( \vec { s } ) } { \sum _ { \vec { s ^ { \prime } } \in K ^ { n } } p ( \vec { s } ^ { \prime } , \vec { y ^ { n } } \mid \Theta ) } .
|
| 39 |
+
$$
|
| 40 |
+
|
| 41 |
+
where $\delta ( \vec { s } \in \mathcal { K } ^ { n } )$ is 1 if $\textstyle { \mathcal { K } } ^ { n }$ contains the hidden state $\vec { s }$ , zero otherwise. If the set $K ^ { n }$ contains all states with significant posterior mass, then (3) approximates expectations w.r.t. full posteriors very well. By inserting truncated distributions as variational distribution of the free-energy (2), it can be
|
| 42 |
+
|
| 43 |
+
shown (Lucke, 2016) that the free-energy takes a very compact simplified form given by: ¨
|
| 44 |
+
|
| 45 |
+
$$
|
| 46 |
+
\mathcal { F } ( \mathcal { K } , \Theta ) = \sum _ { n } \log \big ( \sum _ { \vec { s } \in \mathcal { K } ^ { n } } p \left( \vec { y } ^ { n } , \vec { s } \mid \Theta \right) \big ) , \mathrm { ~ w h e r e ~ } \mathcal { K } = ( \mathcal { K } ^ { 1 } , \ldots , \mathcal { K } ^ { N } ) .
|
| 47 |
+
$$
|
| 48 |
+
|
| 49 |
+
As the variational parameters of the variational distribution (3) are now given by populations of hidden states, a variational $\mathrm { E }$ -step now consists of finding for each data point $n$ the population $\textstyle { \mathcal { K } } ^ { n }$ that maximizes $\begin{array} { r } { \sum _ { \vec { s } \in \mathcal { K } ^ { n } } p ( \vec { y } ^ { n } , \vec { s } \Theta ) } \end{array}$ .
|
| 50 |
+
|
| 51 |
+
# 3 EVOLUTIONARY OPTIMIZATION
|
| 52 |
+
|
| 53 |
+
For the generative models considered here, each latent state $\vec { s }$ takes the form of a bit vector. Hence, each population $\kappa ^ { n }$ is a collection of bit vectors. Because of the specific form (4), the free-energy is increased in the variational E-step if and only if we replace and individual $\vec { s }$ in population ${ \boldsymbol { \kappa } } ^ { ( n ) }$ by a new individual $\vec { s } ^ { \mathrm { n e w } }$ so far not in ${ \boldsymbol { \kappa } } ^ { ( n ) }$ such that:
|
| 54 |
+
|
| 55 |
+
$$
|
| 56 |
+
p ( \vec { s } ^ { \mathrm { n e w } } , \vec { y } ^ { n } | \Theta ) > p ( \vec { s } , \vec { y } ^ { n } | \Theta ) .
|
| 57 |
+
$$
|
| 58 |
+
|
| 59 |
+
More generally, this means that the free energy is maximized in the variational E-step if we find for each $n$ those $S$ individuals with the largest joints $p ( \vec { s } , \vec { y } ^ { n } | \Theta )$ , where $p ( \vec { s } , \vec { y } ^ { n } | \Theta )$ is given by the respective generative model (compare Lucke, 2016; Forster & L ¨ ucke, 2017, for formal derivations). ¨
|
| 60 |
+
|
| 61 |
+
Full maximization of the free-energy is often a computationally much harder problem than increasing the free-energy; and in practice an increase is usually sufficient to finally approximately maximize the likelihood. As we increase the free-energy by applying (5) we can choose any fitness function $F ( \vec { s } ; \vec { y } ^ { n } , \Theta )$ for an evolutionary optimization which fulfils the property:
|
| 62 |
+
|
| 63 |
+
$$
|
| 64 |
+
\begin{array} { r l r } { F ( \bar { s } ^ { \mathrm { n e w } } ; \vec { y } ^ { n } , \Theta ) } & { > } & { F ( \vec { s } ; \vec { y } ^ { n } , \Theta ) \qquad \Leftrightarrow \qquad p ( \vec { s } ^ { \mathrm { n e w } } , \vec { y } ^ { n } | \Theta ) \quad > \quad p ( \vec { s } , \vec { y } ^ { n } | \Theta ) . } \end{array}
|
| 65 |
+
$$
|
| 66 |
+
|
| 67 |
+
Any mutations selected such that the fitness $F ( \vec { s } ; \vec { y } ^ { n } , \Theta )$ increases will result in provably increased free-energies. Together with M-step optimizations of model parameters, the resulting variational EM algorithm will monotonously increase the free-energy. The freedom in choosing a fitness function satisfying (6) leaves us free to pick a form that enables an efficient parent selection procedure. More concretely (while acknowledging that other choices are possible) we define the fitness $F ( \vec { s } ^ { \mathrm { n e w } } ; \vec { y } ^ { n } , \Theta )$ to be:
|
| 68 |
+
|
| 69 |
+
$$
|
| 70 |
+
F ( \vec { s } ) = F ( \vec { s } ; \vec { y } ^ { n } , \Theta ) = \widetilde { l o g P } ( \vec { s } ; \vec { y } ^ { n } , \Theta ) - 2 \operatorname* { m i n } _ { s } \widetilde { ( l o g P ( \vec { s } ; \vec { y } ^ { n } , \Theta ) ) }
|
| 71 |
+
$$
|
| 72 |
+
|
| 73 |
+
where $\widetilde { l o g P }$ is defined as the logarithm of the joint probability where summands that do not depend on the state $\vec { s }$ have been elided. $\widetilde { l o g P }$ is usually more efficiently computable than the joint probabilities and has better numerical stability, while being a monotonously increasing function of the joints when the data-point ${ \vec { y } } ^ { n }$ is considered fixed. As we will want to sample states proportionally to their fitness, an offset is applied to $\widetilde { l o g P }$ to make sure $F$ always takes positive values. As previously mentioned, other choices of $F$ are possible as long as (6) holds. From now on we will drop the argument ${ \vec { y } } ^ { n }$ or index $n$ (while keeping in mind that an optimization is performed for each data point ${ \vec { y } } ^ { n }$ ).
|
| 74 |
+
|
| 75 |
+
Our applied EAs then seek to optimize $F ( \vec { s } )$ for a population of individual $\kappa$ (we also drop the index $n$ here). More concretely, given the current population $\kappa$ of unique individuals $\vec { s } ,$ , the EA iteratively seeks a new set $\kappa \prime$ with higher overall fitness. For our models, $\vec { s }$ are bit-vectors of length $H$ , and we usually require that populations $\kappa \prime$ and $\kappa$ to have the same size as is customary for truncated approximations (e.g. Lucke & Eggert, 2010; Shelton et al., 2017). Our example algorithm includes ¨ three common genetic operators, discussed in more detail below: parent selection, generation of children by single-point crossover and stochastic mutation of the children. We repeat this process over $N _ { g }$ generations in which subsequent iterations use the output of previous iterations as input population.
|
| 76 |
+
|
| 77 |
+
Parent Selection. This step selects $N _ { p }$ parents from the population $\kappa$ . Ideally, the selection procedure should be balanced between exploitation of parents with high fitness (which will more likely produce children with high fitness) and exploration of mutations of poor performing parents (which might eventually produce children with high fitness while increasing population diversity). Diversity is crucial, as $\kappa$ is a set of unique individuals and therefore the improvement of the overall fitness of the population depends on generating different children with high fitness. In our numerical experiments we explored both fitness-proportional selection of parents (a classic strategy in which the probability of an individual being selected as a parent is proportional to its fitness) and random uniform selection of parents.
|
| 78 |
+
|
| 79 |
+

|
| 80 |
+
Figure 1: Components of the genetic algorithm.
|
| 81 |
+
until $\mathcal { F }$ has increased sufficiently
|
| 82 |
+
|
| 83 |
+
Crossover. During the crossover step, random pairs of parents are selected; then each pair is assigned a number $c$ from 1 to $H - 1$ with uniform probability (this is the single crossover point); finally the parents swap the last $H - c$ bits to produce the offspring. We denote $N _ { c }$ the number of children generated in this way. The crossover step can be skipped, making the EA more lightweight but decreasing variety in the offspring.
|
| 84 |
+
|
| 85 |
+
Mutation. Finally, each of the $N _ { c }$ children undergoes one or more random bitflips to further increase offspring diversity. In our experiments we compare results of random uniform selection of the bits to flip with a more refined sparsity-driven bitflip algorithm. This latter bitflip schemes assignes to 0’s and 1’s different probabilities of being flipped in order to produce children with a sparsity compatible with the one learned by the model. In case the crossover step is skipped, a different bitflip mutation is performed on $N _ { c }$ identical copies of each parent.
|
| 86 |
+
|
| 87 |
+
mization
|
| 88 |
+
choose initial model parameters $\Theta$ and initial sets ${ \boldsymbol { \kappa } } ^ { ( n ) }$
|
| 89 |
+
repeat for each data-point $n$ do candidates $= \{ \}$ for $g = 0$ to $N _ { g }$ do parents $=$ select parents children $=$ mutation(crossover(parents)) candidates $=$ candidates ∪ children K(n) select best(K(n) ∪ candidates) update $\Theta$ using M-steps with (3) and ${ \boldsymbol { \kappa } } ^ { ( n ) }$
|
| 90 |
+
|
| 91 |
+
A full run of the evolutionary algorithm therefore produces $N _ { g } N _ { c } N _ { p }$ children (or new states $\vec { s } ^ { * }$ ). Finally we compute the union set of the original population $\kappa$ with all children and select the $S$ fittest individuals of the union as the new population $\kappa \prime$ .
|
| 92 |
+
|
| 93 |
+
The EEM Algorithm. We now have all elements required to formulate a learning algorithm with EAs as its integral part. Alg. 1 summarizes the essential computational steps. Note that this E-step can be trivially parallelized over data-points. Finally, it is worth pointing out that algorithm 1, by construction, never decreases the free-energy.
|
| 94 |
+
|
| 95 |
+
# 4 THE GENERATIVE MODELS
|
| 96 |
+
|
| 97 |
+
We will use the EA formulated above as integral part of an unsupervised learning algorithm. The objective of the learning algorithm is the optimization of the log-likelihood 1. $D$ denotes the number of observed variables, $H$ the number of hidden units, and $N$ the number of data points.
|
| 98 |
+
|
| 99 |
+
Noisy-OR. The noisy-OR model is a highly non-linear bipartite data model with all-to-all connectivity among hidden and observable variables. All variables take binary values. The model assumes a Bernoulli prior for the latents, and active latents are then combined via the actual noisy-OR rule.
|
| 100 |
+
|
| 101 |
+
$$
|
| 102 |
+
\begin{array} { c } { { p \displaystyle ( \vec { s } \mid \Theta ) = \prod _ { h } \pi _ { h } ^ { s _ { h } } ( 1 - \pi _ { h } ) ^ { 1 - s _ { h } } } } \\ { { p \displaystyle ( \vec { y } \mid \vec { s } , \Theta ) = \prod _ { d } N _ { d } ( \vec { s } ) ^ { y _ { d } } ( 1 - N _ { d } ( \vec { s } ) ) ^ { 1 - y _ { d } } \quad \mathrm { w h e r e } \quad N _ { d } ( \vec { s } ) : = 1 - \prod _ { h } ( 1 - { \cal W } _ { d h } s _ { h } ) } } \end{array}
|
| 103 |
+
$$
|
| 104 |
+
|
| 105 |
+

|
| 106 |
+
Figure 2: A small Noisy-OR model. Each observable $y _ { d }$ is conditionally dependent on all $s _ { h }$ . The generative process first samples each $s _ { h }$ from a Bernoulli distribution; then each $y _ { d }$ is sampled from a Bernoulli distribution of parameter $N _ { d } ( \vec { s } )$ , generating a data-point.
|
| 107 |
+
|
| 108 |
+
In the context of the Noisy-OR model, $\Theta = \{ \vec { \pi } , \vec { W } \}$ , where $\vec { \pi }$ is the set of values $\pi _ { h } ~ \in ~ [ 0 , 1 ]$ representing the prior activation probabilities for the hidden variables $s _ { h }$ and $\vec { W }$ is a $D \times H$ matrix of values $W _ { d h } \in [ 0 , 1 ]$ representing the probability that the latent $s _ { h }$ activates the observable $y _ { d }$ .
|
| 109 |
+
|
| 110 |
+
Section A of the appendix contains the explicit forms of the free energies and the M-step update rules for noisy-OR.
|
| 111 |
+
|
| 112 |
+
Binary Sparse Coding. As a second model and one for continuous data, we consider Binary Sparse Coding (BSC; Henniges et al., 2010). BSC differs from standard Sparse Coding in its use of binary latent variables. The latents are assumed to follow a univariate Bernoulli distribution which uses the same activation probability for each hidden unit. The combination of the latents is described by a linear superposition rule. Given the latents, the observables are independently and identically drawn from a Gaussian distribution:
|
| 113 |
+
|
| 114 |
+
$$
|
| 115 |
+
p \left( \vec { s } \mid \Theta \right) = \prod _ { h = 1 } ^ { H } \pi ^ { s _ { h } } \left( 1 - \pi \right) ^ { 1 - s _ { h } } , \qquad p \left( \vec { y } \mid \vec { s } , \Theta \right) = \prod _ { d = 1 } ^ { D } \mathcal { N } ( y _ { d } ; \sum _ { h = 1 } ^ { H } W _ { d h } s _ { h } , \sigma ^ { 2 } ) .
|
| 116 |
+
$$
|
| 117 |
+
|
| 118 |
+
The parameters of the model are $\Theta = ( \pi , W , \sigma ^ { 2 } )$ , where $W$ is a $D \times H$ matrix whose columns contain the weights associated with each hidden unit $s _ { h }$ and where $\sigma ^ { 2 }$ determines the variance of the Gaussian. M-step update rules for BSC can be derived in close-form by optimizing the free energy (2) wrt. all model parameters (compare, e.g., Henniges et al., 2010). We report the final expressions in appendix B.
|
| 119 |
+
|
| 120 |
+
# 5 NUMERICAL EXPERIMENTS
|
| 121 |
+
|
| 122 |
+
We describe numerical experiments performed to test the applicability and scalability of EEM. Throughout the section, the different evolutionary algorithms are named by indicating which parent selection procedure was used (“fitparents” for fitness-proportional selection, “randparents” for random uniform selection) and which bitflip algorithm (“sparseflips” or “randflips”). We add “cross” to the name of the EA when crossover was employed.
|
| 123 |
+
|
| 124 |
+
# 5.1 ARTIFICIAL DATA
|
| 125 |
+
|
| 126 |
+
First we investigate EMM using artificial data where the ground-truth components are known. We use the bars test as a standard setup for such purposes (Foldiak, 1990; Hoyer, 2003; L ¨ ucke & Sa- ¨ hani, 2008). In the standard setup, $H ^ { \mathrm { g e n } } / 2$ non-overlapping vertical and $H ^ { \mathrm { g e n } } / 2$ non-overlapping horizontal bars act as components on $\begin{array} { r } { D = H ^ { \mathrm { g e n } } \times H ^ { \mathrm { g e n } } } \end{array}$ pixel images. $N$ images are then generated by first selecting each bar with probability $\pi ^ { \mathrm { g e n } }$ . The bars are then superimposed according to the noisy-OR model (non-linear superposition) or according to the BSC model. In the case of BSC Gaussian noise is then added.
|
| 127 |
+
|
| 128 |
+
Noisy-OR. Let us start with the standard bars test which uses a non-linear superposition (Foldiak, ¨ 1990) of 16 different bars (Spratling, 1999; Lucke & Sahani, 2008), and a standard average crowd- ¨ edness of two bars per images $\textstyle ( \pi ^ { \mathrm { g e n } } = { \frac { 2 } { H ^ { \mathrm { g e n } } } } ,$ ). We apply EEM for noisy-OR using different configurations of the EA. We use $H = 1 6$ generative fields. As a performance metric we here employ reliability (compare, e.g., Spratling, 1999; Lucke & Sahani, 2008), i.e., the fraction of runs whose ¨ learned free energies are above a certain minimum threshold and which learn the full dictionary of bars as well as the correct values for the prior probabilities $\pi$ .
|
| 129 |
+
|
| 130 |
+

|
| 131 |
+
Figure 3: Reliability for the listed EAs over 10 runs of EEM for noisy-OR on 8x8 bars images. In this figure, black bars indicate both priors and bars were recovered correctly, grey bars indicate bars were recovered but not priors. For all runs $H = 1 6$ , $\mathbf { \dot { N } } = 1 0 ^ { 4 }$ , $N _ { g } = 2$ , $N _ { p } = 8$ , $N _ { c } = 7$ , $S = 1 2 0$ . Each run performed 100 iterations.
|
| 132 |
+
Figure 3 shows reliabilities over 10 different runs for each of the EAs. On $8 \mathrm { x } 8$ images the more exploitative nature of “fitparents-sparseflips” is advantageous over the simpler and more explorative “randparents-randflips”. Note that this is not necessarily true for lower dimensionalities or otherwise easier-to-explore state spaces, in which also a naive random search might quickly find high-fitness individuals. In this test the addition of crossover reduces the probability of finding all bars and leads to an overestimation of the crowdedness $\pi H$ .
|
| 133 |
+
|
| 134 |
+
After the initial verification on a standard bars test, we now make the component extraction problem more difficult by increasing overlap among the bars. A highly non-linear generative model such as noisy-OR is a good candidate to model occlusion effects in images. Figure 4 shows the results of training noisy-OR with EEM on a bars data-set in which the latent causes have sensible overlaps. The test parameters were chosen to be equal to those in (Lucke & Sahani, 2008, Fig. 9). After ¨ applying EEM with noisy-OR $H = 3 2$ ) to $N = 4 0 0$ images with 16 strongly overlapping bars, we observed that all $H ^ { \mathrm { g e n } } = 1 6$ bars were recovered in 13 of 25 runs, which is competitive especially when keeping in mind that no additional assumptions (e.g., compared to other models applied to this test) are used by EEM for noisy-OR.
|
| 135 |
+
|
| 136 |
+

|
| 137 |
+
Figure 4: Sample input (left) and learned generative fields (right) for a run on overlapping bars. Out of 25 runs, 13 recovered all 16 ground-truth generative components (14.92 recovered bars in average, median 16). As $H = 3 2$ , the extra generative fields are used to explain common overlaps and noise.
|
| 138 |
+
|
| 139 |
+
BSC. Like for the non-linear generative model, we first evaluate EEM for the linear BSC model on a bars test. For BSC, the bars are superimposed linearly (Henniges et al., 2010), which makes the problem easier. As a consequence, standard bars test were solved with very high reliability using EEM for BSC even if merely random bitflips were used for the EA. In order to make the task more challenging, we therefore (A) increased the dimensionality of the data to $D = 1 0 \times 1 0$ bars images, (B) increased the number of components to $H ^ { \mathrm { g e n } } = 2 0$ , and (C) increased the average number of bars per data point from two (the standard setting) to five. We employed $N = 5 , 0 0 0$ training data points and tested the same five different configurations of the EA as were evaluated for noisy-OR. We set the number of hidden units to $H = H ^ { \mathrm { g e n } } = 2 0$ and used $S = 1 2 0$ variational states. Per data point and per iteration, in total 112 new states $N _ { p } = 8$ , $N _ { c } = 7$ , $N _ { g } = 2 $ ) were sampled to vary $\textstyle { \mathcal { K } } ^ { n }$ . Per configuration of the EA, we performed 20 independent runs, each with 300 iterations. The results of the experiment are depicted in Fig. 5. We observe that a basic approach such as random uniform selection of parents and random uniform bitflips for the EA works well. However, more sophisticated EAs improve performance. For instance, combining bitflips with crossover and selecting parents proportionally to their fitness shows to be very benefical. The results also show that sparseness-driven bitflips lead generally to very poor performance, even if crossover or fitnessproportional selection of the parents is included. This effect may be explained with the initialization of $\textstyle { \mathcal { K } } ^ { n }$ . The initial states are drawn from a Bernoulli distribution with parameter $\textstyle { \frac { 1 } { H } }$ which makes it more difficult for sparseness-driven EAs to explore and find solutions with higher crowdedness. Fig. 8 in appendix C depicts the averaged free energy values for this experiment.
|
| 140 |
+
|
| 141 |
+

|
| 142 |
+
Figure 5: Reliability for the listed EAs over 20 runs of EEM for BSC on $1 0 \mathrm { x } 1 0$ bars images.
|
| 143 |
+
|
| 144 |
+
# 5.2 NATURAL IMAGE PATCHES
|
| 145 |
+
|
| 146 |
+
Next, we verify the approach on natural data. We use patches of natural images, which are known to have a multi-component structure, which are well investigated, and for which typically models with high-dimensional latent spaces are applied. The image patches used are extracted from the van Hateren image database (van Hateren & van der Schaaf, 1998).
|
| 147 |
+
|
| 148 |
+
Noisy-OR. First we consider raw images patches, i.e., images without substantial pre-processing which directly reflect light intensities. Such image patches were generated by extracting random square subsections of a single $2 5 5 \mathrm { x } 2 5 5$ image of overlapping grass wires (part of image 2338 of the database). We removed the brightest $1 \%$ pixels from the data-set, scaled each data-point to have gray-scale values in the range $[ 0 , 1 ]$ and then created data points with binary entries by repeatedly choosing a random gray-scale image and sampling binary pixels from a Bernoulli distribution with parameter equal to the gray-scale value of the original pixel (cfr. figure 6). Note that components in such light-intensity images can be expected to superimpose non-linearly because of occlusion, which motivates the application of a non-linear generative model such as noisy-OR. We employ the “fitparents-sparseflips” evolutionary algorithm that was shown to perform best on artificial data (3). Parameters were $H = 1 0 0$ , $S = 1 2 0$ , $N _ { g } = 2$ , $N _ { p } = 8$ , $N _ { c } = 7$ . Figure 6 shows the generative fields learned over 200 iterations. EEM allows learning of generative fields resembling curved edges, in line with expectations and with the results obtained in (Lucke & Sahani, 2008). ¨
|
| 149 |
+
|
| 150 |
+

|
| 151 |
+
Figure 6: 50 generative fields learned by applying EEM (“fitparents-sparseflips”) for noisy-OR to natural image patches. See Appendix F for a run at $H = 2 0 0$ .
|
| 152 |
+
|
| 153 |
+
BSC. Finally, we consider pre-processed image patches using common whitening approaches as they are customary for sparse coding approaches (Olshausen & Field, 1997). We use $N = 1 0 0 , 0 0 0$ patches of size $D = 1 6 \times 1 6$ , randomly picked from the whole data set. The highest $2 \%$ of the amplitudes were clamped to compensate for light reflections and patches without significant structure were excluded for learning. ZCA whitening (Bell & Sejnowski, 1997) was applied retaining $9 5 \%$ of the variance (we used the procedure of a recent paper Exarchakis & Lucke, 2017). We trained the ¨ BSC model for 4,000 iterations using the “fitparents-cross-sparseflips” EA and employing $H = 3 0 0$ hidden units and $S = 2 0 0$ variational states. Per data point and per iteration, in total 360 new states $( N _ { p } = 1 0$ , $N _ { c } = 9$ , $N _ { g } = 4 \AA$ ) were sampled to vary $K ^ { n }$ . The results of the experiment are depicted in Fig. 7. The obtained generative fields primarily take the form of Gabor functions with different locations, orientations, phase, and spatial frequencies. This is a typical outcome of sparse coding being applied to images. On average more than five units were activated per data point showing that the learned code makes use of the generative model’s multiple causes structure. The generative fields converged faster than prior and noise parameters (similar effects are known from probabilistic PCA for the variance parameter). The finit slope of the free-energy after 4000 iterations is presumably due to these parameters still changing slowly.
|
| 154 |
+
|
| 155 |
+

|
| 156 |
+
Figure 7: Results on training the BSC model on natural images using the “fitparents-crosssparseflips” EA. $\mathbf { A } 6 0$ of the 300 generative fields obtained through training (see Appendix for all fields). B Evolution of the free energy per data point over iterations. C Evolution of the expected number of active hidden units per data point over iterations. D Evolution of the standard deviation over iterations.
|
| 157 |
+
|
| 158 |
+
# 6 DISCUSSION
|
| 159 |
+
|
| 160 |
+
The training of generative models is a very intensively studied branch of Machine Learning. If EM is applied for training, most non-elementary models require approximations. For this reason, sophisticated and mathematically grounded approaches such as sampling or variational EM have been developed in order to derive sufficiently precise and efficient learning algorithms.
|
| 161 |
+
|
| 162 |
+
Evolutionary algorithms (EAs) have also been applied in conjunction with EM. Pernkopf & Bouchaffra (2005), for instance, have used EAs for clustering with Gaussian mixture models (GMMs). However, the GMM parameters are updated by their approach relatively conventionally using EM, while EAs are used to select the best GMM models for the clustering problem (using a min. description length criterion). Such a use of EAs is similar to DNN optimization where EAs optimize DNN hyperparameters in an outer optimization loop (Stanley & Miikkulainen, 2002; Loshchilov & Hutter, 2016; Real et al., 2017; Suganuma et al., 2017, etc), while the DNNs themselves are optimized using standard error-minimization algorithms. Still other approaches have used EAs to directly optimize, e.g., a clustering objective. But in these cases EAs replace EM approaches for optimization (compare Hruschka et al., 2009). In contrast to all such previous applications, we have here shown that EAs and EM can be combined directly and intimately: Alg. 1 defines EAs as an integral part of EM, and as such EAs address the key optimization problem arising in the training of generative models.
|
| 163 |
+
|
| 164 |
+
We see the main contribution of our study in the establishment of this close theoretical link between EAs and EM. This novel link will make it possible to leverage an extensive body of knowledge and experience from the community of evolutionary approaches for learning algorithms. Our numerical experiments are a proof of concept which shows that EAs are indeed able to train generative models with large hidden spaces and local optima. For this purpose we used very basic EAs with elementary selection, mutation, cross-over operators.
|
| 165 |
+
|
| 166 |
+
EAs more specialized to the specific optimization problems arising in the training of generative models have great potentials in future improvements of accuracy and scalability, we believe. In our experiments, we have only just started to exploit the abilities of EAs for learning algorithms. Still, our results represent, to the knowledge of the authors, the first examples of noisy-OR or sparse coding models trained with EAs (although both models have been studied very extensively before). Most importantly, we have pointed out a novel mathematically grounded way how EAs can be used for generative models with binary latents in general. The approach here established is, moreover, not only very generically formulated using the models’ joint probabilities but it is also very straightforward to apply.
|
| 167 |
+
|
| 168 |
+
# REFERENCES
|
| 169 |
+
|
| 170 |
+
A. J. Bell and T. J. Sejnowski. The “independent components” of natural scenes are edge filters. Vision Research, 37(23):3327–38, 1997.
|
| 171 |
+
A. P. Dempster, N. M. Laird, and D. B. Rubin. Maximum likelihood from incomplete data via the EM algorithm (with discussion). Journal of the Royal Statistical Society B, 39:1–38, 1977.
|
| 172 |
+
G. Exarchakis and J. Lucke. Discrete sparse coding. ¨ Neural Computation, 29:2979–3013, 2017.
|
| 173 |
+
L. J. Fogel, A. J. Owens, and M. J. Walsh. Artificial intelligence through simulated evolution. 1966.
|
| 174 |
+
Peter Foldiak. Forming sparse representations by local anti-hebbian learning. ¨ Biological cybernetics, 64(2):165–170, 1990.
|
| 175 |
+
D. Forster and J. Lucke. Truncated variational EM for semi-supervised Neural Simpletrons. In ¨ IJCNN, pp. 3769–3776, 2017.
|
| 176 |
+
M. Henniges, G. Puertas, J. Bornschein, J. Eggert, and J. Lucke. Binary sparse coding. In ¨ Proceedings LVA/ICA, LNCS 6365, pp. 450–57. Springer, 2010.
|
| 177 |
+
P. O. Hoyer. Modeling receptive fields with non-negative sparse coding. Neurocomputing, 52-54: 547–52, June 2003. ISSN 09252312. doi: 10.1016/S0925-2312(02)00782-8.
|
| 178 |
+
P. O. Hoyer. Non-negative matrix factorization with sparseness constraints. Journal of Machine Learning Research, 5:1457–69, 2004.
|
| 179 |
+
E. R. Hruschka, R. JGB Campello, A. A. Freitas, et al. A survey of evolutionary algorithms for clustering. IEEE Trans. on Systems, Man, and Cybernetics, 39(2):133–155, 2009.
|
| 180 |
+
M. Jordan, Z. Ghahramani, T. Jaakkola, and L. Saul. An introduction to variational methods for graphical models. Machine Learning, 37:183–233, 1999.
|
| 181 |
+
Y. LeCun, Y. Bengio, and G. Hinton. Deep learning. Nature, 521(7553):436–444, 2015.
|
| 182 |
+
I. Loshchilov and F. Hutter. CMA-ES for hyperparameter optimization of deep neural networks. In ICLR Workshop, pp. 513–520, 2016.
|
| 183 |
+
J. Lucke. Truncated variational expectation maximization. ¨ arXiv preprint, arXiv:1610.03113, 2016.
|
| 184 |
+
J. Lucke and J. Eggert. Expectation truncation and the benefits of preselection in training generative ¨ models. JMLR, 11:2855–900, 2010.
|
| 185 |
+
J. Lucke and M. Sahani. Maximal causes for non-linear component extraction. ¨ Journal of Machine Learning Research, 9:1227–67, 2008.
|
| 186 |
+
J. W. Myers, K. B. Laskey, and K. A. DeJong. Learning Bayesian networks from incomplete data using evolutionary algorithms. In Proc. Annual Conference on Genetic and Evolutionary Computation, pp. 458–465, 1999.
|
| 187 |
+
R. Neal and G. Hinton. A view of the EM algorithm that justifies incremental, sparse, and other variants. In M. I. Jordan (ed.), Learning in Graphical Models. Kluwer, 1998.
|
| 188 |
+
B. A. Olshausen and D. J. Field. Sparse coding with an overcomplete basis set: A strategy employed by V1? Vision Research, 37(23):3311–3325, 1997.
|
| 189 |
+
M. Opper and O. Winther. Expectation consistent approximate inference. JMLR, 6:2177–04, 2005.
|
| 190 |
+
A. B. Patel, T. Nguyen, and R. G. Baraniuk. A probabilistic theory of deep learning. In NIPS, pp. 2558–2566, 2016.
|
| 191 |
+
F. Pernkopf and D. Bouchaffra. Genetic-based em algorithm for learning gaussian mixture models. IEEE Trans. on Pattern Analysis and Machine Intelligence, 27(8):1344–1348, 2005.
|
| 192 |
+
E. Real, S. Moore, A. Selle, S. Saxena, Y. L. Suematsu, J. Tan, Q. V. Le, and A. Kurakin. Large-scale evolution of image classifiers. In ICML, pp. 2902–2911, 2017.
|
| 193 |
+
I. Rechenberg. Cybernetic solution path of an experimental problem. 1965.
|
| 194 |
+
S. Roweis. EM algorithms for PCA and SPCA. NIPS, pp. 626–32, 1998.
|
| 195 |
+
T. Salimans, J. Ho, X. Chen, and I. Sutskever. Evolution strategies as a scalable alternative to reinforcement learning. arXiv preprint arXiv:1703.03864, 2017.
|
| 196 |
+
L. K. Saul and M. Jordan. Exploiting tractable substructures in intractable networks. NIPS, pp. 486–492, 1996.
|
| 197 |
+
J. Schmidhuber. Deep learning in neural networks. Neural networks, 61:85–117, 2015.
|
| 198 |
+
A.-S. Sheikh, J. A. Shelton, and J. Lucke. A truncated EM approach for spike-and-slab sparse ¨ coding. Journal of Machine Learning Research, 15:2653–2687, 2014.
|
| 199 |
+
J. A. Shelton, J. Gasthaus, Z. Dai, J. Lucke, and A. Gretton. Gp-select: Accelerating em using ¨ adaptive subspace preselection. Neural Computation, 29(8):2177–2202, 2017.
|
| 200 |
+
M. W. Spratling. Pre-synaptic lateral inhibition provides a better architecture for self-organising neural networks. Network: Computation in Neural Systems, 10:285 – 301, 1999.
|
| 201 |
+
M. W. Spratling, K. De Meyer, and R. Kompass. Unsupervised learning of overlapping image components using divisive input modulation. Computational Intelligence and Neuroscience, pp. 1–19, 2009. ISSN 1687-5265.
|
| 202 |
+
K. O. Stanley and R. Miikkulainen. Evolving neural networks through augmenting topologies. Evolutionary Computing, 10(2):99–127, 2002. ISSN 1063-6560.
|
| 203 |
+
M. Suganuma, S. Shirakawa, and T. Nagao. A genetic programming approach to designing convolutional neural network architectures. In GECCO, pp. 497–504, 2017.
|
| 204 |
+
M. Tipping and C. Bishop. Probabilistic principal component analysis. Journal of the Royal Statistical Society. Series B, 61, 1999.
|
| 205 |
+
J. H. van Hateren and A. van der Schaaf. Independent component filters of natural images compared with simple cells in primary visual cortex. Proceedings of the Royal Society of London B, 265: 359–66, 1998.
|
| 206 |
+
|
| 207 |
+
# APPENDIX
|
| 208 |
+
|
| 209 |
+
A: NOISY-OR
|
| 210 |
+
|
| 211 |
+
The truncated free energy takes on the following form for Noisy-OR:
|
| 212 |
+
|
| 213 |
+
$$
|
| 214 |
+
\begin{array} { l } { \mathcal { F } _ { N O R } ( K , \Theta ) = N \displaystyle \sum _ { h } \log \left( 1 - \pi _ { h } \right) + \displaystyle \sum _ { n } \log \displaystyle \sum _ { \tilde { s } \in \mathcal { K } ^ { ( n ) } } \exp \tilde { \mathcal { F } } } \\ { \displaystyle \qquad \tilde { \mathcal { F } } ( \vec { s } , \Theta ) : = \sum _ { h } s _ { h } \log \left( \frac { \pi _ { h } } { 1 - \pi _ { h } } \right) } \\ { \displaystyle \qquad + \sum _ { d } y _ { d } ^ { n } \log \left( \frac { 1 } { \prod _ { h } \left( 1 - W _ { d h } s _ { h } \right) } - 1 \right) } \\ { \displaystyle \qquad + \sum _ { h } \log \left( 1 - W _ { d h } s _ { h } \right) } \end{array}
|
| 215 |
+
$$
|
| 216 |
+
|
| 217 |
+
The M-step equations for noisy-OR are obtained by taking derivatives of the free energy, equating them to zero and solving the resulting set of equations. We report the results here for completeness:
|
| 218 |
+
|
| 219 |
+
$$
|
| 220 |
+
\pi _ { h } ^ { n e w } = \frac { 1 } { N } \sum _ { n } \left. s _ { h } \right. _ { q ^ { n } }
|
| 221 |
+
$$
|
| 222 |
+
|
| 223 |
+
$$
|
| 224 |
+
W _ { d h } ^ { n e w } = 1 + \frac { \sum _ { n } ( y _ { d } ^ { n } - 1 ) \left. D _ { d h } ( \vec { s } ) \right. _ { q ^ { n } } } { \sum _ { n } \left. C _ { d h } ( \vec { s } ) \right. _ { q ^ { n } } }
|
| 225 |
+
$$
|
| 226 |
+
|
| 227 |
+
where
|
| 228 |
+
|
| 229 |
+
$$
|
| 230 |
+
D _ { d h } ( \vec { s } ) : = \frac { \widetilde { W } _ { d h } ( \vec { s } ) s _ { h } } { N _ { d } ( \vec { s } ) ( 1 - N _ { d } ( \vec { s } ) ) }
|
| 231 |
+
$$
|
| 232 |
+
|
| 233 |
+
$$
|
| 234 |
+
C _ { d h } ( \vec { s } ) : = \widetilde { W } _ { d h } ( \vec { s } ) D _ { d h } ( \vec { s } )
|
| 235 |
+
$$
|
| 236 |
+
|
| 237 |
+
$$
|
| 238 |
+
\widetilde { W } _ { d h } ( \vec { s } ) : = \prod _ { h ^ { \prime } \neq h } ( 1 - W _ { d h ^ { \prime } } s _ { h ^ { \prime } } )
|
| 239 |
+
$$
|
| 240 |
+
|
| 241 |
+
The update rule for $\vec { \pi }$ is quite straightforward. The update equations for the weights $W _ { d h }$ , on the other hand, do not allow a closed form solution (i.e. no exact M-step equation can be derived). The rule presented here, instead, expresses each $W _ { d h } ^ { n e w }$ as a function of all current $\vec { W }$ ; this is a fixedpoint equation whose fixed point would be the exact solution of the maximization step. Rather than solving the equation numerically at each step of the learning algorithm, we exploit the fact that in practice one single evaluation of 13 is enough to (noisily, not optimally) move towards convergence. Since TV-EM is guaranteed to never decrease $\mathcal { F }$ , drops of the free-energy during training can only be ascribed to this fixed-point equation; this provides a simple mechanism to check and possibly correct for misbehaviors of 13 if needed.
|
| 242 |
+
|
| 243 |
+
# B: M-STEP UPDATE RULES FOR BSC
|
| 244 |
+
|
| 245 |
+
The free energy for BSC follows from inserting (10) into (2). Update rules can be obtained by optimizing the resulting expression separately for the model parameters $\pi , \sigma ^ { 2 }$ and $W$ (compare, e.g., Henniges et al., 2010). For the sake of completeness, we show the result here:
|
| 246 |
+
|
| 247 |
+
$$
|
| 248 |
+
\pi = \frac { 1 } { N } \sum _ { n = 1 } ^ { N } \sum _ { h = 1 } ^ { H } \left. s _ { h } \right. _ { q ^ { n } }
|
| 249 |
+
$$
|
| 250 |
+
|
| 251 |
+
$$
|
| 252 |
+
\sigma ^ { 2 } = \frac { 1 } { N D } \sum _ { n = 1 } ^ { N } \left. | | \vec { y } ^ { ( n ) } - W \vec { s } | | ^ { 2 } \right. _ { q ^ { n } }
|
| 253 |
+
$$
|
| 254 |
+
|
| 255 |
+
$$
|
| 256 |
+
W = \left( \sum _ { n = 1 } ^ { N } \vec { y } ^ { ( n ) } \langle \vec { s } \rangle _ { q ^ { n } } ^ { T } \right) \left( \sum _ { n ^ { \prime } = 1 } ^ { N } \langle \vec { s } \vec { s } ^ { T } \rangle _ { q ^ { n ^ { \prime } } } \right) ^ { - 1 }
|
| 257 |
+
$$
|
| 258 |
+
|
| 259 |
+
Exact EM can be obtained by setting $q ^ { n }$ to the exact posterior $p ( \vec { s } | \vec { y } ^ { ( n ) } , \Theta )$ . As this quickly becomes computational intractable with higher latent dimensionality, we approximate exact posteriors by truncated variational distributions (3). For BSC, the truncated free energy (4) takes the form
|
| 260 |
+
|
| 261 |
+
$$
|
| 262 |
+
\mathcal { F } ( \mathcal { K } , \Theta ) = - \frac { N D } { 2 } \log \left( 2 \pi \sigma ^ { 2 } \right) + N H \log \left( 1 - \pi \right) + \sum _ { n } \log \left( \sum _ { \bar { s } \in \mathcal { K } _ { n } } \exp \left( \widetilde { \log p } \left( \bar { y } ^ { ( n ) } , \bar { s } | \Theta \right) \right) \right)
|
| 263 |
+
$$
|
| 264 |
+
|
| 265 |
+
where
|
| 266 |
+
|
| 267 |
+
$$
|
| 268 |
+
\widetilde { \log p } ( \vec { y } , \vec { s } | \Theta ) = - \frac { 1 } { 2 \sigma ^ { 2 } } ( \vec { y } - W \vec { s } ) ^ { T } ( \vec { y } - W \vec { s } ) + | \vec { s } | \log \left( \frac { \pi } { 1 - \pi } \right)
|
| 269 |
+
$$
|
| 270 |
+
|
| 271 |
+
C: FURTHER EXPERIMENTAL RESULTS FOR BSC
|
| 272 |
+
|
| 273 |
+

|
| 274 |
+
Figure 8: Results of the experiment with artificial data ( $1 0 \mathrm { x } 1 0$ bars) for the BSC model. Depicted is the evolution of the free energy for different EAs averaged over 20 independent runs. Dots and vertical errorbars show the mean and the standard deviation, respectively.
|
| 275 |
+
|
| 276 |
+

|
| 277 |
+
Figure 9: Full dictionary learned from natural images by the BSC model trained with the “fitparentscross-sparseflips” EA. Depicted is the dictionary at iteration 4,000. The generative fields are ordered according to their activation, starting with most active fields.
|
| 278 |
+
|
| 279 |
+
# D: SPARSITY-DRIVEN BITFLIPS
|
| 280 |
+
|
| 281 |
+
When performing sparsity-driven bitflips, we flip each bit of a particular child ${ \vec { s } } ^ { * }$ with probability $p _ { 0 }$ if it is 0, with probability $p _ { 1 }$ otherwise. We call $p _ { b f }$ the average probability of flipping any bit in $\vec { s } ^ { * }$ . We impose the following constraints on $p _ { 0 }$ and $p _ { 1 }$ :
|
| 282 |
+
|
| 283 |
+
• $p _ { 1 } = \alpha p _ { 0 }$ for some constant $\alpha$ • the average number of on bits after mutation is set at $\widetilde { s }$
|
| 284 |
+
|
| 285 |
+
which yield the following expressions for $p _ { 0 }$ and $p _ { 1 }$
|
| 286 |
+
|
| 287 |
+
$$
|
| 288 |
+
\alpha = \frac { ( H - | \vec { s } | ) \cdot ( ( H p _ { b f } ) - ( \widetilde { s } - | \vec { s } | ) ) } { ( \widetilde { s } - | \vec { s } | + H p _ { b f } ) | \vec { s } | }
|
| 289 |
+
$$
|
| 290 |
+
|
| 291 |
+
Trivially, random uniform bitflips correspond to the case $p _ { 0 } = p _ { 1 } = p _ { b f }$
|
| 292 |
+
|
| 293 |
+
# E: RELIABILITY OF EEM FOR NOISY-OR ON OVERLAPPING BARS
|
| 294 |
+
|
| 295 |
+
With respect to the tests shown in figure 4 and discussed in section 5.1, it is worth to spend a few more words on comparisons with the other algorithms shown (Lucke & Sahani, 2008, Fig. 9). Quan- ¨ titative comparison to NMF approaches, neural nets (DI Spratling et al., 2009), and MCA (Lucke ¨ & Sahani, 2008) shows that EMM for noisy-OR performs well but there are also approaches with higher reliability. Of all the approaches which recover more than 15 bars on average, most require additional assumptions. E.g., all NMF approaches, non-negative sparse coding (Hoyer, 2004) and $\mathbf { R { - } M C A _ { 2 } }$ require constraints on weights and/or latent activations. Only $\mathbf { M C A } _ { 3 }$ does not require constraints and presumably neither DI. DI is a neural network approach, which makes the used assumptions difficult to infer. $\mathbf { M C A } _ { 3 }$ is a generative model with a max-non-linearity as superposition model. For learning it explores all sparse combinations with up to 3 components. Applied with $H = 3 2$ latents, it hence evaluates more than 60000 states per data point per iteration for learning. For comparison, EEM for noisy-OR evaluates on the order of $S = 1 0 0$ states per data point per iteration.
|
| 296 |
+
|
| 297 |
+
F: HIGHER-SCALE NATURAL IMAGE PATCHES FOR NOISY-OR
|
| 298 |
+
|
| 299 |
+
Figure 10: Generative fields learned running EEM for noisy-OR (“fitparents-sparseflips”) for 175 iterations with $H = 2 0 0$ latent variables. Learned crowdedness $\pi H$ was 1.6.
|
md/train/SyxCqGbRZ/SyxCqGbRZ.md
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LEARNING TO TREAT SEPSIS WITH MULTI-OUTPUTGAUSSIAN PROCESS DEEP RECURRENT Q-NETWORKS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Sepsis is a life-threatening complication from infection and a leading cause of mortality in hospitals. While early detection of sepsis improves patient outcomes, there is little consensus on exact treatment guidelines, and treating septic patients remains an open problem. In this work we present a new deep reinforcement learning method that we use to learn optimal personalized treatment policies for septic patients. We model patient continuous-valued physiological time series using multi-output Gaussian processes, a probabilistic model that easily handles missing values and irregularly spaced observation times while maintaining estimates of uncertainty. The Gaussian process is directly tied to a deep recurrent Q-network that learns clinically interpretable treatment policies, and both models are learned together end-to-end. We evaluate our approach on a heterogeneous dataset of septic spanning 15 months from our university health system, and find that our learned policy could reduce patient mortality by as much as $8 . 2 \%$ from an overall baseline mortality rate of $1 3 . 3 \%$ . Our algorithm could be used to make treatment recommendations to physicians as part of a decision support tool, and the framework readily applies to other reinforcement learning problems that rely on sparsely sampled and frequently missing multivariate time series data.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Sepsis is a poorly understood complication arising from infection, and is both a leading cause in patient mortality (Epstein et al. (2016)) and in associated healthcare costs (Torio & Moore (2016)). Early detection is imperative, as earlier treatment is associated with better outcomes (Seymour et al. (2017), Kumar et al. (2006)). However, even among patients with recognized sepsis, there is no standard consensus on the best treatment. There is a pressing need for personalized treatment strategies tailored to the unique physiology of individual patients. Guidelines on sepsis treatment previously centered on early goal directed therapy (EGDT) and more recently have focused on sepsis care bundles, but none of these approaches are individualized.
|
| 12 |
+
|
| 13 |
+
Before the landmark publication on the use of early goal directed therapy (Rivers et al. (2001)), there was no standard management for severe sepsis and septic shock. EGDT consists of early identification of high-risk patients, appropriate cultures, infection source control, antibiotics administration, and hemodynamic optimization. The study compared a 6-hour protocol of EGDT promoting use of central venous catheterization to guide administration of fluids, vasopressors, inotropes, and packed red-blood cell transfusions, and was found to significantly lower mortality. Following the initial trial, EGDT became the cornerstone of the sepsis resuscitation bundle for the Surviving Sepsis Campaign (SCC) and the Centers for Medicare and Medicaid Services (CMS) (Dellinger et al. (2013)).
|
| 14 |
+
|
| 15 |
+
Despite the promising results of EGDT, concerns arose. External validity outside the single center study was unclear, it required significant resources for implementation, and the elements needed to achieve pre-specified hemodynamic targets held potential risks. Between 2014–2017, a trio of trials reported an all-time low sepsis mortality, and questioned the continued need for all elements of EGDT for patients with severe and septic shock (ProCESS et al. (2014), ARISE & Group (2014), PRISM (2017)). The trial authors concluded EGDT did not improve patient survival compared to usual care but was associated with increased ICU admissions (Angus et al. (2015)). As a result, they did not recommend it be included in the updated SCC guidelines (Rhodes et al. (2017)).
|
| 16 |
+
|
| 17 |
+
Although the SSC guidelines provide an overarching framework for sepsis treatment, there is renewed interest in targeting treatment and disassembling the bundle (Lewis (2010)). A recent metaanalysis evaluated 12 randomized trials and 31 observational studies and found that time to first antibiotics explained $9 6 - 9 9 \%$ of the survival benefit (Kalil et al. (2017)). Likewise, a study of 50,000 patients across the state of New York found mortality benefit for early antibiotic administration, but not intravenous fluids (Seymour et al. (2017)). Beyond narrowing the bundle, there is emerging evidence that a patient’s baseline risk plays an important role in response to treatment, as survival benefit was significantly reduced for patients with more severe disease (Kalil et al. (2017)).
|
| 18 |
+
|
| 19 |
+
Taken together, the poor performance of EGDT compared to standard-of-care and improved understanding of individual treatment effects calls for re-envisioning sepsis treatment recommendations. Though general consensus in critical care is that the individual elements of the sepsis bundle are typically useful, it is unclear exactly when each element should be administered and in what quantity.
|
| 20 |
+
|
| 21 |
+
In this paper, we aim to directly address this problem using deep reinforcement learning. We develop a novel framework for applying deep reinforcement learning to clinical data, and use it to learn optimal treatments for sepsis. With the widespread adoption of Electronic Health Records, hospitals are already automatically collecting the relevant data required to learn such models. However, real-world operational healthcare data present many unique challenges and motivate the need for methodologies designed with their structure in mind. In particular, clinical time series are typically irregularly sampled and exhibit large degrees of missing values that are often informatively missing, necessitating careful modeling. The high degree of heterogeneity presents an additional difficulty, as patients with similar symptoms may respond very differently to treatments due to unmeasured sources of variation. Alignment of patient time series can also be a potential issue, as patients admitted to the hospital may have very different unknown clinical states and can develop sepsis at any time throughout their stay (with many already septic upon admission).
|
| 22 |
+
|
| 23 |
+
Part of the novelty in our approach hinges on the use of a Multi-output Gaussian process (MGP) as a preprocessing step that is jointly learned with the reinforcement learning model. We use an MGP to interpolate and to impute missing physiological time series values used by the downstream reinforcement learning algorithm, while importantly maintaining uncertainty about the clinical state. The MGP hyperparameters are learned end-to-end during training of the reinforcement learning model by optimizing an expectation of the standard Q-learning loss. Additionally, the MGP allows for estimation of uncertainty in the learned Q-values. For the model architecture we use a deep recurrent Q-network, in order to account for the potential for non-Markovian dynamics and allow the model to have memory of past states and actions. In our experiments utilizing EHR data from septic patients spanning 15 months from our university health system, we found that both the use of the MGP and the deep recurrent Q-network offered improved performance over simpler approaches.
|
| 24 |
+
|
| 25 |
+
# 2 BACKGROUND
|
| 26 |
+
|
| 27 |
+
In this section we outline important background that motivates our improvements on prior work.
|
| 28 |
+
|
| 29 |
+
# 2.1 DEEP Q-LEARNING
|
| 30 |
+
|
| 31 |
+
Reinforcement learning (RL) considers learning policies for agents interacting with unknown environments, and are typically formulated as a Markov decision process (MDP) (Sutton $\&$ Barto (1998)). At each time $t$ , an agent observes the state of the environment, $s _ { t } \in S$ , takes an action $a _ { t } \in \mathcal A$ , and receives a reward $r _ { t } \in \mathbb { R }$ , at which time the environment transitions to a new state $s _ { t + 1 }$ . The state space $s$ and action space $\mathcal { A }$ may be continuous or discrete. The goal of an RL agent is to select actions in order to maximize its return, or expected discounted future reward, defined as $\begin{array} { r } { R _ { t } = \sum _ { t ^ { \prime } = t } ^ { T } \gamma ^ { t ^ { \prime } - t } r _ { t ^ { \prime } } } \end{array}$ , where $\gamma$ captures tradeoff between immediate and future rewards.
|
| 32 |
+
|
| 33 |
+
Q-Learning (Watkins & Dayan (1992)) is a model-free off-policy algorithm for estimating the expected return from executing an action in a given state. The optimal action value function is the maximum discounted expected reward obtained by executing action $a$ in state $s$ and acting optimally afterwards, defined as $\begin{array} { r } { Q ^ { * } ( s , a ) = \operatorname* { m a x } _ { \pi } \mathbb { E } [ R _ { t } | s _ { t } = s , a _ { t } = a , \pi ] } \end{array}$ , where $\pi$ is a policy that maps states to actions. Given $Q ^ { * }$ , an optimal policy is to act by selecting argmax ${ } _ { a } Q ^ { * } ( s , a )$ . In Q-learning, the Bellman equation is used to iteratively update the current estimate of the optimal action value function according to $Q ( s , a ) \doteq Q ( s , a ) + \alpha \bar { ( } r + \gamma \mathrm { m a x } _ { a } Q ( s ^ { \prime } , a ^ { \prime } ) - Q ( s , a ) )$ , adjusting towards the observed reward plus the maximal Q-value at the next state $s ^ { \prime }$ . In Deep Q-learning a deep neural network is used to approximate $\mathrm { Q }$ -values (Mnih et al. (2015)), overcoming the issue that there may be infinitely many states if the state space is continuous. Denoting the parameters of the neural network by $\theta$ , Q-values $Q ( s , a | \theta )$ are now estimated by performing a forward pass through the network. Updates to the parameters are obtained by minimizing a differentiable loss function, $\begin{array} { r } { L ( s , a | \theta _ { i } ) = ( \dot { r } + \gamma \mathrm { m a x } _ { a ^ { \prime } } \dot { Q ( s ^ { \prime } , a ^ { \prime } | \theta _ { i } ) } - Q ( s , a | \theta _ { i } ) ) ^ { 2 } } \end{array}$ , and training is usually accomplished with stochastic gradient descent.
|
| 34 |
+
|
| 35 |
+
# 2.2 PARTIAL OBSERVABILITY AND DEEP RECURRENT Q-NETWORKS
|
| 36 |
+
|
| 37 |
+
A fundamental limiting assumption of Markov decision processes is the Markov property, which is rarely satisfied in real-world problems. In medical applications such as our problem of learning optimal sepsis treatments, it is unlikely that a patient’s full clinical state will be measured. A Partially Observable Markov Decision Process (POMDP) better captures the dynamics of these types of realworld environments. An extension of an MDP, a POMDP assumes that an agent does not receive the true state of the system, instead receiving only observations $o \in \Omega$ generated from the underlying system state according to some unknown observation model $o \sim \mathcal { O } ( s )$ . Deep Q-learning has no reliable way to learn the underlying state of the POMDP, as in general $Q ( o , a | \bar { \theta } ) \neq Q ( s , \bar { a } | \theta )$ , and will only perform well if the observations well reflect the underlying state. Returning to our medical application, the system state might be the patient’s unknown clinical status or disease severity, and our observations in the form of vitals or laboratory measurements offer some insight into the state.
|
| 38 |
+
|
| 39 |
+
The Deep Recurrent Q-Network (DRQN) (Hausknecht & Stone (2015)) extends vanilla Deep Qnetworks (DQN) by using recurrent LSTM layers (Hochreiter & Schmidhuber (1997)), which are well known to capture long-term dependencies. LSTM recurrent neural network (RNN) models have frequently been used in past applications to medical time series, such as Lipton et al. (2016). In our experiments we investigate the effect of replacing fully connected neural network layers with LSTM layers in our Q-network architecture in order to test how realistic the Markov assumption is in our application.
|
| 40 |
+
|
| 41 |
+
# 2.3 MGPS: MULTI-OUTPUT GAUSSIAN PROCESSES
|
| 42 |
+
|
| 43 |
+
Multi-output Gaussian processes (MGPs) are commonly used probabilistic models for irregularly sampled multivariate time series, as they seamlessly handle variable spacing, differing numbers of observations per series, and missing values. In addition, they maintain estimates of uncertainty about the state of the series. MGPs have been frequently applied to model patient physiological time series, e.g. Ghassemi et al. (2015), Durichen et al. (2015), Cheng et al. (2017).
|
| 44 |
+
|
| 45 |
+
Given $M$ time series (physiological labs/vitals), an MGP is specified by a mean function for each series $\{ \mu _ { m } ( t ) \} _ { m = 1 } ^ { M }$ , commonly assumed to be zero, and a covariance function or kernel $K$ . Letting $f _ { m } ( t )$ denote the latent function for series $m$ at time , then $K ( t , t ^ { \prime } , m , m ^ { \prime } ) = \operatorname { c o v } ( f _ { m } ( t ) , f _ { m ^ { \prime } } ( t ^ { \prime } ) ) \big ]$ . Typicallytion, e.g. $y _ { m } ( t ) \sim \mathcal { N } ( f _ { m } ( t ) , \sigma _ { m } ^ { 2 } )$ re cewith $\lbrace \sigma _ { m } ^ { 2 } \rbrace _ { m = 1 } ^ { M }$ he latent functions according to some distribu-noise parameters. We use the linear model of coregionalization covariance function with an Ornstein-Uhlenbeck base kernels $k ( t , t ^ { \prime } ) = e ^ { - | t - t ^ { \prime } | / l }$ to flexibly model temporal correlations in time as well as covariance structure between different physiological variables. For each patient, letting t denote the complete set of measurement times across all observations, the full joint kernel is $\begin{array} { r } { \bar { K } ( \mathbf { t } , \mathbf { t } ^ { \prime } ) = \sum _ { p = 1 } ^ { P } \mathbf { B } _ { p } \otimes k _ { p } ( \mathbf { t } _ { * } , \mathbf { t } _ { * } ^ { \prime } ) } \end{array}$ , where $P$ denotes the number of mixture kernel. $\mathbf { t } _ { * }$ denotes the time vector for each physiological sign, assumed here to be the same for notational convenience, but in practice the full kernel need only be computed at the observed variables. Each $\mathbf { B } _ { p } \in \mathbb { R } ^ { M \times M }$ encodes the scale covariance between different time series. We found that $P = 2$ works well in practice and allows learning of correlations on both short and long time scales. Given the MGP kernel hyperparameters shared across all patients, collectively referred to as $\eta$ , imputation and interpolation at arbitrary times can be computed either using the posterior mean or the full posterior distribution over unknown function values.
|
| 46 |
+
|
| 47 |
+
# 2.4 MGP-RNNS: MULTI-OUTPUT GAUSSIAN PROCESS RECURRENT NEURAL NETWORKS
|
| 48 |
+
|
| 49 |
+
Multi-output Gaussian processes and recurrent neural networks can be combined and trained endto-end (MGP-RNNs), in order to solve supervised learning problems for sequential data (Futoma et al. (2017a), Futoma et al. (2017b)). This methodology was shown to exhibit superior predictive performance at early detection of sepsis from clinical time series data, when compared with vanilla RNNs with last-one-carried-forward imputation. In fitting the two models end-to-end, the MGP hyperparameters are learned discriminatively, in essence learning an imputation and interpolation mechanism tuned for the supervised task at hand.
|
| 50 |
+
|
| 51 |
+
Learning an MGP-RNN consists of minimizing an expectation of some loss function, with respect to the posterior distribution of the MGP. Letting z denote a set of latent time series values distributed according to an MGP posterior, and $g ( \mathbf { z } )$ denote the prediction(s) made by an RNN from this time series, then the goal is to minimize $\mathbb { E } _ { \mathbf { z } \sim \mathcal { M G P } } [ l ( \mathbf { 0 } , g ( \mathbf { z } ) ) ]$ , where $l$ is some loss function (e.g. crossentropy for a classification task) and o is the true label(s). We can express the MGP distributed latent variable $\mathbf { z }$ as ${ \bf z } = \mu _ { z } + R _ { z } \boldsymbol { \xi }$ , where $\mu _ { z }$ is the posterior mean and $R _ { z } { \bf \bar { \cal R } _ { z } ^ { \top } } = \Sigma _ { z }$ with $\Sigma _ { z }$ the posterior covariance, and $\xi \sim ( 0 , I )$ . This allows us to apply the reparameterization trick (Kingma & Welling (2014)) and use Monte Carlo sampling to compute approximate gradients of this expectation with respect to both MGP hyperparameters $\eta$ and RNN parameters $\theta$ , so that the loss can be minimized via stochastic gradient descent. The stochasticity in this learning procedure introduced from the Monte Carlo sampling additionally acts as a form of regularization, and helps prevent the RNN from overfitting. In Section 3 we show how this can be applied to a reinforcement learning task.
|
| 52 |
+
|
| 53 |
+
# 2.5 RELATED WORK FROM REINFORCEMENT LEARNING IN HEALTHCARE
|
| 54 |
+
|
| 55 |
+
There has been substantial recent interest in development of machine learning methodologies motivated by healthcare data. However, most prior work in clinical machine learning focuses on supervised tasks, such as diagnosis (Esteva et al. (2017)) or risk stratification (Futoma et al. (2017a)). Many recent papers have developed models for early detection of sepsis, a related problem to our task of learning treatments for sepsis, e.g. Soleimani et al. (2017), Henry et al. (2015), Futoma et al. (2017b). However, as supervised problems rely on ground truth they cannot be applied to treatment recommendation, unless the assumption is made that past training examples of treatments represent optimal behavior. Instead, it is preferable to frame the problem using reinforcement learning in order to learn optimal treatment actions from data collected from potentially suboptimal actions.
|
| 56 |
+
|
| 57 |
+
While deep reinforcement learning has seen huge success over the past few years, only very recently have reinforcement learning methods been designed with healthcare applications in mind. Applying reinforcement learning methods to healthcare data is difficult, as it requires careful consideration to set up the problem, especially the rewards. Furthermore, it is typically not possible to collect additional data and so evaluating learned policies on retrospective data presents a challenge.
|
| 58 |
+
|
| 59 |
+
Most related to this paper are Raghu et al. (2017) and Komorowski et al. (2016), who also look at the problem of learning optimal sepsis treatments. We build off of their work by using a more sophisticated network architecture that takes into account both memory through the use of DRQNs and uncertainty in time series imputation and interpolation using MGPs. Other relevant work includes Prasad et al. (2017), who use a simpler learning algorithms to learn optimal strategies for ventilator weaning, and Nemati et al. (2016), who also use a deep RL approach for modeling ICU heparin dosing as a POMDP with discriminative hidden Markov models and Q-networks. There also exists a rich set of work from the statistics and causal inference literature on learning dynamic treatment regimes, e.g. Chakraborty & Moodie (2013), Shortreed et al. (2010), although the models are typically fairly simple for ease of interpretability.
|
| 60 |
+
|
| 61 |
+
# 3 MGP-DRQN: MULTI-OUTPUT GAUSSIAN PROCESS DEEP RECURRENTQ-NETWORKS
|
| 62 |
+
|
| 63 |
+
We now introduce Multi-Output Gaussian Process Deep Recurrent Q-Networks, or MGP-DRQNs, a novel reinforcement learning algorithm for learning optimal treatment policies from noisy, sparsely sampled, and frequently missing clinical time series data. We assume a discrete action space, $a \in$ $\mathcal { A } = \{ 1 , \ldots , A \}$ . Let $\mathbf { X }$ denote $T$ regularly spaced grid times at which we would like to learn optimal treatment decisions. Given a set of clinical physiological time series $\mathbf { y }$ that we assume to be distributed according to an MGP, we can compute a posterior distribution for $z _ { t } | \mathbf { y }$ , the latent unobserved time series values at each grid time.
|
| 64 |
+
|
| 65 |
+
The loss function we optimize is similar to in normal deep Q-learning, with the addition of the expectation due to the MGP and the fact that we compute the loss over full patient trajectories. In particular, we learn optimal DRQN parameters $\theta ^ { * }$ and MGP hyperparameters $\eta ^ { * }$ via:
|
| 66 |
+
|
| 67 |
+
$$
|
| 68 |
+
\theta ^ { * } , \eta ^ { * } = \operatorname * { a r g m i n } _ { \theta , \eta } \mathbb { E } \left[ \mathbb { E } _ { p ( \mathbf { z } | \mathbf { y } ; \eta ) } \left\{ \frac { 1 } { T } \sum _ { t = 1 } ^ { T } ( Q _ { t a r g e t } ^ { ( t ) } - Q ( [ z _ { t } , s _ { t } ] ^ { \top } , a ; \theta ) ) ^ { 2 } \right\} \right] ,
|
| 69 |
+
$$
|
| 70 |
+
|
| 71 |
+
where the $t ^ { \prime }$ ’th target value is $\begin{array} { r } { Q _ { t a r g e t } ^ { ( t ) } = r _ { t } + \gamma \mathrm { m a x } _ { a ^ { \prime } } Q ( [ z _ { t + 1 } , s _ { t + 1 } ] , a ^ { \prime } ) } \end{array}$ , the outer expectation is concatenate the two separate types of model inputs at time $t$ , with $z _ { t }$ denoting latent variables distributed according to an MGP posterior from other relevant inputs to the model denoted $s _ { t }$ , such as static baseline covariates. In Section 4.1 we go into detail on the particular variables included in $s _ { t }$ .
|
| 72 |
+
|
| 73 |
+
We use a Dueling Double-Deep Q-network architecture, similar to Raghu et al. (2017). The Dueling Q-network architecture Wang et al. (2016) has separate value and advantage streams to separate the effect of a patient being in a good underlying state from a good action being taken. The Double-Deep Q-network architecture (van Hasselt et al. (2016)) helps correct overestimation of Q-values by using a second target network to compute the Q-values in the target $\boldsymbol { Q } _ { t a r g e t }$ . Finally, we use Prioritized Experience Replay in order to speed learning, so that patient encounters with higher training error will be resampled more frequently. We use 2 LSTM layers with 64 hidden units each that feed to a final fully connected layer with 64 hidden units, before splitting into equally sized value and advantage streams that are finally then projected onto the action space to obtain $\mathrm { Q }$ -value estimates.
|
| 74 |
+
|
| 75 |
+
We implemented our methods in Tensorflow using the Adam optimizers (Kingma & Ba (2015)) with minibatches of 50 encounters sampled at a time, a learning rate of 0.001, and $L _ { 2 }$ regularization on weights. We use 25 Monte Carlo samples from the MGP for each sampled encounter in order to approximate the expected loss and compute approximate gradients, and these samples and other inputs are fed in a forward pass through the DRQN to get predictions $Q ( s , a )$ . We will release source code via Github after the review period.
|
| 76 |
+
|
| 77 |
+
# 4 EXPERIMENTS, EVALUATION, AND RESULTS
|
| 78 |
+
|
| 79 |
+
In this section we first describe the details of our dataset of septic patients before highlighting how the experiments were set up and how the algorithms were evaluated.
|
| 80 |
+
|
| 81 |
+
# 4.1 DATASET AND PREPROCESSING
|
| 82 |
+
|
| 83 |
+
Our dataset consists of information collected during 9,255 patient encounters resulting in sepsis at our university hospital, spanning a period of 15 months. We define sepsis to be the first time at which a patient simultaneously had persistently abnormal vitals (as measured by a $^ { 2 + }$ SIRS score, Bone et al. (1992)), a suspicion of infection (as measured by an order for a blood culture), and an abnormal laboratory value indicative of organ damage. This differs from the new Sepsis-3 definition (Seymour et al. (2016)), which has since been largely criticized for its detection of sepsis late in the clinical course (Cortes-Puch & Hartog (2016)). We break the full dataset into 7867 training patient encounters and reserve the remaining 1388 for testing.
|
| 84 |
+
|
| 85 |
+
We discretize the data to learn actions in 4 hour windows. We emphasize that the raw data itself is not down-sampled; rather, we use the MGP to learn a posterior for the time series values every 4 hours. Actions for the RL setup consist of 3 treatments commonly given to septic patients: antibiotics, vasopressors, and IV fluids. Antibiotics and vasopressors are broken down into 3 categories, based on whether 0, 1, or $^ { 2 + }$ were administered in each 4 hour window. For IV Fluids, we consider 5 discrete categories: either 0, or one of 4 aggregate doses based on empirical quartiles of total fluid volumes. This yields a discrete action space with $3 \times 3 \times 5 = 4 5$ distinct actions.
|
| 86 |
+
|
| 87 |
+
Our data consists of 36 longitudinal physiological variables (e.g. blood pressure, pulse, white blood cell count), 2 longitudinal categorical variables, and 38 variables available at baseline (e.g. age, previous medical conditions). 8 medications tangential to sepsis treatment are included as inputs to MGP-DRQN, as well as an indicator for which of the 45 actions was administered at the last time. Additionally, 36 indicator variables for whether or not each lab/vital was recently sampled allows the model to learn from informative sampling due to non-random missingness. In total, there are 165 input observation variables to each of the Q-network models at each time.
|
| 88 |
+
|
| 89 |
+
Our outcome of interest is mortality within 30 days of onset of sepsis. We use a sparse reward function in this initial work, so that the reward at every non-terminal time point is 0, with a reward of $\pm 1 0$ at the end of a trajectory based on patient survival/death. Although this presents a challenging credit assignment problem, this allows for data to inform what actions should be taken to reduce chance of death without being overly prescriptive.
|
| 90 |
+
|
| 91 |
+
# 4.2 BASELINE METHODS
|
| 92 |
+
|
| 93 |
+
We use SARSA, an on-policy algorithm, to estimate state-action values for the physician policy.
|
| 94 |
+
|
| 95 |
+
We compare a number of different architectures for learning optimal sepsis treatments. In addition to our proposed MGP-DRQN, we compare against MGP-mean-DRQN, a variant where we move the posterior expectation inside the DRQN loss function, meaning we use the posterior mean of the MGP rather than use Monte Carlo samples from the MGP. We also compare against a DRQN with identical architecture, but replace the MGP with last-one-carried-forward imputation to fill in any missing values, and use the mean if there are multiple measurements. We also compare against a vanilla DQN, a MGP-DQN, and a MGP-mean-DQN, with an equivalent number of layers and parameters, to test the effect of the recurrence in the DRQN models.
|
| 96 |
+
|
| 97 |
+
# 4.3 OFF-POLICY VALUE EVALUATION
|
| 98 |
+
|
| 99 |
+
We use Doubly Robust Off-policy Value Evaluation (Jiang & Li (2016)) to compute unbiased estimates of each learned optimal policy using our observed off-policy data. For each patient trajectory in the test set we estimate its value using this method, and the average results. In order to apply this method we train an MGP-RNN to estimate the action probabilities of the physician policy.
|
| 100 |
+
|
| 101 |
+
# 4.4 QUANTITATIVE RESULTS
|
| 102 |
+
|
| 103 |
+
In Figure 1 we show the results of using SARSA to estimate expected returns for the physician policy on the test data. The Q-values appear to be well calibrated with mortality, as patients who were estimated to have higher expected returns tended to have lower mortality. Due to small sample sizes for very low expected returns, the mortality rate does not always monotonically decrease.
|
| 104 |
+
|
| 105 |
+

|
| 106 |
+
Figure 1: For the 1388 patients in the test set we show the expected returns as computed by SARSA, against 30-day mortality among patients with similar Q-values. Our model appears to be well calibrated, as higher returns are associated with lower mortality.
|
| 107 |
+
|
| 108 |
+
We can estimate the potential reduction in mortality a learned policy might have by computing an unbiased estimate of the policy value, as described in Section 4.3, and then use the results in Figure 1. Table 1 contains the policy value estimates for each algorithm considered, along with estimated mortality rates. The physician policy has an estimated value of 5.52 and corresponding mortality of $1 3 . 3 \%$ , matching the observed mortality in the test set of $1 3 . 3 \%$ . Overall the MGPDRQN performs and might reduce mortality by as much as $8 \%$ . The DRQN architectures tended to yield higher expected returns, probably because they are able to retain some memory of past clinical states and actions taken. The MGP consistently improved results as well, and the additional uncertainty information contained in the full MGP posterior appeared to do better than the policies that only used the posterior mean.
|
| 109 |
+
|
| 110 |
+
<table><tr><td rowspan=1 colspan=2>Policy</td><td rowspan=1 colspan=1>Expected Return</td><td rowspan=1 colspan=1>EstimatedMortality</td></tr><tr><td rowspan=7 colspan=2>PhysicianMGP-DRQNMGP-mean-DRQNDRQNMGP-DQNMGP-mean-DQNDQN</td><td rowspan=1 colspan=1>5.52</td><td rowspan=6 colspan=1>13.3 ± 0.7%5.1 ± 0.5%6.6 ± 0.4%8.4 ± 0.4%6.6 ± 0.4%7.5 ± 0.4%</td></tr><tr><td rowspan=1 colspan=1>7.51</td></tr><tr><td rowspan=1 colspan=1>6.97</td></tr><tr><td rowspan=1 colspan=1>6.63</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>7.05</td></tr><tr><td rowspan=1 colspan=1>6.73</td></tr><tr><td rowspan=1 colspan=1>6.09</td><td rowspan=1 colspan=1>10.6 ± 0.5%</td></tr></table>
|
| 111 |
+
|
| 112 |
+
Table 1: Expected returns for the various policies considered. For the 6 reinforcement learning algorithms considered, we estimate their expected returns using an off-policy value evaluation algorithm. Using the results from Figure 1, we estimate the potential expected mortality reduction associated with each policy.
|
| 113 |
+
|
| 114 |
+
# 4.5 QUALITATIVE RESULTS
|
| 115 |
+
|
| 116 |
+
We also qualitatively evaluate the results of the policy from our best performing learning algorithm, the MGP-DRQN. In Figure 2 we compare the number of times each type of action was actually taken by physicians, and how many times the learned policy selected that action. The MGP-DRQN policy tended to recommend more use of antibiotics and more vasopressors than were actually used by physician, while strangely recommending somewhat less use of IV fluids.
|
| 117 |
+
|
| 118 |
+

|
| 119 |
+
Figure 2: Comparison of physician actions with the actions that would have been taken by the MGP-DRQN policy, with actions separated according to the 3 types of treatments considered.
|
| 120 |
+
|
| 121 |
+
In Figure 3, we show how mortality rates differ on the test set as a function of how different the observed physician action was from what the MGP-DRQN would have recommended. For all 3 types of treatments, there appears to be a local minimum at 0 and we observe a $\mathrm { v }$ shape, indicating that empirically, mortality tended to be lowest when the clinicians took the same actions that the MGP-DRQN would have. Uncertainty tends to be higher due to smaller sample sizes for situations where there is larger disparity.
|
| 122 |
+
|
| 123 |
+

|
| 124 |
+
Figure 3: Empirical mortality rates as a function of how much the MGP-DRQN policy’s actions differed from the observed physician actions. Minimal mortality is observed for all 3 treatment types at 0, where the physicians and MGP-DRQN agreed.
|
| 125 |
+
|
| 126 |
+
Finally, in Figure 4 we show clinical data from a sample patient case. In the top pane of the figure we show five representative vital signs and lab measurements to illustrate the patient’s clinical status, while the bottom shows both what actions physicians actually took and what actions the model recommended. The patient was admitted to the Emergency Department for altered mental status, and the MGP-DRQN quickly recognizes the need for antibiotics and IV fluids. The patient is admitted to the hospital and around hour 6 the clinical team becomes aware of sepsis. However, antibiotics are not first administered until hour 18, about 16 hours after the model recommended treating with them. After the patient is transferred to the Intensive Care Unit, their white blood cell count continues to rise (a sign of worsening infection) and their blood pressure continues to fall (a sign of worsening shock). By hour 14, the RL model starts and continues to recommend use of vasopressors to attempt to increase blood pressure, but they are not actually administered for about another 16 hours at hour 30. Ultimately, by hour 45 care was withdrawn and the patient passed away at hour 50. Cases such as this one illustrate the potential benefits of using our learned treatment policy in a decision support tool to recommend treatments to providers. If such a tool were used in this situation, it is possible that earlier treatments and more aggressive interventions might have resulted in a different outcome.
|
| 127 |
+
|
| 128 |
+

|
| 129 |
+
Figure 4: Top: clinical data from a patient who acquired sepsis, decompensated in the Intensive Care Unit while progressing to septic shock, and ultimately did not survive. Bottom: shaded symbols denote treatments that the learned MGP-DRQN policy would have recommended, while open symbols denote the treatment actions actually taken by physicians caring for this patient.
|
| 130 |
+
|
| 131 |
+
# 5 CONCLUSION
|
| 132 |
+
|
| 133 |
+
In this paper we presented a new framework combining multi-output Gaussian processes and deep reinforcement learning for clinical problems, and found that our approach performed well in estimating optimal treatment strategies for septic patients. The use of recurrent structure in the Q-network architecture yielded higher expected returns than a standard Q-network, accounting for the nonMarkovian nature of real-world medical data. The multi-output Gaussian process also improved performance by offering a more principled method for interpolation and imputation, and use of the full MGP posterior improved upon the results from just using the posterior mean.
|
| 134 |
+
|
| 135 |
+
In the future, we could include treatment recommendations from our learned policies into our dashboard application we have developed for early detection of sepsis. The treatment recommendations might help providers better care for septic patients after sepsis has been properly identified, and start treatments faster. There are many potential avenues for future work. One promising direction is to investigate the use of more complex reward functions, rather than the sparse rewards used in this work. More sophisticated rewards might take into account clinical targets for maintaining hemodynamic stability, and penalize an overzealous model that recommends too many unnecessary actions. Our modeling framework is fairly generalizable, and can easily be applied to other medical applications where there is a need for data-driven decision support tools. In future work we plan to use similar methods to learn optimal treatment strategies for treating patients with cardiogenic shock, and to learn effective insulin dosing regimes for patients on high-dose steroids.
|
| 136 |
+
|
| 137 |
+
REFERENCES
|
| 138 |
+
D. C. Angus, A. E. Barnato, D. Bell, and et al. A systematic review and meta-analysis of early goal-directed therapy for septic shock: the arise, process and promise investigators. Intensive Care Medicine, 41(9): 1549–1560, 2015.
|
| 139 |
+
Investigators ARISE and Anzics Clinical Trials Group. Goal-directed resuscitation for patients with early septic shock. N Engl J Med, 371(16):1496–1506, 2014.
|
| 140 |
+
R. C. Bone, R. A. Balk, and F. B. et al. Cerra. Definitions for sepsis and organ failure and guidelines for the use of innovative therapies in sepsis. Chest, 101(6):1644–55, 1992.
|
| 141 |
+
B. Chakraborty and E. E. M. Moodie. Statistical Methods for Dynamic Treatment Regimes: Reinforcement Learning, Causal Inference and Personalized Medicine. Springer, 2013.
|
| 142 |
+
L. Cheng, G. Darnell, C. Chivers, M. E. Draugelis, K. Li, and B. E. Engelhardt. Sparse multi-output Gaussian processes for medical time series prediction. arXiv preprint arXiv:1703.09112, pp. 1–36, March 2017. URL https://arxiv.org/abs/1703.09112.
|
| 143 |
+
I. Cortes-Puch and C. $\mathrm { \Delta } \mathrm { S } _ { \mathrm { \Delta } }$ Hartog. Change is not necessarily progress: Revision of the sepsis definition should be based on new scientific insights. Am J Respir Crit Care Med, 194(1):16–18, 2016.
|
| 144 |
+
R. P. Dellinger, M. M. Levy, Surviving Sepsis Campaign Guidelines Committee, and et al. Surviving sepsis campaign: International guidelines for management of severe sepsis and septic shock. Intensive Care Medicine, 39(2):165–228, 2013.
|
| 145 |
+
R. Durichen, M. A. F. Pimentel, and L. et al. Clifton. Multitask gaussian processes for multivariate physiological time-series analysis. IEEE Transactions on Biomedical Engineering, 61(1), 2015.
|
| 146 |
+
L. Epstein, R. Dantes, S. Magill, and A. Fiore. Varying estimates of sepsis mortality using death certificates and administrative codes united states, 19992014. MMWR Morb Mortal Wkly Rep., 65(13):342–345, 2016.
|
| 147 |
+
A. Esteva, B. Kuprel, and R. A. Novoa. Dermatologist-level classification of skin cancer with deep neural networks. Nature, 542:115–118, 2017.
|
| 148 |
+
J. Futoma, S. Hariharan, and K. Heller. Learning to detect sepsis with a multitask gaussian process rnn classifier. ICML, 2017a.
|
| 149 |
+
J. Futoma, S. Hariharan, M. Sendak, and et al. An improved multi-output gaussian process rnn with real-time validation for early sepsis detection. MLHC, 2017b.
|
| 150 |
+
M. Ghassemi, M. A. F. Pimentel, and T. et al. Naumann. A multivariate timeseries modeling approach to severity of illness assessment and forecasting in icu with sparse, heterogeneous clinical data. AAAI, 2015.
|
| 151 |
+
M. Hausknecht and P. Stone. Deep recurrent q-learning for partially observable mdps. AAAI, 2015.
|
| 152 |
+
K. E. Henry, D. N. Hager, P. J. Pronovost, and S. Saria. A targeted real-time early warning score (trewscore) for septic shock. Science Translational Medicine, 7(299), 2015.
|
| 153 |
+
S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural Computation, 9(8):1735–80, 1997.
|
| 154 |
+
N. Jiang and L. Li. Doubly robust off-policy value evaluation for reinforcement learning. ICML, 2016.
|
| 155 |
+
A. C. Kalil, D. W. Johnson, S. J. Lisco, and J. Sun. Early goal-directed therapy for sepsis: A novel solution for discordant survival outcomes in clinical trials. Critical Care Medicine, 45(4):607–614, 2017.
|
| 156 |
+
D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. ICLR, 2015.
|
| 157 |
+
D. P. Kingma and M. Welling. Auto-encoding variational bayes. ICLR, 2014.
|
| 158 |
+
M. Komorowski, A. Gordon, L. A. Celi, and A. Faisal. A markov decision process to suggest optimal treatment of severe infections in intensive care. NIPS Workshop on Machine Learning for Health, 2016.
|
| 159 |
+
A. Kumar, D. Roberts, K. E. Wood, and et al. Duration of hypotension before initiation of effective antimicrobial therapy is the critical determinant of survival in human septic shock. Crit Care Med., 34(6):1589–96, 2006.
|
| 160 |
+
R. J. Lewis. Disassembling goal-directed therapy for sepsis: a first step. JAMA, 303(8):777–779, 2010.
|
| 161 |
+
Z. C. Lipton, D. C. Kale, C. Elkan, and R. Wetzel. Learning to diagnose with lstm recurrent neural networks. ICLR, 2016.
|
| 162 |
+
V. Mnih, K. Kavukcuoglu, D. Silver, and et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015.
|
| 163 |
+
S. Nemati, M. M. Ghassemi, and G. D. Clifford. Optimal medication dosing from suboptimal clinical examples: A deep reinforcement learning approach. International Conference of IEEE-EMBC, 2016.
|
| 164 |
+
N. Prasad, L. F. Cheng, C. Chivers, and et al. A reinforcement learning approach to weaning of mechanical ventilation in intensive care units. UAI, 2017.
|
| 165 |
+
Investigators PRISM. Early, goal-directed therapy for septic shock a patient-level meta-analysis. N Engl J Med, 376:2223–2234, 2017.
|
| 166 |
+
Investigators ProCESS, D. M. Yealy, J. A. Kellum, and et al. A randomized trial of protocol-based care for early septic shock. N Engl J Med, 370(18):1683–1693, 2014.
|
| 167 |
+
A. Raghu, M. Komorowski, and L. A. et al. Celi. Continuous state-space models for optimal sepsis treatment - a deep reinforcement learning approach. MLHC, 2017.
|
| 168 |
+
A. Rhodes, L. E. Evans, W. Alhazzani, and et al. Surviving sepsis campaign: International guidelines for management of sepsis and septic shock: 2016. Intensive Care Medicine, 43(3):304–377, 2017.
|
| 169 |
+
E. Rivers, B. Nguyen, S. Havstad, and et al. Early goal-directed therapy in the treatment of severe sepsis and septic shock. N Engl J Med., 345(19):1368–1377, 2001.
|
| 170 |
+
C. W. Seymour, V. X. Liu, T. J. Iwashyna, and et al. Assessment of clinical criteria for sepsis: For the third international consensus definitions for sepsis and septic shock (sepsis-3). JAMA, 315(8):762, 2016.
|
| 171 |
+
C. W. Seymour, F. Gesten, and H. C. et al. Prescott. Time to treatment and mortality during mandated emergency care for sepsis. New England Journal of Medicine, 2017.
|
| 172 |
+
S. M. Shortreed, E. Laber, and D. J. et al. Lizotte. Informing sequential decision-making through reinforcement learning: an empirical study. Machine Learning, 2010.
|
| 173 |
+
H. Soleimani, J. Hensman, and S. Saria. Scalable joint models for reliable uncertainty-aware event prediction. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017.
|
| 174 |
+
Richard S. Sutton and Andrew G. Barto. Introduction to Reinforcement Learning. MIT Press, Cambridge, MA, USA, 1st edition, 1998.
|
| 175 |
+
C. M. Torio and B. J. Moore. National inpatient hospital costs: The most expensive conditions by pay, 2013. Healthcare Cost and Utilization Project (HCUP) Statistical Briefs, 204, 2016.
|
| 176 |
+
H. van Hasselt, A. Guez, and D. Silver. Deep reinforcement learning with double q-learning. AAAI, 2016.
|
| 177 |
+
Z. Wang, T. Schaul, M. Hessel, and et al. Dueling network architectures for deep reinforcement learning. ICML, 2016.
|
| 178 |
+
C. J. C. H. Watkins and P. Dayan. Q-learning. Machine Learning, 8(3-4):279–292, 1992.
|
md/train/YNnpaAKeCfx/YNnpaAKeCfx.md
ADDED
|
@@ -0,0 +1,608 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# FAIRBATCH: BATCH SELECTION FOR MODEL FAIRNESS
|
| 2 |
+
|
| 3 |
+
Yuji $\mathbf { R o h } ^ { 1 }$ , Kangwook Lee2, Steven Euijong Whang∗1, Changho Suh1 1KAIST, {yuji.roh,swhang,chsuh}@kaist.ac.kr 2University of Wisconsin-Madison, kangwook.lee@wisc.edu
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Training a fair machine learning model is essential to prevent demographic disparity. Existing techniques for improving model fairness require broad changes in either data preprocessing or model training, rendering themselves difficult-to-adopt for potentially already complex machine learning systems. We address this problem via the lens of bilevel optimization. While keeping the standard training algorithm as an inner optimizer, we incorporate an outer optimizer so as to equip the inner problem with an additional functionality: Adaptively selecting minibatch sizes for the purpose of improving model fairness. Our batch selection algorithm, which we call FairBatch, implements this optimization and supports prominent fairness measures: equal opportunity, equalized odds, and demographic parity. FairBatch comes with a significant implementation benefit – it does not require any modification to data preprocessing or model training. For instance, a single-line change of PyTorch code for replacing batch selection part of model training suffices to employ FairBatch. Our experiments conducted both on synthetic and benchmark real data demonstrate that FairBatch can provide such functionalities while achieving comparable (or even greater) performances against the state of the arts. Furthermore, FairBatch can readily improve fairness of any pre-trained model simply via fine-tuning. It is also compatible with existing batch selection techniques intended for different purposes, such as faster convergence, thus gracefully achieving multiple purposes.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Model fairness is becoming essential in a wide variety of machine learning applications. Fairness issues often arise in sensitive applications like healthcare and finance where a trained model must not discriminate among different individuals based on age, gender, or race.
|
| 12 |
+
|
| 13 |
+
While many fairness techniques have recently been proposed, they require a range of changes in either data generation or algorithmic design. There are two popular fairness approaches: (i) pre-processing where training data is debiased (Choi et al., 2020) or re-weighted (Jiang and Nachum, 2020), and (ii) in-processing in which an interested model is retrained via several fairness approaches such as fairness objectives (Zafar et al., 2017a;b), adversarial training (Zhang et al., 2018), or boosting (Iosifidis and Ntoutsi, 2019); see more related works discussed in depth in Sec. 5. However, these approaches may require nontrivial re-configurations in modern machine learning systems, which often consist of many complex components.
|
| 14 |
+
|
| 15 |
+
In an effort to enable easier-to-reconfigure implementation for fair machine learning, we address the problem via the lens of bilevel optimization where one problem is embedded within another. While keeping the standard training algorithm as the inner optimizer, we design an outer optimizer that equips the inner problem with an added functionality of improving fairness through batch selection.
|
| 16 |
+
|
| 17 |
+
Our main contribution is to develop a batch selection algorithm (called FairBatch) that implements this optimization via adjusting the batch sizes w.r.t. sensitive groups based on the fairness measure of an intermediate model, measured in the current epoch. For example, consider a task of predicting whether individual criminals re-offend in the future subject to satisfying equalized odds (Hardt et al., 2016) where the model accuracies must be the same across sensitive groups. In case the model is less
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
|
| 21 |
+
fairsampler $=$ FairBatch(model, criterion, train_data, batch_size, alpha, target_fairness) loader $=$ DataLoader(train_data, sampler $=$ fairsampler)
|
| 22 |
+
|
| 23 |
+
for epoch in range(epochs): for i, data in enumerate(loader): # get the inputs; data is a list of [inputs, labels] inputs, labels $=$ data . . . model forward, backward, and optimization . . .
|
| 24 |
+
|
| 25 |
+
(a) Accuracy difference across sensitive groups in the sense of equalized odds (that we denote as “ED disparity”) when running FairBatch on the ProPublica COMPAS dataset.
|
| 26 |
+
|
| 27 |
+
(b) PyTorch code for model training where the batch selection is replaced with FairBatch.
|
| 28 |
+
|
| 29 |
+
Figure 1: The black path in the left figure shows how FairBatch adjusts the batch-size ratios of sensitive groups using two reweighting parameters $\lambda _ { 1 }$ and $\lambda _ { 2 }$ (hyperparameters employed in our framework to be described in Sec. 2), thus minimizing their ED disparity, i.e., achieving equalized odds. The code in the right figure shows how easily FairBatch can be incorporated in a PyTorch machine learning pipeline. It requires a single-line change to replace the existing sampler with FairBatch, marked in blue.
|
| 30 |
+
|
| 31 |
+
accurate for a certain group, FairBatch increases the batch-size ratio of that group in the next batch – see Sec. 3 for our adjusting mechanism described in detail. Fig. 1a shows FairBatch’s behavior when running on the ProPublica COMPAS dataset (Angwin et al., 2016). For equalized odds, our framework (to be described in Sec. 2) introduces two reweighting parameters $( \lambda _ { 1 } , \lambda _ { 2 } )$ for the purpose of adjusting the batch-size ratios of two sensitive groups (in this experiment, men and women). After a few epochs, FairBatch indeed achieves equalized odds, i.e., the accuracy disparity between sensitive groups conditioned on the true label (denoted as “ED disparity”) is minimized. FairBatch also supports other prominent group fairness measures: equal opportunity (Hardt et al., 2016) and demographic parity (Feldman et al., 2015).
|
| 32 |
+
|
| 33 |
+
A key feature of FairBatch is in its great usability and simplicity. It only requires a slight modification in the batch selection part of model training as demonstrated in Fig. 1b and does not require any other changes in data preprocessing or model training. Experiments conducted both on synthetic and benchmark real datasets (ProPublica COMPAS (Angwin et al., 2016), AdultCensus (Kohavi, 1996), and UTKFace (Zhang et al., 2017)) show that FairBatch exhibits greater (at least comparable) performances relative to the state of the arts (both spanning pre-processing (Kamiran and Calders, 2011; Jiang and Nachum, 2020) and in-processing (Zafar et al., 2017a;b; Zhang et al., 2018; Iosifidis and Ntoutsi, 2019) techniques) w.r.t. all aspects in consideration: accuracy, fairness, and runtime. In addition, FairBatch can improve fairness of any pre-trained model via fine-tuning. For example, Sec. 4.2 shows how FairBatch reduces the ED disparities of ResNet18 (He et al., 2016) and GoogLeNet (Szegedy et al., 2015) pre-trained models. Finally, FairBatch can be gracefully merged with other batch selection techniques typically used for faster convergence, thereby improving fairness faster as well.
|
| 34 |
+
|
| 35 |
+
Notation Let $\textbf { \em w }$ be the parameter of an interested classifier. Let $\mathbf { x } \in \mathbb { X }$ be an input feature to the classifier, and let $\hat { \mathbf { y } } \in \mathbb { Y }$ be the predicted class. Note that $\hat { \bf y }$ is a function of $( \mathbf { x } , \pmb { w } )$ . We consider group fairness that intends to ensure fairness across distinct sensitive groups (e.g., men versus women). Let $z \in \mathbb { Z }$ be a sensitive attribute (e.g., gender). Consider the $0 / 1$ loss: $\ell ( \mathbf { y } , \hat { \mathbf { y } } ) = \mathbb { 1 } ( \mathbf { y } \neq \hat { \mathbf { y } } )$ , and let $m$ be the total number of train samples. Let $L _ { y , z } ( w )$ be the empirical risk aggregated over samples subject to ${ \bf y } = y$ and $z = z$ $\begin{array} { r } { \because L _ { y , z } ( w ) : = \frac { 1 } { m _ { y , z } } \sum _ { i : \mathrm { y } _ { i } = y , \mathrm { z } _ { i } = z } \ell ( \mathrm { y } _ { i } , \hat { \mathrm { y } } _ { i } ) } \end{array}$ where $m _ { y , z } : = | \{ i : \mathbf { y } _ { i } = y , \mathbf { z } _ { i } = z \} |$ Similarly, we define $\begin{array} { r } { L _ { \boldsymbol { y } , \star } ( \boldsymbol { w } ) : = \frac { 1 } { m _ { \boldsymbol { y } , \star } } \sum _ { i : \boldsymbol { y } _ { i } = \boldsymbol { y } } \ell ( \boldsymbol { \mathrm { y } } _ { i } , \hat { \bf { y } } _ { i } ) } \end{array}$ and $\begin{array} { r } { L _ { \star , z } ( w ) : = \frac { 1 } { m _ { \star , z } } \sum _ { i : z _ { i } = z } \ell ( { \mathbf { y } } _ { i } , \hat { { \mathbf { y } } } _ { i } ) } \end{array}$ where $m _ { y , \star } : = | \{ i : \mathbf { y } _ { i } = y \} |$ and $m _ { \star , z } : = | \{ i : \mathrm { z } _ { i } = z \} |$ . The overall empirical risk is written as $\begin{array} { r } { L ( \boldsymbol { \mathbf { \rho } } \boldsymbol { \mathbf { w } } ) = \frac { 1 } { m } \sum _ { i } \ell \big ( \mathbf { y } _ { i } , \hat { \mathbf { y } } _ { i } \big ) } \end{array}$ . We utilize $\nabla$ for gradient and $\partial$ for subdifferential.
|
| 36 |
+
|
| 37 |
+
# 2 BILEVEL OPTIMIZATION FOR FAIRNESS
|
| 38 |
+
|
| 39 |
+
In order to systematically design an adaptive batch selection algorithm, we formalize an implicit connection between adaptive batch selection and bilevel optimization. Bilevel optimization consists of an outer optimization problem and an inner optimization problem. The inner optimizer solves an inner optimization problem, and the outer optimizer solves an outer optimization problem based on the outcomes of inner optimization. By viewing the standard training algorithm such as stochastic gradient descent (SGD) (Bottou, 2010) as an inner optimizer and viewing the batch selection algorithm as an outer optimizer, the process of training a fair classifier can be seen as a process of solving a bilevel optimization problem.
|
| 40 |
+
|
| 41 |
+
<table><tr><td>Algorithm1: Bilevel optimization with Minibat ch SGD</td></tr><tr><td>Minibatch sampling distribution ← Uniform sampling</td></tr><tr><td>foreach epoch do</td></tr><tr><td>Draw minibatches according to minibatch sampling distribution</td></tr><tr><td>for each minibatch do</td></tr><tr><td>1 w ← MinibatchSGD(w,each minibatch) Update minibatch sampling distribution</td></tr></table>
|
| 42 |
+
|
| 43 |
+
Batch selection $^ +$ minibatch $\mathbf { S _ { G D } } =$ bilevel optimization solver Consider a scenario where one is minimizing the overall empirical risk $L ( w )$ via minibatch SGD. The minibatch SGD algorithm picks $b$ of the $m$ indices uniformly at random, say $j _ { 1 } , j _ { 2 } , \dots , j _ { b }$ , and updates its iterate with $\begin{array} { r } { \frac { 1 } { b } \sum _ { i = 1 } ^ { b } \nabla \ell ( \mathbf { y } _ { j _ { i } } , \hat { \mathbf { y } } _ { j _ { i } } ) } \end{array}$ , called a batch gradient. Note that a batch gradient is an unbiased estimate of the true gradient $\nabla L ( \boldsymbol { w } )$ .
|
| 44 |
+
|
| 45 |
+
Since the empirical risk minimization (ERM) formulation does not take a fairness criterion into account, its minimizer usually does not satisfy the desired fairness criterion. To address this limitation of ERM, we adjust the way minibatches are drawn so that the desired fairness guarantee is satisfied. For instance, as we described in the introduction, we can draw minibatches with a larger number of train samples from a certain sensitive group so as to achieve a higher accuracy w.r.t. the group.
|
| 46 |
+
|
| 47 |
+
Once the minibatch distribution deviates from the uniform distribution, the batch gradient estimate is not anymore an unbiased gradient estimate of the overall empirical risk. Instead, it is an unbiased estimate of a reweighted empirical risk. In other words, if we draw train example $i$ with probability $p _ { i }$ for all $i$ such that $\sum p _ { i } = 1$ , the batch gradient is an unbiased estimate of $\begin{array} { r } { L ^ { \prime } ( \mathbf { \bar { w } } ) = \sum _ { i } \bar { p } _ { i } \ell ( \mathbf { y } _ { i } , \hat { \mathbf { y } } _ { i } ) } \end{array}$
|
| 48 |
+
|
| 49 |
+
This observation enables us the following bilevel optimization-based interpretation of how batch selection interacts with inner optimization algorithm. At initialization, minibatch SGD optimizes the (unweighted) empirical risk. Based on the outcome of the inner optimization, the outer optimizer refines $\pmb { p } : = ( p _ { 1 } , p _ { 2 } , \dots p _ { m } )$ , the sampling probability of each train example. The inner optimizer now takes minibatches drawn from a new distribution and reoptimizes the inner objective function. Due to the new minibatch distribution, the inner objective now becomes a reweighted empirical risk w.r.t. $\pmb { p }$ . This procedure is repeated until convergence. See Algorithm 1 for pseudocode.
|
| 50 |
+
|
| 51 |
+
Therefore, a batch selection algorithm together with an inner optimization algorithm can be viewed as a pair of outer optimizer and inner optimizer for the following bilevel optimization problem:
|
| 52 |
+
|
| 53 |
+
$$
|
| 54 |
+
\operatorname* { m i n } _ { \pmb { p } } \mathrm { C o s t } ( \pmb { w } _ { p } ) , \ \pmb { w } _ { p } = \arg \operatorname* { m i n } _ { \pmb { w } } L ^ { \prime } ( \pmb { w } ) ,
|
| 55 |
+
$$
|
| 56 |
+
|
| 57 |
+
where $\mathrm { { C o s t } ( \cdot ) }$ captures the goal of the optimization.
|
| 58 |
+
|
| 59 |
+
Two questions arise. First, how can we design the cost function to capture a desired fairness criterion? Second, how can we design an update rule for the outer optimizer? Can we develop an algorithm with a provable guarantee? In the rest of this section, we show how one can design proper cost functions to capture various fairness criteria. In Sec. 3, we will develop an efficient update rule of FairBatch.
|
| 60 |
+
|
| 61 |
+
Equal opportunity For illustrative purpose, assume for now the binary setting $\mathbb { Y } = \mathbb { Z } = \{ 0 , 1 \} ,$ ). A model satisfies equal opportunity (Hardt et al., 2016) if we have equal positive prediction rates conditioned on $\mathbf { y } = 1$ , i.e., $L _ { 1 , 0 } ( \dot { \boldsymbol { w } } ) = L _ { 1 , 1 } ( \boldsymbol { w } )$ . Since the ERM formulation does not take the fairness criterion into account, these two quantities differ in general. To mitigate this, we adjust the sampling probability between $\ b { L } _ { 1 , 0 } ( \pmb { w } )$ and ${ \cal L } _ { 1 , 1 } ( w )$ . More specifically, we propose the following procedure to draw a sample. First, we randomly pick which subset of data to sample data from. We pick the set $\mathbf { y } = 1 , \mathbf { z } = 0$ with probability $\lambda$ , the set $\mathbf { y } = 1 , \mathbf { z } = 1$ with probability $\overline { { { \frac { m _ { 1 , \star } } { m } } - \lambda } }$ , and the set $\mathsf { y } = 0$ with probability $\frac { m _ { 0 , \star } } { m }$ We then pick a sample from the chosen set, uniformly at random.
|
| 62 |
+
|
| 63 |
+
This leaves us with a single-dimensional outer optimization variable $\lambda$ , which controls the sampling bias between data with $\mathbf { y } = 1 , \mathbf { z } = 0$ and data with $\mathbf { y } = 1 , \mathbf { z } = 1$ . Also, we design the cost function as $| L _ { 1 , 0 } ( \mathbf { \boldsymbol { w } } _ { \lambda } ) - L _ { 1 , 1 } ( \mathbf { \boldsymbol { w } } _ { \lambda } ) |$ to capture the equal opportunity criterion. Thus, we have the following bilevel optimization problem:
|
| 64 |
+
|
| 65 |
+
$$
|
| 66 |
+
\begin{array} { r } { \underset { \boldsymbol { w } \in [ 0 , \frac { m _ { 1 , * } } { m } ] } { \operatorname* { m i n } } \left| L _ { 1 , 0 } ( \boldsymbol { w } _ { \lambda } ) - L _ { 1 , 1 } ( \boldsymbol { w } _ { \lambda } ) \right| , \ w _ { \lambda } = \underset { \boldsymbol { w } } { \operatorname { a r g m i n } } \lambda L _ { 1 , 0 } ( \boldsymbol { w } ) + ( \frac { m _ { 1 , * } } { m } - \lambda ) L _ { 1 , 1 } ( \boldsymbol { w } ) + \frac { m _ { 0 , * } } { m } L _ { 0 , * } ( \boldsymbol { w } ) . } \end{array}
|
| 67 |
+
$$
|
| 68 |
+
|
| 69 |
+
Equalized odds Similarly, we can design a bilevel optimization problem to capture equalized odds (Hardt et al., 2016), which desires the prediction to be independent from the sensitive attribute conditional on the true label, i.e., $L _ { 0 , 0 } ( \pmb { w } ) = \bar { L } _ { 0 , 1 } ( \pmb { w } )$ and $L _ { 1 , 0 } ( \bar { \mathbf { w } } ) = L _ { 1 , 1 } ( \mathbf { w } )$ . Again, the empirical risk minimizer does not satisfy these two conditions in general. To mitigate these disparities, we adjust (i) the sampling probability between ${ \cal L } _ { 0 , 0 } ( { \pmb w } )$ and $\mathbf { \bar { \boldsymbol { L } } } _ { 0 , 1 } ( \pmb { w } )$ and (ii) the sampling probability between $\ b { L } _ { 1 , 0 } ( \pmb { w } )$ and $\ b { L } _ { 1 , 1 } ( \ b { w } )$ . To achieve this, we use the following procedure to draw a sample. First, we pick the set $\mathbf { y } = 0 , \mathbf { z } = 0$ with probability $\lambda _ { 1 }$ , the set $\mathbf { y } = 0 , \mathbf { z } = 1$ with probability $\frac { m _ { 0 , \star } } { m } - \lambda _ { 1 } ^ { \bar { } }$ , the set $\mathbf { y } = 1 , \mathbf { z } = 0$ with probability $\lambda _ { 2 }$ , and the set $\mathbf { y } = 1 , \mathbf { z } = 1$ with probability $\frac { m _ { 1 , \star } } { m } - \lambda _ { 2 }$ . We then pick one data point at random from the chosen set. This leaves us with a two-dimensional outer optimization variable $\pmb { \lambda } = ( \lambda _ { 1 } , \lambda _ { 2 } )$ . To capture the equalized odds criterion, we design the outer objective function as: $\operatorname* { m a x } \{ | L _ { 0 , 0 } ( \pmb { w } ) - L _ { 0 , 1 } ( \pmb { w } ) | , | L _ { 1 , 0 } ( \pmb { w } ) - L _ { 1 , 1 } ( \pmb { w } ) | \}$ . This gives us the following bilevel optimization problem:
|
| 70 |
+
|
| 71 |
+
$$
|
| 72 |
+
\begin{array} { r l } & { \underset { \lambda \in [ 0 , \frac { m _ { 0 } , \star } { m } ] \times [ 0 , \frac { m _ { 1 } , \star } { m } ] } { \operatorname* { m i n } } \operatorname* { m a x } \{ | L _ { 0 , 0 } ( \boldsymbol { w } _ { \lambda } ) - L _ { 0 , 1 } ( \boldsymbol { w } _ { \lambda } ) | , | L _ { 1 , 0 } ( \boldsymbol { w } _ { \lambda } ) - L _ { 1 , 1 } ( \boldsymbol { w } _ { \lambda } ) | \} , } \\ & { w _ { \lambda } = \underset { \boldsymbol { w } } { \operatorname* { m i n } } \lambda _ { 1 } L _ { 0 , 0 } ( \boldsymbol { w } ) + ( \frac { m _ { 0 , \star } } { m } - \lambda _ { 1 } ) L _ { 0 , 1 } ( \boldsymbol { w } ) + \lambda _ { 2 } L _ { 1 , 0 } ( \boldsymbol { w } ) + ( \frac { m _ { 1 , \star } } { m } - \lambda _ { 2 } ) L _ { 1 , 1 } ( \boldsymbol { w } ) . } \end{array}
|
| 73 |
+
$$
|
| 74 |
+
|
| 75 |
+
Demographic parity Demographic parity (Feldman et al., 2015) is satisfied if two sensitive groups have equal positive prediction rates. If $m _ { y , z }$ ’s are all equal, then ${ L _ { 0 , 0 } ( \pmb w ) = L _ { 1 , 0 } ( \pmb w ) }$ and ${ \cal L } _ { 0 , 1 } ( { \pmb w } ) =$ $\bar { L } _ { 1 , 1 } ( w )$ can serve as a sufficient condition for demographic parity; see Sec. A.1 for why and how to handle demographic parity when this condition does not hold. To satisfy this sufficient condition, we now adjust (i) the the sampling probability between $\boldsymbol { L } _ { 0 , 0 } ( \boldsymbol { w } )$ and $\ b { L } _ { 1 , 0 } ( \pmb { w } )$ and (ii) the the sampling probability between ${ \cal L } _ { 0 , 1 } ( { \pmb w } )$ and ${ \cal L } _ { 1 , 1 } ( w )$ . This gives us the following bilevel optimization problem:
|
| 76 |
+
|
| 77 |
+
$$
|
| 78 |
+
\begin{array} { r l } & { \underset { \lambda \in [ 0 , \frac { m _ { \star , 0 } ^ { \star } ] } { m } \times [ 0 , \frac { m _ { \star , 1 } } { m } ] } { \operatorname* { m i n } } \operatorname* { m a x } \{ | L _ { 0 , 0 } ( \boldsymbol { w } _ { \lambda } ) - L _ { 1 , 0 } ( \boldsymbol { w } _ { \lambda } ) | , | L _ { 0 , 1 } ( \boldsymbol { w } _ { \lambda } ) - L _ { 1 , 1 } ( \boldsymbol { w } _ { \lambda } ) | \} , } \\ & { w _ { \lambda } = \underset { \boldsymbol { w } } { \operatorname* { m i n } } \lambda _ { 1 } L _ { 0 , 0 } ( \boldsymbol { w } ) + \big ( \frac { m _ { \star , 0 } } { m } - \lambda _ { 1 } \big ) L _ { 1 , 0 } ( \boldsymbol { w } ) + \lambda _ { 2 } L _ { 0 , 1 } ( \boldsymbol { w } ) + \big ( \frac { m _ { \star , 1 } } { m } - \lambda _ { 2 } \big ) L _ { 1 , 1 } ( \boldsymbol { w } ) . } \end{array}
|
| 79 |
+
$$
|
| 80 |
+
|
| 81 |
+
Beyond binary labels/sensitive attributes While the previous examples assumed binary-valued labels and sensitive attributes, our framework is applicable to the cases where the alphabet sizes are beyond binary. As an example, consider the equal opportunity criterion when $\mathbb { Z } = \{ 0 , 1 , \ldots , n _ { z } - 1 \}$ . The condition reads $L _ { 1 , 0 } ( \dot { \pmb w } ) = L _ { 1 , 1 } ( \pmb w ) = \dot { \dots } = \bar { L } _ { 1 , n _ { z } - 1 } ( \pmb w )$ . To satisfy this condition, we adjust the sampling probability between $\mathbf { \Pi } _ { L _ { 1 , j } ( w ) }$ ’s by introducing $\binom { n _ { z } } { 2 }$ -dimensional outer optimization variable $\boldsymbol { \lambda }$ , and design the outer objective function as $\begin{array} { r } { \operatorname* { m a x } _ { j _ { 1 } , j _ { 2 } \in { \mathbb Z } } \bar { | L _ { 1 , j _ { 1 } } ( { \pmb w } ) - L _ { 1 , j _ { 2 } } ( { \pmb w } ) | } } \end{array}$ . In our implementation, however, we only use $( n _ { z } - 1 )$ -dimensional disparity objectives as an approximation (i.e., $\begin{array} { r } { \operatorname* { m a x } _ { j _ { 1 } \in \{ 0 , 1 , \dots , n _ { z } - 2 \} } | L _ { 1 , j _ { 1 } } ( \pmb { w } ) - L _ { 1 , j _ { 1 } + 1 } ( \pmb { w } ) | ) } \end{array}$ for better efficiency. Suppose the level of disparity is $\epsilon$ when FairBatch compares all possible combination pairs of sensitive groups. Now suppose we only optimize on the sequential $( n _ { z } - 1 )$ disparity objectives. Then we will fail to ensure that other objectives like $\lvert L _ { 1 , 3 } ( \boldsymbol { w } ) - L _ { 1 , 1 } ( \boldsymbol { w } ) \rvert$ are within $\epsilon$ . In the worst case, the objective $\big | L _ { 1 , n _ { z } - 1 } ( \pmb { w } ) - L _ { 1 , 1 } ( \pmb { w } ) \big |$ may be $( n _ { z } \mathrm { ~ - ~ } 1 ) \times \epsilon$ , as we only guarantee that each $| L _ { 1 , j _ { 1 } } ( \pmb { w } ) - L _ { 1 , j _ { 1 } + 1 } ( \pmb { w } ) | \leq \epsilon$ . If $\epsilon$ is small enough, the disparity of our approximation becomes reasonable as well. One can also handle other fairness criteria in a similar way.
|
| 82 |
+
|
| 83 |
+
# 3 UPDATE RULE OF FAIRBATCH
|
| 84 |
+
|
| 85 |
+
We design efficient update rules of FairBatch for different numbers of disparities. Let us define $d$ as the dimension of the outer optimization variable $\boldsymbol { \lambda }$ , which is the same as the total number of disparities. We first analyze the simplest case where $d = 1$ . We show that a simple gradient descent algorithm can provably solve the outer optimization problem. The equal opportunity example in the previous section falls in this category. We then extend the algorithm developed for the one-dimensional case to the multi-dimensional $( d > 1 )$ ) case. Equalized odds and demographic parity fall in this category.
|
| 86 |
+
|
| 87 |
+
# 3.1 UPDATE RULE FOR $d = 1$
|
| 88 |
+
|
| 89 |
+
When $d = 1$ , the general form of our bilevel optimization problem can be written as follows:
|
| 90 |
+
|
| 91 |
+
$$
|
| 92 |
+
\operatorname* { m i n } _ { \lambda \in [ 0 , c _ { 1 } ] } | f _ { 1 } ( \pmb { w } _ { \lambda } ) - g _ { 1 } ( \pmb { w } _ { \lambda } ) | , \pmb { w } _ { \lambda } = \arg \operatorname* { m i n } _ { \pmb { w } } \lambda f _ { 1 } ( \pmb { w } ) + ( c _ { 1 } - \lambda ) g _ { 1 } ( \pmb { w } ) + h ( \pmb { w } ) ,
|
| 93 |
+
$$
|
| 94 |
+
|
| 95 |
+
where $c _ { 1 } > 0$ a constant. Let $F ( \lambda ) = | f _ { 1 } ( \pmb { w } _ { \lambda } ) - g _ { 1 } ( \pmb { w } _ { \lambda } ) |$ . The following lemma shows that $F ( \lambda )$ is quasiconvex in $\lambda$ under some mild conditions, and its signed gradient can be efficiently computed.
|
| 96 |
+
|
| 97 |
+
Lemma 1 (Quasi-convexity of $F ( \lambda ) { \dot { } }$ ). For $d = 1$ , i ${ \mathfrak { f } } _ { 1 } ( \cdot ) , g _ { 1 } ( \cdot )$ , and $h ( \cdot )$ satisfy
|
| 98 |
+
|
| 99 |
+
1. $h ( { \boldsymbol { w } } ) = 0$ or
|
| 100 |
+
2. $i f f _ { 1 } ( \cdot ) , g _ { 1 } ( \cdot )$ , and $h ( \cdot )$ are twice differentiable, $\lambda \nabla ^ { 2 } f _ { 1 } ( { \pmb w } _ { \lambda } ) + ( c _ { 1 } - \lambda ) \nabla ^ { 2 } g _ { 1 } ( { \pmb w } _ { \lambda } ) +$ $\nabla ^ { 2 } h ( \pmb { w } _ { \lambda } ) \succ 0$ for every $\lambda \in [ 0 , c _ { 1 } ]$ ,
|
| 101 |
+
|
| 102 |
+
then $F ( \lambda )$ is quasi-convex, i.e., $F ( t \lambda + ( 1 - t ) \lambda ^ { \prime } ) \leq \operatorname* { m a x } \left\{ F ( \lambda ) , F ( \lambda ^ { \prime } ) \right\}$ for all $t \in [ 0 , 1 ]$ and $\lambda , \lambda ^ { \prime }$ Also, if $F ( \cdot ) \neq 0$ , then $\partial _ { \lambda } F ( \lambda ) = \{ v \}$ and $\mathrm { s i g n } \left( v \right) = \mathrm { s i g n } \left( g _ { 1 } ( \pmb { w } _ { \lambda } ) - f _ { 1 } ( \pmb { w } _ { \lambda } ) \right)$ .
|
| 103 |
+
|
| 104 |
+
Remark 1. The quasiconvexity of $F ( \lambda )$ is valid when at least one of the conditions in Lemma 1 holds. For the second condition, if $f _ { 1 } ( \cdot ) , g _ { 1 } ( \cdot )$ , and $h ( \cdot )$ are convex, this condition will hold unless all the three functions share their stationary points, which is very unlikely. While there is no theoretical guarantee for the non-convex settings, FairBatch still shows on par or better results than the other fairness approaches in general settings where the functions may not be convex (see Sec. 4).
|
| 105 |
+
|
| 106 |
+
The proof for Lemma 1 can be found in Sec. A.2. Note that quasiconvexity immediately implies a unique minimum (Boyd et al., 2004). Thus, we design the following signed gradient-based optimization algorithm:
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\forall t \in \{ 0 , 1 , \ldots \} : \lambda ^ { ( t + 1 ) } = \lambda ^ { ( t ) } - \alpha \cdot \mathrm { s i g n } ( g _ { 1 } ( { \pmb w } _ { \lambda } ) - f _ { 1 } ( { \pmb w } _ { \lambda } ) ) .
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
This algorithm increases $\lambda$ by $\alpha$ if ${ f _ { 1 } ( { \pmb w } _ { \lambda } ) \leq g _ { 1 } ( { \pmb w } _ { \lambda } ) }$ and decreases $\lambda$ by $\alpha$ otherwise. Recall that this is consistent with our intuition: It increases the sampling probability of a disadvantageous group and decreases that of an advantageous group. The following proposition shows that the proposed algorithm converges to the optimal solution.
|
| 113 |
+
|
| 114 |
+
Proposition 1. Let $\lambda ^ { * } = \arg \operatorname* { m i n } _ { \lambda } F ( \lambda )$ and $t \in \mathbb { Z } ^ { 0 + }$ . Then, $\begin{array} { r } { | \lambda ^ { ( t ) } - \lambda ^ { * } | \leq \operatorname* { m a x } \lbrace | \lambda ^ { ( 0 ) } - \lambda ^ { * } | - t \alpha , \alpha \rbrace . } \end{array}$
|
| 115 |
+
|
| 116 |
+
Remark 2. $F ( \lambda )$ is not necessarily convex even when we assume the inner objective functions $f _ { 1 } ( \cdot )$ and $g _ { 1 } ( \cdot )$ are convex or even strongly convex. See Sec. A.3 for a counter example.
|
| 117 |
+
|
| 118 |
+
# 3.2 UPDATE RULE FOR $d \geq 1$
|
| 119 |
+
|
| 120 |
+
We now develop an efficient update algorithm for the following general bilevel optimization:
|
| 121 |
+
|
| 122 |
+
$$
|
| 123 |
+
\begin{array} { r } { \underset { \lambda \in \Lambda } { \operatorname* { m i n } } \underset { i = 1 , \ldots , d } { \operatorname* { m a x } } | f _ { i } ( { \pmb w } _ { \lambda } ) - g _ { i } ( { \pmb w } _ { \lambda } ) | , \quad { \pmb w } _ { \lambda } = \underset { \pmb { w } } { \operatorname { a r g m i n } } \sum _ { i = 1 } ^ { d } \big [ \lambda _ { i } f _ { i } ( { \pmb w } ) + ( c _ { i } - \lambda _ { i } ) g _ { i } ( { \pmb w } ) \big ] + h ( { \pmb w } ) . } \end{array}
|
| 124 |
+
$$
|
| 125 |
+
|
| 126 |
+
Here, $\Lambda = [ 0 , c _ { 1 } ] \times [ 0 , c _ { 2 } ] \times \cdot \cdot \cdot \times [ 0 , c _ { d } ]$ , where $c _ { i }$ ’s are some positive constants. Denoting by $F ( \lambda )$ the outer objective function, let us first derive the gradient of it. Under some mild conditions (see Sec. A.4) on $f _ { i } ( \cdot ) ^ { \cdot } \mathrm { s } , g _ { i } ( \cdot ) ^ { \cdot }$ s, and $h ( \cdot )$ :
|
| 127 |
+
|
| 128 |
+
$\begin{array} { r } { \gamma _ { i } : = \mathrm { s i g n } \big ( g _ { i ^ { * } } ( w ) - f _ { i ^ { * } } ( w ) \big ) ( \nabla f _ { i ^ { * } } ( w ) - \nabla g _ { i ^ { * } } ( w ) ) ^ { \top } H _ { \lambda } ^ { - 1 } \big ( \nabla f _ { i } ( w ) - \nabla g _ { i } ( w ) \big ) \in \partial _ { \lambda _ { i } } F ( \lambda ) , \ \forall i , } \end{array}$ where $i ^ { * } = \arg \operatorname* { m a x } _ { i } | f _ { i } ( \pmb { w } ) - g _ { i } ( \pmb { w } ) |$ , and $H _ { \lambda }$ is positive definite. See Sec. A.4 for the derivation. Since subdifferential is always a convex set, it follows that $\gamma : = ( \gamma _ { 1 } , \gamma _ { 2 } , \ldots , \gamma _ { d } ) \in \partial _ { \mathsf { \lambda } } F ( { \mathsf { \lambda } } )$ . Computing the subgradient $\gamma$ requires us to compute $H _ { \lambda }$ , which involves the Hessian matrices of the inner objective function. To avoid this expensive computation, we approximate $\boldsymbol { \gamma } \approx ( 0 , 0 , \ldots , \gamma _ { i ^ { \star } } , \ldots , 0 )$ . See Sec. A.5 for the rationale and intuition behind this approximation. Then, similar to the case of $d = 1$ , we have $\mathrm { s i g n } ( \gamma ) = ( 0 , 0 , \ldots , \mathrm { s i g n } ( g _ { i ^ { * } } ( { \pmb w } _ { \lambda } ) - { \bar { f } } _ { i ^ { * } } ( { \pmb w } _ { \lambda } ) ) , 0 , \ldots , 0 )$ . This gives us the general update rule of FairBatch (see Sec. A.6 for pseudocode):
|
| 129 |
+
|
| 130 |
+
$$
|
| 131 |
+
\forall t \in \{ 0 , 1 , \ldots \} : \lambda _ { i ^ { * } } ^ { ( t + 1 ) } = \lambda _ { i ^ { * } } ^ { ( t ) } - \alpha \cdot \mathrm { s i g n } ( g _ { i ^ { * } } ( w _ { \lambda } ) - f _ { i ^ { * } } ( w _ { \lambda } ) ) , \lambda _ { i } ^ { ( t + 1 ) } = \lambda _ { i } ^ { ( t ) } , \forall i \neq i ^ { * } .
|
| 132 |
+
$$
|
| 133 |
+
|
| 134 |
+
# 4 EXPERIMENTS
|
| 135 |
+
|
| 136 |
+
We use logistic regression in all experiments except for Sec. 4.2 where we fine-tune ResNet18 (He et al., 2016) and GoogLeNet (Szegedy et al., 2015) in order to demonstrate FairBatch’s ability to improve fairness of pre-trained models. We evaluate all models on separate test sets and repeat all experiments with 10 different random seeds. We use PyTorch, and our experiments are performed on a server with Intel i7-6850 CPUs and NVIDIA TITAN Xp GPUs. See Sec. B.1 for more details.
|
| 137 |
+
|
| 138 |
+
Measuring Fairness Here we first focus on the equal opportunity (EO) and demographic parity (DP) measures in Sec. 4.1 and Sec. 4.3. The equalized odds (ED) measure is used in Sec. 4.2 and Sec. B.2. To quantify EO, ED, and DP, we compute the disparity between sensitive groups: $E O$ disparity $= \begin{array} { r l } { } & { { } \operatorname* { m a x } _ { z \in { \mathbb { Z } } } | \operatorname* { P r } ( \hat { \mathbf { y } } = 1 | \mathbf { z } = z , \mathbf { y } = 1 ) - \operatorname* { P r } ( \hat { \mathbf { y } } = 1 | \mathbf { y } = 1 ) } \end{array}$ |, $E D$ disparity $\begin{array} { r } { = \operatorname* { m a x } _ { z \in \mathbb { Z } , y \in \mathbb { N } , \hat { y } \in \hat { \mathbb { Y } } } | \operatorname* { P r } ( \hat { \mathbf { y } } = \hat { y } | \mathbf { z } = z , \mathbf { y } = y ) } \end{array}$ $, | \operatorname* { P r } ( \hat { \mathbf { y } } = \hat { y } | \mathbf { z } = z , \mathbf { y } = y ) - \operatorname* { P r } ( \hat { \mathbf { y } } = \hat { y } | \mathbf { y } = y ) |$ , and $D P$ disparity $=$ $\begin{array} { r } { \operatorname* { m a x } _ { z \in \mathbb { Z } } | \operatorname* { P r } ( \hat { \mathbf { y } } = 1 | \mathbf { z } = z ) - \operatorname* { P r } ( \hat { \mathbf { y } } = 1 ) | } \end{array}$ . As we discussed in Sec. 3, EO has a single-dimension outer optimization where the number of disparities $d = 1$ while ED and DP have multi-dimensional outer optimizations where $d > 1$ .
|
| 139 |
+
|
| 140 |
+
Datasets We generate a synthetic dataset of 3,000 examples with two non-sensitive attributes $( \mathbf { x } _ { 1 }$ , ${ \bf { X } } _ { 2 } ) ^ { \backslash }$ ), a binary sensitive attribute z, and a binary label y, using a method similar to the one in (Zafar et al., 2017a). A tuple $( \mathbf { x } _ { 1 } , \mathbf { x } _ { 2 } , \mathbf { y } )$ is randomly generated based on the two Gaussian distributions: $( \mathbf { x } _ { 1 } , \mathbf { x } _ { 2 } ) | \mathbf { y } = 0 \sim \mathcal { N } ( [ - 2 ; - 2 ] , [ 1 0 , 1 ; 1 , 3 ] )$ and $( \mathbf { x } _ { 1 } , \mathbf { x } _ { 2 } ) | \mathbf { y } = 1 \sim \mathcal { N } ( [ 2 ; 2 ] , [ 5 , 1 ; 1 , 5 ] )$ . For z, we generate biased data using an unfair scenario $\operatorname* { P r } ( \mathbf { z } = 1 ) = \operatorname* { P r } ( ( \mathbf { x } _ { 1 } ^ { \prime } , \mathbf { x } _ { 2 } ^ { \prime } ) | \mathbf { y } = 1 ) / [ \operatorname* { P r } ( ( \mathbf { x } _ { 1 } ^ { \prime } , \mathbf { x } _ { 2 } ^ { \prime } ) | \mathbf { y } =$ 0) + $\mathrm { \bar { P r } ( ( x _ { 1 } ^ { \prime } , x _ { 2 } ^ { \prime } ) | y = 1 ) ] }$ where $( \mathrm { x } _ { 1 } ^ { \prime } , \mathrm { x } _ { 2 } ^ { \prime } ) = ( \mathrm { x } _ { 1 } \cos ( \pi / 4 ) - \mathrm { x } _ { 2 } \sin ( \pi / 4 ) , \scriptscriptstyle { \perp }$ $\mathbf { s } ( \pi / 4 ) - \mathbf { x } _ { 2 } \sin ( \pi / 4 ) , \mathbf { x } _ { 1 } \sin ( \pi / 4 ) + \mathbf { x } _ { 2 } \cos ( \pi / 4 )$ ).
|
| 141 |
+
|
| 142 |
+
We use the real benchmark datasets: ProPublica COMPAS (Angwin et al., 2016) and AdultCensus (Kohavi, 1996) datasets with 5,278 and 43,131 examples, respectively. We use the same pre-processing as in IBM’s AI Fairness 360 (Bellamy et al., 2019) and use GENDER as the sensitive attribute. We also employ the UTKFace dataset (Zhang et al., 2017) with 23,708 images to demonstrate the fine-tuning ability of FairBatch in Sec. 4.2.
|
| 143 |
+
|
| 144 |
+
Baselines We employ three types of baselines: (1) non-fair training with logistic regression (LR);
|
| 145 |
+
(2) fair training via pre-processing; and (3) fair training via in-processing.
|
| 146 |
+
|
| 147 |
+
For pre-processing methods, we first consider a simple approach that we call Cutting, which evens the data sizes of sensitive groups via saturating them to the smallest-group data size. One can think of a similar alternative approach: Boosting all of the smaller-group data sizes to the largest one, but we do not report herein due to similar performances that we found relative to Cutting. The other two are the state of the arts: reweighing (Kamiran and Calders, 2011) (RW) and Label Bias Correction (Jiang and Nachum, 2020) (LBC). RW intends to balance importance levels across sensitive groups via example weighting, but sticks with these weights throughout the entire model training, unlike FairBatch. LBC iteratively trains an entire model with example weighting towards an unbiased data distribution.
|
| 148 |
+
|
| 149 |
+
For in-processing methods, we compare with the following three: Fairness Constraints (Zafar et al., 2017a;b) (FC), Adversarial Debiasing (Zhang et al., 2018) (AD), and AdaFair (Iosifidis and Ntoutsi, 2019). FC incorporates a regularization term in an effort to reduce the disparities among sensitive groups. AD is an adversarial learning approach that intends to maximize the independence between the predicted labels and sensitive attributes. In our experiments, a slight modification is made to AD for improving training stability: Not employing one regularization term used for restricting the training direction. AdaFair is an ensemble technique that equips the prominent AdaBoost (Friedman et al., 2000) with a fairness aspect. Here the examples that lead to unfair and inaccurate performances are considered to be the difficult instances. In our experiments, natural generalization of AdaFair intended for ED is made to encompass EO and DP; see Sec. B.3 for the generalization. While AdaFair bears spiritual similarity to FairBatch in a sense that mistreated examples are weighted progressively, it comes with a significant distinction in update scale. It is basically a boosting technique; hence such updates are done in distinctive predictors through different rounds; see Sec. 5 for details.
|
| 150 |
+
|
| 151 |
+
FairBatch Settings To set $\alpha$ , we start from a candidate set of values within the range [0.0001, 0.05] and use cross-validation on the training set to choose the value that results in the highest accuracy with low fairness violation. The default batch sizes are: 100 (synthetic); 200 (COMPAS), 1,000 (AdultCensus); and 32 (UTKFace).
|
| 152 |
+
|
| 153 |
+
Table 1: Performances on the synthetic, COMPAS, and AdultCensus test sets w.r.t. equal opportunity (EO). We compare FairBatch with three types of baselines: (1) non-fair method: LR; (2) fair training via pre-processing: Cutting, RW (Kamiran and Calders, 2011), and LBC (Jiang and Nachum, 2020); (3) fair training via in-processing: FC (Zafar et al., 2017b), AD (Zhang et al., 2018), and AdaFair (Iosifidis and Ntoutsi, 2019). Experiments are repeated 10 times.
|
| 154 |
+
|
| 155 |
+
<table><tr><td></td><td></td><td>Synthetic</td><td></td><td></td><td>COMPAS</td><td></td><td></td><td>AdultCensus</td><td></td></tr><tr><td>Method</td><td>Acc.</td><td>EO Disp.</td><td>Epochs</td><td>Acc.</td><td>EO Disp.</td><td>Epochs</td><td>Acc.</td><td>EO Disp.</td><td>Epochs</td></tr><tr><td>LR</td><td>.885±.000 .115±.000</td><td></td><td>400</td><td>.681±.002</td><td>.239±.006</td><td>300</td><td></td><td>.845±.001 .054±.005</td><td>300</td></tr><tr><td>Cutting</td><td>.858±.001 .028±.002</td><td></td><td>800</td><td>.674±.005 .</td><td>5.055±.018</td><td>600</td><td></td><td>.802±.002 .054±.007</td><td>600</td></tr><tr><td>RW LBC</td><td>.858±.000 .020±.000</td><td></td><td>800</td><td></td><td>.685±.000 .137±.000</td><td>300</td><td></td><td>.835±.001 .134±.006</td><td>100</td></tr><tr><td></td><td>.858±.001 .022±.000</td><td></td><td>11200</td><td></td><td>.673±.002 .031±.006</td><td>3900</td><td></td><td>.841±.003 .011±.003</td><td>6300</td></tr><tr><td>FC</td><td>.833±.001.007±.000</td><td></td><td>700</td><td></td><td>.656±.006 .059±.028</td><td>100</td><td>.844±.001 .021±.004</td><td></td><td>300</td></tr><tr><td>AD</td><td>.837±.010 .026±.007</td><td></td><td>200</td><td></td><td>.683±.001 .067±.029</td><td>300</td><td>.841±.003 .016±.005</td><td></td><td>400</td></tr><tr><td>AdaFair</td><td>.868±.000 .043±.001</td><td></td><td>16000</td><td>.664±.004 .018±.004</td><td></td><td>9600</td><td>.844±.001</td><td>.038±.004</td><td>9000</td></tr><tr><td>FairBatch .855±.000 .012±.001</td><td></td><td></td><td>300</td><td>.681±.001</td><td>.022±.005</td><td>100</td><td>.844±.001 .011±.003</td><td></td><td>400</td></tr></table>
|
| 156 |
+
|
| 157 |
+
Table 2: Performances on the synthetic, COMPAS, and AdultCensus test sets w.r.t. demographic parity (DP). The other settings are identical to those in Table 1.
|
| 158 |
+
|
| 159 |
+
<table><tr><td></td><td></td><td>Synthetic</td><td></td><td></td><td>COMPAS</td><td></td><td></td><td>AdultCensus</td><td></td></tr><tr><td>Method</td><td>Acc.</td><td>DP Disp.</td><td>Epochs</td><td>Acc.</td><td>DP Disp.</td><td>Epochs</td><td>Acc.</td><td>DP Disp.</td><td>Epochs</td></tr><tr><td>LR</td><td>.885±.000 .257±.000</td><td></td><td>400</td><td></td><td>.681±.002 .192±.006</td><td>300</td><td></td><td>.845±.001 .125±.001</td><td>300</td></tr><tr><td>Cutting</td><td>.885±.001 .258±.001</td><td></td><td>500</td><td></td><td>.677±.004 .205±.025</td><td>400</td><td></td><td>.846±.001 .123±.002</td><td>300</td></tr><tr><td>RW</td><td>.857±.000 .164±.001</td><td></td><td>400</td><td></td><td>.685±.000 .103±.000</td><td>300</td><td></td><td>.835±.001 .052±.003</td><td>300</td></tr><tr><td>LBC</td><td>.768±.000 .042±.001</td><td></td><td>16000</td><td>.671±.002 .032±.009</td><td></td><td>7800</td><td></td><td>.815±.003 .011±.002</td><td>12600</td></tr><tr><td>FC</td><td>.785±.013 .058±.010</td><td></td><td>600</td><td></td><td>.684±.001 .083±.015</td><td>70</td><td>.812±.009 .025±.006</td><td></td><td>100</td></tr><tr><td>AD</td><td>.812±.008 .063±.014</td><td></td><td>700</td><td></td><td>.683±.002 .054±.019</td><td>550</td><td>.815±.008 .018±.004</td><td></td><td>400</td></tr><tr><td>AdaFair</td><td>.784±.001 .089±.001</td><td></td><td>52000</td><td>.642±.004</td><td>.033±.011</td><td>6300</td><td></td><td>.825±.002 .040±.001</td><td>27000</td></tr><tr><td>FairBatch .794±.001 .040±.001</td><td></td><td></td><td>450</td><td>.681±.001 .036±.023</td><td></td><td>300</td><td>.823±.001.010±.005</td><td></td><td>600</td></tr></table>
|
| 160 |
+
|
| 161 |
+
# 4.1 ACCURACY, FAIRNESS, AND RUNTIME
|
| 162 |
+
|
| 163 |
+
Table 1 compares FairBatch against the other approaches on the synthetic, COMPAS, and AdultCensus test sets w.r.t. accuracy, EO disparity, and complexity (reflected in the number of epochs). In Sec. B.4, we also present the convergence plot of EO disparity as a function of the number of epochs. LR in row 1 is logistic regression without any fairness technique. The pre-processing techniques in rows 2–4 reduce EO disparity yet while sacrificing the accuracy performance. The in-processing techniques in rows 5–7 further reduce EO disparity yet still sacrificing accuracy. FairBatch, presented in the last row, offers comparable (or even greater) fairness performance while sacrificing less accuracy. We also present accuracy and fairness trade-off curves of FairBatch in Sec. B.5. One key implementation benefit is reflected in the small numbers of epochs. We also obtain consistent wall clock times, presented in Sec. B.6. As mentioned earlier, AdaFair is the most similar in spirit to FairBatch as it adjusts example weights based on the fairness performances of prior models. We demonstrate in Sec. B.7 that FairBatch and AdaFair indeed show similar convergence behaviors yet in different scales (rounds for AdaFair vs. epochs for FairBatch). One distinctive feature of FairBatch relative to AdaFair is the use of a single model training, thus enabling much faster speed (22.5–96x). We also make similar comparisons yet w.r.t. another fairness measure: DP disparity. See Table 2. Recall that minimizing DP disparity involves adjusting two hyperparameters $( \lambda _ { 1 } , \lambda _ { 2 } )$ , which also means that $d = 2$ . Although FairBatch’s theoretical guarantees hold only when using one hyperparameter (i.e., $d = 1$ ), we nonetheless see similar results where FairBatch is on par or better than the other approaches, while being the most robust in all aspects.
|
| 164 |
+
|
| 165 |
+
Table 3: Performances of the pre-trained models fine-tuned with FairBatch on the UTKFace test set w.r.t. equalized odds (ED) for two fairness scenarios. While Tables 1 and 2 already demonstrate FairBatch’s performance against the state of the arts, the emphasis here is more on FairBatch’s usability where it is easy to adopt and yet improves the fairness of existing models.
|
| 166 |
+
|
| 167 |
+
<table><tr><td></td><td></td><td colspan="3">Z: RACE,y: GENDER</td><td colspan="3">Z: RACE, y: AGE</td></tr><tr><td>Pre-trained model</td><td>Method</td><td>Acc.</td><td>ED Disp.</td><td>Epochs</td><td>Acc.</td><td>ED Disp.</td><td>Epochs</td></tr><tr><td rowspan="3">ResNet18</td><td>Original</td><td>.893±.002</td><td>.086±.012</td><td>19</td><td>.722±.011</td><td>.311±.053</td><td>10</td></tr><tr><td>Cutting</td><td>.592±.020</td><td>.099±.014</td><td>18</td><td>.466±.018</td><td>.139±.021</td><td>20</td></tr><tr><td>FairBatch</td><td>.894±.002</td><td>.063±.013</td><td>30</td><td>.758±.004</td><td>.220±.016</td><td>10</td></tr><tr><td rowspan="3">GoogLeNet</td><td>Original</td><td>.888±.003</td><td>.105±.016</td><td>20</td><td>.746±.006</td><td>.294±.034</td><td>14</td></tr><tr><td>Cutting</td><td>.606±.010</td><td>.076±.017</td><td>20</td><td>.495±.017</td><td>.168±.033</td><td>9</td></tr><tr><td>FairBatch</td><td>.891±.002</td><td>.061±.006</td><td>11</td><td>.741±.018</td><td>.202±.019</td><td>8</td></tr></table>
|
| 168 |
+
|
| 169 |
+
# 4.2 FINE-TUNING PRETRAINED UNFAIR MODELS FOR FAIRNESS
|
| 170 |
+
|
| 171 |
+
While Tables 1 and 2 already demonstrate FairBatch’s performance against the state of the arts, in this section we emphasize the usability of FairBatch by showing how it can improve fairness of any pretrained unfair model via fine-tuning and only compare it with Cutting, which is also easy to adopt. Table 3 shows how FairBatch improves fairness of pre-trained models (ResNet18 (He et al., 2016) and GoogLeNet (Szegedy et al., 2015)) on the UTKFace dataset (Zhang et al., 2017). Each image has three types of attributes: GENDER, RACE, and AGE. We use RACE as the sensitive attribute and consider two scenarios where the label attribute is GENDER or AGE. While GENDER is binary, AGE is multi-valued $^ { < 2 1 }$ , 21–40, 41–60, and ${ > } 6 0$ ), so we extend FairBatch in a straightforward fashion; see Sec. B.8 for details. Both Cutting and FairBatch reduce the ED disparities of the original pre-trained models. However, only FairBatch does so without sacrificing accuracy performance.
|
| 172 |
+
|
| 173 |
+
# 4.3 COMPATIBILITY WITH OTHER BATCH SELECTION TECHNIQUES
|
| 174 |
+
|
| 175 |
+
We demonstrate another key aspect of FairBatch: Compatibility with existing batch selection approaches that use importance sampling for faster convergence in training. The key functionality of the prior batch selection techniques is that examples considered to be “important” are given higher weights so as to be sampled more frequently. FairBatch can easily be tuned to accommodate such functionality: determining the batch-ratios of sensitive groups and then sampling using the importance weights per group. We evaluate FairBatch combined with one prominent technique, loss-based weighting (Loshchilov and Hutter, 2016), on our synthetic dataset using EO and DP. We find that FairBatch indeed converges more quickly. It uses about 50 fewer epochs with similar fairness performances; see Sec. B.9 for the EO and DP convergence plots.
|
| 176 |
+
|
| 177 |
+
# 5 RELATED WORK
|
| 178 |
+
|
| 179 |
+
Model Fairness Various fairness measures have been proposed to reflect legal and social issues (Narayanan, 2018). Among them, we focus on group fairness measures: equal opportunity (Hardt et al., 2016), equalized odds (Hardt et al., 2016), and demographic parity (Feldman et al., 2015). A variety of techniques have been proposed and can be categorized into (1) pre-processing techniques (Kamiran and Calders, 2011; Zemel et al., 2013; Feldman et al., 2015; du Pin Calmon et al., 2017; Choi et al., 2020; Jiang and Nachum, 2020), which debias or reweight data, (2) in-processing techniques (Kamishima et al., 2012; Zafar et al., 2017a;b; Agarwal et al., 2018; Zhang et al., 2018; Cotter et al., 2019; Roh et al., 2020), which tailor the model training for fairness, and (3) postprocessing techniques (Kamiran et al., 2012; Hardt et al., 2016; Pleiss et al., 2017; Chzhen et al., 2019), which perturb only the model output without touching upon the inside. Most of these methods require broad changes in data preprocessing, model training, or model outputs in machine learning systems (Venkatasubramanian, 2019). In contrast, FairBatch only requires a single-line change in code to replace batch selection while achieving comparable or even greater performances against the state of the arts.
|
| 180 |
+
|
| 181 |
+
Among the fairness techniques, AdaFair (Iosifidis and Ntoutsi, 2019) is the most similar in spirit to FairBatch. AdaFair extends the well-known AdaBoost (Friedman et al., 2000) where examples that lead to poor accuracy or fairness are boosted, i.e., given higher weights during the next round of training a new model that is added to the ensemble. In comparison, FairBatch is based on theoretical foundations of bilevel optimization and effectively performs the reweighting during each epoch (not through rounds), which leads to an order of magnitude improvement in speed as shown in Sec. 4.1.
|
| 182 |
+
|
| 183 |
+
Although not our immediate focus, there are other noteworthy fairness measures: (1) individual fairness (Dwork et al., 2012) where close examples should be treated similarly, (2) causality-based fairness (Kilbertus et al., 2017; Kusner et al., 2017; Zhang and Bareinboim, 2018; Nabi and Shpitser, 2018; Khademi et al., 2019), which aims to overcome the limitations of non-causal approaches by understanding the causal relationship between attributes, and (3) distributionally robust optimization (DRO) (Sinha et al., 2017)-based fairness (Hashimoto et al., 2018), which achieves accuracy parity without the knowledge of sensitive attribute by balancing the risks across all distributions. Extending FairBatch to support these measures is an interesting future work.
|
| 184 |
+
|
| 185 |
+
Finally, Chouldechova and Roth (2018) describe three causes of unfairness that help clarify FairBatch’s fairness contributions: (1) minimizing average error fits majority populations, (2) bias encoded in data, and (3) the need to explore and gather more data. FairBatch addresses the cause (1) via balancing the sensitive group ratios within a batch. FairBatch also addresses (2) in some cases. For example, consider the recidivism prediction problem described in (Chouldechova and Roth, 2018) where minority populations have biased labels. In this case, FairBatch can be configured to make the recidivism prediction rate for the minority population similar to those of other populations. There may be other types of data bias that FairBatch is not able to address. Finally, FairBatch does not directly address (3) where one must gather more data for better fairness. Instead, there is a recent line of work that studies data collection techniques (Tae and Whang, 2021) for fairness.
|
| 186 |
+
|
| 187 |
+
Batch Selection The batch selection literature for SGD focuses on analyzing the effect of batch sizes (Keskar et al., 2017; Masters and Luschi, 2018) and various sampling techniques (Shamir, 2016; Gurb ¨ uzbalaban et al., 2019). More recently, importance sampling techniques have been proposed ¨ for faster convergence (Loshchilov and Hutter, 2016; Alain et al., 2016; Stich et al., 2017; Csiba and Richtarik, 2018; Katharopoulos and Fleuret, 2018; Johnson and Guestrin, 2018). In comparison,´ FairBatch takes the novel approach of using batch selection for better fairness and is compatible with other existing techniques.
|
| 188 |
+
|
| 189 |
+
# 6 CONCLUSION
|
| 190 |
+
|
| 191 |
+
We addressed model fairness via the lens of bilevel optimization and proposed the FairBatch batch selection algorithm. The bilevel optimization provides a natural framework where the inner optimizer is SGD, and the outer optimizer performs adaptive batch selection to improve fairness. We presented FairBatch for implementing this optimization and showed how its underlying theory supports the fairness measures: equal opportunity, equalized odds, and demographic parity. We showed that FairBatch offers respectful performances that are on par or even better than the state of the arts w.r.t. all aspects in consideration: accuracy, fairness, and runtime. Also, FairBatch can readily be adopted to machine learning systems with a minimal change of replacing the batch selection with a single-line of code and be gracefully merged with other batch selection techniques used for faster convergence.
|
| 192 |
+
|
| 193 |
+
# ACKNOWLEDGEMENTS
|
| 194 |
+
|
| 195 |
+
Yuji Roh and Steven E. Whang were supported by a Google AI Focused Research Award and by the Engineering Research Center Program through the National Research Foundation of Korea (NRF) funded by the Korean Government MSIT (NRF-2018R1A5A1059921). Kangwook Lee was supported by NSF/Intel Partnership on Machine Learning for Wireless Networking Program under Grant No. CNS-2003129. Changho Suh was supported by Institute for Information & communications Technology Planning & Evaluation (IITP) grant funded by the Korea government (MSIT) (No. 2019-0-01396, Development of framework for analyzing, detecting, mitigating of bias in AI model and training data).
|
| 196 |
+
|
| 197 |
+
# REFERENCES
|
| 198 |
+
|
| 199 |
+
Kristy Choi, Aditya Grover, Trisha Singh, Rui Shu, and Stefano Ermon. Fair generative modeling via weak supervision. In ICML, 2020.
|
| 200 |
+
|
| 201 |
+
Heinrich Jiang and Ofir Nachum. Identifying and correcting label bias in machine learning. In AISTATS, pages 702–712, 2020.
|
| 202 |
+
|
| 203 |
+
Muhammad Bilal Zafar, Isabel Valera, Manuel Gomez-Rodriguez, and Krishna P. Gummadi. Fairness constraints: Mechanisms for fair classification. In AISTATS, pages 962–970, 2017a.
|
| 204 |
+
|
| 205 |
+
Muhammad Bilal Zafar, Isabel Valera, Manuel Gomez-Rodriguez, and Krishna P. Gummadi. Fairness beyond disparate treatment & disparate impact: Learning classification without disparate mistreatment. In WWW, pages 1171–1180, 2017b.
|
| 206 |
+
|
| 207 |
+
Brian Hu Zhang, Blake Lemoine, and Margaret Mitchell. Mitigating unwanted biases with adversarial learning. In AIES, pages 335–340, 2018.
|
| 208 |
+
|
| 209 |
+
Vasileios Iosifidis and Eirini Ntoutsi. Adafair: Cumulative fairness adaptive boosting. In CIKM, page 781–790, 2019.
|
| 210 |
+
|
| 211 |
+
Moritz Hardt, Eric Price, and Nati Srebro. Equality of opportunity in supervised learning. In NeurIPS, pages 3315–3323, 2016.
|
| 212 |
+
|
| 213 |
+
Julia Angwin, Jeff Larson, Surya Mattu, and Lauren Kirchner. Machine bias: There’s software used across the country to predict future criminals. And its biased against blacks. ProPublica, 2016.
|
| 214 |
+
|
| 215 |
+
Michael Feldman, Sorelle A. Friedler, John Moeller, Carlos Scheidegger, and Suresh Venkatasubramanian. Certifying and removing disparate impact. In KDD, pages 259–268, 2015.
|
| 216 |
+
|
| 217 |
+
Ron Kohavi. Scaling up the accuracy of naive-bayes classifiers: A decision-tree hybrid. In KDD, pages 202–207, 1996.
|
| 218 |
+
|
| 219 |
+
Zhifei Zhang, Yang Song, and Hairong Qi. Age progression/regression by conditional adversarial autoencoder. In CVPR, pages 4352–4360, 2017.
|
| 220 |
+
|
| 221 |
+
Faisal Kamiran and Toon Calders. Data preprocessing techniques for classification without discrimination. Knowl. Inf. Syst., 33(1):1–33, 2011.
|
| 222 |
+
|
| 223 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770–778, 2016.
|
| 224 |
+
|
| 225 |
+
Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott E. Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In CVPR, pages 1–9, 2015.
|
| 226 |
+
|
| 227 |
+
Leon Bottou. Large-scale machine learning with stochastic gradient descent. In ´ COMPSTAT, pages 177–186. Springer, 2010.
|
| 228 |
+
|
| 229 |
+
Stephen Boyd, Stephen P Boyd, and Lieven Vandenberghe. Convex optimization. Cambridge university press, 2004.
|
| 230 |
+
|
| 231 |
+
Rachel K. E. Bellamy, Kuntal Dey, Michael Hind, Samuel C. Hoffman, Stephanie Houde, Kalapriya Kannan, Pranay Lohia, Jacquelyn Martino, Sameep Mehta, Aleksandra Mojsilovic, Seema Nagar, Karthikeyan Natesan Ramamurthy, John T. Richards, Diptikalyan Saha, Prasanna Sattigeri, Moninder Singh, Kush R. Varshney, and Yunfeng Zhang. AI fairness 360: An extensible toolkit for detecting and mitigating algorithmic bias. IBM J. Res. Dev., 63(4/5):4:1–4:15, 2019.
|
| 232 |
+
|
| 233 |
+
Jerome Friedman, Trevor Hastie, and Robert Tibshirani. Additive Logistic Regression: a Statistical View of Boosting. The Annals of Statistics, 38(2), 2000.
|
| 234 |
+
|
| 235 |
+
Ilya Loshchilov and Frank Hutter. Online batch selection for faster training of neural networks. In ICLR 2016 Workshop Track, 2016.
|
| 236 |
+
|
| 237 |
+
Arvind Narayanan. Translation tutorial: 21 fairness definitions and their politics. In FAccT, volume 1170, 2018.
|
| 238 |
+
|
| 239 |
+
Richard S. Zemel, Yu Wu, Kevin Swersky, Toniann Pitassi, and Cynthia Dwork. Learning fair representations. In ICML, pages 325–333, 2013.
|
| 240 |
+
|
| 241 |
+
Flavio du Pin Calmon, Dennis Wei, Bhanukiran Vinzamuri, Karthikeyan Natesan Ramamurthy, and ´ Kush R. Varshney. Optimized pre-processing for discrimination prevention. In NeurIPS, pages 3995–4004, 2017.
|
| 242 |
+
|
| 243 |
+
Toshihiro Kamishima, Shotaro Akaho, Hideki Asoh, and Jun Sakuma. Fairness-aware classifier with prejudice remover regularizer. In ECML PKDD, pages 35–50, 2012.
|
| 244 |
+
|
| 245 |
+
Alekh Agarwal, Alina Beygelzimer, Miroslav Dud´ık, John Langford, and Hanna M. Wallach. A reductions approach to fair classification. In ICML, pages 60–69, 2018.
|
| 246 |
+
|
| 247 |
+
Andrew Cotter, Heinrich Jiang, and Karthik Sridharan. Two-player games for efficient non-convex constrained optimization. In ALT, pages 300–332, 2019.
|
| 248 |
+
|
| 249 |
+
Yuji Roh, Kangwook Lee, Steven Euijong Whang, and Changho Suh. FR-Train: A mutual information-based approach to fair and robust training. In ICML, 2020.
|
| 250 |
+
|
| 251 |
+
Faisal Kamiran, Asim Karim, and Xiangliang Zhang. Decision theory for discrimination-aware classification. In ICDM, pages 924–929, 2012.
|
| 252 |
+
|
| 253 |
+
Geoff Pleiss, Manish Raghavan, Felix Wu, Jon M. Kleinberg, and Kilian Q. Weinberger. On fairness and calibration. In NeurIPS, pages 5684–5693, 2017.
|
| 254 |
+
|
| 255 |
+
Evgenii Chzhen, Christophe Denis, Mohamed Hebiri, Luca Oneto, and Massimiliano Pontil. Leveraging labeled and unlabeled data for consistent fair binary classification. In NeurIPS, pages 12760–12770. 2019.
|
| 256 |
+
|
| 257 |
+
Suresh Venkatasubramanian. Algorithmic fairness: Measures, methods and representations. In PODS, page 481, 2019.
|
| 258 |
+
|
| 259 |
+
Cynthia Dwork, Moritz Hardt, Toniann Pitassi, Omer Reingold, and Richard S. Zemel. Fairness through awareness. In ITCS, pages 214–226, 2012.
|
| 260 |
+
|
| 261 |
+
Niki Kilbertus, Mateo Rojas-Carulla, Giambattista Parascandolo, Moritz Hardt, Dominik Janzing, and Bernhard Scholkopf. Avoiding discrimination through causal reasoning. In ¨ NeurIPS, pages 656–666, 2017.
|
| 262 |
+
|
| 263 |
+
Matt J Kusner, Joshua Loftus, Chris Russell, and Ricardo Silva. Counterfactual fairness. In NeurIPS, pages 4066–4076. 2017.
|
| 264 |
+
|
| 265 |
+
Junzhe Zhang and Elias Bareinboim. Fairness in decision-making - the causal explanation formula. In AAAI, 2018.
|
| 266 |
+
|
| 267 |
+
Razieh Nabi and Ilya Shpitser. Fair inference on outcomes. In AAAI, pages 1931–1940, 2018.
|
| 268 |
+
|
| 269 |
+
Aria Khademi, Sanghack Lee, David Foley, and Vasant Honavar. Fairness in algorithmic decision making: An excursion through the lens of causality. In WWW, pages 2907–2914, 2019.
|
| 270 |
+
|
| 271 |
+
Aman Sinha, Hongseok Namkoong, and John C. Duchi. Certifying some distributional robustness with principled adversarial training. In ICLR, 2017.
|
| 272 |
+
|
| 273 |
+
Tatsunori Hashimoto, Megha Srivastava, Hongseok Namkoong, and Percy Liang. Fairness without demographics in repeated loss minimization. In ICML, pages 1929–1938, 2018.
|
| 274 |
+
|
| 275 |
+
Alexandra Chouldechova and Aaron Roth. The frontiers of fairness in machine learning. CoRR, abs/1810.08810, 2018.
|
| 276 |
+
|
| 277 |
+
Ki Hyun Tae and Steven Euijong Whang. Slice tuner: A selective data acquisition framework for accurate and fair machine learning models. In SIGMOD, 2021.
|
| 278 |
+
|
| 279 |
+
Nitish Shirish Keskar, Dheevatsa Mudigere, Jorge Nocedal, Mikhail Smelyanskiy, and Ping Tak Peter Tang. On large-batch training for deep learning: Generalization gap and sharp minima. In ICLR, 2017.
|
| 280 |
+
|
| 281 |
+
Dominic Masters and Carlo Luschi. Revisiting small batch training for deep neural networks. CoRR, abs/1804.07612, 2018.
|
| 282 |
+
|
| 283 |
+
Ohad Shamir. Without-replacement sampling for stochastic gradient methods. In NIPS, pages 46–54. 2016.
|
| 284 |
+
|
| 285 |
+
Mert Gurb ¨ uzbalaban, Asu Ozdaglar, and PA Parrilo. Why random reshuffling beats stochastic gradient ¨ descent. Mathematical Programming, pages 1–36, 2019.
|
| 286 |
+
|
| 287 |
+
Guillaume Alain, Alex Lamb, Chinnadhurai Sankar, Aaron Courville, and Yoshua Bengio. Variance reduction in sgd by distributed importance sampling. ICLR Workshop, 2016.
|
| 288 |
+
|
| 289 |
+
Sebastian U Stich, Anant Raj, and Martin Jaggi. Safe adaptive importance sampling. In NIPS, pages 4381–4391, 2017.
|
| 290 |
+
|
| 291 |
+
Dominik Csiba and Peter Richtarik. Importance sampling for minibatches. ´ The Journal of Machine Learning Research, 19(1):962–982, 2018.
|
| 292 |
+
|
| 293 |
+
Angelos Katharopoulos and Franc¸ois Fleuret. Not all samples are created equal: Deep learning with importance sampling. In ICML, pages 2530–2539, 2018.
|
| 294 |
+
|
| 295 |
+
Tyler B Johnson and Carlos Guestrin. Training deep models faster with robust, approximate importance sampling. In NIPS, pages 7265–7275, 2018.
|
| 296 |
+
|
| 297 |
+
# A APPENDIX – THEORY AND ALGORITHMS
|
| 298 |
+
|
| 299 |
+
# A.1 DEMOGRAPHIC PARITY
|
| 300 |
+
|
| 301 |
+
We continue from Sec. 2 and provide more details on how we can capture demographic parity using our bilevel optimization framework.
|
| 302 |
+
|
| 303 |
+
Proposition 2. If $\begin{array} { r } { m _ { 0 , 0 } = m _ { 0 , 1 } = m _ { 1 , 0 } = m _ { 1 , 1 } , } \end{array}$ then ${ L _ { 0 , 0 } ( \pmb w ) = L _ { 1 , 0 } ( \pmb w ) }$ and $L _ { 0 , 1 } ( \boldsymbol { w } ) = L _ { 1 , 1 } ( \boldsymbol { w } )$ can serve as a sufficient condition for demographic parity.
|
| 304 |
+
|
| 305 |
+
Proof. Slightly abusing the notation, we denote by $\operatorname* { P r } ( \cdot )$ the empirical probability. The demographic parity is satisfied when $\mathrm { P r } ( \hat { \mathbf { y } } = 1 | \mathbf { z } = 0 ) = \mathrm { P r } ( \hat { \mathbf { y } } = 1 | \mathbf { \hat { z } } = 1 )$ holds. Thus,
|
| 306 |
+
|
| 307 |
+
$$
|
| 308 |
+
{ \mathfrak { H } } = 1 , { \mathfrak { y } } = 0 | z = 0 ) + \operatorname* { P r } ( { \mathfrak { H } } = 1 , { \mathfrak { y } } = 1 | z = 0 ) = \operatorname* { P r } ( { \mathfrak { f } } = 1 , { \mathfrak { y } } = 0 | z = 1 ) + \operatorname* { P r } ( { \mathfrak { f } } = 1 , { \mathfrak { y } } = 1 | z = 1 )
|
| 309 |
+
$$
|
| 310 |
+
|
| 311 |
+
Since $\ell ( | 1 - y | , \cdot ) = 1 - \ell ( y , \cdot )$ , we have
|
| 312 |
+
|
| 313 |
+
$$
|
| 314 |
+
\begin{array} { c } { { \displaystyle \frac { 1 } { m _ { \star , 0 } } \sum _ { i : y _ { i } = 0 , z _ { i } = 0 } ( 1 - \ell ( y _ { i } , \hat { y _ { i } } ) ) + \frac { 1 } { m _ { \star , 0 } } \sum _ { i : y _ { i } = 1 , z _ { i } = 0 } \ell ( y _ { i } , \hat { y _ { i } } ) } } \\ { { = \displaystyle \frac { 1 } { m _ { \star , 1 } } \sum _ { i : y _ { i } = 0 , z _ { i } = 1 } ( 1 - \ell ( y _ { i } , \hat { y _ { i } } ) ) + \frac { 1 } { m _ { \star , 1 } } \sum _ { i : y _ { i } = 1 , z _ { i } = 1 } \ell ( y _ { i } , \hat { y _ { i } } ) . } } \end{array}
|
| 315 |
+
$$
|
| 316 |
+
|
| 317 |
+
By replacing $\begin{array} { r } { \sum _ { i : \mathrm { y } _ { i } = y , \mathrm { z } _ { i } = z } \ell ( y _ { i } , \hat { y } _ { i } ) = m _ { y , z } L _ { y , z } ( \pmb { w } ) , } \end{array}$
|
| 318 |
+
|
| 319 |
+
$$
|
| 320 |
+
\frac { m _ { 0 , 0 } } { m _ { \star , 0 } } ( 1 - L _ { 0 , 0 } ( w ) ) + \frac { m _ { 1 , 0 } } { m _ { \star , 0 } } L _ { 1 , 0 } ( w ) = \frac { m _ { 0 , 1 } } { m _ { \star , 1 } } ( 1 - L _ { 0 , 1 } ( w ) ) + \frac { m _ { 1 , 1 } } { m _ { \star , 1 } } L _ { 1 , 1 } ( w ) .
|
| 321 |
+
$$
|
| 322 |
+
|
| 323 |
+
If $m _ { 0 , 0 } = m _ { 0 , 1 } = m _ { 1 , 0 } = m _ { 1 , 1 }$ , this reduces to ${ L _ { 0 , 0 } ( \pmb w ) = L _ { 1 , 0 } ( \pmb w ) }$ and $L _ { 0 , 1 } ( \pmb { w } ) = L _ { 1 , 1 } ( \pmb { w } )$ , the above condition reduces to
|
| 324 |
+
|
| 325 |
+
$$
|
| 326 |
+
- L _ { 0 , 0 } ( \pmb { w } ) + L _ { 1 , 0 } ( \pmb { w } ) = - L _ { 0 , 1 } ( \pmb { w } ) + L _ { 1 , 1 } ( \pmb { w } ) .
|
| 327 |
+
$$
|
| 328 |
+
|
| 329 |
+
A sufficient condition to the above condition is ${ L _ { 0 , 0 } ( \pmb w ) = L _ { 1 , 0 } ( \pmb w ) }$ and $L _ { 0 , 1 } ( \pmb { w } ) = L _ { 1 , 1 } ( \pmb { w } )$
|
| 330 |
+
|
| 331 |
+
In general, the condition of the above proposition does not hold. Observe that another sufficient condition to demographic parity is as follows:
|
| 332 |
+
|
| 333 |
+
$$
|
| 334 |
+
\begin{array} { r l } & { \frac { m _ { 1 , 0 } } { m _ { \star , 0 } } L _ { 1 , 0 } ( \boldsymbol { w } ) - \frac { m _ { 1 , 1 } } { m _ { \star , 1 } } L _ { 1 , 1 } ( \boldsymbol { w } ) = 0 } \\ & { \frac { m _ { 0 , 0 } } { m _ { \star , 0 } } L _ { 0 , 0 } ( \boldsymbol { w } ) - \frac { m _ { 0 , 1 } } { m _ { \star , 1 } } L _ { 0 , 1 } ( \boldsymbol { w } ) = \frac { m _ { 0 , 0 } } { m _ { \star , 0 } } - \frac { m _ { 0 , 1 } } { m _ { \star , 1 } } } \end{array}
|
| 335 |
+
$$
|
| 336 |
+
|
| 337 |
+
Let us define $\begin{array} { r } { L _ { 1 , 0 } ^ { \prime } ( \pmb { w } ) \ = \ \frac { m _ { 1 , 0 } } { m _ { \star , 0 } } L _ { 1 , 0 } ( \pmb { w } ) } \end{array}$ $\begin{array} { r } { _ { _ { ) } } ^ { _ { 2 } } L _ { 1 , 0 } ( w ) , L _ { 1 , 1 } ^ { \prime } ( w ) \ = \ \frac { m _ { 1 , 1 } } { m _ { \star , 1 } } L _ { 1 , 1 } ( w ) , L _ { 0 , 0 } ^ { \prime } ( w ) \ = \ \frac { m _ { 0 , 0 } } { m _ { \star , 0 } } L _ { 0 , 0 } ( w ) } \end{array}$ $\begin{array} { r } { L _ { 0 , 1 } ^ { \prime } ( \pmb { w } ) = \frac { m _ { 0 , 1 } } { m _ { \star , 1 } } L _ { 0 , 1 } ( \pmb { w } ) } \end{array}$ m0,1m L0,1(w), and c = $\begin{array} { r } { c = \frac { m _ { 0 , 0 } } { m _ { \star , 0 } } - \frac { m _ { 0 , 1 } } { m _ { \star , 1 } } } \end{array}$ m0,1m . Also, define |x|c = max{x − c, c − x}. Then, we have the following bilevel optimization problem:
|
| 338 |
+
|
| 339 |
+
$$
|
| 340 |
+
\begin{array} { r l } & { \underset { \lambda \in [ 0 , 1 ] \times [ 0 , 1 ] } { \operatorname* { m i n } } \operatorname* { m a x } \{ | L _ { 1 , 0 } ^ { \prime } ( \boldsymbol { w } _ { \lambda } ) - L _ { 1 , 1 } ^ { \prime } ( \boldsymbol { w } _ { \lambda } ) | , | L _ { 0 , 0 } ^ { \prime } ( \boldsymbol { w } _ { \lambda } ) - L _ { 0 , 1 } ^ { \prime } ( \boldsymbol { w } _ { \lambda } ) | _ { c } \} , } \\ & { \boldsymbol { w } _ { \lambda } = \underset { \boldsymbol { w } } { \operatorname* { m i n } } \lambda _ { 1 } L _ { 0 , 0 } ^ { \prime } ( \boldsymbol { w } ) + ( 1 - \lambda _ { 1 } ) L _ { 1 , 0 } ^ { \prime } ( \boldsymbol { w } ) + \lambda _ { 2 } L _ { 0 , 1 } ^ { \prime } ( \boldsymbol { w } ) + ( 1 - \lambda _ { 2 } ) L _ { 1 , 1 } ^ { \prime } ( \boldsymbol { w } ) . } \end{array}
|
| 341 |
+
$$
|
| 342 |
+
|
| 343 |
+
# A.2 PROOF FOR LEMMA 1
|
| 344 |
+
|
| 345 |
+
We continue from Sec. 3.1 and provide a full proof for Lemma 1. Here we recall Lemma 1. Lemma 1 (Quasi-convexity of $F ( \lambda ) { \dot { } }$ ). For $d = 1$ , $i f f _ { 1 } ( \cdot ) , g _ { 1 } ( \cdot )$ , and $h ( \cdot )$ satisfy
|
| 346 |
+
|
| 347 |
+
1. $h ( { \boldsymbol { w } } ) = 0$ or
|
| 348 |
+
2. if $f _ { 1 } ( \cdot ) , \ g _ { 1 } ( \cdot )$ , and $h ( \cdot )$ are twice differentiable, $\lambda \nabla ^ { 2 } f _ { 1 } ( { \pmb w } _ { \lambda } ) + ( c _ { 1 } - \lambda ) \nabla ^ { 2 } g _ { 1 } ( { \pmb w } _ { \lambda } ) +$ $\nabla ^ { 2 } h ( \pmb { w } _ { \lambda } ) \succ 0$ for every $\lambda \in [ 0 , c _ { 1 } ]$ , then $F ( \lambda )$ is quasi-convex, i.e., $F ( t \lambda + ( 1 - t ) \lambda ^ { \prime } ) \leq \operatorname* { m a x } \left\{ F ( \lambda ) , F ( \lambda ^ { \prime } ) \right\}$ for all $t \in [ 0 , 1 ]$ and $\lambda , \lambda ^ { \prime }$ .
|
| 349 |
+
Also, if $F ( \cdot ) \neq 0$ , then $\partial _ { \lambda } F ( \lambda ) = \{ v \}$ and $\mathrm { s i g n } \left( v \right) = \mathrm { s i g n } \left( g _ { 1 } ( \pmb { w } _ { \lambda } ) - f _ { 1 } ( \pmb { w } _ { \lambda } ) \right)$ .
|
| 350 |
+
|
| 351 |
+
Proof. It it known that a continuous function $f : \mathbb { R } \to \mathbb { R }$ is quasiconvex if and only if at least one of the following conditions holds: 1) nondecreasing, 2) nonincreasing, and 3) nonincreasing and then nondecreasing (Boyd et al., 2004). We will prove the lemma by showing that the function $F ( \lambda )$ is quasiconvex by showing that it is nonincreasing and then nondecreasing. More precisely, we will show that $f _ { 1 } ( { \pmb w } _ { \lambda } ) - g _ { 1 } ( { \pmb w } _ { \lambda } )$ is a nonincreasing function. It is easy to see that this directly implies that $\lvert f _ { 1 } ( { \pmb w } _ { \lambda } ) - g _ { 1 } ( { \pmb w } _ { \lambda } ) \rvert$ is nonincreasing and then nondecreasing.
|
| 352 |
+
|
| 353 |
+
Case 1 $( h ( { \pmb w } ) = 0 )$ ) Consider $\lambda _ { 1 }$ and $\lambda _ { 2 }$ such that $\lambda _ { 1 } > \lambda _ { 2 }$ . If we can show ${ f _ { 1 } } ( { \pmb w } _ { \lambda _ { 1 } } ^ { * } ) \leq { f _ { 1 } } ( { \pmb w } _ { \lambda _ { 2 } } ^ { * } )$ and $g _ { 1 } ( { \pmb w } _ { \lambda _ { 1 } } ^ { * } ) \ge g _ { 1 } ( { \pmb w } _ { \lambda _ { 2 } } ^ { * } )$ , then this implies that $f _ { 1 } ( { \pmb w } _ { \lambda } ) - g _ { 1 } ( { \pmb w } _ { \lambda } )$ is a nonincreasing function. Indeed, this is very intuitive: If we increase $\lambda$ , the inner optimization problems puts a higher weight on $f _ { 1 } ( \cdot )$ , resulting in a lower value of $f _ { 1 } ( w ^ { * } )$ and a higher value of $g _ { 1 } ( w ^ { * } )$ . We formally show this by contradiction. By the definition of $\pmb { w } _ { \lambda }$ , we have the following two conditions:
|
| 354 |
+
|
| 355 |
+
$$
|
| 356 |
+
\begin{array} { r l } & { \lambda _ { 1 } f _ { 1 } ( \pmb { w } _ { \lambda _ { 1 } } ^ { * } ) + ( c _ { 1 } - \lambda _ { 1 } ) g _ { 1 } ( \pmb { w } _ { \lambda _ { 1 } } ^ { * } ) \leq \lambda _ { 1 } f _ { 1 } ( \pmb { w } ) + ( c _ { 1 } - \lambda _ { 1 } ) g _ { 1 } ( \pmb { w } ) , \forall \pmb { w } , } \\ & { \lambda _ { 2 } f _ { 1 } ( \pmb { w } _ { \lambda _ { 2 } } ^ { * } ) + ( c _ { 1 } - \lambda _ { 2 } ) g _ { 1 } ( \pmb { w } _ { \lambda _ { 2 } } ^ { * } ) \leq \lambda _ { 2 } f _ { 1 } ( \pmb { w } ) + ( c _ { 1 } - \lambda _ { 2 } ) g _ { 1 } ( \pmb { w } ) , \forall \pmb { w } . } \end{array}
|
| 357 |
+
$$
|
| 358 |
+
|
| 359 |
+
If the lemma’s statement is false, one of the following three events should occur:
|
| 360 |
+
|
| 361 |
+
1. $f _ { 1 } ( { \pmb w } _ { \lambda _ { 1 } } ^ { * } ) > f _ { 1 } ( { \pmb w } _ { \lambda _ { 2 } } ^ { * } )$ and $g _ { 1 } ( \pmb { w } _ { \lambda _ { 1 } } ^ { * } ) \geq g _ { 1 } ( \pmb { w } _ { \lambda _ { 2 } } ^ { * } )$ : By adding these two inequalities with respective weights $\lambda _ { 1 }$ and $c _ { 1 } - \lambda _ { 1 }$ , we have $\lambda _ { 1 } \tilde { f _ { 1 } } ( { \pmb w } _ { \lambda _ { 1 } } ^ { * } ) + ( c _ { 1 } - \lambda _ { 1 } ) g _ { 1 } ( { \pmb w } _ { \lambda _ { 1 } } ^ { * } ) > \lambda _ { 1 } f _ { 1 } ( { \pmb w } _ { \lambda _ { 2 } } ^ { * } ) +$ $( c _ { 1 } - \lambda _ { 1 } ) g _ { 1 } ( \pmb { w } _ { \lambda _ { 2 } } ^ { * } )$ . This contradicts equation 1.
|
| 362 |
+
|
| 363 |
+
2. $f _ { 1 } ( { \pmb w } _ { \lambda _ { 1 } } ^ { * } ) \leq f _ { 1 } ( { \pmb w } _ { \lambda _ { 2 } } ^ { * } )$ and $g _ { 1 } ( \pmb { w } _ { \lambda _ { 1 } } ^ { * } ) < g _ { 1 } ( \pmb { w } _ { \lambda _ { 2 } } ^ { * } )$ : Similarly, by adding these two inequalities with respective weights $\lambda _ { 2 }$ and $c _ { 1 } - \lambda _ { 2 }$ , we have $\lambda _ { 2 } f _ { 1 } ( { \pmb w } _ { \lambda _ { 2 } } ^ { * } ) + ( c _ { 1 } - \lambda _ { 2 } ) g _ { 1 } ( { \pmb w } _ { \lambda _ { 2 } } ^ { * } ) >$ $\lambda _ { 2 } f _ { 1 } ( \pmb { w } _ { \lambda _ { 1 } } ^ { * } ) + ( c _ { 1 } - \lambda _ { 2 } ) g _ { 1 } ( \pmb { w } _ { \lambda _ { 1 } } ^ { * } )$ . This contradicts equation 2.
|
| 364 |
+
|
| 365 |
+
3. $f _ { 1 } ( { \pmb w } _ { \lambda _ { 1 } } ^ { * } ) > f _ { 1 } ( { \pmb w } _ { \lambda _ { 2 } } ^ { * } )$ and $g _ { 1 } ( \pmb { w } _ { \lambda _ { 1 } } ^ { * } ) < g _ { 1 } ( \pmb { w } _ { \lambda _ { 2 } } ^ { * } )$ : By adding equation 1 with $\mathbf { \Delta } w = w _ { \lambda _ { 2 } } ^ { * }$ and equation 2 with $\mathbf { \boldsymbol { w } } \equiv \mathbf { \boldsymbol { w } } _ { \lambda _ { 1 } } ^ { * }$ , we have
|
| 366 |
+
|
| 367 |
+
$$
|
| 368 |
+
\begin{array} { r l } & { \lambda _ { 1 } f _ { 1 } ( \pmb { w } _ { \lambda _ { 1 } } ^ { * } ) + ( c _ { 1 } - \lambda _ { 1 } ) g _ { 1 } ( \pmb { w } _ { \lambda _ { 1 } } ^ { * } ) + \lambda _ { 2 } f _ { 1 } ( \pmb { w } _ { \lambda _ { 2 } } ^ { * } ) + ( c _ { 1 } - \lambda _ { 2 } ) g _ { 1 } ( \pmb { w } _ { \lambda _ { 2 } } ^ { * } ) } \\ & { \leq \lambda _ { 1 } f _ { 1 } ( \pmb { w } _ { \lambda _ { 2 } } ^ { * } ) + ( c _ { 1 } - \lambda _ { 1 } ) g _ { 1 } ( \pmb { w } _ { \lambda _ { 2 } } ^ { * } ) + \lambda _ { 2 } f _ { 1 } ( \pmb { w } _ { \lambda _ { 1 } } ^ { * } ) + ( c _ { 1 } - \lambda _ { 2 } ) g _ { 1 } ( \pmb { w } _ { \lambda _ { 1 } } ^ { * } ) . } \end{array}
|
| 369 |
+
$$
|
| 370 |
+
|
| 371 |
+
By rearranging terms, we have
|
| 372 |
+
|
| 373 |
+
$$
|
| 374 |
+
( \lambda _ { 1 } - \lambda _ { 2 } ) ( f _ { 1 } ( { \pmb w } _ { \lambda _ { 1 } } ^ { * } ) - f _ { 1 } ( { \pmb w } _ { \lambda _ { 2 } } ^ { * } ) ) \leq ( \lambda _ { 1 } - \lambda _ { 2 } ) ( g _ { 1 } ( { \pmb w } _ { \lambda _ { 1 } } ^ { * } ) - g _ { 1 } ( { \pmb w } _ { \lambda _ { 2 } } ^ { * } ) ) .
|
| 375 |
+
$$
|
| 376 |
+
|
| 377 |
+
By dividing both sides by $\lambda _ { 1 } - \lambda _ { 2 } > 0$ , we have $f _ { 1 } ( { \pmb w } _ { \lambda _ { 1 } } ^ { * } ) - f _ { 1 } ( { \pmb w } _ { \lambda _ { 2 } } ^ { * } ) \leq g _ { 1 } ( { \pmb w } _ { \lambda _ { 1 } } ^ { * } ) - g _ { 1 } ( { \pmb w } _ { \lambda _ { 2 } } ^ { * } )$ This contradicts the condition as the left-hand side is positive while the right-hand side is negative.
|
| 378 |
+
|
| 379 |
+
This completes the proof of the first claim by contradiction.
|
| 380 |
+
|
| 381 |
+
The second claim immediately follows the first claim. Since $F ( \lambda ) = | f _ { 1 } ( \pmb { w } _ { \lambda } ) - g _ { 1 } ( \pmb { w } _ { \lambda } ) |$ , we have $\begin{array} { r } { \frac { \mathrm { d } F ( \lambda ) } { \mathrm { d } \lambda } = \mathrm { s i g n } \left( f _ { 1 } ( \pmb { w } _ { \lambda } ) - g _ { 1 } ( \pmb { w } _ { \lambda } ) \right) \frac { \mathrm { d } } { \mathrm { d } \lambda } \big ( f _ { 1 } ( \pmb { w } _ { \lambda } ) - g _ { 1 } ( \pmb { w } _ { \lambda } ) \big ) } \end{array}$ . As shown in the earlier part of this proof, $f _ { 1 } ( { \pmb w } _ { \lambda } ) - g _ { 1 } ( { \pmb w } _ { \lambda } )$ is a nonincreasing function, i.e., df1(wλ)−g1(wλ) ≤ 0. Thus, sign( $\begin{array} { r l } { \mathrm { s i g n } ( \frac { \mathrm { d } F ( \lambda ) } { \mathrm { d } \lambda } ) = } \end{array}$ $\mathrm { s i g n } ( g _ { 1 } ( \pmb { w } _ { \lambda } ) - f _ { 1 } ( \pmb { w } _ { \lambda } ) )$ .
|
| 382 |
+
|
| 383 |
+
Case 2 (If $f _ { 1 } ( \cdot ) , g _ { 1 } ( \cdot )$ , and $h ( \cdot )$ are twice differentiable, $\lambda \nabla ^ { 2 } f _ { 1 } ( { \pmb w } _ { \lambda } ) + ( c _ { 1 } - \lambda ) \nabla ^ { 2 } g _ { 1 } ( { \pmb w } _ { \lambda } ) +$ $\nabla ^ { 2 } h ( \pmb { w } _ { \lambda } ) ~ \breve { ~ } \breve { ~ } 0$ for every $\lambda \in [ 0 , c _ { 1 } ] )$ In this part of the proof, we will denote ${ \pmb w } _ { \lambda }$ by $\textbf { \em w }$ for simplicity. To show that $f _ { 1 } ( { \pmb w } ) - g _ { 1 } ( { \pmb w } )$ is a nondecreasing function (in $\lambda$ ), consider the derivative:
|
| 384 |
+
|
| 385 |
+
$$
|
| 386 |
+
\frac { \mathrm { d } } { \mathrm { d } \lambda } \big ( f _ { 1 } ( \pmb { w } ) - g _ { 1 } ( \pmb { w } ) \big ) = \big ( \nabla f _ { 1 } ( \pmb { w } ) - \nabla g _ { 1 } ( \pmb { w } ) \big ) ^ { \top } \frac { \mathrm { d } \pmb { w } } { \mathrm { d } \lambda }
|
| 387 |
+
$$
|
| 388 |
+
|
| 389 |
+
$\frac { \mathrm { d } w } { \mathrm { d } \lambda }$ $\lambda$
|
| 390 |
+
|
| 391 |
+
$$
|
| 392 |
+
\begin{array} { r l } & { \lambda \nabla f _ { 1 } ( \pmb { w } ) + ( c _ { 1 } - \lambda ) \nabla g _ { 1 } ( \pmb { w } ) + \nabla h ( \pmb { w } ) = 0 } \\ & { \Rightarrow \nabla f _ { 1 } ( \pmb { w } ) + \lambda \nabla ^ { 2 } f _ { 1 } ( \pmb { w } ) \cdot \cfrac { \mathrm { d } \pmb { w } } { \mathrm { d } \lambda } - \nabla g _ { 1 } ( \pmb { w } ) + ( c _ { 1 } - \lambda ) \nabla ^ { 2 } g _ { 1 } ( \pmb { w } ) \cdot \cfrac { \mathrm { d } \pmb { w } } { \mathrm { d } \lambda } + \nabla ^ { 2 } h ( \pmb { w } ) \cdot \cfrac { \mathrm { d } \pmb { w } } { \mathrm { d } \lambda } = 0 } \end{array}
|
| 393 |
+
$$
|
| 394 |
+
|
| 395 |
+
By rearranging terms, we have
|
| 396 |
+
|
| 397 |
+
$$
|
| 398 |
+
\left( \lambda \nabla ^ { 2 } f _ { 1 } ( w ) + ( c _ { 1 } - \lambda ) \nabla ^ { 2 } g _ { 1 } ( w ) + \nabla ^ { 2 } h ( w ) \right) \frac { \mathrm { d } w } { \mathrm { d } \lambda } = - \big ( \nabla f _ { 1 } ( w ) - \nabla g _ { 1 } ( w ) \big ) .
|
| 399 |
+
$$
|
| 400 |
+
|
| 401 |
+
By the assumption, $\lambda \nabla ^ { 2 } f _ { 1 } ( \pmb { w } ) + ( c _ { 1 } - \lambda ) \nabla ^ { 2 } g _ { 1 } ( \pmb { w } ) + \nabla ^ { 2 } h ( \pmb { w } )$ is positive definite and hence invertible. Thus,
|
| 402 |
+
|
| 403 |
+
$$
|
| 404 |
+
\frac { \mathrm { d } w } { \mathrm { d } \lambda } = - \left( \lambda \nabla ^ { 2 } f _ { 1 } ( \pmb { w } ) + ( c _ { 1 } - \lambda ) \nabla ^ { 2 } g _ { 1 } ( \pmb { w } ) + \nabla ^ { 2 } h ( \pmb { w } ) \right) ^ { - 1 } \left( \nabla f _ { 1 } ( \pmb { w } ) - \nabla g _ { 1 } ( \pmb { w } ) \right) .
|
| 405 |
+
$$
|
| 406 |
+
|
| 407 |
+
Therefore,
|
| 408 |
+
|
| 409 |
+
$$
|
| 410 |
+
\frac { \mathrm { d } } { \mathrm { d } \lambda } \big ( f _ { 1 } ( \pmb { w } ) - g _ { 1 } ( \pmb { w } ) \big ) = - \big ( \nabla f _ { 1 } ( \pmb { w } ) - \nabla g _ { 1 } ( \pmb { w } ) \big ) ^ { \top } \left( \lambda \nabla ^ { 2 } f _ { 1 } ( \pmb { w } ) + ( c _ { 1 } - \lambda ) \nabla ^ { 2 } g _ { 1 } ( \pmb { w } ) + \nabla ^ { 2 } h ( \pmb { w } ) \right) ^ { - 1 } ,
|
| 411 |
+
$$
|
| 412 |
+
|
| 413 |
+
Note that $\left( \lambda \nabla ^ { 2 } f _ { 1 } ( \pmb { w } ) + ( c _ { 1 } - \lambda ) \nabla ^ { 2 } g _ { 1 } ( \pmb { w } ) + \nabla ^ { 2 } h ( \pmb { w } ) \right) ^ { - 1 }$ is also positive definite. Thus, $\begin{array} { r } { \frac { \mathrm { d } } { \mathrm { d } \lambda } ( f _ { 1 } ( \pmb { w } ) - \overset { \cdot } { g } _ { 1 } ( \pmb { w } ) ) } \end{array}$ is always negative, and hence $f _ { 1 } ( { \pmb w } ) - g _ { 1 } ( { \pmb w } )$ is a decreasing function.
|
| 414 |
+
|
| 415 |
+
Now, observe that
|
| 416 |
+
|
| 417 |
+
$$
|
| 418 |
+
( f _ { 1 } ( \pmb { w } ) - g _ { 1 } ( \pmb { w } ) ) \cdot \frac { \mathrm { d } } { \mathrm { d } \lambda } ( f _ { 1 } ( \pmb { w } ) - g _ { 1 } ( \pmb { w } ) ) \in \partial _ { \lambda } F ( \lambda ) .
|
| 419 |
+
$$
|
| 420 |
+
|
| 421 |
+
Therefore, if $F ( \cdot ) \neq 0$ , then $\partial _ { \lambda } F ( \lambda ) = \{ v \}$ and $\mathrm { s i g n } \left( v \right) = \mathrm { s i g n } \left( g _ { 1 } ( \pmb { w } ) - f _ { 1 } ( \pmb { w } ) \right)$ .
|
| 422 |
+
|
| 423 |
+
A.3 INNER OBJECTIVE’S CONVEXITY DOES NOT IMPLY OUTER OBJECTIVE’S CONVEXITY
|
| 424 |
+
|
| 425 |
+

|
| 426 |
+
Figure 2: $F ( \lambda )$ is not convex, but quasi-convex.
|
| 427 |
+
|
| 428 |
+
We continue from Sec. 3.2 and provide an example where inner objective’s convexity does not imply outer objective’s convexity. Consider the following strongly convex functions $f _ { 1 } ( \cdot )$ and $g _ { 1 } ( \cdot )$ :
|
| 429 |
+
|
| 430 |
+
$$
|
| 431 |
+
f _ { 1 } ( w ) = \frac { e ^ { w } + e ^ { - w } } { 5 } , g _ { 1 } ( w ) = ( w - 1 ) ^ { 2 }
|
| 432 |
+
$$
|
| 433 |
+
|
| 434 |
+
Shown in Fig. 2 is the outer objective function $F ( \lambda )$ . One can observe that it is not convex. Note that it is quasiconvex by Lemma 1.
|
| 435 |
+
|
| 436 |
+
# A.4 GRADIENT WHEN $d \geq 1$
|
| 437 |
+
|
| 438 |
+
We continue from Sec. 3.2 and derive the gradient of the outer objective function. Recall how we formulated the general bilevel optimization problem:
|
| 439 |
+
|
| 440 |
+
$$
|
| 441 |
+
\begin{array} { r } { \underset { \lambda \in \Lambda } { \operatorname* { m i n } } \underset { i = 1 , \ldots , d } { \operatorname* { m a x } } | f _ { i } ( { \pmb w } _ { \lambda } ) - g _ { i } ( { \pmb w } _ { \lambda } ) | , \quad { \pmb w } _ { \lambda } = \underset { \pmb { w } } { \operatorname { a r g m i n } } \sum _ { i = 1 } ^ { d } \big [ \lambda _ { i } f _ { i } ( { \pmb w } ) + ( c _ { i } - \lambda _ { i } ) g _ { i } ( { \pmb w } ) \big ] + h ( { \pmb w } ) . } \end{array}
|
| 442 |
+
$$
|
| 443 |
+
|
| 444 |
+
In this section, we will prove the following:
|
| 445 |
+
|
| 446 |
+
$$
|
| 447 |
+
\begin{array} { r } { \mathrm { s i g n } \left( g _ { i ^ { * } } ( w ) - f _ { i ^ { * } } ( w ) \right) ( \nabla f _ { i ^ { * } } ( w ) - \nabla g _ { i ^ { * } } ( w ) ) ^ { \top } H _ { \lambda } ^ { - 1 } ( \nabla f _ { i } ( w ) - \nabla g _ { i } ( w ) ) \in \partial _ { \lambda _ { i } } F ( \lambda ) , \forall i . } \end{array}
|
| 448 |
+
$$
|
| 449 |
+
|
| 450 |
+
Assume that $\begin{array} { r } { \sum _ { i = 1 } ^ { d } [ \lambda _ { i } \nabla ^ { 2 } f _ { i } ( { \pmb w } _ { \lambda } ) + ( c _ { i } - \lambda _ { i } ) \nabla ^ { 2 } g _ { i } ( { \pmb w } _ { \lambda } ) ] + \nabla ^ { 2 } h ( { \pmb w } _ { \lambda } ) \succ 0 } \end{array}$ for every $\lambda \in \Lambda$ . In this part of the proof, we will denote ${ \pmb w } _ { \lambda }$ by $\pmb { w }$ for simplicity.
|
| 451 |
+
|
| 452 |
+
To compute $\frac { \mathrm { d } { \pmb w } } { \mathrm { d } \lambda _ { i } }$ , we implicitly differentiate (with respect to $\lambda _ { i }$ ) the following stationary equation.
|
| 453 |
+
|
| 454 |
+
$$
|
| 455 |
+
\begin{array} { r l } { { } } & { { \displaystyle \sum _ { j = 1 } ^ { d } [ \lambda _ { j } \nabla f _ { j } ( { \pmb w } ) + ( c _ { j } - \lambda _ { j } ) \nabla g _ { j } ( { \pmb w } ) ] + \nabla h ( { \pmb w } ) = 0 } } \\ { { \Rightarrow } } & { { \nabla f _ { i } ( { \pmb w } ) + \lambda _ { i } \nabla ^ { 2 } f _ { i } ( { \pmb w } ) \cdot \cfrac { \partial { \pmb w } } { \partial \lambda _ { i } } - \nabla g _ { i } ( { \pmb w } ) + ( c _ { i } - \lambda _ { i } ) \nabla ^ { 2 } g _ { i } ( { \pmb w } ) \cdot \cfrac { \partial { \pmb w } } { \partial \lambda _ { i } } } } \\ { { } } & { { + \displaystyle \sum _ { 1 \leq j \leq d , \ j \neq i } \bigg [ \lambda _ { j } \nabla ^ { 2 } f _ { j } ( { \pmb w } ) \cdot \cfrac { \partial { \pmb w } } { \partial \lambda _ { i } } + ( c _ { j } - \lambda _ { j } ) \nabla ^ { 2 } g _ { j } ( { \pmb w } ) \cdot \cfrac { \partial { \pmb w } } { \partial \lambda _ { i } } \bigg ] + \nabla ^ { 2 } h ( { \pmb w } ) \cdot \cfrac { \partial { \pmb w } } { \partial \lambda _ { i } } = 0 } } \end{array}
|
| 456 |
+
$$
|
| 457 |
+
|
| 458 |
+
By rearranging terms, we have
|
| 459 |
+
|
| 460 |
+
$$
|
| 461 |
+
\left( \sum _ { j = 1 } ^ { d } \left[ \lambda _ { j } \nabla ^ { 2 } f _ { j } ( w ) + ( c _ { j } - \lambda _ { j } ) \nabla ^ { 2 } g _ { j } ( w ) \right] + \nabla ^ { 2 } h ( w ) \right) \frac { \partial w } { \partial \lambda _ { i } } = - ( \nabla f _ { i } ( w ) - \nabla g _ { i } ( w ) ) .
|
| 462 |
+
$$
|
| 463 |
+
|
| 464 |
+
By the assumption, $\begin{array} { r } { \pmb { H } _ { \lambda } : = \sum _ { j = 1 } ^ { d } \left[ \lambda _ { j } \nabla ^ { 2 } f _ { j } ( \pmb { w } ) + ( c _ { j } - \lambda _ { j } ) \nabla ^ { 2 } g _ { j } ( \pmb { w } ) \right] + \nabla ^ { 2 } h ( \pmb { w } ) } \end{array}$ is positive definite and hence invertible. Thus,
|
| 465 |
+
|
| 466 |
+
$$
|
| 467 |
+
\frac { \partial { \pmb w } } { \partial \lambda _ { i } } = - { \pmb H } _ { \lambda } ^ { - 1 } ( \nabla f _ { i } ( { \pmb w } ) - \nabla g _ { i } ( { \pmb w } ) ) .
|
| 468 |
+
$$
|
| 469 |
+
|
| 470 |
+
Now observe that $F ( \pmb { \lambda } ) = | f _ { i ^ { * } } ( \pmb { w } _ { \lambda } ) - g _ { i ^ { * } } ( \pmb { w } _ { \lambda } ) |$ . Therefore,
|
| 471 |
+
|
| 472 |
+
$$
|
| 473 |
+
\mathrm { s i g n } \left( f _ { i ^ { * } } ( w ) - g _ { i ^ { * } } ( w ) \right) \frac { \partial } { \partial \lambda _ { i } } ( f _ { i ^ { * } } ( w ) - g _ { i ^ { * } } ( w ) ) \in \partial _ { \lambda _ { i } } F ( \lambda ) .
|
| 474 |
+
$$
|
| 475 |
+
|
| 476 |
+
Since
|
| 477 |
+
|
| 478 |
+
$$
|
| 479 |
+
\frac { \partial } { \partial \lambda _ { i } } ( f _ { i ^ { * } } ( w ) - g _ { i ^ { * } } ( w ) ) = - ( \nabla f _ { i ^ { * } } ( w ) - \nabla g _ { i ^ { * } } ( w ) ) ^ { \top } H _ { \lambda } ^ { - 1 } ( \nabla f _ { i } ( w ) - \nabla g _ { i } ( w ) ) ,
|
| 480 |
+
$$
|
| 481 |
+
|
| 482 |
+
we have
|
| 483 |
+
|
| 484 |
+
$$
|
| 485 |
+
- \operatorname { s i g n } \big ( f _ { i ^ { * } } ( \pmb { w } ) - g _ { i ^ { * } } ( \pmb { w } ) \big ) \big ( \nabla f _ { i ^ { * } } ( \pmb { w } ) - \nabla g _ { i ^ { * } } ( \pmb { w } ) \big ) ^ { \top } \pmb { H } _ { \lambda } ^ { - 1 } \big ( \nabla f _ { i } ( \pmb { w } ) - \nabla g _ { i } ( \pmb { w } ) \big ) \in \partial _ { \lambda _ { i } } F ( \lambda ) .
|
| 486 |
+
$$
|
| 487 |
+
|
| 488 |
+
# A.5 RATIONALE AND INTUITION BEHIND THE APPROXIMATION
|
| 489 |
+
|
| 490 |
+
We continue from Sec. 3.2 and provide more justifications for the gradient approximation technique. Assume that $\begin{array} { r } { \sum _ { i = 1 } ^ { d } [ \lambda _ { i } \nabla ^ { 2 } f _ { i } ( { \pmb w } _ { \lambda } ) + ( c _ { i } - \lambda _ { i } ) \nabla ^ { 2 } g _ { i } ( { \pmb w } _ { \lambda } ) ] + \nabla ^ { 2 } h ( { \pmb w } _ { \lambda } ) \succ 0 } \end{array}$ for every $\lambda \in \Lambda$ . Then, the gradient can be fully characterized as in equation 4.
|
| 491 |
+
|
| 492 |
+
The rationale behind the approximation $\boldsymbol { \gamma } \approx ( 0 , 0 , \ldots , \gamma _ { i ^ { * } } , \ldots , 0 )$ is that $| \gamma _ { i ^ { * } } |$ will be maximized at $i ^ { * }$ if $\begin{array} { r } { \| \nabla f _ { 1 } ( { \boldsymbol w } ) - \nabla g _ { 1 } ( { \boldsymbol w } ) \| \approx \| \nabla f _ { 2 } ( { \boldsymbol w } ) - \nabla g _ { 2 } ( { \boldsymbol w } ) \| \approx \cdots \approx \| \nabla f _ { d } ( { \boldsymbol w } ) - \nabla g _ { d } ( { \boldsymbol w } ) \| } \end{array}$ . This is because $\nabla f _ { i ^ { * } } ( \pmb { w } ) - \nabla g _ { i ^ { * } } ( \pmb { w } ) ) ^ { \top } \pmb { H } _ { \lambda } ^ { - 1 } ( \nabla f _ { i } ( \pmb { w } ) - \nabla g _ { i } ( \pmb { w } ) )$ is an inner product between $H _ { \lambda } ^ { - 1 / 2 } ( \nabla f _ { i ^ { * } } ( \pmb { w } ) -$ $\nabla g _ { i ^ { * } } ( \pmb { w } ) )$ and $H _ { \lambda } ^ { - 1 / 2 } ( \nabla f _ { i } ( { \pmb w } ) - \nabla g _ { i } ( { \pmb w } ) )$ , and they are always perfectly aligned when $i = i ^ { * }$ .
|
| 493 |
+
|
| 494 |
+
This approximation is also intuitive. Recall that changing $\lambda _ { i ^ { * } }$ affects the weights associated with $f _ { i ^ { * } } ( w )$ and $g _ { i ^ { * } } ( w )$ in the inner optimization problem. Thus, changes in $\lambda _ { i ^ { * } }$ will directly affect $F ( \pmb { \lambda } ) = | f _ { i ^ { * } } ( \pmb { w } ) - g _ { i ^ { * } } ( \pmb { w } ) |$ . On the other hand, changing $\lambda _ { i }$ for $i \neq i ^ { * }$ does not affect the weights associated with $f _ { i ^ { * } } ( w )$ and $g _ { i ^ { * } } ( w )$ but only affects the weights of other terms, so it will only indirectly and weakly affect $F ( \lambda )$ .
|
| 495 |
+
|
| 496 |
+
# A.6 FAIRBATCH ALGORITHMS IN PSEUDOCODE
|
| 497 |
+
|
| 498 |
+
We continue from Sec. 3.2 and present the FairBatch algorithms in pseudocode. Algorithms 2, 3, and 4 show how $\boldsymbol { \lambda }$ is adjusted for equal opportunity, equalized odds, and demographic parity, respectively. From the intermediate model at each epoch (or after a certain iterations), we first obtain $f ( w )$ and $g ( w )$ , which correspond to the losses conditioned on each class. Then, one can update the current value of $\boldsymbol { \lambda }$ by comparing $f ( w )$ and $g ( w )$ .
|
| 499 |
+
|
| 500 |
+
Input: Intermediate model, criterion, train data $. x _ { t r a i n }$ , ztrain, ytrain), previous lambda $\lambda ^ { ( t - 1 ) }$ , and FairBatch’s learning rate $\alpha$
|
| 501 |
+
output $=$ model $( x _ { t r a i n } )$
|
| 502 |
+
$\begin{array} { r } { l o s s = } \end{array}$ criterion (output, $y _ { t r a i n . }$ )
|
| 503 |
+
Output :Next lambda λ(t) $\begin{array} { r l } & { \boldsymbol \lambda ^ { ( t ) } = \left\{ \begin{array} { l l } { \lambda ^ { ( t - 1 ) } + \alpha , } & { \mathrm { i f ~ } \mathrm { m e a n } ( l o s s [ ( \mathbf { y } = 1 , \mathbf { z } = 0 ) ] ) > \mathrm { m e a n } ( l o s s [ ( \mathbf { y } = 1 , \mathbf { z } = 1 ) ] ) } \\ { \lambda ^ { ( t - 1 ) } - \alpha , } & { \mathrm { i f ~ } \mathrm { m e a n } ( l o s s [ ( \mathbf { y } = 1 , \mathbf { z } = 0 ) ] ) < \mathrm { m e a n } ( l o s s [ ( \mathbf { y } = 1 , \mathbf { z } = 1 ) ] ) } \\ { \lambda ^ { ( t - 1 ) } , } & { \mathrm { o t h e r w i s e } } \end{array} \right. } \\ & { \mathcal { M } \mathrm { m o n t } \cdot \mathcal { N } \mathrm { ~ a n d } \textbf { \lambda } _ { 3 } \textbf { \lambda } ( t ) } \end{array}$
|
| 504 |
+
|
| 505 |
+
# Algorithm 3: Adaptive adjustment of $\boldsymbol { \lambda }$ w.r.t. equalized odds.
|
| 506 |
+
|
| 507 |
+
Input: Intermediate model, criterion, train data $. x _ { t r a i n }$ , ztrain, ytrain), previous lambda $\lambda ^ { ( t - 1 ) }$ , and FairBatch’s learning rate $\alpha$
|
| 508 |
+
output $=$ model $( x _ { t r a i n } )$
|
| 509 |
+
$\begin{array} { r } { l o s s = } \end{array}$ criterion (output, $y _ { t r a i n . }$ )
|
| 510 |
+
$\begin{array} { r l } & { d _ { \mathbf { y } = \mathbf { 0 } } = \mathbf { m e a n } ( l o s s [ ( \mathbf { y } = 0 , \mathbf { z } = 0 ) ] ) - \mathbf { m e a n } ( l o s s [ ( \mathbf { y } = 0 , \mathbf { z } = 1 ) ] ) } \\ & { d _ { \mathbf { y } = \mathbf { 1 } } = \mathbf { m e a n } ( l o s s [ ( \mathbf { y } = 1 , \mathbf { z } = 0 ) ] ) - \mathbf { m e a n } ( l o s s [ ( \mathbf { y } = 1 , \mathbf { z } = 1 ) ] ) } \end{array}$
|
| 511 |
+
|
| 512 |
+
if $| d _ { \mathrm { y = 0 } } | > | d _ { \mathrm { y = 1 } } |$ then
|
| 513 |
+
|
| 514 |
+
$$
|
| 515 |
+
\lambda _ { 1 } ^ { ( t ) } = \left\{ \begin{array} { l l } { \lambda _ { 1 } ^ { ( t - 1 ) } + \alpha , } & { \mathrm { i f ~ } d _ { \mathrm { y = 0 } } > 0 } \\ { \lambda _ { 1 } ^ { ( t - 1 ) } - \alpha , } & { \mathrm { i f ~ } d _ { \mathrm { y = 0 } } < 0 } \\ { \lambda _ { 1 } ^ { ( t - 1 ) } , } & { \mathrm { o t h e r w i s e } } \end{array} \right.
|
| 516 |
+
$$
|
| 517 |
+
|
| 518 |
+
else
|
| 519 |
+
|
| 520 |
+
$$
|
| 521 |
+
\lambda _ { 2 } ^ { ( t ) } = \left\{ \begin{array} { l l } { \lambda _ { 2 } ^ { ( t - 1 ) } + \alpha , } & { \mathrm { i f ~ } d _ { \mathrm { y = 1 } } > 0 } \\ { \lambda _ { 2 } ^ { ( t - 1 ) } - \alpha , } & { \mathrm { i f ~ } d _ { \mathrm { y = 1 } } < 0 } \\ { \lambda _ { 2 } ^ { ( t - 1 ) } , } & { \mathrm { o t h e r w i s e } } \end{array} \right.
|
| 522 |
+
$$
|
| 523 |
+
|
| 524 |
+
Output :Next lambda $\lambda ^ { ( t ) }$
|
| 525 |
+
|
| 526 |
+
# B APPENDIX – EXPERIMENTS
|
| 527 |
+
|
| 528 |
+
# B.1 OTHER EXPERIMENTAL SETTINGS
|
| 529 |
+
|
| 530 |
+
We continue from Sec. 4 and provide more details on experimental settings. We use the Adam optimizer for all trainings. We perform cross-validation on the training sets to find the best hyperparameters for each algorithm. We evaluate models on separate test sets, and the ratios of the train versus test data for the synthetic and real datasets are 2:1 and 4:1, respectively.
|
| 531 |
+
|
| 532 |
+
# B.2 EQUALIZED ODDS RESULTS
|
| 533 |
+
|
| 534 |
+
We continue from Sec. 4.1 and show Table 4, which compares the performances of all the fair training techniques on the synthetic, COMPAS, and AdultCensus test sets w.r.t. equalized odds. The key observations are the same as in Table 1 where overall FairBatch has the most robust performance against the state of the arts w.r.t. accuracy, fairness, and runtime.
|
| 535 |
+
|
| 536 |
+
# B.3 EXTENSION OF ADAFAIR
|
| 537 |
+
|
| 538 |
+
We continue from Sec. 4 and provide more details on how we extend AdaFair, which already supports ED, to also support EO and DP. The extension to EO is straightforward as EO is a relaxed version of ED where only the $\mathbf y = 1$ class is considered when measuring disparity. Hence, we only reweight examples in the $\mathbf y = 1$ class as well. The extension to DP is done by giving more weights on the
|
| 539 |
+
|
| 540 |
+
Input: Intermediate model, criterion, train data $. x _ { t r a i n }$ , ztrain, ytrain), previous lambda $\lambda ^ { ( t - 1 ) }$ , and FairBatch’s learning rate $\alpha$
|
| 541 |
+
output $=$ model $( x _ { t r a i n } )$
|
| 542 |
+
$\begin{array} { r } { l o s s = } \end{array}$ criterion (output, 1)
|
| 543 |
+
|
| 544 |
+
$$
|
| 545 |
+
\begin{array} { r l } & { d _ { y = 0 } = \mathsf { s u m } ( l o s s [ ( \dot { \mathbf { \sigma } } \dot { } = \mathbf { \boldsymbol { 0 } } , \dot { \mathbf { z } } = \boldsymbol { 0 } ) ] ) / | \mathbf { e n } ( \mathbf { z } = \mathbf { 0 } ) - \mathsf { s u m } ( l o s s [ ( \mathbf { y } = \mathbf { 0 } , \mathbf { z } = 1 ) ] ) / | \mathbf { e n } ( \mathbf { z } = 1 ) } \\ & { d _ { \mathbf { y } = 1 } = \mathsf { s u m } ( l o s s [ ( \mathbf { y } = \mathbf { 1 } , \mathbf { z } = \mathbf { 0 } ) ] ) / | \mathbf { e n } ( \mathbf { z } = \mathbf { 0 } ) - \mathsf { s u m } ( l o s s [ ( \mathbf { y } = \mathbf { 1 } , \mathbf { z } = 1 ) ] ) / | \mathbf { e n } ( \mathbf { z } = \mathbf { 1 } ) } \\ & { \mathbf { i f } \left| d _ { \mathbf { y } = \mathbf { 0 } } \right| > | d _ { \mathbf { y } = 1 } | \mathbf { \sigma } \mathbf { i } \mathbf { h e n } } \\ & { \qquad \lambda _ { 1 } ^ { ( t ) } = \left\{ \begin{array} { l l } { \lambda _ { 1 } ^ { ( t - 1 ) } - \alpha , } & { \mathrm { i f } \ d _ { \mathbf { y } = \mathbf { 0 } } > 0 } \\ { \lambda _ { 1 } ^ { ( t - 1 ) } + \alpha , } & { \mathrm { i f } \ d _ { \mathbf { y } = \mathbf { 0 } } < 0 } \\ { \lambda _ { 1 } ^ { ( t - 1 ) } , } & { \mathrm { o t h e r w i s e } } \end{array} \right. } \end{array}
|
| 546 |
+
$$
|
| 547 |
+
|
| 548 |
+
else
|
| 549 |
+
|
| 550 |
+
$$
|
| 551 |
+
\lambda _ { 2 } ^ { ( t ) } = \left\{ \begin{array} { l l } { \lambda _ { 2 } ^ { ( t - 1 ) } + \alpha , } & { \mathrm { i f ~ } d _ { \mathrm { y = 1 } } > 0 } \\ { \lambda _ { 2 } ^ { ( t - 1 ) } - \alpha , } & { \mathrm { i f ~ } d _ { \mathrm { y = 1 } } < 0 } \\ { \lambda _ { 2 } ^ { ( t - 1 ) } , } & { \mathrm { o t h e r w i s e } } \end{array} \right.
|
| 552 |
+
$$
|
| 553 |
+
|
| 554 |
+
Output :Next lambda $\lambda ^ { ( t ) }$
|
| 555 |
+
|
| 556 |
+
Algorithm 4: Adaptive adjustment of $\boldsymbol { \lambda }$ w.r.t. demographic parity.
|
| 557 |
+
Table 4: Performances on the synthetic, COMPAS, and AdultCensus test sets w.r.t. equalized odds (ED). The other settings are identical to Table 1.
|
| 558 |
+
|
| 559 |
+
<table><tr><td></td><td colspan="3">Synthetic</td><td colspan="3">COMPAS</td><td colspan="3">AdultCensus</td></tr><tr><td>Method</td><td>Acc.</td><td>ED Disp.</td><td>Epochs</td><td>Acc.</td><td>ED Disp.</td><td>Epochs</td><td>Acc.</td><td>ED Disp.</td><td>Epochs</td></tr><tr><td>LR</td><td>.885±.000 .115±.000</td><td></td><td>400</td><td>.681±.002</td><td>.239±.006</td><td>300</td><td>.845±.001.</td><td>.056±.003</td><td>300</td></tr><tr><td>Cutting</td><td>.859±.001 .036±.004</td><td></td><td>650</td><td>.665±.005</td><td>.066±.018</td><td>400</td><td>.802±.001 .062±.005</td><td></td><td>600</td></tr><tr><td>RW</td><td>.856±.000 .038±.002</td><td></td><td>350</td><td>.685±.000.</td><td>).137±.000</td><td>300</td><td>.835±.001 .134±.006</td><td></td><td>100</td></tr><tr><td>LBC</td><td>.858±.001 .026±.000</td><td></td><td>8800</td><td>.673±.002</td><td>.063±.005</td><td>9000</td><td>.840±.002 .027±.004</td><td></td><td>3300</td></tr><tr><td>FC</td><td>.865±.000 .030±.001</td><td></td><td>800</td><td>.677±.004 .101±.024</td><td></td><td>50</td><td>.841±.001 .038±.003</td><td></td><td>300</td></tr><tr><td>AD</td><td>.857±.000 .030±.001</td><td></td><td>1200</td><td>.683±.000 .082±.027</td><td></td><td>450</td><td>.843±.002</td><td>.033±.002</td><td>500</td></tr><tr><td>AdaFair</td><td>.868±.001 .029±.002</td><td></td><td>22400</td><td>.675±.000 .066±.002</td><td></td><td>9600</td><td>.843±.001</td><td>.038±.002</td><td>7800</td></tr><tr><td>FairBatch .856±.001 .038±.002</td><td></td><td></td><td>400</td><td>.682±.001 .052±.014</td><td></td><td>100</td><td>.843±.001 .036±.002</td><td></td><td>500</td></tr></table>
|
| 560 |
+
|
| 561 |
+
positive examples of a certain sensitive group $z = z$ that suffers from a lower positive prediction rate than other groups.
|
| 562 |
+
|
| 563 |
+
# B.4 FAIRNESS CURVES
|
| 564 |
+
|
| 565 |
+
We continue from Sec. 4.1 and show in Figures 3 and 4 the EO and DP disparity curves against the number of epochs for each fairness technique on the synthetic dataset. We also directly compare the curves of all fairness techniques in one graph as shown in Figure 5. Since LBC and AdaFair require more than $1 0 \mathrm { x }$ many epochs than other methods, we only show their first 1000 epochs. As a result, FairBatch is one of the fastest methods to converge to low EO or DP disparities.
|
| 566 |
+
|
| 567 |
+
# B.5 TRADE-OFF CURVES OF FAIRBATCH
|
| 568 |
+
|
| 569 |
+
We continue from Sec. 4.1 and show in Fig. 6 the accuracy-fairness trade-off curves of FairBatch for EO and DP on the synthetic dataset. FairBatch can be tuned by making it “less sensitive” to disparity. In Algorithms 2 and 4, notice that the $\lambda$ parameters are updated if there is any disparity among sensitive groups. We modify this logic where the $\lambda$ parameters are only updated if the disparity is above some threshold $T$ . The trade-off curves in Fig. 6 are thus generated by adjusting $T$ . For both EO and DP, we observe that there is a clear trade-off between accuracy and disparity.
|
| 570 |
+
|
| 571 |
+

|
| 572 |
+
Figure 3: EO disparity curves of algorithms on the synthetic dataset.
|
| 573 |
+
|
| 574 |
+

|
| 575 |
+
Figure 4: DP disparity curves of algorithms on the synthetic dataset.
|
| 576 |
+
|
| 577 |
+
# B.6 WALL CLOCK TIMES
|
| 578 |
+
|
| 579 |
+
We continue from Sec. 4.1 and show in Table 5 the wall clock times (in seconds) of the experiments in Table 1 where we compare FairBatch against all the fairness techniques on the synthetic, COMPAS, and AdultCensus datasets. As a result, each runtime is proportional to the number of epochs shown in Table 1. When comparing the runtimes of individual batches, FairBatch’s batch takes $1 . 5 \mathrm { x }$ longer to run than LR’s batch.
|
| 580 |
+
|
| 581 |
+
Table 5: Wall clock times (in seconds) of the experiments in Table 1 using the same settings.
|
| 582 |
+
|
| 583 |
+
<table><tr><td>Dataset</td><td>LR</td><td>Cutting</td><td>RW</td><td>LBC</td><td>FC</td><td>AD</td><td>AdaFair</td><td>FairBatch</td></tr><tr><td>Synthetic</td><td>5.71</td><td>5.67</td><td>17.24</td><td>208.47</td><td>16.05</td><td>3.97</td><td>294.31</td><td>5.25</td></tr><tr><td>COMPAS</td><td>6.07</td><td>3.34</td><td>7.48</td><td>94.10</td><td>2.76</td><td>6.93</td><td>215.39</td><td>3.00</td></tr><tr><td>AdultCensus</td><td>22.96</td><td>7.70</td><td>10.02</td><td>558.31</td><td>28.71</td><td>31.76</td><td>791.58</td><td>46.79</td></tr></table>
|
| 584 |
+
|
| 585 |
+

|
| 586 |
+
(a) EO disparity curve of FairBatch and the baselines. (b) DP disparity curve of FairBatch and the baselines.
|
| 587 |
+
|
| 588 |
+

|
| 589 |
+
Figure 5: Epochs-fairness disparity curves of all algorithms together.
|
| 590 |
+
Figure 6: Accuracy-fairness disparity trade-off curves of FairBatch on the synthetic dataset.
|
| 591 |
+
|
| 592 |
+
# B.7 COMPARISON WITH ADAFAIR
|
| 593 |
+
|
| 594 |
+
We continue from Sec. 4.1 and compare the class weights between FairBatch and the AdaFair algorithm. For AdaFair, the class weights are calculated by adding all example weights in each class. Fig. 7 shows the weight changes of each algorithm. Overall, the trends of the weights are similar. Again, the advantage of FairBatch is that it can run within one model training instead of using multiple model trainings as in AdaFair.
|
| 595 |
+
|
| 596 |
+

|
| 597 |
+
Figure 7: Comparison of the weight changes on AdaFair and FairBatch w.r.t. equalized odds on the synthetic dataset.
|
| 598 |
+
|
| 599 |
+
# B.8 EXTENSION OF FAIRBATCH TO MULTI CLASSIFICATION
|
| 600 |
+
|
| 601 |
+
We continue from Sec. 4.2 and explain how FairBatch can be extended to support multi classification by adjusting more $\lambda$ parameters. For example, for ED, the label attribute has $n$ classes, and each class connects to $m$ λs. We adjust $m \lambda s$ in the class ${ \bf y } = i$ at each epoch, where the class ${ \bf y } = i$ has the highest ED disparity at that epoch.
|
| 602 |
+
|
| 603 |
+
# B.9 FAIRBATCH WITH IMPORTANCE SAMPLING
|
| 604 |
+
|
| 605 |
+
We continue from Sec. 4.3 and show Fig. 8, which plots the convergence of FairBatch when merged with loss-based weighting batch selection. As a result, FairBatch uses about 50 fewer epochs to converge to low disparities compared to not using loss-based weighting.
|
| 606 |
+
|
| 607 |
+

|
| 608 |
+
Figure 8: Fairness curves of FairBatch on the synthetic dataset, with/without loss-based weighting (Loshchilov and Hutter, 2016).
|
md/train/ak06J5jNR4/ak06J5jNR4.md
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Revisiting Model Stitching to Compare Neural Representations
|
| 2 |
+
|
| 3 |
+
Yamini Bansal Harvard University ybansal@g.harvard.edu
|
| 4 |
+
|
| 5 |
+
Preetum Nakkiran Harvard University preetum@cs.harvard.edu
|
| 6 |
+
|
| 7 |
+
Boaz Barak Harvard University b@boazbarak.org
|
| 8 |
+
|
| 9 |
+
# Abstract
|
| 10 |
+
|
| 11 |
+
We revisit and extend model stitching (Lenc & Vedaldi 2015) as a methodology to study the internal representations of neural networks. Given two trained and frozen models $A$ and $B$ , we consider a “stitched model” formed by connecting the bottom-layers of $A$ to the top-layers of $B$ , with a simple trainable layer between them. We argue that model stitching is a powerful and perhaps under-appreciated tool, which reveals aspects of representations that measures such as centered kernel alignment (CKA) cannot. Through extensive experiments, we use model stitching to obtain quantitative verifications for intuitive statements such as “good networks learn similar representations”, by demonstrating that good networks of the same architecture, but trained in very different ways (e.g.: supervised vs. self-supervised learning), can be stitched to each other without drop in performance. We also give evidence for the intuition that “more is better” by showing that representations learnt with (1) more data, (2) bigger width, or (3) more training time can be “plugged in” to weaker models to improve performance. Finally, our experiments reveal a new structural property of SGD which we call “stitching connectivity”, akin to mode-connectivity: typical minima reached by SGD can all be stitched to each other with minimal change in accuracy.
|
| 12 |
+
|
| 13 |
+
# 1 Introduction
|
| 14 |
+
|
| 15 |
+
The success of deep neural networks can, arguably, be attributed to the intermediate features or representations learnt by them [Rumelhart et al., 1985]. While neural networks are trained in an end-to-end fashion with no explicit constraints on their intermediate representations, there is a body of evidence that suggests that they learn rich a representation of the data along the way [Goh et al., 2021, Olah et al., 2017]. However, theoretically we understand very little about how to formally characterize these representations, let alone why representation learning occurs. For instance, there are various ad-hoc pretraining methods [Chen et al., 2020a,b], that are purported to perform well by learning good representations, but it is unclear which aspects of these methods (objective, training algorithm, architecture) are crucial for representation learning and if these methods learn qualitatively different representations at all.
|
| 16 |
+
|
| 17 |
+
Moreover, we have an incomplete understanding of the relations between different representations. Are all “good representations” essentially the same, or is each representation “good” in its own unique way? That is, even when we train good end-to-end models (i.e., small test loss), the internals of these models could potentially be very different from one another. A priori, the training process could evolve in either one of the following extreme scenarios (see Figure 1):
|
| 18 |
+
|
| 19 |
+
(1) In the “snowflakes” scenario, training with different initialization, architectures, and objectives (e.g., supervised vs self-supervised) will result in networks with very different internals, which are completely incompatible with one another. For example, even if we train two models with identical data, architecture, and task, but starting from two different initializations, we may end up at local minima with very different properties (e.g., Liu et al. [2020]). If models are trained with different data (e.g., different samples), different architecture (e.g., different width), or different task (e.g., self-supervised vs supervised) then they could end up being even more different from one another.
|
| 20 |
+
|
| 21 |
+
(2) In the “Anna Karenina” scenario1, all successful models end up learning roughly the same internal representations. For example, all models for vision tasks will have internal representation corresponding to curve detectors, and models that are better (for example, trained on more data, are bigger, or trained for more time) will have better curve detectors.
|
| 22 |
+
|
| 23 |
+

|
| 24 |
+
Figure 1: Two extreme “cartoons” for training dynamics of neural networks. In the “snowflakes” scenario, there are exponentially many well-performing neural networks with highly diverging internals. In the “Anna Karenina” scenario all well-performing networks end up learning similar representations, even if their initialization, architecture, data, and objectives differ. Image credits: Li et al. [2018], Olah et al. [2017, 2020], Komarechka [2021].
|
| 25 |
+
|
| 26 |
+
The “Anna Karenina” scenario implies the following predictions:
|
| 27 |
+
|
| 28 |
+
“All roads lead to Rome:” Successful models learned with different initializations, architectures, and tasks, should learn similar internal representations, and so if $A$ and $B$ are two such models, it should be possible to “plug in” the internals from $A$ into $B$ without a significant loss in performance. See Figure 2A-B.
|
| 29 |
+
|
| 30 |
+
“More is better:” Better models trained using more data, bigger size, or more compute, should learn better versions of the same internal representations. Hence if $A$ is a more successful model than $B$ , it should be possible to “plug in” $A$ ’s internals to $B$ and obtain improved performance. See Figure 2C.
|
| 31 |
+
|
| 32 |
+
In this work, we revisit the empirical methodology of “model stitching” to test the above predictions. Initially proposed by Lenc and Vedaldi [2015], model stitching is natural way of “plugging in” the bottom layers of one network into the top layers of another network, thus forming a stitched network (however care must be taken in the way it is performed, see Section 2). We show that model stitching has some unique advantages that make it more suitable for studying representations than representational similarity measures such as CKA [Kornblith et al., 2019] and SVCCA [Raghu et al., 2017]. Our work provides quantitative evidence for the intuition, shared by many practitioners, that the internals of neural networks often end up being very similar in a certain sense, even when they are trained under different settings.
|
| 33 |
+
|
| 34 |
+
# 1.1 Summary of Results
|
| 35 |
+
|
| 36 |
+
Model stitching as an experimental tool. We establish model stitching as a way of studying the representations of neural networks. A version of model stitching was proposed in Lenc and Vedaldi [2015] to study the equivalence between representations. In this work, we argue that the idea behind model stitching is more powerful than has been appreciated: we analyze the benefits of modelstitching over other methods to study representations, and we then use model-stitching to establish an number of intuitive properties, including new results on the properties of SGD.
|
| 37 |
+
|
| 38 |
+

|
| 39 |
+
Figure 2: Summary of main results (A) Various models trained on CIFAR-10 identically except with different random initializations are “stitching connected”: can be stitched at all layers with minimal performance drop (see Section 4). Stitching with a random bottom network shown for reference. (B) Models of the same architecture and similar test error, but trained on ImageNet with end-to-end supervised learning versus self-supervised learning can be stitched with good performance (see Section 5). (C) Better representation obtained by training the network with more samples can be "plugged-in" with stitching to improve performance (see Section 6). In all figures, stitching penalty is the difference in error between the stitched model and the base top model.
|
| 40 |
+
|
| 41 |
+
In this paper, we use model stitching in the following way. Suppose we have a neural network $A$ (which we’ll think of as the “top model”) for some task with loss function $\mathcal { L }$ (e.g. the CIFAR-10 or ImageNet test error). Let $r : \mathcal { X } \overset { } { \to } \mathbb { R } ^ { d }$ be a candidate “representation” function, which can come from the first (bottom-most) layers of some “bottom model” $B$ . Our intuition is that $r$ has better quality than the first \` layers of network $A$ if “swapping out” these layers with $r$ will improve performance.
|
| 42 |
+
|
| 43 |
+
“Swapping out” is performed by introducing an additional trainable stitching layer to $r$ with $A$ (defined more formally in Section 2). The stitching layers have very low capacity, and are only meant to “align” representations, rather than improving the model.
|
| 44 |
+
|
| 45 |
+
Comparison to Representational Similarity Metrics. Much of the current work studying representations focuses on similarity metrics such as CKA. However, we argue that model stitching can be a better suited tool to study representations in various scenarios, and can give qualitatively different conclusions about the behavior of neural representations compared to these metrics. We analyze the differences between model stitching and prior similarity metrics in Section 3.
|
| 46 |
+
|
| 47 |
+
Quantitative evidence for intuitions. Using model stitching, we are able to provide formal and quantitative evidence to the intuitions mentioned above. In particular we give evidence for the “all roads lead to rome” intuition by showing compatibility of networks with representation that are trained using (1) different initializations, (2) different subsets of the dataset, (3) different tasks (e.g., self-supervised or coarse labels). See Figure 2A-B for results. We also show that network with different random initialization enjoy a property which we call stitching connectivity, wherein almost all minima reachable via SGD can be “stitched” to each other with minimal loss of accuracy. We also give evidence for the “more is better” intuition by showing that we can improve the performance of a network $A$ by plugging in a representation $r$ that was trained with (1) more data, (2) larger width, or (3) more training epochs. See example with more samples in Figure 2C.
|
| 48 |
+
|
| 49 |
+
The results above are not surprising, in the sense that they confirm intuitions that practitioners might already have. However model stitching allows us to obtain quantitative and formal measures of these in a way that is not achievable by prior representation measures.
|
| 50 |
+
|
| 51 |
+
Organization. We first define model stitching formally in Section 2. We compare it with prior work on representational similarity measures in Section 3. Then, we formally define stitching connectivity and provide experimental evidence for it in Section 4. Finally, in Section 5 and 6, we provide quantitative evidence for the "all roads lead to Rome" and "more is better" intuitions respectively.
|
| 52 |
+
|
| 53 |
+
Related works. As mentioned above, stitching was introduced by Lenc and Vedaldi [2015] who studied equivalence of representations. They showed that certain early layers in a network trained on the Places dataset [Zhou et al., 2014] are compatible with AlexNet (see Table 4 in Lenc and Vedaldi [2015]). After completing this work, we were made aware of concurrent work Csiszárik et al. [2021] that also proposes model stitching to compare neural representations. The results from this work complement ours by studying the effect of changing the stitching layer in various ways (for instance, imposing a sparsity penalty on the stitching layer), and further clarifying the relationship of stitching with other representational similarity measures. In contrast, our work demonstrates stitching compatibility under different scenarios, like the comparison between supervised and self-supervised methods and experiments that show "more is better".
|
| 54 |
+
|
| 55 |
+
Our work on stitching connectivity is related to the work on mode connectivity [Garipov et al., 2018, Freeman and Bruna, 2017, Draxler et al., 2018]. These works show that the local minima found by SGD are often connected through low-loss paths. These paths are generally non-linear, though it was shown that there are linear paths between these minima if they are identically initialized but then use different SGD noise (order of samples) after a certain point in training [Frankle et al., 2020]. Stitching connectivity is complementary to mode connectivity. Stitching connectivity corresponds to a discrete path (with as many steps as layers) but one where the intermediate steps are interpretable. We also show stitching connectivity of networks that are trained on different tasks. Finally, most of the prior work on concrete metrics for relating representations was in the context of representation similarity measures. We describe this work and compare it to ours in Section 3.
|
| 56 |
+
|
| 57 |
+
# 2 Model Stitching
|
| 58 |
+
|
| 59 |
+
Let $A$ be a neural network of some architecture $\mathcal { A }$ , and let $r : \mathcal { X } \to \mathbb { R } ^ { d }$ be a candidate “representation” function. We consider a family $s$ of stitching layers which are simple (e.g. linear $1 \times 1$ convolutional layers for a convolutional network $A$ ) functions mapping $\mathbb { R } ^ { d }$ to $\mathbb { R } ^ { \hat { d } _ { \ell } }$ where $d _ { \ell }$ is the width of $A$ ’s $\ell$ -th layer. Given some loss function $\mathcal { L }$ (e.g., CIFAR-10 or ImageNet test accuracy) we define
|
| 60 |
+
|
| 61 |
+
$$
|
| 62 |
+
\mathcal { L } _ { \ell } ( r ; A ) = \operatorname* { i n f } _ { s \in \mathcal { S } } \mathcal { L } ( A _ { > \ell } \circ s \circ r )
|
| 63 |
+
$$
|
| 64 |
+
|
| 65 |
+
where $A _ { > \ell }$ denotes the function mapping the activations of $A$ ’s \`th layer to the final output, and $\circ$ denotes function composition. That is, $\mathcal { L } _ { \ell } ( r ; A )$ is the smallest loss obtained by stitching $r$ into all but the first $\ell$ layers of $A$ using a stitching layer from $s$ . We define the stitching penalty of the representation $r$ with respect to $A$ (as well as $\ell$ and the loss $\mathcal { L }$ ) as $\mathcal { L } _ { \ell } ( r ; A ) - \mathcal { L } ( A )$ . If the penalty is non-negative, then we say that the representation $r$ is at least as good as the first $\ell$ layers of $A$ .
|
| 66 |
+
|
| 67 |
+
Consider the simple case of a fully-connected network and a stitching family of linear functions. In this case, model stitching tells us if there is a way to linearly transform the representation $r$ into that of the first $\ell$ layers of $A$ , but only in the subspace that is relevant to the achieving low loss. In practice, we approximate the infimum in Equation 1 by using gradient methods— concretely, by optimizing the stitching-layer using the train set of the task $\mathcal { L }$ . The stitching penality itself is then estimated on the test set.
|
| 68 |
+
|
| 69 |
+
Choosing the stitching family $s$ : The stitching family can be chosen flexibly depending on the desired invariances between representations, as long as it is simple (see below). For instance, if we choose $S$ to be all permutations or orthogonal matrices, the stitching penalty will be invariant up to permutations or orthogonal transformations respectively. In this work, we mainly consider cases where $r = B _ { \leq l }$ for $B$ with architecture similar to $\mathcal { A }$ . We restrict the stitching family per architecture $\mathcal { A }$ such that the composed model $A _ { > \ell } \circ s \circ r$ lies in $\mathcal { A }$ . This way the stitched model consists of layers identical to the layers of either $A$ or $B$ , with the exception of just one layer. For example, for convolutional networks we consider a $1 \times 1$ convolution and for transformers we consider a token-wise linear function between transformer blocks. We perform an ablation with kernels of different sizes in Appendix B.1.
|
| 70 |
+
|
| 71 |
+
Stitching is not learning: One concern that may arise is that if the stitching family $s$ is sufficiently powerful, it can learn to transform any representation into any other representation. This would defeat the aim of faithfully studying the original representations. To avoid this, the family of stitchers should be chosen to be simple (e.g., linear). Nevertheless, to verify that our experiments are not in such a regime, we stitch an untrained, randomly initialized network with a fully trained network. Figure 2A-B shows that the penalty of such a stitched network is high, specially for high $l$ . CKA has the same trend for the same networks (See Appendix B.2)
|
| 72 |
+
|
| 73 |
+
Model stitching as a “happy middle”. Model stitching can be considered as a compromise between the following extremes: (1) Direct plugging in: the most naive interpretation of “plugging in” $r$ into $A$ would be to use no stitching at all. However, even in cases where networks are identical up to a permutation of neurons, plugging in $r$ into $A$ would not work. (2) Full fine tuning: the other extreme interpretation is to perform full fine tuning. That is, start with the initialized network $A { \mathord { > } } \ell \circ r$ and optimize over all choices of $A$ . The problem with this approach is that there are so many degrees of freedom in the choices for $A _ { > \ell }$ that the resulting network could achieve strong performance regardless of the quality of $r$ . For example, in B.3 we show that fine tuning can fail to distinguish between a trained network and a random network. (3) Linear probe: a popular way to define quality of representations is to use linear probes [Alain and Bengio, 2016]. However, linear probes are not as well suited for studying the representation of early layers, which have low linear separability. In particular, the linear probe accuracy of an early layer of network $A$ would generally always be much worse than a later layer of network $B$ , even if $A$ was of “higher quality” (e.g., trained with more data). Linear probes also don’t have the operational interpretation of compatibility.
|
| 74 |
+
|
| 75 |
+
By choosing a trainable but low-capacity layer, model stitching “threads the needle” between simply plugging in, and full fine tuning, and unlike linear probes, enables the study of early layers using powerful nonlinear decoders.
|
| 76 |
+
|
| 77 |
+
Experimental setup. Unless specified otherwise, the CIFAR-10 experiments are conducted on the ResNet-18 architecture (with first layer width 64) and the ImageNet experiments are conducted on the ResNet-50 architecture [He et al., 2015]. The ResNets are trained with the standard hyperparameters (See Appendix A.1 for training parameters of all base models). The stitching layer in the the convolutional networks consist of a $1 \times 1$ convolutional layer with input features equal to the number of channels in $r$ , and output features equal to the output channels of $A _ { \leq l } ( x )$ . We add a BatchNorm (BN) layer before and after this convolutional layer. Note that the BN layer does not change the representation capacity of the stitching layer and only aides with optimization. We perform stitching only between ResNet blocks (and not inside a block), but note that it is possible to stitch within the block as well. We use the Adam optimizer with the cosine learning rate decay and an initial learning rate of 0.001. Full experimental details for each experiment are described in Appendix A.
|
| 78 |
+
|
| 79 |
+
# 3 Stitching vs. representational similarity
|
| 80 |
+
|
| 81 |
+
Much prior work studying representations focused on representation similarity measures. These have been studied in both the neuroscience and machine learning communities [Kriegeskorte et al., 2008, Kornblith et al., 2019]. Examples of such measures include canonical correlation analysis $( C C A )$ [Hardoon et al., 2004] and its singular-vector and projection-weighted variants such as SVCCA and PWCCA [Raghu et al., 2017, Morcos et al., 2018]. Recently Kornblith, Norouzi, Lee, and Hinton [2019] proposed centered kernel alignment $( C K A )$ that addressed several issues with CCA. CKA was further explored by Nguyen et al. [2021].
|
| 82 |
+
|
| 83 |
+
For two representations functions $\phi : \mathcal { X } \mathbb { R } ^ { d _ { 1 } }$ and $\sigma : \mathcal { X } \mathbb { R } ^ { d _ { 2 } }$ , the linear CKA is defined $\begin{array} { r } { \mathbf { C K A } ( \phi , \sigma ) : = \frac { | | \mathbf { C o v } ( \phi ( x ) , \sigma ( x ) ) | | _ { F } ^ { 2 } } { | | \mathbf { C o v } ( \phi ( x ) ) | | _ { F } \cdot | | \mathbf { C o v } ( \sigma ( x ) ) | | _ { F } } } \end{array}$ where all covariances are with respect to the test distribution on inputs $x \sim \mathcal { D }$ [Kornblith et al., 2019].
|
| 84 |
+
|
| 85 |
+
Table 1: Qualitative results of our experiments, comparing CKA to stitching. $\mathbf { C K A } \approx 1$ means representations are close according to CKA. Error $\approx 0 \%$ means representations are close according to stitching. “Varies” means no consistent conclusion across different architectures and tasks.
|
| 86 |
+
|
| 87 |
+
<table><tr><td>Method</td><td>Stitching Connectivity Different Initialization</td><td>“All roads” Self-Supervision</td><td>“More is better” More Data /Time /Width</td></tr><tr><td>CKA Stitching</td><td>Varies (can be O) Close (up to 3% error)</td><td>Varies (0.35- 0.9) Close (up to 5% error)</td><td>Far (can be O for data, O.7 for width) Better</td></tr></table>
|
| 88 |
+
|
| 89 |
+
Table 1 contains a qualitative summary of our results, comparing stitching with CKA. While in some cases the results of stitching and CKA agree, in several cases, stitching obtains results that align more closely with the intuitions that well-performing networks learn similar representations, and that more resources results in better versions of the same representations. In particular, in experiments where stitching indicates that a certain representation is better than another, CKA by its design can only indicate that the two representations are far from each other. Moreover, in some experiments CKA indicates that representations are far where we intuitively believe that they should be close, e.g. when networks only differ by two random initializations, or when one is trained with a supervised and another with a self-supervised task.2 In contrast, in these settings, model-stitching reveals that the two models have nearly equivalent representations, in the sense that they can be stitched to each other with low penalty. The precise experimental results appear in Sections 4-6 and Appendix B.2.
|
| 90 |
+
|
| 91 |
+
Compared to representation-similarity measures, model stitching has several advantages:
|
| 92 |
+
|
| 93 |
+
Ignoring spurious features: Measures such as CCA and CKA ultimately boil down to distances between the feature vectors, but they do not distinguish between features that are learned and relevant for downstream tasks, and spurious features, that may be completely useless or even random. For example, suppose we augment a representation $\phi : \dot { \mathcal { X } } \dot { \mathbb { R } ^ { d } }$ by concatenating 1000 “useless” coordinates, with random gaussian features, to form a new representation $\phi ^ { \prime } : \mathcal { X } \overset { \mathbf { \bar { \Delta } } } { \to } \mathbb { R } ^ { d + 1 0 0 0 }$ . This would reduce the CKA, but representation $\phi ^ { \prime }$ is not different from $\phi$ in a meaningful way. Modelstitching resolves this, since we can stitch $\phi ^ { \prime }$ in place of $\phi$ by simply throwing away the useless coordinates. In general, model-stitching focuses only on aspects of the representation which are relevant for the downstream task, as opposed to aspects which are spurious or irrelevant. The price we pay for this is that, unlike measures such as CKA, model stitching depends on the downstream task. However, our results indicate that neural networks tend to learn similar representations for a variety of natural tasks.
|
| 94 |
+
|
| 95 |
+
Asymmetry: Our intuition is that some representations are better than others. For example, we believe that with more data, neural networks learn better representations. However, by design, such comparisons cannot be demonstrated by representation similarity measures that only measure the distance between two representations. In contrast, we are able to demonstrate that “more is better” using stitching-based measures. Concretely, CKA and other similarity measures are symmetric, while stitching is not: it may be the case that a representation $\phi$ can be stitched in place of a representation $\sigma$ , but not vice-versa. Also, stitching a representation $\phi$ can (and sometimes does) improve performance.
|
| 96 |
+
|
| 97 |
+
Interpretable units: Measures such as CCA/CKA give a number between 0 and 1 for the distance between representations, but it is hard to interpret what is the difference, for example, between a CKA value of 0.9 and value of 0.8. In contrast, if the loss function $\mathcal { L }$ has meaningful units, then the stitching penalty inherits those, and (for example) a representation $r$ having a penalty of $3 \%$ in CIFAR-10 accuracy has an operational meaning: if you replace the first layers of the network with $r$ the decrease in accuracy is at most $3 \%$ .
|
| 98 |
+
|
| 99 |
+
Invariance: A representation similarity measure should be invariant to operations that do not modify the “quality” of the representation, but it is not always clear what these operations are. For example, CCA and CKA are invariant under orthogonal linear transformations, and some variants of CCA are also invariant under general invertible linear transformations (see Table 1 in Kornblith et al. [2019]). However, it is unclear if these are the natural families. For example, randomly permuting the order of pixels (either at the input or in the latents) is an orthogonal transform, and thus does not affect the CKA. However, this completely destroys the spatial structure of the input, and intuitively should affect the “representation quality.” On the other hand, certain non-orthogonal transforms may still preserve representation quality– for example, the non-invertible transformation of projecting out spurious coordinates. Thus, orthogonal transforms may not be the right invariance class to consider representations. Using stitching we can explicitly ensure invariance under any given family of transformations by adding it to the stitching layer. Concretely, our choice of using a $1 \times 1$ convolutional stitcher yields much weaker invariance than general orthogonal transforms– and thus, model stitching can predict that shuffling pixels leads to a “worse” representation.
|
| 100 |
+
|
| 101 |
+
# 4 Stitching Connectivity
|
| 102 |
+
|
| 103 |
+
We first focus on a special case of model-stitching, wherein we stitch two identically distributed networks to each other. That is, we train two networks of same architecture, on the same data distribution, but with independent random seeds and independent train samples. This question has been studied before with varied conclusions [Li et al., 2016, Wang et al., 2018]. We find that empirically, two such networks can be stitched to each other at all layers, with close to 0 penalty. This is a new empirical property of SGD trained networks, which we term “stitching connectivity.”
|
| 104 |
+
|
| 105 |
+
Formally, let $A , B$ be two trained networks of identical architectures with $L$ layers, for a task with objective function $\mathcal { L }$ . For all $i \in \{ 0 , 1 , . . . , L \}$ , define $S _ { i }$ to be the stitched model where we replace the first $i$ layers of $A$ with those same layers in $B$ (and optimize the stitching layer as usual). That is, $\begin{array} { r } { S _ { i } : = \arg \operatorname* { m i n } _ { S = A _ { > i } \circ s \circ B _ { \leq i } } { \mathcal { L } } ( S ) } \end{array}$ . Observe that $S _ { 0 } = A$ and $S _ { L } = B$ , so the sequence of models $\{ S _ { 0 } , S _ { 1 } , \ldots , S _ { L } \}$ gives a kind of “path” between models $A$ and $B$ . Further, due to our family of stitching layer and network architecture $1 \times 1$ conv stitchers and conv-nets), the stitching layer $s$ can be folded into the adjacent model. Thus, all models $S _ { i }$ have identical architecture as $A$ and $B$ . We say $A$ and $B$ are “stitching-connected” if all the intermediate models $S _ { i }$ have low test loss.
|
| 106 |
+
|
| 107 |
+
Definition 1 (Stitching Connectivity). Let $A , B$ be two networks of identical architectures. We say $A$ and $B$ are stitching-connected if they can be stitched to each other at all layers, with low penalty. That is, if all stitched models $S _ { i }$ , defined as above, have test loss comparable to $A$ .
|
| 108 |
+
|
| 109 |
+
Stitching connectivity is not a trivial property: two networks with identical architectures, but very different internal representations, would fail to be stitching connected. Our main claim is that for a fixed data distribution, almost all minima reached by SGD are stitching-connected to each other.
|
| 110 |
+
|
| 111 |
+
Conjecture 2 (Stitching Connectivity of SGD, informal). Let $A _ { 1 } , A _ { 2 }$ be two independent and identically-trained networks. That is, networks of the same architecture, trained by SGD with independent random seeds and independent train sets from the same distribution. Then, for natural architectures and data-distributions, the trained models $A _ { 1 }$ and $A _ { 2 }$ are stitching-connected.
|
| 112 |
+
|
| 113 |
+
This conjecture states a structural property of models that are likely to be output by SGD. If we run the identical training procedure twice, we will almost certainly not produce models with identical parameters. However, these two different parameter settings yield essentially equivalent internal representations– this is what it means to be stitching-connected.
|
| 114 |
+
|
| 115 |
+
Discussion. Stitching connectivity is similar in spirit to mode connectivity [Garipov et al., 2018, Freeman and Bruna, 2017, Draxler et al., 2018], in that they are both structural properties of the set of typical SGD minimas. Mode connectivity states that typical minima are connected by a low-test-loss path in parameter space. Stitching connectivity does not technically define a path in parameter space– rather, it defines a sequence $S _ { 0 } , S _ { 1 } , \ldots , S _ { L }$ of low-loss models connecting two endpoint models. For each model in this sequence, all but one layer is identical to one of the endpoint models. Thus, we can informally think of the stitching sequence as a different way of “interpolating” between two models.
|
| 116 |
+
|
| 117 |
+
The stitching connectivity of SGD is especially interesting for overparameterized models, since it sheds light on the implicit bias of SGD. In this case, there are exponentially-many global minima of the train loss, even modulo permutation-symmetry. Apriori, it could be the case that each of these minima compute the classification decision in different ways (e.g. by memorizing a particular train set). However, empirically we find that SGD is “biased” towards minima with essentially the same internal representations– in that typical minima can be stitched to each other.
|
| 118 |
+
|
| 119 |
+
Experiments. Figure 2A demonstrates the stitching-connectivity of SGD via the following experiment. We train a variety of model architectures on CIFAR-10, with two different randomly initialized models per architecture. We consider a ResNet-18, two variants of ResNet-18 with $0 . 5 \times$ and $2 \times$ width, a significantly deeper ResNet-164, a feed-forward convolutional network Myrtle-CNN [Page, 2018] and a Vision Transformer [Dosovitskiy et al., 2020] pretrained on CIFAR- $\cdot 5 \mathrm { m }$ [Nakkiran et al., 2021]. We stitch the two randomly initialized models at various intermediate layers, forming the stitching sequence $S _ { 0 } , \ldots S _ { L }$ . Figure 2A plots the test errors of these intermediate stitched models $S _ { i }$ with the first and last point showing the errors of the base models. For all layers $i$ , the test error of the stitched model $S _ { i }$ is close to the error of the base models. A similar result holds for networks trained on disjoint train sets. Full experimental details are provided in Appendix A.
|
| 120 |
+
|
| 121 |
+
# 5 All Roads Lead to Rome
|
| 122 |
+
|
| 123 |
+
In this section, we quantify the intuition that “all roads lead to Rome” in representation learning: many diverse choices of train method, label quality, and objective function all lead to similar representations in early layers. However, we find that such training details can affect the representation at later layers.
|
| 124 |
+
|
| 125 |
+
Comparing self-supervised and supervised methods. If we train models with the same architecture and train set, but alter the training method significantly, what do we expect from the representations? To explore this, we compare the representations of two very different training methods — standard end-to-end supervised training (E2E) versus self-supervised $^ +$ simple classifiers (SSS), that first learn a representation from unlabeled data and then train a simple linear classifier on this representation.3
|
| 126 |
+
|
| 127 |
+
SSS algorithms like SimCLR [Chen et al., 2020b], SwAV [Caron et al., 2021a] and DINO [Caron et al., 2021b] etc have recently emerged as prominent paradigm for training neural networks that achieve comparable accuracy to E2E networks. We stitch the representations of these SSS algorithms to an E2E supervised network (all with a ResNet-50 backbone) trained on ImageNet. While all of these methods achieve similar test accuracy on a ResNet-50 backbone of $7 5 \% \pm 1$ (except SimCLR at $6 8 . 8 \%$ ) [Goyal et al., 2021], they are trained very differently. Figure 2B shows that the SSS trained networks are stitching connected at all layers to the E2E network. This suggests that while the advances in SSL have been significant for learning features without labels, the features themselves are similar in both cases. This is in agreement with prior work which shows that SSS and E2E networks have similar texture-shape bias and make similar errors [Geirhos et al., 2020]. Since certain SSS algorithms have been proven to have small generalization gap [Bansal et al., 2021], the similarity of representations between SSS and E2E algorithms may yield some clues into the generalization mystery of E2E algorithms. A similar experiment for SimCLR with ResNet-18 trained on CIFAR-10 is shown in Appendix B.2, along with the CKA for the same networks. We find that the CKA varies between $0 . 3 5 - 0 . 9$ for different layers, while stitching gets maximum stitching penalty of $3 \%$ .
|
| 128 |
+
|
| 129 |
+
Changing the label distribution $\mathbf { p } ( \mathbf { y } \vert \mathbf { x } )$ : How much does the representation quality depend on label quality? To explore this, we compare the representations of networks with the same input distribution $p ( x )$ , but different label distributions $p ( y | x )$ . We take the CIFAR-10 distribution on inputs $p ( x )$ , and consider several “less informative” label distributions: (1) Coarse labels: We super-class CIFAR-10 classes into a binary task, of Objects (Ship, Truck, etc.) vs. Animals (Cat, Dog, etc.) (2) Label noise: We set $p = \{ 0 . 1 , 0 . 5 , 1 . \}$ fraction of labels to random labels. We then stitch these “weak” networks to a standard CIFAR-10 network at varying layers, and measure the stitching penalty incurred in Figure 3A. We find that even with poor label quality, the first half of layers in the “weak” model are “as good as” layers in the standard model (with the exception of the weak network trained on $100 \%$ noisy labels). These experiments align with the results of Nakkiran and Bansal [2020], which show that neural networks can be sensitive to aspects of the input distribution that are not explicitly encoded in the labels. Full experimental details appear in Appendix A.
|
| 130 |
+
|
| 131 |
+
These results are in agreement with prior work on vision [Olah et al., 2017], which suggests that the first few layers of a neural network learn general purpose features (such as curve detectors) that are likely to be useful a large variety of tasks. Formalizing the set of pre-training tasks for which such similar representations are learnt is an important direction for future work to understand pretraining.
|
| 132 |
+
|
| 133 |
+
# 6 More is Better
|
| 134 |
+
|
| 135 |
+
Now, we use stitching to quantify the intuition that “more is better” for representations. That is, larger sample size, model size, or train time lead to progressively better representations of the same type.
|
| 136 |
+
|
| 137 |
+
Number of samples: When scaled appropriately, neural network performance improves predictably with the number of training samples (e.g. [Kaplan et al., 2020]). But how does this improvement manifest in their representations? We investigate this by stitching the lower parts of models trained $\{ 5 K , 1 0 K , 2 5 K \}$ samples of CIFAR-10 to the upper layers of a model trained with $1 0 K$ samples.
|
| 138 |
+
|
| 139 |
+
First, as Figure 2C shows, we observe that the models are all stitching compatible— the better representation trained with $2 5 K$ samples can simply be "plugged in" to the model trained with fewer samples, and this improves the performance of the stitched network relative to the $1 0 K$ network. Note that there is no theoretical reason to expect this compatibility, better networks could have learnt fundamentally different features from their weaker counterparts. For example, a network trained on few samples could have learnt only “simple features” (presence of sky in the image / presence of horizontal lines), while one trained on many samples may learn only “complex features” (presence of an blue eye / presence of a furry ear), which are not decodable by the weaker network.
|
| 140 |
+
|
| 141 |
+
Secondly, we find that some layers are more data hungry than others. When stitched at the first few layers, all the models have similar performance, but the performance degrades rapidly with fewer samples in the mid-layers of the network. This suggests that each layer of a neural network has its own sample complexity. As a corollary of this finding, we predict that we can train some of the layers with few samples, freeze them and train the rest of the model with larger number of samples. Indeed, we find that we can recover most of the accuracy of the network by training the first three, and the last three layers of this model (about half of the layers) with just $5 K$ samples, freezing them and training the rest of the model with all the samples to obtain a network within $2 \%$ accuracy of the original network. See Appendix B.4 for details of the experiment and training plots. This is similar to the "freeze-training" experiments suggested by Raghu et al. [2017].
|
| 142 |
+
|
| 143 |
+

|
| 144 |
+
Figure 3: (A) Changing the label distribution: Representations trained on CIFAR-10 with the Object vs. Animals task or with $\{ 1 0 \% , 5 0 \% , 1 0 0 \% \}$ label noise and stitched to a network trained on original CIFAR-10 labels. Early layers learn similar representations even when the label distribution is "less informative" than training with all labels (B) Increasing training time: Representations at different epochs during training are stitching compatible and early layer converge faster (B) Increasing width: Better representations from a wider network can be stitched with a thinner network to improve performance. All experiments were performed with ResNet-18 on CIFAR-10.
|
| 145 |
+
|
| 146 |
+
Training time: We observe similar results when we stitch networks trained for different number of epochs. We train a ResNet-18 trained on CIFAR-10 and stitch the representations from the model at $\{ 4 0 , 8 0 , 1 6 0 \}$ epochs to the model at the 80-th epoch. As training time increases, Figure 3B shows that the representations improve in a manner that is compatible with the earlier training times. Note that this is a nontrivial statement about neural network training dynamics: It could have been the case that, once a network is trained for very long, its representations move “far away” from its representations near initialization – and thus, stitching would fail. However, we find that the representations at the end of training remain compatible with those in the early stage of training. We also observe that earlier layers converge faster with time, as was shown by Raghu et al. [2017].
|
| 147 |
+
|
| 148 |
+
Width: Similarly, we train models with the same architecture but varying width multipliers $\{ 0 . 2 5 \times , 1 \times , 2 \times \}$ (Figure 3C). We find that “better” models with higher width models can be stitched to those with lower width and improve performance, but not vice versa. The CKA between representations with $0 . 2 5 \times$ and $2 \times$ width multiplier is in the range $0 . 7 - 0 . 9$ (See Appendix B.2)
|
| 149 |
+
|
| 150 |
+
Taken together, these results suggest that neural networks obey a certain kind of modularity — better layers can be plugged in without needing to re-train the whole network from scratch.
|
| 151 |
+
|
| 152 |
+
# 7 Conclusion and Future Work
|
| 153 |
+
|
| 154 |
+
As our work demonstrates, model stitching can be a very useful tool to compare representations in interpretable units. Model stitching does have its limitations: it requires training a network, making it more expensive in computation than other measures such as CKA. Additionally, stitching representations from two different architectures can be tricky and requires a careful choice of the stitching family. While we restricted ourselves to stitching the first $l$ layers of a network, stitching can be used to also plug in intermediate layers or parts of layers, and in general to “assemble” a new model from a collection of pre-trained components.
|
| 155 |
+
|
| 156 |
+
There are various avenues for future research. All of our results are in the vision domain, but it would be interesting to compare representations in natural language processing, since language tasks tend to have more variety than vision tasks. It would also be interesting to study the representations of adversarially trained networks to diagnose why they lose performance in comparison to standard training. In general, we hope that model stitching will become a part of the standard diagnostic repertoire of the deep learning community. Societal impacts: This paper makes methodological and foundational contributions that do not have direct impact on society. Model stitching can potentially be used to understand and develop better representation learning mechanisms. While this could indirectly lead to future applications, it is premature to predict their positive or negative impacts.
|
| 157 |
+
|
| 158 |
+
# 8 Acknowledgements
|
| 159 |
+
|
| 160 |
+
YB is supported by IBM Global University awards program and NSF Awards IIS 1409097. PN is supported in part by a Google PhD Fellowship, the Simons Investigator Awards of Boaz Barak and Madhu Sudan, and NSF Awards under grants CCF 1565264, CCF 1715187. BB is supported by NSF award CCF 1565264, a Simons Investigator Fellowship and DARPA grant W911NF2010021. We thank MIT-IBM Watson AI Lab and John Cohn for providing access and support for the Satori compute cluster.
|
| 161 |
+
|
| 162 |
+
# References
|
| 163 |
+
|
| 164 |
+
Guillaume Alain and Yoshua Bengio. Understanding intermediate layers using linear classifier probes. arXiv preprint arXiv:1610.01644, 2016.
|
| 165 |
+
|
| 166 |
+
Yamini Bansal, Gal Kaplun, and Boaz Barak. For self-supervised learning, rationality implies generalization, provably. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id $\equiv$ Srmggo3b3X6.
|
| 167 |
+
|
| 168 |
+
Mathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal, Piotr Bojanowski, and Armand Joulin. Unsupervised learning of visual features by contrasting cluster assignments, 2021a.
|
| 169 |
+
|
| 170 |
+
Mathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou, Julien Mairal, Piotr Bojanowski, and Armand Joulin. Emerging properties in self-supervised vision transformers, 2021b.
|
| 171 |
+
|
| 172 |
+
Mark Chen, Alec Radford, Rewon Child, Jeff Wu, Heewoo Jun, Prafulla Dhariwal, David Luan, and Ilya Sutskever. Generative pretraining from pixels. 2020a.
|
| 173 |
+
|
| 174 |
+
Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations, 2020b.
|
| 175 |
+
|
| 176 |
+
Adrián Csiszárik, Péter Korösi-Szabó, Ákos K. Matszangosz, Gergely Papp, and Dániel Varga. ˝ Similarity and matching of neural network representations. Advances in Neural Information Processing Systems, 35, 2021.
|
| 177 |
+
|
| 178 |
+
Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale, 2020.
|
| 179 |
+
|
| 180 |
+
Felix Draxler, Kambis Veschgini, Manfred Salmhofer, and Fred Hamprecht. Essentially no barriers in neural network energy landscape. In International conference on machine learning, pages 1309–1318. PMLR, 2018.
|
| 181 |
+
|
| 182 |
+
Jonathan Frankle, Gintare Karolina Dziugaite, Daniel Roy, and Michael Carbin. Linear mode connectivity and the lottery ticket hypothesis. In International Conference on Machine Learning, pages 3259–3269. PMLR, 2020.
|
| 183 |
+
|
| 184 |
+
C. Daniel Freeman and Joan Bruna. Topology and geometry of half-rectified network optimization, 2017.
|
| 185 |
+
|
| 186 |
+
Timur Garipov, Pavel Izmailov, Dmitrii Podoprikhin, Dmitry Vetrov, and Andrew Gordon Wilson. Loss surfaces, mode connectivity, and fast ensembling of dnns, 2018.
|
| 187 |
+
|
| 188 |
+
Robert Geirhos, Kantharaju Narayanappa, Benjamin Mitzkus, Matthias Bethge, Felix A. Wichmann, and Wieland Brendel. On the surprising similarities between supervised and self-supervised models. CoRR, abs/2010.08377, 2020. URL https://arxiv.org/abs/2010.08377.
|
| 189 |
+
|
| 190 |
+
Gabriel Goh, Nick Cammarata $^ \dagger$ , Chelsea Voss $^ \dagger$ , Shan Carter, Michael Petrov, Ludwig Schubert, Alec Radford, and Chris Olah. Multimodal neurons in artificial neural networks. Distill, 2021. doi: 10.23915/distill.00030. https://distill.pub/2021/multimodal-neurons.
|
| 191 |
+
|
| 192 |
+
Priya Goyal, Quentin Duval, Jeremy Reizenstein, Matthew Leavitt, Min Xu, Benjamin Lefaudeux, Mannat Singh, Vinicius Reis, Mathilde Caron, Piotr Bojanowski, Armand Joulin, and Ishan Misra. Vissl. https://github.com/facebookresearch/vissl, 2021.
|
| 193 |
+
|
| 194 |
+
David R Hardoon, Sandor Szedmak, and John Shawe-Taylor. Canonical correlation analysis: An overview with application to learning methods. Neural computation, 16(12):2639–2664, 2004.
|
| 195 |
+
|
| 196 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition, 2015.
|
| 197 |
+
|
| 198 |
+
Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B. Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. Scaling laws for neural language models, 2020.
|
| 199 |
+
|
| 200 |
+
Don Komarechka. 2021. Images on https://www.macleans.ca/culture/arts/ american-canadian-snowflake-photography/.
|
| 201 |
+
|
| 202 |
+
Simon Kornblith, Mohammad Norouzi, Honglak Lee, and Geoffrey E. Hinton. Similarity of neural network representations revisited. In Kamalika Chaudhuri and Ruslan 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 3519–3529. PMLR, 2019. URL http://proceedings.mlr.press/v97/kornblith19a. html.
|
| 203 |
+
|
| 204 |
+
Nikolaus Kriegeskorte, Marieke Mur, and Peter Bandettini. Representational similarity analysis - connecting the branches of systems neuroscience. Frontiers in Systems Neuroscience, 2:4, 2008. ISSN 1662-5137. doi: 10.3389/neuro.06.004.2008. URL https://www.frontiersin.org/ article/10.3389/neuro.06.004.2008.
|
| 205 |
+
|
| 206 |
+
Karel Lenc and Andrea Vedaldi. Understanding image representations by measuring their equivariance and equivalence. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 991–999, 2015.
|
| 207 |
+
|
| 208 |
+
Hao Li, Zheng Xu, Gavin Taylor, Christoph Studer, and Tom Goldstein. Visualizing the loss landscape of neural nets. In Proceedings of the 32nd International Conference on Neural Information Processing Systems, pages 6391–6401, 2018.
|
| 209 |
+
|
| 210 |
+
Yixuan Li, Jason Yosinski, Jeff Clune, Hod Lipson, and John Hopcroft. Convergent learning: Do different neural networks learn the same representations?, 2016.
|
| 211 |
+
|
| 212 |
+
Shengchao Liu, Dimitris Papailiopoulos, and Dimitris Achlioptas. Bad global minima exist and sgd can reach them. Advances in Neural Information Processing Systems, 33, 2020.
|
| 213 |
+
|
| 214 |
+
Ari S Morcos, Maithra Raghu, and Samy Bengio. Insights on representational similarity in neural networks with canonical correlation. In NeurIPS, 2018.
|
| 215 |
+
|
| 216 |
+
Preetum Nakkiran and Yamini Bansal. Distributional generalization: A new kind of generalization. arXiv preprint arXiv:2009.08092, 2020.
|
| 217 |
+
|
| 218 |
+
Preetum Nakkiran, Behnam Neyshabur, and Hanie Sedghi. The deep bootstrap framework: Good online learners are good offline generalizers, 2021.
|
| 219 |
+
|
| 220 |
+
Thao Nguyen, Maithra Raghu, and Simon Kornblith. Do wide and deep networks learn the same things? uncovering how neural network representations vary with width and depth. ICLR, 2021.
|
| 221 |
+
|
| 222 |
+
Chris Olah, Alexander Mordvintsev, and Ludwig Schubert. Feature visualization. Distill, 2017. doi: 10.23915/distill.00007. https://distill.pub/2017/feature-visualization.
|
| 223 |
+
|
| 224 |
+
Chris Olah, Nick Cammarata, Ludwig Schubert, Gabriel Goh, Michael Petrov, and Shan Carter. An overview of early vision in inceptionv1. Distill, 2020. doi: 10.23915/distill.00024.002. https://distill.pub/2020/circuits/early-vision.
|
| 225 |
+
|
| 226 |
+
David Page. How to train your resnet. how-to-train-your-resnet-4-architecture/, 2018.
|
| 227 |
+
|
| 228 |
+
https://myrtle.ai/
|
| 229 |
+
|
| 230 |
+
Maithra Raghu, Justin Gilmer, Jason Yosinski, and Jascha Sohl-Dickstein. SVCCA: singular vector canonical correlation analysis for deep learning dynamics and interpretability. In Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, December 4-9, 2017, Long Beach, CA, USA, pages 6076–6085, 2017. URL https://proceedings.neurips.cc/paper/2017/hash/ dc6a7e655d7e5840e66733e9ee67cc69-Abstract.html.
|
| 231 |
+
|
| 232 |
+
David E Rumelhart, Geoffrey E Hinton, and Ronald J Williams. Learning internal representations by error propagation. Technical report, California Univ San Diego La Jolla Inst for Cognitive Science, 1985.
|
| 233 |
+
|
| 234 |
+
Liwei Wang, Lunjia Hu, Jiayuan Gu, Yue Wu, Zhiqiang Hu, Kun He, and John Hopcroft. Towards understanding learning representations: To what extent do different neural networks learn the same representation, 2018.
|
| 235 |
+
|
| 236 |
+
Bolei Zhou, Àgata Lapedriza, Jianxiong Xiao, Antonio Torralba, and Aude Oliva. Learning deep features for scene recognition using places database. In Neural Information Processing Systems, 2014.
|
md/train/dsmxf7FKiaY/dsmxf7FKiaY.md
ADDED
|
@@ -0,0 +1,255 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Revisiting ResNets: Improved Training and Scaling Strategies
|
| 2 |
+
|
| 3 |
+
Irwan Bello Google Brain
|
| 4 |
+
|
| 5 |
+
William Fedus Google Brain
|
| 6 |
+
|
| 7 |
+
Xianzhi Du Google Brain
|
| 8 |
+
|
| 9 |
+
Ekin D. Cubuk Google Brain
|
| 10 |
+
|
| 11 |
+
Aravind Srinivas UC Berkeley
|
| 12 |
+
|
| 13 |
+
Tsung-Yi Lin Google Brain
|
| 14 |
+
|
| 15 |
+
Jonathon Shlens Google Brain
|
| 16 |
+
|
| 17 |
+
Barret Zoph Google Brain
|
| 18 |
+
|
| 19 |
+
# Abstract
|
| 20 |
+
|
| 21 |
+
Novel computer vision architectures monopolize the spotlight, but the impact of the model architecture is often conflated with simultaneous changes to training methodology and scaling strategies. Our work revisits the canonical ResNet [13] and studies these three aspects in an effort to disentangle them. Perhaps surprisingly, we find that training and scaling strategies may matter more than architectural changes, and further, that the resulting ResNets match recent state-of-the-art models. We show that the best performing scaling strategy depends on the training regime and offer two new scaling strategies: (1) scale model depth in regimes where overfitting can occur (width scaling is preferable otherwise); (2) increase image resolution more slowly than previously recommended [55]. Using improved training and scaling strategies, we design a family of ResNet architectures, ResNetRS, which are $1 . 7 \mathrm { x } \mathrm { ~ - ~ } 2 . 7 \mathrm { x }$ faster than EfficientNets on TPUs, while achieving similar accuracies on ImageNet. In a large-scale semi-supervised learning setup, ResNet-RS achieves $8 6 . 2 \%$ top-1 ImageNet accuracy, while being $4 . 7 \mathrm { x }$ faster than EfficientNet-NoisyStudent. The training techniques improve transfer performance on a suite of downstream tasks (rivaling state-of-the-art self-supervised algorithms) and extend to video classification on Kinetics-400. We recommend practitioners use these simple revised ResNets as baselines for future research.
|
| 22 |
+
|
| 23 |
+
# 1 Introduction
|
| 24 |
+
|
| 25 |
+
The performance of a vision model is a product of the architecture, training methods and scaling strategy. Novel architectures underlie many advances, but are often simultaneously introduced with other critical – and less publicized – changes in the details of the training methodology and hyperparameters. Additionally, new architectures enhanced by modern training methods are sometimes compared to older architectures with dated training methods (e.g. ResNet-50 with ImageNet Top-1 accuracy of $7 6 . 5 \%$ [13]). Our work addresses these issues and empirically studies the impact of training methods and scaling strategies on the popular ResNet architecture [13].
|
| 26 |
+
|
| 27 |
+
We survey the modern training and regularization techniques widely in use today and apply them to ResNets (Figure 1). In the process, we encounter interactions between training methods and show a benefit of reducing weight decay values when used in tandem with other regularization techniques. An additive study of training methods in Table 1 reveals the significant impact of these decisions: a canonical ResNet-200 with $7 9 . 0 \%$ top-1 ImageNet accuracy is improved to $8 2 . 2 \%$ $( + 3 . 2 \% )$ through improved training methods alone. This is increased further to $8 3 . 4 \%$ by two small and commonly used architectural improvements: ResNet-D [15] and Squeeze-and-Excitation [21]. Figure 1 traces this refinement over the starting ResNet in a speed-accuracy Pareto curve.
|
| 28 |
+
|
| 29 |
+

|
| 30 |
+
Figure 1: Improving ResNets to state-of-the-art performance. We improve on the canonical ResNet [13] with modern training methods (as also used in EfficientNets [55]), minor architectural changes and improved scaling strategies. The resulting models, ResNet-RS, outperform EfficientNets on the speed-accuracy Pareto curve with speed-ups ranging from $1 . 7 \mathrm { x } - 2 . 7 \mathrm { x }$ on TPUs and $2 . 1 \mathbf { x } \cdot 3 . 3 \mathbf { x }$ on GPUs. ResNet (•) is a ResNet-200 trained at $2 5 6 \times 2 5 6$ resolution. Training times reported on TPUs.
|
| 31 |
+
|
| 32 |
+
We offer new perspectives and practical advice on scaling vision architectures. While prior works extrapolate scaling rules from small models [55] or from short training duration [39], we design scaling strategies by exhaustively training models across a variety of scales for the full training duration (e.g. 350 epochs instead of 10 epochs). In doing so, we uncover strong dependencies between the best performing scaling strategy and the training regime (e.g. number of epochs, model size, dataset size). These dependencies are missed in any of these smaller regimes, leading to suboptimal scaling decisions. Our analysis leads to new scaling strategies summarized as (1) scale the model depth when overfitting can occur (scaling the width is preferable otherwise) and (2) scale the image resolution more slowly than prior works [55].
|
| 33 |
+
|
| 34 |
+
Using the improved training and scaling strategies, we design a family of re-scaled ResNets, ResNet$R S$ , across model various scales (Figure 1). ResNet-RS models use less memory during training and are $1 . 7 \mathrm { x } \cdot 2 . 7 \mathrm { x }$ faster on TPUs $2 . 1 \mathrm { \mathbf { x } } \cdot 3 . 3 \mathrm { \mathbf { x } }$ faster on GPUs) than the popular EfficientNets on the speed-accuracy Pareto curve. In a large-scale semi-supervised learning setup, ResNet-RS obtains a $4 . 7 \mathbf { x }$ training speed-up on TPUs $\mathbf { 5 . 5 x }$ on GPUs) over EfficientNet-B5 when co-trained on ImageNet [30] and an additional 130M pseudo-labeled images.
|
| 35 |
+
|
| 36 |
+
Finally, we conclude with a suite of experiments testing the generality of the improved training and scaling strategies. We first demonstrate that our scaling strategy improves the speed-accuracy Pareto curve of EfficientNet. Next, we show that the improved training strategies yield representations that rival or outperform those from self-supervised algorithms (SimCLR and SimCLRv2 [4, 5]) on a suite of downstream tasks. The improved training strategies also extend to video classification, yielding an improvement from $7 3 . 4 \%$ to $7 7 . 4 \%$ $( + 4 . 0 \% )$ on the Kinetics-400 dataset.
|
| 37 |
+
|
| 38 |
+
Through combining lightweight architectural changes (used since 2018) and improved training and scaling strategies, we discover the ResNet architecture sets a state-of-the-art baseline for vision research. This finding highlights the importance of teasing apart each of these factors in order to understand what architectures perform better than others. We summarize our contributions:
|
| 39 |
+
|
| 40 |
+
• An empirical study of regularization techniques and their interplay, which leads to a training strategy that achieves strong performance (e.g. $+ 3 . 2 \%$ top-1 ImageNet accuracy, $+ 4 . 0 \%$ top-1 Kinetics-400 accuracy) without having to change the model architecture.
|
| 41 |
+
|
| 42 |
+
• An empirical study of scaling which uncovers strong dependencies between training and the best performing scaling strategy. We propose a simple scaling strategy: (1) scale depth when overfitting can occur (scaling width can be preferable otherwise) and (2) scale the image resolution more slowly than prior works [55]. This scaling strategy improves the speed-accuracy Pareto curve of both ResNets and EfficientNets. ResNet-RS: a Pareto curve of ResNet architectures that are $1 . 7 \mathrm { x } - 2 . 7 \mathrm { x }$ faster than EfficientNets on TPUs $( 2 . 1 \mathbf { x } - 3 . 3 \mathbf { x }$ on GPUs) by applying the training and scaling strategies. Semi-supervised training of ResNet-RS with an additional 130M pseudo-labeled images achieves $8 6 . 2 \%$ top-1 ImageNet accuracy, while being $4 . 7 \mathbf { x }$ faster on TPUs ( $\mathbf { 5 . 5 x }$ on GPUs) than the corresponding EfficientNet-NoisyStudent [57].
|
| 43 |
+
• Empirically show that representations obtained from supervised learning using modern training techniques rival or outperform state-of-the-art self-supervised representations (SimCLR [4], SimCLRv2 [5]) on suite of downstream computer vision tasks.
|
| 44 |
+
|
| 45 |
+
# 2 Characterizing Improvements on ImageNet
|
| 46 |
+
|
| 47 |
+
Since the breakthrough of AlexNet [30] on ImageNet [45], a wide variety of improvements have been proposed to further advance image recognition performance. These improvements broadly arise along four orthogonal axes: (a) architecture, (b) training/regularization methodology, (c) scaling strategy and (d) using additional training data.
|
| 48 |
+
|
| 49 |
+
(a) Architecture. The works that perhaps receive the most attention are novel architectures. Notable proposals since AlexNet include VGG [49], ResNet [13], Inception [52, 53], and ResNeXt [58]. Automated search strategies for designing architectures have further pushed the state-of-the-art [67, 41, 55]. There have also been efforts in going beyond standard ConvNets for image classification, by adapting self-attention [56] to the visual domain [2, 40, 20, 47, 8, 1].
|
| 50 |
+
|
| 51 |
+
(b) Training and Regularization Methods. ImageNet progress has simultaneously been boosted by innovations in training (e.g. improved learning rate schedules [34, 12]) and regularization methods, such as dropout [50], label smoothing [53], stochastic depth [22], dropblock [11] and data augmentation [61, 59, 6, 7]. Regularization methods have become especially useful to prevent overfitting when training ever-increasingly larger models [23] on limited data (e.g. 1.2M ImageNet images).
|
| 52 |
+
|
| 53 |
+
(c) Scaling Strategies. Increasing the model dimensions (width, depth and resolution) has been another successful axis to improve quality [44, 17]. ResNet architectures are typically scaled up by adding layers (depth): ResNets-18 to ResNet-200 and beyond [14, 62]. Wide ResNets [60] and MobileNets [19] instead scale the width. Increasing image resolutions consistently improves performance: EfficientNet uses 600 image resolutions [55] while both ResNeSt [62] and TResNet [43] use $4 0 0 +$ image resolutions for their largest model. In an attempt to systematize these heuristics, EfficientNet proposed the compound scaling rule, which jointly scales network depth, width and image resolution using a constant scaling factor. However, Section 7.1 shows this scaling strategy is sub-optimal for not only ResNets, but EfficientNets as well.
|
| 54 |
+
|
| 55 |
+
(d) Additional Training Data. Finally, ImageNet accuracy is commonly improved by training on additional sources of data (either labeled, weakly labeled, or unlabeled). Pre-training on large-scale datasets [51, 35, 27] has significantly pushed the state-of-the-art, with ViT [8] and NFNets [3] recently achieving $8 8 . 6 \%$ and $8 9 . 2 \%$ ImageNet accuracy respectively. Using pseudo-labels on additional unlabeled images [57, 37] in a semi-supervised learning fashion has also been a fruitful avenue for improving accuracy. We present semi-supervised learning results in Section 7.2.
|
| 56 |
+
|
| 57 |
+
# 3 Related Work
|
| 58 |
+
|
| 59 |
+
Improved training methods combined with architectural changes to ResNets have routinely yielded competitive ImageNet performance [15, 31, 43, 62, 1, 3]. [15] achieved $7 9 . 2 \%$ top-1 ImageNet accuracy (a $+ 3 \%$ improvement over their ResNet-50 baseline) by modifying the stem and downsampling block and using label smoothing and mixup. [31] further improved the ResNet-50 model with additional architectural modifications such as Squeeze-and-Excitation [21], selective kernel [32], and anti-alias downsampling [63], while also using label smoothing, mixup, and dropblock to achieve $8 1 . 4 \%$ accuracy. [43, 62] incorporate several architectural modifications to the ResNet architectures along with improved training methodologies to outperform EfficientNet models on the speed-accuracy Pareto curve on GPUs. Many prior works do remark the importance of improved training and regularization methods. However experiments are still largely concerned with architectural changes and the simultaneous introduction of improved training techniques can make it hard to identify where the gains come from1.
|
| 60 |
+
|
| 61 |
+
Additionally, due to the ever-increasing performance of machine learning accelerators, newer architectures are routinely pushed to much larger scales than the original ResNets [13]. As a result, works that propose novel architectures do not (cannot) compare against properly trained and scaled ResNets (since such a baseline did not exist), making it challenging to evaluate the significance of the proposed architectural changes compared to simple ResNets.
|
| 62 |
+
|
| 63 |
+
Lastly, prior work often puts little emphasis on studying scaling strategies or advocates for scaling strategies which we find to be sub-optimal. For example, the largest models in EfficientNet [55], TResNet [43] and ResNeSt [62] use 600, 448 and 416 image sizes respectively, which our scaling analysis reveals to be excessively large. RegNet [39] advocates for width scaling, which we find only works well when overfitting does not occur (e.g. 10 epochs).
|
| 64 |
+
|
| 65 |
+
In contrast to other works, we only consider lightweight architectural changes (that are widely used since 2018) and keep the architecture fixed. Instead, we focus exclusively on training and scaling strategies to build a Pareto curve of models. Perhaps surprisingly, we find that doing so suffices to outperform models that were introduced after ResNets: our improved training and scaling methods lead to ResNets that are significantly faster than EfficientNets on TPUs on GPUs (see Section 7.1). We note that our scaling improvements are sometimes orthogonal to the architectural innovations introduced in prior works in which case we expect them to be additive.
|
| 66 |
+
|
| 67 |
+
# 4 Methodology
|
| 68 |
+
|
| 69 |
+
Architecture. Our work studies the ResNet architecture, with two widely used architecture changes, the ResNet-D [15] modification and Squeeze-and-Excitation (SE) in all bottleneck blocks [21]. These architectural changes are used in used many architectures, including TResNet, ResNeSt and EfficientNets. The exact details of our architecture can be found in Appendix E. In our experiments, we sometimes use the original ResNet implementation without SE (referred to as ResNet) to compare different training methods. Clear denotations are made in table captions when this is the case.
|
| 70 |
+
|
| 71 |
+
Regularization and Data Augmentation. We apply weight decay, label smoothing, dropout and stochastic depth for regularization. Dropout [50] is a common technique used in computer vision and we apply it to the output after the global average pooling occurs in the final layer. Stochastic depth [22] drops out each layer in the network (that has residual connections around it) with a specified probability that is a function of the layer depth. We use RandAugment [7] data augmentation as an additional regularizer. RandAugment applies a sequence of random image transformations (e.g. translate, shear, color distortions) to each image independently during training. Our training method closely matches that of EfficientNet, where we train for 350 epochs, but with a few small differences (e.g. we use Momentum with cosine learning rate schedule as opposed to RMSProp with exponential decay). See Appendix D for details.
|
| 72 |
+
|
| 73 |
+
Hyperparameter Tuning. To select the hyperparameters for the various regularization and training methods, we use a held-out validation set comprising $2 \%$ of the ImageNet training set (20 shards out of 1024). This is referred to as the minival-set and the original ImageNet validation set (the one reported in most prior works) is referred to as validation-set. Unless specified otherwise, results are reported on the validation-set. The hyperparameters of all ResNet-RS models are in Table 8 in the Appendix C.
|
| 74 |
+
|
| 75 |
+
# 5 Improved Training Methods
|
| 76 |
+
|
| 77 |
+
# 5.1 Additive Study of Improvements
|
| 78 |
+
|
| 79 |
+
We present an additive study of training, regularization methods and architectural changes in Table 1 (left). The baseline ResNet-200 gets $7 9 . 0 \%$ top-1 accuracy. We improve its performance to $8 2 . 2 \%$ $( + 3 . 2 \% )$ through improved training methods alone without any architectural changes. Adding two common and simple architectural changes (Squeeze-and-Excitation and ResNet-D) further boosts the performance to $8 3 . 4 \%$ . Training methods alone cause $3 / 4$ of the total improvement, which demonstrates their critical impact on ImageNet performance.
|
| 80 |
+
|
| 81 |
+
<table><tr><td rowspan=1 colspan=6>Improvements</td><td rowspan=1 colspan=1>Top-1 △</td></tr><tr><td rowspan=1 colspan=6>ResNet-200-256x256</td><td rowspan=1 colspan=1>79.0</td></tr><tr><td rowspan=1 colspan=6> + Cosine LR Decay</td><td rowspan=2 colspan=1>79.3 +0.378.8+ -0.5</td></tr><tr><td rowspan=1 colspan=5> + Increase training epochs</td><td rowspan=1 colspan=1> + Increase training epochs</td></tr><tr><td rowspan=2 colspan=4> + EMA of weights + Label Smoothing</td><td rowspan=1 colspan=2>weights</td><td rowspan=1 colspan=1>79.1 +0.3</td></tr><tr><td rowspan=1 colspan=4>Smoothing</td><td rowspan=1 colspan=1>80.4 +1.3</td></tr><tr><td rowspan=1 colspan=1>+StC</td><td></td><td rowspan=1 colspan=4>+ Stochastic Depth</td><td rowspan=1 colspan=1>80.6 +0.2</td></tr><tr><td rowspan=1 colspan=1>+Ran</td><td></td><td rowspan=1 colspan=4>lugment</td><td rowspan=1 colspan=1>81.0 +0.4</td></tr><tr><td rowspan=2 colspan=6> + Dropout on FC+ Decrease weight decay</td><td rowspan=1 colspan=1> + Dropout on FC</td></tr><tr><td rowspan=1 colspan=1>82.2 +1.5</td></tr><tr><td rowspan=2 colspan=6>+ Squeeze-and-Excitation+ ResNet-D</td><td rowspan=1 colspan=1>82.9 +0.7</td></tr><tr><td rowspan=1 colspan=1>83.4 +0.5</td></tr></table>
|
| 82 |
+
|
| 83 |
+
<table><tr><td>Model</td><td>Regularization</td><td>Weight Decay 1e-4</td><td>4e-5</td></tr><tr><td>ResNet-50 ResNet-50 ResNet-50</td><td>None RA-LS RA-LS-DO</td><td>79.7 82.4 82.2</td><td>78.7 (-1.0) 82.3 (-0.1) 82.7 (+0.5)</td></tr><tr><td>ResNet-200 ResNet-200</td><td>None RA-LS</td><td>82.5 85.2</td><td>81.7 (-0.8) 84.9 (-0.3)</td></tr><tr><td>ResNet-200</td><td>RA-LS-SD-DO</td><td>85.3</td><td>85.5 (+0.2)</td></tr></table>
|
| 84 |
+
|
| 85 |
+
Table 1: (Left) Additive study of training , regularization and architecture improvements. The baseline ResNet-200 is trained at resolution $2 5 6 \times 2 5 6$ for the standard 90 epochs using a stepwise learning rate decay schedule. All numbers are reported on the ImageNet validation-set and averaged over 2 runs. † Increasing training duration to 350 epochs only becomes useful once the regularization methods are used, otherwise the accuracy drops due to over-fitting. ‡ dropout hurts as we have not yet decreased the weight decay. (Right) Decreasing weight decay improves performance when combining regularization methods such as dropout (DO), stochastic depth (SD), label smoothing (LS) and RandAugment (RA). Image resolution is $2 2 4 \times 2 2 4$ for ResNet-50 and $2 5 6 \times 2 5 6$ for ResNet-200. All numbers are reported on the ImageNet minival-set from an average of two runs.
|
| 86 |
+
|
| 87 |
+
# 5.2 Importance of decreasing weight decay when combining regularization methods
|
| 88 |
+
|
| 89 |
+
Table 1 (right) highlights the importance of changing weight decay when combining regularization methods together. When applying RandAugment and label smoothing, there is no need to change the default weight decay of 1e-4. But when we further add dropout and/or stochastic depth, the performance can decrease unless we further decrease the weight decay. The intuition is that since weight decay acts as a regularizer, its value must be decreased in order to not overly regularize the model when combining many techniques. Furthermore, [65] presents evidence that the addition of data augmentation shrinks the L2 norm of the weights, which renders some of the effects of weight decay redundant. Other works use smaller weight decay values, but do not point out the significance of the effect when using more regularization [54, 55].
|
| 90 |
+
|
| 91 |
+
# 6 Improved Scaling Strategies
|
| 92 |
+
|
| 93 |
+
The prior section demonstrates the significant impact of training methodology and we now show the scaling strategy is similarly important. In order to establish scaling trends, we perform an extensive search on ImageNet over width multipliers in $[ 0 , 2 5 , 0 . 5 , 1 . 0 , 1 . 5 , 2 . 0 ]$ , depths of $[ 2 6 , 5 0 , 1 0 1 , 2 0 0 , 3 0 0 , 3 5 0 , 4 0 0 ]$ and resolutions of $\{ 1 2 8 , 1 6 0 , 2 2 4 , 3 2 0 , 4 4 8$ ]. We train these architectures for 350 epochs, mimicking the training setup of state-of-the-art ImageNet models, and increase regularization with model size in an effort to limit overfitting. See Appendix F for regularization and model hyperparameters.
|
| 94 |
+
|
| 95 |
+
FLOPs do not accurately predict performance in the bounded data regime. Prior works on scaling laws observe a power law between error and FLOPs in unbounded data regimes [25, 16]. In order to test whether this also holds in our scenario, we plot ImageNet error against FLOPs for all scaling configurations in Figure 2.
|
| 96 |
+
|
| 97 |
+
For the smaller models, we observe an overall power law trend between error and FLOPs, with minor dependency on the scaling configuration (i.e. depth, width and image resolution). However, the trend breaks for larger model sizes and we observe a large variation in ImageNet performance for a fixed amount of FLOPs, especially in the higher FLOP regime. Therefore the exact scaling configuration (i.e. depth, width and image resolution) can have a big impact on performance even when controlling for the same amount of FLOPs.
|
| 98 |
+
|
| 99 |
+

|
| 100 |
+
Figure 2: Scaling properties of ResNets across varying model scales. Error approximately scales as a power law with FLOPs (linear fit on the log-log curve) in the lower FLOPs regime but the trend breaks for larger FLOPs. We observe diminishing returns of scaling the image resolutions beyond $3 2 0 \times 3 2 0$ , which motivates the slow image resolution scaling (Strategy #2). All results are on the ImageNet minival-set.
|
| 101 |
+
|
| 102 |
+
The best performing scaling strategy depends on the training regime. We next look directly at latencies2 on the hardware of interest to identify scaling strategies that improve the speed-accuracy Pareto curve. Figure 3 presents accuracies and latencies of models scaled with either width or depth across four image resolutions and three different training regimes (10, 100 and 350 epochs). We observe that the best performing scaling strategy, especially whether to scale depth and/or width, highly depends on the training regime.
|
| 103 |
+
|
| 104 |
+
# 6.1 Strategy #1 - Depth Scaling in Regimes Where Overfitting Can Occur
|
| 105 |
+
|
| 106 |
+
Depth scaling outperforms width scaling for longer epoch regimes. In the 350 epochs setup (Figure 3 - right), we observe depth scaling to significantly outperform width scaling across all image resolutions. Scaling the width is subject to overfitting and sometimes hurts performance even with increased regularization. We hypothesize that this is due to the larger increase in parameters when scaling the width. The ResNet architecture maintains constant FLOPs across all block groups and multiplies the number of parameters by $4 \times$ every block group. Scaling the depth, especially in the earlier layers, therefore introduces fewer parameters compared to scaling the width.
|
| 107 |
+
|
| 108 |
+
Width scaling outperforms depth scaling for shorter epoch regimes. In contrast, width scaling is better when only training for 10 epochs (Figure 3 - left). For 100 epochs (Figure 3 - middle), the best performing scaling strategy varies between depth scaling and width scaling, depending on the image resolution. The dependency of the scaling strategy on the training regime reveals a pitfall of extrapolating scaling rules. We point out that prior works also choose to scale the width when training for a small number of epochs on large-scale datasets (e.g. ${ \sim } 4 0$ epochs on 300M images), consistent with our experimental findings that scaling the width is preferable in shorter epoch regimes. In particular, [27] train a ResNet-152 with 4x filter multiplier while [3] scales the width with ${ \sim } 1 . 5 \mathrm { x }$ filter multiplier.
|
| 109 |
+
|
| 110 |
+
# 6.2 Strategy #2 - Slow Image Resolution Scaling
|
| 111 |
+
|
| 112 |
+
In Figure 2, we also observe that larger image resolutions yield diminishing returns. We therefore propose to increase the image resolution more gradually than previous works. This contrasts with the compound scaling rule proposed by EfficientNet which leads to very large images (e.g. 600 for EfficientNet-B7, 800 for EfficientNet-L2 [57]). Other works such as ResNeSt [62] and TResNet [43]) scale the image resolution up to $4 0 0 +$ . Our experiments indicate that slower image scaling improves not only ResNet architectures, but also EfficientNets on a speed-accuracy basis (Section 7.1).
|
| 113 |
+
|
| 114 |
+

|
| 115 |
+
Figure 3: Scaling of ResNets across depth, width, image resolution and training epochs. We compare depth scaling and width scaling across four different image resolutions [128,160,224,320] when training models for 10, 100 or 350 epochs. We find that the best performing scaling strategy depends on the training regime, which reveals the pitfall of extrapolating scaling rules from small scale regimes. (Left) 10 Epoch Regime: width scaling is the best strategy for the speed-accuracy Pareto curve. (Middle) 100 Epoch Regime: depth scaling is sometimes outperformed by width scaling. (Right) 350 Epoch Regime: depth scaling consistently outperforms width scaling by a large margin. Overfitting remains an issue even when using regularization methods. Model Details: All models start from a depth of 101 and are increased through [101,200,300,400]. All model widths start with a multiplier of $\boldsymbol { \perp } \cdot \boldsymbol { 0 } \mathbf { x }$ and are increased through $[ 1 . 0 , 1 . 5 , 2 . 0 ]$ . For all models, we tune regularization in an effort to limit overfitting (see Appendix F). Accuracies are reported on the ImageNet minival-set and training times are measured on TPUs.
|
| 116 |
+
|
| 117 |
+
# 6.3 Designing Scaling Strategies
|
| 118 |
+
|
| 119 |
+
Our scaling analysis surfaces two common pitfalls in prior research on scaling strategies.
|
| 120 |
+
|
| 121 |
+
Pitfall #1: Extrapolating scaling strategies from small-scale regimes. Scaling strategies found in small scale regimes (e.g. on small models or with few training epochs) can fail to generalize to larger models or longer training iterations. The dependencies between the best performing scaling strategy and the training regime are missed by prior works which extrapolate scaling rules from either small models [55] or shorter training epochs [39]. We therefore do not recommend generating scaling rules exclusively in a small scale regime because these rules can break down.
|
| 122 |
+
|
| 123 |
+
Pitfall #2: Extrapolating scaling strategies from a single and potentially sub-optimal initial architecture. Beginning from a sub-optimal initial architecture can skew the scaling results. For example, the compound scaling rule derived from a small grid search around EfficientNet-B0, which was obtained by architecture search using a fixed FLOPs budget and a specific image resolution. However, since this image resolution can be sub-optimal for that FLOPs budget, the resulting scaling strategy can be sub-optimal. In contrast, our work designs scaling strategies by training models across a variety of widths, depths and image resolutions.
|
| 124 |
+
|
| 125 |
+
Summary of Improved Scaling Strategies. For image classification, the scaling strategies are summarized as (1) scale the depth in regimes where overfitting can occur (scaling the width is preferable otherwise) and (2) slow image resolution scaling. Experiments indicate that applying these scaling strategies to ResNets (ResNet-RS) and EfficientNets (EfficientNet-RS) leads to significant speed-ups over EfficientNets. We note that similar scaling strategies are also employed in recent works that obtain large speed-ups over EfficientNets such as LambdaResNets [1] and NFNets [3]. For a new task, we recommend running a small subset of models across different scales, for the full training epochs, to gain intuition on which dimensions are the most useful across model scales. While this approach may appear more costly, we point out that the cost is offset by not searching for the architecture.
|
| 126 |
+
|
| 127 |
+
# 7 Experiments with Improved Training and Scaling Strategies
|
| 128 |
+
|
| 129 |
+
# 7.1 ResNet-RS on a Speed-Accuracy Basis
|
| 130 |
+
|
| 131 |
+
Using the improved training and scaling strategies, we design ResNet-RS, a family of re-scaled ResNets across a wide range of model scales (see Appendix C and E for experimental and architectural details). Figure 4 and Table 2 compare EfficientNets against ResNet-RS on a speed-accuracy Pareto curve. We find that ResNet-RS match EfficientNets’ performance while being $1 . 7 \mathrm { x } - 2 . 7 \mathrm { x }$ faster on TPUs $2 . 1 \mathbf { x } - 3 . 3 \mathbf { x }$ faster on GPUs). We point that these speed-ups are superior to those obtained by TResNest and $\mathrm { R e s N e S t } ^ { 3 }$ , suggesting that ResNet-RS also outperform TResNet and ResNeSt.
|
| 132 |
+
|
| 133 |
+

|
| 134 |
+
Figure 4: Speed-Accuracy Pareto curve comparing ResNets-RS to EfficientNet. ResNet-RS (annotated with depth - image resolution) are $1 . 7 \mathrm { x } - 2 . 7 \mathrm { x }$ faster than the popular EfficientNets when closely matching their training setup. Although ResNet-RS has more parameters and FLOPs, the model employs less memory and runs faster on TPUs and GPUs. See Appendix C and I for more results and profiling details.
|
| 135 |
+
|
| 136 |
+
Table 2: Details of ResNet-RS models in Pareto curve. See Table 8 for hyperparameters and Section I for profiling details.
|
| 137 |
+
|
| 138 |
+
<table><tr><td>Model</td><td>Image Resolution</td><td>Params (M)</td><td>FLOPs (B)</td><td>V100 Latency (s)</td><td>TPUv3 Latency (ms)</td><td>Top-1</td></tr><tr><td>EfficientNet-B0</td><td>224</td><td>5.3</td><td>0.8</td><td>0.47</td><td>90</td><td>77.1</td></tr><tr><td>EfficientNet-B1</td><td>240</td><td>7.8</td><td>1.4</td><td>0.82</td><td>150</td><td>79.1</td></tr><tr><td>ResNet-RS-50</td><td>160</td><td>36</td><td>4.6</td><td>0.31</td><td>70</td><td>78.8</td></tr><tr><td>EfficientNet-B2</td><td>260</td><td>9.2</td><td>2.0</td><td>1.03</td><td>210</td><td>80.1</td></tr><tr><td>ResNet-RS-101</td><td>160</td><td>64</td><td>8.4</td><td>0.48 (2.1x)</td><td>120 (1.8x)</td><td>80.3</td></tr><tr><td>EfficientNet-B3</td><td>300</td><td>12</td><td>3.6</td><td>1.76</td><td>340</td><td>81.6</td></tr><tr><td>ResNet-RS-101</td><td>192</td><td>64</td><td>12</td><td>0.70</td><td>170</td><td>81.2</td></tr><tr><td>ResNet-RS-152</td><td>192</td><td>87</td><td>18</td><td>0.99</td><td>240</td><td>82.0</td></tr><tr><td>EfficientNet-B4</td><td>380</td><td>19</td><td>8.4</td><td>4.0</td><td>710</td><td>82.9</td></tr><tr><td>ResNet-RS-152</td><td>224</td><td>87</td><td>24</td><td>1.48 (2.7x)</td><td>320 (2.2×)</td><td>82.8</td></tr><tr><td>ResNet-RS-152</td><td>256</td><td>87</td><td>31</td><td>1.76 (2.3x)</td><td>410 (1.7x)</td><td>83.0</td></tr><tr><td>EfficientNet-B5</td><td>456</td><td>30</td><td>20</td><td>8.16</td><td>1510</td><td>83.7</td></tr><tr><td>ResNet-RS-200</td><td>256</td><td>93</td><td>40</td><td>2.86</td><td>570</td><td>83.4</td></tr><tr><td>ResNet-RS-270</td><td>256</td><td>130</td><td>54</td><td>3.76 (2.2x)</td><td>780 (1.9x)</td><td>83.8</td></tr><tr><td>EfficientNet-B6</td><td>528</td><td>43</td><td>38</td><td>15.7</td><td>3010</td><td>84.0</td></tr><tr><td>ResNet-RS-350</td><td>256</td><td>164</td><td>69</td><td>4.72 (3.3x)</td><td>1100 (2.7×)</td><td>84.0</td></tr><tr><td>EfficientNet-B7</td><td>600</td><td>66</td><td>74</td><td>29.9</td><td>6020</td><td>84.7</td></tr><tr><td>ResNet-RS-350</td><td>320</td><td>164</td><td>107</td><td>8.48</td><td>1630</td><td>84.2</td></tr><tr><td>ResNet-RS-420</td><td>320</td><td>192</td><td>128</td><td>10.16</td><td>2090</td><td>84.4</td></tr></table>
|
| 139 |
+
|
| 140 |
+
This large speed-up over EfficientNet may be non-intuitive since EfficientNets have significantly reduced parameters and FLOPs compared to ResNets. We next discuss why a model with fewer parameters and fewer FLOPs (EfficientNet) is slower and more memory-intensive during training.
|
| 141 |
+
|
| 142 |
+
FLOPs vs Latency. While FLOPs provide a hardware-agnostic metric for assessing computational demand, they may not be indicative of actual latency times for training and inference [19, 18, 39]. In custom hardware architectures (e.g. TPUs and GPUs), FLOPs are an especially poor proxy because operations are often bounded by memory access costs and have different levels of optimization on modern matrix multiplication units [24]. The inverted bottlenecks [46] used in EfficientNets employ depthwise convolutions with large activations and have a small compute to memory ratio (operational intensity) compared to the ResNet’s bottleneck blocks which employ dense convolutions on smaller activations. This makes EfficientNets less efficient on modern accelerators compared to ResNets.
|
| 143 |
+
|
| 144 |
+
Figure 4 (table on the right) illustrates this point: a ResNet-RS model with 1.8x more FLOPs than EfficientNet-B6 is $2 . 7 \mathbf { x }$ faster on a TPUv3 hardware accelerator.
|
| 145 |
+
|
| 146 |
+
Parameters vs Memory. Parameter count does not necessarily dictate memory consumption during training because memory is often dominated by the size of the activations4. The large activations used in EfficientNets also cause larger memory consumption, which is exacerbated by the use of large image resolutions, compared to our re-scaled ResNets. A ResNet-RS model with $\mathbf { 3 . 8 x }$ more parameters than EfficientNet-B6 consumes $\mathbf { \nabla } ^ { 2 . 3 \mathbf { x } }$ less memory for a similar ImageNet accuracy (Table in Figure 4). We emphasize that both memory consumption and latency are tightly coupled to the software and hardware stack (TensorFlow on TPUv3) due to compiler optimizations such as operation layout assignments and memory padding.
|
| 147 |
+
|
| 148 |
+
Improving scaling of EfficientNets The scaling analysis from Section 6 reveals that scaling the image resolution results in diminishing returns. This suggests that the compound scaling rule advocated in EfficientNet which jointly increases model depth, width and resolution at a constant rate is sub-optimal. To test this hypothesis, we apply the slow image resolution scaling strategy (Strategy #2) to EfficientNets and train several versions with reduced image resolutions, without changing the width or depth. Figure 5 (Appendix) demonstrates a marked improvement of the re-scaled EfficientNets (EfficientNet-RS) on the speed-accuracy Pareto curve over the original EfficientNets.
|
| 149 |
+
|
| 150 |
+
# 7.2 Semi-Supervised Learning with ResNet-RS
|
| 151 |
+
|
| 152 |
+
We next measure how ResNet-RS performs as we scale to larger datasets in a large scale semisupervised learning setup. We train ResNets-RS on the combination of 1.3M labeled ImageNet images and 130M pseudo-labeled images, in a similar fashion to Noisy Student [57]. We use the same dataset of 130M images pseudo-labeled as Noisy Student, where the pseudo labels are generated from an EfficientNet-L2 model with $8 8 . 4 \%$ ImageNet accuracy.
|
| 153 |
+
|
| 154 |
+
Models are jointly trained on both the labeled and pseudo-labeled data and training hyperparameters are kept the same. Table 3 reveals that ResNet-RS models are very strong in the semi-supervised learning setup as well, achieving a strong $8 6 . 2 \%$ top-1 ImageNet accuracy while being $4 . 7 \mathbf { x }$ faster on TPU ( ${ \bf 5 . 5 x }$ on GPU) than the corresponding EfficientNet model.
|
| 155 |
+
|
| 156 |
+
Table 3: ResNet-RS are efficient semi-supervised learners. ResNet-RS-152 with image resolution 224 is $4 . 7 \mathbf { x }$ faster on TPU (5.5x on GPU) than EfficientNet-B5 Noisy Student for a similar ImageNet accuracy.
|
| 157 |
+
|
| 158 |
+
<table><tr><td>Model</td><td>V100 (s)</td><td>TPUv3 (ms)</td><td>Top-1</td></tr><tr><td>EfficientNet-B5</td><td>8.16</td><td>1510</td><td>86.1</td></tr><tr><td>ResNet-RS-152</td><td>1.48 (5.5x)</td><td>320 (4.7x)</td><td>86.2</td></tr></table>
|
| 159 |
+
|
| 160 |
+
# 7.3 Transfer Learning to Downstream Tasks with ResNet-RS
|
| 161 |
+
|
| 162 |
+
We now investigate whether the improved supervised training strategies yield better representations for transfer learning and compare them with self-supervised learning algorithms. Recent selfsupervised learning algorithms claim to surpass the transfer learning performance of supervised learning and create more universal representations [4, 5]. Self-supervised algorithms, however, make several changes to the training methods (e.g training for more epochs, data augmentation) making comparisons to supervised learning difficult.
|
| 163 |
+
|
| 164 |
+
Fairly comparing supervised learning and self-supervised learning. In an effort to closely match SimCLR’s training setup and provide fair comparisons, we restrict the RS training strategies to a subset of its original methods. Specifically, we train for for 400 epochs with cosine learning rate decay, data augmentation (RandAugment), label smoothing, dropout and decreased weight decay but do not use stochastic depth or exponential moving average (EMA) of the weights. We choose this subset to closely match the training setup of SimCLR: longer training (800 epochs) with cosine learning rate decay, a tailored data augmentation strategy, a tuned temperature parameter in the contrastive loss and a tuned weight decay.
|
| 165 |
+
|
| 166 |
+
Table 4 compares the transfer performance of supervised learning with or without improved training strategies (respectively denoted RS and Supervised) against SimCLR/SimCLRv2 [4, 5] on five downstream tasks: CIFAR-100 Classification [29], Pascal Detection & Segmentation [9], ADE Segmentation [64] and NYU Depth [48]. Our experiments demonstrate that the improved training strategies significantly improve transfer performance, in line with works that observe that higher ImageNet accuracy strongly correlates with improved transfer learning performance [28]. Furthermore, we find that the improved supervised representations (RS) rival or outperform SimCLR/SimCLRv2, even when restricted to a smaller subset. These results challenge the notion that self-supervised algorithms lead to more universal representations than supervised learning when labels are available.
|
| 167 |
+
|
| 168 |
+
Table 4: Representations from supervised learning with improved training strategies rival or outperform representations from state-of-the-art self-supervised learning algorithms. Comparison of supervised training methods (supervised, RS) and self-supervised methods (SimCLR, SimCLRv2) on a variety of downstream tasks. The improved training strategies (RS) greatly outperforms the baseline supervised training, which highlights the importance of using improved supervised training techniques when comparing to self-supervised learning algorithms. All models employ the vanilla ResNet architecture and are pre-trained on ImageNet.
|
| 169 |
+
|
| 170 |
+
<table><tr><td>Model</td><td>Training Method</td><td>Epochs</td><td>CIFAR-100 Accuracy</td><td>Pascal Detection</td><td>Pascal Segmentation</td><td>ADE Segmentation</td><td>NYU Depth</td></tr><tr><td>ResNet-152</td><td>Supervised</td><td>90</td><td>85.5</td><td>80.0</td><td>70.0</td><td>40.2</td><td>81.2</td></tr><tr><td>ResNet-152</td><td>SimCLR</td><td>800</td><td>87.1</td><td>83.3</td><td>72.2</td><td>41.0</td><td>83.5</td></tr><tr><td>ResNet-152</td><td>SimCLRv2</td><td>800</td><td>84.7</td><td>79.1</td><td>73.1</td><td>41.1</td><td>84.7</td></tr><tr><td>ResNet-152</td><td>RS</td><td>400</td><td>88.1</td><td>82.2</td><td>78.2</td><td>42.2</td><td>83.4</td></tr></table>
|
| 171 |
+
|
| 172 |
+
# 7.4 Revised 3D ResNet for Video Classification
|
| 173 |
+
|
| 174 |
+
We conclude by applying the training strategies to the Kinetics-400 video classification task [26], using a 3D ResNet as the baseline architecture [38]. Table 5 presents an additive study of the RS training recipe and architectural improvements. The training strategies extend to video classification, yielding a combined improvement from $7 3 . 4 \%$ to $7 7 . 4 \%$ $( + 4 . 0 \% )$ . The ResNetD and Squeeze-and-Excitation architectural changes further improve the performance to $7 8 . 2 \%$ $( + 0 . 8 \% )$ Similarly to our study on image classification (Table 1), we find that most of the improvement can be obtained without architectural changes.
|
| 175 |
+
|
| 176 |
+
Table 5: Additive study of regularization , training and architecture improvements with 3D-ResNet on video classification.
|
| 177 |
+
|
| 178 |
+
<table><tr><td rowspan=1 colspan=2>Improvements</td><td rowspan=1 colspan=1>Top-1 △</td></tr><tr><td rowspan=1 colspan=2>3D ResNet-50</td><td rowspan=1 colspan=1>73.4 1</td></tr><tr><td rowspan=1 colspan=2> + Dropout on FC</td><td rowspan=1 colspan=1>74.4 +1.0</td></tr><tr><td rowspan=2 colspan=2> + Label smoothing+ Stochastic depth</td><td rowspan=1 colspan=1>74.9 +0.5</td></tr><tr><td rowspan=2 colspan=1>76.1 +1.276.1 1</td></tr><tr><td rowspan=1 colspan=1>+EMA</td><td rowspan=1 colspan=1>ofweights</td></tr><tr><td rowspan=1 colspan=2>+ Decrease weight decay</td><td rowspan=1 colspan=1>76.3 +0.2</td></tr><tr><td rowspan=1 colspan=2> + Increase training epochs</td><td rowspan=1 colspan=1>76.4 +0.1</td></tr><tr><td rowspan=1 colspan=2> + Scale jittering</td><td rowspan=1 colspan=1>77.4 +1.0</td></tr><tr><td rowspan=1 colspan=2>+ Squeeze-and-Excitation+ ResNet-D</td><td rowspan=1 colspan=1>77.9 +0.578.2 +0.3</td></tr></table>
|
| 179 |
+
|
| 180 |
+
# 8 Conclusion
|
| 181 |
+
|
| 182 |
+
By updating the de facto vision baseline with modern training methods and an improved scaling strategy, we have revealed the remarkable durability of the ResNet architecture. Simple architectures set strong baselines for state-of-the-art methods: the accuracy gains that motivate complicated architectural changes may be surpassed with thoughtful scaling and training strategies. Our work suggests that the field has myopically overemphasized architectural innovations at the expense of experimental diligence, and we hope it encourages further scrutiny in maintaining consistent methodology for both proposed innovations and baselines alike. We do not foresee any negative societal impact of our work. We include further discussion in the Appendix B.
|
| 183 |
+
|
| 184 |
+
Acknowledgements. We would like to thank Ashish Vaswani, Prajit Ramachandran, Ting Chen, Thang Luong, Hanxiao Liu, Gabriel Bender, Quoc Le, Neil Houlsby, Mingxing Tan, Andrew Howard, Raphael Gontijo Lopes, Andy Brock and David Berthelot for helpful feedback on this work; Jing Li, Pengchong Jin, Yeqing Li and Yin Cui for the support on open-sourcing and infrastructure.
|
| 185 |
+
|
| 186 |
+
# References
|
| 187 |
+
|
| 188 |
+
[1] I. Bello. Lambdanetworks: Modeling long-range interactions without attention. International Conference in Learning Representations, 2021.
|
| 189 |
+
[2] I. Bello, B. Zoph, A. Vaswani, J. Shlens, and Q. V. Le. Attention augmented convolutional networks. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 3286–3295, 2019.
|
| 190 |
+
[3] A. Brock, S. De, S. L. Smith, and K. Simonyan. High-performance large-scale image recognition without normalization. arXiv preprint arXiv: 2102.06171, 2021.
|
| 191 |
+
[4] T. Chen, S. Kornblith, M. Norouzi, and G. Hinton. A simple framework for contrastive learning of visual representations. In International conference on machine learning, pages 1597–1607. PMLR, 2020.
|
| 192 |
+
[5] T. Chen, S. Kornblith, K. Swersky, M. Norouzi, and G. Hinton. Big self-supervised models are strong semi-supervised learners. arXiv preprint arXiv:2006.10029, 2020.
|
| 193 |
+
[6] E. D. Cubuk, B. Zoph, D. Mane, V. Vasudevan, and Q. V. Le. Autoaugment: Learning augmentation policies from data. arXiv preprint arXiv:1805.09501, 2018.
|
| 194 |
+
[7] E. D. Cubuk, B. Zoph, J. Shlens, and Q. V. Le. Randaugment: Practical automated data augmentation with a reduced search space. arXiv preprint arXiv:1909.13719, 2019.
|
| 195 |
+
[8] A. Dosovitskiy, L. Beyer, A. Kolesnikov, D. Weissenborn, X. Zhai, T. Unterthiner, M. Dehghani, M. Minderer, G. Heigold, S. Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929, 2020.
|
| 196 |
+
[9] M. Everingham, L. Van Gool, C. K. Williams, J. Winn, and A. Zisserman. The pascal visual object classes (voc) challenge. International journal of computer vision, 88(2):303–338, 2010.
|
| 197 |
+
[10] C. Feichtenhofer, H. Fan, J. Malik, and K. He. Slowfast networks for video recognition. 2019 IEEE/CVF International Conference on Computer Vision (ICCV), pages 6201–6210, 2019.
|
| 198 |
+
[11] G. Ghiasi, T.-Y. Lin, and Q. V. Le. Dropblock: A regularization method for convolutional networks. In Advances in Neural Information Processing Systems, pages 10727–10737, 2018.
|
| 199 |
+
[12] P. Goyal, P. Dollár, R. Girshick, P. Noordhuis, L. Wesolowski, A. Kyrola, A. Tulloch, Y. Jia, and K. He. Accurate, large minibatch sgd: Training imagenet in 1 hour. arXiv preprint arXiv:1706.02677, 2017.
|
| 200 |
+
[13] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. arXiv preprint arXiv:1512.03385, 2015.
|
| 201 |
+
[14] K. He, X. Zhang, S. Ren, and J. Sun. Identity mappings in deep residual networks. arXiv preprint arXiv:1603.05027, 2016.
|
| 202 |
+
[15] T. He, Z. Zhang, H. Zhang, Z. Zhang, J. Xie, and M. Li. Bag of tricks for image classification with convolutional neural networks. arXiv preprint arXiv:1812.01187, 2018.
|
| 203 |
+
[16] T. Henighan, J. Kaplan, M. Katz, M. Chen, C. Hesse, J. Jackson, H. Jun, T. B. Brown, P. Dhariwal, S. Gray, et al. Scaling laws for autoregressive generative modeling. arXiv preprint arXiv:2010.14701, 2020.
|
| 204 |
+
[17] J. Hestness, S. Narang, N. Ardalani, G. Diamos, H. Jun, H. Kianinejad, M. M. A. Patwary, Y. Yang, and Y. Zhou. Deep learning scaling is predictable, empirically. arXiv preprint arXiv: 1712.00409, 2017.
|
| 205 |
+
[18] A. Howard, M. Sandler, G. Chu, L.-C. Chen, B. Chen, M. Tan, W. Wang, Y. Zhu, R. Pang, V. Vasudevan, et al. Searching for mobilenetv3. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 1314–1324, 2019.
|
| 206 |
+
[19] A. G. Howard, M. Zhu, B. Chen, D. Kalenichenko, W. Wang, T. Weyand, M. Andreetto, and H. Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv preprint arXiv:1704.04861, 2017.
|
| 207 |
+
[20] H. Hu, Z. Zhang, Z. Xie, and S. Lin. Local relation networks for image recognition. arXiv preprint arXiv:1904.11491, 2019.
|
| 208 |
+
[21] J. Hu, L. Shen, and G. Sun. Squeeze-and-excitation networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 7132–7141, 2018.
|
| 209 |
+
[22] G. Huang, Y. Sun, Z. Liu, D. Sedra, and K. Q. Weinberger. Deep networks with stochastic depth. In European conference on computer vision, pages 646–661. Springer, 2016.
|
| 210 |
+
[23] Y. Huang, Y. Cheng, A. Bapna, O. Firat, M. X. Chen, D. Chen, H. Lee, J. Ngiam, Q. V. Le, Y. Wu, et al. Gpipe: Efficient training of giant neural networks using pipeline parallelism. arXiv preprint arXiv:1811.06965, 2018.
|
| 211 |
+
[24] N. P. Jouppi, C. Young, N. Patil, D. Patterson, G. Agrawal, R. Bajwa, S. Bates, S. Bhatia, N. Boden, A. Borchers, et al. In-datacenter performance analysis of a tensor processing unit. In Proceedings of the 44th annual international symposium on computer architecture, pages 1–12, 2017.
|
| 212 |
+
[25] J. Kaplan, S. McCandlish, T. Henighan, T. B. Brown, B. Chess, R. Child, S. Gray, A. Radford, J. Wu, and D. Amodei. Scaling laws for neural language models. arXiv preprint arXiv:2001.08361, 2020.
|
| 213 |
+
[26] W. Kay, J. Carreira, K. Simonyan, B. Zhang, C. Hillier, S. Vijayanarasimhan, F. Viola, T. Green, T. Back, A. Natsev, M. Suleyman, and A. Zisserman. The kinetics human action video dataset. ArXiv, abs/1705.06950, 2017.
|
| 214 |
+
[27] A. Kolesnikov, L. Beyer, X. Zhai, J. Puigcerver, J. Yung, S. Gelly, and N. Houlsby. Big transfer (bit): General visual representation learning. arXiv preprint arXiv:1912.11370, 6(2):8, 2019.
|
| 215 |
+
[28] S. Kornblith, J. Shlens, and Q. V. Le. Do better imagenet models transfer better? In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2661–2671, 2019.
|
| 216 |
+
[29] A. Krizhevsky, G. Hinton, et al. Learning multiple layers of features from tiny images. 2009.
|
| 217 |
+
[30] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012.
|
| 218 |
+
[31] J. Lee, T. Won, and K. Hong. Compounding the performance improvements of assembled techniques in a convolutional neural network. arXiv preprint arXiv:2001.06268, 2020.
|
| 219 |
+
[32] X. Li, W. Wang, X. Hu, and J. Yang. Selective kernel networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 510–519, 2019.
|
| 220 |
+
[33] T.-Y. Lin, P. Dollár, R. Girshick, K. He, B. Hariharan, and S. Belongie. Feature pyramid networks for object detection. In CVPR, 2017.
|
| 221 |
+
[34] I. Loshchilov and F. Hutter. Sgdr: Stochastic gradient descent with warm restarts. arXiv preprint arXiv:1608.03983, 2016.
|
| 222 |
+
[35] D. Mahajan, R. Girshick, V. Ramanathan, K. He, M. Paluri, Y. Li, A. Bharambe, and L. Van Der Maaten. Exploring the limits of weakly supervised pretraining. In Proceedings of the European Conference on Computer Vision (ECCV), pages 181–196, 2018.
|
| 223 |
+
[36] T. Norrie, N. Patil, D. H. Yoon, G. Kurian, S. Li, J. Laudon, C. Young, N. Jouppi, and D. Patterson. The design process for google’s training chips: Tpuv2 and tpuv3. IEEE Micro, 2021.
|
| 224 |
+
[37] H. Pham, Q. Xie, Z. Dai, and Q. V. Le. Meta pseudo labels. arXiv preprint arXiv:2003.10580, 2020.
|
| 225 |
+
[38] R. Qian, T. Meng, B. Gong, M.-H. Yang, H. Wang, S. J. Belongie, and Y. Cui. Spatiotemporal contrastive video representation learning. arXiv: Computer Vision and Pattern Recognition, 2020.
|
| 226 |
+
[39] I. Radosavovic, R. P. Kosaraju, R. Girshick, K. He, and P. Dollár. Designing network design spaces. arXiv preprint arXiv: 2003.13678, 2020.
|
| 227 |
+
[40] P. Ramachandran, N. Parmar, A. Vaswani, I. Bello, A. Levskaya, and J. Shlens. Stand-alone self-attention in vision models. arXiv preprint arXiv:1906.05909, 2019.
|
| 228 |
+
[41] E. Real, A. Aggarwal, Y. Huang, and Q. V. Le. Regularized evolution for image classifier architecture search. In Proceedings of the aaai conference on artificial intelligence, volume 33, pages 4780–4789, 2019.
|
| 229 |
+
[42] S. Ren, K. He, R. Girshick, and J. Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. arXiv preprint arXiv:1506.01497, 2015.
|
| 230 |
+
[43] T. Ridnik, H. Lawen, A. Noy, and I. Friedman. Tresnet: High performance gpu-dedicated architecture. arXiv preprint arXiv:2003.13630, 2020.
|
| 231 |
+
[44] J. S. Rosenfeld, A. Rosenfeld, Y. Belinkov, and N. Shavit. A constructive prediction of the generalization error across scales. arXiv preprint arXiv: 1909.12673, 2019.
|
| 232 |
+
[45] O. Russakovsky, J. Deng, H. Su, J. Krause, S. Satheesh, S. Ma, Z. Huang, A. Karpathy, A. Khosla, M. Bernstein, et al. Imagenet large scale visual recognition challenge. IJCV, 2015.
|
| 233 |
+
[46] M. Sandler, A. Howard, M. Zhu, A. Zhmoginov, and L.-C. Chen. Mobilenetv2: Inverted residuals and linear bottlenecks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4510–4520, 2018.
|
| 234 |
+
[47] Z. Shen, I. Bello, R. Vemulapalli, X. Jia, and C.-H. Chen. Global self-attention networks for image recognition. arXiv preprint arXiv: 2010.03019, 2020.
|
| 235 |
+
[48] N. Silberman, D. Hoiem, P. Kohli, and R. Fergus. Indoor segmentation and support inference from rgbd images. In European conference on computer vision, pages 746–760. Springer, 2012.
|
| 236 |
+
[49] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
|
| 237 |
+
[50] N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. The journal of machine learning research, 2014.
|
| 238 |
+
[51] C. Sun, A. Shrivastava, S. Singh, and A. Gupta. Revisiting unreasonable effectiveness of data in deep learning era. arXiv preprint arXiv: 1707.02968, 2017.
|
| 239 |
+
[52] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1–9, 2015.
|
| 240 |
+
[53] C. Szegedy, V. Vanhoucke, S. Ioffe, J. Shlens, and Z. Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2818–2826, 2016.
|
| 241 |
+
[54] M. Tan, B. Chen, R. Pang, V. Vasudevan, M. Sandler, A. Howard, and Q. V. Le. Mnasnet: Platform-aware neural architecture search for mobile. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2820–2828, 2019.
|
| 242 |
+
[55] M. Tan and Q. V. Le. Efficientnet: Rethinking model scaling for convolutional neural networks. arXiv preprint arXiv:1905.11946, 2019.
|
| 243 |
+
[56] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. Kaiser, and I. Polosukhin. Attention is all you need. arXiv preprint arXiv: 1706.03762, 2017.
|
| 244 |
+
[57] Q. Xie, M.-T. Luong, E. Hovy, and Q. V. Le. Self-training with noisy student improves imagenet classification. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10687–10698, 2020.
|
| 245 |
+
[58] S. Xie, R. Girshick, P. Dollár, Z. Tu, and K. He. Aggregated residual transformations for deep neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1492–1500, 2017.
|
| 246 |
+
[59] S. Yun, D. Han, S. J. Oh, S. Chun, J. Choe, and Y. Yoo. Cutmix: Regularization strategy to train strong classifiers with localizable features. In Proceedings of the IEEE International Conference on Computer Vision, pages 6023–6032, 2019.
|
| 247 |
+
[60] S. Zagoruyko and N. Komodakis. Wide residual networks. arXiv preprint arXiv:1605.07146, 2016.
|
| 248 |
+
[61] H. Zhang, M. Cisse, Y. N. Dauphin, and D. Lopez-Paz. mixup: Beyond empirical risk minimization. arXiv preprint arXiv:1710.09412, 2017.
|
| 249 |
+
[62] H. Zhang, C. Wu, Z. Zhang, Y. Zhu, Z. Zhang, H. Lin, Y. Sun, T. He, J. Muller, R. Manmatha, M. Li, and A. Smola. Resnest: Split-attention networks. arXiv preprint arXiv:2004.08955, 2020.
|
| 250 |
+
[63] R. Zhang. Making convolutional networks shift-invariant again. arXiv preprint arXiv:1904.11486, 2019.
|
| 251 |
+
[64] B. Zhou, H. Zhao, X. Puig, S. Fidler, A. Barriuso, and A. Torralba. Scene parsing through ade20k dataset. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 633–641, 2017.
|
| 252 |
+
[65] B. Zoph, E. D. Cubuk, G. Ghiasi, T.-Y. Lin, J. Shlens, and Q. V. Le. Learning data augmentation strategies for object detection. In European Conference on Computer Vision, pages 566–583. Springer, 2020.
|
| 253 |
+
[66] B. Zoph, G. Ghiasi, T.-Y. Lin, Y. Cui, H. Liu, E. D. Cubuk, and Q. V. Le. Rethinking pre-training and self-training. arXiv preprint arXiv:2006.06882, 2020.
|
| 254 |
+
|
| 255 |
+
[67] B. Zoph, V. Vasudevan, J. Shlens, and Q. V. Le. Learning transferable architectures for scalable image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 8697–8710, 2018.
|
md/train/dvyUaK4neD0/dvyUaK4neD0.md
ADDED
|
@@ -0,0 +1,314 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# The Skellam Mechanism for Differentially Private Federated Learning
|
| 2 |
+
|
| 3 |
+
Naman Agarwal† Peter Kairouz† Ziyu Liu‡⇤ †Google Research ‡Carnegie Mellon University {namanagarwal, kairouz}@google.com, ziyuliu@cs.cmu.edu
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
We introduce the multi-dimensional Skellam mechanism, a discrete differential privacy mechanism based on the difference of two independent Poisson random variables. To quantify its privacy guarantees, we analyze the privacy loss distribution via a numerical evaluation and provide a sharp bound on the Rényi divergence between two shifted Skellam distributions. While useful in both centralized and distributed privacy applications, we investigate how it can be applied in the context of federated learning with secure aggregation under communication constraints. Our theoretical findings and extensive experimental evaluations demonstrate that the Skellam mechanism provides the same privacy-accuracy trade-offs as the continuous Gaussian mechanism, even when the precision is low. More importantly, Skellam is closed under summation and sampling from it only requires sampling from a Poisson distribution – an efficient routine that ships with all machine learning and data analysis software packages. These features, along with its discrete nature and competitive privacy-accuracy trade-offs, make it an attractive practical alternative to the newly introduced discrete Gaussian mechanism.
|
| 8 |
+
|
| 9 |
+
# 1 Introduction
|
| 10 |
+
|
| 11 |
+
The Gaussian mechanism is the workhorse for a multitude of differentially private learning algorithms [46, 10, 1]. While simple enough for mathematical reasoning and privacy accounting analyses, its continuous nature presents a number of challenges in practice. For example, it cannot be exactly represented on finite computers, making it prone to numerical errors that can break its privacy guarantees [35]. Moreover, it cannot be used in distributed learning settings with cryptographic multi-party computation primitives involving modular arithmetic, such as secure aggregation [12, 11]. To address these shortcomings, the binomial and (distributed) discrete Gaussian mechanisms were recently introduced [19, 2, 15, 25]. Unfortunately, both have their own drawbacks: the privacy loss for the binomial mechanism can be infinite with a non-zero probability, and the discrete Gaussian: (a) is not closed under summation (i.e. sum of discrete Gaussians is not a discrete Gaussian), complicating analysis in distributed settings and leading to a performance worse than continuous Gaussian in the highly distributed, low-noise regime [25]; (b) requires a sampling algorithm that is not shipped with mainstream machine learning or data analysis software packages, making it difficult for engineers to use it in production settings (naïve implementations may lead to catastrophic privacy errors).
|
| 12 |
+
|
| 13 |
+
Our contributions To overcome these limitations, we introduce and analyze the multi-dimensional Skellam mechanism, a mechanism based on adding noise distributed according to the difference of two independent Poisson random variables. The Skellam noise is closed under summation (i.e. sums of Skellam random variables is again Skellam distributed) and can be sampled from easily – efficient Poisson samplers are widely available in numerical software packages. Being discrete in nature also means that it can mesh well cryptographic protocols and can lead to communication savings.
|
| 14 |
+
|
| 15 |
+
To analyze the privacy guarantees of the Skellam mechanism and compare it with other mechanisms, we provide a numerical evaluation of the privacy loss random variable and prove a sharp bound on the Rényi divergence between two shifted Skellam distributions. Our careful analysis shows that for a multi-dimensional query function with $\ell _ { 1 }$ sensitivity $\Delta _ { 1 }$ and $\ell _ { 2 }$ sensitivity $\Delta _ { 2 }$ , the Skellam mechanism with variance $\mu$ achieves $( \alpha , \varepsilon ( \alpha ) )$ Rényi differential privacy (RDP) [36] for $\varepsilon ( \alpha ) \leq$ $\begin{array} { r } { \frac { \alpha \Delta _ { 2 } } { 2 \mu } + \operatorname* { m i n } { \left( \frac { ( 2 \alpha - 1 ) \Delta _ { 2 } + 6 \Delta _ { 1 } } { 4 \mu ^ { 2 } } , \frac { 3 \Delta _ { 1 } } { 2 \mu } \right) } } \end{array}$ (see Theorem 3.5). This implies that the RDP guarantees are at most $1 + O \left( 1 / \mu \right)$ times worse than those of the Gaussian mechanism.
|
| 16 |
+
|
| 17 |
+
To analyze the performance of the Skellam mechanism in practice, we consider a differentially private and communication constrained federated learning (FL) setting [26] where the noise is added locally to the $d$ -dimensional discretized client updates that are then summed securely via a cryptographic protocol, such as secure aggregation $( { \mathrm { S e c A g g } } )$ [11, 12]. We provide an end-to-end algorithm that appropriately discretizes the data and applies the Skellam mechanism along with modular arithmetic to bound the range of the data and communication costs before applying SecAgg.
|
| 18 |
+
|
| 19 |
+
We show on distributed mean estimation and two benchmark FL datasets, Federated EMNIST [14] and Stack Overflow [8], that our method can match the performance of the continuous Gaussian baseline under tight privacy and communication budgets, despite using generic RDP amplification via sampling [51] for our approach and the precise RDP analysis for the subsampled Gaussian mechanism [37]. Our method is implemented in TensorFlow Privacy [32] and TensorFlow Federated [24] and will be open-sourced.2 While we mostly focus on FL applications, the Skellam mechanism can also be applied in other contexts of learning and analytics, including centralized settings.
|
| 20 |
+
|
| 21 |
+
Related work The Skellam mechanism was first introduced in the context of computational differential privacy from lattice-based cryptography [49] and private Bayesian inference [45]. However, the privacy analyses in the prior work do not readily extend to the multi-dimensional case, and they give direct bounds for pure or approximate DP which makes only advanced composition theorems [28, 22] directly applicable in learning settings where the mechanism is applied many times. For example, the guarantees from [49] lead to poor accuracy-privacy trade-offs as demonstrated in Fig. 1. Moreover, we show in Section 3.1 that extending the direct privacy analysis to the multi-dimensional setting is non-trivial because the worst-case neighboring dataset pair is unknown in this case. For these reasons, our tight privacy analysis via a sharp RDP bound makes the Skellam mechanism practical for learning applications for the first time. These guarantees (almost) match those of the Gaussian mechanism and allow us to use generic RDP amplification via subsampling methods [51].
|
| 22 |
+
|
| 23 |
+
The closest mechanisms to Skellam are the binomial [2, 19] and the discrete Gaussian mechanisms [15, 25]. The binomial mechanism can (asymptotically) match the continuous Gaussian mechanism (when properly scaled). However, it does not achieve Rényi or zero-concentrated DP [36, 13] and has a privacy loss that can be infinite with a non-zero probability, leading to catastrophic privacy failures. The discrete Gaussian mechanism yields Rényi DP and can be applied to distributed settings [25], but it requires a sampling algorithm that is not yet available in data analysis software packages despite being explored in the lattice-based cryptography community (e.g., [43, 18, 38]). The discrete Gaussian is also not closed under summation and the divergence can be large in highly distributed low-noise settings (e.g. quantile estimation [6] and federated analytics [42]), which causes privacy degradation. See the end of Section 4 for more discussion.
|
| 24 |
+
|
| 25 |
+
# 2 Preliminaries
|
| 26 |
+
|
| 27 |
+
We begin by providing a formal definition for $( \varepsilon , \delta )$ -differential privacy (DP) [20].
|
| 28 |
+
|
| 29 |
+
Definition 2.1 (Differential Privacy). For $\varepsilon , \delta \geq 0$ , a randomized mechanism $M$ satisfies $( \varepsilon , \delta )$ -DP if for all neighboring datasets $D , D ^ { \prime }$ and all $s$ in the range of $M$ , we have that
|
| 30 |
+
|
| 31 |
+
$$
|
| 32 |
+
P \left( M ( D ) \in { \mathcal { S } } \right) \leq e ^ { \varepsilon } P \left( M ( D ^ { \prime } ) \in { \mathcal { S } } \right) + \delta ,
|
| 33 |
+
$$
|
| 34 |
+
|
| 35 |
+
where $D$ and $D ^ { \prime }$ are neighboring pairs if they can be obtained from each other by adding or removing all the records that belong to a particular user.
|
| 36 |
+
|
| 37 |
+
In our experiments we consider user-level differential privacy – i.e., $D$ and $D ^ { \prime }$ are neighboring pairs
|
| 38 |
+
|
| 39 |
+
if one of them can be obtained from the other by adding or removing all the records associated with a single user [33]. This is stronger than the commonly-used notion of item level privacy where, if a user contributes multiple records, only the addition or removal of one record is protected.
|
| 40 |
+
|
| 41 |
+
We also make use of Rényi differential privacy (RDP) [36] which allows for tight privacy accounting.
|
| 42 |
+
|
| 43 |
+
Definition 2.2 (Rényi Differential Privacy). A mechanism $M$ satisfies $( \alpha , \varepsilon )$ -RDP if for any two neighboring datasets $D , D ^ { \prime }$ , we have that $D _ { \alpha } ( M ( D ) , M ( D ^ { \prime } ) ) \leq \varepsilon$ where $D _ { \alpha } ( P , Q )$ is the Rényi divergence between $P$ and $Q$ and is given by
|
| 44 |
+
|
| 45 |
+
$$
|
| 46 |
+
D _ { \alpha } ( P , Q ) \triangleq \frac { 1 } { \alpha - 1 } \log \left( \mathbb { E } _ { x \sim Q } \left[ \left( \frac { P ( x ) } { Q ( x ) } \right) ^ { \alpha } \right] \right) = \frac { 1 } { \alpha - 1 } \log \left( \mathbb { E } _ { x \sim P } \left[ \left( \frac { P ( x ) } { Q ( x ) } \right) ^ { \alpha - 1 } \right] \right) .
|
| 47 |
+
$$
|
| 48 |
+
|
| 49 |
+
A closely related privacy notion is zero-concentrated DP (zCDP) [21, 13]. In fact, $\scriptstyle { \frac { 1 } { 2 } } \varepsilon ^ { 2 } - z \mathbf { C D P }$ i s equivalent to simultaneously satisfying an infinite family of RDP guarantees, namely $( \alpha , \textstyle { \frac { 1 } { 2 } } \varepsilon ^ { 2 } \alpha )$ - Rényi differential privacy for all $\alpha \in ( 1 , \infty )$ . The following conversion lemma from [13, 15, 7] relates RDP to $( \varepsilon , \delta )$ -DP.
|
| 50 |
+
|
| 51 |
+
Lemma 2.3. If $M$ satisfies $( \alpha , \varepsilon )$ -RDP, then, for any $\delta > 0$ , $M$ satisfies $( \varepsilon _ { D P } ( \delta ) , \delta )$ -DP, where
|
| 52 |
+
|
| 53 |
+
$$
|
| 54 |
+
\varepsilon _ { D P } ( \delta ) = \operatorname* { i n f } _ { \alpha > 1 } \varepsilon + \frac { \log ( 1 / \alpha \delta ) } { \alpha - 1 } + \log ( 1 - 1 / \alpha ) .
|
| 55 |
+
$$
|
| 56 |
+
|
| 57 |
+
For any query function $f$ , we define the $\Delta _ { p }$ sensitivity as $\begin{array} { r } { \operatorname* { m a x } _ { D , D ^ { \prime } } \| f ( D ) - f ( D ^ { \prime } ) \| _ { p } } \end{array}$ , where $D$ and $D ^ { \prime }$ are neighboring pairs differing by adding or removing all the records from a particular user. We also include the RDP guarantees of the discrete Gaussian mechanism (same RDP guarantees as the continuous Gaussian mechanism) to which we compare our method.
|
| 58 |
+
|
| 59 |
+
Definition 2.4 (The Discrete Gaussian Mechanism [15]). Given an integer-valued query $f ( D ) \in \mathbb { Z } ^ { d }$ and noise variance $\mu _ { ; }$ , the Discrete Gaussian (DGaussian) Mechanism is given by
|
| 60 |
+
|
| 61 |
+
$$
|
| 62 |
+
f ( D ) + Z , w h e r e Z \sim { \mathcal { N } } _ { \mathbb { Z } } ( 0 , \mu ) ,
|
| 63 |
+
$$
|
| 64 |
+
|
| 65 |
+
and $\mathcal { N } _ { \mathbb { Z } } ( 0 , \mu )$ denotes the discrete Gaussian distribution defined in Equation $( l )$ of [15]. The discrete Gaussian mechanism achieves $\begin{array} { r } { ( \alpha , \frac { \alpha \Delta _ { 2 } ^ { 2 } } { 2 \mu } ) } \end{array}$ -Rényi $D P .$
|
| 66 |
+
|
| 67 |
+
# 3 The Skellam Mechanism
|
| 68 |
+
|
| 69 |
+
We begin by presenting the definition of the Skellam distribution, which is the basis of the Skellam Mechanism for releasing integer ranged multi-dimensional queries.
|
| 70 |
+
|
| 71 |
+
Definition 3.1 (Skellam Distribution). The multidimensional Skellam distribution $\operatorname { S k } _ { \Delta , \mu }$ over $\mathbb { Z } ^ { d }$ with mean $\Delta \in \mathbb { Z } ^ { d }$ and variance $\mu$ is given with each coordinate $X _ { i }$ distributed independently as
|
| 72 |
+
|
| 73 |
+
$$
|
| 74 |
+
X _ { i } \sim \mathrm { S k } _ { \Delta _ { i } , \mu } \ w i t h \ P ( X _ { i } = k ) = e ^ { - \mu } I _ { k - \Delta _ { i } } ( \mu ) ,
|
| 75 |
+
$$
|
| 76 |
+
|
| 77 |
+
for $k \in \mathbb { Z }$ . Here, $I _ { \nu } ( x )$ is the modified Bessel function of the first kind. A key property of Skellam random variables which motivates their use in DP is that they are closed under summation, i.e. let $X _ { 1 } \sim \mathrm { S k } _ { \Delta _ { 1 } , \mu _ { 1 } }$ and $X _ { 2 } \sim \mathrm { S k } _ { \Delta _ { 2 } , \mu _ { 2 } }$ then $X _ { 1 } + X _ { 2 } \sim \mathrm { S k } _ { \Delta _ { 1 } + \Delta _ { 2 } , \mu _ { 1 } + \mu _ { 2 } }$ . This follows from the fact that a Skellam random variable $X$ can be obtained by taking the difference between two independent Poisson random variables with means $\mu$ . 3 We are now ready to introduce the Skellam Mechanism.
|
| 78 |
+
|
| 79 |
+
Definition 3.2 (The Skellam Mechanism). Given an integer-valued query $f ( D ) \in \mathbb { Z } ^ { d }$ , we define the Skellam Mechanism as
|
| 80 |
+
|
| 81 |
+
$$
|
| 82 |
+
\begin{array} { r l } & { \qquad \mathrm { S k } _ { 0 , \mu } ( f ( D ) ) = f ( D ) + Z , \ w h e r e \ Z \sim \mathrm { S k } _ { 0 , \mu } , } \\ & { \qquad \cdot o f t h e m e c h a n i s m i s b o u n d e d b y \mathbb { E } \left[ \| \mathrm { S k } _ { 0 , \mu } ( f ( D ) ) - f ( D ) \| _ { 2 } ^ { 2 } \right] \leq d \mu . } \end{array}
|
| 83 |
+
$$
|
| 84 |
+
|
| 85 |
+
and the total $\ell _ { 2 }$ erro
|
| 86 |
+
|
| 87 |
+
The Skellam mechanism was first introduced in [49] for the scalar case. As our goal is to apply the Skellam mechanism in the learning context, we have to address the following challenges. (1) Tight privacy compositions: Learning algorithms are iterative in nature and require the application of the DP mechanism many times (often $> 1 0 0 0$ ). The current direct approximate DP analysis in [49] can be combined with advanced composition (AC) theorems [28, 22] but that leads to poor privacy-accuracy trade-offs (see Fig. 1). (2) Privacy analysis for multi-dimensional queries: In learning algorithms, the differentially private queries are multi-dimensional (where the dimension equals the number of model parameters, typically $\geq 1 0 ^ { 6 }$ ). Using composition theorems lead to poor accuracy-privacy trade-offs and a direct extension of approximate DP guarantee [49] for the multi-dimensional case leads to a strong dependence on $\ell _ { 1 }$ sensitivity which is prohibitively large in high dimensions. (3) Data discretization: The gradients are naturally continuous vectors but we would like to apply an integer based mechanism. This requires properly discretizing the data while making sure that the norm of the vectors (sensitivity of the query) is preserved. We will tackle challenges (1) and (2) in the remainder of this section and leave (3) for the next section.
|
| 88 |
+
|
| 89 |
+
# 3.1 Tight Numerical Accounting via Privacy Loss Distributions
|
| 90 |
+
|
| 91 |
+
We begin by defining the notion of privacy loss distributions (PLDs).
|
| 92 |
+
|
| 93 |
+
Definition 3.3 (Privacy Loss Distribution). For a multi-dimensional discrete privacy mechanism $M$ and neighboring datasets $D , D ^ { \prime }$ , for any $x \in \mathbb { Z } ^ { d }$ , we define $f ( x ) =$ $\log \left( { \frac { P ( M ( D ) = x ) } { P ( M ( D ^ { \prime } ) = x ) } } \right)$ . The privacy loss random variable of $M$ at $( D , D ^ { \prime } )$ is $Z _ { D , D ^ { \prime } } =$ $f ( M ( D ) ) \ l { 2 2 } { ] }$ . The privacy loss distribution $( P L D )$ of $M$ , denoted by $\mathrm { P L D } _ { D , D ^ { \prime } }$ , is the distribution of $Z _ { D , D ^ { \prime } }$ .
|
| 94 |
+
|
| 95 |
+
The PLD of a mechanism $M$ can be used to characterize its $( \varepsilon , \delta )$ -DP guarantees.
|
| 96 |
+
|
| 97 |
+

|
| 98 |
+
Figure 1: Comparing privacy compositions across various mechanisms and accounting methods.
|
| 99 |
+
|
| 100 |
+
Lemma 3.4. A mechanism $M$ is $( \varepsilon , \delta )$ -DP if and only if $\delta \geq \mathbb { E } _ { Z \sim \mathrm { P L D } _ { D , D ^ { \prime } } } \left[ 1 - e ^ { \varepsilon - Z } \right] _ { + }$ for all neighboring datasets $D , D ^ { \prime }$ where $[ x ] _ { + } = \operatorname* { m a x } ( 0 , x )$ .
|
| 101 |
+
|
| 102 |
+
When a mechanism $M$ is applied $T$ times on a dataset, the overall PLD of the composed mechanism at $( D , D ^ { \prime } )$ is the $T$ -fold convolution of $\mathrm { P L D } _ { D , D ^ { \prime } }$ [22]. Since discrete convolutions can be computed efficiently using fast Fourier transforms (FFTs) and the expectation in Lemma 3.4 can be numerically approximated, PLDs are attractive for tight numerical accounting [30, 34, 17]. Applying the above to the Skellam mechanism, a direct calculation shows that with $X _ { i }$ are i.i.d. according to $\operatorname { S k } _ { 0 , \mu }$ ,
|
| 103 |
+
|
| 104 |
+
$$
|
| 105 |
+
Z _ { D , D ^ { \prime } } = \sum _ { i = 1 } ^ { d } \log \left( \frac { I _ { X _ { i } - f ( D ) _ { i } } ( \mu ) } { I _ { X _ { i } - f ( D ^ { \prime } ) _ { i } } ( \mu ) } \right) .
|
| 106 |
+
$$
|
| 107 |
+
|
| 108 |
+
When $d = 1$ , it suffices to look at $Z = \log ( I _ { X - \Delta } ( \mu ) / I _ { X } ( \mu ) )$ , where $\Delta = \operatorname* { m a x } _ { D , D ^ { \prime } } | f ( D ) - f ( D ^ { \prime } ) |$ and $X \sim \mathrm { S k } _ { 0 , \mu }$ . Since $X$ has a discrete and symmetric probability distribution and the log function is monotonic, the distribution of $Z$ can be easily characterized. This gives us a tight numerical accountant for the Skellam mechanism in the scalar case, which we use to compare it with both the Gaussian and discrete Gaussian mechanisms. Fig. 1 shows this comparison, highlighting the competitiveness of the Skellam mechanism and the problem of combining the direct analysis of [49] with advanced composition (AC) theorems. When $d > 1$ , there are combinatorially many $Z _ { D , D ^ { \prime } }$ ’s that need to be considered, even when the $\ell _ { 2 }$ sensitivity of $f ( D )$ is bounded. The discrete Gaussian mechanism faces a similar issue (see Theorem 15 of [15]). To provide a tight privacy analysis in the multi-dimensional case, we prove a bound on the RDP guarantees of the Skellam mechanism in the next subsection. Fig. 1 and 2 show that our bound is tight and the competitiveness of the Skellam mechanism in high dimensions.
|
| 109 |
+
|
| 110 |
+
# 3.2 Tight Accounting via Rényi Differential Privacy
|
| 111 |
+
|
| 112 |
+
The following theorem states our main theoretical result, providing a relatively sharp bound on the RDP properties for the Skellam machanism.
|
| 113 |
+
|
| 114 |
+
Theorem 3.5. For $\alpha \in \mathbb { Z } , \alpha > 1$ and sensitivity $\Delta \in \mathbb { Z }$ , the Skellam Mechanism is $( \alpha , \varepsilon )$ -RDP with
|
| 115 |
+
|
| 116 |
+
$$
|
| 117 |
+
\varepsilon ( \alpha ) \leq \frac { \alpha \Delta ^ { 2 } } { 2 \mu } + \operatorname* { m i n } \left( \frac { ( 2 \alpha - 1 ) \Delta ^ { 2 } + 6 \Delta } { 4 \mu ^ { 2 } } , \frac { 3 \Delta } { 2 \mu } \right) ,
|
| 118 |
+
$$
|
| 119 |
+
|
| 120 |
+
To remind the reader in comparison, the Gaussian mechanism is $( \alpha , \varepsilon )$ -RDP with $\begin{array} { r } { \varepsilon ( \alpha ) = \frac { \alpha \Delta ^ { 2 } } { 2 \mu } } \end{array}$ . The bound we provide is at most $1 + O ( 1 / \mu )$ worse than the bound for the Gaussian, which is negligible for all practical choices of $\mu$ , especially as the privacy requirements increase.4 Next we show a simple corollary which follows via the independent composition of RDP across dimensions.
|
| 121 |
+
|
| 122 |
+
Corollary 3.6. The multi-dimensional Skellam Mechanism is $( \alpha , \varepsilon )$ -RDP with
|
| 123 |
+
|
| 124 |
+
$$
|
| 125 |
+
\varepsilon ( \alpha ) \leq \frac { \alpha \Delta _ { 2 } ^ { 2 } } { 2 \mu } + \operatorname* { m i n } \left( \frac { ( 2 \alpha - 1 ) \Delta _ { 2 } ^ { 2 } + 6 \Delta _ { 1 } } { 4 \mu ^ { 2 } } , \frac { 3 \Delta _ { 1 } } { 2 \mu } \right) .
|
| 126 |
+
$$
|
| 127 |
+
|
| 128 |
+
where $\Delta _ { 1 }$ and $\Delta _ { 2 }$ are the $\ell _ { 1 }$ and $\ell _ { 2 }$ sensitivities respectively.
|
| 129 |
+
|
| 130 |
+
# 3.2.1 Proof Overview for Theorem 3.5
|
| 131 |
+
|
| 132 |
+
In this subsection, we provide the proof of Theorem 3.5 assuming a technical bound on the ratios of Bessel functions presented as Lemma 3.7, which is the core of our analysis and may be of independent interest. We provide a proof overview for Lemma 3.7, deferring the full proof to the appendix.
|
| 133 |
+
|
| 134 |
+
On a macroscopic level, our proof structure mimics the RDP proof for the Gaussian mechanism [36], and the main object of our interest is to bound the following quantity, defined for any $X , \Delta , \alpha$ :
|
| 135 |
+
|
| 136 |
+
$$
|
| 137 |
+
\Phi _ { X , \alpha , \Delta } ( \mu ) \triangleq \log \left( \frac { I _ { X - \Delta } ( \mu ) } { I _ { X - \alpha \Delta } ( \mu ) } \left( \frac { I _ { X - \Delta } ( \mu ) } { I _ { X } ( \mu ) } \right) ^ { \alpha - 1 } \right) .
|
| 138 |
+
$$
|
| 139 |
+
|
| 140 |
+
The following lemma states our main bound on this quantity.
|
| 141 |
+
|
| 142 |
+
Lemma 3.7. For any $X , \alpha \in \mathbb { N } ,$ , with $\alpha > 1$ and $\Delta \in \mathbb { Z } ,$ , we have that for all $\mu \geq 0$
|
| 143 |
+
|
| 144 |
+
$$
|
| 145 |
+
\Phi _ { X , \alpha , \Delta } ( \mu ) \leq \frac { \alpha ( \alpha - 1 ) \Delta ^ { 2 } } { 2 \mu } + \operatorname* { m i n } \left( \frac { ( 2 \alpha - 1 ) ( \alpha - 1 ) \Delta ^ { 2 } } { 4 \mu ^ { 2 } } + \frac { 3 ( \alpha - 1 ) | \Delta | } { 2 \mu ^ { 2 } } , \frac { 3 ( \alpha - 1 ) | \Delta | } { 2 \mu } \right) .
|
| 146 |
+
$$
|
| 147 |
+
|
| 148 |
+
Note that in contrast if we consider the analogous notion of $\Phi$ for the Gaussian mechanism (replacing IX(µ) with the Gaussian density e X2/2µ), we readily get the bound ↵(↵ 1) 22µ , which is the same as our bound up to lower order terms. We now provide the proof of Theorem 3.5.
|
| 149 |
+
|
| 150 |
+
Proof of Theorem 3.5. By RDP definition (2.2), we need to bound the following for any $\Delta , \alpha \geq 1$ ,
|
| 151 |
+
|
| 152 |
+
$$
|
| 153 |
+
D _ { \alpha } \left( { \mathrm { S k } } _ { \Delta , \mu } , { \mathrm { S k } } _ { 0 , \mu } \right) = \frac { 1 } { \alpha - 1 } { \log \left( \right)} \sum _ { X = - \infty } ^ { \infty } e ^ { - \mu } I _ { X - \Delta } ( \mu ) \left( \frac { I _ { X - \Delta } ( \mu ) } { I _ { X } ( \mu ) } \right) ^ { \alpha - 1 }
|
| 154 |
+
$$
|
| 155 |
+
|
| 156 |
+
Now consider the following calculations on the log term:
|
| 157 |
+
|
| 158 |
+
$$
|
| 159 |
+
\begin{array} { r l } & { \log \left( \displaystyle \sum _ { X = - \infty } ^ { \infty } \frac { I _ { X - \Delta } ( \mu ) } { e ^ { \mu } } \left( \frac { I _ { X - \Delta } ( \mu ) } { I _ { X } ( \mu ) } \right) ^ { \alpha - 1 } \right) = \log \left( \displaystyle \sum _ { X = - \infty } ^ { \infty } \frac { I _ { X - \alpha \Delta } ( \mu ) } { e ^ { \mu } } e ^ { \Phi _ { X , \alpha , \Delta ( \mu ) } } \right) } \\ & { \leq \log \left( \displaystyle \sum _ { X = - \infty } ^ { \infty } e ^ { - \mu } I _ { X - \alpha \Delta } ( \mu ) \right) + \displaystyle \operatorname* { m a x } _ { X \in \mathbb { Z } } \Phi _ { X , \alpha , \Delta ( \mu ) } } \\ & { \leq \frac { \alpha ( \alpha - 1 ) \Delta ^ { 2 } } { 2 \mu } + \operatorname* { m i n } \left( \frac { ( 2 \alpha - 1 ) ( \alpha - 1 ) \Delta ^ { 2 } } { 4 \mu ^ { 2 } } + \frac { 3 ( \alpha - 1 ) | \Delta | } { 2 \mu ^ { 2 } } , \frac { 3 ( \alpha - 1 ) | \Delta | } { 2 \mu } \right) , } \end{array}
|
| 160 |
+
$$
|
| 161 |
+
|
| 162 |
+
where the inequality follows from Lemma 3.7.
|
| 163 |
+
|
| 164 |
+
We now provide an overview for the proof of Lemma 3.7 highlighting the crux of the argument. As a first step we collect some known facts regarding Bessel functions. It is known that for $x \geq 0$ and $\nu \in \mathbb { Z }$ , $\nu \geq 0$ , $I _ { \nu } ( x )$ is a decreasing function in $\nu$ , $I _ { - \nu } ( x ) = I _ { \nu } ( x )$ and $\frac { I _ { \nu - 1 } ( \mu ) } { I _ { \nu } ( x ) }$ is an increasing function in $\nu$ [47]. A succession of works consider bounding the ratio of successive Bessel functions $I _ { \nu - 1 } ( x ) / I _ { \nu } ( x )$ , which is a natural quantity to considering the objective in Lemma 3.7. We use the following very tight characterization for this recently proved in [44, Theorem 5].
|
| 165 |
+
|
| 166 |
+
Lemma 3.8. For any $\nu \geq 1 / 2 , x \geq 0$ define the following function we have that
|
| 167 |
+
|
| 168 |
+
$$
|
| 169 |
+
\mathrm { a r c s i n h } ( \delta _ { 0 } ( \nu , x ) ) \leq \log ( I _ { \nu - 1 } ( x ) ) - \log ( I _ { \nu } ( x ) ) \leq \mathrm { a r c s i n h } ( \delta _ { 2 } ( \nu , x ) )
|
| 170 |
+
$$
|
| 171 |
+
|
| 172 |
+
Standard bounds such as those appearing in [5, 49] lead to the following conclusion:
|
| 173 |
+
|
| 174 |
+
$$
|
| 175 |
+
\mathrm { a r c s i n h } ( ( \nu - 1 / 2 ) / x ) \leq \log ( I _ { \nu - 1 } ( x ) ) - \log ( I _ { \nu } ( x ) ) \leq \mathrm { a r c s i n h } ( \nu / x ) ) .
|
| 176 |
+
$$
|
| 177 |
+
|
| 178 |
+
While the above bound is significantly easier to work with, it leads to an RDP guarantee of Gaussian $\mathrm { R D P } + O \bigl ( \frac { \Delta } { \mu } \bigr )$ . In high dimensions this manifests as $O ( \frac { \Delta _ { 1 } } { \mu } )$ and overall leads to a constant multiplicative factor over the Gaussian. On the other hand we prove a Gaussian $\mathrm { R D P } + o _ { \mu } ( 1 )$ bound. Our proof of Lemma 3.7 splits into various cases depending on the signs of the quantities involved. We show the derivation for a single case below and defer the full proof to the appendix.
|
| 179 |
+
|
| 180 |
+
Proof of Lemma 3.7 in the case $X \geq \alpha \Delta$ , $\Delta \geq 0$ . Replacing $Y = X - \alpha \delta$ we get that
|
| 181 |
+
|
| 182 |
+
$$
|
| 183 |
+
\begin{array} { r l } & { \Phi _ { X , \boldsymbol { \alpha } , \Delta } ( \mu ) = \log \left( \displaystyle \frac { I _ { Y + ( \alpha - 1 ) \Delta } ( \mu ) } { I _ { Y } ( \mu ) } \left( \frac { I _ { Y + ( \alpha - 1 ) \Delta } ( \mu ) } { I _ { Y + \alpha \Delta } ( \mu ) } \right) ^ { \alpha - 1 } \right) } \\ & { \qquad = \displaystyle \sum _ { j = 0 } ^ { \alpha - 2 } \left( \sum _ { i = Y + j \Delta + 1 } ^ { Y + j \Delta + \Delta } \left( \log \left( \frac { I _ { i - 1 } + ( \alpha - 1 - j ) ( \mu ) } { I _ { i + ( \alpha - 1 - j ) \Delta } ( \mu ) } \right) - \log \left( \frac { I _ { i - 1 } ( \mu ) } { I _ { i } ( \mu ) } \right) \right) \right) } \\ & { \qquad \le \displaystyle \sum _ { j = 0 } ^ { \alpha - 2 } \left( \sum _ { i = Y + j \Delta + 1 } ^ { Y + j \Delta + \Delta } \left( \delta _ { 2 } ( i + ( \alpha - 1 - j ) \Delta , \mu ) - \delta _ { 0 } ( i , \mu ) \right) \right) } \\ & { \qquad \le \displaystyle \frac { \alpha ( \alpha - 1 ) \Delta ^ { 2 } } { 2 \mu } + \operatorname* { m i n } \left( \frac { \alpha ( \alpha - 1 ) \Delta ^ { 2 } + 2 ( \alpha - 1 ) \Delta } { 4 \mu ^ { 2 } } , \frac { ( \alpha - 1 ) \Delta } { 2 \mu } \right) , } \end{array}
|
| 184 |
+
$$
|
| 185 |
+
|
| 186 |
+
where the first inequality follows from Lemma 3.8 and the fact that for all $0 \leq x \leq y$ , $\operatorname { a r c s i n h } ( y ) -$ $\operatorname { a r c s i n h } ( x ) \leq y - x$ and the second inequality follows from Lemma A.1 (provided in the appendix):
|
| 187 |
+
|
| 188 |
+
$$
|
| 189 |
+
\delta _ { 2 } ( \nu _ { 1 } , x ) - \delta _ { 0 } ( \nu _ { 2 } , x ) \leq \frac { \nu _ { 1 } - \nu _ { 2 } } { x } + \frac { 1 } { 2 x } \operatorname* { m i n } \left( \frac { \nu _ { 1 } - \nu _ { 2 } + 1 } { x } , 1 \right) .
|
| 190 |
+
$$
|
| 191 |
+
|
| 192 |
+
# 4 Applying the Skellam Mechanism to Federated Learning
|
| 193 |
+
|
| 194 |
+
With a sharp RDP analysis for the multi-dimensional Skellam mechanism presented in the previous section, we are now ready to apply it to differentially private federated learning. We first outline the general problem setting and then describe our approach under central and distributed DP models.
|
| 195 |
+
|
| 196 |
+
Problem setting At a high-level, we consider the distributed mean estimation problem. There are $n$ clients each holding a vector $x _ { i }$ in $\mathbb { R } ^ { d }$ such that for all $i$ , the vector norm is bounded as $\| x _ { i } \| _ { 2 } \leq c$ for some $c \geq 0$ . We denote the set of vectors as $\mathcal { X } = \{ x _ { i } \} _ { i = 1 } ^ { n }$ , and the aim is for each client to communicate the vectors $x _ { i }$ to a central server which then aggregates them as $\begin{array} { r } { \widehat { x } = \frac { 1 } { n } \sum _ { i } x _ { i } } \end{array}$ for an external analyst. In federated learning, the client vectors $x _ { i }$ are the model gradients or model deltas (typically $d \geq 1 0 ^ { 6 }$ ) after training on the clients’ local datasets, and this procedure can be repeated for many rounds $T > 1 0 0 0 \ r ,$ . A large $d$ and $T$ thus necessitate accounting methods that provide tight privacy compositions for high-dimensional queries.
|
| 197 |
+
|
| 198 |
+
We are primarily concerned with three metrics for this procedure and their trade-offs: (1) Privacy: the mean $\widehat { x }$ should be differentially private with a reasonably small $( \varepsilon , \delta )$ ; (2) Error: we wish to minimize the expected $\ell _ { 2 }$ error; and (3) Communication: we wish to minimize the average number of bits communicated per coordinate. Characterizing this trade-off is an important research problem. For example, it has been recently shown [50] that without formal privacy guarantees, the client training data could still be revealed by the model updates $x _ { i }$ ; on the other hand, applying differential privacy [48] to these updates can degrade the final utility.
|
| 199 |
+
|
| 200 |
+

|
| 201 |
+
Figure 2: Benchmarking Skellam on sensitivity-1 queries under various accounting methods. RDP: Rényi DP. PLD: privacy loss distributions. Skellam (Direct): [49]. Gaussian (Analytic): [9]. DGaussian [15] / DDGauss [25]: central / distributed discrete Gaussian. $s$ is the scaling factor applied to both $\Delta$ and $\sigma$ . For Skellam and DDGauss [25], the central noise with std $\sigma$ is split into $n$ shares each applied locally with std $\sigma / { \sqrt { n } }$ ; a large $n$ and small $\sigma$ can thus exacerbate the sum divergence term of DDGauss (left). Left: $\varepsilon \leq 1 0$ . Right: $\varepsilon \leq 1$ .
|
| 202 |
+
|
| 203 |
+

|
| 204 |
+
Figure 3: Comparing Skellam and Distributed Discrete Gaussian (DDGauss) on multi-dimensional real-valued queries, rounded to integers with $\beta = e ^ { - 0 . 5 }$ (Prop. 4.2). $s$ is the scaling applied to both $\sigma$ and $\Delta _ { 2 }$ ; a larger $s$ reduces the rounding error and norm inflation. $q$ is the sampling rate. For Skellam and DDGauss [25], the central noise with std $\sigma$ is split into $n$ shares each applied locally with std $\sigma / { \sqrt { n } }$ ; a large $n$ and small $\sigma$ can exacerbate the sum divergence term of DDGauss. Left: Simple setting with $\Delta _ { 2 } = 1$ . Right: FL-like setting for training CNNs on Federated EMNIST.
|
| 205 |
+
|
| 206 |
+
Skellam for central DP The central DP model refers to adding Skellam noise onto the non-private aggregate $\widehat { x }$ before releasing it to the external analyst. One important consideration is that the model updates in $\mathrm { F L }$ are continuous in nature, while Skellam is a discrete probability distribution. One approach is to appropriately discretize the client updates, e.g., via uniform quantization (which involves scaling the inputs by a factor $s \sim 2 ^ { b }$ for some bit-width $b$ followed by stochastic rounding5 for unbiased estimates), and the server can convert the private aggregate back to real numbers at the end. Note that this allows us to re-parameterize the variance of the added Skellam noise as $s ^ { 2 } \mu$ , giving the following simple corollary based on Cor. 3.6:
|
| 207 |
+
|
| 208 |
+
Corollary 4.1 (Scaled Skellam Mechanism). With a scaling factor $s \in \mathbb { R } ,$ , the multi-dimensional Skellam Mechanism is $( \alpha , \varepsilon )$ -RDP with
|
| 209 |
+
|
| 210 |
+
$$
|
| 211 |
+
\varepsilon ( \alpha ) \leq \frac { \alpha \Delta _ { 2 } ^ { 2 } } { 2 \mu } + \operatorname* { m i n } \left( \frac { ( 2 \alpha - 1 ) \Delta _ { 2 } ^ { 2 } } { 4 s ^ { 2 } \mu ^ { 2 } } + \frac { 3 \Delta _ { 1 } } { 2 s ^ { 3 } \mu ^ { 2 } } , \frac { 3 \Delta _ { 1 } } { 2 s \mu } \right) .
|
| 212 |
+
$$
|
| 213 |
+
|
| 214 |
+
As $s$ increases, the RDP of scaled Skellam rapidly approaches that of Gaussian as the second term above approaches 0, suggesting that under practical regimes with moderate compression bit-width, Skellam should perform competitively compared to Gaussian. Another aspect worth noting is that rounding vector coordinates from reals to integers can inflate the $\ell _ { 2 }$ -sensitivity $\Delta _ { 2 }$ , and thus more noise is required for the same privacy. To this end, we leverage the conditional rounding procedure introduced in [25] to obtain a bounded norm on the scaled and rounded client vector:
|
| 215 |
+
|
| 216 |
+
Proposition 4.2 (Norm of stochastically rounded vector [25]). Let $\tilde { x }$ be a stochastic rounding of vector $x \in \mathbb { R } ^ { d }$ to the integer grid $\mathbb { Z } ^ { d }$ . Then, for $\beta \in ( 0 , 1 )$ , we have
|
| 217 |
+
|
| 218 |
+
$$
|
| 219 |
+
\begin{array} { r } { \mathbb { P } \left[ \| \tilde { x } \| _ { 2 } ^ { 2 } \leq \| x \| _ { 2 } ^ { 2 } + d / 4 + \sqrt { 2 \log ( 1 / \beta ) } \cdot \left( \| x \| _ { 2 } + \sqrt { d } / 2 \right) \right] \geq 1 - \beta . } \end{array}
|
| 220 |
+
$$
|
| 221 |
+
|
| 222 |
+
Conditional rounding is thus defined as retrying the stochastic rounding on $x _ { i }$ until $\| \tilde { x } _ { i } \| _ { 2 } ^ { 2 }$ is within the probabilistic bound above (which also gives the inflated sensitivity $\tilde { \Delta } _ { 2 }$ ). We can then add Skellam noise to the aggregate $\sum _ { i } \tilde { x } _ { i }$ according to $\mathrm { { \bar { \Delta } } } _ { 2 }$ before undoing the quantization (unscaling). Note that a larger scaling $s$ before rounding reduces the norm inflation and the extra noise needed (Fig. 3 right).
|
| 223 |
+
|
| 224 |
+
Skellam for distributed DP with secure aggregation A stronger notion of privacy in FL can be obtained via the distributed DP model [25] that leverages secure aggregation (SecAgg [12]). The fact that the Skellam distribution is closed under summation allows us to easily extend from central DP to distributed DP. Under this model, the client vectors are quantized as in central DP model, but the Skellam noise is now added locally with variance $\mu / n$ . Then, the noisy client updates are summed via SecAgg ( $b$ bits per coordinate for field size $2 ^ { b }$ ) which only reveals the noisy aggregate to the server. While the local noise might be insufficient for local DP guarantees, the aggregated noise at the server provides privacy and utility comparable to the central DP model, thus removing trust away from the central aggregator. Note that the modulo operations introduced by SecAgg does not impact privacy as it can be viewed as a post-processing of an already differentially private query.
|
| 225 |
+
|
| 226 |
+
We remark on several properties of the distributed Skellam compared to the distributed discrete Gaussian (DDGauss [25]). (1) DDGauss is not closed under summation, and the divergence between discrete Gaussians can lead to notable privacy degradation in settings such as quantile estimation [6] and federated analytics [42] with sufficiently large number of clients and small local noises (see also the left side of Fig. 2 and Fig. 3). While scaling mitigates this issue, it also requires additional bit-width which makes Skellam attractive under tight communication constraints. (2) Sampling from Skellam only requires sampling from Poisson, for which efficient implementations are widely available in numerical software packages. While efficient discrete Gaussian sampling has also been explored in the lattice-based cryptography community (e.g., [43, 18, 38]), we believe the accessibility of Skellam samplers would help facilitate the deployment of DP to FL settings with mobile and edge devices. See Appendix D for more discussion. (3) In practice where $s \gg 1$ (dictated by bit-width $b$ ), both Skellam (cf. Cor. 4.1) and DDGauss (with an exponentially small divergence) quickly approaches Gaussian under RDP, and any differences will be negligible (Fig. 3).
|
| 227 |
+
|
| 228 |
+
# 5 Empirical Evaluation
|
| 229 |
+
|
| 230 |
+
In this section, we empirically evaluate the Skellam mechanism on two sets of experiments: distributed mean estimation and federated learning. In both cases, we focus on the distributed DP model, but note that the Skellam mechanism can be easily adapted to the central DP setting as discussed in the earlier section. Unless otherwise stated, we use RDP accounting for all experiments due to the high-dimensional data and the ease of composition (Section 3). To obtain $\Delta _ { 1 }$ for Skellam RDP, we note that $\Delta _ { 1 } \leq \Delta _ { 2 } \cdot \operatorname* { m i n } ( \sqrt { d } , \Delta _ { 2 } )$ since $\Delta _ { 1 } \leq \sqrt { d } \Delta _ { 2 }$ in general and $\Delta _ { 1 } \leq \Delta _ { 2 } ^ { 2 }$ for integers.
|
| 231 |
+
|
| 232 |
+
Under the distributed DP model, we also introduce a random orthogonal transformation [29, 2, 25] before discretizing and aggregating the client vectors (which can be reverted after the aggregation); this makes the vector coordinates sub-Gaussian and helps spread the magnitudes of the vector coordinates across all dimensions, thus reducing the errors from quantization and potential wraparound from SecAgg modulo operations. Moreover, by approximating the sub-exponential tail of the Skellam distribution as sub-Gaussian, we can derive a heuristic for choosing $s$ following [25] based on a bound on the variance $\tilde { \sigma } ^ { 2 }$ of the aggregated signal, as $\tilde { \sigma } ^ { 2 } \le c ^ { 2 } n ^ { 2 } / d + \bar { n } / ( 4 s ^ { 2 } ) + \mu$ . We choose $s$ such that $2 k \tilde { \sigma }$ are bounded within the SecAgg field size $2 ^ { b }$ , where $k$ is a small constant.
|
| 233 |
+
|
| 234 |
+
Algorithm 1 summarizes the aggregation procedure for the distributed Skellam mechanism via secure
|
| 235 |
+
|
| 236 |
+
Inputs: Private vector $x _ { i } \in \mathbb { R } ^ { \bar { d } }$ for each client $i$ ; $\ell _ { 2 }$ clip norm $c > 0$ ; Bit-width $b$ ; Target central
|
| 237 |
+
noise variance $\mu > 0$ ; Number of clients $n$ ; Signal bound multiplier $k > 0$ ; Bias $\beta \in [ 0 , 1 )$ .
|
| 238 |
+
Shared randomness: $d \times d$ diagonal matrix $D$ with uniformly random $\{ - 1 , + 1 \}$ values, where
|
| 239 |
+
$d \geq \bar { d }$ is the nearest power of 2.
|
| 240 |
+
Shared scale: Obtain scaling factor $s$ such that $2 ^ { b } = 2 k \tilde { \sigma } = 2 k \sqrt { c ^ { 2 } n ^ { 2 } / d + n / ( 4 s ^ { 2 } ) + \mu } .$
|
| 241 |
+
Procedure CLIENTPROCEDURE $\mathbf { \chi } _ { \left( x _ { i } , s , D \right) }$ Clip and scale vector $\hat { x } _ { i } = s \cdot \operatorname* { m i n } ( 1 , c / \| x _ { i } \| _ { 2 } ) \cdot x _ { i }$ , and pad to $\tilde { d }$ dimensions with zeros. Random rotation: $\check { x } _ { i } = \tilde { H } _ { d } D \hat { x } _ { i }$ where $\begin{array} { r } { \tilde { H } _ { d } = \frac { 1 } { \sqrt { d } } H _ { d } } \end{array}$ is the normalized $d \times d$ Hadamard matrix. repeat {conditional stochastic rounding} Stochastically round the coordinates of of ${ \check { x } } _ { i }$ to the integer grid to produce ${ \tilde { x } } _ { i }$ until $\| \widetilde x _ { i } \| _ { 2 } ^ { 2 } \le \operatorname* { m i n } \bigg \{ \Big ( s c + \sqrt d \Big ) ^ { 2 } , s ^ { 2 } c ^ { 2 } + d / 4 + \sqrt { 2 \log ( 1 / \beta ) } \cdot \Big ( s c + \sqrt d / 2 \Big ) \bigg \} .$ . Local noising: Sample noise vector $y _ { i } \in \mathbb { Z } ^ { d }$ where each entry is sampled from $\operatorname { S k } _ { 0 , s ^ { 2 } \mu / n }$ . return $z _ { i } = \tilde { x } _ { i } + y _ { i }$ under the SecAgg protocol with modulo bit-width $b$ .
|
| 242 |
+
Procedure SERVERPROCEDURE $( z , s , D )$ $\{ z$ is the modular sum of $z _ { i }$ under bit-width $b$ } return $\begin{array} { r } { \bar { x } = \frac { 1 } { s } D \tilde { H } _ { d } ^ { \top } z } \end{array}$ , with $\textstyle { \bar { x } } \approx \sum _ { i } x _ { i } \in \mathbb { R } ^ { d }$ .
|
| 243 |
+
|
| 244 |
+

|
| 245 |
+
Figure 4: Distributed mean estimation with the distributed Skellam mechanism.
|
| 246 |
+
|
| 247 |
+
aggregation as well as the parameters used for the experiments. In summary, we have an $\ell _ { 2 }$ clip norm $c > 0$ ; per-coordinate bit-width $b$ ; target central noise variance $\mu > 0$ ; number of clients $n$ ; signal bound multiplier $k > 0$ ; and rounding bias $\beta \in [ 0 , 1 )$ . We fix $\beta = e ^ { - 1 / 2 }$ for all experiments. Note that the per-coordinate bit-width $b$ is for the aggregated sum as it determines the field size of SecAgg. For federated learning, we also consider the number of rounds $T$ and the total number of clients $N$ (thus the uniform sampling ratio $q = n / N$ at every round). Our experiments are implemented in Python, TensorFlow Privacy [32], and TensorFlow Federated [24]. See also Appendix for additional results and more details on the experimental setup.
|
| 248 |
+
|
| 249 |
+
# 5.1 Distributed Mean Estimation (DME)
|
| 250 |
+
|
| 251 |
+
We first consider DME as the generalization of (single round) FL. We randomly generate $n$ client vectors $X = \{ x _ { i } \} _ { i = 1 } ^ { n }$ from the $d$ -dimensional $\ell _ { 2 }$ sphere with radius $c = 1 0$ , and compute the true mean $\begin{array} { r } { \widehat { x } = \frac { 1 } { n } \sum _ { i } ^ { n } x _ { i } } \end{array}$ 2 . We then compute the private estimate of $\widehat { x }$ with the distributed Skellam mechanism (Algorithm 1) as $\bar { x }$ . For a strong baseline, we use the analytic Gaussian mechanism [9] with tight accounting (see also Figure 2). In Figure 4, we plot the MSE as $\| \widehat { x } - \bar { x } \| _ { 2 } ^ { 2 } / d$ with $9 5 \%$ confidence interval (small shaded region) over 10 dataset initializations across different values of $b , d$ , and $n$ . Results demonstrate that Skellam can match Gaussian even with $n = 1 0 0 0 0$ clients as long as the bit-width is sufficient. We emphasize that the communication cost $b$ depends logarithmically on $n$ , and to put numbers into context, Google’s production next-word prediction models [23, 39] use $n \leq 5 0 0$ and the production DP language model [40] uses $n = 2 0 0 0 0$ .
|
| 252 |
+
|
| 253 |
+
# 5.2 Federated Learning
|
| 254 |
+
|
| 255 |
+
Setup We evaluate on three public federated datasets with real-world characteristics: Federated EMNIST [16], Shakespeare [31, 14], and Stack Overflow next word prediction (SO-NWP [8]). EMNIST is an image classification dataset for hand-written digits and letters; Shakespeare is a text dataset for next-character-prediction based on the works of William Shakespeare; and SO-NWP is a large-scale text dataset for next-word-prediction based on user questions/answers from stackoverflow.com. We emphasize that all datasets have natural client heterogeneity that are representative of practical FL problems: the images in EMNIST are grouped the writer of the handwritten digits, the lines in Shakespeare are grouped by the speaking role, and the sentences in SO-NWP are grouped by the corresponding Stack Overflow user. We train a small CNN with model size $\bar { d } < 2 ^ { 2 0 }$ for EMNIST and use the recurrent models defined in [41] for Shakespeare and SO-NWP. The hyperparameters for the experiments follow those from [25, 6, 27, 41] and tuning is limited. For EMNIST, we follow [25] and fix $c = 0 . 0 3$ , $n = 1 0 0$ , $T = 1 5 0 0$ , client learning rate $\eta _ { \mathrm { c l i e n t } } = 0 . 3 2$ , server learning rate $\eta _ { \mathrm { s e r v e r } } = 1$ , and client batch size $m = 2 0$ . For Shakespeare, we follow [6] and fix $n = 1 0 0$ , $T = 1 2 0 0$ , $\eta _ { \mathrm { c l i e n t } } = 1$ , $\eta _ { \mathrm { s e r v e r } } = 0 . 3 2$ , and $m = 4$ , and we sweep $c \in \{ 0 . 2 5 , 0 . 5 \}$ . For SO-NWP, we follow [27] and fix $c = 0 . 3$ , $n = 1 0 0$ , $T = 1 6 0 0$ , $\eta _ { \mathrm { c l i e n t } } = 0 . 5$ , and $m = 1 6$ , and we sweep $\eta _ { \mathrm { s e r v e r } } \in \{ 0 . 3 , 1 \}$ and limit max examples per client to 256. In all cases, clients train for 1 epoch on their local datasets, and the client updates are weighted uniformly (as opposed to weighting by number of examples). See Appendix for more results and full details on datasets, models, and hyperparameters.
|
| 256 |
+
|
| 257 |
+

|
| 258 |
+
Figure 5: Federated learning with the distributed Skellam mechanism. DDGauss: Distributed Discrete Gaussian [25]. Left / Middle / Right: Test accuracies on EMNIST / Shakespeare / Stack Overflow NWP across different $\varepsilon$ and $b$ . $\delta$ is set to $1 / N , 1 0 ^ { - 6 } , 1 0 ^ { - 6 }$ , respectively. For Shakespeare, privacy is reported with a hypothetical population size $N = 1 0 ^ { 6 }$ .
|
| 259 |
+
|
| 260 |
+
Results Figure 5 summarizes the FL experiments. For EMNIST and Shakespeare, we report the average test accuracy over the last 100 rounds. For SO-NWP, we report the top-1 accuracy (without padding, out-of-vocab, or begining/end-of-sentence tokens) on the test set. The results indicate that Skellam performs as good as Gaussian despite relying on generic RDP amplification via sampling [51] (cf. Fig. 3) and that Skellam matches DDG consistently under realistic regimes. This bears significant practical relevance given the advantages of Skellam over DDG in real-world deployments.
|
| 261 |
+
|
| 262 |
+
# 6 Conclusion
|
| 263 |
+
|
| 264 |
+
We have introduced the multi-dimensional Skellam mechanism for federated learning. We analyzed the Skellam mechanism through the lens of approximate DP, privacy loss distributions, and Rényi divergences, and derived a sharp RDP bound that enables Skellam to match Gaussian and discrete Gaussian in practical settings as demonstrated by our large-scale experiments. Since Skellam is closed under summation and efficient samplers are widely available, it represents an attractive alternative to distributed discrete Gaussian as it easily extends from the central DP model to the distributed DP model. Being a discrete mechanism can also bring potential communication savings over continuous mechanisms and make Skellam less prone to attacks that exploit floating-point arithmetic on digital computers. Some interesting future work includes: (1) our scalar PLD analysis for Skellam suggests room for improvements on our multi-dimensional analysis via a complete PLD characterization, and (2) our results on FL may be further improved via a targeted analysis for RDP amplification via sampling akin to [37]. Overall, this work is situated within the active area of private machine learning and aims at making ML more trustworthy. One potential negative impact is that our method could be (deliberately or inadvertently) misused, such as sampling the wrong noise or using a minuscule scaling factor, to provide non-existent privacy guarantees for real users’ data. We nevertheless believe our results have positive impact as they facilitate the deployment of differential privacy in practice.
|
| 265 |
+
|
| 266 |
+
# Funding Transparency Statement
|
| 267 |
+
|
| 268 |
+
The authors were employed at and directly supported by Google. No third party funding was received by any of the authors to pursue this work.
|
| 269 |
+
|
| 270 |
+
# References
|
| 271 |
+
|
| 272 |
+
[1] Martin Abadi, Andy Chu, Ian Goodfellow, H Brendan McMahan, Ilya Mironov, Kunal Talwar, and Li Zhang. Deep learning with differential privacy. In Proceedings of the 2016 ACM SIGSAC conference on computer and communications security, pages 308–318, 2016. [2] Naman Agarwal, Ananda Theertha Suresh, Felix Xinnan X Yu, Sanjiv Kumar, and Brendan McMahan. cpSGD: Communication-efficient and differentially-private distributed sgd. In Advances in Neural Information Processing Systems, pages 7564–7575, 2018. [3] Maruan Al-Shedivat, Jennifer Gillenwater, Eric Xing, and Afshin Rostamizadeh. Federated learning via posterior averaging: A new perspective and practical algorithms. In ICLR, 2021. [4] Martin R. Albrecht and Michael Walter. dgs, Discrete Gaussians over the Integers. Available at https: //bitbucket.org/malb/dgs, 2018. [5] Donald E Amos. Computation of modified bessel functions and their ratios. Mathematics of Computation, 28(125):239–251, 1974. [6] Galen Andrew, Om Thakkar, H Brendan McMahan, and Swaroop Ramaswamy. Differentially private learning with adaptive clipping. arXiv preprint arXiv:1905.03871, 2019. [7] S. Asoodeh, J. Liao, F. P. Calmon, O. Kosut, and L. Sankar. A better bound gives a hundred rounds: Enhanced privacy guarantees via f-divergences. In 2020 IEEE International Symposium on Information Theory (ISIT), pages 920–925, 2020. [8] The TensorFlow Federated Authors. Tensorflow federated stack overflow dataset, 2019. [9] Borja Balle and Yu-Xiang Wang. Improving the gaussian mechanism for differential privacy: Analytical calibration and optimal denoising. In International Conference on Machine Learning, pages 394–403. PMLR, 2018.
|
| 273 |
+
[10] Raef Bassily, Adam Smith, and Abhradeep Thakurta. Private empirical risk minimization: Efficient algorithms and tight error bounds. In 2014 IEEE 55th Annual Symposium on Foundations of Computer Science, pages 464–473. IEEE, 2014.
|
| 274 |
+
[11] James Bell, K. A. Bonawitz, Adrià Gascón, Tancrède Lepoint, and Mariana Raykova. Secure singleserver aggregation with (poly)logarithmic overhead. Cryptology ePrint Archive, Report 2020/704, 2020. https://eprint.iacr.org/2020/704.
|
| 275 |
+
[12] Keith Bonawitz, Vladimir Ivanov, Ben Kreuter, Antonio Marcedone, H Brendan McMahan, Sarvar Patel, Daniel Ramage, Aaron Segal, and Karn Seth. Practical secure aggregation for privacy-preserving machine learning. In proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security, pages 1175–1191, 2017.
|
| 276 |
+
[13] Mark Bun and Thomas Steinke. Concentrated differential privacy: Simplifications, extensions, and lower bounds. In Theory of Cryptography Conference, pages 635–658. Springer, 2016.
|
| 277 |
+
[14] Sebastian Caldas, Sai Meher Karthik Duddu, Peter Wu, Tian Li, Jakub Konecnˇ y, H Brendan McMa- \` han, Virginia Smith, and Ameet Talwalkar. Leaf: A benchmark for federated settings. arXiv preprint arXiv:1812.01097, 2018.
|
| 278 |
+
[15] Clément Canonne, Gautam Kamath, and Thomas Steinke. The discrete gaussian for differential privacy. In NeurIPS, 2020.
|
| 279 |
+
[16] Gregory Cohen, Saeed Afshar, Jonathan Tapson, and Andre Van Schaik. Emnist: Extending mnist to handwritten letters. In 2017 International Joint Conference on Neural Networks (IJCNN), pages 2921–2926. IEEE, 2017.
|
| 280 |
+
[17] Google Differential Privacy Team. Privacy loss distributions. https://github.com/google/ differential-privacy/blob/master/accounting/docs/Privacy_Loss_Distributions.pdf. 2020.
|
| 281 |
+
[18] Nagarjun C Dwarakanath and Steven D Galbraith. Sampling from discrete gaussians for lattice-based cryptography on a constrained device. Applicable Algebra in Engineering, Communication and Computing, 25(3):159–180, 2014.
|
| 282 |
+
[19] Cynthia Dwork, Krishnaram Kenthapadi, Frank McSherry, Ilya Mironov, and Moni Naor. Our data, ourselves: Privacy via distributed noise generation. In Annual International Conference on the Theory and Applications of Cryptographic Techniques, pages 486–503. Springer, 2006.
|
| 283 |
+
[20] Cynthia Dwork, Frank McSherry, Kobbi Nissim, and Adam Smith. Calibrating noise to sensitivity in private data analysis. In Theory of cryptography conference, pages 265–284. Springer, 2006.
|
| 284 |
+
[21] Cynthia Dwork and Guy N Rothblum. Concentrated differential privacy. arXiv preprint arXiv:1603.01887, 2016.
|
| 285 |
+
[22] Cynthia Dwork, Guy N Rothblum, and Salil Vadhan. Boosting and differential privacy. In 2010 IEEE 51st Annual Symposium on Foundations of Computer Science, pages 51–60. IEEE, 2010.
|
| 286 |
+
[23] Andrew Hard, Kanishka Rao, Rajiv Mathews, Swaroop Ramaswamy, Françoise Beaufays, Sean Augenstein, Hubert Eichner, Chloé Kiddon, and Daniel Ramage. Federated learning for mobile keyboard prediction. arXiv preprint arXiv:1811.03604, 2018.
|
| 287 |
+
[24] Alex Ingerman and Krzys Ostrowski. Introducing tensorflow federated, 2019.
|
| 288 |
+
[25] Peter Kairouz, Ziyu Liu, and Thomas Steinke. The distributed discrete gaussian mechanism for federated learning with secure aggregation. In International Conference on Machine Learning. PMLR, 2021.
|
| 289 |
+
[26] Peter Kairouz, Brendan McMahan, et al. Advances and open problems in federated learning. arXiv preprint arXiv:1912.04977, 2019.
|
| 290 |
+
[27] Peter Kairouz, Brendan McMahan, Shuang Song, Om Thakkar, Abhradeep Thakurta, and Zheng Xu. Practical and private (deep) learning without sampling or shuffling. arXiv preprint arXiv:2103.00039, 2021.
|
| 291 |
+
[28] Peter Kairouz, Sewoong Oh, and Pramod Viswanath. The composition theorem for differential privacy. In International conference on machine learning, pages 1376–1385. PMLR, 2015.
|
| 292 |
+
[29] Jakub Konecnˇ y, H Brendan McMahan, Felix X Yu, Peter Richtárik, Ananda Theertha Suresh, and \` Dave Bacon. Federated learning: Strategies for improving communication efficiency. arXiv preprint arXiv:1610.05492, 2016.
|
| 293 |
+
[30] Antti Koskela, Joonas Jälkö, and Antti Honkela. Computing tight differential privacy guarantees using fft. In International Conference on Artificial Intelligence and Statistics, pages 2560–2569. PMLR, 2020.
|
| 294 |
+
[31] Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas. Communication-efficient learning of deep networks from decentralized data. In Artificial Intelligence and Statistics, pages 1273–1282, 2017.
|
| 295 |
+
[32] H Brendan McMahan, Galen Andrew, Ulfar Erlingsson, Steve Chien, Ilya Mironov, Nicolas Papernot, and Peter Kairouz. A general approach to adding differential privacy to iterative training procedures. arXiv preprint arXiv:1812.06210, 2018.
|
| 296 |
+
[33] H Brendan McMahan, Daniel Ramage, Kunal Talwar, and Li Zhang. Learning differentially private recurrent language models. In ICLR, 2018.
|
| 297 |
+
[34] Sebastian Meiser and Esfandiar Mohammadi. Tight on budget? tight bounds for r-fold approximate differential privacy. In Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security, pages 247–264, 2018.
|
| 298 |
+
[35] Ilya Mironov. On significance of the least significant bits for differential privacy. In Proceedings of the 2012 ACM conference on Computer and communications security, pages 650–661, 2012.
|
| 299 |
+
[36] Ilya Mironov. Rényi differential privacy. In 2017 IEEE 30th Computer Security Foundations Symposium (CSF), pages 263–275. IEEE, 2017.
|
| 300 |
+
[37] Ilya Mironov, Kunal Talwar, and Li Zhang. Rényi differential privacy of the sampled gaussian mechanism. arXiv preprint arXiv:1908.10530, 2019.
|
| 301 |
+
[38] Thomas Prest, Thomas Ricosset, and Mélissa Rossi. Simple , fast and constant-time gaussian sampling over the integers for falcon. In Second PQC Standardization Conference, 2019.
|
| 302 |
+
[39] Swaroop Ramaswamy, Rajiv Mathews, Kanishka Rao, and Françoise Beaufays. Federated learning for emoji prediction in a mobile keyboard. arXiv preprint arXiv:1906.04329, 2019.
|
| 303 |
+
[40] Swaroop Ramaswamy, Om Thakkar, Rajiv Mathews, Galen Andrew, H Brendan McMahan, and Françoise Beaufays. Training production language models without memorizing user data. arXiv preprint arXiv:2009.10031, 2020.
|
| 304 |
+
[41] Sashank Reddi, Zachary Charles, Manzil Zaheer, Zachary Garrett, Keith Rush, Jakub Konecnˇ y, Sanjiv \` Kumar, and H Brendan McMahan. Adaptive federated optimization. arXiv preprint arXiv:2003.00295, 2020.
|
| 305 |
+
[42] Google Research. Federated analytics: Collaborative data science without data collection, May 2020.
|
| 306 |
+
[43] Sujoy Sinha Roy, Frederik Vercauteren, and Ingrid Verbauwhede. High precision discrete gaussian sampling on fpgas. In International Conference on Selected Areas in Cryptography, pages 383–401. Springer, 2013.
|
| 307 |
+
[44] Diego Ruiz-Antolín and Javier Segura. A new type of sharp bounds for ratios of modified bessel functions. Journal of Mathematical Analysis and Applications, 443(2):1232–1246, 2016.
|
| 308 |
+
[45] Aaron Schein, Zhiwei Steven Wu, Alexandra Schofield, Mingyuan Zhou, and Hanna Wallach. Locally private bayesian inference for count models. In International Conference on Machine Learning, pages 5638–5648. PMLR, 2019.
|
| 309 |
+
[46] Shuang Song, Kamalika Chaudhuri, and Anand D Sarwate. Stochastic gradient descent with differentially private updates. In 2013 IEEE Global Conference on Signal and Information Processing, pages 245–248. IEEE, 2013.
|
| 310 |
+
[47] VR Thiruvenkatachar and TS Nanjundiah. Inequalities concerning bessel functions and orthogonal polynomials. In Proceedings of the Indian Academy of Sciences-Section A, volume 33, page 373. Springer, 1951.
|
| 311 |
+
[48] Florian Tramèr and Dan Boneh. Differentially private learning needs better features (or much more data). arXiv preprint arXiv:2011.11660, 2020.
|
| 312 |
+
[49] Filipp Valovich and Francesco Alda. Computational differential privacy from lattice-based cryptography. In International Conference on Number-Theoretic Methods in Cryptology, pages 121–141. Springer, 2017.
|
| 313 |
+
[50] Hongxu Yin, Arun Mallya, Arash Vahdat, Jose M Alvarez, Jan Kautz, and Pavlo Molchanov. See through gradients: Image batch recovery via gradinversion. arXiv preprint arXiv:2104.07586, 2021.
|
| 314 |
+
[51] Yuqing Zhu and Yu-Xiang Wang. Poission subsampled rényi differential privacy. In International Conference on Machine Learning, pages 7634–7642. PMLR, 2019.
|
md/train/eJIJF3-LoZO/eJIJF3-LoZO.md
ADDED
|
@@ -0,0 +1,332 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# CONCEPT LEARNERS FOR FEW-SHOT LEARNING
|
| 2 |
+
|
| 3 |
+
Kaidi $\mathbf { C a o ^ { * } }$ , Maria Brbic´∗, Jure Leskovec
|
| 4 |
+
Department of Computer Science
|
| 5 |
+
Stanford University
|
| 6 |
+
{kaidicao, mbrbic, jure}@cs.stanford.edu
|
| 7 |
+
|
| 8 |
+
# ABSTRACT
|
| 9 |
+
|
| 10 |
+
Developing algorithms that are able to generalize to a novel task given only a few labeled examples represents a fundamental challenge in closing the gap between machine- and human-level performance. The core of human cognition lies in the structured, reusable concepts that help us to rapidly adapt to new tasks and provide reasoning behind our decisions. However, existing meta-learning methods learn complex representations across prior labeled tasks without imposing any structure on the learned representations. Here we propose COMET, a meta-learning method that improves generalization ability by learning to learn along humaninterpretable concept dimensions. Instead of learning a joint unstructured metric space, COMET learns mappings of high-level concepts into semi-structured metric spaces, and effectively combines the outputs of independent concept learners. We evaluate our model on few-shot tasks from diverse domains, including finegrained image classification, document categorization and cell type annotation on a novel dataset from a biological domain developed in our work. COMET significantly outperforms strong meta-learning baselines, achieving $6 { - } 1 5 \%$ relative improvement on the most challenging 1-shot learning tasks, while unlike existing methods providing interpretations behind the model’s predictions.
|
| 11 |
+
|
| 12 |
+
# 1 INTRODUCTION
|
| 13 |
+
|
| 14 |
+
Deep learning has reached human-level performance on domains with the abundance of large-scale labeled training data. However, learning on tasks with a small number of annotated examples is still an open challenge. Due to the lack of training data, models often overfit or are too simplistic to provide good generalization. On the contrary, humans can learn new tasks very quickly by drawing upon prior knowledge and experience. This ability to rapidly learn and adapt to new environments is a hallmark of human intelligence.
|
| 15 |
+
|
| 16 |
+
Few-shot learning (Miller et al., 2000; Fei-Fei et al., 2006; Koch et al., 2015) aims at addressing this fundamental challenge by designing algorithms that are able to generalize to new tasks given only a few labeled training examples. Meta-learning (Schmidhuber, 1987; Bengio et al., 1992) has recently made major advances in the field by explicitly optimizing the model’s ability to generalize, or learning how to learn, from many related tasks (Snell et al., 2017; Vinyals et al., 2016; Ravi & Larochelle, 2017; Finn et al., 2017). Motivated by the way humans effectively use prior knowledge, meta-learning algorithms acquire prior knowledge over previous tasks so that new tasks can be efficiently learned from a small amount of data. However, recent works (Chen et al., 2019b; Raghu et al., 2020) show that simple baseline methods perform comparably to existing meta-learning methods, opening the question about which components are crucial for rapid adaptation and generalization.
|
| 17 |
+
|
| 18 |
+
Here, we argue that there is an important missing piece in this puzzle. Human knowledge is structured in the form of reusable concepts. For instance, when we learn to recognize new bird species we are already equipped with the critical concepts, such as wing, beak, and feather. We then focus on these specific concepts and combine them to identify a new species. While learning to recognize new species is challenging in the complex bird space, it becomes remarkably simpler once the reasoning is structured into familiar concepts. Moreover, such a structured way of cognition gives us the ability to provide reasoning behind our decisions, such as “ravens have thicker beaks than crows, with more of a curve to the end”. We argue that this lack of structure is limiting the generalization ability of the current meta-learners. The importance of compositionality for few-shot learning was emphasized in (Lake et al., 2011; 2015) where hand-designed features of strokes were combined using Bayesian program learning.
|
| 19 |
+
|
| 20 |
+

|
| 21 |
+
Figure 1: Along each concept dimension, COMET learns concept embeddings using independent concept learners and compares them to concept prototypes. COMET then effectively aggregates information across concept dimensions, assigning concept importance scores to each dimension.
|
| 22 |
+
|
| 23 |
+
Motivated by the structured form of human cognition, we propose COMET, a meta-learning method that discovers generalizable representations along human-interpretable concept dimensions. COMET learns a unique metric space for each concept dimension using concept-specific embedding functions, named concept learners, that are parameterized by deep neural networks. Along each high-level dimension, COMET defines concept prototypes that reflect class-level differences in the metric space of the underlying concept. To obtain final predictions, COMET effectively aggregates information from diverse concept learners and concept prototypes. Three key aspects lead to a strong generalization ability of our approach: (i) semi-structured representation learning, (ii) concept-specific metric spaces described with concept prototypes, and (iii) ensembling of many models. The latter assures that the combination of diverse and accurate concept learners improves the generalization ability of the base learner (Hansen & Salamon, 1990; Dvornik et al., 2019). Remarkably, the high-level universe of concepts that are used to guide our algorithm can be discovered in a fully unsupervised way, or we can use external knowledge bases to define concepts. In particular, we can get a large universe of noisy, incomplete and redundant concepts and COMET learns which subsets of those are important by assigning local and global concept importance scores. Unlike existing methods (Snell et al., 2017; Vinyals et al., 2016; Sung et al., 2018; Gidaris & Komodakis, 2018), COMET’s predictions are interpretable—an advantage especially important in the few-shot learning setting, where predictions are based only on a handful of labeled examples making it hard to trust the model. As such, COMET is the first domain-agnostic interpretable meta-learning approach.
|
| 24 |
+
|
| 25 |
+
We demonstrate the effectiveness of our approach on tasks from extremely diverse domains, including fine-grained image classification in computer vision, document classification in natural language processing, and cell type annotation in biology. In the biological domain, we conduct the first systematic comparison of meta-learning algorithms. We develop a new meta-learning dataset and define a novel benchmark task to characterize single-cell transcriptome of all mouse organs (Consortium, 2018; 2020). Additionally, we consider the scenario in which concepts are not given in advance, and test COMET’s performance with automatically extracted visual concepts. Our experimental results show that on all domains COMET significantly improves generalization ability, achieving $6 { - } 1 5 \%$ relative improvement over state-of-the-art methods in the most challenging 1-shot task. Furthermore, we demonstrate the ability of COMET to provide interpretations behind the model’s predictions, and support our claim with quantitative and qualitative evaluations of the generated explanations.
|
| 26 |
+
|
| 27 |
+
# 2 PROPOSED METHOD
|
| 28 |
+
|
| 29 |
+
Problem formulation. In few-shot classification, we assume that we are given a labeled training set $\mathcal { D } _ { t r }$ , an unlabeled query set $\mathcal { D } _ { q r }$ , and a support set $s$ consisting of a few labeled data points that share the label space with the query set. Label space between training and query set is disjoint, i.e., $\{ Y _ { t r } \} \cap \{ Y _ { q r } \} \stackrel { \cdot } { = } \emptyset$ , where $\{ Y _ { t r } \}$ denotes label space of training set and $\{ Y _ { q r } \}$ denotes label space of query set. Each labeled data point $\left( \mathbf { x } , y \right)$ consists of a $D$ -dimensional feature vector $\mathbf { x } \in \mathbb { R } ^ { D }$ and a class label $y \in \{ 1 , . . . , K \}$ . Given a training set of previously labeled tasks $\mathcal { D } _ { t r }$ and the support set $s$ of a few labeled data points on a novel task, the goal is to train a model that can generalize to the novel task and label the query set $\mathcal { D } _ { q r }$ .
|
| 30 |
+
|
| 31 |
+
# 2.1 PRELIMINARIES
|
| 32 |
+
|
| 33 |
+
Episodic training. To achieve successful generalization to a new task, training of meta-learning methods is usually performed using sampled mini-batches called episodes (Vinyals et al., 2016). Each episode is formed by first sampling classes from the training set, and then sampling data points labeled with these classes. The sampled data points are divided into disjoint sets of: (i) a support set consisting of a few labeled data points, and (ii) a query set consisting of data points whose labels are used to calculate a prediction error. Given the sampled support set, the model minimizes the loss on the sampled query set in each episode. The key idea behind this meta-learning training scheme is to improve generalization of the model by trying to mimic the low-data regime encountered during testing. Episodes with balanced training sets are usually referred to as “N-way, $\mathbf { k }$ -shot” episodes where $N$ indicates number of classes per episode (“way”), and $k$ indicates number of support points (labeled training examples) per class (“shot”).
|
| 34 |
+
|
| 35 |
+
Prototypical networks. Our work is inspired by prototypical networks (Snell et al., 2017), a simple but highly effective metric-based meta-learning method. Prototypical networks learn a non-linear embedding function $f _ { \pmb \theta } : \mathbb R ^ { D } \mathbb R ^ { M }$ parameterized by a convolutional neural network. The main idea is to learn a function $f _ { \theta }$ such that in the $M$ -dimensional embedding space data points cluster around a single prototype representation $\mathbf { p } _ { k } \in \mathbb { R } ^ { M }$ for each class $k$ . Class prototype $\mathbf { p } _ { k }$ is computed as the mean vector of the support set labeled with the class $k$ :
|
| 36 |
+
|
| 37 |
+
$$
|
| 38 |
+
\mathbf { p } _ { k } = \frac { 1 } { | S _ { k } | } \sum _ { ( \mathbf { x } _ { i } , y _ { i } ) \in S _ { k } } f _ { \theta } ( \mathbf { x } _ { i } ) ,
|
| 39 |
+
$$
|
| 40 |
+
|
| 41 |
+
where $\boldsymbol { S _ { k } }$ denotes the subset of the support set $s$ belonging to the class $k$ . Given a query data point $\mathbf { x } _ { q }$ , prototypical networks output distribution over classes using the softmax function:
|
| 42 |
+
|
| 43 |
+
$$
|
| 44 |
+
p _ { \pmb { \theta } } ( y = k | \mathbf { x } _ { q } ) = \frac { \exp ( - d ( f _ { \pmb { \theta } } ( \mathbf { x } _ { q } ) , \mathbf { p } _ { k } ) ) } { \sum _ { k ^ { \prime } } \exp ( - d ( f _ { \pmb { \theta } } ( \mathbf { x } _ { q } ) , \mathbf { p } _ { k ^ { \prime } } ) ) } ,
|
| 45 |
+
$$
|
| 46 |
+
|
| 47 |
+
where $d : \mathbb { R } ^ { M } \mathbb { R }$ denotes the distance function. Query data point $\mathbf { x } _ { q }$ is assigned to the class with the minimal distance between the class prototype and embedded query point.
|
| 48 |
+
|
| 49 |
+
# 2.2 META-LEARNING VIA CONCEPT LEARNERS
|
| 50 |
+
|
| 51 |
+
Our main assumption is that input dimensions can be separated into subsets of related dimensions corresponding to high-level, human-interpretable concepts that guide the training. Such sets of potentially overlapping, noisy and incomplete human-interpretable dimensions exists in many realworld scenarios. For instance, in computer vision concepts can be assigned to image segments; in natural language processing to semantically related words; whereas in biology we can use external knowledge bases and ontologies. In many problems, concepts are already available as a prior domain knowledge (Ashburner et al., 2000; Murzin et al., 1995; Wah et al., 2011; Mo et al., 2019; Miller et al., 2000), or can be automatically generated using existing techniques (Blei et al., 2003; Zhang et al., 2018; Jakab et al., 2018). Intuitively, concepts can be seen as part-based representations of the input and reflect the way humans reason about the world. Importantly, we do not assume these concepts are clean or complete. On the contrary, we show that even if there are thousands of concepts, which are noisy, incomplete, overlapping, or redundant, they still provide useful guidance to the meta-learning algorithm.
|
| 52 |
+
|
| 53 |
+
Formally, let $\mathcal { C } = \{ \mathbf { c } ^ { ( j ) } \} _ { j = 1 } ^ { N }$ denote a set of $N$ concepts given/extracted as a prior knowledge, where each concept $\mathbf { c } ^ { ( j ) } \in \{ 0 , 1 \} ^ { D }$ is a binary vector such that $c _ { i } ^ { ( j ) } = 1$ if $i$ -th dimension should be used to describe the $j$ -th concept and $D$ denotes the dimensionality of the input. We do not impose any constraints on $\mathcal { C }$ , meaning that the concepts can be disjoint or overlap. Instead of learning single mapping function $f _ { \pmb { \theta } } : \mathbb { R } ^ { \breve { D } } \mathbb { R } ^ { M }$ across all dimensions, COMET separates original space into subspaces of predefined concepts and learns individual embedding function s f (j )θ : RD → RM for each concept $j$ (Figure 1). Concept embedding functions $f _ { \pmb { \theta } } ^ { ( j ) }$ , named concept learners, are non-linear functions parametrized by a deep neural network. Each concept learner $j$ produces its own concept prototypes p(j)k for class $k$ computed as the average of concept embeddings of data points in the support set:
|
| 54 |
+
|
| 55 |
+
$$
|
| 56 |
+
\mathbf { p } _ { k } ^ { ( j ) } = \frac { 1 } { | \cal S _ { k } | } \sum _ { ( \mathbf { x } _ { i } , y _ { i } ) \in \cal S _ { k } } f _ { \pmb \theta } ^ { ( j ) } ( \mathbf { x } _ { i } \circ \mathbf { c } ^ { ( j ) } ) ,
|
| 57 |
+
$$
|
| 58 |
+
|
| 59 |
+
where $\circ$ denotes Hadamard product. As a result, each class $k$ is represented with a set of $N$ concept prototypes $\{ \mathbf { p } _ { k } ^ { ( j ) } \} _ { j = 1 } ^ { N }$ .
|
| 60 |
+
|
| 61 |
+
Given a query data point $\mathbf { x } _ { q }$ , we compute its concept embeddings and estimate their distances to the concept prototypes of each class. We then aggregate the information across all concepts by taking sum over distances between concept embeddings and concept prototypes. Specifically, for each concept embedding $f _ { \pmb { \theta } } ^ { ( j ) } ( \mathbf { x } _ { q } \circ \mathbf { c } ^ { ( j ) } )$ we compute its distance to concept prototype $\mathbf { p } _ { k } ^ { ( j ) }$ of a given class $k$ , and sum distances across all concepts to obtain a distribution over support classes. The probability of assigning query point $\mathbf { x } _ { q }$ to $k$ -th class is then given by:
|
| 62 |
+
|
| 63 |
+
$$
|
| 64 |
+
p _ { \pmb { \theta } } ( y = k | \mathbf { x } _ { q } ) = \frac { \exp ( - \sum _ { j } d ( f _ { \pmb { \theta } } ^ { ( j ) } ( \mathbf { x } _ { q } \circ \mathbf { c } ^ { ( j ) } ) , \mathbf { p } _ { k } ^ { ( j ) } ) ) } { \sum _ { k ^ { \prime } } \exp ( - \sum _ { j } d ( f _ { \pmb { \theta } } ^ { ( j ) } ( \mathbf { x } _ { q } \circ \mathbf { c } ^ { ( j ) } ) , \mathbf { p } _ { k ^ { \prime } } ^ { ( j ) } ) ) } .
|
| 65 |
+
$$
|
| 66 |
+
|
| 67 |
+
The loss is computed as the negative log-likelihood $L _ { \pmb { \theta } } = - \log p _ { \pmb { \theta } } ( y = k | \mathbf { x } _ { q } )$ of the true class, and COMET is trained by minimizing the loss on the query samples of training set in the episodic fashion (Snell et al., 2017; Vinyals et al., 2016). In equation (4), we use euclidean distance as the distance function. Experimentally, we find that it outperforms cosine distance (Appendix B), which agrees with the theory and experimental findings in (Snell et al., 2017). We note that in order for distances to be comparable, it is crucial to normalize neural network layers using batch normalization (Ioffe & Szegedy, 2015).
|
| 68 |
+
|
| 69 |
+
# 2.3 INTERPRETABILITY
|
| 70 |
+
|
| 71 |
+
Local and global concept importance scores. In COMET, each class is represented with $N$ concept prototypes. Given a query data point $\mathbf { x } _ { q }$ , COMET assigns local concept importance scores by class comparing concept embbeddings of the query to concept prototypes. Specifically, for a concept $k$ the local importance score is obtained by inverted distance $\bar { d ( f _ { \pmb { \theta } } ^ { ( j ) } ( \mathbf { x } _ { q } \circ \mathbf { c } ^ { ( j ) } ) } , \mathbf { p } _ { k } ^ { ( j ) } )$ p(j)k ). Higher $j$ in a importance score indicates higher contribution in classifying query point to the class $k$ . Therefore, explanations for the query point $\mathbf { x } _ { q }$ are given by local concept importance scores, and directly provide reasoning behind each prediction. To provide global explanations that can reveal important concepts for a set of query points of interest or an entire class, COMET computes average distance between concept prototype and concept embeddings of all query points of interest. Inverted average distance reflects global concept importance score and can be used to rank concepts, providing insights on important concepts across a set of examples.
|
| 72 |
+
|
| 73 |
+
Discovering locally similar examples. Given a fixed concept $j$ , COMET can be used to rank data points based on the distance of their concept embeddings to the concept prototype p(j)k of class k. By ranking data points according to their similarity to the concept of interest, COMET can find examples that locally share similar patterns within the same class, or even across different classes. For instance, COMET can reveal examples that well reflect a concept prototype, or examples that are very distant from the concept prototype.
|
| 74 |
+
|
| 75 |
+
# 3 EXPERIMENTS
|
| 76 |
+
|
| 77 |
+
# 3.1 EXPERIMENTAL SETUP
|
| 78 |
+
|
| 79 |
+
Datasets. We apply COMET to four datasets from three diverse domains: computer vision, natural language processing (NLP) and biology. In the computer vision domain, we consider fine-grained image classification tasks. We use bird classification CUB-200-2011 (Wah et al., 2011) and flower classification Flowers-102 (Nilsback & Zisserman, 2008) datasets, referred to as CUB and Flowers hereafter. To define concepts, CUB provides part-based annotations, such as beak, wing, and tail of a bird. Parts were annotated by pixel location and visibility in each image. The total number of 15 parts/concepts is available; however concepts are incomplete and only a subset of them is present in an image. In case concept is not present, we rely on the prototypical concept to substitute for a missing concept. Based on the part coordinates, we create a surrounding bounding box with a fixed length to serve as the concept mask $\mathbf { c } ^ { ( j ) }$ . On both CUB and Flowers datasets, we test automatic concept extraction. In NLP domain, we apply COMET to benchmark document classification dataset Reuters (Lewis et al., 2004) consisting of news articles. To define concepts, we use all hypernyms of a given word based on the WordNet hiearchy (Lewis et al., 2004). On all datasets, we include a concept that captures the whole input, corresponding to a binary mask of all ones.
|
| 80 |
+
|
| 81 |
+
In the biology domain, we introduce a new cross-organ cell type classification task (Brbic et al., ´ 2020) together with a new dataset. We develop a novel single-cell transcriptomic dataset based on the Tabula Muris dataset (Consortium, 2018; 2020) that comprises 105, 960 cells of 124 cell types collected across 23 organs of the mouse model organism. The features correspond to the gene expression profiles of cells. Out of the 23, 341 genes, we select 2, 866 genes with high standardized log dispersion given their mean. We define concepts using Gene Ontology (Ashburner et al., 2000; Consortium, 2019), a resource which characterizes gene functional roles in a hierarchically structured vocabulary. We select Gene Ontology terms at level 3 that have at least 64 assigned genes, resulting in the total number of 190 terms that define our concepts. We propose the evaluation protocol in which different organs are used for training, validation, and test splits. Therefore, a meta-learner needs to learn to generalize to unseen cell types across organs. This novel dataset along with the cross-organ evaluation splits is publicly available at https://snap.stanford.edu/comet. To our knowledge, this is the first meta-learning dataset from the biology domain.
|
| 82 |
+
|
| 83 |
+
Baselines. We compare COMET’s performance to seven baselines, including FineTune/Baseline $^ { + + }$ (Chen et al., 2019b), Matching Networks (MatchingNet) (Vinyals et al., 2016), Model Agnostic Meta-Learning (MAML) (Finn et al., 2017), Relation Networks (Sung et al., 2018), MetaOptNet (Lee et al., 2019), DeepEMD (Zhang et al., 2020) and Prototypical Networks (ProtoNet) (Snell et al., 2017). DeepEMD is only applicable to image datasets.
|
| 84 |
+
|
| 85 |
+
We provide more details on evaluation and implementation in Appendix A. Code is publicly available at https://github.com/snap-stanford/comet.
|
| 86 |
+
|
| 87 |
+
# 3.2 RESULTS
|
| 88 |
+
|
| 89 |
+
Performance comparison. We report results on CUB, Tabula Muris and Reuters datasets with concepts given as a prior domain knowledge in Table 1. COMET outperforms all baselines by a remarkably large margin on all datasets. Specifically, COMET achieves $9 . 5 \%$ and $9 . 3 \%$ average improvements over the best performing baseline in the 1-shot and 5-shot tasks across datasets. Notably, COMET improves the result of the ProtoNet baseline by $1 9 \mathrm { - } 2 3 \%$ in the 1-shot tasks across datasets. COMET’s substiantial improvement are retained with the deeper Conv-6 backbone (Appendix C). To confirm that the improvements indeed come from concept learners and not from additional weights, we compare COMET to ensemble of prototypical networks, and further evaluate performance of COMET with shared weights across all concepts. Results shown in Table 2 demonstrate that COMET achieves significantly better performance than the ensemble of ProtoNets even when the weights across concepts are shared. Of note, COMET’s performance is only slightly affected with shared weights across concepts. More experimental details are provided in Appendix D.
|
| 90 |
+
|
| 91 |
+
Effect of number of concepts. We systematically evaluate the effect of the number of concepts on COMET’s performance on CUB and Tabula Muris datasets (Figure 2). In particular, we start from ProtoNet’s result that can be seen as using a single concept in COMET that covers all dimensions of the input. We then gradually increase number of concepts and train and evaluate COMET with the selected number of concepts. For the CUB dataset, we add concepts based on their visibility frequency, whereas on the Tabula Muris we are not limited in the coverage of concepts so we randomly select them. The results demonstrate that on both domains COMET consistently improves performance when increasing the number of concepts. Strikingly, by adding just one most frequent concept corresponding to a bird’s beak on top of the whole image concept, we improve ProtoNet’s performance on CUB by $1 0 \%$ and $5 \%$ in 1-shot and 5-shot tasks, respectively. On the Tabula Muris, with just 8 concepts COMET significantly outperforms all baselines and achieves $7 \%$ and $1 7 \%$ improvement over ProtoNet in 1-shot and 5-shot tasks, respectively. To demonstrate the robustness of our method to a huge set of overlapping concepts, we extend the number of concepts to 1500 by capturing all levels of the Gene Ontology hierarchy, therefore allowing many redundant relationships. Even in this scenario, COMET slightly improves the results compared to 190 concepts obtained from a single level. These results demonstrate that COMET outperforms other methods even when the number of concepts is small and annotations are incomplete, as well as with many overlapping and redundant concepts.
|
| 92 |
+
|
| 93 |
+
Table 1: Results on 1-shot and 5-shot classification on the CUB and Tabula Muris datasets. We report average accuracy and standard deviation over 600 randomly sampled episodes.
|
| 94 |
+
|
| 95 |
+
<table><tr><td></td><td colspan="2">CUB</td><td colspan="2">Tabula Muris</td><td colspan="2">Reuters</td></tr><tr><td>Method</td><td>1-shot</td><td>5-shot</td><td>1-shot</td><td>5-shot</td><td>1-shot</td><td> 5-shot</td></tr><tr><td>Finetune</td><td>61.4 ± 1.0</td><td>80.2± 0.6</td><td>65.3 ± 1.0</td><td>82.1±0.7</td><td>48.2± 0.7</td><td>64.3 ± 0.4</td></tr><tr><td>MatchingNet</td><td>61.0 ± 0.9</td><td>75.9 ± 0.6</td><td>71.0± 0.9</td><td>82.4±0.7</td><td>55.9 ± 0.6</td><td>70.9±0.4</td></tr><tr><td>MAML</td><td>52.8 ±1.0</td><td>74.4± 0.8</td><td>50.4±1.1</td><td>57.4 ± 1.1</td><td>45.0± 0.8</td><td>60.5 ± 0.4</td></tr><tr><td>RelationNet</td><td>62.1 ± 1.0</td><td>78.6 ±0.7</td><td>69.3 ± 1.0</td><td>80.1±0.8</td><td>53.8 ± 0.7</td><td>68.3 ± 0.3</td></tr><tr><td>MetaOptNet</td><td>62.2 ± 1.0</td><td>79.6 ± 0.6</td><td>73.6 ± 1.1</td><td>85.4± 0.9</td><td>62.1±0.8</td><td>77.8± 0.4</td></tr><tr><td>DeepEMD</td><td>64.0 ±1.0</td><td>81.1 ± 0.7</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>ProtoNet</td><td>57.1 ± 1.0</td><td>76.1±0.7</td><td>64.5±1.0</td><td>82.5±0.7</td><td>58.3 ± 0.7</td><td>75.1 ± 0.4</td></tr><tr><td>COMET</td><td>67.9 ± 0.9</td><td>85.3 ± 0.5</td><td>79.4 ± 0.9</td><td>91.7 ± 0.5</td><td>71.5± 0.7</td><td>89.8± 0.3</td></tr></table>
|
| 96 |
+
|
| 97 |
+
Table 2: Comparison to the ensemble of prototypical networks and COMET with shared weights across concepts. On the CUB dataset weights are always shared.
|
| 98 |
+
|
| 99 |
+
<table><tr><td></td><td colspan="2">CUB</td><td colspan="2">Tabula Muris</td><td colspan="2">Reuters</td></tr><tr><td>Method</td><td>1-shot</td><td>5-shot</td><td>1-shot</td><td>5-shot</td><td>1-shot</td><td>5-shot</td></tr><tr><td>ProtoNetEns</td><td>64.0±0.8</td><td>82.3± 0.5</td><td>67.2 ± 0.8</td><td>83.6± 0.5</td><td>62.4± 0.7</td><td>79.3± 0.4</td></tr><tr><td>COMET shared w</td><td>67.9 ± 0.9</td><td>85.3 ± 0.5</td><td>78.2 ±1.0</td><td>91.0 ± 0.5</td><td>69.8± 0.8</td><td>88.6±0.3</td></tr><tr><td>COMET</td><td>67.9 ± 0.9</td><td>85.3 ± 0.5</td><td>79.4 ±0.9</td><td>91.7± 0.5</td><td>71.5 ± 0.7</td><td>89.8±0.3</td></tr></table>
|
| 100 |
+
|
| 101 |
+

|
| 102 |
+
Figure 2: The effect of number of concepts on COMET’s performance. COMET consistently improves performance when we gradually increase number of concept terms.
|
| 103 |
+
|
| 104 |
+
Unsupervised concept annotation. While COMET achieves remarkable results with humanvalidated concepts given as external knowledge, we next investigate COMET’s performance on automatically inferred concepts. In addition to CUB dataset, we consider Flowers dataset for finegrained image classification. To automatically extract visual concepts, we train the autoencoding framework for landmarks discovery proposed in (Zhang et al., 2018). The encoding module outputs landmark coordinates that we use as part coordinates. We generate a concept mask by creating a bounding box with a fixed length around landmark coordinates. Although extracted coordinates are often noisy and capture background (Appendix F), we find that COMET outperforms all baselines on both CUB and Flowers fine-grained classification datasets (Table 3). This analysis shows that the benefits of our method are expected even with noisy concepts extracted in a fully automated and unsupervised way.
|
| 105 |
+
|
| 106 |
+
To test unsupervised concept annotation on Tabula Muris and Reuters datasets, we randomly select subsets of features for concept definition. Since COMET is interpretable and can be used to find important concepts, we use validation set to select concepts with the highest importance scores. Even in this case, COMET significantly outperforms all baselines, achieving only $2 \%$ lower accuracy on the Tabula Muris dataset and $1 \%$ on the Reuters dataset on both 1-shot and 5-shot tasks compared to human-defined concepts. This additionally confirms COMET’s effectiveness with automatically extracted concepts. We provide more results in Appendix E .
|
| 107 |
+
|
| 108 |
+
Table 3: Results on 1-shot and 5-shot classification with automatically extracted concepts. We report average accuracy and standard deviation over 600 randomly sampled episodes. We show the average relative improvement of COMET over the best and ProtoNet baselines.
|
| 109 |
+
|
| 110 |
+
<table><tr><td>Accuracy</td><td>CUB: 1-shot</td><td>CUB: 5-shot</td><td>Flowers: 1-shot</td><td>Flowers: 5-shot</td></tr><tr><td>COMET</td><td>64.8 ± 1.0</td><td>82.0± 0.5</td><td>70.4 ± 0.9</td><td>86.7± 0.6</td></tr><tr><td colspan="5">Improvement of COMET...</td></tr><tr><td>over best baseline</td><td>1.3%</td><td>1.1%</td><td>4.8%</td><td>4.6%</td></tr><tr><td>over ProtoNet</td><td>13.5%</td><td>7.8%</td><td>6.0%</td><td>8.1%</td></tr></table>
|
| 111 |
+
|
| 112 |
+
# 3.3 INTERPRETABILITY
|
| 113 |
+
|
| 114 |
+
We analyze the reasoning part of COMET by designing case studies aiming to answer the following questions: (i) Which concepts are the most important for a given query point (i.e., local explanation)? Which concepts are the most important for a given class (i.e., global explanation)?; (iii) Which examples share locally similar patterns?; (iv) Which examples reflect well concept prototype? We perform all analyses exclusively on classes from the novel task that are not seen during training.
|
| 115 |
+
|
| 116 |
+
Concept importance. Given a query point, COMET ranks concepts based on their importance scores, therefore identifying concepts highly relevant for the prediction of a single query point. We demonstrate examples of local explanations in Appendix G. To quantitatively evaluate global explanations that assign concept importance scores to the entire class, we derive ground truth explanations on the Tabula Muris dataset. Specifically, using the ground truth labels on the test set, we obtain a set of genes that are differentially expressed for each class (i.e., cell type). We then find Gene Ontology terms that are significantly enriched (false discovery rate corrected $p$ -value $< 0 . 1$ ) in the set of differentially expressed genes of a given class, and use those terms as ground-truth concepts. We consider only cell types that have at least two assigned terms. To obtain COMET’s explanations, we rank global concept importance scores for each class and report the number of relevant terms that are successfully retrieved in top 20 concepts with the highest scores in the 5-shot setting (Figure 3 left). We find that COMET’s importance scores agree extremely well with the ground truth annotations, achieving 0.71 average recall $@ 2 0$ across all cell types. We further investigate global explanations on the CUB dataset by computing the frequency of the most relevant concepts across the species (Figure 3 right). Beak, belly and forehead turn out to be the most relevant features, supporting common-sense intuition. For instance, ‘beak’ is selected as the most relevant concept for ‘parakeet auklet’ known for its nearly circular beak; ‘belly’ for ‘cape may warbler’ known for its tiger stripes on the belly; while ‘belted kingfisher’ indeed has characteristic ‘forehead’ with its shaggy crest on the top of the head. This confirms that COMET correctly identifies important class-level concepts.
|
| 117 |
+
|
| 118 |
+

|
| 119 |
+
Figure 3: (Left) Quantitatively, on the Tabula Muris dataset COMET’s global importance scores agree well with the ground truth important Gene Ontology terms estimated using differentially expressed genes. (Right) Qualitatively, on the CUB dataset importance scores correctly reflect the most relevant bird features.
|
| 120 |
+
|
| 121 |
+
Locally similar patterns. Given a fixed concept of interest, we apply COMET to sort images with respect to the distance of their concept embedding to the concept prototype (Figure 4). COMET finds images that locally resemble the prototypical image and well express concept prototype, correctly reflecting the underlying concept of interest. On the contrary, images sorted using the whole image as a concept often reflect background similarity and can not provide intuitive explanations. Furthermore, by finding most distant examples COMET can aid in identifying misannotated or non-visible concepts (Appendix H) which can be particularly useful when the concepts are automatically extracted. These analyses suggest that COMET can be used to discover, sort and visualize locally similar patterns, revealing insights on concept-based similarity across examples.
|
| 122 |
+
|
| 123 |
+

|
| 124 |
+
Images ranked according to their distance to the prototypical concept
|
| 125 |
+
Figure 4: Top row shows images with beak concept embeddings most similar to the prototypical beak. Bottom row shows images ranked according the global concept that captures whole image. COMET correctly reflects local similarity in the underlying concept of interest, while global concept often reflects environmental similarity.
|
| 126 |
+
|
| 127 |
+
# 4 RELATED WORK
|
| 128 |
+
|
| 129 |
+
Our work draws motivation from a rich line of research on meta-learning, compositional representations, and concept-based interpretability.
|
| 130 |
+
|
| 131 |
+
Meta-learning. Recent meta-learning methods fall broadly into two categories. Optimization-based methods (Finn et al., 2017; Rusu et al., 2019; Nichol & Schulman, 2018; Grant et al., 2018; Antoniou et al., 2019) aim to learn a good initialization such that network can be fine-tuned to a target task within a few gradient steps. On the other hand, metric-based methods (Snell et al., 2017; Vinyals et al., 2016; Sung et al., 2018; Gidaris & Komodakis, 2018) learn a metric space shared across tasks such that in the new space target task can be solved using nearest neighbour or simple linear classifier. DeepEMD (Zhang et al., 2020) learns optimal distance between local image representations. Prototypical networks (Snell et al., 2017) learn a metric space such that data points cluster around a prototypical representation computed for each category as the mean of embedded labeled examples. It has remained one of the most competitive few-shot learning methods (Triantafillou et al., 2019), resulting in many follow-up works (Sung et al., 2018; Oreshkin et al., 2018; Ren et al., 2018; Liu et al., 2019; Xing et al., 2019). Two recent works (Hou et al., 2019; Zhu et al.) proposed to learn local discriminative features with attention mechanisms in image classification tasks. Our work builds upon prototypical networks and extends the approach by introducing concept-based prototypes. Prototypical networks were extended by learning mixture prototypes in (Allen et al., 2019); however prototypes in this work share the same metric space. In contrast, COMET defines human-interpretable concept-specific metric spaces where each prototype reflects class-level differences in the metric space of the corresponding concept.
|
| 132 |
+
|
| 133 |
+
Compositionality. The idea behind learning from a few examples using compositional representations originates from work on Bayesian probabilistic programs in which individual strokes were combined for the handwritten character recognition task (Lake et al., 2011; 2015). This approach was extended in (Wong & Yuille, 2015) by replacing hand designed features with symmetry axis as object descriptors. Although these early works effectively demonstrated that compositionality is a key ingredient for adaptation in a low-data regime, it is unclear how to extend them to generalize beyond simple visual concepts. Recent work (Tokmakov et al., 2019) revived the idea and showed that deep compositional representations generalize better in few-shot image classification. However, this approach requires category-level attribute annotations that are impossible to get in domains not intuitive to humans, such as biology. Moreover, even in domains in which annotations can be collected, they require tedious manual effort. On the contrary, our approach is domain-agnostic and generates human-understandable interpretations in any domain.
|
| 134 |
+
|
| 135 |
+
Interpretability. There has been much progress on designing interpretable methods that estimate the importance of individual features (Selvaraju et al., 2016; Sundararajan et al., 2017; Smilkov et al., 2017; Ribeiro et al., 2016; Lundberg & Lee, 2017; Melis & Jaakkola, 2018). However, individual features are often not intuitive, or can even be misleading when interpreted by humans (Kim et al., 2018). To overcome this limitation, recent advances have been focused on designing methods that explain predictions using high-level human understandable concepts (Kim et al., 2018; Ghorbani et al., 2019). TCAV (Kim et al., 2018) defines concepts based on user-annotated set of examples in which the concept of interest appears. On the contrary, high-level concepts in our work are defined with a set of related dimensions. As such, they are already available in many domains, or can be obtained in an unsupervised manner. Once defined, they are transferable across problems that share feature space. As opposed to the methods that base their predictions on the posthoc analysis (Ribeiro et al., 2016; Lundberg & Lee, 2017; Melis & Jaakkola, 2018; Kim et al., 2018), COMET is designed as an inherently interpretable model and explains predictions by gaining insights from the reasoning process of the network. The closest to our work are prototypes-based explanation models (Li et al., 2018; Chen et al., 2019a). However, they require specialized convolutional architecture for feature extraction and are not applicable beyond image classification, or to a few-shot setting.
|
| 136 |
+
|
| 137 |
+
# 5 CONCLUSION
|
| 138 |
+
|
| 139 |
+
We introduced COMET, a novel metric-based meta-learning algorithm that learns to generalize along human-interpretable concept dimensions. We showed that COMET learns generalizable representations with incomplete, noisy, redundant, very few or a huge set of concept dimensions, selecting only important concepts for classification and providing reasoning behind the decisions. Our experimental results showed that COMET does not make a trade-off between interpretability and accuracy and significantly outperforms existing methods on tasks from diverse domains, including a novel benchmark dataset from the biology domain developed in our work.
|
| 140 |
+
|
| 141 |
+
# ACKNOWLEDGEMENTS
|
| 142 |
+
|
| 143 |
+
The authors thank Yusuf Roohani, Michihiro Yasunaga and Marinka Zitnik for their helpful comments. We gratefully acknowledge the support of DARPA under Nos. N660011924033 (MCS); ARO under Nos. W911NF-16-1-0342 (MURI), W911NF-16-1-0171 (DURIP); NSF under Nos. OAC-1835598 (CINES), OAC-1934578 (HDR), CCF-1918940 (Expeditions), IIS-2030477 (RAPID); Stanford Data Science Initiative, Wu Tsai Neurosciences Institute, Chan Zuckerberg Biohub, Amazon, JPMorgan Chase, Docomo, Hitachi, JD.com, KDDI, NVIDIA, Dell, Toshiba, and UnitedHealth Group. J. L. is a Chan Zuckerberg Biohub investigator.
|
| 144 |
+
|
| 145 |
+
# REFERENCES
|
| 146 |
+
|
| 147 |
+
Kelsey Allen, Evan Shelhamer, Hanul Shin, and Joshua Tenenbaum. Infinite mixture prototypes for few-shot learning. In International Conference on Machine Learning, pp. 232–241, 2019.
|
| 148 |
+
|
| 149 |
+
Antreas Antoniou, Harrison Edwards, and Amos Storkey. How to train your MAML. In International Conference on Learning Representations, 2019.
|
| 150 |
+
|
| 151 |
+
Michael Ashburner, Catherine A Ball, Judith A Blake, David Botstein, Heather Butler, J Michael Cherry, Allan P Davis, Kara Dolinski, Selina S Dwight, Janan T Eppig, et al. Gene Ontology: tool for the unification of biology. Nature Genetics, 25(1):25–29, 2000.
|
| 152 |
+
|
| 153 |
+
Samy Bengio, Yoshua Bengio, Jocelyn Cloutier, and Jan Gecsei. On the optimization of a synaptic learning rule. In Preprints of the Conference Optimality in Artificial and Biological Neural Networks, volume 2, 1992.
|
| 154 |
+
|
| 155 |
+
David M Blei, Andrew Y Ng, and Michael I Jordan. Latent Dirichlet Allocation. Journal of Machine Learning Research, 3:993–1022, 2003.
|
| 156 |
+
|
| 157 |
+
Maria Brbic, Marinka Zitnik, Sheng Wang, Angela O Pisco, Russ B Altman, Spyros Darmanis, and ´ Jure Leskovec. Mars: discovering novel cell types across heterogeneous single-cell experiments. Nature Methods, 17(12):1200–1206, 2020.
|
| 158 |
+
|
| 159 |
+
Chaofan Chen, Oscar Li, Daniel Tao, Alina Barnett, Cynthia Rudin, and Jonathan K Su. This looks like that: Deep learning for interpretable image recognition. In Advances in Neural Information Processing Systems, pp. 8928–8939, 2019a.
|
| 160 |
+
|
| 161 |
+
Wei-Yu Chen, Yen-Cheng Liu, Zsolt Kira, Yu-Chiang Frank Wang, and Jia-Bin Huang. A closer look at few-shot classification. In International Conference on Learning Representations, 2019b.
|
| 162 |
+
|
| 163 |
+
Gene Ontology Consortium. The Gene Ontology resource: 20 years and still GOing strong. Nucleic Acids Research, 47(D1):D330–D338, 2019.
|
| 164 |
+
|
| 165 |
+
Tabula Muris Consortium. Single-cell transcriptomics of 20 mouse organs creates a Tabula Muris. Nature, 562(7727):367, 2018.
|
| 166 |
+
|
| 167 |
+
Tabula Muris Consortium. A single cell transcriptomic atlas characterizes aging tissues in the mouse. Nature, 583:590–595, 2020.
|
| 168 |
+
|
| 169 |
+
Nikita Dvornik, Cordelia Schmid, and Julien Mairal. Diversity with cooperation: Ensemble methods for few-shot classification. In IEEE International Conference on Computer Vision, pp. 3723–3731, 2019.
|
| 170 |
+
|
| 171 |
+
Li Fei-Fei, Rob Fergus, and Pietro Perona. One-shot learning of object categories. IEEE Transactions on Pattern Analysis and Machine Intelligence, 28(4):594–611, 2006.
|
| 172 |
+
|
| 173 |
+
Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In International Conference on Machine Learning, pp. 1126–1135, 2017.
|
| 174 |
+
|
| 175 |
+
Amirata Ghorbani, James Wexler, James Y Zou, and Been Kim. Towards automatic concept-based explanations. In Advances in Neural Information Processing Systems, pp. 9273–9282, 2019.
|
| 176 |
+
|
| 177 |
+
Spyros Gidaris and Nikos Komodakis. Dynamic few-shot visual learning without forgetting. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 4367–4375, 2018.
|
| 178 |
+
|
| 179 |
+
Erin Grant, Chelsea Finn, Sergey Levine, Trevor Darrell, and Thomas Griffiths. Recasting gradientbased meta-learning as hierarchical Bayes. In International Conference on Learning Representations, 2018.
|
| 180 |
+
|
| 181 |
+
Lars Kai Hansen and Peter Salamon. Neural network ensembles. IEEE Transactions on Pattern Analysis and Machine Intelligence, 12(10):993–1001, 1990.
|
| 182 |
+
|
| 183 |
+
Ruibing Hou, Hong Chang, MA Bingpeng, Shiguang Shan, and Xilin Chen. Cross attention network for few-shot classification. In Advances in Neural Information Processing Systems, pp. 4003–4014, 2019.
|
| 184 |
+
|
| 185 |
+
Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International Conference on Machine Learning, pp. 448–456, 2015.
|
| 186 |
+
|
| 187 |
+
Tomas Jakab, Ankush Gupta, Hakan Bilen, and Andrea Vedaldi. Unsupervised learning of object landmarks through conditional image generation. In Advances in Neural Information Processing Systems, pp. 4016–4027, 2018.
|
| 188 |
+
|
| 189 |
+
Been Kim, Martin Wattenberg, Justin Gilmer, Carrie Cai, James Wexler, Fernanda Viegas, and Rory Sayres. Interpretability beyond feature attribution: Quantitative testing with concept activation vectors (TCAV). In International Conference on Machine Learning, pp. 2668–2677, 2018.
|
| 190 |
+
|
| 191 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 192 |
+
|
| 193 |
+
Gregory Koch, Richard Zemel, and Ruslan Salakhutdinov. Siamese neural networks for one-shot image recognition. In ICML Deep Learning Workshop, volume 2, 2015.
|
| 194 |
+
|
| 195 |
+
Brenden Lake, Ruslan Salakhutdinov, Jason Gross, and Joshua Tenenbaum. One shot learning of simple visual concepts. In Proceedings of the Annual Meeting of the Cognitive Science Society, volume 33, 2011.
|
| 196 |
+
|
| 197 |
+
Brenden M Lake, Ruslan Salakhutdinov, and Joshua B Tenenbaum. Human-level concept learning through probabilistic program induction. Science, 350(6266):1332–1338, 2015.
|
| 198 |
+
|
| 199 |
+
Kwonjoon Lee, Subhransu Maji, Avinash Ravichandran, and Stefano Soatto. Meta-learning with differentiable convex optimization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 10657–10665, 2019.
|
| 200 |
+
|
| 201 |
+
David D Lewis, Yiming Yang, Tony G Rose, and Fan Li. Rcv1: A new benchmark collection for text categorization research. Journal of Machine Learning Research, 5(Apr):361–397, 2004.
|
| 202 |
+
|
| 203 |
+
Oscar Li, Hao Liu, Chaofan Chen, and Cynthia Rudin. Deep learning for case-based reasoning through prototypes: A neural network that explains its predictions. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018.
|
| 204 |
+
|
| 205 |
+
Lu Liu, Tianyi Zhou, Guodong Long, Jing Jiang, and Chengqi Zhang. Learning to propagate for graph meta-learning. In Advances in Neural Information Processing Systems, pp. 1037–1048, 2019.
|
| 206 |
+
|
| 207 |
+
Scott M Lundberg and Su-In Lee. A unified approach to interpreting model predictions. In Advances in Neural Information Processing Systems, pp. 4765–4774, 2017.
|
| 208 |
+
|
| 209 |
+
David Alvarez Melis and Tommi Jaakkola. Towards robust interpretability with self-explaining neural networks. In Advances in Neural Information Processing Systems, pp. 7775–7784, 2018.
|
| 210 |
+
|
| 211 |
+
Erik G Miller, Nicholas E Matsakis, and Paul A Viola. Learning from one example through shared densities on transforms. In IEEE Conference on Computer Vision and Pattern Recognition, volume 1, pp. 464–471, 2000.
|
| 212 |
+
|
| 213 |
+
Kaichun Mo, Shilin Zhu, Angel X Chang, Li Yi, Subarna Tripathi, Leonidas J Guibas, and Hao Su. PartNet: A large-scale benchmark for fine-grained and hierarchical part-level 3D object understanding. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 909–918, 2019.
|
| 214 |
+
|
| 215 |
+
Alexey G Murzin, Steven E Brenner, Tim Hubbard, and Cyrus Chothia. SCOP: a structural classification of proteins database for the investigation of sequences and structures. Journal of Molecular Biology, 247(4):536–540, 1995.
|
| 216 |
+
|
| 217 |
+
Alex Nichol and John Schulman. Reptile: A scalable metalearning algorithm. arXiv preprint arXiv:1803.02999, 2:2, 2018.
|
| 218 |
+
|
| 219 |
+
Maria-Elena Nilsback and Andrew Zisserman. Automated flower classification over a large number of classes. In 2008 Sixth Indian Conference on Computer Vision, Graphics & Image Processing, pp. 722–729. IEEE, 2008.
|
| 220 |
+
|
| 221 |
+
Boris Oreshkin, Pau Rodr´ıguez Lopez, and Alexandre Lacoste. TADAM: Task dependent adaptive ´ metric for improved few-shot learning. In Advances in Neural Information Processing Systems, pp. 721–731, 2018.
|
| 222 |
+
|
| 223 |
+
Aniruddh Raghu, Maithra Raghu, Samy Bengio, and Oriol Vinyals. Rapid learning or feature reuse? Towards understanding the effectiveness of MAML. In International Conference on Learning Representations, 2020.
|
| 224 |
+
|
| 225 |
+
Sachin Ravi and Hugo Larochelle. Optimization as a model for few-shot learning. In International Conference on Learning Representations, 2017.
|
| 226 |
+
|
| 227 |
+
Mengye Ren, Eleni Triantafillou, Sachin Ravi, Jake Snell, Kevin Swersky, Joshua B Tenenbaum, Hugo Larochelle, and Richard S Zemel. Meta-learning for semi-supervised few-shot classification. arXiv preprint arXiv:1803.00676, 2018.
|
| 228 |
+
|
| 229 |
+
Marco Tulio Ribeiro, Sameer Singh, and Carlos Guestrin. “Why should I trust you?” Explaining the predictions of any classifier. In ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 1135–1144, 2016.
|
| 230 |
+
|
| 231 |
+
Andrei A Rusu, Dushyant Rao, Jakub Sygnowski, Oriol Vinyals, Razvan Pascanu, Simon Osindero, and Raia Hadsell. Meta-learning with latent embedding optimization. In International Conference on Learning Representations, 2019.
|
| 232 |
+
|
| 233 |
+
Jurgen Schmidhuber. ¨ Evolutionary principles in self-referential learning, or on learning how to learn: the meta-meta-... hook. PhD thesis, Technische Universitat M¨ unchen, 1987. ¨
|
| 234 |
+
|
| 235 |
+
Ramprasaath R Selvaraju, Abhishek Das, Ramakrishna Vedantam, Michael Cogswell, Devi Parikh, and Dhruv Batra. Grad-CAM: Why did you say that? arXiv preprint arXiv:1611.07450, 2016.
|
| 236 |
+
|
| 237 |
+
Daniel Smilkov, Nikhil Thorat, Been Kim, Fernanda Viegas, and Martin Wattenberg. SmoothGrad:´ removing noise by adding noise. arXiv preprint arXiv:1706.03825, 2017.
|
| 238 |
+
|
| 239 |
+
Jake Snell, Kevin Swersky, and Richard Zemel. Prototypical networks for few-shot learning. In Advances in Neural Information Processing Systems, pp. 4077–4087, 2017.
|
| 240 |
+
|
| 241 |
+
Mukund Sundararajan, Ankur Taly, and Qiqi Yan. Axiomatic attribution for deep networks. In International Conference on Machine Learning, pp. 3319–3328, 2017.
|
| 242 |
+
|
| 243 |
+
Flood Sung, Yongxin Yang, Li Zhang, Tao Xiang, Philip HS Torr, and Timothy M Hospedales. Learning to compare: Relation network for few-shot learning. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 1199–1208, 2018.
|
| 244 |
+
|
| 245 |
+
Pavel Tokmakov, Yu-Xiong Wang, and Martial Hebert. Learning compositional representations for few-shot recognition. In IEEE International Conference on Computer Vision, pp. 6372–6381, 2019.
|
| 246 |
+
|
| 247 |
+
Eleni Triantafillou, Tyler Zhu, Vincent Dumoulin, Pascal Lamblin, Utku Evci, Kelvin Xu, Ross Goroshin, Carles Gelada, Kevin Swersky, Pierre-Antoine Manzagol, et al. Meta-dataset: A dataset of datasets for learning to learn from few examples. arXiv preprint arXiv:1903.03096, 2019.
|
| 248 |
+
|
| 249 |
+
Oriol Vinyals, Charles Blundell, Timothy Lillicrap, Koray Kavukcuoglu, and Daan Wierstra. Matching networks for one shot learning. In Advances in Neural Information Processing Systems, pp. 3630–3638, 2016.
|
| 250 |
+
|
| 251 |
+
Catherine Wah, Steve Branson, Peter Welinder, Pietro Perona, and Serge Belongie. The CaltechUCSD Birds-200-2011 dataset. 2011.
|
| 252 |
+
|
| 253 |
+
Alex Wong and Alan L Yuille. One shot learning via compositions of meaningful patches. In IEEE International Conference on Computer Vision, pp. 1197–1205, 2015.
|
| 254 |
+
|
| 255 |
+
Chen Xing, Negar Rostamzadeh, Boris Oreshkin, and Pedro O Pinheiro. Adaptive cross-modal few-shot learning. In Advances in Neural Information Processing Systems, pp. 4848–4858, 2019.
|
| 256 |
+
|
| 257 |
+
Chi Zhang, Yujun Cai, Guosheng Lin, and Chunhua Shen. Deepemd: Few-shot image classification with differentiable earth mover’s distance and structured classifiers. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 12203–12213, 2020.
|
| 258 |
+
|
| 259 |
+
Yuting Zhang, Yijie Guo, Yixin Jin, Yijun Luo, Zhiyuan He, and Honglak Lee. Unsupervised discovery of object landmarks as structural representations. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 2694–2703, 2018.
|
| 260 |
+
|
| 261 |
+
Yaohui Zhu, Chenlong Liu, and Shuqiang Jiang. Multi-attention meta learning for few-shot finegrained image recognition. In Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI-20. International Joint Conferences on Artificial Intelligence Organization.
|
| 262 |
+
|
| 263 |
+
# A EXPERIMENTAL SETUP
|
| 264 |
+
|
| 265 |
+
Evaluation. We test all methods on the most broadly used 5-way classification setting. In each episode, we randomly sample 5 classes where each class contains $k$ examples as the support set in the $k$ -shot classification task. We construct the query set to have 16 examples, where each unlabeled sample in the query set belongs to one of the classes in the support set. We choose the best model according to the validation accuracy, and then evaluate it on the test set with novel classes. We report the mean accuracy by randomly sampling 600 episodes in the fine-tuning or meta-testing stage.
|
| 266 |
+
|
| 267 |
+
On the CUB dataset, we followed the evaluation protocol in (Chen et al., 2019b) and split the dataset into 100 base, 50 validation, and 50 test classes in the exactly same split. On the Tabula Muris, we use 15 organs for training, 4 organs for validation, and 4 organs for test, resulting into 59 base, 47 validation, and 37 test classes corresponding to cell types. The 102 classes of Flowers dataset are split into 52, 25, 25 as the training, validation and testing set, respectively. As for Reuters dataset, we leave out 5 classes for validation and 5 for test.
|
| 268 |
+
|
| 269 |
+
Implementation details. On the CUB dataset, we use the widely adopted four-layer convolutional backbones Conv-4 with an input size of $8 4 \times 8 4$ (Snell et al., 2017). We perform standard data augmentation, including random crop, rotation, horizontal flipping and color jittering. We use the Adam optimizer (Kingma & Ba, 2014) with an initial learning rate of $1 0 ^ { - 3 }$ and weight decay 0. We train the 5-shot tasks for 40, 000 episodes and 1-shot tasks for 60, 000 episodes (Chen et al., 2019b). To speed up training of COMET, we share the network parameters between concept learners. In particular, we first forward the entire image $\mathbf { x } _ { i }$ into the convolutional network and get a spatial feature embedding $f _ { \pmb { \theta } } ( \mathbf { x } _ { i } )$ , and then get the $j$ -th concept embedding as $f _ { \pmb { \theta } } ( \mathbf { x } _ { i } ) \circ \mathbf { c } ^ { ( j ) }$ . Since convolutional filters only operate on pixels locally, in practice we get similar performance if we apply the mask at the beginning or at the end while significantly speeding up training time. In case the part is not annotatated (i.e., visible), we use the prototypical concept corresponding to whole image to replace the missing concept. For the Tabula Muris dataset, we use a simple backbone network structure containing two fully-connected layers with batch normalization, ReLu activation and dropout. We use Adam optimizer (Kingma & Ba, 2014) with an initial learning rate of $1 0 ^ { - 3 }$ and weight decay 0. We train the network for 1, 000 episodes. For MAML, RelationNet, MatchingNet, FineTune and ProtoNet, we use implementations from (Chen et al., 2019b). For MetaOptNet and DeepEMD we use implementations from the respective papers.
|
| 270 |
+
|
| 271 |
+
# B ABLATION STUDY ON DISTANCE FUNCTION
|
| 272 |
+
|
| 273 |
+
We compare the effect of distance metric on the COMET’s performance. We find that Euclidean distance consistently outperforms cosine distance in fine-grained image classification and cell type annotation tasks.
|
| 274 |
+
|
| 275 |
+
Table 4: The effect of distance metric on COMET’s performance.
|
| 276 |
+
|
| 277 |
+
<table><tr><td></td><td colspan="2">CUB</td><td colspan="2">Tabula Muris</td></tr><tr><td>Distance</td><td>1-shot</td><td>5-shot</td><td>1-shot</td><td>5-shot</td></tr><tr><td>Cosine</td><td>65.7 ± 1.0</td><td>82.2±0.6</td><td>77.1 ± 0.9</td><td>90.1±0.6</td></tr><tr><td>Euclidean</td><td>67.9 ± 0.9</td><td>85.3 ± 0.5</td><td>79.4 ± 0.9</td><td>91.7 ± 0.5</td></tr></table>
|
| 278 |
+
|
| 279 |
+
# C ABLATION STUDY ON BACKBONE NETWORK
|
| 280 |
+
|
| 281 |
+
We compare performance of COMET to baselines methods using deeper Conv-6 backbone instead of Conv-4 backbone on the CUB dataset. We use part based annotations to define concepts. The results are reported in Table 5. COMET outperforms all baselines even with deeper backbone. Additionally, by adding just one most frequent concept corresponding to a bird’s beak on top of the whole image concept, COMET improves ProtoNet’s performance by ${ \bar { 3 } } . 8 \%$ on 1-shot task and $2 . 2 \%$ on 5-shot task.
|
| 282 |
+
|
| 283 |
+
Table 5: Peformance using Conv-6 backbone on CUB and Flowers dataset. We report average accuracy and standard deviation over 600 randomly sampled episodes.
|
| 284 |
+
|
| 285 |
+
<table><tr><td></td><td colspan="2">CUB</td></tr><tr><td>Method</td><td>1-shot</td><td>5-shot</td></tr><tr><td>Finetune</td><td>66.0±0.9</td><td>82.0±0.6</td></tr><tr><td>MatchingNet</td><td>66.5 ±0.9</td><td>77.9 ±0.7</td></tr><tr><td>MAML</td><td>66.3 ± 1.1</td><td>78.8±0.7</td></tr><tr><td>RelationNet</td><td>64.4 ± 0.9</td><td>80.2 ±0.6</td></tr><tr><td>MetaOptNet DeepEMD</td><td>65.5 ± 1.2 66.8 ±0.9</td><td>83.0±0.8</td></tr><tr><td></td><td></td><td>83.8±0.7</td></tr><tr><td>ProtoNet</td><td>66.4 ± 1.0</td><td>82.0±0.6</td></tr><tr><td>COMET- 1 concept</td><td>68.9 ±0.9</td><td>83.8 ±0.6</td></tr><tr><td>COMET</td><td>72.2 ± 0.9</td><td>87.6 ± 0.5</td></tr></table>
|
| 286 |
+
|
| 287 |
+
# D ABLATION STUDY ON ENSEMBLE METHODS
|
| 288 |
+
|
| 289 |
+
We compare COMET to the ensemble of prototypical networks. We train ProtoNets in parallel and combine their outputs by majority voting as typically done in ensemble models. In particular, given a query point $\mathbf { x } _ { q }$ and prototypes $\{ \mathbf { p } _ { k } ^ { ( j ) } \} _ { k }$ , the prototypical ensemble outputs probability distribution for each ProtoNet model $j$ :
|
| 290 |
+
|
| 291 |
+
$$
|
| 292 |
+
p _ { \pmb { \theta } } ^ { ( j ) } ( y = k | \mathbf { x } _ { q } ) = \frac { \exp ( - d ( f _ { \pmb { \theta } } ^ { ( j ) } ( \mathbf { x } _ { q } ) , \mathbf { p } _ { k } ^ { ( j ) } ) ) } { \sum _ { k ^ { \prime } } \exp ( - d ( f _ { \pmb { \theta } } ^ { ( j ) } ( \mathbf { x } _ { q } ) , \mathbf { p } _ { k ^ { \prime } } ^ { ( j ) } ) ) } .
|
| 293 |
+
$$
|
| 294 |
+
|
| 295 |
+
On the CUB dataset, we use 5 ProtoNets. We use smaller number than the number of concepts because training an ensemble of a larger number of ProtoNets on CUB results in memory issues due to the unshared weights. On the Tabula Muris and Reuters datasets we use the same number of ProtoNets as the number of concepts, that is 190 on Tabula Muris and 126 on Reuters.
|
| 296 |
+
|
| 297 |
+
# E UNSUPERVISED CONCEPT ANNOTATION: ADDITIONAL RESULTS
|
| 298 |
+
|
| 299 |
+
We evaluate COMET and baseline methods on the Flowers dataset for fine-grained image classification. We automatically extract concepts using unsupervised landmarks discovery approach (Zhang et al., 2018). Results in Table 6 show that COMET outperforms all baselines by a large margin.
|
| 300 |
+
|
| 301 |
+
Table 6: Results on 1-shot and 5-shot classification on the Flowers dataset. We report average accuracy and standard deviation over 600 randomly sampled episodes.
|
| 302 |
+
|
| 303 |
+
<table><tr><td rowspan="2">Method</td><td colspan="2">Flowers</td></tr><tr><td>1-shot</td><td> 5-shot</td></tr><tr><td>Finetune</td><td>65.4± 0.9</td><td>81.9 ± 0.7</td></tr><tr><td>MatchingNet</td><td>66.0± 0.9</td><td>82.0± 0.8</td></tr><tr><td>MAML</td><td>63.2 ± 1.1</td><td>76.6 ± 0.8</td></tr><tr><td>RelationNet</td><td>66.4 ± 0.9</td><td>80.8±0.6</td></tr><tr><td>MetaOptNet</td><td>64.8 ±1.0</td><td>81.3 ± 0.7</td></tr><tr><td>DeepEMD</td><td>67.2 ± 0.9</td><td>82.9±0.7</td></tr><tr><td>ProtoNet</td><td>64.4 ±1.0</td><td>80.2± 0.8</td></tr><tr><td>COMET</td><td>70.4 ± 0.9</td><td>86.7 ± 0.6</td></tr></table>
|
| 304 |
+
|
| 305 |
+
On the Tabula Muris and Reuters datasets, we test COMET without any prior knowledge by defining concepts using selected random masks. In particular, we randomly select subsets of features as concepts and then use validation set to select the concepts with the highest importance scores as defined by COMET. We use same number of concepts used in Tabula Muris and Reuters datasets. Results are reported in Table 7.
|
| 306 |
+
|
| 307 |
+
# F UNSUPERVISED CONCEPT ANNOTATION: LANDMARKS EXAMPLES
|
| 308 |
+
|
| 309 |
+
To assess the performance of COMET using automatically extracted visual concepts on the CUB dataset, we applied autoencoding framework for landmarks discovery proposed in (Zhang et al.,
|
| 310 |
+
|
| 311 |
+
Table 7: Results on 1-shot and 5-shot classification on Tabula Muris and Retuters dataset with selected random masks as concepts and human-defined concepts. We report average accuracy and standard deviation over 600 randomly sampled episodes.
|
| 312 |
+
|
| 313 |
+
<table><tr><td></td><td colspan="2">Tabula Muris</td><td colspan="2">Reuters</td></tr><tr><td>Method</td><td>1-shot</td><td>5-shot</td><td>1-shot</td><td> 5-shot</td></tr><tr><td>with selected random masks</td><td>77.2 ±1.0</td><td>89.8 ± 0.5</td><td>70.1 ± 0.9</td><td>89.0± 0.4</td></tr><tr><td>with prior knowledge</td><td>79.4 ± 0.9</td><td>91.7 ± 0.5</td><td>71.5 ± 0.7</td><td>89.8 ± 0.3</td></tr></table>
|
| 314 |
+
|
| 315 |
+
2018). We use default parameters and implementation provided by the authors, and set the number of \~/Downloads/ \~/Downloads/ \~/Downloads/ \~/Downloads/ \~/Downloads/ landmarks to 30. The encoding module provides coordinates of the estimated landmarks. To create \~/Downloads/ \~/Downloads/ \~/Downloads/ \~/Downloads/ \~/Downloads/ step 485000 (samples 1-20) data-encodedstep 485000 (samples 1-20) data-encodedstep 485000 (samples 1-20) data-encoded concept mask, we create a bounding box around discovered landmarks. We train the autoencoder2 3 4 5step 485000 (samples 1-20) data-encoded step 485000 (samples 1-20) data-encodedstep 485000 (samples 1-20) data-encodedstep 485000 (samples 1-20) data-encodedstep 485000 (samples 1-20) data-encoded1 2 3 41 2 3 42 3 42 3 4 5 using same parameters as Zhang et al. (2018), and set the number of concepts to 30. Examples ofstep 485000 (samples 1-20) data-encodedstep 485000 (samples 1-20) data-encoded step 485000 (samples 1-20) data-encodedstep 485000 (samples 1-20) data-encodedstep 485000 (samples 1-20) data-encoded2 3 4 51 2 3 41 2 3 42 3 42 3 4 5 extracted landmarks for 20 images from the CUB dataset are visualized in Figure 5. step 485000 (samples 1-20) data-encoded \~/Downloads/step 485000 (samples 1-20) data-encoded \~/Downloads/step 485000 (samples 1-20) data-encoded \~/Downloads/step 485000 (samples 1-20) data-encoded \~/Downloads/step 485000 (samples 1-20) data-encoded 20 20 2020 20 2020 20 20
|
| 316 |
+
|
| 317 |
+

|
| 318 |
+
20 40 60 80 20 40 60 8080 20 40 60 8080 20 40 60 808020 40 60 8080 20 40 60 8080 20 40 60 8080 20 40 608020 40 60 80 20 40 60 8080 20 40 60 8080 20 40 60 8080 80 20 40 60 8080 20 40 60 8080 20 40 60 8080 8020 40 60 8080 20 40 60 8080 20 40 60 8080 20 40 6080Figure 5: Examples of automatically extracted landmarks using (Zhang et al., 2018) on the CUB 8020 40 6020 40 680 80dataset.
|
| 319 |
+
|
| 320 |
+
# G INTERPRETABILITY: LOCAL EXPLANATIONS
|
| 321 |
+
|
| 322 |
+
Here, we demonstrate COMET’s local explanations on the CUB dataset. Given a single query data point, COMET assigns local concept importance scores to each concept based on the distance between concept embedding of the query data point to the prototypical concept. We then rank concepts according to their local concept importance scores. Figure 6 shows examples of ranked concepts. Importance scores assigned by COMET visually reflect well the most relevant bird features.
|
| 323 |
+
|
| 324 |
+
# H INTERPRETABILITY: LOCAL SIMILARITY
|
| 325 |
+
|
| 326 |
+
Given fixed concept of interest, we apply COMET to sort images with respect to the distance of their concept embedding to the concept prototype. Figure 7 shows example of chipping sparrow images with the belly concept embedding most similar to the prototypical belly, and images with the belly concept embedding most distant to the prototypical belly. Most similar images indeed have clearly visible belly part and reflect prototypical belly well. On the contrary, most distant images have only small part of belly visible, indicating that COMET can be used to detect misannotated or non-visible concepts.
|
| 327 |
+
|
| 328 |
+

|
| 329 |
+
Figure 6: Examples of COMET’s local explanations on the CUB dataset. Concepts are ranked according to the highest local concept similarity scores. Qualitatively, local importance scores correctly reflect the most relevant bird features.
|
| 330 |
+
|
| 331 |
+

|
| 332 |
+
Figure 7: Images ranked according to the distance of their belly concept embedding to the belly concept prototype. Most similar images (top) and most distant images (bottom). Images closest to the prototype have clearly visible belly part that visually looks like prototypical belly of a chipping sparrow, whereas most distant images do not have belly part clearly visible.
|
md/train/fV4vvs1J5iM/fV4vvs1J5iM.md
ADDED
|
@@ -0,0 +1,475 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# A REDUCTION APPROACH TOCONSTRAINED REINFORCEMENT LEARNING
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Many applications of reinforcement learning (RL) optimize a long-term reward subject to risk, safety, budget, diversity or other constraints. Though constrained RL problem has been studied to incorporate various constraints, existing methods either tie to specific families of RL algorithms or require storing infinitely many individual policies found by an RL oracle to approach a feasible solution. In this paper, we present a novel reduction approach for constrained RL problem that ensures convergence when using any off-the-shelf RL algorithm to construct an RL oracle yet requires storing at most constantly many policies. The key idea is to reduce the constrained RL problem to a distance minimization problem, and a novel variant of Frank-Wolfe algorithm is proposed for this task. Throughout the learning process, our method maintains at most constantly many individual policies, where the constant is shown to be worst-case optimal to ensure convergence of any RL oracle. Our method comes with rigorous convergence and complexity analysis, and does not introduce any extra hyper-parameter. Experiments on a grid-world navigation task demonstrate the efficiency of our method.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Contemporary approaches in reinforcement learning (RL) largely focus on optimizing the behavior of an agent against a single reward function. RL algorithms like value function methods (Zou et al., 2019; Zheng et al., 2018) or policy optimization methods (Chen et al., 2019; Zhao et al., 2017) are widely used in real-world tasks. This can be sufficient for simple tasks. However, for complicated applications, designing a reward function that implicitly defines the desired behavior can be challenging. For instance, applications concerning risk (Geibel & Wysotzki, 2005; Chow & Ghavamzadeh, 2014; Chow et al., 2017), safety (Chow et al., 2018) or budget (Boutilier & Lu, 2016; Xiao et al., 2019) are naturally modelled by augmenting the RL problem with orthant constraints. Exploration suggestions, such as to visit all states as evenly as possible, can be modelled by using a vector to measure the behavior of the agent, and to find a policy whose measurement vector lies in a convex set (Miryoosefi et al., 2019).
|
| 12 |
+
|
| 13 |
+
To solve RL problem under constraints, existing methods either ensure convergence only on a specific family of RL algorithms, or treat the underlying RL algorithms as a black box oracle to find individual policy, and look for mixed policy that randomizes among these individual policies. Though the second group of methods has the advantage of working with arbitrary RL algorithms that best suit the underlying problem, existing methods have practically infeasible memory requirement. To get an $\epsilon$ -approximate solution, they require storing $\bar { O } ( 1 / \epsilon )$ individual policies, and an exact solution requires storing infinitely many policies. This limits the prevalence of such methods, especially when the individual policy uses deep neural networks.
|
| 14 |
+
|
| 15 |
+
In this paper, we propose a novel reduction approach for the general convex constrained RL (C2RL) problem. Our approach has the advantage of the second group of methods, yet requires storing at most constantly many policies. For a vector-valued Markov Decision Process (MDP) and any given target convex set, our method finds a mixed policy whose measurement vector lies in the target convex set, using any off-the-shelf RL algorithm that optimizes a scalar reward as a RL oracle. To do so, the C2RL problem is reduced to a distance minimization problem between a polytope and a convex set, and a novel variant of Frank-Wolfe type algorithm is proposed to solve this distance minimization problem. To find an $\epsilon$ -approximate solution in an $m$ -dimensional vector-valued MDP, our method only stores at most $m + 1$ policies, which improves from infinitely many $O ( 1 / \epsilon )$ (Le et al., 2019; Miryoosefi et al., 2019) to a constant. We also show this $m + 1$ constant is worstcase optimal to ensure convergence of RL algorithms using deterministic policies. Moreover, our method introduces no extra hyper-parameter, which is favorable for practical usage. A preliminary experimental comparison demonstrates the performance of the proposed method and the sparsity of the policy found.
|
| 16 |
+
|
| 17 |
+
Table 1: Comparison with previous approaches. To find an $\epsilon$ -approximate solution, time complexity under orthant or convex constraints is compared using the numbers of RL oracle calls. The memory requirement is measured by the number of individual policies stored for an $\epsilon \cdot$ -approximate solution.
|
| 18 |
+
|
| 19 |
+
<table><tr><td>Method</td><td>Orthant constraint</td><td>Convex constraint</td><td>Converge for any</td><td>No extra hyper-</td><td>Memory requirement</td></tr><tr><td></td><td>To a fixed point</td><td>X</td><td>RL algo.</td><td>parameter X</td><td>1</td></tr><tr><td>Tessler et al. (2018) Le et al. (2019)</td><td>0(1/e)</td><td>×</td><td>X</td><td>X</td><td>0(1/e)</td></tr><tr><td>Miryoosefi et al. (2019)</td><td>0(1/e)</td><td>0(1/e)</td><td>√</td><td>X</td><td>0(1/e)</td></tr><tr><td>C2RL (this paper)</td><td>0(1/e)</td><td>0(1/e)</td><td>√</td><td>√</td><td>≤m+1</td></tr></table>
|
| 20 |
+
|
| 21 |
+
# 2 RELATED WORK
|
| 22 |
+
|
| 23 |
+
For high dimensional constrained RL, one line of approaches incorporates the constraint as a penalty signal into the reward function, and makes updates in a multiple time-scale scheme (Tessler et al., 2018; Chow & Ghavamzadeh, 2014). When used with policy gradient or actor-critic algorithms (Sutton & Barto, 2018), this penalty signal guides the policy to converge to a constraint satisfying one (Paternain et al., 2019; Chow et al., 2017). However, the convergence guarantee requires the RL algorithm can find a single policy that satisfies the constraint, hence ruling out methods that search for deterministic policies, such as Deep Q-Networks (DQN) (Mnih et al., 2013), Deep Deterministic Policy Gradient (DDPG) (Lillicrap et al., 2015) and their variants (Van Hasselt et al., 2015; Wang et al., 2016; Fujimoto et al., 2018; Barth-Maron et al., 2018).
|
| 24 |
+
|
| 25 |
+
Another line of approaches uses a game-theoretic framework, and does not tie to specific families of RL algorithm. The constrained problem is relaxed to a zero-sum game, whose equilibrium is solved by online learning (Agarwal et al., 2018). The game is played repeatedly, each time any RL algorithm can be used to find a best response policy to play against a no-regret online learner. The mixed policy that uniformly distributed among all played policies can be shown to converge to an optimal policy of the constrained problem (Freund & Schapire, 1999; Abernethy et al., 2011). Taking this approach, Le et al. (2019) uses Lagrangian relaxation to solve the orthant constraint case, and Miryoosefi et al. (2019) uses conic duality to solve the convex constraint case. However, since the convergence is established by the no-regret property, the policy found by these methods requires randomization among policies found during the learning process, which limits their prevalence.
|
| 26 |
+
|
| 27 |
+
Different from the game-theoretic approaches, we reduce the C2RL to a distance minimization problem and propose a novel variant of Frank-Wolfe (FW) algorithm to solve it. Our result builds on recent finding that the standard FW algorithm emerges as computing the equilibrium of a special convex-convave zero sum game (Abernethy & Wang, 2017). This connects our approach with previous approaches from game-theoretic framework (Agarwal et al., 2018; Le et al., 2019; Miryoosefi et al., 2019). The main advantage of our reduction approach is that the convergence of FW algorithm does not rely on the no-regret property of an online learner. Hence there is no need to introduce extra hyper-parameters, such as learning rate of the online learner, and intuitively, we can eliminate unnecessary policies to achieve better sparsity. To do so, we extend Wolfe’s method for minimum norm point problem (Wolfe, 1976) to solve our distance minimization problem. Throughout the learning process, we maintain an active policy set, and constantly eliminate policies whose measurement vector are affinely dependent of others. Unlike norm function in Wolfe’s method, our objective function is not strongly convex. Hence we cannot achieve the linear convergence of Wolfe’s method as shown in Lacoste-Julien & Jaggi (2015). Instead, we analyze the complexity of our method based on techniques from Chakrabarty et al. (2014). A theoretical comparison between our method and various approaches in constrained RL is provided in Table 1.
|
| 28 |
+
|
| 29 |
+
# 3 PRELIMINARIES
|
| 30 |
+
|
| 31 |
+
A vector-valued Markov decision process can be identified by a tuple $\{ \boldsymbol { S } , \mathcal { A } , \beta , P , c \}$ , where $s$ is a set of states, $\mathcal { A }$ is the set of actions and $\beta$ is the initial state distribution. At the start of each episode, an initial state $s _ { 0 }$ is drawn following the distribution $\beta$ . Then, at each step $t = 0 , 1 , \ldots$ , the agent observes a state $s _ { t } \in S$ and makes a decision to take an action $a _ { t }$ . After $a _ { t }$ is chosen, at the next observation the state evolves to state $s _ { t + 1 } \in S$ with probability $\textstyle P ( s _ { t + 1 } | s _ { t } , a _ { t } )$ . However, instead of a scalar reward, in our setting, the agent receives an $m$ -dimensional vector $\boldsymbol { c } _ { t } \in \mathbb { R } ^ { m }$ that may implicitly contain measurements of reward, risk or violation of other constraints. The episode ends after a certain number of steps, called the horizon, or when a terminate state is reached.
|
| 32 |
+
|
| 33 |
+
Actions are typically selected according to a policy $\pi$ , where $\pi ( s )$ is a distribution over actions for any $s \in { \mathcal { S } }$ . Policies that take a single action for any state are deterministic policies, and can be identified by the mapping $\pi : { \mathcal { S } } \mapsto A$ . The set of all deterministic policies is denoted by $\Pi$ . For a discount factor $\gamma \in [ 0 , 1 )$ , the discounted long-term measurement vector of a policy $\pi \in \Pi$ is defined as
|
| 34 |
+
|
| 35 |
+
$$
|
| 36 |
+
\pmb { c } ( \pi ) : = \mathbb { E } ( \sum _ { t = 0 } ^ { T } \gamma ^ { t } \pmb { c } _ { t } ( s _ { t } , \pi ( s _ { t } ) ) ) ,
|
| 37 |
+
$$
|
| 38 |
+
|
| 39 |
+
where the expectation is over trajectories generated by the described random process.
|
| 40 |
+
|
| 41 |
+
Unlike unconstrained setting, for a constrained RL problem, it is possible that all feasible policies are non-deterministic (see Appendix $\mathbf { D }$ for an example). This limits the usage of RL algorithms that search for deterministic policies in the setting of constrained RL problem.
|
| 42 |
+
|
| 43 |
+
One workaround is to use mixed policies. For a set of policies $\mathcal { U }$ , a mixed policy is a distribution over $\mathcal { U }$ , and the set of all mixed policies over $\mathcal { U }$ is denoted by $\Delta ( \mathcal { U } )$ . To execute a mixed policy $\mu \in \Delta ( \mathcal { U } )$ , we first select a policy $\pi \in { \mathcal { U } }$ according to $\pi \sim \mu ( \pi )$ , and then execute $\pi$ for the entire episode. Altman (1999) shows that any $c ( \cdot )$ achievable can be achieved by some mixed deterministic policies $\mu \in \Delta ( \Pi )$ . Therefore, though an off-shelves RL algorithm may not converge to any constraint-satisfying policy, it can be used as a subroutine to find individual policies (possibly deterministic), and a randomization among these policies can converge to a feasible policy. The discounted long-term measurement vector of a mixed policy $\mu \in \Delta ( \Pi )$ is defined similarly
|
| 44 |
+
|
| 45 |
+
$$
|
| 46 |
+
\pmb { c } ( \mu ) : = \mathbb { E } _ { \pi \sim \mu } ( \pmb { c } ( \pi ) ) = \sum _ { \pi \in \Pi } \mu ( \pi ) \pmb { c } ( \pi ) .
|
| 47 |
+
$$
|
| 48 |
+
|
| 49 |
+
For a mixed policy $\mu \in \Delta ( \mathcal { U } )$ , its active set is defined to be the set of policies with non-zero weights $\mathcal { A } : = \{ \pi \in \mathcal { U } | \mu ( \pi ) > 0 \}$ . The memory requirement of storing $\mu$ , is then proportional to the size of its active set. Since a mixed policy can be interpreted as a convex combination of policies in its active set, in the following, the term sparsity of a mixed policy refers to the sparsity of this combination.
|
| 50 |
+
|
| 51 |
+
Our learning problem, the convex constrained reinforcement learning (C2RL), is to find a policy whose expected long-term measurement vector lies in a given convex set; i.e., for a given convex target set ${ \mathcal { C } } \subset \mathbb { R } ^ { m }$ , our target is to
|
| 52 |
+
|
| 53 |
+
Any policy $\mu ^ { * }$ that satisfies $\pmb { c } ( \mu ^ { * } ) \in \Omega$ is called a feasible policy, and a C2RL problem is feasible if there exists some feasible policies. In the following, we assume the C2RL problem is feasible.
|
| 54 |
+
|
| 55 |
+
# 4 APPROACH, ALGORITHM AND ANALYSIS
|
| 56 |
+
|
| 57 |
+
We now show how the C2RL (3) can be reduced to a distance minimization problem (7) between a polytope and a convex set. A novel variant of Frank-Wolfe-type algorithm is then proposed to solve the distance minimization problem, followed by theoretic analysis about convergence and sparsity of the proposed method.
|
| 58 |
+
|
| 59 |
+
# 4.1 REDUCE C2RL TO A DISTANCE MINIMIZATION PROBLEM
|
| 60 |
+
|
| 61 |
+
Let $| | \cdot | |$ denote the Euclidean norm. For a convex set $\Omega \in \mathbb { R } ^ { m }$ , let $\begin{array} { r } { \operatorname* { P r o j } _ { \Omega } ( \pmb { x } ) \in \arg \operatorname* { m i n } _ { \pmb { y } \in \Omega } | | \pmb { x } - \pmb { y } | | } \end{array}$ be the projection operator, and $\begin{array} { r } { \mathtt { d i s t } ^ { 2 } ( { \pmb x } , \Omega ) : = \frac { 1 } { 2 } | | { \pmb x } - \mathtt { P r o j } _ { \Omega } ( { \pmb x } ) | | ^ { 2 } } \end{array}$ be half of the squared Euclidean
|
| 62 |
+
|
| 63 |
+
distance function. Then we consider the problem to find a policy whose measurement vector is closest to the target convex set,
|
| 64 |
+
|
| 65 |
+
$$
|
| 66 |
+
\operatorname * { a r g m i n } _ { \mu \in \Delta ( \Pi ) } \mathtt { d i s t } ^ { 2 } ( { \pmb { c } } ( \mu ) , \Omega ) .
|
| 67 |
+
$$
|
| 68 |
+
|
| 69 |
+
A policy $\mu ^ { * } \in \Delta ( \Pi )$ is defined to be an optimal solution if it minimizes (4). Otherwise, the approximation error of $\dot { \mu } \in \Delta ( \Pi )$ is defined as
|
| 70 |
+
|
| 71 |
+
$$
|
| 72 |
+
\mathsf { e r r } ( \mu ) : = \mathsf { d i s t } ^ { 2 } ( { \pmb { c } } ( \mu ) , \Omega ) - \mathsf { d i s t } ^ { 2 } ( { \pmb { c } } ( { \mu } ^ { * } ) , \Omega )
|
| 73 |
+
$$
|
| 74 |
+
|
| 75 |
+
(Approximation Error)
|
| 76 |
+
|
| 77 |
+
where $\mu ^ { * }$ is an optimal solution, and a policy is defined to be an $\epsilon$ -approximate solution if its approximation error is no larger than $\epsilon$ .
|
| 78 |
+
|
| 79 |
+
When C2RL (3) is feasible, the equivalence of being optimal to (4) and being feasible to C2RL can be easily established. Since a feasible policy of C2RL problem lies inside $\Omega$ , it minimizes the non-negative dist2 function, and hence is optimal to (4). Vice versa, any optimal solution to (4) lies inside $\Omega$ and is a feasible solution to C2RL.
|
| 80 |
+
|
| 81 |
+
From a geometric perspective, let $\pmb { c } ( \Pi ) : = \{ \pmb { c } ( \pi ) | \pi \in \Pi \}$ be the set of all values achievable by deterministic policies. If the MDP has finite states and actions (though may be extremely large), then $\Pi$ is finite as well, and hence $c ( \Pi )$ contains finitely many points in $\mathbb { R } ^ { m }$ . Then the set of values achievable by mixed deterministic policies
|
| 82 |
+
|
| 83 |
+
$$
|
| 84 |
+
c ( \Delta ( \Pi ) ) : = \{ c ( \mu ) | \mu \in \Delta ( \Pi ) \} = \{ \sum _ { \pi } \mu ( \pi ) c ( \pi ) | \sum _ { \pi } \mu ( \pi ) = 1 , \mu ( \pi ) \geq 0 \} \subset \mathbb { R } ^ { m }
|
| 85 |
+
$$
|
| 86 |
+
|
| 87 |
+
is the convex hull of $c ( \Pi )$ ; i.e., $c ( \Delta ( \Pi ) )$ is a $m$ -dimension polytope whose vertices are $c ( \Pi )$ . Therefore finding a policy whose value is closest to the target convex set (4) is equivalent to find a point in the polytope $c ( \dot { \Delta ( \Pi ) } )$ that is closest to the convex set $\Omega$
|
| 88 |
+
|
| 89 |
+
$$
|
| 90 |
+
\operatorname* { a r g m i n } _ { \mathbf { c } ( \mu ) \in c ( \Delta ( \Pi ) ) } \mathtt { d i s t } ^ { 2 } ( { \pmb { c } } ( { \mu } ) , \Omega ) \qquad \mathtt { ( D i s t a n c e m i n i m i z a t i o n p r o b l e m ) . }
|
| 91 |
+
$$
|
| 92 |
+
|
| 93 |
+
To solve this constrained optimization problem, it might be tempting to consider projection methods. However, constructing a projection operator for $c ( \Delta ( \Pi ) )$ is non-trivial. For any given measurement vector, it is obscure how to modify a general RL algorithm to update the parameters such that the discounted expected measurement vector is closest to the given value. Therefore, projection-free methods are preferable for this task.
|
| 94 |
+
|
| 95 |
+
Frank-Wolfe (FW) algorithm does not require any projection operation, instead it uses a linear minimizer oracle. Intuitively, finding a linear minimizer is similar to the reward maximization process of what a general RL algorithm does. In section 4.3, we formalize this idea. We show that after simple modifications, any RL algorithm that maximizes a scalar reward can be used to construct such a linear minimizer oracle. Before getting into details of the construction process, we discuss FW-type algorithms over polytope and its applications in the distance minimization problem (7).
|
| 96 |
+
|
| 97 |
+
# 4.2 DISTANCE MINIMIZATION BY FRANK-WOLFE-TYPE ALGORITHMS
|
| 98 |
+
|
| 99 |
+
The Frank-Wolfe algorithm (FW) is a first-order method to minimize a convex function $f : \mathcal { P } \mapsto \mathbb { R }$ over a compact and convex set $\mathcal { P }$ , with only access to a linear minimizer oracle. When the feasible set is a polytope $\mathcal { P } : = \mathsf { c o n v } ( \{ s _ { 1 } , s _ { 2 } , \hdots , s _ { n } \} ) \subset \mathbb { R } ^ { m }$ defined as the convex hull of finitely many points, FW-type algorithms are discussed by Lacoste-Julien & Jaggi (2015) to optimize
|
| 100 |
+
|
| 101 |
+
$$
|
| 102 |
+
\operatorname* { m i n } _ { x \in \mathcal { P } } f ( x ) \quad { \mathrm { ~ u s i n g ~ } } \quad 0 \mathrm { r a c 1 } \mathbf { e } ( \mathrm { v } ) : = \operatorname * { a r g m i n } _ { s \in \{ s _ { 1 } , \ldots , s _ { n } \} } s ^ { T } v .
|
| 103 |
+
$$
|
| 104 |
+
|
| 105 |
+
The standard FW (Algorithm 2 in Appendix A.1) consists of making repeated calls to the linear minimizer oracle to find an improving point $\pmb { s }$ , followed by a convex averaging step of the current iterate ${ \mathbf { \mathcal { x } } } _ { t - 1 }$ and the oracle’s output $\pmb { s }$ .
|
| 106 |
+
|
| 107 |
+
If we have already constructed a RL oracl $\mathfrak { a } ( \lambda )$ that outputs a policy $\pi \in \arg \operatorname* { m i n } _ { \pi \in \Pi } \lambda ^ { T } { \pmb { c } } ( \pi )$ together with its measurement vector $\pmb { c } ( \pi )$ , then the distance minimizing problem (7) can be solved with standard FW by using
|
| 108 |
+
|
| 109 |
+
$$
|
| 110 |
+
\pi , c ( \pi ) \gets \mathrm { R L . o r a c l e } ( \boldsymbol { \nabla } \mathrm { d i s t } ^ { 2 } ( \boldsymbol { x } _ { t - 1 } , \Omega ) ) = \mathrm { R L . o r a c l e } ( \boldsymbol { x } _ { t - 1 } - \boldsymbol { \mathrm { P r o j } } _ { \Omega } ( \boldsymbol { x } _ { t - 1 } ) )
|
| 111 |
+
$$
|
| 112 |
+
|
| 113 |
+
# Algorithm 1 Convex Constrained Reinforcement Learning (C2RL)
|
| 114 |
+
|
| 115 |
+
Input. RL Oracle constructed by any RL algorithm, projection operator to target set $\mathtt { P r o j } _ { \Omega }$ .
|
| 116 |
+
Initialize. Random policy $\pi$ , value $\pmb { x } = \pmb { c } ( \pi )$ , active sets $S _ { p } : = [ \pi ] , S _ { c } : = [ { \pmb x } ]$ and weight $\bar { \lambda ( \cdot ) } = [ 1 ]$ .
|
| 117 |
+
Output. Mixed policy $\mu$ and its value $\mathbf { \boldsymbol { c } } ( \mu )$ s.t. $\mathbf { \boldsymbol { c } } ( \mu )$ minimizes the distance to the target set $\Omega$ .
|
| 118 |
+
|
| 119 |
+
// Major cycle
|
| 120 |
+
|
| 121 |
+
$$
|
| 122 |
+
{ \pmb y } , { \pmb \alpha } \gets \mathsf { A f f i n e M i n i m i z e r } ( S _ { c } , { \pmb \omega } )
|
| 123 |
+
$$
|
| 124 |
+
|
| 125 |
+
16: return $u , c ( { \boldsymbol { \mu } } ) \gets \mathbf { { x } }$
|
| 126 |
+
|
| 127 |
+
to find an improving policy and its measurement vector. For $\begin{array} { r } { \eta _ { t } : = \frac { 2 } { t + 2 } } \end{array}$ , the convex averaging steps
|
| 128 |
+
|
| 129 |
+
$$
|
| 130 |
+
\mu _ { t } ( 1 - \eta _ { t } ) \mu _ { t - 1 } + \eta _ { t } \pi , \quad x _ { t } ( 1 - \eta _ { t } ) x _ { t - 1 } + \eta _ { t } c ( \pi ) ,
|
| 131 |
+
$$
|
| 132 |
+
|
| 133 |
+
then maintain the mixed policy, and the corresponding measurement vector, respectivel
|
| 134 |
+
|
| 135 |
+
However, after $T$ rounds of iteration, the $\mu _ { t }$ found has an active set containing up to $T$ individual polices, and is not sparse enough. If neural networks are used to parameterize the policy, that requires storing $T$ copies of parameters for the individual network, which is unaffordable for largescale usage.
|
| 136 |
+
|
| 137 |
+
To find even more sparse policies, we turn to variants of FW-type algorithms. In particular, Wolfe’s method for minimum norm point in a polytope (Wolfe, 1976; De Loera et al., 2018). In Wolfe’s method (Algorithm 3 in Appendix A.2), the loop in FW is called a major cycle, and the convex averaging step is replaced by a weight optimization process, called minor cycle. Wolfe’s method maintains an active set $s$ , and the current point can be represented by a sparse combination of points in the active set. The minor cycles maintain $s$ to be an affinely independent set such that the affine minimizer is inside $S ^ { t }$ , which Wolfe calls corrals. Recall an affine minimizer is defined as $\begin{array} { r } { \arg \operatorname* { m i n } _ { \pmb { \mathscr { s } } \in \mathsf { a f f } ( \mathscr { S } ) } | | \pmb { \mathscr { s } } | | _ { 2 } } \end{array}$ , where $\begin{array} { r } { \mathtt { a f f } ( \mathscr { S } ) : = \{ y | y = \sum _ { z \in S } \alpha _ { z } ^ { T } \pmb { x } , \sum _ { z \in S } \alpha _ { z } = 1 \} } \end{array}$ is the affine hull formed by $s$ . Since the active set is affinely independent, the number of active atoms is at most $m + 1$ at any time. Wolfe’s method is shown to strictly decrease the approximation error between two major cycles.
|
| 138 |
+
|
| 139 |
+
# 4.3 OUR MAIN ALGORITHM
|
| 140 |
+
|
| 141 |
+
The main obstacle to apply Wolfe’s method to our distance minimization problem (7) is that the objective function in Wolfe’s method is the norm function. However, in our problem, the objective function is the distance function to a convex set. Unlike the norm function, the distance function to a convex set is not strongly convex and affine minimizer is ill-defined with respect to a convex set. To tackle these problems, we modify the Wolfe’s method. At the core of our new variant of FW algorithm, we add a projection step to Wolfe’s method.
|
| 142 |
+
|
| 143 |
+
Projection Step In each major cycle, we minimize the distance to a projected point $\omega : = \mathrm { P r o j } _ { \Omega } ( \pmb { x } )$ . Intuitively, since the distance to the convex set is upper bounded by the distance to this projected point $\omega$ , if the distance to $\omega$ converges, so does the distance to the target convex set.
|
| 144 |
+
|
| 145 |
+
Formally, for a set of points $S \subset \mathbb { R } ^ { m }$ , and a point $\pmb { x } \in \mathbb { R } ^ { m }$ , we extend the definition of an affine minimizer to define affine minimizer with respect to $_ { \textbf { \em x } }$ as $\begin{array} { r } { \arg \operatorname* { m i n } _ { { s } \in \mathrm { a f f } ( S ) } \left| \left| \pmb { \mathscr { s } } - \pmb { \mathscr { x } } \right| \right| _ { 2 } } \end{array}$ . For $_ { \textbf { \em x } }$ being the affine minimizer of $s$ with respect to $\omega$ , the extended affine minimizer property gives ( $\mathbf { \mathrm { \textbf { j } } } \mathbf { \mathrm { { v e n } } } \omega , \forall \pmb { v } \in \mathbf { \mathrm { a f f } } ( S ) , ( \pmb { v } - \pmb { x } ) ^ { T } ( \pmb { x } - \pmb { \omega } ) = 0$ (Extended affine minimizer property)
|
| 146 |
+
|
| 147 |
+
Similar to Wolfe’s method, our C2RL method (Algo. 1) contains an outer loop (called major cycle) to find improving policies and their measurement vectors, and an inner loop (called minor cycle) to maintain the affinely independent property of the active set $ { \boldsymbol { S } } _ { c }$ . At the start of each major cycle step, the $ { \boldsymbol { S } } _ { c }$ is an affinely independent set. Then, the RL oracle (defined in (15)) finds a potential improving policy $\pi \in { \mathcal { U } }$ , and its long-term measurement vector $\pmb { c } ( \pi )$ . If the $\pmb { c } ( \pi )$ does not get strictly closer to the $\omega : = \mathtt { P r o j } ( \pmb { x } )$ , then we are done, and $_ { \textbf { \em x } }$ is the optimal value. Otherwise, the $\pmb { c } ( \pi )$ is added into the active set, and the minor cycle is run to eliminate policies whose measurement vectors are affinely dependent.
|
| 148 |
+
|
| 149 |
+
Line 6 to line 13 contains the minor cycle, which is the same as the original Wolfe’s method (except in line 6, we find affine minimizer with respect to $\omega$ ). The elimination is executed as a series of affine projections. The minor cycle terminates if active set $ { \boldsymbol { S } } _ { c }$ is affinely independent. Though the interleaving of major and minor cycles oscillate the size of active set $S _ { c }$ , the minor cycles keep $| S _ { c } |$ an affinely independent set, and is terminated whenever $S _ { c }$ contains a single element. Therefore at the start of any major cycle, the size of the active set satisfies $| S _ { c } | \in [ 0 , \bar { m } + 1 ]$ . More background about the minor cycle in Wolfe’s method is provided in Appendix A.2.
|
| 150 |
+
|
| 151 |
+
Construction of RL Oracle The construction of our RL oracle can use any off-the-shelf RL algorithm that maximizes a scalar reward. For any given $\pmb { \lambda } \in \mathbb { R } ^ { m }$ , we define any algorithm that finds a policy minimizing the linear function $\lambda ^ { T } c ( \cdot )$ as a $R L$ oracle, that is
|
| 152 |
+
|
| 153 |
+
$$
|
| 154 |
+
\mathtt { R L \_ o r a c l e } _ { \mathtt { p } } ( \lambda ) \in \underset { \pi \in \Pi } { \arg \operatorname* { m i n } } \lambda ^ { T } \pmb { c } ( \pi ) .
|
| 155 |
+
$$
|
| 156 |
+
|
| 157 |
+
Recall that standard RL algorithm receives a scalar reward after each state transition, instead of the long-term measurement vector $\pmb { c } ( \pi ) \in \mathbb { R } ^ { m }$ . We then use the following linear property to reformulate the right hand side of (12) to a standard RL problem
|
| 158 |
+
|
| 159 |
+
$$
|
| 160 |
+
\underset { \pi \in \Pi } { \arg \operatorname* { m i n } } \ : \lambda ^ { T } c ( \pi ) = \underset { \pi \in \Pi } { \arg \operatorname* { m i n } } \ : \lambda ^ { T } \mathbb { E } ( \sum _ { t = 0 } ^ { T } \gamma ^ { t } c _ { t } ) = - \underset { \pi \in \Pi } { \arg \operatorname* { m a x } } \ : \mathbb { E } ( \sum _ { t = 0 } ^ { T } \gamma ^ { t } ( - \lambda ^ { T } c _ { t } ) ) .
|
| 161 |
+
$$
|
| 162 |
+
|
| 163 |
+
This shows that if we consider the Markov decision process with the same state, action, and transition probability, and construct a scalar reward $r : = \overline { { ( - \lambda ^ { T } } } c _ { t } )$ , then any policy that maximizes the expected $r$ is a linear minimizer of (12). Therefore any RL algorithm that best suits the underlying problems can be used to construct a RL oracle.
|
| 164 |
+
|
| 165 |
+
Certifying constraint satisfaction amounts to evaluate the measurement vector of the current policy. This is handy in online settings, where simulations can be used to evaluate the measurement vector of the policy directly. Otherwise, in batch settings, various off-policy evaluation methods, such as importance sampling (Precup, 2000; Precup et al., 2001) or doubly robust (Jiang & Li, 2016; Dud´ık et al., 2011), can be used to evaluate the policy.
|
| 166 |
+
|
| 167 |
+
$$
|
| 168 |
+
{ \mathrm { R L } } _ { \mathrm { - } } { \mathrm { o r a c l e } } _ { \mathrm { c } } ( \lambda ) : = c ( \operatorname* { a r g m i n } _ { \pi \in \Pi } \lambda ^ { T } c ( \pi ) ) = \operatorname * { a r g m i n } _ { c ( \pi ) , \pi \in \Pi } \lambda ^ { T } c ( \pi ) .
|
| 169 |
+
$$
|
| 170 |
+
|
| 171 |
+
To simplify notation, we assume a RL Oracle returns a policy as well as its measurement vector
|
| 172 |
+
|
| 173 |
+
$$
|
| 174 |
+
\mathtt { R L \_ O r a c l e } ( \lambda ) : = \pi , \pm ( \pi ) = \mathtt { R L \_ o r a c l e } _ { \mathtt { p } } ( \lambda ) , \mathtt { R L \_ o r a c l e } _ { \mathtt { c } } ( \lambda )
|
| 175 |
+
$$
|
| 176 |
+
|
| 177 |
+
Finding Extended Affine Minimizer The process AffineMinimizer $( S , { \pmb x } )$ returns the $( y , \alpha )$ the affine minimizer of $S$ with respect to $_ { \textbf { \em x } }$ where $\textbf { { y } }$ is the affine minimizer and $\alpha : = \{ \alpha _ { s } | \forall s \in$ $ { \boldsymbol { S } } _ { c } \boldsymbol { \} }$ is the set of coefficient expressing $\textbf { { y } }$ as an affine combination of points in $S$ , that is ${ \textbf { 3 } } =$ $\sum _ { s \in S _ { c } } \alpha _ { s } s$ , where $\alpha _ { s }$ is the weight associated with $\pmb { s }$ . The process AffineMinimizer $( S , { \pmb x } )$ can be straightforwardly implemented using linear algebra. Wolfe (1976) also provides a more efficient implementation that uses a triangular array representation of the active set.
|
| 178 |
+
|
| 179 |
+
# 4.4 CONVERGENCE AND SPARSITY
|
| 180 |
+
|
| 181 |
+
In this section, we analyze the convergence and complexity of the proposed C2RL method (Algo. 1). We first show that approximation error of C2RL strictly decreases between any two major cycle steps and it converges in $O ( 1 / t )$ rate. Then we show our method ensures convergence of arbitrary RL algorithm, including those searching for deterministic policies. Moreover, concerning the memory complexity, we show that maintaining an active policy set of $m { + 1 }$ is worst case optimal to ensure the convergence of arbitrary RL algorithm. Therefore, the proposed C2RL indeed achieves the optimal sparsity for the found policy, making it favorable for large-scale usage.
|
| 182 |
+
|
| 183 |
+
The main difference between the convergence analysis of C2RL and Wolfe’s method is the addition of the projection step. Intuitively, at each major step, if we are making a significant progress toward the projected point, then the distance to the convex set is decreased by at least the same amount.
|
| 184 |
+
|
| 185 |
+
Time Complexity. In our analysis, we consider the approximation error as defined in (5). We use superscript $t$ to denote the variable in $t$ -th major cycle before executing any minor cycle. To simplify notions, we let $x ^ { t } : = c ( \mu ^ { t } )$ and $s ^ { t } : = c ( \pi ^ { t } )$ . When discussing one step with $t$ fixed, let $y ^ { i }$ denote the affine minimizer found in $i$ -th minor cycle (line 6 of Algo. 1). We first show that the C2RL method strictly reduces approximation error between two calls of the RL oracle.
|
| 186 |
+
|
| 187 |
+
Theorem 4.1 (Approximation Error Strictly Decreases). For any non-terminal step $t ,$ , we have $\mathsf { e r r } ( \mu ^ { t + 1 } ) \ < \ \mathsf { e r r } ( \mu ^ { t } )$ . That is, the measurement vector of $\mu ^ { t }$ found by the C2RL method gets strictly closer to the convex set $\Omega$ after major cycle step.
|
| 188 |
+
|
| 189 |
+
The proof is provided in Appendix B. The idea is to consider the distance between $\mathbf { \boldsymbol { x } } ^ { t }$ and $\omega ^ { t }$ . When the major cycle has no minor cycle, the non-terminal condition and the affine minimizer property implies $\mathrm { d i } \mathbf { s } \ t ^ { 2 } ( \underline { { { \boldsymbol { x } } } } ^ { t + 1 } , \omega ^ { t } ) < \mathrm { d i } \mathbf { s } \ t ^ { 2 } ( \boldsymbol { x } ^ { t } , \omega ^ { t } )$ . Otherwise we show that the first minor cycle strictly reduces the $\mathsf { d i s t ^ { 2 } } ( \boldsymbol { x } ^ { t } , \omega ^ { t } )$ by moving along the segment joining $_ { \textbf { \em x } }$ and $\textbf { { y } }$ , and the subsequent minor cycle cannot increase it. Since $\omega ^ { t } \in \Omega$ , we conclude $\mathrm { e r r } ( \bar { { \bf x } ^ { t + 1 } } ) \le \mathrm { d i s t ^ { 2 } } ( { \bf x } ^ { t + 1 } , \omega ^ { \hat { t } } ) <$ $\mathrm { d i s t ^ { 2 } } ( \dot { { \bf x } } ^ { t } , \omega ^ { t } ) = \mathrm { e r r } ( { \bf x } ^ { t } )$ , and the approximation error strictly decreases.
|
| 190 |
+
|
| 191 |
+
Given the approximation error strictly decreases, Wolfe’s method for minimum norm point can be shown to terminate finitely (Wolfe, 1976). However, this finitely terminating property does not hold for our algorithm. Since a changed $\omega ^ { t }$ may yield a lower distance to the same active set $S _ { c } ^ { t }$ , the active set may stay unchanged across major cycles (see Figure 2 Middle for an example). Therefore we establish the convergence of the C2RL method by the following theorem.
|
| 192 |
+
|
| 193 |
+
Theorem 4.2 (Convergence in Approximation Error). For $t \geq 1$ , the mixed policy $\mu ^ { t }$ found by the C2RL method satisfies
|
| 194 |
+
|
| 195 |
+
$$
|
| 196 |
+
\mathsf { e r r } ( \mu ^ { t } ) \leq 1 6 Q ^ { 2 } / ( t + 2 ) ,
|
| 197 |
+
$$
|
| 198 |
+
|
| 199 |
+
where $Q : = \operatorname* { m a x } _ { \mu \in \Delta ( \mathcal { U } ) } | | c ( \mu ) | |$ is the maximum norm of a measurement vector.
|
| 200 |
+
|
| 201 |
+
The proof is provided in Appendix C, which relies on the following two lemmas. We briefly discuss the main idea here. Define major cycle steps with at most one minor cycle as ”non-drop step” and major cycle steps with more than one minor cycles as ”drop steps”. We show that in each non-drop step, Algorithm 1 is guaranteed to make enough progress in the following lemma.
|
| 202 |
+
|
| 203 |
+
Lemma 4.3. For a non-drop step in C2RL method, we have $\mathsf { e r r } ( \mu ^ { t } ) - \mathsf { e r r } ( \mu ^ { t + 1 } ) \geq \mathsf { e r r } ^ { 2 } ( \mu ^ { t } ) / 8 Q ^ { 2 } .$
|
| 204 |
+
|
| 205 |
+
Though this does not hold for drop steps, we can bound the frequency of drop steps by the following.
|
| 206 |
+
|
| 207 |
+
Lemma 4.4. After t major cycle steps of C2RL method, the number of drop steps is less than $t / 2$ .
|
| 208 |
+
|
| 209 |
+
Since the approximation error strictly decreases (Thm. 4.1), and in more than half of the major cycles steps, the C2RL method makes significantly progress. The Thm. (4.2) can then be proved using an induction argument (Appendix C).
|
| 210 |
+
|
| 211 |
+
Convergence with Arbitrary RL Algo. The convergence of the C2RL method when used with RL algorithms that search for deterministic policies, such as DQN, DDPG and variants, is indeed straightforward. In (8), though each time the oracle yields a vertex, the FW-type algorithms indeed optimize over the polytope formed by these vertices. Then since citetaltman1999constrained shows that any $c ( \cdot )$ achievable can be achieved by some mixed deterministic policies, we conclude that if the underlying problem is feasible, then our C2RL method is able to find a feasible policy.
|
| 212 |
+
|
| 213 |
+
Memory Complexity We then discuss the sparsity of mixed policy for constrained RL problem. We give a constructive proof in Appendix $\mathrm { D }$ to show that to ensure convergence for RL algorithms that search for deterministic policies, storing $m + 1$ policies is required in the worst case.
|
| 214 |
+
|
| 215 |
+

|
| 216 |
+
Figure 1: Left: The Risky Mars Rover environment. The agent is required to navigate from the starting point to reach the goal point without staying long (0.5 steps in expectation) in the risky area (cross-hatching region). Middle, Right. Example of an optimal mixed policy found by C2RL in a single run. After 10k samples, C2RL finds a mixed policy that randomizes among two policies with weight 0.49 and 0.51. The visitation probabilities of the two policies are plotted.
|
| 217 |
+
|
| 218 |
+
Theorem 4.5 (Memory Complexity Bound). For an constrained RL problem with $m$ -dimensional measurement vector, in the worst case, a mixed policy needs to randomize among $m + 1$ individual policies to ensure convergence of RL oracles that search for deterministic policies.
|
| 219 |
+
|
| 220 |
+
Since the minor cycles in the C2RL method eliminate policies with affinely dependent measurement vectors, after the termination of minor cycles, the size of the active set is at most $m + 1$ . That is, the policy found by the C2RL method requires randomization among no more than $m + 1$ individual policies. Therefore the proposed C2RL indeed achieves the optimal sparsity in the worst case, making it favorable for large-scale usage.
|
| 221 |
+
|
| 222 |
+
Corollary 4.5.1. The C2RL method that randomizes among at most $m + 1$ policies is worst-case optimal to ensure convergence of any RL oracle.
|
| 223 |
+
|
| 224 |
+
# 5 EXPERIMENTS
|
| 225 |
+
|
| 226 |
+
We evaluate the performance of C2RL in a grid-world navigation task (Fig. 1), and demonstrate its ability to efficiently find sparse policy. In this Risky Mars Rover environment, the agent is required to navigate from the starting point to the goal point, by moving to one of the four neighborhood cells at each step. The episodes terminate when the goal point is reached or after 300 steps. To enforce robustness, we add a risky area to indicate the dangerous states. The agent receives a measurement vector to indicate the steps it takes (0.1 for every step), and whether it stays in the risky area (0.1 for every risky step, and 0 otherwise), with discount factor $\gamma = 0 . 9 9$ . We constrain the agent to reach the goal point with expected cumulative steps measure within 1.1 and the expected cumulative risky steps within 0.05. Note that by design, the shortest path from the starting point to the goal point does not satisfy the constraint. This is common in practice, as robustness typically evolves trade-off between the reward and the constraint satisfaction.
|
| 227 |
+
|
| 228 |
+
The proposed C2RL method is compared with approachability-based policy optimization (ApproPO) (Miryoosefi et al., 2019) and with reward constrained policy optimization (RCPO) (Tessler et al., 2018). ApproPO solves the same convex constrained RL problem by using an RL oracle to play against a no-regret online learner (Hazan et al., 2008; Zinkevich, 2003). Since ApproPO and C2RL both use a RL oracle, ApproPO is a natural baseline to be compared with our method. Besides, we also compare with RCPO, which takes a Lagrangian approach to incorporate the constraints as a penalty signal into the reward. Using an advantage actor critic (A2C) Mnih et al. (2016), RCPO has been shown to converge to a fixed point. For a fair comparison, C2RL and ApproPO uses an A2C agent as the RL oracle, with the same hyperparameter as used in RCPO. The approximation errors are compared after training for the same number of samples.
|
| 229 |
+
|
| 230 |
+
Note that the C2RL method does not introduce any extra hyper-parameter. For ApproPO and RCPO, they require extra hyper-parameter for the initialization and learning rate of a variable equivalent to our $\boldsymbol { \lambda }$ in the outer loop. This is because our approach does not rely on the online learning framework, and therefore there is no need to tune the initialization and learning rate for our $\boldsymbol { \lambda }$ and ease the usage.
|
| 231 |
+
|
| 232 |
+
We first showcase the consequences of our theoretical results using an optimal RL oracle. For any $\pmb { x } \in \mathbb { R } ^ { m }$ , an optimal policy can be easily found via Dijkstra’s algorithm. If multiple optimal paths exist, one is randomly picked to form a deterministic policy.
|
| 233 |
+
|
| 234 |
+

|
| 235 |
+
Figure 2: Left: Visualization of the distance minimization problem (7) in $\mathbb { R } ^ { 2 }$ , where the number of steps and the number of steps in risky zone are measured. The green hatched region is the polytope formed by values achievable by mixed deterministic policies $c \bar { ( \Delta ( \Pi ) ) }$ , and the red hatched region is the target set. Middle: Using an optimal RL oracle, 10 paths are sampled to showcase the convergence property of C2RL and ApproPO, where each cross on the dashed line corresponds to a call to the oracle. Right: If we zoom in, ApproPO suffers from the zig-zagging problem.
|
| 236 |
+
|
| 237 |
+

|
| 238 |
+
Figure 3: Left: Time complexity measured by number of calling an optimal RL oracle. Middle, Right: Using A2C to approximate an RL oracle, time complexity measured by thousands of samples and memory complexity measured by the number of policies stored are compared.
|
| 239 |
+
|
| 240 |
+
Using this as an optimal RL oracle, the convergence property of C2RL and ApproPo are compared. Figure 2 Middle shows the value of policies $c ( \mu ^ { t } )$ found after each call to the oracle. In Figure 2 Right, when approaching the boundary of the feasible set, the iterations of approachability-based methods start to zigzag. Since C2RL contains a minor cycle to re-optimize the weights among the active set, C2RL progresses quickly to reach the exact optimal solution. In Figure 3 Left, the approximation error is shown for 300 calls of the optimal RL oracle.
|
| 241 |
+
|
| 242 |
+
We then compare C2RL, ApproPO and RCPO using the same A2C agent (details of the model structures and hyper-parameters are provided in Appendix E). We run each algorithm for 50 times, and each run for a maximum of 100 thousands of samples. The mean and standard deviation of the results are presented in Figure 3. The original paper of ApproPO suggests using a cache to save memory, and the memory requirement of this variant is also presented. Figure 3 demonstrates that C2RL converges to an optimal policy faster than previous methods, and a sparse combination of individual policies is maintained throughout the iteration process.
|
| 243 |
+
|
| 244 |
+
# 6 CONCLUSION
|
| 245 |
+
|
| 246 |
+
In this paper, we introduce C2RL, an algorithm to solve RL problems under orthant or convex constraints. Our method reduces the constrained RL problem to a distance minimization problem, and a novel variant of Frank-Wolfe type algorithm is proposed to solve this. Our method comes with rigorous theoretical guarantees and does not introduce any extra hyper-parameter. To find an $\epsilon$ -approximation solution, C2RL takes $O ( 1 / \epsilon )$ calls of any RL oracle and ensures convergence to work with arbitrary RL algorithm. Moreover, C2RL strictly reduces the approximation error between consecutive calls of RL oracle, and for $m$ -dimensional constraints, the memory requirement is reduced from storing infinitely many policies $( O ( 1 / \epsilon ) )$ ) to storing at most constantly many $( m + 1 )$ polices. We further show that the constant is worst-case optimal to ensure the convergence for RL algorithms that search for deterministic policies. Experimentally, we demonstrate that the proposed C2RL method finds sparse solution efficiently, and outperforms previous methods.
|
| 247 |
+
|
| 248 |
+
# REFERENCES
|
| 249 |
+
|
| 250 |
+
Jacob Abernethy, Peter L Bartlett, and Elad Hazan. Blackwell approachability and no-regret learning are equivalent. In Proceedings of the 24th Annual Conference on Learning Theory, pp. 27–46, 2011.
|
| 251 |
+
|
| 252 |
+
Jacob D Abernethy and Jun-Kun Wang. On frank-wolfe and equilibrium computation. In Advances in Neural Information Processing Systems, pp. 6584–6593, 2017.
|
| 253 |
+
|
| 254 |
+
Alekh Agarwal, Alina Beygelzimer, Miroslav Dud´ık, John Langford, and Hanna Wallach. A reductions approach to fair classification. arXiv preprint arXiv:1803.02453, 2018.
|
| 255 |
+
|
| 256 |
+
Eitan Altman. Constrained Markov decision processes, volume 7. CRC Press, 1999.
|
| 257 |
+
|
| 258 |
+
Gabriel Barth-Maron, Matthew W Hoffman, David Budden, Will Dabney, Dan Horgan, Dhruva Tb, Alistair Muldal, Nicolas Heess, and Timothy Lillicrap. Distributed distributional deterministic policy gradients. arXiv preprint arXiv:1804.08617, 2018.
|
| 259 |
+
|
| 260 |
+
Amir Beck and Shimrit Shtern. Linearly convergent away-step conditional gradient for non-strongly convex functions. Mathematical Programming, 164(1-2):1–27, 2017.
|
| 261 |
+
|
| 262 |
+
Craig Boutilier and Tyler Lu. Budget allocation using weakly coupled, constrained markov decision processes. 2016.
|
| 263 |
+
|
| 264 |
+
Deeparnab Chakrabarty, Prateek Jain, and Pravesh Kothari. Provable submodular minimization using wolfe’s algorithm. In Advances in Neural Information Processing Systems, pp. 802–809, 2014.
|
| 265 |
+
|
| 266 |
+
Minmin Chen, Alex Beutel, Paul Covington, Sagar Jain, Francois Belletti, and Ed H Chi. Top-k off-policy correction for a reinforce recommender system. In Proceedings of the Twelfth ACM International Conference on Web Search and Data Mining, pp. 456–464, 2019.
|
| 267 |
+
|
| 268 |
+
Yinlam Chow and Mohammad Ghavamzadeh. Algorithms for cvar optimization in mdps. In Advances in neural information processing systems, pp. 3509–3517, 2014.
|
| 269 |
+
|
| 270 |
+
Yinlam Chow, Mohammad Ghavamzadeh, Lucas Janson, and Marco Pavone. Risk-constrained reinforcement learning with percentile risk criteria. The Journal of Machine Learning Research, 18 (1):6070–6120, 2017.
|
| 271 |
+
|
| 272 |
+
Yinlam Chow, Ofir Nachum, Edgar Duenez-Guzman, and Mohammad Ghavamzadeh. A lyapunovbased approach to safe reinforcement learning. In Advances in neural information processing systems, pp. 8092–8101, 2018.
|
| 273 |
+
|
| 274 |
+
Jesus A De Loera, Jamie Haddock, and Luis Rademacher. The minimum euclidean-norm point in ´ a convex polytope: Wolfe’s combinatorial algorithm is exponential. In Proceedings of the 50th Annual ACM SIGACT Symposium on Theory of Computing, pp. 545–553, 2018.
|
| 275 |
+
|
| 276 |
+
Miroslav Dud´ık, John Langford, and Lihong Li. Doubly robust policy evaluation and learning. arXiv preprint arXiv:1103.4601, 2011.
|
| 277 |
+
|
| 278 |
+
Marguerite Frank, Philip Wolfe, et al. An algorithm for quadratic programming. Naval research logistics quarterly, 3(1-2):95–110, 1956.
|
| 279 |
+
|
| 280 |
+
Yoav Freund and Robert E Schapire. Adaptive game playing using multiplicative weights. Games and Economic Behavior, 29(1-2):79–103, 1999.
|
| 281 |
+
|
| 282 |
+
Scott Fujimoto, Herke Van Hoof, and David Meger. Addressing function approximation error in actor-critic methods. arXiv preprint arXiv:1802.09477, 2018.
|
| 283 |
+
|
| 284 |
+
Dan Garber and Elad Hazan. A linearly convergent conditional gradient algorithm with applications to online and stochastic optimization. arXiv preprint arXiv:1301.4666, 2013a.
|
| 285 |
+
|
| 286 |
+
Dan Garber and Elad Hazan. Playing non-linear games with linear oracles. In 2013 IEEE 54th Annual Symposium on Foundations of Computer Science, pp. 420–428. IEEE, 2013b.
|
| 287 |
+
|
| 288 |
+
Peter Geibel and Fritz Wysotzki. Risk-sensitive reinforcement learning applied to control under constraints. Journal of Artificial Intelligence Research, 24:81–108, 2005.
|
| 289 |
+
|
| 290 |
+
Elad Hazan, Alexander Rakhlin, and Peter L Bartlett. Adaptive online gradient descent. In Advances in Neural Information Processing Systems, pp. 65–72, 2008.
|
| 291 |
+
|
| 292 |
+
Martin Jaggi. Revisiting frank-wolfe: Projection-free sparse convex optimization. In Proceedings of the 30th international conference on machine learning, number CONF, pp. 427–435, 2013.
|
| 293 |
+
|
| 294 |
+
Nan Jiang and Lihong Li. Doubly robust off-policy value evaluation for reinforcement learning. In International Conference on Machine Learning, pp. 652–661. PMLR, 2016.
|
| 295 |
+
|
| 296 |
+
Simon Lacoste-Julien and Martin Jaggi. On the global linear convergence of frank-wolfe optimization variants. In Advances in neural information processing systems, pp. 496–504, 2015.
|
| 297 |
+
|
| 298 |
+
Hoang Le, Cameron Voloshin, and Yisong Yue. Batch policy learning under constraints. In International Conference on Machine Learning, pp. 3703–3712, 2019.
|
| 299 |
+
|
| 300 |
+
Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015.
|
| 301 |
+
|
| 302 |
+
Sobhan Miryoosefi, Kiante Brantley, Hal Daume III, Miro Dudik, and Robert E Schapire. Reinforce- ´ ment learning with convex constraints. In Advances in Neural Information Processing Systems, pp. 14093–14102, 2019.
|
| 303 |
+
|
| 304 |
+
BF Mitchell, Vladimir Fedorovich Dem’yanov, and VN Malozemov. Finding the point of a polyhedron closest to the origin. SIAM Journal on Control, 12(1):19–26, 1974.
|
| 305 |
+
|
| 306 |
+
Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, and Martin Riedmiller. Playing atari with deep reinforcement learning. arXiv preprint arXiv:1312.5602, 2013.
|
| 307 |
+
|
| 308 |
+
Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In International conference on machine learning, pp. 1928–1937, 2016.
|
| 309 |
+
|
| 310 |
+
Santiago Paternain, Luiz Chamon, Miguel Calvo-Fullana, and Alejandro Ribeiro. Constrained reinforcement learning has zero duality gap. In Advances in Neural Information Processing Systems, pp. 7555–7565, 2019.
|
| 311 |
+
|
| 312 |
+
Doina Precup. Eligibility traces for off-policy policy evaluation. Computer Science Department Faculty Publication Series, pp. 80, 2000.
|
| 313 |
+
|
| 314 |
+
Doina Precup, Richard S Sutton, and Sanjoy Dasgupta. Off-policy temporal-difference learning with function approximation. In ICML, pp. 417–424, 2001.
|
| 315 |
+
|
| 316 |
+
Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction. MIT press, 2018.
|
| 317 |
+
|
| 318 |
+
Chen Tessler, Daniel J Mankowitz, and Shie Mannor. Reward constrained policy optimization. In International Conference on Learning Representations, 2018.
|
| 319 |
+
|
| 320 |
+
Hado Van Hasselt, Arthur Guez, and David Silver. Deep reinforcement learning with double qlearning. arXiv preprint arXiv:1509.06461, 2015.
|
| 321 |
+
|
| 322 |
+
Ziyu Wang, Tom Schaul, Matteo Hessel, Hado Hasselt, Marc Lanctot, and Nando Freitas. Dueling network architectures for deep reinforcement learning. In International conference on machine learning, pp. 1995–2003, 2016.
|
| 323 |
+
|
| 324 |
+
Philip Wolfe. Convergence theory in nonlinear programming. Integer and nonlinear programming, pp. 1–36, 1970.
|
| 325 |
+
|
| 326 |
+
Philip Wolfe. Finding the nearest point in a polytope. Mathematical Programming, 11(1):128–149, 1976.
|
| 327 |
+
|
| 328 |
+
Shuai Xiao, Le Guo, Zaifan Jiang, Lei Lv, Yuanbo Chen, Jun Zhu, and Shuang Yang. Model-based constrained mdp for budget allocation in sequential incentive marketing. In Proceedings of the 28th ACM International Conference on Information and Knowledge Management, pp. 971–980, 2019.
|
| 329 |
+
|
| 330 |
+
Xiangyu Zhao, Liang Zhang, Long Xia, Zhuoye Ding, Dawei Yin, and Jiliang Tang. Deep reinforcement learning for list-wise recommendations. arXiv, pp. arXiv–1801, 2017.
|
| 331 |
+
|
| 332 |
+
Guanjie Zheng, Fuzheng Zhang, Zihan Zheng, Yang Xiang, Nicholas Jing Yuan, Xing Xie, and Zhenhui Li. Drn: A deep reinforcement learning framework for news recommendation. In Proceedings of the 2018 World Wide Web Conference, pp. 167–176, 2018.
|
| 333 |
+
|
| 334 |
+
Martin Zinkevich. Online convex programming and generalized infinitesimal gradient ascent. In Proceedings of the 20th international conference on machine learning (icml-03), pp. 928–936, 2003.
|
| 335 |
+
|
| 336 |
+
Lixin Zou, Long Xia, Zhuoye Ding, Jiaxing Song, Weidong Liu, and Dawei Yin. Reinforcement learning to optimize long-term user engagement in recommender systems. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp. 2810–2818, 2019.
|
| 337 |
+
|
| 338 |
+
A MORE ON FRANK-WOLFE-TYPE ALGORITHMS
|
| 339 |
+
|
| 340 |
+
A.1 STANDARD FRANK-WOLFE ALGORITHM
|
| 341 |
+
|
| 342 |
+
A.2 WOLFE’S METHOD FOR MINIMUM NORM POINT
|
| 343 |
+
|
| 344 |
+
<table><tr><td>Algorithm 2 Frank-Wolfe algorithm (Frank et al.,1956)</td></tr><tr><td>Input: obj. f : V -→ R,oracle O(·), init. xo ∈ Y</td></tr><tr><td>1: for t=1,2,3...,Tdo</td></tr><tr><td> 2:s←0racle(Vf(xt-1))= argming∈{s1,.,sn) sTVf(xt-1)</td></tr><tr><td>:xt←(1-nt)xt-1+nts,fornt:= t²2 3: 2</td></tr><tr><td></td></tr><tr><td>4: end for 5: return xT</td></tr></table>
|
| 345 |
+
|
| 346 |
+
For a convex function $f : \mathcal { X } \mapsto \mathbb { R }$ the Frank-Wolfe algorithm (FW) solves the constrained optimization problem over a compact and convex set $\mathcal { X }$ . The standard FW is known to have a sublinear convergence rate, and various methods are proposed to improve the performance. For example, when the underlying feasible set is a polytope, and the objective function is strongly convex, multiple variants, such as away-step FW (Wolfe, 1970; Jaggi, 2013), pairwise FW (Mitchell et al., 1974), and Wolfe’s method (Wolfe, 1976) are shown to enjoy linear convergence rate. Linear convergence under other conditions is also studied (Beck & Shtern, 2017; Garber & Hazan, 2013a;b).
|
| 347 |
+
|
| 348 |
+
Algorithm 3 Wolfe’s Method for Minimum Norm Point
|
| 349 |
+
Initialize $\boldsymbol { \mathscr { x } } \in \mathcal { P }$ , active set $s = [ { \pmb x } ]$ and weight $\lambda = [ 1 ]$ .
|
| 350 |
+
Output: $\boldsymbol { \mathscr { x } } \in \mathcal { P }$ that has the minimum Euclidean norm.
|
| 351 |
+
1: while true do // Major cycle 2: $\pmb { s } \gets 0 \mathtt { r a c l e } ( \pmb { x } )$ // Potential improving point 3: if $| | \pmb { x } | | ^ { 2 } \leq \pmb { x } ^ { T } s ^ { ' } + \epsilon$ then break
|
| 352 |
+
4: $S \gets S \cup \{ \mathbf { s } \}$
|
| 353 |
+
5: while true do // Minor cycle 6: ${ \pmb y } , { \pmb \alpha } \gets \mathsf { A f f i n e M i n i m i z e r } ( { \pmb S } )$ $/ / \pmb { y } = \arg \operatorname* { m i n } _ { \pmb { s } \in \mathrm { a f f } ( \pmb { S } ) } \left| \left| \pmb { s } \right| \right| _ { 2 }$ 7: if $\alpha _ { s } > 0$ for all $\pmb { s }$ then break // $\pmb { y } \in \mathsf { c o n v } ( S )$ 8: $/ /$ If $\pmb { \mathscr { z } } \cos \tau ( S )$ , then update $\textbf { { y } }$ to the intersection of $\mathsf { c o n v } ( S )$ and segment joining $_ { \textbf { \em x } }$ and $\textbf { { y } }$ . Then remove points in $s$ unnecessary for describing $\textbf { { y } }$ .
|
| 354 |
+
9: $\begin{array} { r l } & { \overset { \vartriangle } { \theta } \operatorname* { m i n } _ { i : \boldsymbol { \alpha } _ { i } \leq 0 } \frac { \dot { \lambda } _ { i } } { \lambda _ { i } - \alpha _ { i } } } \\ & { \overset { \vartriangle } { \boldsymbol { y } } \theta \pmb { y } + ( 1 - \theta ) \pmb { x } , \lambda _ { i } = \theta \alpha _ { i } + ( 1 - \theta ) \lambda _ { i } } \\ & { \overset { \boldsymbol { S } } { \epsilon } \{ \mathbf { s } _ { i } | \mathbf { s } _ { i } \in \mathcal { S } \mathrm { a n d } \lambda _ { i } > 0 \} } \end{array}$ // Recall $\boldsymbol { \lambda }$ satisfies $\begin{array} { r } { \pmb { x } = \sum _ { s \in \mathcal { S } } \lambda _ { s } \pmb { s } } \end{array}$ 10:
|
| 355 |
+
11:
|
| 356 |
+
12: end while
|
| 357 |
+
13: Update ${ \mathbf { \mathscr { x } } } = { \mathbf { \mathscr { y } } }$ and $\lambda = \alpha$ .
|
| 358 |
+
14: end while
|
| 359 |
+
15: return $_ { \textbf { \em x } }$
|
| 360 |
+
|
| 361 |
+
Wolfe’s method is an iterative algorithm for finding the point with minimum Euclidean norm in a polytope, which is defined as the convex hull of a set of finitely many points.
|
| 362 |
+
|
| 363 |
+
The Wolfe’s method consists of a finite number of major cycles, each of which consists of a finite number of minor cycles. At the start of each major cycle, let $H ( \pmb { x } ) : = \{ \pmb { y } ^ { T } \pmb { x } = \pmb { x } ^ { \pmb { x } } \}$ be the hyperplane defined by $_ { \textbf { \em x } }$ . If $H ( { \pmb x } )$ separates the polytope from the origin, then the major cycle is terminated. Otherwise, it invokes an oracle to find any point on the near side of the hyperplane. The point is then added into the active set $s$ , and starts a minor cycle.
|
| 364 |
+
|
| 365 |
+
In a minor cycle, let $\textbf { { y } }$ be the point of smallest norm in of the affine hull aff $( S )$ . If $\textbf { { y } }$ is in the relative interior of the convex hull $\mathsf { c o n v } ( S )$ , then $_ { \textbf { \em x } }$ is updated to $\textbf { { y } }$ and the minor cycle is terminated. Otherwise, $\textbf { { y } }$ is updated to the nearest point to $\textbf { { y } }$ on the line segment $\mathsf { c o n v } ( S ) \cap [ \pmb { x } , \pmb { y } ]$ . Thus $\textbf { { y } }$ is updated to a boundary point of $\mathsf { c o n v } ( S )$ , and any point that is not on the face of $\mathsf { c o n v } ( S )$ in which $\textbf { { y } }$ lies is deleted. The minor cycles are executed repeatedly until $s$ becomes a corral, that is, a set whose affine minimizer lies inside its convex hull. Since a set of one point is always a corral, the minor cycles is terminated after a finite number of runs.
|
| 366 |
+
|
| 367 |
+
# B PROOF OF THEOREM 4.1
|
| 368 |
+
|
| 369 |
+
Theorem 4.1 (Approximation Error Strictly Decreases). For any non-terminal step $t ,$ , we have $\mathsf { e r r } ( \mu ^ { t + 1 } ) \ < \ \mathsf { e r r } ( \mu ^ { t } )$ . That is, the measurement vector of $\mu ^ { t }$ found by the C2RL method gets strictly closer to the convex set $\Omega$ after major cycle step.
|
| 370 |
+
|
| 371 |
+
Proof. If the current step is a major cycle with no minor cycle, then $\boldsymbol { x } ^ { t + 1 }$ is the affine minimizer of aff $( S \cup \{ s ^ { t } \} )$ with respect to $\omega ^ { \bar { t } }$ . Then the affine minimizer property implies $( \pmb { s } ^ { t } - \pmb { x } ^ { t + 1 } ) ( \pmb { x } ^ { t + 1 } -$ $\omega ^ { t } ) \ = \ 0$ . Since iteration does not terminate at step $t$ , we have $( { \pmb x } ^ { t } - { \bar { \pmb \omega } } ^ { t } ) ^ { T } ( { \pmb x } ^ { t } - { \pmb s } ^ { t } ) > 0$ , and therefore $\pmb { x } ^ { t + 1 }$ not equal to $\mathbf { \boldsymbol { x } } ^ { t }$ . Then $\boldsymbol { x } ^ { t + 1 }$ is the unique affine minimizer implies $f _ { \Omega } ( { \pmb x } ^ { t + 1 } ) =$ $\begin{array} { r } { \operatorname* { m i n } _ { \omega \in \Omega } | | { \pmb x } ^ { t + 1 } - \omega | | ^ { \bar { 2 } } \leq | | { \pmb x } ^ { t + 1 } - \omega ^ { t } | | ^ { 2 } < | | { \pmb x } ^ { t } - \omega ^ { t } | | ^ { 2 } = f _ { \Omega } ( { \pmb x } ^ { t } ) } \end{array}$ .
|
| 372 |
+
|
| 373 |
+
Otherwise the current step contains one or more minor cycles. In this case, we show that the first minor cycle strictly reduces the approximation error, and the (possibly) following minor cycles cannot increase it. For the first minor cycle, the affine minimizer $\bar { \boldsymbol { y } } ^ { 0 }$ of $\mathsf { a f f } ( S \cup \{ s ^ { t } \} )$ with respect to $\omega ^ { t }$ is outside c $\operatorname { m v } ( S \cup \{ s ^ { t } \} )$ . Let $\dot { z } = \theta { \bf y } ^ { 0 } + ( 1 - \theta ) { \bf x } ^ { t }$ be the intersection of $\mathsf { c o n v } ( \boldsymbol { S } \cup \{ \bar { \boldsymbol { s } } ^ { t } \} )$ and segment joining $_ { \textbf { \em x } }$ and $\textbf { { y } }$ . Let $\mathcal { V } ^ { 0 } : = \mathcal { S } ^ { t }$ and $\mathcal { V } ^ { i }$ denote the active set after the $i$ -th minor cycle. Then since $y ^ { \bar { 1 } }$ is the affine minimizer of $\mathcal { V } ^ { 1 }$ with respect to $\omega ^ { t }$ , we have
|
| 374 |
+
|
| 375 |
+
$$
|
| 376 |
+
| | z - \omega ^ { t } | | = | | \theta y ^ { 0 } + ( 1 - \theta ) x ^ { t } - \omega ^ { t } | | \leq \theta | | y ^ { 0 } - \omega ^ { t } | | + ( 1 - \theta ) | | x ^ { t } - \omega ^ { t } | | < | | x ^ { t } - \omega ^ { t } | | ,
|
| 377 |
+
$$
|
| 378 |
+
|
| 379 |
+
where the second step uses the triangle inequality and the last step follows since the segment $\boldsymbol { x } ^ { t } \boldsymbol { y } ^ { 0 }$ intersects the interior of $\mathsf { c o n v } ( S \cup \{ s ^ { \bar { t } } \} )$ , and the distance to $\omega ^ { t }$ strictly decreases along this segment. Therefore the point $_ { z }$ found by first minor cycle satisfies
|
| 380 |
+
|
| 381 |
+
$$
|
| 382 |
+
f _ { \Omega } ( z ) = \operatorname* { m i n } _ { \omega \in \Omega } | | z - \omega | | ^ { 2 } \leq | | z - \omega ^ { t } | | ^ { 2 } < | | x ^ { t } - \omega ^ { t } | | = f _ { \Omega } ( x ^ { t } ) .
|
| 383 |
+
$$
|
| 384 |
+
|
| 385 |
+
Hence $h ( \pmb { y } ^ { 1 } ) < h ( \pmb { x } ^ { t } )$ , and the first minor cycle strictly decreases the approximation error. By a similar argument, in subsequent minor cycles the approximation error cannot be increased. However, after the first minor cycle, the iterating point may already at the intersection point and the strict inequality in last step of Eq. 17 need to be replaced by non-strict inequality.
|
| 386 |
+
|
| 387 |
+
Therefore any major cycle either finds an improving point and continue, or enters minor cycles where the first minor cycle finds an improving point, and the subsequent minor cycles does not increase the distance. Adding both side of $f _ { \Omega } ( \hat { \mathbf { x } ^ { t + 1 } } ) < f _ { \Omega } ( \mathbf { x } ^ { t } )$ by $f _ { \Omega } \bar { ( } x ^ { * } )$ and we have the approximation error $h ( \mathbf { x } ^ { t + 1 } ) < h ( \bar { \mathbf { x } } ^ { t } )$ strictly decreases. □
|
| 388 |
+
|
| 389 |
+
# C PROOF OF THEOREM 4.2
|
| 390 |
+
|
| 391 |
+
We first prove the Theorem 4.2, using Lemma 4.3 and Lemma 4.4. Then we present the proof of the lemmas.
|
| 392 |
+
|
| 393 |
+
Theorem 4.2 (Convergence in Approximation Error). For $t \geq 1$ , the mixed policy $\mu ^ { t }$ found by the C2RL method satisfies
|
| 394 |
+
|
| 395 |
+
$$
|
| 396 |
+
\mathsf { e r r } ( \mu ^ { t } ) \leq 1 6 Q ^ { 2 } / ( t + 2 ) .
|
| 397 |
+
$$
|
| 398 |
+
|
| 399 |
+
where $Q : = \operatorname* { m a x } _ { \mu \in \Delta ( \mathcal { U } ) } | | c ( \mu ) | |$ is the maximum norm of a measurement vector.
|
| 400 |
+
|
| 401 |
+
Proof. Since Lemma 4.4 shows that drop steps are no more than half of total major cycle steps, and Theorem 4.1 guarantees these drop steps reducing the approximation error, we can safely skip these step, and re-index the step numbers to include non-drop steps only using $k$ .
|
| 402 |
+
|
| 403 |
+
For these non-drop steps, we claim that $\mathsf { e r r } ( \mu ^ { k } ) \leq 8 Q ^ { 2 } / ( k + 1 )$ . Using Lemma 4.3, we prove the convergence rate using induction. We first bound the error of any $\mathsf { e r r } ( \bar { \mu } ^ { \bar { k } } )$ . For any $k \geq 1$
|
| 404 |
+
|
| 405 |
+
$$
|
| 406 |
+
\begin{array} { r l } & { \mathsf { e r r } ( \mu ^ { k } ) = \mathtt { d i s t ^ { 2 } } ( c ( \mu ^ { k } ) , \Omega ) - \mathtt { d i s t ^ { 2 } } ( c ( \mu ^ { * } ) , \Omega ) } \\ & { \quad \quad = 1 / 2 | | c ( \mu ^ { k } ) - \mathtt { P r o j } _ { \Omega } ( c ( \mu ^ { k } ) ) | | ^ { 2 } - 1 / 2 | | c ( \mu ^ { * } ) - \mathtt { P r o j } _ { \Omega } ( c ( \mu ^ { * } ) ) | | ^ { 2 } } \\ & { \quad \le 1 / 2 ( | | c ( \mu ^ { k } ) | | ^ { 2 } + | | \mathsf { P r o j } _ { \Omega } ( c ( \mu ^ { k } ) ) | | ^ { 2 } - | | c ( \mu ^ { * } ) | | ^ { 2 } - | | \mathsf { P r o j } _ { \Omega } ( c ( \mu ^ { * } ) ) | | ^ { 2 } ) } \\ & { \quad \le | | c ( \mu ^ { k } ) | | ^ { 2 } - | | c ( \mu ^ { * } ) | | ^ { 2 } } \\ & { \quad \le | | c ( \mu ^ { k } ) | | ^ { 2 } } \\ & { \quad \le Q ^ { 2 } , } \end{array}
|
| 407 |
+
$$
|
| 408 |
+
|
| 409 |
+
where Eq. 21 uses the definition of our squared Euclidean distance function. Eq. 22 follows from triangle inequality, and Eq. 23 is by the contractive property of the Euclidean distance.
|
| 410 |
+
|
| 411 |
+
When $k = 1$ , the Eq. 25 established the based case. Now for $k \geq 1$ , assume that $\mathtt { e r r } ( \mu ^ { k } ) \le$ $8 Q ^ { 2 } / ( k + 1 )$ for $k \geq 1$ , then Lemma 4.3 gives $\mathsf { e r r } ( \mu ^ { k + 1 } ) \le \mathsf { e r r } ( \mu ^ { k } ) - \mathsf { e r r } ^ { 2 } ( \mu ^ { k } ) / 8 Q ^ { 2 }$ . Since the quadratic function of the right hand side is monotonically increasing on $\left( - \infty , 4 Q ^ { 2 } \right]$ , using the inductive hypothesis
|
| 412 |
+
|
| 413 |
+
$$
|
| 414 |
+
\mathbf { e r r } ( \mu ^ { k + 1 } ) \le \mathbf { e r r } ( \mu ^ { k } ) - \mathbf { e r r } ^ { 2 } ( \mu ^ { k } ) / 8 Q ^ { 2 } \le 8 Q ^ { 2 } / ( k + 1 ) - 8 Q ^ { 2 } / ( k + 1 ) ^ { 2 } \le Q ^ { 2 } / ( k + 2 )
|
| 415 |
+
$$
|
| 416 |
+
|
| 417 |
+
Since for $t$ steps of major cycle steps, the number of non-drop steps $k > t / 2$ , we conclude that $\mathsf { e r r } ( \mu ^ { t } ) \leq 1 6 \bar { Q } ^ { 2 } / ( t + \bar { 2 } )$ .
|
| 418 |
+
|
| 419 |
+
Then we prove the lemmas.
|
| 420 |
+
|
| 421 |
+
Lemma 4.3. For a non-drop step, we have $\mathbf { e r r } ( \mu ^ { t } ) - \mathbf { e r r } ( \mu ^ { t + 1 } ) \geq \mathbf { e r r } ^ { 2 } ( \mu ^ { t } ) / 8 Q ^ { 2 } .$
|
| 422 |
+
|
| 423 |
+
Proof. The non-drop step contains either no minor cycle or one minor cycle. We first consider the no minor cycle case.
|
| 424 |
+
|
| 425 |
+
If a major cycle contains no minor cycle, then $\pmb { x } ^ { t + 1 }$ is the affine minimizer of the $S \cup \{ s ^ { t } \}$
|
| 426 |
+
|
| 427 |
+
$$
|
| 428 |
+
\begin{array} { r l } { \mathrm { e r r } ( \mu ^ { t } ) - \mathrm { e r r } ( \mu ^ { t + 1 } ) = \mathrm { d i s t } ^ { 2 } ( x ^ { t } , \Omega ) - \mathrm { d i s t } ^ { 2 } ( x ^ { t + 1 } , \Omega ) } \\ & { = 1 / 2 ( \| x ^ { t } - \omega ^ { t } \| ^ { 2 } - \underset { \omega \in \Omega } { \operatorname* { m i n } } \| x ^ { t + 1 } - \omega \| ^ { 2 } ) } \\ & { \geq 1 / 2 ( \| x ^ { t } - \omega ^ { t } \| ^ { 2 } - \| x ^ { t + 1 } - \omega ^ { t } \| ^ { 2 } ) } \\ & { = 1 / 2 ( \| x ^ { t } - \omega ^ { t } \| ^ { 2 } + \| x ^ { t + 1 } - \omega ^ { t } \| ^ { 2 } - 2 \| x ^ { t + 1 } - \omega ^ { t } \| ^ { 2 } ) } \\ & { = 1 / 2 ( \| x ^ { t } - \omega ^ { t } \| ^ { 2 } + \| x ^ { t + 1 } - \omega ^ { t } \| ^ { 2 } - 2 ( x ^ { t } - \omega ^ { t } ) ^ { T } ( x ^ { t + 1 } - \omega ^ { t } ) ) } \\ & { = 1 / 2 ( \| x ^ { t } - x ^ { t + 1 } \| ^ { 2 } ) , } \end{array}
|
| 429 |
+
$$
|
| 430 |
+
|
| 431 |
+
where the equation (31) follows from the affine minimizer property Eq. (11). For $\lVert \mathbf { x } ^ { t } - \mathbf { x } ^ { t + 1 } \rVert$ in the last equation, and $\forall \mathbf { \pmb { q } } \in \mathsf { a f f } ( S \cup \{ \pmb { \mathscr { s } } ^ { t } \} ) ,$ , we have
|
| 432 |
+
|
| 433 |
+
$$
|
| 434 |
+
\begin{array} { r l r } { \| \pmb { x } ^ { t } - \pmb { x } ^ { t + 1 } \| \geq \| \pmb { x } ^ { t } - \pmb { x } ^ { t + 1 } \| \frac { \| \pmb { x } ^ { t } \| + \| \pmb { q } \| } { 2 Q } } & { \qquad \mathrm { ( D e f i n i t i o n ~ o f ~ } Q \mathrm { ) } } & \\ { \geq \| \pmb { x } ^ { t } - \pmb { x } ^ { t + 1 } \| \frac { \| \pmb { x } ^ { t } - \pmb { q } \| } { 2 Q } } & { \qquad \mathrm { ( ~ T r i a n g l e ~ i n e q u a l i t y ) } } & \\ { \geq \displaystyle \frac { 1 } { 2 Q } ( \pmb { x } ^ { t } - \pmb { x } ^ { t + 1 } ) ( \pmb { x } ^ { t } - \pmb { q } ) } & { \qquad \mathrm { ( ~ C a u c h y - S c h w a r z ~ i n e q u a l i t y ) } } & \\ { = \displaystyle \frac { 1 } { 2 Q } ( \pmb { x } ^ { t } - \omega ^ { t } ) ( \pmb { x } ^ { t } - \pmb { q } ) } & { \qquad \mathrm { ( ~ A f f i n e ~ m i n i m i z e r ~ p r o p e r t y ) . } } & \end{array}
|
| 435 |
+
$$
|
| 436 |
+
|
| 437 |
+
Then it suffices to show that $( { \pmb x } ^ { t } - { \pmb \omega } ^ { t } ) ( { \pmb x } ^ { t } - { \pmb q } ) \geq \mathrm { e r r } ( \mu ^ { t } )$ .
|
| 438 |
+
|
| 439 |
+
Since $\Omega$ is a convex set, the squared Euclidean distance function dist ${ \mathbf \xi } ^ { 2 } ( { \pmb x } , { \pmb \Omega } )$ is convex for $_ { \textbf { \em x } }$ , which implies
|
| 440 |
+
|
| 441 |
+
$$
|
| 442 |
+
\mathrm { d i s t } ^ { 2 } ( { \pmb x } ^ { t } , \Omega ) + ( { \pmb q } - { \pmb x } ^ { t } ) \nabla \mathrm { d i s t } ^ { 2 } ( { \pmb x } ^ { t } , \Omega ) \leq \mathrm { d i s t } ^ { 2 } ( { \pmb q } , \Omega ) .
|
| 443 |
+
$$
|
| 444 |
+
|
| 445 |
+
Putting in $\nabla \mathrm { d i s t } ^ { 2 } ( \boldsymbol { x } ^ { t } , \Omega ) = \left( \boldsymbol { x } ^ { t } - \mathrm { P r o j } _ { \Omega } ( \boldsymbol { x } ^ { t } ) \right) = \left( \boldsymbol { x } ^ { t } - \omega ^ { t } \right)$ , we get $( { \pmb x } ^ { t } - { \pmb \omega } ^ { t } ) ( { \pmb x } ^ { t } - { \pmb q } ) \geq \mathtt { e r r } ( { \pmb \mu } ^ { t } )$ , which together with Eq. 32 and Eq. 36 concludes that for non-drop step with no minor cycles, we have $\mathsf { e r r } ( \mu ^ { t } ) - \mathsf { e r r } ( \mu ^ { \bar { t } + 1 } ) \geq \mathsf { e r r } ^ { \bar { 2 } } ( \mu ^ { t } ) / 8 Q ^ { 2 }$ .
|
| 446 |
+
|
| 447 |
+
For non-drop step with one minor cycle, we use the Theorem 6 of (Chakrabarty et al., 2014). By a linear translation of adding all points with $- \omega ^ { t }$ , it gives
|
| 448 |
+
|
| 449 |
+
$$
|
| 450 |
+
| | \pmb { x } ^ { t } - \omega ^ { t } | | ^ { 2 } - | | \pmb { x } ^ { t + 1 } - \omega ^ { t } | | ^ { 2 } \geq ( ( \pmb { x } ^ { t } - \omega ^ { t } ) ( \pmb { x } ^ { t } - \pmb { q } ) ) ^ { 2 } / 8 Q ^ { 2 } .
|
| 451 |
+
$$
|
| 452 |
+
|
| 453 |
+
Then applying the same argument as Eq. 37, and we finished our proof.
|
| 454 |
+
|
| 455 |
+
Lemma 4.4. After t major cycle steps of C2RL method, the number of drop steps is less than $t / 2$
|
| 456 |
+
|
| 457 |
+
Proof. Recall that at the termination of a minor cycle, the size of the active set $| S _ { c } | \in [ 1 , m ]$ . Since in each major cycle steps, the size of active set $S _ { t }$ increases by one, and each drop step reduces the size of $S _ { t }$ by at least one, the number of drop steps is always less than half of total number of the major cycle steps. □
|
| 458 |
+
|
| 459 |
+
# D PROOF OF THEOREM 4.5
|
| 460 |
+
|
| 461 |
+
Theorem 4.5 (Memory Complexity Bound). For an constrained RL problem with $m$ -dimensional measurement vector, in the worst case, a mixed policy needs to randomize among $m + 1$ individual policies to ensure convergence of RL oracles that search for deterministic policies.
|
| 462 |
+
|
| 463 |
+
Proof. We give a constructive proof. Consider a $m$ -dimensional vector-valued MDP with a single state, $m + 1$ actions, and $\pmb { c } ( a _ { i } ) : = \pmb { e } _ { i }$ is the unit vector of $i$ -th dimension for $i \in [ 1 , m ]$ , and $\pmb { c } ( a _ { m + 1 } ) : = \mathbf { 0 }$ , and the episode terminates after 1 steps. The constrained RL problem is to find a policy whose measurement vector lies in the convex set of a single point $\{ \mathbf { 1 } / 2 m \}$ . By linear programming, it is clear that the only feasible mixed deterministic policy is to select $a _ { m + 1 }$ with $1 / 2$ probability, and the rest $m$ actions with $1 / 2 m$ probability; i.e. the unique feasible policy to this problem has an active set containing $m + 1$ deterministic policies. Therefore any method randomize among less than $m + 1$ individual policies does not ensure convergence when used with RL algorithms searching for deterministic policies. □
|
| 464 |
+
|
| 465 |
+
# E ADDITIONAL EXPERIMENT DETAILS
|
| 466 |
+
|
| 467 |
+
All the methods use the same A2C agent. The input is the one-hot encoded current position index. The A2C is the standard fully connected multi-layer perceptron with ReLU activation function. The actor and critic share the internal representation and have their only final layer. Both actor and critic networks use Adam optimizer with learning rate set to $1 e ^ { - 2 }$ . The network is as follows
|
| 468 |
+
|
| 469 |
+
<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Actor</td><td rowspan=1 colspan=1>Critic</td></tr><tr><td rowspan=1 colspan=1>Input layer</td><td rowspan=1 colspan=2>One-hot encoded state index (dim=54)</td></tr><tr><td rowspan=1 colspan=1>Hidden layer</td><td rowspan=1 colspan=2>Linear(in=54, out=128,act="relu")</td></tr><tr><td rowspan=1 colspan=1>Output layer</td><td rowspan=1 colspan=1>Linear(in=128,out=4,act="relu")</td><td rowspan=1 colspan=1>Linear(in=128,out=1,act="relu")</td></tr><tr><td rowspan=1 colspan=1>Output name</td><td rowspan=1 colspan=1>Action score</td><td rowspan=1 colspan=1>State value</td></tr></table>
|
| 470 |
+
|
| 471 |
+
For ApproPO, the constant $\kappa$ for projection convex set to convex cone is set to be 20. The $\pmb \theta$ is initialized to 0. Following the original paper.
|
| 472 |
+
|
| 473 |
+
For RCPO, the learning rate of its $\boldsymbol { \lambda }$ is set to $2 . 5 e ^ { - 5 }$ , and its $\lambda$ is initialized to 0 and updated by online gradient descent with learning rate set to 1, as used by the original paper.
|
| 474 |
+
|
| 475 |
+
The proposed C2RL introduces no extra hyper-parameters, and has nothing to report.
|
md/train/gvxJzw8kW4b/gvxJzw8kW4b.md
ADDED
|
@@ -0,0 +1,379 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Co-Mixup: Saliency Guided Joint Mixup with Supermodular Diversity
|
| 2 |
+
|
| 3 |
+
Jang-Hyun Kim, Wonho Choo, Hosan Jeong, Hyun Oh Song
|
| 4 |
+
|
| 5 |
+
Department of Computer Science and Engineering, Seoul National University Neural Processing Research Center {janghyun,wonho.choo,grazinglion,hyunoh}@mllab.snu.ac.kr
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
While deep neural networks show great performance on fitting to the training distribution, improving the networks’ generalization performance to the test distribution and robustness to the sensitivity to input perturbations still remain as a challenge. Although a number of mixup based augmentation strategies have been proposed to partially address them, it remains unclear as to how to best utilize the supervisory signal within each input data for mixup from the optimization perspective. We propose a new perspective on batch mixup and formulate the optimal construction of a batch of mixup data maximizing the data saliency measure of each individual mixup data and encouraging the supermodular diversity among the constructed mixup data. This leads to a novel discrete optimization problem minimizing the difference between submodular functions. We also propose an efficient modular approximation based iterative submodular minimization algorithm for efficient mixup computation per each minibatch suitable for minibatch based neural network training. Our experiments show the proposed method achieves the state of the art generalization, calibration, and weakly supervised localization results compared to other mixup methods. The source code is available at https://github.com/snu-mllab/Co-Mixup.
|
| 10 |
+
|
| 11 |
+
# 1 Introduction
|
| 12 |
+
|
| 13 |
+
Deep neural networks have been applied to a wide range of artificial intelligence tasks such as computer vision, natural language processing, and signal processing with remarkable performance (Ren et al., 2015; Devlin et al., 2018; Oord et al., 2016). However, it has been shown that neural networks have excessive representation capability and can even fit random data (Zhang et al., 2016). Due to these characteristics, the neural networks can easily overfit to training data and show a large generalization gap when tested on previously unseen data.
|
| 14 |
+
|
| 15 |
+
To improve the generalization performance of the neural networks, a body of research has been proposed to develop regularizers based on priors or to augment the training data with task-dependent transforms (Bishop, 2006; Cubuk et al., 2019). Recently, a new taskindependent data augmentation technique, called mixup, has been proposed (Zhang et al., 2018). The original mixup, called Input Mixup, linearly interpolates a given pair of input data and can be easily applied to various data and tasks, improving the generalization performance and robustness of neural networks. Other mixup methods, such as manifold mixup (Verma et al., 2019) or CutMix (Yun et al., 2019), have also been proposed addressing different ways to mix a given pair of input data. Puzzle Mix (Kim et al., 2020) utilizes saliency information and local statistics to ensure mixup data to have rich supervisory signals.
|
| 16 |
+
|
| 17 |
+
However, these approaches only consider mixing a given random pair of input data and do not fully utilize the rich informative supervisory signal in training data including collection of object saliency, relative arrangement, etc. In this work, we simultaneously consider mixmatching different salient regions among all input data so that each generated mixup example accumulates as many salient regions from multiple input data as possible while ensuring diversity among the generated mixup examples. To this end, we propose a novel optimization problem that maximizes the saliency measure of each individual mixup example while encouraging diversity among them collectively. This formulation results in a novel discrete submodular-supermodular objective. We also propose a practical modular approximation method for the supermodular term and present an efficient iterative submodular minimization algorithm suitable for minibatch-based mixup for neural network training. As illustrated in the Figure 1, while the proposed method, Co-Mixup, mix-matches the collection of salient regions utilizing inter-arrangements among input data, the existing methods do not consider the saliency information (Input Mixup & CutMix) or disassemble salient parts (Puzzle Mix).
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Figure 1: Example comparison of existing mixup methods and the proposed Co-Mixup. We provide more samples in Appendix H.
|
| 21 |
+
|
| 22 |
+
We verify the performance of the proposed method by training classifiers on CIFAR-100, Tiny-ImageNet, ImageNet, and the Google commands dataset (Krizhevsky et al., 2009; Chrabaszcz et al., 2017; Deng et al., 2009; Warden, 2017). Our experiments show the models trained with Co-Mixup achieve the state of the performance compared to other mixup baselines. In addition to the generalization experiment, we conduct weakly-supervised object localization and robustness tasks and confirm Co-Mixup outperforms other mixup baselines.
|
| 23 |
+
|
| 24 |
+
# 2 Related works
|
| 25 |
+
|
| 26 |
+
Mixup Data augmentation has been widely used to prevent deep neural networks from over-fitting to the training data (Bishop, 1995). The majority of conventional augmentation methods generate new data by applying transformations depending on the data type or the target task (Cubuk et al., 2019). Zhang et al. (2018) proposed mixup, which can be independently applied to various data types and tasks, and improves generalization and robustness of deep neural networks. Input mixup (Zhang et al., 2018) linearly interpolates between two input data and utilizes the mixed data with the corresponding soft label for training. Following this work, manifold mixup (Verma et al., 2019) applies the mixup in the hidden feature space, and CutMix (Yun et al., 2019) suggests a spatial copy and paste based mixup strategy on images. Guo et al. (2019) trains an additional neural network to optimize a mixing ratio. Puzzle Mix (Kim et al., 2020) proposes a mixup method based on saliency and local statistics of the given data. In this paper, we propose a discrete optimization-based mixup method simultaneously finding the best combination of collections of salient regions among all input data while encouraging diversity among the generated mixup examples.
|
| 27 |
+
|
| 28 |
+
Saliency The seminal work from Simonyan et al. (2013) generates a saliency map using a pre-trained neural network classifier without any additional training of the network. Following the work, measuring the saliency of data using neural networks has been studied to obtain a more precise saliency map (Zhao et al., 2015; Wang et al., 2015) or to reduce the saliency computation cost (Zhou et al., 2016; Selvaraju et al., 2017). The saliency information is widely applied to the tasks in various domains, such as object segmentation or speech recognition (Jung and Kim, 2011; Kalinli and Narayanan, 2007).
|
| 29 |
+
|
| 30 |
+
Submodular-Supermodular optimization A submodular (supermodular) function is a set function with diminishing (increasing) returns property (Narasimhan and Bilmes, 2005). It is known that any set function can be expressed as the sum of a submodular and supermodular function (Lovász, 1983), called BP function. Various problems in machine learning can be naturally formulated as BP functions (Fujishige, 2005), but it is known to be NP-hard (Lovász, 1983). Therefore, approximate algorithms based on modular approximations of submodular or supermodular terms have been developed (Iyer and Bilmes, 2012). Our formulation falls into a category of BP function consisting of smoothness function within a mixed output (submodular) and a diversity function among the mixup outputs (supermodular).
|
| 31 |
+
|
| 32 |
+
# 3 Preliminary
|
| 33 |
+
|
| 34 |
+
Existing mixup methods return $\{ h ( x _ { 1 } , x _ { i ( 1 ) } ) , \dots , h ( x _ { m } , x _ { i ( m ) } ) \}$ for given input data $\{ x _ { 1 } , \ldots , x _ { m } \}$ , where $h : \mathcal { X } \times \mathcal { X } \to \mathcal { X }$ is a mixup function and $( i ( 1 ) , \ldots , i ( m ) )$ is a random permutation of the data indices. In the case of input mixup, $h ( x , x ^ { \prime } )$ is $\lambda x + ( 1 - \lambda ) x ^ { \prime }$ , where $\lambda \in \left[ 0 , 1 \right]$ is a random mixing ratio. Manifold mixup applies input mixup in the hidden feature space, and CutMix uses $h ( x , x ^ { \prime } ) = \mathbb { 1 } _ { B } \odot x + ( 1 - \mathbb { 1 } _ { B } ) \odot x ^ { \prime }$ , where $\underline { { 1 } } _ { B }$ is a binary rectangular-shape mask for an image $x$ and $\odot$ represents the element-wise product. Puzzle Mix defines $h ( x , x ^ { \prime } )$ as $z \odot \Pi ^ { \boldsymbol { \mathsf { T } } } x + ( 1 - z ) \odot \Pi ^ { \prime \intercal } x ^ { \prime }$ , where $\mathrm { I I }$ is a transport plan and $z$ is a discrete mask. In detail, for $x \in \mathbb { R } ^ { n }$ , $\Pi \in \{ 0 , 1 \} ^ { n }$ and $z \in \mathcal { L } ^ { n }$ for $\begin{array} { r } { \mathcal { L } = \{ \frac { l } { L } \ | \ l = 0 , 1 , \dots , L \} } \end{array}$ .
|
| 35 |
+
|
| 36 |
+
In this work, we extend the existing mixup functions as $h : \mathcal { X } ^ { m } \mathcal { X } ^ { m ^ { \prime } }$ which performs mixup on a collection of input data and returns another collection. Let $\boldsymbol { x } _ { B } \in \mathbb { R } ^ { m \times n }$ denote the batch of input data in matrix form. Then, our proposed mixup function is
|
| 37 |
+
|
| 38 |
+
$$
|
| 39 |
+
h ( x _ { B } ) = \big ( g ( z _ { 1 } \odot x _ { B } ) , \dots , g ( z _ { m ^ { \prime } } \odot x _ { B } ) \big )
|
| 40 |
+
$$
|
| 41 |
+
|
| 42 |
+
where $z _ { j } \in \mathcal { L } ^ { m \times n }$ for $j = 1 , \ldots , m ^ { \prime }$ with $\mathcal { L } = \{ \frac { l } { L } \ | \ l = 0 , 1 , \ldots , L \}$ and $g : \mathbb { R } ^ { m \times n } \mathbb { R } ^ { n }$ returns a column-wise sum of a given matrix. Note that, the $k ^ { \mathrm { t h } }$ column of $z _ { j }$ , denoted as $z _ { j , k } \in \mathcal { L } ^ { m }$ , can be interpreted as the mixing ratio among $m$ inputs at the $k ^ { \mathrm { t h } }$ location. Also, we enforce $\| z _ { j , k } \| _ { 1 } = 1$ to maintain the overall statistics of the given input batch. Given the one-hot target labels $y _ { B } \in \{ 0 , 1 \} ^ { m \times C }$ of the input data with $C$ classes, we generate soft target labels for mixup data as $y _ { B } ^ { \intercal } \tilde { o } _ { j }$ for $j = 1 , \ldots , m ^ { \prime }$ , where $\begin{array} { r } { \tilde { o } _ { j } = \frac { 1 } { n } \sum _ { k = 1 } ^ { n } z _ { j , k } \in [ 0 , 1 ] ^ { m } } \end{array}$ represents the input source ratio of the $j ^ { \mathrm { t h } }$ mixup data. We train models to estimate the soft target labels by minimizing the cross-entropy loss.
|
| 43 |
+
|
| 44 |
+
# 4 Method
|
| 45 |
+
|
| 46 |
+
# 4.1 Objective
|
| 47 |
+
|
| 48 |
+
Saliency Our main objective is to maximize the saliency measure of mixup data while maintaining the local smoothness of data, i.e., spatially nearby patches in a natural image look similar, temporally adjacent signals have similar spectrum in speech, etc. (Kim et al., 2020). As we can see from CutMix in Figure 1, disregarding saliency can give a misleading supervisory signal by generating mixup data that does not match with the target soft label. While the existing mixup methods only consider the mixup between two inputs, we generalize the number of inputs $m$ to any positive integer. Note, each $k ^ { \mathrm { t h } }$ location of outputs has $m$ candidate sources from the inputs. We model the unary labeling cost as the negative value of the saliency, and denote the cost vector at the $k ^ { \mathrm { t h } }$ location as $c _ { k } \in \mathbb { R } ^ { m }$ . For the saliency measure, we calculate the gradient values of training loss with respect to the input and measure $\ell _ { 2 }$ norm of the gradient values across input channels (Simonyan et al., 2013; Kim et al., 2020). Note that this method does not require any additional architecture dependent modules for saliency calculation. In addition to the unary cost, we encourage adjacent locations to have similar labels for the smoothness of each mixup data. In summary, the objective can be formulated as follows:
|
| 49 |
+
|
| 50 |
+
$$
|
| 51 |
+
\sum _ { j = 1 } ^ { m ^ { \prime } } \sum _ { k = 1 } ^ { n } c _ { k } ^ { \top } z _ { j , k } + \beta \sum _ { j = 1 } ^ { m ^ { \prime } } \sum _ { ( k , k ^ { \prime } ) \in \cal N } ( 1 - z _ { j , k } ^ { \top } z _ { j , k ^ { \prime } } ) - \eta \sum _ { j = 1 } ^ { m ^ { \prime } } \sum _ { k = 1 } ^ { n } \log p ( z _ { j , k } ) ,
|
| 52 |
+
$$
|
| 53 |
+
|
| 54 |
+

|
| 55 |
+
Figure 2: (a) Analysis of our BP optimization problem. The x-axis is a one-dimensional arrangement of solutions: The mixed output is more salient but not diverse towards the right and less salient but diverse on the left. The unary term (red) decreases towards the right side of the axis, while the supermodular term (green) increases. By optimizing the sum of the two terms (brown), we obtain the balanced output $z ^ { * }$ . (b) A histogram of the number of inputs mixed for each output given a batch of 100 examples from the ImageNet dataset. As $\tau$ increases, more inputs are used to create each output on average. (c) Mean batch saliency measurement of a batch of mixup data using the ImageNet dataset. We normalize the saliency measure of each input to sum up to 1. (d) Diversity measurement of a batch of mixup data. We calculate the diversity as 1 − Pj Pj06=j , where $\tilde { o } _ { j } = o _ { j } / \lVert o _ { j } \rVert _ { 1 }$ . We can control the diversity among Co-Mixup data (red) and find the optimum by controlling $\tau$ .
|
| 56 |
+
|
| 57 |
+
where the prior $p$ is given by $\begin{array} { r } { z _ { j , k } \quad \sim \quad \frac { 1 } { L } M u l t i ( L , \lambda ) } \end{array}$ with $\begin{array} { c c c } { { \lambda } } & { { = } } & { { ( \lambda _ { 1 } , \ldots , \lambda _ { m } ) \quad \sim } } \end{array}$ $D i r i c h l e t ( \alpha , \ldots , \alpha )$ , which is a generalization of the mixing ratio distribution of Zhang et al. (2018), and $\mathcal { N }$ denotes a set of adjacent locations (i.e., neighboring image patches in vision, subsequent spectrums in speech, etc.).
|
| 58 |
+
|
| 59 |
+
Diversity Note that the naive generalization above leads to the identical outputs because the objective is separable and identical for each output. In order to obtain diverse mixup outputs, we model information of the $j ^ { \mathrm { t h } }$ milarity penalty between outputs. First, weoutput by aggregating assigned labels as $\scriptstyle \sum _ { k = 1 } ^ { n } z _ { j , k }$ the input source. For simplicity, let us denote $\scriptstyle \sum _ { k = 1 } ^ { n } z _ { j , k }$ as $o _ { j }$ . Then, we measure the similarity between $o _ { j }$ ’s by using the inner-product on $\mathbb { R } ^ { m }$ . In addition to the input source similarity between outputs, we model the compatibility between input sources, represented as a symmetric matrix $A _ { c } \in \mathbb { R } _ { + } ^ { m \times m }$ Specifically, $A _ { c } [ i _ { 1 } , i _ { 2 } ]$ quantifies the degree to which input $i _ { 1 }$ and $i _ { 2 }$ are suitable to be mixed together. In summary, we use inner-product on $A = ( 1 - \omega ) I + \omega A _ { c }$ for $\omega \in [ 0 , 1 ]$ , resulting in a supermodular penalty term. Note that, by minimizing $\langle o _ { j } , o _ { j ^ { \prime } } \rangle _ { A } = o _ { j } ^ { \intercal } A o _ { j ^ { \prime } }$ $\forall j \ne j ^ { \prime }$ , we penalize output mixup examples with similar input sources and encourage each individual mixup examples to have high compatibility within. In this work, we measure the distance between locations of salient objects in each input and use the distance matrix $\begin{array} { r } { A _ { c } [ i , j ] = \| \mathrm { a r g m a x } _ { k } s _ { i } [ k ] - \mathrm { a r g m a x } _ { k } s _ { j } [ k ] \| _ { 1 } } \end{array}$ , where $s _ { i }$ is the saliency map of the $i ^ { \mathrm { t h } }$ input and $k$ is a location index (e.g., $k$ is a 2-D index for image data). From now on, we denote this inner-product term as the compatibility term.
|
| 60 |
+
|
| 61 |
+
Over-penalization The conventional mixup methods perform mixup as many as the number of examples in a given mini-batch. In our setting, this is the case when $m = m ^ { \prime }$ . However, the compatibility penalty between outputs is influenced by the pigeonhole principle. For example, suppose the first output consists of two inputs. Then, the inputs must be used again for the remaining $m ^ { \prime } - 1$ outputs, or only $m - 2$ inputs can be used. In the latter case, the number of available inputs $( m - 2 )$ is less than the outputs $( m ^ { \prime } - 1 )$ , and thus, the same input must be used more than twice. Empirically, we found that the remaining compatibility term above over-penalizes the optimization so that a substantial portion of outputs are returned as singletons without any mixup. To mitigate the over-penalization issue, we apply clipping to the compatibility penalty term. Specifically, we model the objective so that no extra penalty would occur when the compatibility among outputs is below a certain level.
|
| 62 |
+
|
| 63 |
+
Now we present our main objective as following:
|
| 64 |
+
|
| 65 |
+
$$
|
| 66 |
+
z ^ { * } = \underset { z _ { j , k } \in \mathcal { L } ^ { m } , \ \| z _ { j , k } \| _ { 1 } = 1 } { \mathrm { a r g m i n } } f ( z ) ,
|
| 67 |
+
$$
|
| 68 |
+
|
| 69 |
+
where
|
| 70 |
+
|
| 71 |
+
$$
|
| 72 |
+
\begin{array} { r l } & { f ( \boldsymbol { z } ) : = \displaystyle \sum _ { j = 1 } ^ { m ^ { \prime } } \displaystyle \sum _ { k = 1 } ^ { n } c _ { k } ^ { \top } z _ { j , k } + \beta \displaystyle \sum _ { j = 1 } ^ { m ^ { \prime } } \sum _ { ( k , k ^ { \prime } ) \in \mathcal { N } } ( 1 - z _ { j , k } ^ { \top } z _ { j , k ^ { \prime } } ) } \\ & { \qquad + \gamma \displaystyle \operatorname* { m a x } \left\{ \tau , \ \sum _ { j = 1 } ^ { m ^ { \prime } } \sum _ { j ^ { \prime } \neq j } ^ { m ^ { \prime } } \left( \displaystyle \sum _ { k = 1 } ^ { n } z _ { j , k } \right) ^ { \top } A \left( \displaystyle \sum _ { k = 1 } ^ { n } z _ { j ^ { \prime } , k } \right) \right\} - \eta \displaystyle \sum _ { j = 1 } ^ { m ^ { \prime } } \sum _ { k = 1 } ^ { n } \log p ( z _ { j , k } ) . } \end{array}
|
| 73 |
+
$$
|
| 74 |
+
|
| 75 |
+
In Figure 2, we describe the properties of the BP optimization problem of Equation (1) and statistics of the resulting mixup data. Next, we verify the supermodularity of the compatibility term. We first extend the definition of the submodularity of a multi-label function as follows (Windheuser et al., 2012).
|
| 76 |
+
|
| 77 |
+
Definition 1. For a given label set $\mathcal { L }$ , a function $s : \mathcal { L } ^ { m } \times \mathcal { L } ^ { m } \to \mathbb { R }$ is pairwise submodular, if $\forall x , x ^ { \prime } \in { \mathcal { L } } ^ { m }$ , $s ( x , x ) + s ( x ^ { \prime } , x ^ { \prime } ) \leq s ( x , x ^ { \prime } ) + s ( x ^ { \prime } , x )$ . A function s is pairwise supermodular, if $- s$ is pairwise submodular.
|
| 78 |
+
|
| 79 |
+
Proposition 1. The compatibility term $f _ { c }$ in Equation (1) is pairwise supermodular for every pair of $\left( z _ { j _ { 1 } , k } , z _ { j _ { 2 } , k } \right)$ if $A$ is positive semi-definite.
|
| 80 |
+
|
| 81 |
+
Proof. See Appendix B.1.
|
| 82 |
+
|
| 83 |
+
Finally note that, $A = ( 1 - \omega ) I + \omega A _ { c }$ , where $A _ { c }$ is a symmetric matrix. By using spectral decomposition, $A _ { c }$ can be represented as $U D U ^ { \textsf { T } }$ , where $D$ is a diagonal matrix and $U ^ { \mathsf { T } } U = U U ^ { \mathsf { T } } = I$ . Then, $A = U ( ( 1 - \omega ) I + \omega D ) U ^ { \intercal }$ , and thus for small $\omega > 0$ , we can guarantee $A$ to be positive semi-definite.
|
| 84 |
+
|
| 85 |
+
# 4.2 Algorithm
|
| 86 |
+
|
| 87 |
+
Our main objective consists of modular (unary, prior ), submodular (smoothness), and supermodular (compatibility) terms. To optimize the main objective, we employ the submodularsupermodular procedure by iteratively approximating the supermodular term as a modular function (Narasimhan and Bilmes, 2005). Note that represents the labeling of the $j ^ { \mathrm { t h } }$ output and $o _ { j }$ represents the aggregated input source information of the $j ^ { \mathrm { t h } }$ output, $\scriptstyle \sum _ { k = 1 } ^ { n } z _ { j , k }$ Before introducing our algorithm, we first inspect the simpler case without clipping.
|
| 88 |
+
|
| 89 |
+
Proposition 2. The compatibility term $f _ { c }$ without clipping is modular with respect to $z _ { j }$ roof. Note, , we can r $A$ is a resent itive symmetric matrix by thewithout clipping in terms of efinias $j _ { 0 }$ $f _ { c }$ $o _ { j _ { 0 } }$ $\begin{array} { r l } { \sum _ { j = 1 } ^ { m ^ { \prime } } \sum _ { j ^ { \prime } = 1 , j ^ { \prime } \neq j } ^ { m ^ { \prime } } o _ { j } ^ { \intercal } A o _ { j ^ { \prime } } = } & { { } } \end{array}$ $\begin{array} { r } { \cdot \sum _ { j = 1 , j \neq j _ { 0 } } ^ { m ^ { \prime } } \sigma _ { j } ^ { \intercal } A o _ { j _ { 0 } } + \sum _ { j = 1 , j \neq j _ { 0 } } ^ { m ^ { \prime } } \sum _ { j ^ { \prime } = 1 , j ^ { \prime } \neq \{ j _ { 0 } , j \} } ^ { m ^ { \prime } } \sigma _ { j } ^ { \intercal } A o _ { j ^ { \prime } } = ( 2 \sum _ { j = 1 , j \neq j _ { 0 } } ^ { m ^ { \prime } } A o _ { j } ) ^ { \intercal } o _ { j _ { 0 } } + c = v _ { - j _ { 0 } } ^ { \intercal } o _ { j _ { 0 } } + } \end{array}$ $c$ , where $\boldsymbol { v } _ { - j _ { 0 } } \in \mathbb { R } ^ { m }$ and $c \in \mathbb { R }$ are values independent with $o _ { j _ { 0 } }$ . Finally, $v _ { - j _ { 0 } } ^ { \mathsf { T } } o _ { j _ { 0 } } + c =$ $\begin{array} { r } { \sum _ { k = 1 } ^ { n } v _ { - j _ { 0 } } ^ { \mathsf { T } } z _ { j _ { 0 } , k } + c } \end{array}$ is a modular function of $z _ { j _ { 0 } }$ . □
|
| 90 |
+
|
| 91 |
+
By Proposition 2, we can apply a submodular minimization algorithm to optimize the objective with respect to $z _ { j }$ when there is no clipping. Thus, we can optimize the main objective without clipping in coordinate descent fashion (Wright, 2015). For the case with clipping, we modularize the supermodular compatibility term under the following criteria:
|
| 92 |
+
|
| 93 |
+
1. The modularized function value should increase as the compatibility across outputs increases.
|
| 94 |
+
2. The modularized function should not apply an extra penalty for the compatibility below a certain level.
|
| 95 |
+
|
| 96 |
+

|
| 97 |
+
Figure 3: Visualization of the proposed mixup procedure. For a given batch of input data (left), a batch of mixup data (right) is generated, which mix-matches different salient regions among the input data while preserving the diversity among the mixup examples. The histograms on the right represent the input source information of each mixup data $\left( o _ { j } \right)$ .
|
| 98 |
+
|
| 99 |
+
Borrowing the notation from the proof in Proposition 2, for an index $j$ , $f _ { c } ( z ) = \operatorname* { m a x } \{ \tau , v _ { - j } ^ { \mathsf { T } } o _ { j } +$ the $c \} = \operatorname* { m a x } \{ \tau - c , v _ { - j } ^ { \mathsf { I } } o _ { j } \} + c$ $j ^ { \mathrm { t h } }$ output and $\begin{array} { r } { v _ { - j } = 2 \sum _ { j ^ { \prime } = 1 , j ^ { \prime } \neq j } ^ { m ^ { \prime } } A o _ { j ^ { \prime } } } \end{array}$ . Note, $\begin{array} { r } { o _ { j } = \sum _ { k = 1 } ^ { n } z _ { j , k } } \end{array}$ encodes the status of the ot represents the input source information of r outputs. Thus, $o _ { j }$ the corresponding $v _ { - j }$ value (criterion 1), but not for the compatibility below $\tau - c$ (criterion 2). As a modular function which satisfies the criteria above, we use the following function:
|
| 100 |
+
|
| 101 |
+
$$
|
| 102 |
+
f _ { c } ( z ) \approx \mathrm { m a x } \{ \tau ^ { \prime } , v _ { - j } \} ^ { \intercal } o _ { j } \quad \mathrm { f o r } \ \exists \tau ^ { \prime } \in \mathbb { R } .
|
| 103 |
+
$$
|
| 104 |
+
|
| 105 |
+
Note that, by satisfying the criteria above, the modular function reflects the diversity and over-penalization desiderata described in Section 4.1. We illustrate the proposed mixup procedure with the modularized diversity penalty in Figure 3.
|
| 106 |
+
|
| 107 |
+
Proposition 3. The modularization given by Equation (2) satisfies the criteria above.
|
| 108 |
+
|
| 109 |
+
Proof. See Appendix B.2.
|
| 110 |
+
|
| 111 |
+
By applying the modular approximation described in Equation (2) to $f _ { c }$ in Equation (1), we can iteratively apply a submodular minimization algorithm to obtain the final solution as described in Algorithm 1. In detail, each step can be performed as follows: 1) Conditioning the main objective $f$ on the current values except $z _ { j }$ , denoted as $f _ { j } ( z _ { j } ) ~ = ~ f ( z _ { j } ; z _ { 1 : j - 1 } , z _ { j + 1 : m ^ { \prime } } )$ . 2) Modularization of the compatibility term of $f _ { j }$ as Equation (2), resulting in a submodular function $\ddot { f } _ { j }$ . We denote the modularization operator as $\Phi$ , i.e., ${ \ddot { f } } _ { j } = \Phi ( f _ { j } )$ . 3) Applying a submodular minimization algorithm to $\tilde { f } _ { j }$ . Please refer to Appendix C for implementation details.
|
| 112 |
+
|
| 113 |
+
Initialize $z$ as $z ^ { ( 0 ) }$ .
|
| 114 |
+
Let $z ^ { ( t ) }$ denote a solution of the $t ^ { \mathrm { t h } }$ step.
|
| 115 |
+
$\Phi$ : modularization operator based on Equa
|
| 116 |
+
tion (2).
|
| 117 |
+
for $t = 1 , \dots , T$ do fo $j = 1 , \dots , m ^ { \prime }$ $f _ { j } ^ { ( t ) } ( z _ { j } ) : = f ( z _ { j } ; z _ { 1 : j - 1 } ^ { ( t ) } , z _ { j + 1 : m ^ { \prime } } ^ { ( t - 1 ) } ) .$ $\tilde { f } _ { j } ^ { ( t ) } = \Phi ( f _ { j } ^ { ( t ) } )$ . Solve z(t)j = $z _ { j } ^ { ( t ) } = \mathrm { a r g m i n } \tilde { f } _ { j } ^ { ( t ) } ( z _ { j } )$ . end for
|
| 118 |
+
end for
|
| 119 |
+
return $z ^ { ( T ) }$
|
| 120 |
+
|
| 121 |
+
Analysis Narasimhan and Bilmes (2005) proposed a modularization strategy for general supermodular set functions, and apply a submodular minimization algorithm that can monotonically decrease the original BP objective. However, the proposed Algorithm 1 based on Equation (2) is much more suitable for minibatch based mixup for neural network training than the set modularization proposed by Narasimhan and Bilmes (2005) in terms of complexity and modularization variance due to randomness. For simplicity, let us assume each $z _ { j , k }$ is an $m$ -dimensional one-hot vector. Then, our problem is to optimize $m ^ { \prime } n$ one-hot $m$ -dimensional vectors.
|
| 122 |
+
|
| 123 |
+
To apply the set modularization method, we need to assign each possible value of $z _ { j , k }$ as an element of $\{ 1 , 2 , \ldots , m \}$ . Then the supermodular term in Equation (1) can be interpreted as a set function with $m ^ { \prime } n m$ elements, and to apply the set modularization, $O ( m ^ { \prime } n m )$ sequential evaluations of the supermodular term are required. In contrast, Algorithm 1 calculates $v _ { - j }$ in Equation (2) in only $O ( m ^ { \prime } )$ time per each iteration. In addition, each modularization step of the set modularization method requires a random permutation of the $m ^ { \prime } n m$ elements. In this case, the optimization can be strongly affected by the randomness from the permutation step. As a result, the optimal labeling of each $z _ { j , k }$ from the compatibility term is strongly influenced by the random ordering undermining the interpretability of the algorithm. Please refer to Appendix D for empirical comparison between Algorithm 1 and the method by Narasimhan and Bilmes (2005).
|
| 124 |
+
|
| 125 |
+
# 5 Experiments
|
| 126 |
+
|
| 127 |
+
We evaluate our proposed mixup method on generalization, weakly supervised object localization, calibration, and robustness tasks. First, we compare the generalization performance of the proposed method against baselines by training classifiers on CIFAR-100 (Krizhevsky et al., 2009), Tiny-ImageNet (Chrabaszcz et al., 2017), ImageNet (Deng et al., 2009), and the Google commands speech dataset (Warden, 2017). Next, we test the localization performance of classifiers following the evaluation protocol of Qin and Kim (2019). We also measure calibration error (Guo et al., 2017) of classifiers to verify Co-Mixup successfully alleviates the over-confidence issue by Zhang et al. (2018). In Section 5.4, we evaluate the robustness of the classifiers on the test dataset with background corruption in response to the recent problem raised by Lee et al. (2020) that deep neural network agents often fail to generalize to unseen environments. Finally, we perform a sensitivity analysis of Co-Mixup and provide the results in Appendix F.3.
|
| 128 |
+
|
| 129 |
+
# 5.1 Classification
|
| 130 |
+
|
| 131 |
+
We first train PreActResNet18 (He et al., 2016), WRN16-8 (Zagoruyko and Komodakis, 2016), and ResNeXt29-4-24 (Xie et al., 2017) on CIFAR-100 for 300 epochs. We use stochastic gradient descent with an initial learning rate of 0.2 decayed by factor 0.1 at epochs 100 and 200. We set the momentum as 0.9 and add a weight decay of 0.0001. With this setup, we train a vanilla classifier and reproduce the mixup baselines (Zhang et al., 2018; Verma et al., 2019; Yun et al., 2019; Kim et al., 2020), which we denote as Vanilla, Input, Manifold, CutMix, Puzzle Mix in the experiment tables. Note that we use identical hyperparameters regarding Co-Mixup over all of the experiments with different models and datasets, which are provided in Appendix E.
|
| 132 |
+
|
| 133 |
+
Table 1 shows Co-Mixup significantly outperforms all other baselines in Top-1 error rate. Co-Mixup achieves $1 9 . 8 7 \%$ in Top-1 error rate with PreActResNet18, outperforming the best baseline by $0 . 7 5 \%$ . We further test Co-Mixup on different models (WRN16-8 & ResNeXt29- 4-24) and verify Co-Mixup improves Top-1 error rate over the best performing baseline.
|
| 134 |
+
|
| 135 |
+
<table><tr><td>Dataset (Model)</td><td>Vanilla</td><td>Input</td><td>Manifold</td><td>CutMix</td><td>Puzzle Mix</td><td>Co-Mixup</td></tr><tr><td>CIFAR-100 (PreActResNet18)</td><td>23.59</td><td>22.43</td><td>21.64</td><td>21.29</td><td>20.62</td><td>19.87</td></tr><tr><td>CIFAR-100 (WRN16-8)</td><td>21.70</td><td>20.08</td><td>20.55</td><td>20.14</td><td>19.24</td><td>19.15</td></tr><tr><td>CIFAR-100 (ResNeXt29-4-24)</td><td>21.79</td><td>21.70</td><td>22.28</td><td>21.86</td><td>21.12</td><td>19.78</td></tr><tr><td>Tiny-ImageNet (PreActResNet18)</td><td>43.40</td><td>43.48</td><td>40.76</td><td>43.11</td><td>36.52</td><td>35.85</td></tr><tr><td>ImageNet (ResNet-50,100 epochs)</td><td>24.03</td><td>22.97</td><td>23.30</td><td>22.92</td><td>22.49</td><td>22.39</td></tr><tr><td>Google commands (VGG-11)</td><td>4.84</td><td>3.91</td><td>3.67</td><td>3.76</td><td>3.70</td><td>3.54</td></tr></table>
|
| 136 |
+
|
| 137 |
+
Table 1: Top-1 error rate on various datasets and models. For CIFAR-100, we train each model with three different random seeds and report the mean error.
|
| 138 |
+
|
| 139 |
+
We further test Co-Mixup on other datasets; Tiny-ImageNet, ImageNet, and the Google commands dataset (Table 1). For Tiny-ImageNet, we train PreActResNet18 for 1200 epochs following the training protocol of Kim et al. (2020). As a result, Co-Mixup consistently improves Top-1 error rate over baselines by $0 . 6 7 \%$ . In the ImageNet experiment, we follow the experimental protocol provided in Puzzle Mix (Kim et al., 2020), which trains ResNet-50 (He et al., 2015) for 100 epochs. As a result, Co-Mixup outperforms all of the baselines in Top-1 error rate. We further test Co-Mixup on the speech domain with the Google commands dataset and VGG-11 (Simonyan and Zisserman, 2014). We provide a detailed experimental setting and dataset description in Appendix F.1. From Table 1, we confirm that Co-Mixup is the most effective in the speech domain as well.
|
| 140 |
+
|
| 141 |
+

|
| 142 |
+
Figure 4: Confidence-Accuracy plots for classifiers on CIFAR-100. From the figure, the Vanilla network shows over-confident predictions, whereas other mixup baselines tend to have under-confident predictions. We can find that Co-Mixup has best-calibrated predictions.
|
| 143 |
+
|
| 144 |
+
# 5.2 Localization
|
| 145 |
+
|
| 146 |
+
We compare weakly supervised object localization (WSOL) performance of classifiers trained on ImageNet (in Table 1) to demonstrate that our mixup method better guides a classifier to focus on salient regions. We test the localization performance using CAM (Zhou et al., 2016), a WSOL method using a pre-trained classifier. We evaluate localization performance following the evaluation protocol in Qin and Kim (2019), with binarization threshold 0.25 in CAM. Table 2 summarizes the WSOL performance of various mixup methods, which shows that our proposed mixup method outperforms other baselines.
|
| 147 |
+
|
| 148 |
+
# 5.3 Calibration
|
| 149 |
+
|
| 150 |
+
We evaluate the expected calibration error (ECE) (Guo et al., 2017) of classifiers trained on CIFAR-100. Note, ECE is calculated by the weighted average of the absolute difference between the confidence and accuracy of a classifier. As shown in Table 2, the Co-Mixup classifier has the lowest calibration error among baselines. From Figure 4, we find that other mixup baselines tend to have under-confident predictions resulting in higher ECE values even than Vanilla network (also pointed out by Wen et al. (2020)), whereas Co-Mixup has best-calibrated predictions resulting in relatively 48% less ECE value. We provide more figures and results with other datasets in Appendix F.2.
|
| 151 |
+
|
| 152 |
+
<table><tr><td>Task</td><td>Vanilla</td><td>Input</td><td>Manifold</td><td>CutMix</td><td>Puzzle Mix</td><td>Co-Mixup</td></tr><tr><td>Localization (Acc.%) (↑)</td><td>54.36</td><td>55.07</td><td>54.86</td><td>54.91</td><td>55.22</td><td>55.32</td></tr><tr><td>Calibration (ECE %)(↓)</td><td>3.9</td><td>17.7</td><td>13.1</td><td>5.6</td><td>7.5</td><td>1.9</td></tr></table>
|
| 153 |
+
|
| 154 |
+
Table 2: WSOL results on ImageNet and ECE ( $\%$ ) measurements of CIFAR-100 classifiers.
|
| 155 |
+
|
| 156 |
+
# 5.4 Robustness
|
| 157 |
+
|
| 158 |
+
In response to the recent problem raised by Lee et al. (2020) that deep neural network agents often fail to generalize to unseen environments, we consider the situation where the statistics of the foreground object, such as color or shape, is unchanged, but with the corrupted (or replaced) background. In detail, we consider the following operations: 1) replacement with another image and 2) adding Gaussian noise. We use ground-truth bounding boxes to separate the foreground from the background, and then apply the previous operations independently to obtain test datasets. We provide a detailed description of datasets in Appendix G.
|
| 159 |
+
|
| 160 |
+
With the test datasets described above, we evaluate the robustness of the pre-trained classifiers. As shown in Table 3, Co-Mixup shows significant performance gains at various background corruption tests compared to the other mixup baselines. For each corruption case, the classifier trained with Co-Mixup outperforms the others in Top-1 error rate with the performance margins of $2 . 8 6 \%$ and $3 . 3 3 \%$ over the Vanilla model.
|
| 161 |
+
|
| 162 |
+
<table><tr><td>Corruption type</td><td>Vanilla</td><td>Input</td><td>Manifold</td><td>CutMix</td><td>Puzzle Mix</td><td>Co-Mixup</td></tr><tr><td>Random replacement</td><td>41.63 (+17.62)</td><td>39.41 (+16.47)</td><td>39.72 (+16.47)</td><td>46.20 (+23.16)</td><td>39.23 (+16.69)</td><td>38.77 (+16.38)</td></tr><tr><td>Gaussian noise</td><td>29.22 (+5.21)</td><td>26.29 (+3.35)</td><td>26.79 (+3.54)</td><td>27.13 (+4.09)</td><td>26.11 (+3.57)</td><td>25.89 (+3.49)</td></tr></table>
|
| 163 |
+
|
| 164 |
+
Table 3: Top-1 error rates of various mixup methods for background corrupted ImageNet validation set. The values in the parentheses indicate the error rate increment by corrupted inputs compared to clean inputs.
|
| 165 |
+
|
| 166 |
+
# 5.5 Baselines with multiple inputs
|
| 167 |
+
|
| 168 |
+
To further investigate the effect of the number of inputs for the mixup in isolation, we conduct an ablation study on baselines using multiple mixing inputs. For fair comparison, we use Dirichlet $( \alpha , \ldots , \alpha )$ prior for the mixing ratio distribution and select the best performing $\alpha$ in $\{ 0 . 2 , 1 . 0 , 2 . 0 \}$ . Note that we overlay multiple boxes in the case of CutMix. Table 4 reports the classification test errors on CIFAR-100 with PreActResNet18. From the table, we find that mixing multiple inputs decreases the performance gains of each mixup baseline. These results demonstrate that mixing multiple inputs could lead to possible degradation of the performance and support the necessity of considering saliency information and diversity as in Co-Mixup.
|
| 169 |
+
|
| 170 |
+
<table><tr><td># inputs for mixup</td><td>Input</td><td>Manifold</td><td>CutMix</td><td>Co-Mixup</td></tr><tr><td># inputs = 2</td><td>22.43</td><td>21.64</td><td>21.29</td><td rowspan="3">19.87</td></tr><tr><td># inputs=3</td><td>23.03</td><td>22.13</td><td>22.01</td></tr><tr><td># inputs = 4</td><td>23.12</td><td>22.07</td><td>22.20</td></tr></table>
|
| 171 |
+
|
| 172 |
+
Table 4: Top-1 error rates of mixup baselines with multiple mixing inputs on CIFAR-100 and PreActResNet18. We report the mean values of three different random seeds. Note that Co-Mixup optimally determines the number of inputs for each output by solving the optimization problem.
|
| 173 |
+
|
| 174 |
+
# 6 Conclusion
|
| 175 |
+
|
| 176 |
+
We presented Co-Mixup for optimal construction of a batch of mixup examples by finding the best combination of salient regions among a collection of input data while encouraging diversity among the generated mixup examples. This leads to a discrete optimization problem minimizing a novel submodular-supermodular objective. In this respect, we present a practical modular approximation and iterative submodular optimization algorithm suitable for minibatch based neural network training. Our experiments on generalization, weakly supervised object localization, and robustness against background corruption show Co-Mixup achieves the state of the art performance compared to other mixup baseline methods. The proposed generalized mixup framework tackles the important question of ‘what to mix?’ while the existing methods only consider ‘how to mix?’. We believe this work can be applied to new applications where the existing mixup methods have not been applied, such as multi-label classification, multi-object detection, or source separation.
|
| 177 |
+
|
| 178 |
+
# Acknowledgements
|
| 179 |
+
|
| 180 |
+
This research was supported in part by Samsung Advanced Institute of Technology, Samsung Electronics Co., Ltd, Institute of Information & Communications Technology Planning & Evaluation (IITP) grant funded by the Korea government (MSIT) (No. 2020-0-00882, (SW STAR LAB) Development of deployable learning intelligence via self-sustainable and trustworthy machine learning), and Research Resettlement Fund for the new faculty of Seoul National University. Hyun Oh Song is the corresponding author.
|
| 181 |
+
|
| 182 |
+
# References
|
| 183 |
+
|
| 184 |
+
C. M. Bishop. Training with noise is equivalent to tikhonov regularization. Neural computation, 7(1):108–116, 1995.
|
| 185 |
+
C. M. Bishop. Pattern recognition and machine learning. springer, 2006.
|
| 186 |
+
P. Chrabaszcz, I. Loshchilov, and F. Hutter. A downsampled variant of imagenet as an alternative to the cifar datasets. arXiv preprint arXiv:1707.08819, 2017.
|
| 187 |
+
E. D. Cubuk, B. Zoph, D. Mane, V. Vasudevan, and Q. V. Le. Autoaugment: Learning augmentation strategies from data. In CVPR, 2019.
|
| 188 |
+
J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and F. F. Li. Imagenet: a large-scale hierarchical image database. In CVPR, 2009.
|
| 189 |
+
J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018.
|
| 190 |
+
S. Fujishige. Submodular functions and optimization. Elsevier, 2005.
|
| 191 |
+
C. Guo, G. Pleiss, Y. Sun, and K. Q. Weinberger. On calibration of modern neural networks. In ICML, 2017.
|
| 192 |
+
H. Guo, Y. Mao, and R. Zhang. Mixup as locally linear out-of-manifold regularization. In AAAI, 2019.
|
| 193 |
+
K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In CVPR, 2015.
|
| 194 |
+
K. He, X. Zhang, S. Ren, and J. Sun. Identity mappings in deep residual networks. In ECCV, 2016.
|
| 195 |
+
T. Horel and Y. Singer. Maximization of approximately submodular functions. In NeurIPS, 2016.
|
| 196 |
+
R. Iyer and J. Bilmes. Algorithms for approximate minimization of the difference between submodular functions, with applications. arXiv preprint arXiv:1207.0560, 2012.
|
| 197 |
+
C. Jung and C. Kim. A unified spectral-domain approach for saliency detection and its application to automatic object segmentation. IEEE Transactions on Image Processing, 21(3):1272–1283, 2011.
|
| 198 |
+
O. Kalinli and S. S. Narayanan. A saliency-based auditory attention model with applications to unsupervised prominent syllable detection in speech. In Eighth Annual Conference of the International Speech Communication Association, 2007.
|
| 199 |
+
J.-H. Kim, W. Choo, and H. O. Song. Puzzle mix: Exploiting saliency and local statistics for optimal mixup. In ICML, 2020.
|
| 200 |
+
A. Krizhevsky, G. Hinton, et al. Learning multiple layers of features from tiny images. Citeseer, 2009.
|
| 201 |
+
Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
|
| 202 |
+
K. Lee, K. Lee, J. Shin, and H. Lee. Network randomization: A simple technique for generalization in deep reinforcement learning. In ICLR, 2020.
|
| 203 |
+
L. Lovász. Submodular functions and convexity. In Mathematical Programming The State of the Art, pages 235–257. Springer, 1983.
|
| 204 |
+
T. Miyato, S.-i. Maeda, M. Koyama, and S. Ishii. Virtual adversarial training: a regularization method for supervised and semi-supervised learning. IEEE transactions on pattern analysis and machine intelligence, 41(8):1979–1993, 2018.
|
| 205 |
+
M. Narasimhan and J. A. Bilmes. A submodular-supermodular procedure with applications to discriminative structure learning. UAI, 2005.
|
| 206 |
+
A. v. d. Oord, S. Dieleman, H. Zen, K. Simonyan, O. Vinyals, A. Graves, N. Kalchbrenner, A. Senior, and K. Kavukcuoglu. Wavenet: A generative model for raw audio. arXiv preprint arXiv:1609.03499, 2016.
|
| 207 |
+
Z. Qin and D. Kim. Rethinking softmax with cross-entropy: Neural network classifier as mutual information estimator. arXiv preprint arXiv:1911.10688, 2019.
|
| 208 |
+
S. Ren, K. He, R. Girshick, and J. Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In NeurIPS, 2015.
|
| 209 |
+
R. R. Selvaraju, M. Cogswell, A. Das, R. Vedantam, D. Parikh, and D. Batra. Grad-cam: Visual explanations from deep networks via gradient-based localization. In ICCV, 2017.
|
| 210 |
+
K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
|
| 211 |
+
K. Simonyan, A. Vedaldi, and A. Zisserman. Deep inside convolutional networks: Visualising image classification models and saliency maps. arXiv preprint arXiv:1312.6034, 2013.
|
| 212 |
+
V. Verma, A. Lamb, C. Beckham, A. Najafi, I. Mitliagkas, A. Courville, D. Lopez-Paz, and Y. Bengio. Manifold mixup: Better representations by interpolating hidden states. In ICML, 2019.
|
| 213 |
+
L. Wang, H. Lu, X. Ruan, and M.-H. Yang. Deep networks for saliency detection via local estimation and global search. In CVPR, 2015.
|
| 214 |
+
P. Warden. URL https://research.googleblog.com/2017/08/launching-speech-commandsdataset.html., 2017.
|
| 215 |
+
Y. Wen, G. Jerfel, R. Muller, M. W. Dusenberry, J. Snoek, B. Lakshminarayanan, and D. Tran. Improving calibration of batchensemble with data augmentation. In ICML Workshop on Uncertainty and Robustness in Deep Learning, 2020.
|
| 216 |
+
T. Windheuser, H. Ishikawa, and D. Cremers. Generalized roof duality for multi-label optimization: Optimal lower bounds and persistency. In ECCV, 2012.
|
| 217 |
+
S. J. Wright. Coordinate descent algorithms. Mathematical Programming, 151(1):3–34, 2015.
|
| 218 |
+
S. Xie, R. Girshick, P. Dollár, Z. Tu, and K. He. Aggregated residual transformations for deep neural networks. pages 1492–1500, 2017.
|
| 219 |
+
S. Yun, D. Han, S. J. Oh, S. Chun, J. Choe, and Y. Yoo. Cutmix: Regularization strategy to train strong classifiers with localizable features. In ICCV, 2019.
|
| 220 |
+
S. Zagoruyko and N. Komodakis. Wide residual networks. arXiv preprint arXiv:1605.07146, 2016.
|
| 221 |
+
C. Zhang, S. Bengio, M. Hardt, B. Recht, and O. Vinyals. Understanding deep learning requires rethinking generalization. arXiv preprint arXiv:1611.03530, 2016.
|
| 222 |
+
H. Zhang, M. Cisse, Y. N. Dauphin, and D. Lopez-Paz. mixup: Beyond empirical risk minimization. In ICLR, 2018.
|
| 223 |
+
R. Zhao, W. Ouyang, H. Li, and X. Wang. Saliency detection by multi-context deep learning. In CVPR, 2015.
|
| 224 |
+
B. Zhou, A. Khosla, A. Lapedriza, A. Oliva, and A. Torralba. Learning deep features for discriminative localization. In CVPR, 2016.
|
| 225 |
+
|
| 226 |
+
# A Supplementary notes for objective
|
| 227 |
+
|
| 228 |
+
# A.1 Notations
|
| 229 |
+
|
| 230 |
+
In Table 5, we provide a summary of notations in the main text.
|
| 231 |
+
|
| 232 |
+
Table 5: A summary of notations.
|
| 233 |
+
|
| 234 |
+
<table><tr><td>Notation</td><td>Meaning</td></tr><tr><td>m, m', n Ck ∈Rm (1≤k≤n) 2jk∈Lm(1≤j≤m',1≤k≤n)</td><td># inputs,# outputs,dimension of data labeling cost for m input sources at the kth location input source ratio at the kth location of the jth output</td></tr></table>
|
| 235 |
+
|
| 236 |
+
# A.2 Interpretation of compatibility
|
| 237 |
+
|
| 238 |
+
In our main objective Equation (1), we introduce a compatibility matrix $A = ( 1 - \omega ) I + \omega A _ { c }$ between inputs. By minimizing $\left. o _ { j } , o _ { j ^ { \prime } } \right. _ { A }$ for $j \neq j ^ { \prime }$ , we encourage each individual mixup examples to have high compatibility within. Figure 5 explains how the compatibility term works by comparing simple cases. Note that our framework can reflect any compatibility measures for the optimal mixup.
|
| 239 |
+
|
| 240 |
+

|
| 241 |
+
Figure 5: Let us consider Co-Mixup with three inputs and two outputs. The figure represents two Co-Mixup results. Each input is denoted as a number and color-coded. Let us assume that input 1 and input 2 are more compatible, i.e., $A _ { 1 2 } \gg A _ { 2 3 }$ and $A _ { 1 2 } \gg A _ { 1 3 }$ . Then, the left Co-Mixup result has a larger inner-product value $\langle o _ { 1 } , o _ { 2 } \rangle _ { A }$ than the right. Thus the mixup result on the right has higher compatibility than the result on the left within each output example.
|
| 242 |
+
|
| 243 |
+
# B Proofs
|
| 244 |
+
|
| 245 |
+
# B.1 Proof of proposition 1
|
| 246 |
+
|
| 247 |
+
Lemma 1. For a positive semi-definite matrix $A \in \mathbb { R } _ { + } ^ { m \times m }$ and $x , x ^ { \prime } \in \mathbb { R } ^ { m }$ , $s ( x , x ^ { \prime } ) = x ^ { \intercal } A x ^ { \prime }$ is pairwise supermodular.
|
| 248 |
+
|
| 249 |
+
Proof. $s ( x , x ) + s ( x ^ { \prime } , x ^ { \prime } ) - s ( x , x ^ { \prime } ) - s ( x ^ { \prime } , x ) = x ^ { \intercal } A x + x ^ { \intercal } A x - 2 x ^ { \intercal } A x ^ { \prime } = ( x - x ^ { \prime } ) ^ { \intercal } A ( x - x ^ { \prime } )$ and because $A$ is positive semi-definite, $( x - x ^ { \prime } ) ^ { \intercal } A ( x - x ^ { \prime } ) \geq 0$ . □
|
| 250 |
+
|
| 251 |
+
Proposition 1. The compatibility term $f _ { c }$ in Equation (1) is pairwise supermodular for every pair of $\left( z _ { j _ { 1 } , k } , z _ { j _ { 2 } , k } \right)$ if $A$ is positive semi-definite.
|
| 252 |
+
|
| 253 |
+
Proof. For $j _ { 1 }$ and $j _ { 2 }$ , s.t., $j _ { 1 } \neq j _ { 2 }$ , $\begin{array} { r l } { \ } & { { } \operatorname* { m a x } \left\{ \tau , \sum _ { j = 1 } ^ { m ^ { \prime } } \sum _ { j ^ { \prime } = 1 , j ^ { \prime } \neq j } ^ { m ^ { \prime } } ( \sum _ { k = 1 } ^ { n } z _ { j , k } ) ^ { \intercal } A ( \sum _ { k = 1 } ^ { n } z _ { j ^ { \prime } , k } ) \right\} = } \end{array}$ $\operatorname* { m a x } \{ \tau , c + 2 z _ { j _ { 1 } , k } ^ { \mathsf { T } } A z _ { j _ { 2 } , k } \} \ = \ - \operatorname* { m i n } \{ - \tau , - c - 2 z _ { j _ { 1 } , k } ^ { \mathsf { T } } A z _ { j _ { 2 } , k } \}$ $- z _ { j _ { 1 } , k } ^ { \mathsf { T } } A z _ { j _ { 2 } , k }$ 1 1is pairwise submodular, and because a budget additive function preserves| , for $\exists c \in \mathbb { R }$ . By Lemma 1, submodularity (Horel and Singer, 2016), $\operatorname* { m i n } \{ - \tau , - c - 2 z _ { j _ { 1 } , k } ^ { \mathsf { T } } A z _ { j _ { 2 } , k } \}$ is pairwise submodular with respect to $\left( z _ { j _ { 1 } , k } , z _ { j _ { 2 } , k } \right)$ . □
|
| 254 |
+
|
| 255 |
+
# B.2 Proof of proposition 3
|
| 256 |
+
|
| 257 |
+
Proposition 3. The modularization given by Equation (2) satisfies the criteria.
|
| 258 |
+
|
| 259 |
+
Proof. Note, by the definition in Equation (1), the compatibility between the $j ^ { t h }$ and $j ^ { \prime } { } ^ { t h }$ and the otherfor the given outputs is $o _ { j ^ { \prime } } ^ { \intercal } A o _ { j }$ In addition, , let us defin , and thus, $\begin{array} { r } { \| o _ { j } \| _ { 1 } = \| \sum _ { k = 1 } ^ { n } z _ { j , k } \| _ { 1 } = \sum _ { k = 1 } ^ { n } \| z _ { j , k } \| _ { 1 } = n } \end{array}$ $v _ { - j } ^ { \mathsf { T } } o _ { j }$ represents the compatibility between the $j ^ { t h }$ output $o _ { j }$ $o _ { j } ^ { \prime }$ $o _ { j } ^ { \prime } [ i _ { 1 } ] = o _ { j } [ i _ { 1 } ] , + \alpha$ $o _ { j } ^ { \prime } [ i _ { 2 } ] = o _ { j } [ i _ { 2 } ] - \alpha$ for $\alpha > 0$ . Without loss of generality, let us assume $v _ { - j }$ is sorted in ascending order. Then, $v _ { - j } ^ { \mathsf { T } } o _ { j } \leq v _ { - j } ^ { \mathsf { T } } o _ { j } ^ { \prime }$ implies $i _ { 1 } > i _ { 2 }$ , and because the max function preserves the ordering, $\operatorname* { m a x } \{ \tau ^ { \prime } , v _ { - j } \} \mathfrak { r } o _ { j } \ \leq \ \operatorname* { m a x } \{ \tau ^ { \prime } , v _ { - j } \} \mathfrak { r } o _ { j } ^ { \prime }$ . Thus, the criterion 1 is locally satisfied. Next, for $\tau ^ { \prime } > 0$ , $\| \operatorname* { m a x } \{ \tau ^ { \prime } , v _ { - j } \} \mathtt { r } _ { O _ { j } } \| _ { 1 } \ge \tau ^ { \prime } \| o _ { j } \| _ { 1 } = \tau ^ { \prime } n$ . Let $\exists i _ { 0 }$ s.t. for $i < i _ { 0 } , v _ { - j } [ i ] < \tau ^ { \prime }$ , and for $i \ge i _ { 0 } , v _ { - j } [ i ] \ge \tau ^ { \prime }$ . Then, for $o _ { j }$ containing positive elements only in indices smaller than $i _ { 0 }$ , $\operatorname* { m a x } \{ \tau ^ { \prime } , v _ { - j } \} \tau _ { O j } = \tau ^ { \prime } n$ which means there is no extra penalty from the compatibility. In this respect, the proposed modularization satisfies the criterion 2 as well. □
|
| 260 |
+
|
| 261 |
+
# C Implementation details
|
| 262 |
+
|
| 263 |
+
We perform the optimization after down-sampling the given inputs and saliency maps to the specified size $( 4 \times 4 )$ . After the optimization, we up-sample the optimal labeling to match the size of the inputs and then mix inputs according to the up-sampled labeling. For the saliency measure, we calculate the gradient values of training loss with respect to the input data and measure $\ell _ { 2 }$ norm of the gradient values across input channels (Simonyan et al., 2013). In classification experiments, we retain the gradient information of network weights obtained from the saliency calculation for regularization. For the distance in the compatibility term, we measure $\ell _ { 1 }$ -distance between the most salient regions.
|
| 264 |
+
|
| 265 |
+
For the initialization in Algorithm 1, we use i.i.d. samples from a categorical distribution with equal probabilities. We use alpha-beta swap algorithm from pyGCO $^ { 1 }$ to solve the minimization step in Algorithm 1, which can find local-minima of a multi-label submodular function. However, the worst-case complexity of alpha-beta swap algorithm with $| { \mathcal { L } } | = 2$ is $O ( m ^ { 2 } n )$ , and in the case of mini-batch with 100 examples, iteratively applying the algorithm can become a bottleneck during the network training. To mitigate the computational overhead, we partition the mini-batch (each of size 20) and then apply Algorithm 1 independently per each partition.
|
| 266 |
+
|
| 267 |
+
The worst-case complexity theoretic of the naive implementation of Algorithm 1 increases exponentially as $| { \mathcal { L } } |$ increases. Specifically, the worst-case theoretic complexity of the alphabeta swap algorithm is proportional to the square of the number of possible states of $z _ { j , k }$ , which is proportional to $m ^ { | { \mathcal { L } } | - 1 }$ . To reduce the number of possible states in a multi-label case, we solve the problem for binary labels ( $| { \mathcal { L } } | = 2$ ) at the first inner-cycle and then extend to multi labels ( $| \mathcal { L } | = 3$ ) only for the currently assigned indices of each output in the subsequent cycles. This reduces the number of possible states to $O ( m + \bar { m } ^ { | { \cal L } | - 1 } )$ where $m \ll m$ . Here, $\bar { m }$ means the number of currently assigned indices for each output.
|
| 268 |
+
|
| 269 |
+
Based on the above implementation, we train models with Co-Mixup in a feasible time. For example, in the case of ImageNet training with 16 Intel I9-9980XE CPU cores and 4 NVIDIA RTX 2080Ti GPUs, Co-Mixup training requires 0.964s per batch, whereas the vanilla training without mixup requires 0.374s per batch. Note that Co-Mixup requires saliency computation, and when we compare the algorithm with Puzzle Mix, which performs the same saliency computation, Co-Mixup is only slower about 1.04 times. Besides, as we down-sample the data to the fixed size regardless of the data dimension, the additional computation cost of Co-Mixup relatively decreases as the data dimension increases. Finally, we present the empirical time complexity of Algorithm 1 in Figure 6. As shown in the figure, Algorithm 1 has linear time complexity over $| { \mathcal { L } } |$ empirically. Note that we use $| \mathcal { L } | = 3$ in all of our main experiments, including a classification task.
|
| 270 |
+
|
| 271 |
+

|
| 272 |
+
Figure 6: Mean execution time (ms) of Algorithm 1 per each batch of data over 100 trials. The left figure shows the time complexity of the algorithm over $| { \mathcal { L } } |$ and the right figure shows the time complexity over the number of inputs $m$ . Note that the other parameters are fixed equal to the classification experiments setting, $m = m ^ { \prime } = 2 0$ , $n = 1 6$ , and $| \mathcal { L } | = 3$ .
|
| 273 |
+
|
| 274 |
+
# D Algorithm Analysis
|
| 275 |
+
|
| 276 |
+
In this section, we perform comparison experiments to analyze the proposed Algorithm 1. First, we compare our algorithm with the exact brute force search algorithm to inspect the optimality of the algorithm. Next, we compare our algorithm with the BP algorithm proposed by Narasimhan and Bilmes (2005).
|
| 277 |
+
|
| 278 |
+
# D.1 Comparison with Brute Force
|
| 279 |
+
|
| 280 |
+
To inspect the optimality of the proposed algorithm, we compare the function values of the solutions of Algorithm 1, brute force search algorithm, and random guess. Due to the exponential time complexity of the brute force search, we compare the algorithms on small scale experiment settings. Specifically, we test algorithms on settings of ( $m = m ^ { \prime } = 2 , n = 4 ,$ ), ( $m = m ^ { \prime } = 2 , \ n = 9 ,$ ), and ( $m = m ^ { \prime } = 3 , ~ n = 4 )$ varying the number of inputs and outputs $( m , \ m ^ { \prime } )$ and the dimension of data $n$ . We generate unary cost matrix in the objective $f$ by sampling data from uniform distribution.
|
| 281 |
+
|
| 282 |
+
We perform experiments with 100 different random seeds and summarize the results on Table 6. From the table, we find that the proposed algorithm achieves near optimal solutions over various settings. We also measure relative errors between ours and random guess, $( f ( z _ { \mathrm { o u r s } } ) - f ( z _ { \mathrm { b r u t e } } ) ) / ( f ( z _ { \mathrm { r a n d o m } } ) - f ( z _ { \mathrm { b r u t e } } ) )$ . As a result, our algorithm achieves relative error less than 0.01.
|
| 283 |
+
|
| 284 |
+
# D.2 Comparison with another BP algorithm
|
| 285 |
+
|
| 286 |
+
We compare the proposed algorithm and the BP algorithm proposed by Narasimhan and Bilmes (2005). We evaluate function values of solutions by each method using a random
|
| 287 |
+
|
| 288 |
+
<table><tr><td>Configuration</td><td>Ours</td><td>Brute force (optimal)</td><td>Random guess</td><td>Rel.error</td></tr><tr><td>(m=m'=2,n= 4)</td><td>1.91</td><td>1.90</td><td>3.54</td><td>0.004</td></tr><tr><td>(m=m'= 2, n=9)</td><td>1.93</td><td>1.91</td><td>3.66</td><td>0.01</td></tr><tr><td>(m= m'=3, n= 4)</td><td>2.89</td><td>2.85</td><td>22.02</td><td>0.002</td></tr></table>
|
| 289 |
+
|
| 290 |
+
Table 6: Mean function values of the solutions over 100 different random seeds. Rel. error means the relative error between ours and random guess.
|
| 291 |
+
|
| 292 |
+
unary cost matrix from a uniform distribution. We compare methods over various scales by controlling the number of mixing inputs $m$ .
|
| 293 |
+
|
| 294 |
+
Table 7 shows the averaged function values with standard deviations in the parenthesis. As we can see from the table, the proposed algorithm achieves much lower function values and deviations than the method by Narasimhan and Bilmes (2005) over various settings. Note that the method by Narasimhan and Bilmes (2005) has high variance due to randomization in the algorithm. We further compare the algorithm convergence time in Table 8. The experiments verify that the proposed algorithm is much faster and effective than the method by Narasimhan and Bilmes (2005).
|
| 295 |
+
|
| 296 |
+
Table 7: Mean function values of the solutions over 100 different random seeds. We report the standard deviations in the parenthesis. Random represents the random guess algorithm.
|
| 297 |
+
|
| 298 |
+
<table><tr><td>Algorithm</td><td>m=5</td><td>m=10</td><td>m= 20</td><td>m=50</td><td>m = 100</td></tr><tr><td>Ours</td><td>3.1 (1.7)</td><td>15 (6.6)</td><td>54 (15)</td><td>205 (26)</td><td>469 (31)</td></tr><tr><td>Narasimhan</td><td>269 (58)</td><td>1071 (174)</td><td>4344 (701)</td><td>24955 (4439)</td><td>85782 (14337)</td></tr><tr><td>Random</td><td>809 (22)</td><td>7269 (92)</td><td>60964 (413)</td><td>980973 (2462)</td><td>7925650 (10381)</td></tr></table>
|
| 299 |
+
|
| 300 |
+
<table><tr><td>Algorithm</td><td>m=5</td><td>m=10</td><td>m = 20</td><td>m = 50</td><td>m= 100</td></tr><tr><td>Ours</td><td>0.02</td><td>0.04</td><td>0.11</td><td>0.54</td><td>2.71</td></tr><tr><td>Narasimhan</td><td>0.06</td><td>0.09</td><td>0.27</td><td>1.27</td><td>7.08</td></tr></table>
|
| 301 |
+
|
| 302 |
+
Table 8: Convergence time (s) of the algorithms.
|
| 303 |
+
|
| 304 |
+
# E Hyperparameter settings
|
| 305 |
+
|
| 306 |
+
We perform Co-Mixup after down-sampling the given inputs and saliency maps to the pre-defined resolutions regardless of the size of the input data. In addition, we normalize the saliency of each input to sum up to 1 and define unary cost using the normalized saliency. As a result, we use an identical hyperparameter setting for various datasets; CIFAR-100, Tiny-ImageNet, and ImageNet. In details, we use $( \beta , \gamma , \eta , \tau ) = ( 0 . 3 2 , 1 . 0 , 0 . 0 5 , 0 . 8 3 )$ for all of experiments. Note that $\tau$ is normalized according to the size of inputs ( $n$ ) and the ratio of the number of inputs and outputs $( m / m ^ { \prime } )$ , and we use an isotropic Dirichlet distribution with $\alpha = 2$ for prior $p$ . For a compatibility matrix, we use $\omega = 0 . 0 0 1$ .
|
| 307 |
+
|
| 308 |
+
For baselines, we tune the mixing ratio hyperparameter, i.e., the beta distribution parameter (Zhang et al., 2018), among $\{ 0 . 2 , 1 . 0 , 2 . 0 \}$ for all of the experiments if the specific setting is not provided in the original papers.
|
| 309 |
+
|
| 310 |
+
# F Additional Experimental Results
|
| 311 |
+
|
| 312 |
+
# F.1 Another Domain: Speech
|
| 313 |
+
|
| 314 |
+
In addition to the image domain, we conduct experiments on the speech domain, verifying Co-Mixup works on various domains. Following (Zhang et al., 2018), we train LeNet (LeCun et al., 1998) and VGG-11 (Simonyan and Zisserman, 2014) on the Google commands dataset (Warden, 2017). The dataset consists of 65,000 utterances, and each utterance is about one-second-long belonging to one out of 30 classes. We train each classifier for 30 epochs with the same training setting and data pre-processing of Zhang et al. (2018). In more detail, we use $1 6 0 \times 1 0 0$ normalized spectrograms of utterances for training. As shown in Table 9, we verify that Co-Mixup is still effective in the speech domain.
|
| 315 |
+
|
| 316 |
+

|
| 317 |
+
Figure 7: Confidence-Accuracy plots for classifiers on CIFAR-100. Note, ECE is calculated by the mean absolute difference between the two values.
|
| 318 |
+
|
| 319 |
+
<table><tr><td>Model</td><td>Vanilla</td><td>Input</td><td>Manifold</td><td>CutMix</td><td>Puzzle Mix</td><td>Co-Mixup</td></tr><tr><td>LeNet</td><td>11.24</td><td>10.83</td><td>12.33</td><td>12.80</td><td>10.89</td><td>10.67</td></tr><tr><td>VGG-11</td><td>4.84</td><td>3.91</td><td>3.67</td><td>3.76</td><td>3.70</td><td>3.57</td></tr></table>
|
| 320 |
+
|
| 321 |
+
Table 9: Top-1 classification test error on the Google commands dataset. We stop training if validation accuracy does not increase for 5 consecutive epochs.
|
| 322 |
+
|
| 323 |
+
# F.2 Calibration
|
| 324 |
+
|
| 325 |
+
In this section, we summarize the expected calibration error (ECE) (Guo et al., 2017) of classifiers trained with various mixup methods. For evaluation, we use the official code provided by the TensorFlow-Probability library $^ 2$ and set the number of bins as 10. As shown in Table 10, Co-Mixup classifiers have the lowest calibration error on CIFAR-100 and Tiny-ImageNet. As pointed by Guo et al. (2017), the Vanilla networks have overconfident predictions, but however, we find that mixup classifiers tend to have under-confident predictions (Figure 7; Figure 8). As shown in the figures, Co-Mixup successfully alleviates the over-confidence issue and does not suffer from under-confidence predictions.
|
| 326 |
+
|
| 327 |
+
<table><tr><td>Dataset</td><td>Vanilla</td><td>Input</td><td>Manifold</td><td>CutMix</td><td>Puzzle Mix</td><td>Co-Mixup</td></tr><tr><td>CIFAR-100</td><td>3.9</td><td>17.7</td><td>13.1</td><td>5.6</td><td>7.5</td><td>1.9</td></tr><tr><td>Tiny-ImageNet</td><td>4.5</td><td>6.2</td><td>6.8</td><td>12.0</td><td>5.6</td><td>2.5</td></tr><tr><td>ImageNet</td><td>5.9</td><td>1.2</td><td>1.7</td><td>4.3</td><td>2.1</td><td>2.1</td></tr></table>
|
| 328 |
+
|
| 329 |
+
Table 10: Expected calibration error ( $\%$ ) of classifiers trained with various mixup methods on CIFAR-100, Tiny-ImageNet and ImageNet. Note that, at all of three datasets, Co-Mixup outperforms all of the baselines in Top-1 accuracy.
|
| 330 |
+
|
| 331 |
+
# F.3 Sensitivity analysis
|
| 332 |
+
|
| 333 |
+
We measure the Top-1 error rate of the model by sweeping the hyperparameter to show the sensitivity using PreActResNet18 on CIFAR-100 dataset. We sweep the label smoothness coefficient $\beta \in \{ 0 , 0 . 1 6 , 0 . 3 2 , 0 . 4 8 , 0 . 6 4 \}$ , compatibility coefficient $\gamma \in \{ 0 . 6 , 0 . 8 , 1 . 0 , 1 . 2 , 1 . 4 \}$ , clipping level $\tau \in \{ 0 . 7 9 , 0 . 8 1 , 0 . 8 3 , 0 . 8 5 , 0 . 8 7 \}$ , compatibility matrix parameter $\omega \in \{ 0 , 5 \cdot$ $1 0 ^ { - 4 } , 1 0 ^ { - 3 } , 5 \cdot 1 0 ^ { - 3 } , 1 0 ^ { - 2 } \}$ , and the size of partition $m \in \{ 2 , 4 , 1 0 , 2 0 , 5 0 \}$ . Table 11 shows that Co-Mixup outperforms the best baseline (PuzzleMix, $2 0 . 6 2 \%$ ) with a large pool of
|
| 334 |
+
|
| 335 |
+

|
| 336 |
+
Figure 8: Confidence-Accuracy plots for classifiers on Tiny-ImageNet.
|
| 337 |
+
|
| 338 |
+

|
| 339 |
+
Figure 9: Confidence-Accuracy plots for classifiers on ImageNet.
|
| 340 |
+
|
| 341 |
+
hyperparameters. We also find that Top-1 error rate increases as the partition batch size $m$ increases until $m = 2 0$ .
|
| 342 |
+
|
| 343 |
+
<table><tr><td>Smoothness coefficient, β</td><td>β=0 20.29</td><td>β= 0.16 20.18</td><td>β=0.32 19.87</td><td>β=0.48 20.35</td><td>β=0.64 21.24</td></tr><tr><td>Compatibility coefficient, Y</td><td>γ= 0.6 20.3</td><td>Y=0.8 19.99</td><td>γ = 1.0 19.87</td><td>γ = 1.2 20.09</td><td>γ = 1.4 20.13</td></tr><tr><td>Clipping parameter, T</td><td>T= 0.79 20.45</td><td>T= 0.81 20.14</td><td>T=0.83 19.87</td><td>T=0.85 20.15</td><td>T = 0.87 20.23</td></tr><tr><td>Compatibility matrix parameter,w</td><td>ε=0 20.51</td><td>w=5.10-4 20.42</td><td>w=10-3 19.87</td><td>w=5.10-3 20.18</td><td>w=10-2 20.14</td></tr><tr><td>Partition size, m</td><td>m=2 20.3</td><td>m=4 20.22</td><td>m=10 20.15</td><td>m=20 19.87</td><td>m= 50 19.96</td></tr></table>
|
| 344 |
+
|
| 345 |
+
Table 11: Hyperparameter sensitivity results (Top-1 error rates) on CIFAR-100 with PreActResNet18. We report the mean values of three different random seeds.
|
| 346 |
+
|
| 347 |
+
# F.4 Comparison with non-mixup baselines
|
| 348 |
+
|
| 349 |
+
We compare the generalization performance of Co-Mixup with non-mixup baselines, verifying the proposed method achieves the state of the art generalization performance not only for the mixup-based methods but for other general regularization based methods. One of the regularization methods called VAT (Miyato et al., 2018) uses virtual adversarial loss, which is defined as the KL-divergence of predictions between input data against local perturbation. We perform the experiment with VAT regularization on CIFAR-100 with PreActResNet18 for 300 epochs in the supervised setting. We tune $\alpha$ (coefficient of VAT regularization term) in {0.001, 0.01, 0.1}, $\epsilon$ (radius of $\ell$ -inf ball) in $\{ 1 , 2 \}$ , and the number of noise update steps in $\{ 0$ , $1 \}$ . Table 12 shows that Co-Mixup, which achieves Top-1 error rate of $1 9 . 8 7 \%$ , outperforms the VAT regularization method.
|
| 350 |
+
|
| 351 |
+
# G Detailed description for background corruption
|
| 352 |
+
|
| 353 |
+
We build the background corrupted test datasets based on ImageNet validation dataset to compare the robustness of the pre-trained classifiers against the background corruption.
|
| 354 |
+
|
| 355 |
+
Table 12: Top-1 error rates of VAT on CIFAR-100 dataset with PreActResNet18.
|
| 356 |
+
|
| 357 |
+
<table><tr><td>VAT loss coefficient</td><td colspan="2">#update=0</td><td colspan="2">#update=1</td></tr><tr><td></td><td>∈=1</td><td>∈=2</td><td>e=1</td><td>∈=2</td></tr><tr><td>α = 0.001</td><td>23.38</td><td>23.62</td><td>24.76</td><td>26.22</td></tr><tr><td>α = 0.01</td><td>23.14</td><td>23.67</td><td>28.33</td><td>31.95</td></tr><tr><td>α = 0.1</td><td>23.65</td><td>23.88</td><td>34.75</td><td>39.82</td></tr></table>
|
| 358 |
+
|
| 359 |
+
ImageNet consists of images $\{ x _ { 1 } , . . . , x _ { M } \}$ , labels $\{ y _ { 1 } , . . . , y _ { M } \}$ , and the corresponding groundtruth bounding boxes $\big \{ b _ { 1 } , . . . , b _ { M } \big \}$ . We use the ground-truth bounding boxes to separate the foreground from the background. Let $z _ { j }$ be a binary mask of image $x _ { j }$ , which has value 1 inside of the ground-truth bounding box $b _ { j }$ . Then, we generate two types of background corrupted sample ${ \ddot { x } } _ { j }$ by considering the following operations:
|
| 360 |
+
|
| 361 |
+
1. Replacement with another image as $\begin{array} { r } { \tilde { x } _ { j } = x _ { j } \odot z _ { j } + x _ { i ( j ) } \odot ( 1 - z _ { j } ) } \end{array}$ for a random permutation $\{ i ( 1 ) , . . . , i ( M ) \}$ .
|
| 362 |
+
2. Adding Gaussian noise as $\tilde { x } _ { j } = x _ { j } \odot z _ { j } + \epsilon \odot ( 1 - z _ { j } )$ , where $\epsilon \sim N ( 0 , 0 . 1 ^ { 2 } )$ . We clip pixel values of $\ddot { x } _ { j }$ to [0, 1].
|
| 363 |
+
|
| 364 |
+

|
| 365 |
+
Figure 10 visualizes subsets of the background corruption test datasets.
|
| 366 |
+
Figure 10: Each subfigure shows background corrupted samples used in the robustness experiment. (a) Replacement with another image in ImageNet. (b) Adding Gaussian noise. The red boxes on the images represent ground-truth bounding boxes.
|
| 367 |
+
|
| 368 |
+
# H Co-Mixup generated samples
|
| 369 |
+
|
| 370 |
+
In Figure 12, we present Co-Mixup generated image samples by using images from ImageNet. We use an input batch consisting of 24 images, which is visualized in Figure 11. As can be seen from Figure 12, Co-Mixup efficiently mix-matches salient regions of the given inputs maximizing saliency and creates diverse outputs. In Figure 12, inputs with the target objects on the left side are mixed with the objects on the right side, and objects on the top side are mixed with the objects on the bottom side. In Figure 13, we present Co-Mixup generated image samples with larger $\tau$ using the same input batch. By increasing $\tau$ , we can encourage Co-Mixup to use more inputs to mix per each output.
|
| 371 |
+
|
| 372 |
+

|
| 373 |
+
Figure 11: Input batch.
|
| 374 |
+
|
| 375 |
+

|
| 376 |
+
Figure 12: Mixed output batch.
|
| 377 |
+
|
| 378 |
+

|
| 379 |
+
Figure 13: Another mixed output batch with larger $\tau$
|
md/train/o2tx_m7hK3t/o2tx_m7hK3t.md
ADDED
|
@@ -0,0 +1,499 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Missing Data Infill with Automunge
|
| 2 |
+
|
| 3 |
+
Anonymous Author(s)
|
| 4 |
+
Affiliation
|
| 5 |
+
Address
|
| 6 |
+
email
|
| 7 |
+
|
| 8 |
+
# Abstract
|
| 9 |
+
|
| 10 |
+
1 Missing data is a fundamental obstacle in the practice of data science. This paper
|
| 11 |
+
2 surveys a few conventions for imputation as available in the Automunge open
|
| 12 |
+
3 source python library platform for tabular data preprocessing, including “ML infill”
|
| 13 |
+
4 in which auto ML models are trained for target features from partitioned extracts
|
| 14 |
+
5 of a training set. A series of validation experiments were performed to benchmark
|
| 15 |
+
6 imputation scenarios towards downstream model performance, in which it was
|
| 16 |
+
7 found for the given benchmark sets that in many cases ML infill outperformed for
|
| 17 |
+
8 both numeric and categoric target features, and was otherwise at minimum within
|
| 18 |
+
9 noise distributions of the other imputation scenarios. Evidence also suggested
|
| 19 |
+
10 supplementing ML infill with the addition of support columns with boolean integer
|
| 20 |
+
11 markers signaling presence of infill was usually beneficial to downstream model
|
| 21 |
+
12 performance. We consider these results sufficient to recommend defaulting to
|
| 22 |
+
13 ML infill for tabular learning, and further recommend supplementing imputations
|
| 23 |
+
14 with support columns signaling presence of infill, each as can be prepared with
|
| 24 |
+
15 push-button operation in the Automunge library. Our contributions include an
|
| 25 |
+
16 auto ML derived missing data imputation library for tabular learning in the python
|
| 26 |
+
17 ecosystem, fully integrated into a preprocessing platform with an extensive library
|
| 27 |
+
18 of feature transformations, with a novel production friendly implementation that
|
| 28 |
+
19 bases imputation models on a designated train set for consistent basis towards
|
| 29 |
+
20 additional data.
|
| 30 |
+
|
| 31 |
+
# 21 1 Introduction
|
| 32 |
+
|
| 33 |
+
22 Missing data is a fundamental obstacle for data science practitioners. Missing data refers to feature
|
| 34 |
+
23 sets in which a portion of entries do not have samples recorded, which may interfere with model
|
| 35 |
+
24 training and/or inference. In some cases, the missing entries may be randomly distributed within the
|
| 36 |
+
25 samples of a feature set, a scenario known as missing at random. In other cases, certain segments of a
|
| 37 |
+
26 feature set’s distribution may have a higher prevalence of missing data than other portions, a scenario
|
| 38 |
+
27 known as missing not at random. In some cases, the presence of missing data may even correlate
|
| 39 |
+
28 with label set properties, resulting in a kind of data leakage for a supervised training operation.
|
| 40 |
+
29 In a tabular data set (that is a data set aggregated as a 2D matrix of feature set columns and collected
|
| 41 |
+
30 sample rows), missing data may be represented by a few conventions. A common one is for missing
|
| 42 |
+
31 entries to be received as a NaN value, which is a special numeric data type representing “not a
|
| 43 |
+
32 number”. Some dataframe libraries may have other special data types for this purpose. In another
|
| 44 |
+
33 configuration, missing data may be represented by some particular value (like a string configuration)
|
| 45 |
+
34 associated with a feature set.
|
| 46 |
+
35 When a tabular data set with missing values present is intended to serve as a target for supervised
|
| 47 |
+
36 training, machine learning (ML) libraries may require as a prerequisite some kind of imputation
|
| 48 |
+
37 to ensure the set has all valid entries, which for most libraries means all numeric entries (although
|
| 49 |
+
38 there are some libraries that accept designated categoric feature sets in their string representations).
|
| 50 |
+
39 Conventions for imputation may follow a variety of options to target numeric or categoric feature sets
|
| 51 |
+
40 [Table 1], many of which apply a uniform infill value, which may either be arbitrary or derived as a
|
| 52 |
+
41 function of other entries in the feature set.
|
| 53 |
+
42 Other, more sophisticated conventions for infill may derive an imputation value as a function of
|
| 54 |
+
43 corresponding samples of the other features. For example, one of many learning algorithms (like
|
| 55 |
+
44 random forest, gradient boosting, neural networks, etc.) may be trained for a target feature where
|
| 56 |
+
45 the populated entries in that feature are treated as labels and surrounding features sub-aggregated
|
| 57 |
+
46 as features for the imputation model, and where the model may serve as either a classification or
|
| 58 |
+
47 regression operation based on properties of the target feature.
|
| 59 |
+
48 This paper is to document a series of validation experiments that were performed to compare
|
| 60 |
+
49 downstream model performance as a result of a few of these different infill conventions. We crafted a
|
| 61 |
+
50 contrived set of scenarios representing paradigms like missing at random or missing not at random
|
| 62 |
+
51 as injected in either a numeric or categoric target feature selected for influence toward downstream
|
| 63 |
+
52 model performance. Along the way we will offer a brief introduction to the Automunge library for
|
| 64 |
+
53 tabular data preprocessing, particularly those aspects of the library associated with missing data infill.
|
| 65 |
+
54 The results of these experiments summarized below may serve as a validation of defaulting to ML
|
| 66 |
+
55 infill for tabular learning even when faced with different types of missing data, and further defaulting
|
| 67 |
+
56 to supplementing imputations with support columns signaling presence of infill.
|
| 68 |
+
57 Our contributions include an auto ML derived missing data imputation library for tabular learning
|
| 69 |
+
58 in the python ecosystem, fully integrated into a preprocessing platform with an extensive library of
|
| 70 |
+
59 feature transformations, extending the ML imputation capabilities of R libraries like MissForest [1]
|
| 71 |
+
60 to a more production friendly implementation that bases imputation models on a designated train set
|
| 72 |
+
61 for consistent basis towards additional data.
|
| 73 |
+
|
| 74 |
+
Table 1: Imputation Conventions
|
| 75 |
+
|
| 76 |
+
<table><tr><td>Imputation Value</td><td>Numeric</td><td>Categoric</td></tr><tr><td>mean</td><td></td><td></td></tr><tr><td>median</td><td>√ √</td><td></td></tr><tr><td>mode</td><td></td><td>√</td></tr><tr><td>adjacent cell</td><td>【</td><td>←</td></tr><tr><td>arbitrary (e.g. O or 1)</td><td>√</td><td>√</td></tr><tr><td>distinct activation</td><td></td><td>√</td></tr><tr><td>ML infill</td><td>「</td><td>√</td></tr></table>
|
| 77 |
+
|
| 78 |
+
# 62 2 Automunge
|
| 79 |
+
|
| 80 |
+
63 Automunge [2], put simply, is a python library platform for preparing tabular data for machine
|
| 81 |
+
64 learning, built on top of the Pandas dataframe library [3] and open sourced under a GNU GPL
|
| 82 |
+
65 v3.0 license. The interface is channeled through two master functions: automunge(.) for the initial
|
| 83 |
+
66 preparation of training data, and postmunge(.) for subsequent efficient preparation of additional “test”
|
| 84 |
+
67 data on the train set basis. In addition to returning transformed data, the automunge(.) function also
|
| 85 |
+
68 populates and returns a compact dictionary recording all of the steps and parameters of transformations
|
| 86 |
+
69 and imputations, which dictionary may then serve as a key for consistently preparing additional data
|
| 87 |
+
70 in the postmunge(.) function on the train set basis.
|
| 88 |
+
71 Under automation the automunge(.) function performs an evaluation of feature set properties to
|
| 89 |
+
72 derive appropriate simple feature engineering transformations that may serve to normalize numeric
|
| 90 |
+
73 sets and binarize (or hash) categoric sets. A user may also apply custom transformations, or even
|
| 91 |
+
74 custom sets of transformations, assigned to distinct columns. Such transformations may be sourced
|
| 92 |
+
75 from an extensive internal library, or even may be custom defined. The resulting transformed data log
|
| 93 |
+
76 the applied stages of derivations by way of suffix appenders on the returned column headers.
|
| 94 |
+
77 Missing data imputation is handled automatically in the library, where each transformation applied
|
| 95 |
+
78 includes a default imputation convention to serve as a precursor to imputation model training, one
|
| 96 |
+
79 that may also be overridden for use of other conventions by assignment.
|
| 97 |
+
80 Included in the library of infill options is an auto ML solution we refer to as ML infill, in which a
|
| 98 |
+
81 distinct model is trained for each target feature and saved in the returned dictionary for a consistent
|
| 99 |
+
82 imputation basis of subsequent data in the postmunge(.) function. The model architecture defaults to
|
| 100 |
+
83 random forest [4] by Scikit-Learn [5], and other auto ML library options are also supported.
|
| 101 |
+
84 The ML infill implementation works by first collecting a ‘NArw’ support column for each received
|
| 102 |
+
85 feature set containing boolean integer markers (1’s and 0’s) with activations corresponding to entries
|
| 103 |
+
86 with missing or improperly formatted data. The types of data to be considered improperly formatted
|
| 104 |
+
87 are tailored to the root transformation category to be applied to the column, where for example
|
| 105 |
+
88 for a numeric transform non-numeric entries may be subject to infill, or for a categoric transform
|
| 106 |
+
89 invalid entries may just be special data types like NaN or None. Other transforms may have other
|
| 107 |
+
90 configurations, for example a power law transform may only accept positive numeric entries, or an
|
| 108 |
+
91 integer transform may only accept integer entries.
|
| 109 |
+
92 This NArw support column can then be used to perform a target feature specific partitioning of the
|
| 110 |
+
93 training data for use to train a ML infill model [Fig 1]. The partitioning segregates rows between those
|
| 111 |
+
94 corresponding to missing data in the target feature verses those rows with valid entries, with the target
|
| 112 |
+
95 feature valid entries to serve as labels for a supervised training and the other corresponding features’
|
| 113 |
+
96 samples to serve as training data. Feature samples corresponding to the target feature missing data
|
| 114 |
+
97 are grouped for an inference operation. Note that for cases where a transformation set has prepared
|
| 115 |
+
98 a target input feature in multiple configurations, those derivations other than the target feature are
|
| 116 |
+
99 omitted from the partitions to avoid data leakage. A similar partitioning is performed for test data
|
| 117 |
+
100 sets for ML infill imputation, although in this case only the rows corresponding to entries of missing
|
| 118 |
+
101 data in the target feature are utilized for inference. As a further variation available for any of the
|
| 119 |
+
102 imputation methods, the NArw support columns may themselves be appended to the returned data
|
| 120 |
+
103 sets as a signal to training of entries that were subject to infill.
|
| 121 |
+
|
| 122 |
+
# ML infill
|
| 123 |
+
|
| 124 |
+

|
| 125 |
+
Figure 1: ML Infill partitioning
|
| 126 |
+
|
| 127 |
+
104 There is a categorization associated with each preprocessing transformation category to determine
|
| 128 |
+
105 the type of ML infill training operation, for example a target feature set derived from a transform that
|
| 129 |
+
106 returns a numeric form may be a target for a regression operation or a target feature set derived from
|
| 130 |
+
107 a transform that returns an ordinal encoding may be a target for a classification operation. In some
|
| 131 |
+
108 cases a target feature may be composed of a set of more than one column, like in the case of a set
|
| 132 |
+
109 returned from a one-hot encoding. For cases where a learner library does not accept some particular
|
| 133 |
+
110 form of encoding as valid labels there is a conversion of the target feature set for training and an
|
| 134 |
+
111 inverse conversion after any inference, for example it may be necessary to convert a binarized target
|
| 135 |
+
112 feature set to one-hot encoding or ordinal encoding for use as labels in different auto ML frameworks.
|
| 136 |
+
113 As may be particularly beneficial in cases with high prevalence of missing data across features, the
|
| 137 |
+
114 sequential training of feature imputation models may be iterated through repeated rounds of imputa
|
| 138 |
+
115 tions. For instance in the first round of model trainings and imputations the models’ performance
|
| 139 |
+
116 may be slightly degraded by high prevalence of missing data populated with the initial transformation
|
| 140 |
+
117 function imputation conventions in surrounding features, but after that first round of imputations a
|
| 141 |
+
118 second iteration of model trainings may have slight improvement of performance due to the presence
|
| 142 |
+
119 of ML infill imputations, and similarly ML infill may benefit from any additional iterations of model
|
| 143 |
+
120 trainings and imputations. In each iteration the sequence of imputations between columns are applied
|
| 144 |
+
121 in an order from features with highest prevalence of missing data to least. The library defaults to a
|
| 145 |
+
122 single round of imputations, with the option to specify an additional iteration quantity.
|
| 146 |
+
123 The final trained models for each target feature, as derived from properties of a designated train set
|
| 147 |
+
124 passed to the automunge(.) function, are collectively saved and returned to the user in a dictionary
|
| 148 |
+
125 that may serve as a key for consistent imputation basis to additional data in the postmunge(.) function,
|
| 149 |
+
126 with such dictionary also serving as a key for any applied preprocessing transformations.
|
| 150 |
+
|
| 151 |
+
# 127 3 Preprocessing
|
| 152 |
+
|
| 153 |
+
128 The utility of the library extends well beyond missing data infill. Automunge is intended as a platform
|
| 154 |
+
129 for all of the tabular learning steps following receipt of tidy data [6] (meaning one column per
|
| 155 |
+
130 feature and one row per sample) and immediately preceding the application of machine learning. We
|
| 156 |
+
131 found that by integrating the imputations directly into a preprocessing library, benefits included that
|
| 157 |
+
132 imputations can be applied to returned multi-column categoric representations like one-hot encodings
|
| 158 |
+
133 or binarized encodings, can account for potential data leakage between redundantly encoded feature
|
| 159 |
+
134 sets, and can accept raw data as input as may include string encoded and date-time entries with only
|
| 160 |
+
135 the minimal requirement of data received in a tidy form.
|
| 161 |
+
136 Under automation, Automunge normalizes numeric sets by z-score normalization and binarizes
|
| 162 |
+
137 categoric sets (where binarize refers to a multi-column boolean integer representation where each
|
| 163 |
+
138 categoric unique entry is represented by a distinct set of zero, one, or more simultaneous activations).
|
| 164 |
+
139 We have a separate kind of binarization for categoric sets with two unique entries, which returns a
|
| 165 |
+
140 single boolean integer encoded column (available as a single column by not having a distinct encoding
|
| 166 |
+
141 set for missing data which is instead grouped with the most common entry). High cardinality categoric
|
| 167 |
+
142 sets with unique entry count above a configurable heuristic threshold are instead applied with a hashing
|
| 168 |
+
143 trick transform [7, 8], and for highest cardinality approaching all unique entries features are given a
|
| 169 |
+
144 parsed hashing [9] which accesses distinct words found within entries. Further automated encodings
|
| 170 |
+
145 are available for date-time sets in which entries are segregated by time scale and subject to separate
|
| 171 |
+
146 sets of sine and cosine transforms at periodicity of time scale and additionally supplemented by
|
| 172 |
+
147 binned activations for business hours, weekdays, and holidays. Designated label sets are treated a
|
| 173 |
+
148 little differently, where numeric sets are left un-normalized and categoric sets are ordinal encoded (a
|
| 174 |
+
149 single column of integer activations). All of the defaults under automation are custom configurable.
|
| 175 |
+
150 A user need not defer to automation. There is a built in extensive library of feature transformations to
|
| 176 |
+
151 choose from. Numeric features may be assigned to any range of transformations, normalizations, and
|
| 177 |
+
152 bin aggregations [10]. Sequential numeric features may be supplemented by proxies for derivatives
|
| 178 |
+
153 [10]. Categoric features may be subject to encodings like ordinal, one-hot, binarization, hashing, or
|
| 179 |
+
154 even parsed categoric encoding [11] with an increased information retention in comparison to one-hot
|
| 180 |
+
155 encoding by a vectorization as a function of grammatical structure shared between entries. Categoric
|
| 181 |
+
156 sets may be collectively aggregated into a single common binarization. Categoric labels may have
|
| 182 |
+
157 label smoothing applied [12], or fitted smoothing where null values are fit to class distributions. Data
|
| 183 |
+
158 augmentation transformations [10] may be applied which make use of noise injection, including
|
| 184 |
+
159 several variants for both numeric and categoric features. Sets of transformations to be directed at a
|
| 185 |
+
160 target feature can be assembled which include generations and branches of derivations by making use
|
| 186 |
+
161 of our “family tree primitives” [13], as can be used to redundantly encode a feature set in multiple
|
| 187 |
+
162 configurations of varying information content. Such transformation sets may be accessed from those
|
| 188 |
+
163 predefined in an internal library for simple assignment or alternatively may be custom configured.
|
| 189 |
+
164 Even the transformation functions themselves may be custom defined with only minimal requirements
|
| 190 |
+
165 of simple data structures. Through application statistics of the features are recorded to facilitate
|
| 191 |
+
166 detection of distribution drift. Inversion is available to recover the original form of data found
|
| 192 |
+
167 preceding transformations, as may be useful to recover the original form of labels after inference.
|
| 193 |
+
168 Or of course if the data is received already numerically encoded the library can simply be applied as
|
| 194 |
+
169 a tool for missing data infill.
|
| 195 |
+
|
| 196 |
+
# 170 4 Code Demonstration
|
| 197 |
+
|
| 198 |
+
171 Jupyter notebook install and imports are as follows:
|
| 199 |
+
|
| 200 |
+
!pip install Automunge from Automunge import $^ *$ am $=$ AutoMunge()
|
| 201 |
+
|
| 202 |
+
176 The automunge(.) function accepts as input a Pandas dataframe or tabular Numpy array of training
|
| 203 |
+
177 data and optionally also corresponding test data. If any of the sets include a label column that header
|
| 204 |
+
178 should be designated, similarly with any index header or list of headers to exclude from the ML infill
|
| 205 |
+
179 basis. For Numpy, headers are the index integer and labels should be positioned as final column.
|
| 206 |
+
180 import pandas as pd
|
| 207 |
+
181 df_train $=$ pd.read_csv('train.csv')
|
| 208 |
+
182 df_test $=$ pd.read_csv('test.csv')
|
| 209 |
+
183 labels_column $=$ '<labels_column_header>'
|
| 210 |
+
184 trainID_column $=$ '<ID_column_header>'
|
| 211 |
+
185 These data sets can be passed to automunge(.) to automatically encode and impute. The function
|
| 212 |
+
186 returns 10 sets (9 dataframes and 1 dictionary) which in some cases may be empty based on parameter
|
| 213 |
+
187 settings, we suggest the following optional naming convention. The final set, the “postprocess_dict”,
|
| 214 |
+
188 is the key for consistently preparing additional data in postmunge(.). Note that if a validation set
|
| 215 |
+
189 is desired it can be partitioned from df_train with valpercent and prepared on the train set basis.
|
| 216 |
+
190 Shuffling is on by default for train data and off by default for test data, the associated parameter
|
| 217 |
+
191 is shown for reference. Here we demonstrate with the assigncat parameter assigning the root
|
| 218 |
+
192 category of a transformation set to some target column which will override the default transform
|
| 219 |
+
193 under automation. We also demonstrate with the assigninfill parameter assigning an alternate
|
| 220 |
+
194 infill convention to a column. The ML infill and NArw column aggregation are on by default, their
|
| 221 |
+
195 associated activation parameters are shown for reference. Note that if the data is already numerically
|
| 222 |
+
196 encoded and user just desires infill, they can pass parameter powertransform $=$ 'infill'.
|
| 223 |
+
197 train, train_ID, labels, \
|
| 224 |
+
198 val, val_ID, val_labels, \
|
| 225 |
+
199 test, test_ID, test_labels, \
|
| 226 |
+
200 postprocess_dict $=$ \
|
| 227 |
+
201 am.automunge(df_train,
|
| 228 |
+
202 df_test $=$ df_test,
|
| 229 |
+
203 labels_column $=$ labels_column,
|
| 230 |
+
204 trainID_column $=$ trainID_column,
|
| 231 |
+
205 valpercent $\ c = \ 0 . 2$ ,
|
| 232 |
+
206 shuffletrain $=$ True,
|
| 233 |
+
207 assigncat $=$ {'or23' : ['<parsed_categoric_target_column>'] },
|
| 234 |
+
208 assigninfill $=$ {'modeinfill' : ['<infill_target_column>'] },
|
| 235 |
+
209 MLinfill $=$ True,
|
| 236 |
+
210 NArw_marker $=$ True)
|
| 237 |
+
211 A list of columns returned from some particular input feature can be accessed with
|
| 238 |
+
212 postprocess_dict['column_map']['<input_feature_header>']. A report classifying the
|
| 239 |
+
213 returned column types (such as continuous, boolean, ordinal, onehot, binary, etc.) and their groupings
|
| 240 |
+
214 can be accessed with postprocess_dict['columntype_report'].
|
| 241 |
+
215 If the returned train set is to be used for training a model that may go into production, the postpro
|
| 242 |
+
216 cess_dict should be saved externally, such as with the pickle library.
|
| 243 |
+
|
| 244 |
+
217 We can then prepare additional data on the train set basis with postmunge(.).
|
| 245 |
+
|
| 246 |
+
218 test, test_ID, test_labels, \
|
| 247 |
+
219 postreports_dict $=$ \
|
| 248 |
+
220 am.postmunge(postprocess_dict,
|
| 249 |
+
221 df_test)
|
| 250 |
+
223 The R ecosystem has long enjoyed access to missing data imputation libraries that apply learned
|
| 251 |
+
224 models to predict infill based on other features in a set, such as MissForest [1] and mice [14], where
|
| 252 |
+
225 MissForest differs from mice as a deterministic imputation built on top of random forest and mice
|
| 253 |
+
226 applies chained equations with pooled linear models and sampling from a conditional distribution.
|
| 254 |
+
227 One of the limitations of these libraries are that the algorithms must be run through both training
|
| 255 |
+
228 and inference for each separate data set, as may be required if test data is not available at time of
|
| 256 |
+
229 training, which practice may not be amenable to production environments. Automunge on the other
|
| 257 |
+
230 hand bases imputations on a designated train set, returning from application a collected dictionary of
|
| 258 |
+
231 feature set specific models that can then be applied as a key for consistently preparing additional data
|
| 259 |
+
232 on the train set basis.
|
| 260 |
+
233 Automunge’s ML infill also differs from these R libraries by providing multiple auto ML options
|
| 261 |
+
234 for imputation models. We are continuing to build out a range that currently includes Catboost [15],
|
| 262 |
+
235 AutoGluon [16], and FLAML [17] libraries. Our default configuration is built on top of Scikit-Learn
|
| 263 |
+
236 [5] random forest [4] models and may be individually tuned to each target feature with grid or random
|
| 264 |
+
237 search by passing fit parameters to ML infill as lists or distributions.
|
| 265 |
+
238 There are of course several other variants of machine learning derived imputations that have been
|
| 266 |
+
239 demonstrated elsewhere. Imputations from generative adversarial networks [18] may improve
|
| 267 |
+
240 performance compared to ML infill (at a cost of complexity). Gaussian copula imputation [19] has
|
| 268 |
+
241 a benefit of being able to estimate uncertainty of imputations. There are even imputation solutions
|
| 269 |
+
242 built around causal graphical models [20]. Towards the other end of complexity spectrum, $\mathbf { k }$ -Nearest
|
| 270 |
+
243 Neighbor imputation [21] for continuous data is available in common frameworks like Scikit-Learn.
|
| 271 |
+
244 Being built on top of the Pandas library, there is an inherent limitation that Automunge operations are
|
| 272 |
+
245 capped at in-memory scale data sets. Other dataframe libraries like Spark [22] have the ability to
|
| 273 |
+
246 operate on distributed datasets. We believe this is not a major limitation because the in memory scale
|
| 274 |
+
247 is only associated with datasets passed to automunge(.) to serve as the basis for transformations and
|
| 275 |
+
248 imputations. Once the basis has been established, transformations to any scale of data can be applied
|
| 276 |
+
249 by passing partitions to the postmunge(.) function. We expect there may be potential to parallelize
|
| 277 |
+
250 such an operation with a library like Dask [23] or Ray [24], such an implementation is currently
|
| 278 |
+
251 intended as a future direction of research.
|
| 279 |
+
252 Another limitation associated with Pandas dataframes is that operations take place on the CPU. There
|
| 280 |
+
253 are emerging dataframe platforms like Rapids [25] which are capable of GPU accelerated operations,
|
| 281 |
+
254 which may particularly be of benefit when you take account for the elimination of a handoff step
|
| 282 |
+
255 between main and GPU memory to implement training. Although the Pandas aspects of Automunge
|
| 283 |
+
256 are CPU bound, the range of auto ML libraries incorporated are in some cases capable of GPU
|
| 284 |
+
257 training for ML infill.
|
| 285 |
+
258 There will always be a simplicity advantage to deep learning libraries like Tensorflow [26] or PyTorch
|
| 286 |
+
259 [27] which can integrate preprocessing as a layer directly into a model’s architecture, eliminating the
|
| 287 |
+
260 need to consider preprocessing in inference. We believe the single added inference step of passing
|
| 288 |
+
261 data to the postmunge(.) function is an acceptable tradeoff because by keeping the preprocessing
|
| 289 |
+
262 operations separate it facilitates a ML framework agnostic tabular preprocessing platform.
|
| 290 |
+
|
| 291 |
+
# 263 6 Experiments
|
| 292 |
+
|
| 293 |
+
264 Some experiments were performed to evaluate efficacy of a few different imputation methods in
|
| 294 |
+
265 different scenarios of missing data. To amplify the impact of imputations, each of two data sets
|
| 295 |
+
266 were pared down to a reduced set of the top 15 features based on an Automunge feature importance
|
| 296 |
+
267 evaluation [11] by shuffle permutation [28]. (This step had the side benefit of reducing the training
|
| 297 |
+
268 durations of experiments.) The top ranked importance categoric and numeric features were selected
|
| 298 |
+
269 to separately serve as targets for injections of missing data, with such injections simulating scenarios
|
| 299 |
+
270 of both missing at random and missing not at random.
|
| 300 |
+
271 To simulate cases of missing not at random, and also again to amplify the impact of imputation, the
|
| 301 |
+
272 target features were evaluated to determine the most influential segments of the features’ distributions
|
| 302 |
+
3 [29], which for the target categoric features was one of the activations and for the target numeric
|
| 303 |
+
4 features turned out to be the far right tail for both benchmark data sets.
|
| 304 |
+
75 Further variations were aggregated associated with either the ratio of full feature or ratio of distribution
|
| 305 |
+
76 segments injected with missing data, ranging from no injections to full replacement.
|
| 306 |
+
|
| 307 |
+
Finally, for each of these scenarios, variations were assembled associated with the type of infill applied by Automunge, including scenarios for defaults (mean imputation for numeric or distinct activations for categoric), imputation with mode, adjacent cell, and ML infill. The ML infill scenario was applied making use of the CatBoost library to take advantage of GPU acceleration.
|
| 308 |
+
|
| 309 |
+
Having prepared the data in each of these scenarios with an automunge(.) call, the final step was to train a downstream model to evaluate impact, again here with the CatBoost library. The performance metric applied was root mean squared error for the regression applications. Each scenario was repeated 68 or more times with the metrics averaged to de-noise the results.
|
| 310 |
+
|
| 311 |
+
Finally, the ML infill scenarios were repeated again with the addition of the NArw support columns to supplement the target features.
|
| 312 |
+
|
| 313 |
+
# 7 Results
|
| 314 |
+
|
| 315 |
+
The results of the various scenarios are presented [Fig 2, 3, 4, 5]. Here the y axis are the performance metrics and the x axis the ratio of entries with missing data injections, which were given as $\{ 0 , 0 . 1$ , 0.33, 0.67, 1.0}, where in the 0.0 case no missing data was injected and with 1.0 the entire feature or feature segment was injected. Because the 0.0 cases had equivalent entries between infill types, their spread across the four infill scenarios are a good approximation for the noise inherent in the learning algorithm. An additional source of noise for the other ratios was from the stochasticity of injections, with a distinct set for each trial. Consistent with common sense, as the injection ratio was ramped up the trend across infill scenarios was a degradation of the performance metric.
|
| 316 |
+
|
| 317 |
+
296 We did find that with increased repetitions incorporated the spread of the averaged performance
|
| 318 |
+
97 metrics were tightened, leading us to repeat the experiments at increased scale for some improved
|
| 319 |
+
98 statistical significance.
|
| 320 |
+
299 For the missing at random injections [Fig 2, 3], ML infill was at or near top performance across both
|
| 321 |
+
300 data sets, although the spread between imputations was not extremely pronounced. In most of the
|
| 322 |
+
301 setups, mode imputation and adjacent cell trended as reduced performance in comparison to ML infill
|
| 323 |
+
302 or the default imputations (mean for numeric sets and distinct activation set for categoric).
|
| 324 |
+
303 For not at random injections to the right tail of numeric sets [Fig 4], it appears that ML infill had a
|
| 325 |
+
304 pronounced benefit to the Ames Housing data set [30], especially as the injection ratio increased,
|
| 326 |
+
305 and more of an intermediate performance to the Allstate Claims data set [31]. We speculate that ML
|
| 327 |
+
306 infill had some degree of variability across these demonstrations due to correlations (or lack thereof)
|
| 328 |
+
307 between the target feature and the other features, without which ML infill may struggle to establish a
|
| 329 |
+
308 basis for inference. In the final scenario of not at random injections to categoric [Fig 5] we believe
|
| 330 |
+
309 default performed well because it served as a direct replacement for the single missing activation.
|
| 331 |
+
310 An additional comparable series of injections were conducted with ML infill and the added difference
|
| 332 |
+
311 of appending the NArw support columns corresponding to the target columns for injections. Again
|
| 333 |
+
312 these NArw support columns are the boolean integer markers for presence of infill in the corresponding
|
| 334 |
+
313 entries which support the partitioning of sets for ML infill. The expectation was that by using these
|
| 335 |
+
314 markers to signal to the training operation which of the entries were subjected to infill, there would
|
| 336 |
+
315 be some benefit to downstream model performance. For many of the scenarios the visible impact was
|
| 337 |
+
316 that supplementing with the NArw support column improved the ML infill performance, demonstrated
|
| 338 |
+
317 here for missing at random [Fig 6, 7] and missing not at random [Fig 8, 9] with the other imputation
|
| 339 |
+
318 scenarios shown again for context.
|
| 340 |
+
|
| 341 |
+

|
| 342 |
+
|
| 343 |
+

|
| 344 |
+
Figure 2: Missing at Random - Numeric Target Feature
|
| 345 |
+
Figure 3: Missing at Random - Categoric Target Feature
|
| 346 |
+
|
| 347 |
+

|
| 348 |
+
|
| 349 |
+

|
| 350 |
+
Figure 4: Not at Random - Numeric Target Feature
|
| 351 |
+
Figure 5: Not at Random - Categoric Target Feature
|
| 352 |
+
|
| 353 |
+
# 319 8 Discussion
|
| 354 |
+
|
| 355 |
+
320 One of the primary goals of this experiment was to validate the efficacy of ML infill as evidenced
|
| 356 |
+
321 by improvements to downstream model performance. For the Ames Housing benchmark data set,
|
| 357 |
+
322 there was a notable demonstration of ML infill benefiting model performance in the scenario of
|
| 358 |
+
323 the numeric target column with not at random injections at increased injection ratios, and also to
|
| 359 |
+
324 a lesser extent with missing at random injections. We speculate an explanation for this advantage
|
| 360 |
+
325 towards the numeric target columns may partly be attributed to the fact that the downstream model
|
| 361 |
+
326 was also a regression application, so that the other features selected for label correlation may by
|
| 362 |
+
327 proxy have correlations with the target numeric feature. The corollary is that the more mundane
|
| 363 |
+
328 performance of ML infill toward the categoric target columns may be a result of these having less
|
| 364 |
+
329 correspondence with the surrounding features. The fact that even in these cases the ML infill still fell
|
| 365 |
+
330 within noise distribution of the other imputation scenarios we believe presents a reasonable argument
|
| 366 |
+
331 for defaulting to ML infill for tabular learning.
|
| 367 |
+
332 Note that as another argument for defaulting to ML infill as opposed to static imputations is that the
|
| 368 |
+
333 imputation model may serve as a hedge against imperfections in subsequent data streams, particularly
|
| 369 |
+
334 if one of the features experiences downtime in a streaming application for instance.
|
| 370 |
+
335 The other key finding of the experiment was the pronounced benefit to downstream model performance
|
| 371 |
+
336 when including the NArw support column in the returned data set as a supplement to ML infill. This
|
| 372 |
+
337 finding was consistent with our intuition, which was that increased information retention about infill
|
| 373 |
+
338 points should help model performance. Note there is some small tradeoff, as the added training set
|
| 374 |
+
339 dimensionality may increase training time. Another benefit to including NArw support columns may
|
| 375 |
+
340 be for interpretability in inspection of imputations. We recommend including the NArw support
|
| 376 |
+
341 columns for model training based on these findings, with the one caveat that care should be taken to
|
| 377 |
+
342 avoid inclusion in the data leakage scenario where there is some kind of correlation between presence
|
| 378 |
+
343 of missing data and label set properties that won’t be present in production.
|
| 379 |
+
|
| 380 |
+

|
| 381 |
+
|
| 382 |
+

|
| 383 |
+
Figure 6: NArw comparison - Missing at Random - Numeric Target Feature
|
| 384 |
+
Missing at Random - Categoric
|
| 385 |
+
|
| 386 |
+

|
| 387 |
+
Figure 7: NArw comparison - Missing at Random - Categoric Target Feature
|
| 388 |
+
|
| 389 |
+

|
| 390 |
+
Figure 8: NArw comparison - Not at Random - Numeric Target Feature
|
| 391 |
+
t Random-Categoric
|
| 392 |
+
Figure 9: NArw comparison - Not at Random - Categoric Target Feature
|
| 393 |
+
|
| 394 |
+
# 344 9 Conclusion
|
| 395 |
+
|
| 396 |
+
45 Automunge offers a push-button solution to preparing tabular data for ML, with automated data
|
| 397 |
+
46 cleaning operations like normalizations, binarizations, and auto ML derived missing data imputation
|
| 398 |
+
47 aka ML infill. Transformations and imputations are fit to properties of a designated train set, and with
|
| 399 |
+
48 application of automunge(.) a compact dictionary is returned recording transformation parameters
|
| 400 |
+
49 and trained imputation models, which dictionary may then serve as a key for consistently preparing
|
| 401 |
+
50 additional data on the train set basis with postmunge(.).
|
| 402 |
+
351 We hope that these experiments may serve as a kind of validation of defaulting to ML infill with
|
| 403 |
+
352 supplemented NArw support columns in tabular learning for users of the Automunge library, as
|
| 404 |
+
353 even if in our experiments the material benefits towards downstream model performance were not
|
| 405 |
+
354 demonstrated for all target feature scenarios, in other cases there did not appear to be any material
|
| 406 |
+
355 penalty. Note that ML infill can be activated for push-button operation by the automunge(.) parameter
|
| 407 |
+
356 MLinfill True and the NArw support columns included by parameter NArw_marker $\backsimeq$ True. Based
|
| 408 |
+
357 on these findings these two parameter settings are now cast as defaults for the Automunge platform.
|
| 409 |
+
|
| 410 |
+
# 358 Acknowledgments
|
| 411 |
+
|
| 412 |
+
A thank you owed to those facilitators behind Stack Overflow, Python, Numpy, Scipy Stats, PyPI, GitHub, Colaboratory, Anaconda, VSCode, and Jupyter. Special thanks to Scikit-Learn and Pandas.
|
| 413 |
+
|
| 414 |
+
# References
|
| 415 |
+
|
| 416 |
+
362 [1] Daniel J. Stekhoven, Peter Bühlmann. MissForest - nonparametric missing value imputation for mixed-type
|
| 417 |
+
363 data (2011) arXiv:1105.0828
|
| 418 |
+
364 [2] Author(s) (2021) Automunge, GitHub repository (Please see supplemental material)
|
| 419 |
+
365 [3] W. McKinney. Data structures for statistical computing in python. Proceedings of the 9th Python in Science
|
| 420 |
+
366 Conference, pages 51–56, 2010.
|
| 421 |
+
367 [4] L. Breiman. Random Forests. Machine Learning, 45(1), 2001.
|
| 422 |
+
368 [5] Pedregosa et al., Scikit-learn: Machine Learning in Python, JMLR 12, pp. 2825-2830, 2011.
|
| 423 |
+
369 [6] H. Wickham. Tidy data. Journal of Statistical Software, 59(10), 2014.
|
| 424 |
+
370 [7] John Moody. Fast Learning in Multi-Resolution Hierarchies. NIPS Proceedings, 1989
|
| 425 |
+
371 [8] Kilian Weinberger, Anirban Dasgupta, John Langford, Alex Smola, Josh Attenberg. Feature Hashing for
|
| 426 |
+
372 Large Scale Multitask Learning. ICML Proceedings, 2009
|
| 427 |
+
373 [9] Author(s) Hashed Categoric Encodings with Automunge (2020) (Please see preprint in supplemental material)
|
| 428 |
+
374 [10] Author(s) Numeric Encoding Options with Automunge (2020) (Please see preprint in supplemental material)
|
| 429 |
+
375 [11] Author(s) Parsed Categoric Encodings with Automunge (2020) (Please see preprint in supplemental
|
| 430 |
+
376 material)
|
| 431 |
+
377 [12] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, Zbigniew Wojna. Rethinking the Inception
|
| 432 |
+
378 Architecture for Computer Vision. IEEE conference on computer vision and pattern recognition, 2016
|
| 433 |
+
379 [13] Author(s) Specification of Derivations with Automunge (2020) (Please see preprint in supplemental
|
| 434 |
+
380 material)
|
| 435 |
+
381 [14] Stef van Buuren, Karin Groothuis-Oudshoorn. mice: Multivariate Imputation by Chained Equations in R
|
| 436 |
+
382 (2011) https://www.jstatsoft.org/article/view/v045i03
|
| 437 |
+
383 [15] Anna Veronika Dorogush, Vasily Ershov, Andrey Gulin. CatBoost: gradient boosting with categorical
|
| 438 |
+
384 features support (2018) arXiv:1810.11363
|
| 439 |
+
385 [16] Nick Erickson, Jonas Mueller, Alexander Shirkov, Hang Zhang, Pedro Larroy, Mu Li, and Alexander Smola.
|
| 440 |
+
386 AutoGluon-Tabular: Robust and Accurate AutoML for Structured Data (2020) arxiv:2003.06505
|
| 441 |
+
387 [17] Chi Wang, Qingyun Wu, Markus Weimer, Erkang Zhu. FLAML: A Fast and Lightweight AutoML Library
|
| 442 |
+
388 (2019) arXiv:1911.04706
|
| 443 |
+
389 [18] Jinsung Yoon, James Jordon, Mihaela van der Schaar. GAIN: Missing Data Imputation using Generative
|
| 444 |
+
390 Adversarial Nets (2018 International Conference of Machine Learning), arXiv:1806.02920
|
| 445 |
+
391 [19] Yuxuan Zhao, Madeleine Udell. Missing Value Imputation for Mixed Data via Gaussian Copula (KDD
|
| 446 |
+
392 2020), arXiv:1910.12845
|
| 447 |
+
393 [20] K. Mohan, J. Pearl. Graphical Models for Processing Missing Data (2019), arXiv:1801.03583
|
| 448 |
+
394 [21] Olga Troyanskaya, Michael Cantor, Gavin Sherlock, Pat Brown, Trevor Hastie, Robert Tibshirani, David
|
| 449 |
+
395 Botstein and Russ B. Altman. Missing value estimation methods for DNA microarrays, BIOINFORMATICS
|
| 450 |
+
396 Vol. 17 no. 6, 2001 Pages 520-525.
|
| 451 |
+
397 [22] Matei Zaharia, Reynold S. Xin, Patrick Wendell, Tathagata Das, Michael Armbrust, Ankur Dave, Xiangrui
|
| 452 |
+
398 Meng, Josh Rosen, Shivaram Venkataraman, Michael J. Franklin, Ali Ghodsi, Joseph Gonzalez, Scott Shenker,
|
| 453 |
+
399 Ion Stoica. Apache Spark: a unified engine for big data processing. Communications of the ACM, 59(11), 2016
|
| 454 |
+
400 [23] Dask Development Team. Dask: Library for dynamic task scheduling (2016) https://dask.org
|
| 455 |
+
401 [24] Philipp Moritz, Robert Nishihara, Stephanie Wang, Alexey Tumanov, Richard Liaw, Eric Liang, Melih
|
| 456 |
+
402 Elibol, Zongheng Yang, William Paul, Michael I. Jordan, Ion Stoica. Ray: A Distributed Framework for
|
| 457 |
+
403 Emerging AI Applications. 13th USENIX Symposium on Operating Systems Design and Implementation
|
| 458 |
+
404 (2018), arXiv:1712.05889
|
| 459 |
+
|
| 460 |
+
[26] Abadi, Martín, Barham P, Chen J, Chen Z, Davis A, Dean J, et al. Tensorflow: A system for large-scale machine learning. 12th USENIX Symposium on Operating Systems Design and Implementation (2016) p. 265–83.
|
| 461 |
+
[27] Paszke, Adam and Gross, Sam and Massa, Francisco and Lerer, Adam and Bradbury, James and Chanan, Gregory and Killeen, Trevor and Lin, Zeming and Gimelshein, Natalia and Antiga, Luca and Desmaison, Alban and Kopf, Andreas and Yang, Edward and DeVito, Zachary and Raison, Martin and Tejani, Alykhan and Chilamkurthy, Sasank and Steiner, Benoit and Fang, Lu and Bai, Junjie and Chintala, Soumith. PyTorch: An Imperative Style, High-Performance Deep Learning Library. NeurIPS Proceedings, 2019
|
| 462 |
+
[28] Terrence Parr, Kerem Turgutlu, Christopher Csiszar, and Jeremy Howard. Beware default random forest importances. Explained.ai (blog), 2018. https://explained.ai/rf-importance/.
|
| 463 |
+
[29] Author(s) Automunge Influence (2020) (Please see preprint in supplemental material)
|
| 464 |
+
[30] Dean De Cock. Ames, Iowa: Alternative to the Boston Housing Data as an End of Semester Regression Project, Journal of Statistics Education, Volume 19, Number 3 (2011)
|
| 465 |
+
[31] Kaggle: Allstate Claims Severity, https://www.kaggle.com/c/allstate-claims-severity
|
| 466 |
+
|
| 467 |
+
# Checklist
|
| 468 |
+
|
| 469 |
+
1. For all authors...
|
| 470 |
+
|
| 471 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
|
| 472 |
+
(b) Did you describe the limitations of your work? [Yes] Please see discussions in section 5 Related Work
|
| 473 |
+
(c) Did you discuss any potential negative societal impacts of your work? [Yes] A Broader Impacts discussion is provided as Appendix C
|
| 474 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 475 |
+
|
| 476 |
+
2. If you are including theoretical results...
|
| 477 |
+
|
| 478 |
+
(a) Did you state the full set of assumptions of all theoretical results? [N/A] (b) Did you include complete proofs of all theoretical results? [N/A]
|
| 479 |
+
|
| 480 |
+
3. If you ran experiments...
|
| 481 |
+
|
| 482 |
+
(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] Please see jupyter notebooks provided with supplemental material
|
| 483 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] We noted that missing data injections were random for each trial. Performance was evaluated on a $2 5 \%$ validation split. We used hyperparameter defaults for learning.
|
| 484 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] We noted that since scenarios for $0 \%$ injection are comparable between imputation methods, their spread may serve as a proxy for noise inherent in the operation.
|
| 485 |
+
(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)? [No] Our experiments did not require significant compute.
|
| 486 |
+
|
| 487 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 488 |
+
|
| 489 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes]
|
| 490 |
+
(b) Did you mention the license of the assets? [Yes] We note licenses of supporting packages in the read me document included in the github repository folder within the supplemental material.
|
| 491 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [Yes]
|
| 492 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
|
| 493 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
|
| 494 |
+
|
| 495 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 496 |
+
|
| 497 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 498 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 499 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|
md/train/qcjOWDHAc4J/qcjOWDHAc4J.md
ADDED
|
@@ -0,0 +1,561 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Social Processes: Self-Supervised Forecasting of Nonverbal Cues in Social Conversations
|
| 2 |
+
|
| 3 |
+
Anonymous Author(s)
|
| 4 |
+
Affiliation
|
| 5 |
+
Address
|
| 6 |
+
email
|
| 7 |
+
|
| 8 |
+
# Abstract
|
| 9 |
+
|
| 10 |
+
The default paradigm for the forecasting of human behavior in social conversations is characterized by top-down approaches. These involve identifying predictive relationships between low level nonverbal cues and future semantic events of interest (e.g. turn changes, group leaving). A common hurdle however, is the limited availability of labeled data for supervised learning. In this work, we take the first step in the direction of a bottom-up self-supervised approach in the domain. We formulate the task of Social Cue Forecasting to leverage the larger amount of unlabeled low-level behavior cues, and characterize the modeling challenges involved. To address these, we take a meta-learning approach and propose the Social Process (SP) models—socially aware sequence-to-sequence (Seq2Seq) models within the Neural Process (NP) family. SP models learn extractable representations of non-semantic future cues for each participant, while capturing global uncertainty by jointly reasoning about the future for all members of the group. Evaluation on synthesized and real-world behavior data shows that our SP models achieve higher log-likelihood than the NP baselines, and also highlights important considerations for applying such techniques within the domain of social human interactions.
|
| 11 |
+
|
| 12 |
+
# 17 1 Introduction
|
| 13 |
+
|
| 14 |
+
18 Picture a situated interactive agent such as a social robot conversing with a group of people. How
|
| 15 |
+
19 can agents act in such a setting? We sustain conversations spatially and temporally through explicit
|
| 16 |
+
20 behavioral cues—examples include locations of partners, their orientation, gestures, gaze, and floor
|
| 17 |
+
21 control actions [1–3]. Evidence suggests that we employ an anticipation of these and other cues to
|
| 18 |
+
22 navigate daily social interactions [1, 4–8]. Consequently, the ability to forecast the future constitutes
|
| 19 |
+
23 a natural objective towards the realization of machines with social skills. As such, interactive agents
|
| 20 |
+
24 typically contend with uncertainties in inferences surrounding cues [3]. So beyond making real-time
|
| 21 |
+
25 inferences, such systems may achieve more fluid interactions by leveraging the ability to forecast
|
| 22 |
+
26 future states of the conversation [9].
|
| 23 |
+
27 In addition to the development of social agents, behavior forecasting is also of significance in social
|
| 24 |
+
28 psychology, where the focus is on gaining insight into human behavior. Since human-interpretability
|
| 25 |
+
29 is of essence, top-down approaches largely constitute the default paradigm, where specific events of
|
| 26 |
+
30 semantic interest are selected first for consideration and their relationship to potentially predictive cues
|
| 27 |
+
31 are studied in isolation—either in controlled interactions in lab settings, or in subsequent statistical
|
| 28 |
+
32 analyses [10, 11]. Examples of such semantic events include speaker turn transitions [5, 12, 13],
|
| 29 |
+
33 mimicry episodes [14], or the termination of an interaction [9, 15]. However, one hurdle in the
|
| 30 |
+
34 top-down paradigm is limited data. The events (that constitute the labels or the dependent variables)
|
| 31 |
+
35 often occur infrequently over a longer interaction, reducing the effective amount of labeled data. This
|
| 32 |
+
36 precludes the use of neural supervised learning techniques that tend to be data intensive.
|
| 33 |
+
37 In this work, we take an initial step towards a bottom-up approach to forecasting human behavior for
|
| 34 |
+
38 free standing conversational groups. Our guiding motivation is to learn predictive representations of
|
| 35 |
+
39 general future social behavior by utilizing unlabeled streams of low-level behavioral features. We do
|
| 36 |
+
40 this by regressing future sequences of these features from observed sequences of the same features in
|
| 37 |
+
41 a self-supervised manner. We term this task of non-semantic future behavior forecasting as Social
|
| 38 |
+
42 Cue Forecasting (SCF).
|
| 39 |
+
43 Our approach is built on the observation that the social signal [17]—the high-level attitudes and social
|
| 40 |
+
44 meaning transferred in interactions—is already embedded in the low-level cues [18]. To conceptually
|
| 41 |
+
45 illustrate the contrasting top-down and bottom-up approaches on an example task, Figure 1 depicts
|
| 42 |
+
46 an instance of a group leaving event in a naturalistic social conversation. Evidence suggests that
|
| 43 |
+
47 such events can be anticipated from certain preceding rituals [15] reflected in the postural changes of
|
| 44 |
+
48 conversing members [1]. van Doorn [15] built a predictor using 200 instances of group leaving found
|
| 45 |
+
49 in over 90 minutes of mingling interaction and hand-crafted features. In contrast, our bottom-up
|
| 46 |
+
50 approach would entail learning task agnostic representations of future behavior using the entire 90
|
| 47 |
+
51 minutes of data, and then training simpler predictors for group leaving using the learnt representations
|
| 48 |
+
52 as input. The figure also illustrates the complexity of naturalistic interactions where cross-group
|
| 49 |
+
53 social influence exists. In this work we focus on the simpler setting of a single group in a scene.
|
| 50 |
+
54 There are several challenges intrinsic to computationally modeling future behavior in social conversa
|
| 51 |
+
55 tions. The future is intrinsically uncertain, the forecasts for interaction partners are inter-dependent,
|
| 52 |
+
56 and the social dynamics is unique for each grouping of individuals. We address these through the
|
| 53 |
+
57 following contributions:
|
| 54 |
+
|
| 55 |
+

|
| 56 |
+
Figure 1: Conceptual illustration of forecasting approaches on an in-the-wild conversation from the MatchNMingle dataset [16]. a. The top-down approach entails predicting a semantic event or action of interest for the observed window $\mathbf { \mathit { t } _ { \mathrm { o b s } } } : = [ o \bar { 1 } \dots o T ]$ . Here we illustrate group leaving [15]; the circled individual in the center leaves a group in the future. b. In contrast, we propose a bottom-up approach in the social conversation forecasting domain through the task of Social Cue Forecasting. This entails using the non-semantic low-level cues over $\mathbf { \Delta } \mathbf { \mathcal { t } } _ { \mathrm { o b s } }$ to regress the same cues over the future window $\pmb { t } _ { \mathrm { f u t } } : = [ f 1 \ldots f { \bar { T } } ]$ . In this example we depict the cues of head pose (solid normal), body pose (hollow normal), and speaking status (speaker in orange). The hypothetical uncertainty estimates over $\scriptstyle t _ { \mathrm { f u t } }$ are also depicted as shaded spreads.
|
| 57 |
+
|
| 58 |
+
• We formalize the task of SCF. We characertize the modeling challenges involved, and cast the problem into the meta-learning paradigm, allowing for data-efficient generalization to unseen groups at evaluation without learning group-specific models. We propose and evaluate two socially aware Sequence-to-Sequence (Seq2Seq) models within the Neural Process (NP) family [19] for SCF in social conversations. Our method encodes complex social dynamics informative of future group behavior into extractable representations for each individual.
|
| 59 |
+
|
| 60 |
+
65 This paper is organized as follows. In Section 2 we formally define and characterize the task of
|
| 61 |
+
66 SCF. We situate this work within broader literature in Section 3, and review background concepts
|
| 62 |
+
67 in Section 4. We propose the Social Process models in Section 5 and describe our experiments in
|
| 63 |
+
68 Section 6, concluding with a discussion of our findings in Section 7.
|
| 64 |
+
|
| 65 |
+
# 2 Social Cue Forecasting
|
| 66 |
+
|
| 67 |
+
70 The objective of SCF is to predict future behavioral cues of all people involved in a social encounter
|
| 68 |
+
71 given an observed sequence of their behavioral features. More formally, let us denote a window
|
| 69 |
+
72 of observed timesteps as $\begin{array} { r c l } { t _ { \mathrm { o b s } } } & { : = } & { [ o 1 , o 2 , . . . , o T ] } \end{array}$ , and an unobserved future time window as
|
| 70 |
+
73 $\pmb { t } _ { \mathrm { f u t } } : = [ f 1 , f 2 , . . . , \bar { f } T ]$ , $f 1 > o T$ . Note that $\mathbf { \Delta } t _ { \mathrm { f u t } }$ and $\pmb { t } _ { \mathrm { o b s } }$ are typically non-overlapping, can be of
|
| 71 |
+
74 different lengths, and $\mathbf { \Delta } \mathbf { \mathbf { t } } _ { \mathrm { f u t } }$ need not immediately follow $\mathbf { \Delta } \mathbf { t } _ { \mathrm { o b s } }$ . Given a set of $n$ interacting participants,
|
| 72 |
+
75 let us denote their social cues over a $t _ { \mathrm { o b s } }$ and $\mathbf { \Delta } \mathbf { \mathbf { t } } _ { \mathrm { f u t } }$ respectively as
|
| 73 |
+
|
| 74 |
+
$$
|
| 75 |
+
X : = [ b _ { t } ^ { i } ; t \in t _ { \mathrm { o b s } } ] _ { i = 1 } ^ { n } , \quad Y : = [ b _ { t } ^ { i } ; t \in t _ { \mathrm { f u t } } ] _ { i = 1 } ^ { n } .
|
| 76 |
+
$$
|
| 77 |
+
|
| 78 |
+
The vector 76 $ { b _ { t } ^ { i } }$ encapsulates the multimodal cues of interest from participant $i$ at time $t$ . These can 77 include head and body pose, speaking status, facial expressions, gestures, and verbal content—any 78 information stream that combine to transfer social meaning.
|
| 79 |
+
|
| 80 |
+
79 In its simplest form, given an $\boldsymbol { X }$ , the objective of SCF is to learn a single function $f$ such that
|
| 81 |
+
80 $Y = f ( X )$ . However, an inherent challenge in forecasting behavior is that an observed sequence
|
| 82 |
+
81 of interaction does not have a deterministic future and can result in multiple socially valid ones—a
|
| 83 |
+
82 window of overlapping speech between people both may and may not result in a change of speaker
|
| 84 |
+
83 [12, 20], a change in head orientation may continue into a sweeping glance across the room or a darting
|
| 85 |
+
84 glance stopping at a recipient of interest [21]. In some cases certain observed behaviors—intonation
|
| 86 |
+
85 and gaze cues [5, 13] or synchronization in speaker-listener speech [22] for turn-taking—might
|
| 87 |
+
86 make some outcomes more likely than others. Given that there are both supporting and challenging
|
| 88 |
+
87 arguments for how these observations influence subsequent behaviors [22, p. 5; 13, p. 22], it would
|
| 89 |
+
88 be beneficial if a data-driven model expresses a measure of uncertainty in its forecasts. We do this by
|
| 90 |
+
89 modeling the distribution over possible futures $p ( \mathbf { { Y } } | \boldsymbol { { X } } )$ rather than forecasting a single future.
|
| 91 |
+
90 Another design consideration arises from a defining characteristic of focused interactions—the
|
| 92 |
+
91 participants’ behaviors are interdependent. Participants in a group sustain equal access to the shared
|
| 93 |
+
92 interaction space through cooperative maneuvering [1, p. 220]. Moreover, when multiple groups
|
| 94 |
+
93 are co-located, outsiders unengaged in these intra-group maneuvers may also influence the behavior
|
| 95 |
+
94 of those within the group [23, p. 91;1, p. 233], sometimes causing them to leave (see Figure 1). It
|
| 96 |
+
95 is therefore essential to capture uncertainty in forecasts at the global level—jointly forecasting one
|
| 97 |
+
96 future for all participants at a time, rather than at a local output level—one future for each individual
|
| 98 |
+
97 independent of the remaining participants’ futures.
|
| 99 |
+
98 How participants coordinate their behaviors is a function of several individual factors [24, Chap. 1; 1,
|
| 100 |
+
99 p. 237]. Consequently, the social dynamics guiding an interaction also has unique attributes for every
|
| 101 |
+
100 unique grouping of individuals. Rather than learning group-specific models to capture these unique
|
| 102 |
+
101 dynamics, we formulate the forecasting problem in terms of meta-learning, or few-shot function
|
| 103 |
+
102 estimation. We interpret each unique group of individuals as the meta-learning notion of a task. The
|
| 104 |
+
103 core idea is that we can learn to predict a distribution over futures for a target sequence $\boldsymbol { X }$ having
|
| 105 |
+
104 captured the group’s unique behavioral tendencies from a context set $C$ of their observed-future
|
| 106 |
+
105 sequences. We can then generalize to unseen groups at evaluation by conditioning on a short observed
|
| 107 |
+
106 slice of their interaction. We believe that this approach is especially suitable for social conversation
|
| 108 |
+
107 forecasting—a setting that involves a limited data regime where good uncertainty estimates are
|
| 109 |
+
108 desirable. Note that when conditioning on context is removed $C = \varnothing$ ), we simply revert to the
|
| 110 |
+
109 formulation $p ( \mathbf { { Y } } | \boldsymbol { { X } } )$ .
|
| 111 |
+
|
| 112 |
+
# 110 3 Related Work
|
| 113 |
+
|
| 114 |
+
111 Free-standing conversations are an example of what social scientists call focused interactions, said to
|
| 115 |
+
112 arise when a “group of persons gather close together and openly cooperate to sustain a single focus
|
| 116 |
+
113 of attention, typically by taking turns at talking” [23, p. 24]. A long-standing topic of study has been
|
| 117 |
+
114 the systematic organization of turn-taking [25–27], with a particular interest in the event of upcoming
|
| 118 |
+
115 speaking turns [5–8]. There has also been some interest in the forecasting task itself, to anticipate
|
| 119 |
+
116 disengagement from an interaction [9, 15], the splitting or merging of groups [28], the time-evolving
|
| 120 |
+
117 size of a group [29] or semantic social action labels [30, 31]. Most of these works use heuristics,
|
| 121 |
+
118 either to generate semantic labels [9], model the dynamics itself [29], or hand-craft features [15].
|
| 122 |
+
119 Although not a forecasting task, the closest work that shares our motivation in predicting non-semantic
|
| 123 |
+
120 low-level features is the recently introduced task of Social Signal Prediction (SSP) [32]. The objective
|
| 124 |
+
121 is to predict the social cues1 of a target person using cues from the communication partners as
|
| 125 |
+
122 input (Joo et al. focus on predictions within the same time window [32, Eq. 6]). While the most
|
| 126 |
+
123 general formulation of SSP involves forecasting a single timestep for a target person given the
|
| 127 |
+
124 entire group’s past behavior [32, Eq. 3], generalizing this formulation runs into an inherent problem;
|
| 128 |
+
125 applying the definition to forecasting entails iteratively treating each individual as target, learning
|
| 129 |
+
126 separate functions for every person. However, as we discuss in Section 2, these futures of interacting
|
| 130 |
+
127 individuals are not independent given observed group behavior. Furthermore, a constrained definition
|
| 131 |
+
128 of forecasting that predicts an immediate step into the future is limiting, since forecasting an event
|
| 132 |
+
129 that occurs after a delay (e.g. a time lagged synchrony [33] or mimicry [14] episode) might be of
|
| 133 |
+
130 interest. Operationalizing this definition would entail a sliding window iteratively using predictions
|
| 134 |
+
131 over the offset between $t _ { \mathrm { o b s } }$ and $\pmb { t } _ { \mathrm { f u t } }$ as input, which would cascade prediction errors.
|
| 135 |
+
132 A related social setting where forecasting has been of interest is that of unfocused interactions. These
|
| 136 |
+
133 occur when individuals find themselves by circumstance in the immediate presence of each other,
|
| 137 |
+
134 such as pedestrians walking in proximity. Early approaches for forecasting pedestrian trajectories
|
| 138 |
+
135 were heuristic based, involving hand-crafted energy potentials to describe the influence pedestrians
|
| 139 |
+
136 have on each other [34–41]. More recent approaches encode the relative positional information
|
| 140 |
+
137 directly into a neural architecture [42–46].
|
| 141 |
+
138 In a broad sense, the self-supervised learning aspects of this work has some overlap with recent
|
| 142 |
+
139 approaches focusing on the non-interaction task of visual forecasting. These works have taken a
|
| 143 |
+
140 non-semantic approach to predict low level pixel-based features or intermediate representations
|
| 144 |
+
141 [38, 47–52], and demonstrated a utility of the learned representation for other tasks like semi
|
| 145 |
+
142 supervised classification [53], or training agents in immersive environments [54].
|
| 146 |
+
|
| 147 |
+
# 143 4 Preliminaries
|
| 148 |
+
|
| 149 |
+
144 Meta-learning. A supervised learning algorithm can be viewed as a function mapping a dataset
|
| 150 |
+
145 $C : = ( X _ { C } , \bar { Y _ { C } } ) : = \{ ( \bar { { \bf x } } _ { i } , { \bf y } _ { i } ) \} _ { i \in [ N _ { C } ] }$ to a predictor $f ( { \pmb x } )$ . Here $N _ { C }$ is the number of datapoints in
|
| 151 |
+
146 $C$ , and $[ N _ { C } ] : = \{ 1 , \dots , N _ { C } \}$ . The key idea of meta-learning is to learn the learning process itself,
|
| 152 |
+
147 modeling this function representing the initial algorithm using another supervised learning algorithm;
|
| 153 |
+
148 hence the name meta-learning. In meta-learning literature, a task refers to each dataset in a collection
|
| 154 |
+
149 $\mathcal { M } : = \{ \mathcal { T } _ { i } \} _ { i = 1 } ^ { N _ { \mathrm { t a s k s } } }$ of related datasets [55]. For each task $\tau$ , a meta-learner is episodically trained
|
| 155 |
+
150 to fit a subset of target points $D : = ( X , Y ) : = \{ ( { \pmb x } _ { i } , { \pmb y } _ { i } ) \} _ { i \in [ N _ { D } ] }$ given another subset of context
|
| 156 |
+
151 observations $C$ . At meta-test time, the resulting predictor $f ( \pmb { x } , C )$ uses the information obtained
|
| 157 |
+
152 during meta-learning to make predictions for unseen target points conditioned on context sets unseen
|
| 158 |
+
153 at meta-training.
|
| 159 |
+
154 Neural Processes Sharing the same core motivations, NPs are a family of latent variable models
|
| 160 |
+
155 that extend the idea of meta-learning to situations where uncertainty in the predictions $f ( \pmb { x } , C )$ are
|
| 161 |
+
156 desirable. They do this by meta-learning a map from datasets to stochastic processes, estimating a
|
| 162 |
+
157 distribution over the predictions $p ( { \boldsymbol { Y } } | { \boldsymbol { X } } , { \boldsymbol { C } } )$ . To capture this distribution, NPs model the conditional
|
| 163 |
+
158 latent distribution $p ( z | C )$ from which a task representation $z \in \mathbb { R } ^ { d }$ is sampled. This constitutes
|
| 164 |
+
159 the model’s latent path. The context can also be incorporated through a deterministic path, via a
|
| 165 |
+
160 representation $r _ { C } \in \mathbb { R } ^ { d }$ aggregated over $C$ . An observation model $p ( \pmb { y } _ { i } | \pmb { x } _ { i } , \pmb { r } _ { C } , \pmb { z } )$ then fits the target
|
| 166 |
+
161 observations in $D$ . The generative process for the NP is written as
|
| 167 |
+
|
| 168 |
+
$$
|
| 169 |
+
p ( { \pmb Y } | { \pmb X } , { \pmb C } ) : = \int p ( { \pmb Y } | { \pmb X } , { \pmb C } , { \pmb z } ) p ( { \pmb z } | { \pmb C } ) d { \pmb z } = \int p ( { \pmb Y } | { \pmb X } , { \pmb r } _ { C } , { \pmb z } ) q ( { \pmb z } | s _ { C } ) d { \pmb z } ,
|
| 170 |
+
$$
|
| 171 |
+
|
| 172 |
+
162 where $\begin{array} { r } { p ( { \pmb Y } | { \pmb X } , { \pmb r } _ { C } , z ) : = \prod _ { i \in [ N _ { D } ] } p ( { \pmb y } _ { i } | { \pmb x } _ { i } , { \pmb r } _ { C } , z ) } \end{array}$ . The latent $_ z$ is modeled by a factorized Gaussian
|
| 173 |
+
163 parameterized by $\bullet _ { C } : = f _ { s } ( C )$ , with $f _ { s }$ being a deterministic function invariant to order permutation
|
| 174 |
+
164 over $C$ . When the conditioning on context is removed $C = \varnothing$ ), we have $q ( z | s _ { \emptyset } ) : \bar { = } p ( z )$ , the
|
| 175 |
+
165 zero-information prior on $_ { z }$ . $C$ is encoded on the deterministic path using a function $f _ { r }$ similar to
|
| 176 |
+
166 $f _ { s }$ , so that $\pmb { r } _ { C } : = f _ { r } ( C )$ . In practice this is implemented as $\textstyle { \pmb r } _ { C } \doteq \sum _ { i \in [ N _ { C } ] } \operatorname { M L P } ( { \pmb x } _ { i } , { \pmb y } _ { i } ) / N _ { C }$ . The
|
| 177 |
+
167 observation model is referred to as the decoder, and $q , f _ { r } , f _ { s }$ comprise the encoders. The parameters
|
| 178 |
+
168 of the NP are learned for random subsets $C$ and $D$ by maximizing the evidence lower bound (ELBO)
|
| 179 |
+
|
| 180 |
+

|
| 181 |
+
Figure 2: Architecture of the SP and ASP family.
|
| 182 |
+
|
| 183 |
+
# 169 5 Social Processes
|
| 184 |
+
|
| 185 |
+
170 In this section we present our socially aware Seq2Seq models within the NP family that is agnostic to
|
| 186 |
+
171 group member identities and group size. To setup the task, we split the contextual interaction on which
|
| 187 |
+
172 we condition into pairs of observed and future sequences, writing the context as $C : = ( X _ { C } , Y _ { C } ) : =$
|
| 188 |
+
173 $( X _ { j } , Y _ { k } ) _ { ( j , k ) \in [ N _ { C } ] \times [ N _ { C } ] }$ , where every $X _ { j }$ occurs before the corresponding $Y _ { k }$ . As discussed in
|
| 189 |
+
174 Section 3, domain experts focusing on behavior analysis might be interested in settings where $t _ { \mathrm { o b s } }$
|
| 190 |
+
175 and $\mathbf { \Delta } t _ { \mathrm { f u t } }$ are offset by an arbitrary delay. Consequently, the $j$ th $t _ { \mathrm { o b s } }$ can have multiple associated $\mathbf { \Delta } \mathbf { \mathbf { { t } } } _ { \mathrm { { f u t } } }$
|
| 191 |
+
176 windows. Denoting the set of target window pairs as $D : = ( X , Y ) : = ( X _ { j } , Y _ { k } ) _ { ( j , k ) \in [ N _ { D } ] \times [ N _ { D } ] }$ , our
|
| 192 |
+
177 focus in the rest of this work is to model the distribution $p ( { \boldsymbol { Y } } | { \boldsymbol { X } } , { \boldsymbol { C } } )$ .
|
| 193 |
+
178 The generative process for our model we call the Social Process (SP) follows Eq. 2, which we
|
| 194 |
+
179 extend to social forecasting in two ways. We embed an observed sequence $_ { \textbf { \em x } }$ for an individual
|
| 195 |
+
180 into a condensed encoding $\mathbf { \bar { \boldsymbol { e } } } \in \mathbb { R } ^ { d }$ that is then decoded into the future sequence using a Seq2Seq
|
| 196 |
+
181 architecture [56, 57]. Our intuition is that this would cause the representation to encode temporal
|
| 197 |
+
182 information about the future. Further, for every individual we model this $e$ as a function of their own
|
| 198 |
+
183 behavior, and that of their partners as viewed by them. The intuition is that this captures the spatial
|
| 199 |
+
184 influence partners have on the participant over the $t _ { \mathrm { o b s } }$ . Using notation we established in Section 2,
|
| 200 |
+
185 we define the observation model for the SP for a single participant $\mathrm { p } _ { i }$ as
|
| 201 |
+
|
| 202 |
+
$$
|
| 203 |
+
p ( \pmb { y } ^ { i } | \pmb { x } ^ { i } , C , z ) : = p ( \pmb { b } _ { f 1 } ^ { i } , \ldots , \pmb { b } _ { f T } ^ { i } | \pmb { b } _ { o 1 } ^ { i } , \ldots , \pmb { b } _ { o T } ^ { i } , C , z ) = p ( \pmb { b } _ { f 1 } ^ { i } , \ldots , \pmb { b } _ { f T } ^ { i } | \pmb { e } ^ { i } , \pmb { r } _ { C } , z ) .
|
| 204 |
+
$$
|
| 205 |
+
|
| 206 |
+
186 If decoding is carried out in an auto-regressive manner, we can further write the right hand side of
|
| 207 |
+
187 Eq. 4 as $\begin{array} { r } { \dot { \prod _ { t = f 1 } ^ { f T } } p ( b _ { t } ^ { i } | b _ { t - 1 } ^ { i } , \dots , b _ { f 1 } ^ { i } , e ^ { i } , r _ { C } , z ) } \end{array}$ . Following the standard NP setting, we implement the
|
| 208 |
+
188 observation model as a set of Gaussian distributions factorized over time and feature dimensions.
|
| 209 |
+
189 We also incorporate the cross-attention mechanism from the Attentive Neural Process (ANP) [58] to
|
| 210 |
+
190 define the variant Attentive Social Process (ASP). Following Eq. 4 and the definition of the ANP, the
|
| 211 |
+
191 corresponding observation model of the ASP for a single participant is defined as
|
| 212 |
+
|
| 213 |
+
$$
|
| 214 |
+
p ( \pmb { y } ^ { i } | \pmb { x } ^ { i } , C , z ) = p ( b _ { f 1 } ^ { i } , \ldots , b _ { f T } ^ { i } | \pmb { e } ^ { i } , r ^ { * } ( C , \pmb { x } ^ { i } ) , z ) .
|
| 215 |
+
$$
|
| 216 |
+
|
| 217 |
+
92 Here each target query sequence $\pmb { x } _ { \ast } ^ { i }$ attends to the context sequences $X _ { C }$ to produce a query-specific
|
| 218 |
+
93 representation $r _ { * } : = r ^ { * } ( C , \pmb { x } _ { * } ^ { i } ) \in \mathbb { R } ^ { d }$ . The model architectures are illustrated in Figure 2.
|
| 219 |
+
194 Encoding Partner Behavior. While a typical Seq2Seq setup conditions the sequence decoder on
|
| 220 |
+
195 solely a compact representation of the observed sequence, we’d like to condition an individual’s
|
| 221 |
+
196 forecast on the observed behavior of both, themselves and their partners. We do this using a pair
|
| 222 |
+
197 of sequence encoders: one to encode the temporal dynamics of participant $\mathrm { p } _ { i }$ ’s features, $\bar { e } _ { \mathrm { s e l f } } ^ { i } =$
|
| 223 |
+
198 $f _ { \mathrm { s e l f } } ( \mathbf { \bar { x } } _ { i } )$ , and another to encode the dynamics of a transformed representation of the features of $\mathrm { p } _ { i }$ ’s
|
| 224 |
+
199 partners, $e _ { \mathrm { p a r t n e r } } ^ { i } = f _ { \mathrm { p a r t n e r } } ( \psi ( \pmb { x } _ { j , ( j \neq i ) } ) )$ . Using a separate network to encode partner behavior
|
| 225 |
+
200 grants the practical advantage of being able to sample an individual’s and partners’ features at different
|
| 226 |
+
201 sampling rates.
|
| 227 |
+
202 How do we model $\psi ( \pmb { x } _ { j } )$ ? We want the partners’ representation to possess two properties: per
|
| 228 |
+
203 mutation invariance—changing the order of the partners should not affect the representation; and
|
| 229 |
+
204 group size independence—we want to compactly represent all partners independent of the group size.
|
| 230 |
+
205 Beyond coordinate space invariance, we wish to intuitively capture a view of the interaction from
|
| 231 |
+
206 $\mathrm { p } _ { i }$ ’s perspective. We extend the approach Qi et al. [59] applied to point clouds to focused interactions
|
| 232 |
+
207 by computing pooled embeddings of relative behavioral features. Since most commonly considered
|
| 233 |
+
208 nonverbal cues in literature (see Section 6.3) include the attributes of orientation or location (e.g.
|
| 234 |
+
209 head/body pose or keypoints) or a binary indicator (such as speaking status), we specify how we
|
| 235 |
+
210 transform these. The 3D pose (orientation, location) of every partner $\mathrm { p } _ { j }$ is transformed to a frame of
|
| 236 |
+
211 reference defined by $\mathrm { p } _ { i }$ ’s pose. At timestep $t$ , denoting orientation, location, and binary speaking
|
| 237 |
+
212 status for $\mathrm { p } _ { i }$ as $b _ { t } ^ { i } = [ \mathbf { q } ^ { i } ; \mathbf { l } ^ { i } ; \mathbf { s } ^ { i } ]$ , and those for $\mathrm { p } _ { j }$ as $\mathbf { } b _ { t } ^ { j } = [ \mathbf { q } ^ { j } ; \mathbf { l } ^ { j } ; \mathbf { s } ^ { j } ]$ , we have
|
| 238 |
+
|
| 239 |
+
$$
|
| 240 |
+
\mathbf { q } ^ { r e l } = \mathbf { q } ^ { i } * ( \mathbf { q } ^ { j } ) ^ { - 1 } , \quad \mathbf { l } ^ { r e l } = \mathbf { l } ^ { j } - \mathbf { l } ^ { i } , \quad \mathbf { s } ^ { r e l } = \mathbf { s } ^ { j } - \mathbf { s } ^ { i } .
|
| 241 |
+
$$
|
| 242 |
+
|
| 243 |
+
213 Note that we use unit quaternions (denoted $\mathbf { q }$ ) for representing orientation due their various benefits
|
| 244 |
+
214 over other representations of rotation [60, Sec. 3.2]. The operator $^ *$ denotes the Hamilton product of
|
| 245 |
+
215 the quaternions. These transformed features for each $\mathrm { p } _ { j }$ are encoded using an embedder MLP. The
|
| 246 |
+
216 outputs are concatenated with $e _ { \mathrm { s e l f } } ^ { j }$ and processed by a pre-pooler MLP, which is followed by the
|
| 247 |
+
217 symmetric element-wise Max-pooling function to obtain $\psi ( \pmb { x } ^ { j } )$ at each timestep. We capture the
|
| 248 |
+
218 dynamics in the pooled representation over $t _ { \mathrm { o b s } }$ using $f _ { \mathrm { p a r t n e r } }$ . Finally, we combine $e _ { \mathrm { s e l f } } ^ { i }$ and $e _ { \mathrm { p a r t n e r } } ^ { i }$
|
| 249 |
+
219 for $\mathrm { p } _ { i }$ through a linear projection (defined by a weight matrix $W$ ) to obtain the individual’s embedding
|
| 250 |
+
220 $e _ { \mathrm { i n d } } ^ { i } = W . [ \bar { e } _ { \mathrm { s e l f } } ^ { i } ; e _ { \mathrm { p a r t n e r } } ^ { i } ]$ . Our intuition is that with information about both $\mathrm { p } _ { i }$ themselves, and of
|
| 251 |
+
221 $\mathrm { p } _ { i }$ ’s partners from $\mathrm { p } _ { i }$ ’s point-of-view, $e _ { \mathrm { i n d } } ^ { i }$ now contains the information required to predict $\mathrm { p } _ { i }$ ’s
|
| 252 |
+
222 future behavior.
|
| 253 |
+
223 Encoding Future Window Offset. As we’ve discussed at the start of this section, a single $t _ { \mathrm { o b s } }$
|
| 254 |
+
224 might have multiple associated $\mathbf { \Delta } \mathbf { \mathbf { \mathit { t } } _ { \mathrm { f u t } } }$ windows at different offsets. Our intuition is that training a
|
| 255 |
+
225 sequence decoder to decode the same $e _ { \mathrm { i n d } } ^ { i }$ into multiple sequences (corresponding to the multiple
|
| 256 |
+
226 $\pmb { t } _ { \mathrm { f u t } } )$ ) in the absence of any timing information might cause an averaging effect in either the decoder
|
| 257 |
+
227 or the information encoded in $e _ { \mathrm { i n d } } ^ { \bar { i } }$ . One way around this would be to start decoding one timestep
|
| 258 |
+
228 following the end of $t _ { \mathrm { o b s } }$ and discard the predictions in the gap between $t _ { \mathrm { o b s } }$ and $\mathbf { \Delta } t _ { \mathrm { f u t } }$ . However,
|
| 259 |
+
229 if decoding is done auto-regressively this might lead to cascading errors over the gap. Instead, we
|
| 260 |
+
230 address this one-to-many issue by injecting the offset information into $e _ { \mathrm { i n d } } ^ { i }$ so that the decoder
|
| 261 |
+
231 receives a unique encoded representation for every $\mathbf { \Delta } \mathbf { \mathbf { t } } _ { \mathrm { f u t } }$ to decode over. We do this by repurposing
|
| 262 |
+
232 the idea of sinusoidal positional encodings [61] to encode offsets rather than relative positions in
|
| 263 |
+
233 sequences. For a given $\mathbf { \Delta } \mathbf { t } _ { \mathrm { o b s } }$ and $\mathbf { \Delta } \mathbf { \mathbf { \mathit { t } } _ { \mathrm { f u t } } }$ , and $d _ { e }$ -dimensional $e _ { \mathrm { i n d } } ^ { i }$ we define the offset as $\Delta t = f 1 - o T$
|
| 264 |
+
234 and the corresponding offset encoding $O E _ { \Delta t }$ as
|
| 265 |
+
|
| 266 |
+
$$
|
| 267 |
+
O E _ { ( \Delta t , 2 m ) } = \sin ( \Delta t / 1 0 0 0 0 ^ { 2 m / d _ { c } } ) , \quad O E _ { ( \Delta t , 2 m + 1 ) } = \cos ( \Delta t / 1 0 0 0 0 ^ { 2 m / d _ { c } } ) .
|
| 268 |
+
$$
|
| 269 |
+
|
| 270 |
+
Here 235 $m$ refers to the dimension index in the encoding. We finally compute the representation $e ^ { i }$ for 236 Eqs. 4 and 5 as
|
| 271 |
+
|
| 272 |
+
$$
|
| 273 |
+
e ^ { i } = e _ { \mathrm { i n d } } ^ { i } + O E _ { \Delta t } .
|
| 274 |
+
$$
|
| 275 |
+
|
| 276 |
+
237 Auxiliary Loss Functions. We incorporate a geometric loss function that improves performance in
|
| 277 |
+
238 pose regression tasks. For $\mathrm { p } _ { i }$ at time $t$ , given the ground truth $b _ { t } ^ { i } = [ \mathbf { q } ; 1 ; \mathrm { s } ]$ , and the predicted mean
|
| 278 |
+
239 $\hat { b } _ { t } ^ { i } = [ \hat { \mathbf { q } } ; \hat { \mathbf { l } } ; \hat { \mathbf { s } } ]$ , we denote the tuple $( b _ { t } ^ { i } , b _ { t } ^ { i } )$ as $B _ { t } ^ { i }$ . We then have the location loss in Eucliden space
|
| 279 |
+
240 $\mathcal { L } _ { 1 } ( B _ { t } ^ { i } ) = \left. \mathbf { l } - \hat { \mathbf { l } } \right.$ , and we can regress the quaternion values using
|
| 280 |
+
|
| 281 |
+
$$
|
| 282 |
+
\mathcal { L } _ { \mathrm { q } } ( B _ { t } ^ { i } ) = \left\| \mathbf { q } - \frac { \hat { \mathbf { q } } } { \| \hat { \mathbf { q } } \| } \right\| .
|
| 283 |
+
$$
|
| 284 |
+
|
| 285 |
+
241 Kendall and Cipolla [60] show how these losses can be combined using the homoscedastic uncertainties in position and orientation, 242 $\hat { \sigma } _ { 1 } ^ { 2 }$ and $\hat { \sigma } _ { \mathrm { q } } ^ { 2 }$ :
|
| 286 |
+
|
| 287 |
+
$$
|
| 288 |
+
\mathcal { L } _ { \sigma } ( B _ { t } ^ { i } ) = \mathcal { L } _ { 1 } ( B _ { t } ^ { i } ) \exp ( - \hat { s } _ { 1 } ) + \hat { s } _ { 1 } + \mathcal { L } _ { \boldsymbol { \mathrm { q } } } ( B _ { t } ^ { i } ) \exp ( - \hat { s } _ { \mathrm { q } } ) + \hat { s } _ { \boldsymbol { \mathrm { q } } } ,
|
| 289 |
+
$$
|
| 290 |
+
|
| 291 |
+
where 243 $\hat { s } : = \log \hat { \sigma } ^ { 2 }$ . Using the binary cross-entropy loss for speaking status $\mathcal { L } _ { \mathrm { s } } ( B _ { t } ^ { i } )$ , we have the 244 overall auxiliary loss over $t \in { \pmb t } _ { \mathrm { f u t } }$ :
|
| 292 |
+
|
| 293 |
+
$$
|
| 294 |
+
\mathcal { L } _ { \mathrm { a u x } } ( \boldsymbol { Y } , \hat { \boldsymbol { Y } } ) = \sum _ { i } \sum _ { t } \mathcal { L } _ { \sigma } ( B _ { t } ^ { i } ) + \mathcal { L } _ { \mathrm { s } } ( B _ { t } ^ { i } ) .
|
| 295 |
+
$$
|
| 296 |
+
|
| 297 |
+
245 The parameters of the SP and ASP are trained by maximizing the ELBO in Eq. 3 and minimizing this
|
| 298 |
+
246 auxiliary loss function for each of our sequence decoders.
|
| 299 |
+
|
| 300 |
+

|
| 301 |
+
Figure 3: Ground truths and model predictions for the toy task simulating the forecasting of glancing behavior.
|
| 302 |
+
|
| 303 |
+
Table 1: Mean (Std.) Negative LogLikelihood (NLL) on the Haggling Test Sets. The reported mean and std. are over individual sequences in the test sets. Lower is better. The superscript ⇤ indicates best NLL within family, boldface best overall.
|
| 304 |
+
|
| 305 |
+
<table><tr><td rowspan="2"></td><td colspan="2">Context</td></tr><tr><td>Random</td><td>Fixed-Initial</td></tr><tr><td>Baselines</td><td></td><td></td></tr><tr><td>NP-latent</td><td>38.34 (19.1)</td><td>37.64 (18.1)</td></tr><tr><td>NP-latent+det</td><td>40.41 (23.9)</td><td>40.15 (23.0)</td></tr><tr><td>ANP-dot</td><td>35.66* (20.8)</td><td>38.06* (20.6)</td></tr><tr><td>ANP-multihead</td><td>40.60 (19.2)</td><td>41.11 (19.2)</td></tr><tr><td>Ours (MLP)</td><td></td><td></td></tr><tr><td>SP-latent</td><td>-74.06 (6.0)</td><td>-74.19 (5.9)</td></tr><tr><td>SP-latent+det</td><td>-77.49 (7.8)</td><td>-76.90 (8.4)</td></tr><tr><td>ASP-dot</td><td>-76.33 (6.5)</td><td>-75.15 (6.5)</td></tr><tr><td>ASP-multihead</td><td>-83.77* (10.3)</td><td>-83.43* (9.7)</td></tr><tr><td>Ours (GRU)</td><td></td><td></td></tr><tr><td>SP-latent</td><td>-4.23 (27.4)</td><td>-3.72 (30.7)</td></tr><tr><td>SP-latent+det</td><td>-17.38* (50.5)</td><td>-16.08* (52.2)</td></tr><tr><td>ASP-dot</td><td>19.91 (46.7)</td><td>31.39 (77.0)</td></tr><tr><td>ASP-multihead</td><td>-7.11 (26.9)</td><td>-0.51 (28.8)</td></tr></table>
|
| 306 |
+
|
| 307 |
+
# 247 6 Experiments and Results
|
| 308 |
+
|
| 309 |
+
# 6.1 Models and Baselines
|
| 310 |
+
|
| 311 |
+
Our modeling assumption is that the underlying stochastic process generating the behaviors does not evolve over time. Stated differently, we assume that the individual factors determining how participants coordinate behaviors—age, cultural background, personality variables [24, Chap. 1; 1, p. 237]—are likely to remain the same over the short duration of a single interaction. This is in contrast to a related line of work that deals with meta-transfer learning, where the stochastic process itself changes over time [62–65]. We therefore compare against the NP and ANP family which share our model assumptions and meta-learning attributes. Note that in contrast to our methods, these baselines have direct access to the future sequences in the context, and therefore constitute a strong baseline. We consider two variants: -latent denoting only the latent path; and -latent+det, containing both deterministic and stochastic paths. We further consider two attention mechanisms for the cross-attention module: -dot with dot attention, and -multihead with wide multi-head attention [58]. We operationalize the original definitions of the baseline models to sequences by collapsing the timestep and feature dimensions. While the ANP-RNN model [66] shares our model assumptions, it is defined for a task analogous to SSP for concurrent car locations, and cannot be operationalized to forecasting in any simple way (see Section 3 discussing the distinction). We experiment with two choices of architectures for the sequence encoders and decoders in our proposed models: multi-layer perceptrons (MLP), and Gated Recurrent Units (GRU). Implementation and training details for our experiments can be found in Appendix C.
|
| 312 |
+
|
| 313 |
+
# 6.2 Evaluation on Synthesized Behavior: Forecasting Glancing Behavior
|
| 314 |
+
|
| 315 |
+
With limited behavioral data availability, a common practice in the domain is to train and evaluate methods on synthesized behavior dynamics [31, 67]. In keeping with this practice, we construct a synthesized dataset simulating two glancing behaviors in social settings [21]. We use a 1D sinusoid to represent horizontal head rotation over 20 timesteps. The sweeping Type I glance is represented by a pristine sinusoid, while the gaze fixating Type III glance is denoted by clipping the amplitude for the last six timesteps. The task is to forecast the signal over the last 10 timesteps $( \pmb { t } _ { \mathrm { f u t } } )$ by observing the first 10 $( \pmb { t } _ { \mathrm { o b s } } )$ . Consequently, the first half of $\mathbf { \delta } _ { t _ { \mathrm { f u t } } }$ is certain, while uncertainty over the last half results from every observed sinusoid having two ground-truths. It is impossible to infer from an observed sequence alone if the head rotation will stop partway through the future. We describe additional data setup, model details, and quantitative results for this setting in Appendices A.1, C and D.1, respectively. Figure 3 illustrates the ground truths, predicted means and std. deviations for a sequence within and outside the context set. We observe that all models estimate the mean reasonably well, although our proposed SP models learn a slightly better fit. More crucially, the SP models—especially the SP-GRU—learn much better uncertainty estimates over the certain and uncertain parts of the future compared to the NP baseline.
|
| 316 |
+
|
| 317 |
+
# 6.3 Real-World Behavior: The Haggling Dataset
|
| 318 |
+
|
| 319 |
+
We also evaluate our models on real-world behavior data, using the Haggling dataset of triadic interactions [32]. Participants are engaged in an unscripted game where two sellers compete to sell a fictional product to a buyer who has to choose between the two. We use the same split of 79 training sets (groups) and 28 test sets used by Joo et al. [32]. In our experiments we consider the following social cues: head pose described by the 3D location of the nose keypoint and a face normal; body pose described by the location of the mid-point of the shoulders and a body normal; and binary speaking status. Apart from being the most commonly considered cues in computational analyses of such conversations [68–70], pose and turn taking are found to be crucial in the sustaining of conversation [1, 12, 18]. We specify the dataset preprocessing details in Appendix D.2.
|
| 320 |
+
|
| 321 |
+
# 6.4 Evaluation
|
| 322 |
+
|
| 323 |
+
Context Regimes. We evaluate all models on two context regimes: random, and fixed-initial. The random regime follows the standard NP setting that the models are trained in. Context samples (sequence-pairs) are selected as a random subset of target samples, so the model is exposed to behaviors from any phase of the interaction lifecycle. Here we ensure that batches contain unique $t _ { \mathrm { o b s } }$ to prevent any single observed sequence from dominating the aggregation of representations over the context split. At evaluation, we take $5 0 \%$ of the batch as context. In the fixed-initial context regime, we investigate how the model can generalize knowledge of group specific characteristics from observing the initial dynamics of an interaction where certain gestures and patterns are more distinctive [1, Chap. 6]. This matches what a social agent might face in a real-world scenario. Here we treat the first $2 0 \%$ of the entire interaction as context, treating sequences from the rest as target.
|
| 324 |
+
|
| 325 |
+
304 Evaluation Metrics. We report the negative log-likelihood (NLL) $- \log p ( \boldsymbol { Y } | \boldsymbol { X } , \boldsymbol { C } )$ in Table 1
|
| 326 |
+
305 (computed by summing over feature dimensions and people, and averaging over timesteps). Beyond
|
| 327 |
+
306 the NLL, we also report the error in the predicted means over test sequences in Table 2: mean-squared
|
| 328 |
+
307 error (MSE) for the head and body keypoint locations; mean absolute error (MAE) in orientation
|
| 329 |
+
308 in degrees; and speaking status accuracy. Note that while the ground truth orientation normals are
|
| 330 |
+
309 constrained in the horizontal plane, we don’t constrain our predicted quaternions. We therefore report
|
| 331 |
+
310 the absolute error in rotation in 3D. The reported mean and std. deviation of all metrics are over
|
| 332 |
+
311 sequences in the test sets. We further report the metrics for every timestep over $\mathbf { \Delta } \mathbf { \mathbf { \mathit { t } } _ { \mathrm { f u t } } }$ in Appendix A.2,
|
| 333 |
+
312 and qualitative visualizations of the forecasts in Appendix B.
|
| 334 |
+
|
| 335 |
+
# 6.5 Ablations
|
| 336 |
+
|
| 337 |
+
Encoding Partner Behavior. Modeling the interaction from the perspective of each individual is a central idea in our apindividual representations $\bar { r } _ { \mathrm { i n d } } ^ { i }$ ch. We investigate the influence of encoding partner behavior intoon the performance. We train the SP-latent+det GRU variant in two configurations: no-pool, where we do not encode any partner behavior; and pool-oT where we pool over partner representations only at the last timestep (similar to [44]). We choose the SP-GRU model since it achieves the best trade-off between minimizing NLL and forecasting cues consistent with human behavior. Both configurations lead to worse NLL and location errors (Appendix A.3).
|
| 338 |
+
|
| 339 |
+
Deterministic Decoding and Social Encoder Sharing. Error gradients can flow back into our sequence encoders through two paths: from the final stochastic sequence decoder, as well as the deterministic decoders on the latent and deterministic paths. We investigate the effect of the deterministic decoders by training the SP-latent+det GRU model without them. We also investigate sharing a single social encoder between the Process Encoder and Process Decoder in Figure 2. We find that removing the decoders only improves log-likelihood if the encoders are shared, and at the cost of head orientation errors (Appendix A.3).
|
| 340 |
+
|
| 341 |
+
Table 2: Mean (Std.) Errors in Predicted Means over Sequences in the Haggling Test Sets. Lower is better for all metrics except for speaking status accuracy. ⇤ indicates best measure within family, boldface best overall.
|
| 342 |
+
|
| 343 |
+
<table><tr><td rowspan="2"></td><td colspan="5">Random Context</td><td colspan="5">Fixed-Initial Context</td></tr><tr><td>Head Loc. MSE (cm)</td><td>Body Loc. MSE (cm)</td><td>Head Ori. MAE()</td><td>Body Ori. MAE()</td><td>Speaking Accuracy</td><td>Head Loc. MSE (cm)</td><td>Body Loc. MSE (cm)</td><td>Head Ori. MAE(°)</td><td>Body Ori. MAE(°)</td><td>Speaking Accuracy</td></tr><tr><td>Baselines</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>NP-latent</td><td>14.21 (6.5)</td><td>15.06 (6.1)</td><td>16.29 (13.8)</td><td>12.82 (13.7)</td><td>0.787 (0.23)</td><td>13.85 (6.1)</td><td>14.71 (5.7)</td><td>16.22 (14.1)</td><td>12.69* (13.9)</td><td>0.774* (0.24)</td></tr><tr><td>NP-latent+det</td><td>15.01 (7.3)</td><td>15.97 (7.2)</td><td>17.45 (18.3)</td><td>14.65 (20.0)</td><td>0.715 (0.24)</td><td>15.01 (7.5)</td><td>15.95 (7.5)</td><td>17.26 (15.9)</td><td>14.68 (18.7)</td><td>0.701 (0.24)</td></tr><tr><td>ANP-dot</td><td>11.86* (5.4)</td><td>12.22* (5.5)</td><td>15.44* (13.3)</td><td>12.56* (18.0)</td><td>0.806* (0.23)</td><td>12.83* (5.9)</td><td>13.26* (6.0)</td><td>16.19* (13.7)</td><td>13.56 (17.8)</td><td>0.717 (0.23)</td></tr><tr><td>ANP-multihead</td><td>16.36 (7.4)</td><td>17.17 (7.2)</td><td>19.41 (20.4)</td><td>16.02 (22.1)</td><td>0.692 (0.21)</td><td>16.68 (7.9)</td><td>17.43 (7.7)</td><td>19.78 (21.2)</td><td>15.57 (20.3)</td><td>0.682 (0.21)</td></tr><tr><td>Ours (MLP)</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>SP-latent</td><td>25.58 (10.1)</td><td>26.57* (9.0)</td><td>91.07 (23.9)</td><td>97.09 (22.5)</td><td>0.638 (0.08)</td><td>25.27 (10.0)</td><td>26.33* (8.9)</td><td>91.14 (23.8)</td><td>97.09 (22.5)</td><td>0.640 (0.09)</td></tr><tr><td>SP-latent+det</td><td>31.99 (8.2)</td><td>36.33 (7.3)</td><td>91.08 (23.9)</td><td>91.36 (23.9)</td><td>0.629 (0.18)</td><td>32.93 (9.4)</td><td>37.16 (8.5)</td><td>91.15 (23.9)</td><td>91.36 (23.9)</td><td>0.633 (0.18)</td></tr><tr><td>ASP-dot</td><td>27.16 (7.7)</td><td>31.19 (7.1)</td><td>90.88 (23.9)</td><td>91.43 (23.8)</td><td>0.704 (0.19)</td><td>27.94 (7.8)</td><td>31.83 (7.1)</td><td>90.93 (23.9)</td><td>91.43 (23.8)</td><td>0.628 (0.20)</td></tr><tr><td>ASP-multihead</td><td>23.88* (7.8)</td><td>27.13 (7.7)</td><td>90.50* (23.9)</td><td>91.04* (24.1)</td><td>0.792* (0.24)</td><td>24.07* (8.1)</td><td>27.35 (8.3)</td><td>90.53* (23.9)</td><td>91.07* (24.1)</td><td>0.770* (0.25)</td></tr><tr><td>Ours (GRU)</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>SP-latent</td><td>17.18 (6.5)</td><td>17.41 (6.2)</td><td>17.76* (15.8)</td><td>14.78* (20.7)</td><td>0.713 (0.23)</td><td>16.66 (6.2)</td><td>17.17 (6.0)</td><td>17.67* (16.0)</td><td>14.64* (20.3)</td><td>0.705 (0.23)</td></tr><tr><td>SP-latent+det</td><td>15.84 (5.5)</td><td>17.76 (7.5)</td><td>20.65 (19.9)</td><td>21.73 (29.5)</td><td>0.671 (0.22)</td><td>16.53* (6.0)</td><td>18.20 (8.0)</td><td>20.74 (19.5)</td><td>21.31 (28.9)</td><td>0.674 (0.22)</td></tr><tr><td>ASP-dot</td><td>22.49 (8.7)</td><td>22.64 (11.1)</td><td>17.99 (12.8)</td><td>15.58 (19.6)</td><td>0.722 (0.25)</td><td>23.66 (8.7)</td><td>24.50 (11.7)</td><td>19.22 (14.8)</td><td>16.82 (19.4)</td><td>0.620 (0.27)</td></tr><tr><td>ASP-multihead</td><td>15.18* (6.7)</td><td>15.01* (6.0)</td><td>24.26 (21.3)</td><td>35.06 (38.5)</td><td>0.778* (0.23)</td><td>16.84 (6.9)</td><td>16.80* (6.3)</td><td>25.37 (21.3)</td><td>35.44 (38.0)</td><td>0.725*(0.23)</td></tr></table>
|
| 344 |
+
|
| 345 |
+
# 328 7 Discussion and Conclusion
|
| 346 |
+
|
| 347 |
+
What qualifies as the best performing model for SCF? Our SP-GRU learns the best fit for synthesized behavior. On the commonly used metric of NLL [19, 58, 62], our SP-MLP models perform the best for real-world data. However, they fare the worst at estimating the mean. On the other hand, the SP-GRU models estimate a better likelihood than the NP baselines with comparable errors in mean forecast. While the NP baselines attain the lowest errors in predicted means, they also achieve the worst NLL. From the qualitative visualizations and ablations, it seems that the models minimize NLL at the cost of orientation errors; in the case of SP-MLP seemingly by predicting the majority orientation of the two sellers who face the same direction. Also, the NP models forecast largely static futures. In contrast, while being more dynamic, the SP-GRU forecasts also contain some smoothing.
|
| 348 |
+
|
| 349 |
+
338 Our synthesized glancing behavior is grounded in social literature, and matches the head pose features
|
| 350 |
+
339 in the real-world data (horizontal orientation). Why do we see a large discrepancy in qualitative
|
| 351 |
+
340 forecasts? One crucial distinction between the synthetic and real data is the subtlety and sparsity
|
| 352 |
+
341 of motion. Our synthesized data makes the common implicit assumption that head pose is a proxy
|
| 353 |
+
342 for gaze [31, 67, 68, 70–72]. In real-world data, attention shifts through changes in gaze are not
|
| 354 |
+
343 always accompanied by similar head rotations [73, Fig. 5], and gaze is harder to record non-invasively
|
| 355 |
+
344 in-the-wild with reasonable accuracy. The consequence of this approximation is exacerbated in the
|
| 356 |
+
345 triadic Haggling setting where people are arranged roughly in a triangle and within each other’s
|
| 357 |
+
346 field of vision, making head movements even more subtle. In natural settings, groups occupy varied
|
| 358 |
+
347 formations such as side-by-side, or $L$ -arrangement [60, p. 213]. Here the more accentuated pose
|
| 359 |
+
348 changes could aid in anticipating behavior. From this perspective, the combination of limited data and
|
| 360 |
+
349 our simplifying assumption of a single group in a scene is a primary limitation of this work. The only
|
| 361 |
+
350 publicly available dataset meeting our assumptions is the Haggling dataset, where all interactions
|
| 362 |
+
351 follow similar patterns. As targeted development of techniques for recording such datasets in-the
|
| 363 |
+
352 wild gain momentum [74], evaluating these models in the different interaction settings would yield
|
| 364 |
+
353 increased insight. Nevertheless, our aim in evaluating on synthesized as well as real-world data
|
| 365 |
+
354 was to highlight the influence that such common implicit assumptions can have on performance
|
| 366 |
+
355 when applying methods. As an aside, we believe that this subtlety and sparsity of motion is also an
|
| 367 |
+
356 important distinction between forecasting in focused and unfocused interactions. While the same
|
| 368 |
+
357 techniques can be applied in both scenarios, pedestrian location is a perpetually changing data stream.
|
| 369 |
+
358 The broader goal of this paper is to take a step towards bridging a gap we perceive between research
|
| 370 |
+
359 domains; on one hand, we notice that there is a growing trend of applying deep learning techniques
|
| 371 |
+
360 in the small data regime that is social behavior data [30, 75]. Without citing specific works as
|
| 372 |
+
361 negative exemplars, this is occasionally accompanied by surface treatment of social science literature.
|
| 373 |
+
362 On the other hand, in our conversations we have also perceived a preemptive resistance to deep
|
| 374 |
+
363 learning methods precisely due to limited data. We believe that our work here—specifically our
|
| 375 |
+
364 conceptualization of conversations groups as meta-learning tasks grounded in extensive considerations
|
| 376 |
+
365 from social literature; our approach of learning extractable task-agnostic representations of predictive
|
| 377 |
+
366 behavior; and the distinction between real-world and synthesized dynamics commonly used for
|
| 378 |
+
367 evaluation—is of value in stimulating a broader community discussion about the considerations when
|
| 379 |
+
368 applying machine learning approaches within the domain of free-standing social conversations.
|
| 380 |
+
|
| 381 |
+
References
|
| 382 |
+
[1] Adam Kendon. Conducting Interaction: Patterns of Behavior in Focused Encounters. Number 7 in Studies in Interactional Sociolinguistics. Cambridge University Press, Cambridge ; New York, 1990. ISBN 978-0-521-38036-2 978-0-521-38938-9. 1, 2, 3, 7, 8
|
| 383 |
+
[2] Alessandro Vinciarelli, Maja Pantic, and Hervé Bourlard. Social signal processing: Survey of an emerging domain.
|
| 384 |
+
[3] Dan Bohus and Eric Horvitz. Models for multiparty engagement in open-world dialog. In Proceedings of the SIGDIAL 2009 Conference on The 10th Annual Meeting of the Special Interest Group on Discourse and Dialogue - SIGDIAL ’09, pages 225–234, London, United Kingdom, 2009. Association for Computational Linguistics. ISBN 978-1-932432-64-0. doi: 10.3115/1708376.1708409. 1 [4] Ryo Ishii, Shiro Kumano, and Kazuhiro Otsuka. Prediction of Next-Utterance Timing using Head Movement in Multi-Party Meetings. In Proceedings of the 5th International Conference on Human Agent Interaction, HAI ’17, pages 181–187, New York, NY, USA, October 2017. Association for Computing Machinery. ISBN 978-1-4503-5113-3. doi: 10.1145/3125739.3125765. 1 [5] Anne Keitel and Moritz M Daum. The use of intonation for turn anticipation in observed conversations without visual signals as source of information. Frontiers in psychology, 6:108, 2015. 1, 3
|
| 385 |
+
[6] Simon Garrod and Martin J Pickering. The use of content and timing to predict turn transitions. Frontiers in psychology, 6:751, 2015.
|
| 386 |
+
[7] Amélie Rochet-Capellan and Susanne Fuchs. Take a breath and take the turn: how breathing meets turns in spontaneous dialogue. Philosophical Transactions of the Royal Society B: Biological Sciences, 369(1658): 20130399, 2014. [8] M. Wlodarczak and M. Heldner. Respiratory turn-taking cues. In INTERSPEECH, 2016. 1, 3
|
| 387 |
+
[9] Dan Bohus and Eric Horvitz. Managing Human-Robot Engagement with Forecasts and. . . um. . . Hesitations. page 8. 1, 3
|
| 388 |
+
[10] Cynthia C. S. Liem, Markus Langer, Andrew Demetriou, Annemarie M. F. Hiemstra, Achmadnoer Sukma Wicaksana, Marise Ph. Born, and Cornelius J. König. Psychology Meets Machine Learning: Interdisciplinary Perspectives on Algorithmic Job Candidate Screening. In Hugo Jair Escalante, Sergio Escalera, Isabelle Guyon, Xavier Baró, Yagmur Güçlütürk, Umut Güçlü, and Marcel van Gerven, editors, ˘ Explainable and Interpretable Models in Computer Vision and Machine Learning, pages 197–253. Springer International Publishing, Cham, 2018. ISBN 978-3-319-98130-7 978-3-319-98131-4. doi: 10.1007/ 978-3-319-98131-4_9. 1
|
| 389 |
+
[11] Erlend Nilsen, Diana Bowler, and John Linnell. Exploratory and confirmatory research in the open science era. Journal of Applied Ecology, 57, February 2020. doi: 10.1111/1365-2664.13571. 1
|
| 390 |
+
[12] Starkey Duncan. Some signals and rules for taking speaking turns in conversations. Journal of Personality and Social Psychology, 23(2):283–292, 1972. ISSN 1939-1315(Electronic),0022-3514(Print). doi: 10. 1037/h0033031. 1, 3, 8
|
| 391 |
+
[13] Akko Kalma. Gazing in triads: A powerful signal in floor apportionment. British Journal of Social Psychology, 31(1):21–39, March 1992. 1, 3
|
| 392 |
+
[14] Sanjay Bilakhia, Stavros Petridis, and Maja Pantic. Audiovisual Detection of Behavioural Mimicry. In 2013 Humaine Association Conference on Affective Computing and Intelligent Interaction, pages 123–128, Geneva, Switzerland, September 2013. IEEE. ISBN 978-0-7695-5048-0. doi: 10.1109/ACII.2013.27. 1, 4
|
| 393 |
+
[15] Felix van Doorn. Rituals of Leaving: Predictive Modelling of Leaving Behaviour in Conversation. Master of Science Thesis, Delft University of Technology, 2018. 1, 2, 3
|
| 394 |
+
[16] Laura Cabrera-Quiros, Andrew Demetriou, Ekin Gedik, Leander van der Meij, and Hayley Hung. The matchnmingle dataset: a novel multi-sensor resource for the analysis of social interactions and group dynamics in-the-wild during free-standing conversations and speed dates. IEEE Transactions on Affective Computing, 2018. 2
|
| 395 |
+
[17] Nalini Ambady, Frank J Bernieri, and Jennifer A Richeson. Toward a histology of social behavior: Judgmental accuracy from thin slices of the behavioral stream. In Advances in experimental social psychology, volume 32, pages 201–271. Elsevier, 2000. 2, 3
|
| 396 |
+
[18] Alessandro Vinciarelli, H Salamin, and M Pantic. Social Signal Processing: Understanding social interactions through nonverbal behavior analysis (PDF). 2009 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2009, June 2009. doi: 10.1109/CVPRW.2009.5204290. 2, 3, 8
|
| 397 |
+
[19] Marta Garnelo, Jonathan Schwarz, Dan Rosenbaum, Fabio Viola, Danilo J. Rezende, S. M. Ali Eslami, and Yee Whye Teh. Neural Processes. arXiv:1807.01622 [cs, stat], 2018. 2, 9
|
| 398 |
+
[20] Mattias Heldner and Jens Edlund. Pauses, gaps and overlaps in conversations. Journal of Phonetics, 38(4): 555–568, October 2010. ISSN 0095-4470. doi: 10.1016/j.wocn.2010.08.002. 3, 17
|
| 399 |
+
|
| 400 |
+
426 [21] Monica M. Moore. Nonverbal courtship patterns in women: Context and consequences. Ethology and
|
| 401 |
+
427 Sociobiology, 6(4):237–247, January 1985. ISSN 0162-3095. doi: 10.1016/0162-3095(85)90016-0. 3, 7
|
| 402 |
+
428 [22] Stephen C. Levinson and Francisco Torreira. Timing in turn-taking and its implications for processing
|
| 403 |
+
429 models of language. Frontiers in Psychology, 6, June 2015. ISSN 1664-1078. doi: 10.3389/fpsyg.2015.
|
| 404 |
+
430 00731. 3
|
| 405 |
+
431 [23] Erving Goffman. Behavior in Public Places: Notes on the Social Organization of Gatherings. The Free
|
| 406 |
+
432 Press, 1. paperback ed., 24. printing edition. ISBN 978-0-02-911940-2. 3
|
| 407 |
+
433 [24] Nina-Jo Moore, Hickson Mark III, and W Don. Stacks. Nonverbal communication: Studies and applications.
|
| 408 |
+
434 2013. 3, 7
|
| 409 |
+
435 [25] Harvey Sacks, Emanuel A. Schegloff, and Gail Jefferson. A Simplest Systematics for the Organization of
|
| 410 |
+
436 Turn-Taking for Conversation. 50(4):40, 1974. 3
|
| 411 |
+
437 [26] Charles Goodwin. Conversational Organization: Interaction Between Speakers and Hearers. January
|
| 412 |
+
438 1981.
|
| 413 |
+
439 [27] Carole Edelsky. Who’s Got the Floor? Language in Society, 10(3):383–421, 1981. ISSN 0047-4045. 3
|
| 414 |
+
440 [28] Allan Wang and Aaron Steinfeld. Group Split and Merge Prediction With 3D Convolutional Networks.
|
| 415 |
+
441 IEEE Robotics and Automation Letters, 5(2):1923–1930, April 2020. ISSN 2377-3766. doi: 10.1109/LRA.
|
| 416 |
+
442 2020.2969947. 3
|
| 417 |
+
443 [29] Massimo Mastrangeli, Martin Schmidt, and Lucas Lacasa. The roundtable: An abstract model of conversa
|
| 418 |
+
444 tion dynamics. arXiv:1010.2943 [physics], October 2010. 3
|
| 419 |
+
445 [30] Louis Airale, Dominique Vaufreydaz, and Xavier Alameda-Pineda. SocialInteractionGAN: Multi-person
|
| 420 |
+
446 Interaction Sequence Generation. arXiv:2103.05916 [cs, stat], March 2021. 3, 9
|
| 421 |
+
447 [31] Navyata Sanghvi, Ryo Yonetani, and Kris Kitani. Mgpi: A computational model of multiagent group
|
| 422 |
+
448 perception and interaction. arXiv preprint arXiv:1903.01537, 2019. 3, 7, 9
|
| 423 |
+
449 [32] Hanbyul Joo, Tomas Simon, Mina Cikara, and Yaser Sheikh. Towards Social Artificial Intelligence:
|
| 424 |
+
450 Nonverbal Social Signal Prediction in a Triadic Interaction. In 2019 IEEE/CVF Conference on Computer
|
| 425 |
+
451 Vision and Pattern Recognition (CVPR), pages 10865–10875, Long Beach, CA, USA, June 2019. IEEE.
|
| 426 |
+
452 ISBN 978-1-72813-293-8. doi: 10.1109/CVPR.2019.01113. 3, 4, 8
|
| 427 |
+
453 [33] Emilie Delaherche, Mohamed Chetouani, Ammar Mahdhaoui, Catherine Saint-Georges, Sylvie Viaux,
|
| 428 |
+
454 and David Cohen. Interpersonal Synchrony: A Survey of Evaluation Methods across Disciplines. IEEE
|
| 429 |
+
455 Transactions on Affective Computing, 3(3):349–365, July 2012. ISSN 1949-3045. doi: 10.1109/T-AFFC.
|
| 430 |
+
456 2012.12. 4
|
| 431 |
+
457 [34] Dirk Helbing and Peter Molnar. Social Force Model for Pedestrian Dynamics. Physical Review E, 51(5):
|
| 432 |
+
458 4282–4286, May 1995. ISSN 1063-651X, 1095-3787. doi: 10.1103/PhysRevE.51.4282. 4
|
| 433 |
+
459 [35] Jarosław W ˛as, Bartłomiej Gudowski, and Paweł J. Matuszyk. Social Distances Model of Pedestrian
|
| 434 |
+
460 Dynamics. In David Hutchison, Takeo Kanade, Josef Kittler, Jon M. Kleinberg, Friedemann Mattern,
|
| 435 |
+
461 John C. Mitchell, Moni Naor, Oscar Nierstrasz, C. Pandu Rangan, Bernhard Steffen, Madhu Sudan, Demetri
|
| 436 |
+
462 Terzopoulos, Dough Tygar, Moshe Y. Vardi, Gerhard Weikum, Samira El Yacoubi, Bastien Chopard, and
|
| 437 |
+
463 Stefania Bandini, editors, Cellular Automata, volume 4173, pages 492–501. Springer Berlin Heidelberg,
|
| 438 |
+
464 Berlin, Heidelberg, 2006. ISBN 978-3-540-40929-8 978-3-540-40932-8. doi: 10.1007/11861201_57.
|
| 439 |
+
465 [36] Gianluca Antonini, Michel Bierlaire, and Mats Weber. Discrete Choice Models for Pedestrian Walking
|
| 440 |
+
466 Behavior. Transportation Research Part B: Methodological, 40:667–687, September 2006. doi: 10.1016/j.
|
| 441 |
+
467 trb.2005.09.006.
|
| 442 |
+
468 [37] Adrien Treuille, Seth Cooper, and Zoran Popovic. Continuum crowds. ´ ACM Transactions on Graphics /
|
| 443 |
+
469 SIGGRAPH 2006, 25(3):1160–1168, July 2006.
|
| 444 |
+
470 [38] Alexandre Robicquet, Amir Sadeghian, Alexandre Alahi, and Silvio Savarese. Learning Social Etiquette:
|
| 445 |
+
471 Human Trajectory Understanding In Crowded Scenes. In Bastian Leibe, Jiri Matas, Nicu Sebe, and Max
|
| 446 |
+
472 Welling, editors, Computer Vision – ECCV 2016, volume 9912, pages 549–565. Springer International
|
| 447 |
+
473 Publishing, Cham, 2016. ISBN 978-3-319-46483-1 978-3-319-46484-8. doi: 10.1007/978-3-319-46484-8_
|
| 448 |
+
474 33. 4
|
| 449 |
+
475 [39] J. M. Wang, D. J. Fleet, and A. Hertzmann. Gaussian Process Dynamical Models for Human Motion.
|
| 450 |
+
476 IEEE Transactions on Pattern Analysis and Machine Intelligence, 30(2):283–298, February 2008. ISSN
|
| 451 |
+
477 1939-3539. doi: 10.1109/TPAMI.2007.1167.
|
| 452 |
+
478 [40] Christopher Tay and Christian Laugier. Modelling Smooth Paths Using Gaussian Processes. In Proc. of
|
| 453 |
+
479 the Int. Conf. on Field and Service Robotics, 2007.
|
| 454 |
+
480 [41] Andrew Patterson, Arun Lakshmanan, and Naira Hovakimyan. Intent-Aware Probabilistic Trajectory
|
| 455 |
+
481 Estimation for Collision Prediction with Uncertainty Quantification. arXiv:1904.02765 [cs, math], April
|
| 456 |
+
482 2019. 4
|
| 457 |
+
|
| 458 |
+
[42] Alexandre Alahi, Kratarth Goel, Vignesh Ramanathan, Alexandre Robicquet, Li Fei-Fei, and Silvio Savarese. Social LSTM: Human Trajectory Prediction in Crowded Spaces. In 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 961–971, Las Vegas, NV, USA, June 2016. IEEE. ISBN 978-1-4673-8851-1. doi: 10.1109/CVPR.2016.110. 4
|
| 459 |
+
[43] Pu Zhang, Wanli Ouyang, Pengfei Zhang, Jianru Xue, and Nanning Zheng. SR-LSTM: State Refinement for LSTM towards Pedestrian Trajectory Prediction. arXiv:1903.02793 [cs], March 2019.
|
| 460 |
+
[44] Agrim Gupta, Justin Johnson, Li Fei-Fei, Silvio Savarese, and Alexandre Alahi. Social GAN: Socially Acceptable Trajectories with Generative Adversarial Networks. arXiv:1803.10892 [cs], March 2018. 8
|
| 461 |
+
[45] Yingfan Huang, Huikun Bi, Zhaoxin Li, Tianlu Mao, and Zhaoqi Wang. STGAT: Modeling SpatialTemporal Interactions for Human Trajectory Prediction. In 2019 IEEE/CVF International Conference on Computer Vision (ICCV), pages 6271–6280, Seoul, Korea (South), October 2019. IEEE. ISBN 978-1-72814-803-8. doi: 10.1109/ICCV.2019.00637.
|
| 462 |
+
[46] Abduallah Mohamed, Kun Qian, Mohamed Elhoseiny, and Christian Claudel. Social-STGCNN: A Social Spatio-Temporal Graph Convolutional Neural Network for Human Trajectory Prediction. arXiv:2002.11927 [cs], February 2020. 4
|
| 463 |
+
[47] MarcAurelio Ranzato, Arthur Szlam, Joan Bruna, Michael Mathieu, Ronan Collobert, and Sumit Chopra. Video (language) modeling: A baseline for generative models of natural videos. arXiv:1412.6604 [cs], December 2014. 4
|
| 464 |
+
[48] Jacob Walker, Kenneth Marino, Abhinav Gupta, and Martial Hebert. The Pose Knows: Video Forecasting by Generating Pose Futures. arXiv:1705.00053 [cs], April 2017.
|
| 465 |
+
[49] Jacob Walker, Abhinav Gupta, and Martial Hebert. Dense Optical Flow Prediction from a Static Image. In 2015 IEEE International Conference on Computer Vision (ICCV), pages 2443–2451, Santiago, Chile, December 2015. IEEE. ISBN 978-1-4673-8391-2. doi: 10.1109/ICCV.2015.281.
|
| 466 |
+
[50] Alexey Dosovitskiy, Philipp Fischer, Eddy Ilg, Philip Hausser, Caner Hazirbas, Vladimir Golkov, Patrick van der Smagt, Daniel Cremers, and Thomas Brox. FlowNet: Learning Optical Flow with Convolutional Networks. In 2015 IEEE International Conference on Computer Vision (ICCV), pages 2758–2766, Santiago, December 2015. IEEE. ISBN 978-1-4673-8391-2. doi: 10.1109/ICCV.2015.316.
|
| 467 |
+
[51] Jacob Walker, Abhinav Gupta, and Martial Hebert. Patch to the Future: Unsupervised Visual Prediction. In 2014 IEEE Conference on Computer Vision and Pattern Recognition, pages 3302–3309, Columbus, OH, USA, June 2014. IEEE. ISBN 978-1-4799-5118-5. doi: 10.1109/CVPR.2014.416.
|
| 468 |
+
[52] Carl Vondrick, Hamed Pirsiavash, and Antonio Torralba. Anticipating Visual Representations from Unlabeled Video. In 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 98–106, Las Vegas, NV, USA, June 2016. IEEE. ISBN 978-1-4673-8851-1. doi: 10.1109/CVPR.2016.18. 4
|
| 469 |
+
[53] Nitish Srivastava, Elman Mansimov, and Ruslan Salakhutdinov. Unsupervised Learning of Video Representations using LSTMs. arXiv:1502.04681 [cs], February 2015. 4
|
| 470 |
+
[54] Alexey Dosovitskiy and Vladlen Koltun. Learning to Act by Predicting the Future. arXiv:1611.01779 [cs], November 2016. 4
|
| 471 |
+
[55] Timothy Hospedales, Antreas Antoniou, Paul Micaelli, and Amos Storkey. Meta-Learning in Neural Networks: A Survey. arXiv:2004.05439 [cs, stat], November 2020. 4
|
| 472 |
+
[56] Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to Sequence Learning with Neural Networks. In Z. Ghahramani, M. Welling, C. Cortes, N. D. Lawrence, and K. Q. Weinberger, editors, Advances in Neural Information Processing Systems 27, pages 3104–3112. Curran Associates, Inc., 2014. 5
|
| 473 |
+
[57] Kyunghyun Cho, Bart van Merrienboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation. arXiv:1406.1078 [cs, stat], September 2014. 5
|
| 474 |
+
[58] Hyunjik Kim, Andriy Mnih, Jonathan Schwarz, Marta Garnelo, Ali Eslami, Dan Rosenbaum, Oriol Vinyals, and Yee Whye Teh. Attentive Neural Processes. arXiv:1901.05761 [cs, stat], July 2019. 5, 7, 9
|
| 475 |
+
[59] Charles R. Qi, Hao Su, Kaichun Mo, and Leonidas J. Guibas. PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation. arXiv:1612.00593 [cs], April 2017. 6
|
| 476 |
+
[60] Alex Kendall and Roberto Cipolla. Geometric Loss Functions for Camera Pose Regression with Deep Learning. arXiv:1704.00390 [cs], May 2017. 6, 9
|
| 477 |
+
[61] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention Is All You Need. arXiv:1706.03762 [cs], June 2017. 6
|
| 478 |
+
[62] Gautam Singh, Jaesik Yoon, Youngsung Son, and Sungjin Ahn. Sequential Neural Processes. URL http://arxiv.org/abs/1906.10264. 7, 9
|
| 479 |
+
|
| 480 |
+
539 [63] Jaesik Yoon, Gautam Singh, and Sungjin Ahn. Robustifying Sequential Neural Processes. In International
|
| 481 |
+
540 Conference on Machine Learning, pages 10861–10870. PMLR, November 2020.
|
| 482 |
+
541 [64] Timon Willi, Jonathan Masci, Jürgen Schmidhuber, and Christian Osendorfer. Recurrent Neural Processes.
|
| 483 |
+
542 arXiv:1906.05915 [cs, stat], November 2019.
|
| 484 |
+
543 [65] Sumit Kumar. Spatiotemporal Modeling using Recurrent Neural Processes. Master of Science Thesis,
|
| 485 |
+
544 Carnegie Mellon University, page 43. 7
|
| 486 |
+
545 [66] Shenghao Qin, Jiacheng Zhu, Jimmy Qin, Wenshuo Wang, and Ding Zhao. Recurrent Attentive Neural
|
| 487 |
+
546 Process for Sequential Data. arXiv:1910.09323 [cs, stat], October 2019. 7
|
| 488 |
+
547 [67] Marynel Vazquez, Aaron Steinfeld, and Scott E. Hudson. Maintaining awareness of the focus of attention
|
| 489 |
+
548 of a conversation: A robot-centric reinforcement learning approach. In 2016 25th IEEE International
|
| 490 |
+
549 Symposium on Robot and Human Interactive Communication (RO-MAN), pages 36–43, New York, NY,
|
| 491 |
+
550 USA, August 2016. IEEE. ISBN 978-1-5090-3929-6. doi: 10.1109/ROMAN.2016.7745088. 7, 9
|
| 492 |
+
551 [68] Xavier Alameda-Pineda, Yan Yan, Elisa Ricci, Oswald Lanz, and Nicu Sebe. Analyzing Free-standing
|
| 493 |
+
552 Conversational Groups: A Multimodal Approach. pages 5–14. ACM Press, 2015. ISBN 978-1-4503-3459-4.
|
| 494 |
+
553 doi: 10.1145/2733373.2806238. 8, 9
|
| 495 |
+
554 [69] Lu Zhang and Hayley Hung. On Social Involvement in Mingling Scenarios: Detecting Associates of
|
| 496 |
+
555 F-formations in Still Images. IEEE Transactions on Affective Computing, 2018.
|
| 497 |
+
556 [70] Stephanie Tan, David M. J. Tax, and Hayley Hung. Multimodal Joint Head Orientation Estimation in
|
| 498 |
+
557 Interacting Groups via Proxemics and Interaction Dynamics. Proceedings of the ACM on Interactive,
|
| 499 |
+
558 Mobile, Wearable and Ubiquitous Technologies, 5(1):1–22, March 2021. ISSN 2474-9567. doi: 10.1145/
|
| 500 |
+
559 3448122. 8, 9
|
| 501 |
+
560 [71] Rutger Rienks, Ronald Poppe, and Mannes Poel. Speaker Prediction based on Head Orientations. page 7.
|
| 502 |
+
561 [72] M. Farenzena, A. Tavano, L. Bazzani, D. Tosato, G. Paggetti, G. Menegaz, V. Murino, and M. Cristani.
|
| 503 |
+
562 Social interactions by visual focus of attention in a three-dimensional environment. Expert Systems, 30(2):
|
| 504 |
+
563 115–127, May 2013. ISSN 02664720. doi: 10.1111/j.1468-0394.2012.00622.x. 9
|
| 505 |
+
564 [73] S.O. Ba and J.-M. Odobez. Recognizing Visual Focus of Attention From Head Pose in Natural Meetings.
|
| 506 |
+
565 IEEE Transactions on Systems, Man, and Cybernetics, Part B (Cybernetics), 39(1):16–33, February 2009.
|
| 507 |
+
566 ISSN 1083-4419. doi: 10.1109/TSMCB.2008.927274. 9
|
| 508 |
+
567 [74] Chirag Raman, Stephanie Tan, and Hayley Hung. A modular approach for synchronized wireless multi
|
| 509 |
+
568 modal multisensor data acquisition in highly dynamic social settings. arXiv preprint arXiv:2008.03715,
|
| 510 |
+
569 2020. 9
|
| 511 |
+
570 [75] Mason Swofford, John Charles Peruzzi, Nathan Tsoi, Sydney Thompson, Roberto Martín-Martín, Silvio
|
| 512 |
+
571 Savarese, and Marynel Vázquez. Improving Social Awareness Through DANTE: A Deep Affinity Network
|
| 513 |
+
572 for Clustering Conversational Interactants. Proceedings of the ACM on Human-Computer Interaction, 4
|
| 514 |
+
573 (CSCW1):1–23, May 2020. ISSN 2573-0142. doi: 10.1145/3392824. 9
|
| 515 |
+
574 [76] Tuan Anh Le, Hyunjik Kim, and Marta Garnelo. Empirical Evaluation of Neural Process Objectives.
|
| 516 |
+
575 page 9. 16
|
| 517 |
+
576 [77] Diederik P. Kingma and Jimmy Ba. Adam: A Method for Stochastic Optimization. arXiv:1412.6980 [cs],
|
| 518 |
+
577 January 2017. 16
|
| 519 |
+
578 [78] Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor
|
| 520 |
+
579 Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang,
|
| 521 |
+
580 Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie
|
| 522 |
+
581 Bai, and Soumith Chintala. Pytorch: An imperative style, high-performance deep learning library. In
|
| 523 |
+
582 H. Wallach, H. Larochelle, A. Beygelzimer, F. dAlché-Buc, E. Fox, and R. Garnett, editors, Advances in
|
| 524 |
+
583 Neural Information Processing Systems 32, pages 8024–8035. Curran Associates, Inc., 2019. 16
|
| 525 |
+
584 [79] WA Falcon et al. Pytorch lightning. GitHub. Note: https://github.com/PyTorchLightning/pytorch-lightning,
|
| 526 |
+
585 3, 2019. 16
|
| 527 |
+
586 [80] Chirag Raman and Hayley Hung. Towards automatic estimation of conversation floors within f-formations.
|
| 528 |
+
587 In 2019 8th International Conference on Affective Computing and Intelligent Interaction Workshops and
|
| 529 |
+
588 Demos (ACIIW), pages 175–181. IEEE, 2019. 17
|
| 530 |
+
|
| 531 |
+
1. For all authors...
|
| 532 |
+
|
| 533 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] We mention the contributions of the task formulation and method in Section 1, along with our simplifying assumption for the setting, and circle back to discussing its implications in Section 7.
|
| 534 |
+
(b) Did you describe the limitations of your work? [Yes] Please refer to the discussion in Section 7.
|
| 535 |
+
(c) Did you discuss any potential negative societal impacts of your work? [N/A]
|
| 536 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 537 |
+
|
| 538 |
+
2. If you are including theoretical results...
|
| 539 |
+
|
| 540 |
+
(a) Did you state the full set of assumptions of all theoretical results? [N/A] (b) Did you include complete proofs of all theoretical results? [N/A]
|
| 541 |
+
|
| 542 |
+
3. If you ran experiments...
|
| 543 |
+
|
| 544 |
+
(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [Yes] Code, processed data, splits, and test batches are provided for reproduction in the Supplementary material.
|
| 545 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] Please refer to Appendices C and D.
|
| 546 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] We have reported mean and std. for the metrics over individual sequences in the test sets.
|
| 547 |
+
(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] Please refer to Appendix C.2. We specify the specific GPUs used for our experiments and their corresponding memory capacities.
|
| 548 |
+
|
| 549 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 550 |
+
|
| 551 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes] We have cited and discussed the original work proposing the Haggling dataset.
|
| 552 |
+
(b) Did you mention the license of the assets? [No] The Haggling dataset is freely available for non-commercial and research purpose only.
|
| 553 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [No]
|
| 554 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [No] The Haggling dataset is freely available for non-commercial and research purpose only.
|
| 555 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [No] However, we visualized the features in Blender3D from scratch to not display original videos with the subjects.
|
| 556 |
+
|
| 557 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 558 |
+
|
| 559 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 560 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 561 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|
md/train/r1esnoAqt7/r1esnoAqt7.md
ADDED
|
@@ -0,0 +1,310 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# MORPHO-MNIST: QUANTITATIVE ASSESSMENT AND DIAGNOSTICS FOR REPRESENTATION LEARNING
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Revealing latent structure in data is an active field of research, having introduced exciting technologies such as variational autoencoders and adversarial networks, and is essential to push machine learning towards unsupervised knowledge discovery. However, a major challenge is the lack of suitable benchmarks for an objective and quantitative evaluation of learned representations. To address this issue we introduce Morpho-MNIST, a framework that aims to answer: “to what extent has my model learned to represent specific factors of variation in the data?” We extend the popular MNIST dataset by adding a morphometric analysis enabling quantitative comparison of trained models, identification of the roles of latent variables, and characterisation of sample diversity. We further propose a set of quantifiable perturbations to assess the performance of unsupervised and supervised methods on challenging tasks such as outlier detection and domain adaptation.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
A key factor for progress in machine learning has been the availability of well curated, easy-to-use, standardised and sufficiently large annotated datasets for benchmarking different algorithms and models. This has led to major advances in speech recognition, computer vision, and natural language processing. A commonality between these tasks is their natural formulation as supervised learning tasks, wherein performance can be measured in terms of accuracy on a test set.
|
| 12 |
+
|
| 13 |
+
The general problem of representation learning (i.e. to reveal latent structure in data) is more difficult to assess due the lack of suitable benchmarks. Although the field is very active, with many recently proposed techniques such as probabilistic autoencoders and adversarial learning, it is less clear where the field stands in terms of progress or which approaches are more expressive for specific tasks. The lack of reproducible ways to quantify performance has led to subjective means of evaluation: visualisation techniques have been used to show low-dimensional projections of the latent space and visual inspection of generated or reconstructed samples are popular to provide subjective measures of descriptiveness. On the other hand, the quality of sampled images generally tells us little about how well the learned representations capture known factors of variation in the training distribution. In order to advance progress, the availability of tools for objective assessment of representation learning methods seems essential yet lacking.
|
| 14 |
+
|
| 15 |
+
This paper introduces Morpho-MNIST, a collection of shape metrics and perturbations, in a step towards quantitative assessment of representation learning. We build upon one of the most popular machine learning benchmarks, MNIST, which despite its shortcomings remains widely used. While MNIST was originally constructed to facilitate research in image classification, in the form of recognising handwritten digits (LeCun et al., 1998), it has found its use in representation learning, for example, to demonstrate that the learned latent space yields clusters consistent with digit labels. Methods aiming to disentangle the latent space claim success if individual latent variables capture specific style variations (e.g. stroke thickness, sidewards leaning digits and other visual characteristics).
|
| 16 |
+
|
| 17 |
+
The main appeal of selecting MNIST as a benchmark for representation learning is that, while manifesting complex interactions between pixel intensities and underlying shapes, it has well understood and easily measurable factors of variation. More generally, MNIST remains popular in practice due to several factors: it allows reproducible comparisons with previous results reported in the literature; the dataset is sufficiently large for its complexity and consists of small, two-dimensional greyscale images defining a tractable ten-class classification problem; computation and memory requirements are low; most popular deep learning frameworks and libraries offer tutorials using MNIST, which makes it straightforward for new researchers to enter the field and to experiment with new ideas and explore latest developments. We take advantage of these qualities and extend MNIST in multiple ways, as summarised in the following.
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Figure 1: Left: MNIST morphometrics—stroke thickness and length (not shown), width, height and slant of digits. Right: MNIST perturbations (many more examples of each type in Appendix B).
|
| 21 |
+
|
| 22 |
+
# 1.1 CONTRIBUTIONS
|
| 23 |
+
|
| 24 |
+
Our aim is to bridge the gap between methodology-focused research and critical real-world applications that could benefit from latest machine learning methods. As we preserve the general properties of MNIST—such as image size, file format, numbers of training and test images, and the original ten-class classification problem—we believe this new quantitative framework for assessing representation learning will experience widespread use in the community and may inspire further extensions facilitated by a publicly available Morpho-MNIST code base.
|
| 25 |
+
|
| 26 |
+
Morphometrics: We propose to describe true and generated digit images in terms of measurable shape attributes. These include stroke thickness and length, and the width, height, and slant of digits (cf. Fig. 1, left). Whereas some of these properties have been analysed qualitatively in previous work, we demonstrate that objectively quantifying each of them allows to identify the role of inferred representations. Moreover, these tools can be used to measure model samples, enabling assessment of generative performance with respect to sample diversity (Section 4.1) and disentanglement of latent variables (Section 4.2).
|
| 27 |
+
|
| 28 |
+
These measurements can be directly employed to re-evaluate existing models and may be added retrospectively to previous experiments involving the original MNIST dataset. Adoption of our morphometric analysis may provide new insights into the effectiveness of representation learning methods in terms of revealing meaningful latent structures. Furthermore, for other datasets it suffices to design the relevant scalar metrics and include them in the very same evaluation framework.
|
| 29 |
+
|
| 30 |
+
Perturbations: We introduce a set of parametrisable global and local perturbations, inspired by natural and pathological variability in medical images. Global changes involve overall thinning and thickening of digits, while local changes include both swelling and fractures (see examples on the right in Fig. 1 and many more in Appendix B). Injecting these perturbations into the dataset adds a new type of complexity to the data manifold and opens up a variety of interesting applications.
|
| 31 |
+
|
| 32 |
+
The proposed perturbations are designed to enable a wide range of new studies and applications for both supervised and unsupervised tasks. Detection of ‘abnormalities’ (i.e. local perturbations) is an evident application, although more challenging tasks can also be defined, such as classification from noisy/corrupted data, domain adaptation, localisation of perturbations, characterising semantics of learned latent representations, and more. We explore a few supplementary examples of supervised tasks in Appendix D.
|
| 33 |
+
|
| 34 |
+
# 1.2 RELATED WORK: DATASETS
|
| 35 |
+
|
| 36 |
+
In this section, we provide an overview of some datasets that are related to MNIST, by either sharing its original source content, containing transformations of the original MNIST images or being distributed in the same format for easy replacement. We also mention a few prevalent datasets of images with generative factor annotations, similarly to the morphometrics proposed in this paper.
|
| 37 |
+
|
| 38 |
+
NIST datasets: The MNIST (modified NIST) dataset (LeCun et al., 1998) was constructed from handwritten digits in NIST Special Databases 1 and 3, now released as Special Database 19 (Grother and Hanaoka, 2016). Cohen et al. (2017) generated a much larger dataset based on the same NIST database, containing additional upper- and lower-case letters, called EMNIST (extended MNIST).
|
| 39 |
+
|
| 40 |
+
MNIST perturbations: The seminal paper by LeCun et al. (1998) employed data augmentation using planar affine transformations including translation, scaling, squeezing, and shearing. Loosli et al. (2007) employed random elastic deformations to construct the Infinite MNIST dataset. Other MNIST variations include rotations and insertion of random and structured background (Larochelle et al., 2007), and Tieleman (2013) applied spatial affine transformations and provided ground-truth transformation parameters.
|
| 41 |
+
|
| 42 |
+
MNIST format: Due to the ubiquity of the MNIST dataset in machine learning research and the resulting multitude of compatible model architectures available, it is appealing to release new datasets in the same format $2 8 \times 2 8$ , 8-bit grayscale images). One such effort is Fashion-MNIST (Xiao et al., 2017), containing images of clothing articles from ten distinct classes, adapted from an online shopping catalogue. Another example is notMNIST (Bulatov, 2011), a dataset of character glyphs for letters $\mathbf { \delta A } ^ { \prime } - \mathbf { \delta J } ^ { \prime }$ (also ten classes), in a challengingly diverse collection of typefaces.
|
| 43 |
+
|
| 44 |
+
Annotated datasets: Computer vision datasets that are popular for evaluating disentanglement of learned latent factors of variation include those from Paysan et al. (2009) and Aubry et al. (2014). They contain 2D renderings of 3D faces and chairs, respectively, with ground-truth pose parameters (azimuth, elevation) and lighting conditions (faces only). A further initiative in that direction is the dSprites dataset (Matthey et al., 2017), which consists of binary images containing three types of shapes with varying location, orientation and size. The availability of the ground-truth values of such attributes has motivated the accelerated adoption of these datasets in the evaluation of representation learning algorithms.
|
| 45 |
+
|
| 46 |
+
# 1.3 RELATED WORK: QUANTITATIVE EVALUATION
|
| 47 |
+
|
| 48 |
+
Evaluation of representation learning is a notoriously challenging task and remains an open research problem. Numerous solutions have been proposed, with many of the earlier ones focusing on the test log-likelihood under the model (Kingma and Welling, 2013) or, for likelihood-free models, under a kernel density estimate (KDE) of generated samples (Goodfellow et al., 2014; Makhzani et al., 2015)—being shown not to be reliable proxies for the true model likelihood (Theis et al., 2016).
|
| 49 |
+
|
| 50 |
+
Another perspective for evaluation of generative models of images is the visual fidelity of its samples to the training data, which would normally require manual inspection. To address this issue, a successful family of metrics have been proposed, based on visual features extracted by the Inception network (Szegedy et al., 2016). The original Inception score (Salimans et al., 2016) relies on the ‘crispness’ of class predictions, whereas the Fréchet Inception distance (FID) (Heusel et al., 2017) and the kernel Inception distance (KID) (Binkowski et al. ´ , 2018) statistically compare high-level representations instead of the final network outputs.
|
| 51 |
+
|
| 52 |
+
Although the approaches above can reveal vague signs of mode collapse, it may be useful to diagnose this phenomenon on its own. With this objective, Arora et al. (2018) proposed to estimate the support of the learned distribution (assumed discrete) using the birthday paradox test, by counting pairs of visual duplicates among model samples. Unfortunately, the adoption of this technique is hindered by its reliance on manual visual inspection to flag identical images.
|
| 53 |
+
|
| 54 |
+
There have been several attempts at quantifying representation disentanglement performance. For example, Higgins et al. (2017) proposed to use the accuracy of a simple classifier trained to predict which factor of variation was held fixed in a simulated dataset. There exist further informationtheoretic approaches, involving the KL divergence contribution from each latent dimension (Dupont, 2018) or their mutual information with each known generative factor (Chen et al., 2018). Yet another method, explored in Kumar et al. (2018), is based on the predictive accuracy of each latent variable to each generative factor (continuous or discrete).
|
| 55 |
+
|
| 56 |
+

|
| 57 |
+
Figure 2: Stages of the image processing pipeline. Left to right: original image, upscaled image, binarised image, distance transform, skeleton, downscaled image.
|
| 58 |
+
|
| 59 |
+
# 2 MORPHOMETRY
|
| 60 |
+
|
| 61 |
+
Meaningful morphometrics are instrumental in characterising distributions of rasterised shapes, such as MNIST digits, and can be useful as additional data for downstream learning tasks. We begin this section by describing the image processing pipeline employed for extracting the metrics and for applying perturbations (Section 3), followed by details on the computation of each measurement.
|
| 62 |
+
|
| 63 |
+
# 2.1 PROCESSING PIPELINE
|
| 64 |
+
|
| 65 |
+
The original $2 8 \times 2 8$ resolution of the MNIST images is generally not high enough to enable satisfactory morphological processing: stroke properties (e.g. length, thickness) measured directly on the binarised images would likely be inaccurate and heavily quantised. To mitigate this issue and enable sub-pixel accuracy in the measurements, we propose to use the following processing steps: 1. upscale (e.g. $\times 4$ , to $1 1 2 \times 1 1 2 )$ 1; 2. binarise (e.g. threshold ${ \geq } 1 2 8$ ); 3. compute Euclidean distance transform (EDT) from boundaries; 4. skeletonise (medial axis, i.e. ridges of EDT); 5. apply perturbation (cf. Section 3); and 6. downscale to original resolution.
|
| 66 |
+
|
| 67 |
+
We illustrate the pipeline in Fig. 2. The binary high-resolution digits have smooth boundaries and faithfully capture subtle variations in contour shape and stroke thickness that are only vaguely discernible in the low-resolution images. Additionally, note how the final downscaled image is almost indistinguishable from the original.
|
| 68 |
+
|
| 69 |
+
All morphometric attributes described below are calculated for each digit after applying steps 1–4 of this pipeline. The distributions for the plain MNIST training set is plotted in Fig. 3, and the distributions after applying each type of perturbation can be found in Appendix A.
|
| 70 |
+
|
| 71 |
+

|
| 72 |
+
Figure 3: Distribution of morphological attributes per digit class in the plain MNIST training dataset
|
| 73 |
+
|
| 74 |
+
# 2.2 STROKE LENGTH
|
| 75 |
+
|
| 76 |
+
Here we approximate the trace of the pen tip, as a digit was being written, by the computed morphological skeleton. In this light, the total length of the skeleton is an estimate of the length of the pen stroke, which in turn is a measure of shape complexity.
|
| 77 |
+
|
| 78 |
+
It can be computed in a single pass by accumulating the Euclidean distance of each skeleton pixel to its immediate neighbours, taking care to only count the individual contributions once. This approach is more robust against rotations than a naïve estimate by simply counting the pixels.
|
| 79 |
+
|
| 80 |
+
# 2.3 STROKE THICKNESS
|
| 81 |
+
|
| 82 |
+
A prominent factor of style variation in the MNIST digits is the overall thickness of the strokes, due to both legitimate differences in pen thickness and force applied, and also to the rescaling of the original NIST images by different factors.
|
| 83 |
+
|
| 84 |
+
We estimate it by exploiting the computed distance transform. By virtue of how the image skeleton is computed, its pixels are approximately equidistant to the nearest boundaries, therefore we take twice the mean value of the EDT over all skeleton pixels as our global estimate.
|
| 85 |
+
|
| 86 |
+
# 2.4 SLANT
|
| 87 |
+
|
| 88 |
+
The extent by which handwritten symbols lean right or left (forward and backward slant, respectively) is a further notorious and quantifiable dimension of handwriting style. It introduces so much variation in the appearance of characters in images that it is common practice in OCR systems to ‘deslant’ them, in an attempt to reduce within-class variance (LeCun et al., 1998; Teow and Loe, 2002).
|
| 89 |
+
|
| 90 |
+
We adapt the referred deslanting methodology to describe the slant angle of the handwritten digits. After estimating the second-order image moments, we define the slant based on the horizontal shear:
|
| 91 |
+
|
| 92 |
+
$$
|
| 93 |
+
\alpha = \arctan \left( - \frac { \sum _ { i , j } x _ { i j } ( i - \bar { i } ) ( j - \bar { j } ) } { \sum _ { i , j } x _ { i j } ( i - \bar { i } ) ^ { 2 } } \right) ,
|
| 94 |
+
$$
|
| 95 |
+
|
| 96 |
+
where $\boldsymbol { x } _ { i j }$ is the intensity of pixel $( i , j )$ , and $( \bar { i } , \bar { j } )$ are the centroid coordinates. The minus sign ensures that positive and negative values correspond to forward and backward slant, respectively.
|
| 97 |
+
|
| 98 |
+
# 2.5 WIDTH AND HEIGHT
|
| 99 |
+
|
| 100 |
+
It is useful to measure other general shape attributes, such as width, height, and aspect ratio, which also present substantial variation related to personal handwriting style.2 To this end, we propose to fit a bounding parallelogram to each digit, with horizontal and slanted sides (cf. Fig. 1).
|
| 101 |
+
|
| 102 |
+
We sweep the image top-to-bottom with a horizontal boundary to compute a vertical marginal cumulative distribution function (CDF), and likewise left-to-right with a slanted boundary for a horizontal marginal CDF, with angle $\alpha$ as computed above. The bounds are then chosen based on equal-tailed intervals containing a given proportion of the image mass— $98 \%$ in both directions ( $1 \%$ from each side) proved accurate and robust in our experiments.
|
| 103 |
+
|
| 104 |
+
# 3 PERTURBATIONS
|
| 105 |
+
|
| 106 |
+
As discussed in Section 1, we bring forward a number of morphological perturbations for MNIST digits, to enable interesting applications and experimentation. In this section, we detail these parametrisable transformations, categorised as global or local.
|
| 107 |
+
|
| 108 |
+
# 3.1 GLOBAL: THINNING AND THICKENING
|
| 109 |
+
|
| 110 |
+
The first pair of transformations we present is based on simple morphological operations: the binarised image of a digit is dilated or eroded with a circular structuring element. Its radius is set proportionally to the estimated stroke thickness (Section 2.3), so that the overall thickness of each digit will decrease or increase by an approximately fixed factor (here, $- 7 0 \%$ and $+ 1 0 0 \%$ ; see Figs. B.1 and B.2).
|
| 111 |
+
|
| 112 |
+
Since there is substantial thickness variability in the original MNIST data (cf. Fig. 3) and most thinned and thickened digits look very plausible, we believe that these perturbations can constitute a powerful form of data augmentation for training. For the same reason, we have not included these perturbations in the abnormality detection experiments (Appendix D).
|
| 113 |
+
|
| 114 |
+
# 3.2 LOCAL: SWELLING
|
| 115 |
+
|
| 116 |
+
In addition to the global transformations above, we introduce local perturbations with variable location and extent, which are harder to detect automatically. Given a radius $R$ , a centre location $\mathbf { r } _ { 0 }$ and a strength parameter $\gamma > 1$ , the coordinates $\mathbf { r }$ of pixels within distance $R$ of $\mathbf { r } _ { 0 }$ are nonlinearly warped according to a radial power transform:
|
| 117 |
+
|
| 118 |
+
$$
|
| 119 |
+
\mathbf { r } \mapsto \mathbf { r } _ { 0 } + \left( \mathbf { r } - \mathbf { r } _ { 0 } \right) \left( \frac { \left\| \mathbf { r } - \mathbf { r } _ { 0 } \right\| } { R } \right) ^ { \gamma - 1 } ,
|
| 120 |
+
$$
|
| 121 |
+
|
| 122 |
+
leaving the remaining portions of the image untouched and resampling with bicubic interpolation.
|
| 123 |
+
|
| 124 |
+
In the experiments and released dataset, we set $\gamma = 7$ and $R = 3 \sqrt { \theta } / 2$ , where $\theta$ is thickness. Unlike simple linear scaling with $\theta$ , this choice for $R$ produces noticeable but not exaggerated effects across the thickness range observed in the dataset (cf. Fig. B.3). The centre location, $\mathbf { r } _ { 0 }$ , is picked uniformly at random from the pixels along the estimated skeleton.
|
| 125 |
+
|
| 126 |
+
# 3.3 LOCAL: FRACTURES
|
| 127 |
+
|
| 128 |
+
We describe the proposed procedure for adding fractures to an MNIST digit, where we define a fracture as a break in the continuity of a pen stroke. Because single fractures can in many cases be easily mistaken for true gaps between strokes, we add multiple fractures to each affected digit.
|
| 129 |
+
|
| 130 |
+
When selecting the location for a fracture, we attempt to avoid getting too close to stroke tips (points on the skeleton with a single neighbour) or fork points (more than two neighbours). This is achieved by sampling only among those skeleton pixels above a certain distance to these detected points. In addition, we would like fractures to be transversal to the pen strokes. Local orientation is determined based on second-order moments of the skeleton inside a window centred at the chosen location, and the length of the fracture is estimated from the boundary EDT. Finally, the fracture is drawn onto the high-resolution binary image with a circular brush along the estimated normal.
|
| 131 |
+
|
| 132 |
+
In practice, we found that adding three fractures with $1 . 5 \mathrm { p x }$ thickness, $2 \mathrm { p x }$ minimum distance to tips and forks and angle window of $5 \times 5 \mathrm { p x } ^ { 2 }$ (‘px’ as measured in the low resolution image) produces detectable but not too obvious perturbations (see Fig. B.4). We also extend the lines on both ends by $0 . 5 \mathrm { p x }$ to add some tolerance.
|
| 133 |
+
|
| 134 |
+
# 4 EVALUATION CASE STUDIES
|
| 135 |
+
|
| 136 |
+
In this section, we demonstrate potential uses of the proposed framework: using morphometrics to characterise the distribution of samples from generative models and finding associations between learned latent representations and morphometric attributes. In addition, we exemplify in Appendix D a variety of supervised tasks on the MNIST dataset augmented with perturbations.
|
| 137 |
+
|
| 138 |
+
# 4.1 SAMPLE DIVERSITY
|
| 139 |
+
|
| 140 |
+
Here we aim to illustrate ways in which the proposed MNIST morphometrics may be used to visualise distributions learned by generative models and to quantify their agreement with the true data distribution in terms of these semantic attributes. We also believe that extracting such measurements from model samples is a step toward diagnosing the issue of mode collapse.
|
| 141 |
+
|
| 142 |
+

|
| 143 |
+
Figure 4: Distribution of morphometric attributes for MNIST test dataset and samples from some generative models. Diagonals show marginal histograms and KDEs, upper-triangular plots show pairwise log-histograms and lower-triangular plots show pairwise KDEs.
|
| 144 |
+
|
| 145 |
+
We exemplify this scenario with a vanilla GAN (Goodfellow et al., 2014) and a $\beta$ -VAE (Higgins et al., 2017), both with generator (resp. decoder) and discriminator architecture as used in the MNIST experiments in Chen et al. (2016), and encoder mirroring the decoder. We train a $\beta$ -VAE with $\beta = 4$ and a GAN, both with 64-dimensional latent space. To explore the behaviour of a much less expressive model, we additionally train a GAN with only two latent dimensions.
|
| 146 |
+
|
| 147 |
+
Visualisation: Figure 4 illustrates the morphometric distributions of the plain MNIST test images and of 10,000 samples from each of these three models. As can be seen, morphometrics provide interpretable low-dimensional statistics which allow comparing distributions learned by generative models between each other and with true datasets. While Figs. 4b and $_ { \mathrm { 4 c } }$ show model samples roughly as diverse as the true images, the samples from the low-dimensional GAN in Fig. 4d seem concentrated on certain regions, covering a distribution that is less faithful to the true one in Fig. 4a.
|
| 148 |
+
|
| 149 |
+
Statistical comparison: We argue that in this lower-dimensional space of morphometrics it is possible to statistically compare the distributions, since this was shown not to be effective directly in image space (e.g. Theis et al., 2016). To this end, we propose to use kernel two-sample tests based on maximum mean discrepancy (MMD) between morphometrics of the test data and of each of the sample distributions. Here, we performed the linear-time asymptotic test described in Gretton et al. (2012, $\ S 6$ (details and further considerations in Appendix C). The test results in Table 1 seem to confirm the mismatch of the low-dimensional GAN’s samples, whereas the $\beta$ -VAE and larger GAN do not show a significant departure from the data distribution.
|
| 150 |
+
|
| 151 |
+
Table 1: Kernel two-sample tests between model samples and true test data
|
| 152 |
+
|
| 153 |
+
<table><tr><td>Test data vs.</td><td>Dims.</td><td>MMD² ± std. error (×10-3)</td><td>p</td></tr><tr><td>β-VAE</td><td>64</td><td>0.792 ± 1.569</td><td>.3068</td></tr><tr><td>GAN</td><td>64</td><td>1.458 ± 1.650</td><td>.1885</td></tr><tr><td>GAN</td><td>2</td><td>8.876 ± 1.807</td><td>.0000</td></tr></table>
|
| 154 |
+
|
| 155 |
+
Table 2: Settings for InfoGAN disentanglement experiments
|
| 156 |
+
|
| 157 |
+
<table><tr><td></td><td>#Cat.</td><td># Cont.</td><td>#Bin.</td><td>Dataset</td></tr><tr><td>INFOGAN-A</td><td>10</td><td>2</td><td>0</td><td>PLAIN: plain only</td></tr><tr><td>INFOGAN-B</td><td>10</td><td>3</td><td>0</td><td>GLOBAL: plain + thinning + thickening</td></tr><tr><td>INFOGAN-C</td><td>10</td><td>2</td><td>2</td><td>LOCAL:1 plain + swelling + fractures</td></tr></table>
|
| 158 |
+
|
| 159 |
+
Finding replicas: One potentially fruitful suggestion would be to use a variant of hierarchical agglomerative clustering on sample morphometric attributes (e.g. using standardised Euclidean distance, or other suitable metrics). With a low enough distance threshold, it would be possible to identify groups of near-replicas, the abundance of which would signify mode collapse. Alternatively, this could be applicable as a heuristic in the birthday paradox test for estimating the support of the learned distribution (Arora et al., 2018).
|
| 160 |
+
|
| 161 |
+
# 4.2 DISENTANGLEMENT
|
| 162 |
+
|
| 163 |
+
In this experiment, we demonstrate that: (a) standard MNIST can be augmented with morphometric attributes to quantitatively study representations computed by an inference model (as already possible with e.g. dSprites and 3D faces); (b) we can measure shape attributes of samples to assess disentanglement of a generative model, which is unprecedented to the best of our knowledge; and (c) this analysis can also diagnose when a model unexpectedly fails to learn a known aspect of the data.
|
| 164 |
+
|
| 165 |
+
Methodology: We take MAP estimates of latent codes for each image (i.e. maximal logit for categorical codes and mean for continuous codes), as predicted by the variational recognition network. Using an approach related to the disentanglement measure introduced in Kumar et al. (2018), we study the correlation structures between known generative factors and latent codes learned by an InfoGAN. Specifically, we compute the partial correlation between each latent code variable and each morphometric attribute, controlling for the variation in the remaining latent variables (disregarding the noise vector).3 As opposed to the simple correlation, this technique allows us to study the net first-order effect of each latent code, all else being equal.
|
| 166 |
+
|
| 167 |
+
Models were trained for 20 epochs using 64 images per batch, with no hyperparameter tuning. We emphasize that our goal was to illustrate how the proposed morphometrics can serve as tools to better understand whether they behave as intended and not to optimally train the models in each scenario.
|
| 168 |
+
|
| 169 |
+
Inferential disentanglement: To illustrate how this methodology can be applied in practice to assess disentanglement, we consider two settings. The first is the same as in the MNIST experiment from Chen et al. (2016), with a 10-way categorical and two continuous latent codes, trained and evaluated on the plain MNIST digits, which we will refer to as INFOGAN-A.
|
| 170 |
+
|
| 171 |
+

|
| 172 |
+
Figure 5: Partial correlations between inferred latent codes and morphometrics of test images. Circle area and colour strength are proportional to correlation magnitude, blue is positive and red is negative.
|
| 173 |
+
|
| 174 |
+

|
| 175 |
+
Figure 6: Partial correlations between 1000 sampled latent codes and morphometrics of the corresponding generated images
|
| 176 |
+
|
| 177 |
+
The second setting was designed to investigate whether the model could disentangle the concept of thickness, by including an additional continuous latent code and training on a dataset with exaggerated thickness variations. We constructed this dataset by randomly interleaving plain, thinned and thickened digit images in equal proportions. Since the perturbations were applied completely at random, we expect a trained generative model to identify that thickness should be largely independent of the other morphological attributes. We refer to this set-up as INFOGAN-B. Table 2 summarises the different experimental settings, for reference.
|
| 178 |
+
|
| 179 |
+
In Fig. 5a, we see that INFOGAN-A learned to encode slant mostly in $c _ { 3 }$ , while $c _ { 1 } ^ { ( 8 ) }$ clearly relates to the ‘1’ class (much narrower digit shape and shorter pen stroke; cf. Fig. 3). Figure 5b quantitatively confirms the hypothesis that INFOGAN-B’s recognition network would learn to separate slant and thickness (in $c _ { 4 }$ and $c _ { 3 }$ , resp.), the most prominent factors of style variation in this dataset. Interestingly, it shows that $c _ { 3 }$ also associates with height, as thicker digits tend to be taller.
|
| 180 |
+
|
| 181 |
+
Generative disentanglement: The evaluation methodology described above is useful to investigate the behaviour of the inference direction of a model, and can readily be used with datasets which include ground-truth generative factor annotations. On the other hand, unless we trust that the inference approximation is highly accurate, this tells us little about the generative expressiveness of the model. This is where computed metrics truly show their potential: we can measure generated samples, and see how their attributes relate to the latent variables used to create them.
|
| 182 |
+
|
| 183 |
+
Figure 6 shows results for a similar analysis to Fig. 5, but now evaluated on samples from that model. As the tables are mostly indistinguishable, we may argue that in this case the inference and generator networks have learned to consistently encode and decode the digit shape attributes.
|
| 184 |
+
|
| 185 |
+
As further illustration, Fig. 7 displays traversals of the latent space, obtained by varying a subset of the latent variables while holding the remaining ones (including noise) constant. With these examples, we are able to qualitatively verify the quantitative results in Fig. 6. Note that, until now, visual inspection was typically the only means of evaluating disentanglement and expressiveness of the generative direction of image models (e.g. Chen et al., 2016; Dupont, 2018).
|
| 186 |
+
|
| 187 |
+
Diagnosing failure: We also attempted to detect whether an InfoGAN had learned to discover local perturbations (swelling and fractures). To this end, we extended the model formulation with additional Bernoulli latent codes, which would hopefully learn to encode presence/absence of each (a) INFOGAN-A: one-dimensional traversals of $c _ { 1 }$ (top, ‘digit type’) and $c _ { 3 }$ (bottom, ‘slant’). Samples in each row share the values of remaining latent variables and noise.
|
| 188 |
+
|
| 189 |
+

|
| 190 |
+
|
| 191 |
+

|
| 192 |
+
Figure 7: InfoGAN latent space traversals
|
| 193 |
+
|
| 194 |
+
(b) INFOGAN-B: two-dimensional traversal of $c _ { 4 } \times c _ { 3 }$ (‘thickness’ $\times$ ‘slant’)
|
| 195 |
+
|
| 196 |
+

|
| 197 |
+
Figure 8: Partial correlations of inferred latent codes with test morphometrics (INFOGAN-C)
|
| 198 |
+
|
| 199 |
+
type of local perturbation. The model investigated here, dubbed INFOGAN-C (cf. Table 2), had a 10-way categorical, two continuous and two binary codes, and was trained with a dataset of plain, swollen and fractured digits (randomly mixed as above).
|
| 200 |
+
|
| 201 |
+
Again via inferential partial correlation analysis—now including ground-truth perturbation annotations—we can quantitatively verify that this particular model instance was unable to meaningfully capture the perturbations (Fig. 8, bottom-right block). In fact, it appears that the addition of the binary variables did not lead to more expressive representations in this case, even impairing the disentanglement of the categorical variables, if compared to Figs. 5a and 5b, for example.
|
| 202 |
+
|
| 203 |
+
# 5 CONCLUSION
|
| 204 |
+
|
| 205 |
+
With Morpho-MNIST we provide a number of mechanisms to quantitatively assess representation learning with respect to measurable factors of variation in the data. We believe that this is an important asset for future research on generative models, and we would like to emphasize that the proposed morphometrics can be used post hoc to evaluate already trained models, potentially revealing novel insights and interesting observations.
|
| 206 |
+
|
| 207 |
+
A similar morphometry approach could be used with other datasets such as dSprites, e.g. estimating shape location and size, number of objects/connected components. Perhaps some generic image metrics may be useful for analysis on other datasets, e.g. relating to sharpness or colour diversity, or we could even consider using the output of object detectors (analogously to the Inception-based scores; e.g. number/class of objects, bounding boxes etc.). In future work we plan to include additional perturbations, for example, mimicking imaging artefacts commonly observed in medical imaging modalities to add further complexity and realism.
|
| 208 |
+
|
| 209 |
+
# REFERENCES
|
| 210 |
+
|
| 211 |
+
Arora, S., Risteski, A., and Zhang, Y. (2018). Do GANs learn the distribution? Some theory and empirics. In International Conference on Learning Representations (ICLR 2018).
|
| 212 |
+
|
| 213 |
+
Aubry, M., Maturana, D., Efros, A. A., Russell, B. C., and Sivic, J. (2014). Seeing 3D chairs: exemplar part-based 2D–3D alignment using a large dataset of CAD models. In Proceedings of the 2014 IEEE Conference on Computer Vision and Pattern Recognition (CVPR 2014), pages 3762–3769. IEEE. Dataset URL https://www.di.ens.fr/willow/research/seeing3Dchairs/.
|
| 214 |
+
|
| 215 |
+
Binkowski, M., Sutherland, D., Arbel, M., and Gretton, A. (2018). Demystifying MMD GANs. In ´ International Conference on Learning Representations (ICLR 2018). arXiv:1801.01401v1.
|
| 216 |
+
|
| 217 |
+
Bounliphone, W., Belilovsky, E., Blaschko, M. B., Antonoglou, I., and Gretton, A. (2016). A test of relative similarity for model selection in generative models. In International Conference on Learning Representations (ICLR 2016). arXiv:1511.04581.
|
| 218 |
+
|
| 219 |
+
Bulatov, Y. (2011). notMNIST dataset. URL https://yaroslavvb.blogspot.co.uk/ 2011/09/notmnist-dataset.html. [Accessed on: 2018-05-08].
|
| 220 |
+
|
| 221 |
+
Chen, T. Q., Li, X., Grosse, R., and Duvenaud, D. (2018). Isolating sources of disentanglement in variational autoencoders. In International Conference on Learning Representations Workshop (ICLR 2018). arXiv:1802.04942.
|
| 222 |
+
|
| 223 |
+
Chen, X., Duan, Y., Houthooft, R., Schulman, J., Sutskever, I., and Abbeel, P. (2016). InfoGAN: Interpretable representation learning by information maximizing generative adversarial nets. In Advances in Neural Information Processing Systems 29 (NIPS 2016), pages 2172–2180.
|
| 224 |
+
|
| 225 |
+
Cohen, G., Afshar, S., Tapson, J., and van Schaik, A. (2017). EMNIST: an extension of MNIST to handwritten letters, arXiv:1702.05373. Dataset URL https://www.nist.gov/itl/iad/ image-group/emnist-dataset.
|
| 226 |
+
|
| 227 |
+
Dupont, E. (2018). Learning disentangled joint continuous and discrete representations, arXiv:1804.00104v2.
|
| 228 |
+
|
| 229 |
+
Goodfellow, I., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A., and Bengio, Y. (2014). Generative adversarial nets. In Advances in Neural Information Processing Systems 27 (NIPS 2014), pages 2672–2680.
|
| 230 |
+
|
| 231 |
+
Gretton, A., Borgwardt, K. M., Rasch, M. J., Schölkopf, B., and Smola, A. J. (2012). A kernel two-sample test. Journal of Machine Learning Research, 13(Mar):723–773.
|
| 232 |
+
|
| 233 |
+
Grother, P. J. and Hanaoka, K. K. (2016). NIST Special Database 19. Technical report, National Institute of Standards and Technology, Gaithersburg, MD, USA. Dataset URL https://www. nist.gov/srd/nist-special-database-19.
|
| 234 |
+
|
| 235 |
+
Heusel, M., Ramsauer, H., Unterthiner, T., Nessler, B., and Hochreiter, S. (2017). GANs trained by a two time-scale update rule converge to a local Nash equilibrium. In Advances in Neural Information Processing Systems 30 (NIPS 2017), pages 6626–6637.
|
| 236 |
+
|
| 237 |
+
Higgins, I., Matthey, L., Pal, A., Burgess, C., Glorot, X., Botvinick, M., Mohamed, S., and Lerchner, A. (2017). $\beta$ -VAE: Learning basic visual concepts with a constrained variational framework. In International Conference on Learning Representations (ICLR 2017).
|
| 238 |
+
|
| 239 |
+
Kingma, D. P. and Welling, M. (2013). Auto-encoding variational Bayes, arXiv:1312.6114.
|
| 240 |
+
|
| 241 |
+
Kumar, A., Sattigeri, P., and Balakrishnan, A. (2018). Variational inference of disentangled latent concepts from unlabeled observations. In International Conference on Learning Representations (ICLR 2018).
|
| 242 |
+
|
| 243 |
+
Larochelle, H., Erhan, D., Courville, A., Bergstra, J., and Bengio, Y. (2007). An empirical evaluation of deep architectures on problems with many factors of variation. In Proceedings of the 24th International Conference on Machine Learning (ICML 2007), pages 473–480, New York, New York, USA. ACM Press. Dataset URL https://www.iro.umontreal.ca/\~lisa/ twiki/bin/view.cgi/Public/MnistVariations.
|
| 244 |
+
|
| 245 |
+
LeCun, Y., Bottou, L., Bengio, Y., and Haffner, P. (1998). Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324. Dataset URL http:// yann.lecun.com/exdb/mnist/.
|
| 246 |
+
Lloyd, J. R. and Ghahramani, Z. (2015). Statistical model criticism using kernel two sample tests. In Advances in Neural Information Processing Systems 28 (NIPS 2015), pages 829–837.
|
| 247 |
+
Loosli, G., Canu, S., and Bottou, L. (2007). Training invariant support vector machines using selective sampling. In Bottou, L., Chapelle, O., DeCoste, D., and Weston, J., editors, Large Scale Kernel Machines, pages 301–320. MIT Press, Cambridge, MA. Dataset URL http: //leon.bottou.org/projects/infimnist.
|
| 248 |
+
Makhzani, A., Shlens, J., Jaitly, N., Goodfellow, I., and Frey, B. (2015). Adversarial autoencoders, arXiv:1511.05644.
|
| 249 |
+
Matthey, L., Higgins, I., Hassabis, D., and Lerchner, A. (2017). dSprites: disentanglement testing sprites dataset. URL https://github.com/deepmind/dsprites-dataset/. [Accessed on: 2018-05-08].
|
| 250 |
+
Paysan, P., Knothe, R., Amberg, B., Romdhani, S., and Vetter, T. (2009). A 3D face model for pose and illumination invariant face recognition. In Proceedings of the Sixth IEEE International Conference on Advanced Video and Signal Based Surveillance (AVSS 2009), pages 296–301. IEEE. Dataset URL https://faces.dmi.unibas.ch/bfm/index.php?nav=1-1-1&id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ scans.
|
| 251 |
+
Salimans, T., Goodfellow, I., Zaremba, W., Cheung, V., Radford, A., and Chen, X. (2016). Improved techniques for training GANs. In Advances in Neural Information Processing Systems 29 (NIPS 2016), pages 2234–2242.
|
| 252 |
+
Scott, D. W. (1992). Multivariate Density Estimation: Theory, Practice and Visualization. John Wiley & Sons, Inc., New York.
|
| 253 |
+
Sutherland, D. J., Tung, H.-Y., Strathmann, H., De, S., Ramdas, A., Smola, A. J., and Gretton, A. (2017). Generative models and model criticism via optimized maximum mean discrepancy. In International Conference on Learning Representations (ICLR 2017). arXiv:1611.04488.
|
| 254 |
+
Szegedy, C., Vanhoucke, V., Ioffe, S., Shlens, J., and Wojna, Z. (2016). Rethinking the Inception architecture for computer vision. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR 2016), pages 2818–2826. IEEE.
|
| 255 |
+
Teow, L.-N. and Loe, K.-F. (2002). Robust vision-based features and classification schemes for off-line handwritten digit recognition. Pattern Recognition, 35(11):2355–2364.
|
| 256 |
+
Theis, L., van den Oord, A., and Bethge, M. (2016). A note on the evaluation of generative models. In International Conference on Learning Representations (ICLR 2016).
|
| 257 |
+
Tieleman, T. (2013). affNIST. URL https://www.cs.toronto.edu/\~tijmen/ affNIST/, Dataset URL https://www.cs.toronto.edu/\~tijmen/affNIST/. [Accessed on: 2018-05-08].
|
| 258 |
+
van der Walt, S., Schönberger, J. L., Nunez-Iglesias, J., Boulogne, F., Warner, J. D., Yager, N., Gouillart, E., and Yu, T. (2014). scikit-image: image processing in Python. PeerJ, 2:e453.
|
| 259 |
+
Xiao, H., Rasul, K., and Vollgraf, R. (2017). Fashion-MNIST: a novel image dataset for benchmarking machine learning algorithms, arXiv:1708.07747. Dataset URL https://github.com/ zalandoresearch/fashion-mnist.
|
| 260 |
+
|
| 261 |
+

|
| 262 |
+
Figure A.1: Distribution of morphological attributes for plain MNIST digits. Top: training set; bottom: test set.
|
| 263 |
+
|
| 264 |
+

|
| 265 |
+
Figure A.2: Distribution of morphological attributes for thinned MNIST digits. Top: training set; bottom: test set.
|
| 266 |
+
|
| 267 |
+

|
| 268 |
+
Figure A.3: Distribution of morphological attributes for thickened MNIST digits. Top: training set; bottom: test set.
|
| 269 |
+
|
| 270 |
+

|
| 271 |
+
Figure A.4: Distribution of morphological attributes for swollen MNIST digits. Top: training set; bottom: test set.
|
| 272 |
+
|
| 273 |
+

|
| 274 |
+
Figure A.5: Distribution of morphological attributes for fractured MNIST digits. Top: training set; bottom: test set.
|
| 275 |
+
|
| 276 |
+
# B PERTURBATION EXAMPLES
|
| 277 |
+
|
| 278 |
+

|
| 279 |
+
Figure B.1: Examples of globally thinned digits
|
| 280 |
+
|
| 281 |
+

|
| 282 |
+
Figure B.2: Examples of globally thickened digits
|
| 283 |
+
|
| 284 |
+

|
| 285 |
+
Figure B.3: Examples of digits with local swellings
|
| 286 |
+
|
| 287 |
+

|
| 288 |
+
Figure B.4: Examples of digits with local fractures
|
| 289 |
+
|
| 290 |
+
# C MMD DETAILS
|
| 291 |
+
|
| 292 |
+
We employed a Gaussian product kernel with bandwidths derived from Scott’s rule, analogously to the KDE plots in Fig. 4. Scott’s rule of thumb defines the bandwidth for a density estimation kernel as $N ^ { - 1 / ( D + 4 ) }$ times the standard deviation in each dimension, where $N$ and $D$ denote sample size and number of dimensions (Scott, 1992, Eq. (6.42)). We determine the KDE bandwidths separately for real and sample data, then add their squares to obtain the squared bandwidth of the MMD’s Gaussian kernel, as it corresponds to the convolution of the density estimation kernels chosen for each set of data. See Gretton et al. (2012, $\ S 3 . 3 . 1 $ for further details on the relation between MMD and $L _ { 2 }$ distance of kernel density estimates.
|
| 293 |
+
|
| 294 |
+
Whereas the bandwidth heuristic used here is fairly crude, much more sophisticated kernel selection procedures are available, e.g. by explicitly optimising the test power (Sutherland et al., 2017). A further analysis tool in a similar vein would be to apply a relative MMD similarity test (Bounliphone et al., 2016), to rank trained models based on sample fidelity. It would also be possible to adopt a model criticism methodology based on the MMD witness function (Lloyd and Ghahramani, 2015), to identify over- and under-represented regions in morphometric space (and corresponding generated image exemplars could be inspected as well).
|
| 295 |
+
|
| 296 |
+
# D SUPERVISED TASKS
|
| 297 |
+
|
| 298 |
+
Although the driving motivation for introducing Morpho-MNIST has been the lack of means for quantitative evaluation of generative models, the proposed framework may also be a valuable resource in the context of supervised learning. We conducted several experiments to demonstrate potential applications of these datasets with increased difficulty due to the injected perturbations: standard digit recognition, supervised abnormality detection, and thickness regression. Note such experiments can later serve as baselines for unsupervised tasks such as outlier detection and domain adaptation.
|
| 299 |
+
|
| 300 |
+
We evaluated four different models: $k$ -nearest-neighbours $( k \mathsf { N N } )$ using $k = 5$ neighbours and $\ell _ { 1 }$ distance weighting, a support vector machine (SVM) with polynomial kernel and penalty parameter $C = 1 0 0$ , a multi-layer perceptron (MLP) with 784–200–200– $L$ architecture ( $L$ : number of outputs), and a LeNet-5 convolutional neural network (LeCun et al., 1998). Here, we use the same datasets as in the disentanglement experiments (Section 4.2): plain digits (PLAIN), plain mixed with thinned and thickened digits (GLOBAL), and plain mixed with swollen and fractured digits (LOCAL).
|
| 301 |
+
|
| 302 |
+
For digit recognition, each model is trained once on PLAIN, then tested on both PLAIN and LOCAL test datasets, to investigate the effect of domain shift. All methods suffer a drop in test accuracy on LOCAL (Table 3, first two columns). kNN appears to be the most robust to the local perturbations, perhaps because they affect only a few pixels, leaving the image distance between neighbours largely unchanged. On the other hand, local patterns that LeNet-5 relies on may have changed considerably.
|
| 303 |
+
|
| 304 |
+
The abnormality detection task is, using the LOCAL dataset, to predict whether a digit is normal or perturbed (swollen or fractured)—compare with lesion detection in medical scans. Table 3 (third column) indicates that LeNet-5 is able to detect abnormalities with high accuracy, likely thanks to local invariances of its convolutional architecture. Note that all scores (especially the simpler models’) are lower than digit classification accuracy, revealing the (possibly surprising) higher difficulty of this binary classification problem compared to the ten-class digit classification.
|
| 305 |
+
|
| 306 |
+
Finally, we also constructed a regression task for digit thickness using the GLOBAL dataset, mimicking medical imaging tasks such as estimating brain age from cortical grey matter maps. Since this is a non-trivial task, requiring some awareness of local geometry, it is perhaps unsurprising that the convolutional model outperformed the others, which rely on holistic features (Table 3, last column).
|
| 307 |
+
|
| 308 |
+
Table 3: Accuracy on supervised tasks using the proposed data perturbations
|
| 309 |
+
|
| 310 |
+
<table><tr><td rowspan="2">Model</td><td colspan="2">Digit Recognition (%)</td><td rowspan="2">Abnormality Detection (%)</td><td rowspan="2">Thickness Regression (RMSE, pixels)</td></tr><tr><td>PLAIN</td><td>LOCAL</td></tr><tr><td>kNN</td><td>96.25</td><td>95.22</td><td>65.10</td><td>0.4674</td></tr><tr><td>SVM</td><td>95.71</td><td>92.47</td><td>77.59</td><td>0.3647</td></tr><tr><td>MLP</td><td>97.97</td><td>93.15</td><td>88.25</td><td>0.3481</td></tr><tr><td>LeNet-5</td><td>98.95</td><td>95.33</td><td>97.53</td><td>0.2790</td></tr></table>
|
md/train/rJGZq6g0-/rJGZq6g0-.md
ADDED
|
@@ -0,0 +1,311 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# EMERGENT COMMUNICATION IN AMULTI-MODAL, MULTI-STEP REFERENTIAL GAME
|
| 2 |
+
|
| 3 |
+
Katrina Evtimova1, Andrew Drozdov2, Douwe Kiela3, and Kyunghyun Cho1,2,3,4
|
| 4 |
+
|
| 5 |
+
1Center for Data Science. New York University 2Department of Computer Science. New York University 3Facebook AI Research 4CIFAR Azrieli Global Scholar
|
| 6 |
+
|
| 7 |
+
# ABSTRACT
|
| 8 |
+
|
| 9 |
+
Inspired by previous work on emergent communication in referential games, we propose a novel multi-modal, multi-step referential game, where the sender and receiver have access to distinct modalities of an object, and their information exchange is bidirectional and of arbitrary duration. The multi-modal multi-step setting allows agents to develop an internal communication significantly closer to natural language, in that they share a single set of messages, and that the length of the conversation may vary according to the difficulty of the task. We examine these properties empirically using a dataset consisting of images and textual descriptions of mammals, where the agents are tasked with identifying the correct object. Our experiments indicate that a robust and efficient communication protocol emerges, where gradual information exchange informs better predictions and higher communication bandwidth improves generalization.
|
| 10 |
+
|
| 11 |
+
# 1 INTRODUCTION
|
| 12 |
+
|
| 13 |
+
Recently, there has been a surge of work on neural network-based multi-agent systems that are capable of communicating with each other in order to solve a problem. Two distinct lines of research can be discerned. In the first one, communication is used as an essential tool for sharing information among multiple active agents in a reinforcement learning scenario (Sukhbaatar et al., 2016; Foerster et al., 2016; Mordatch & Abbeel, 2017; Andreas et al., 2017). Each of the active agents is, in addition to its traditional capability of interacting with the environment, able to communicate with other agents. A population of such agents is subsequently jointly tuned to reach a common goal. The main goal of this line of work is to use communication (which may be continuous) as a means to enhance learning in a difficult, sparse-reward environment. The communication may also mimic human conversation, e.g., in settings where agents engage in natural language dialogue based on a shared visual modality (Das et al., 2017; Strub et al., 2017).
|
| 14 |
+
|
| 15 |
+
In contrast, the goal of our work is to learn the communication protocol, and aligns more closely with another line of research, which focuses on investigating and analyzing the emergence of communication in (cooperative) multi-agent referential games (Lewis, 2008; Skyrms, 2010; Steels & Loetzsch, 2012), where one agent (the sender) must communicate what it sees using some discrete emergent communication protocol, while the other agent (the receiver) is tasked with figuring out what the first agent saw. These lines of work are partially motivated by the idea that artificial communication (and other manifestations of machine intelligence) can emerge through interacting with the world and/or other agents, which could then converge towards human language (Gauthier & Mordatch, 2016; Mikolov et al., 2015; Lake et al., 2016; Kiela et al., 2016). (Lazaridou et al., 2016) have recently proposed a basic version of this game, where there is only a single transmission of a message from the sender to the receiver, as a test bed for both inducing and analyzing a communication protocol between two neural network-based agents. A related approach to using a referential game with two agents is proposed by (Andreas & Klein, 2016). (Jorge et al., 2016) have more recently introduced a game similar to the setting above, but with multiple transmissions of messages between the two agents. The sender is, however, strictly limited to sending single bit (yes/no) messages, and the number of exchanges is kept fixed.
|
| 16 |
+
|
| 17 |
+
These earlier works lack two fundamental aspects of human communication in solving cooperative games. First, human information exchange is bidirectional with symmetric communication abilities, and spans exchanges of arbitrary length. In other words, linguistic interaction is not one-way, and can take as long or as short as it needs. Second, the information exchange emerges as a result of a disparity in knowledge or access to information, with the capability of bridging different modalities. For example, a human who has never seen a tiger but knows that it is a “big cat with stripes” would be able to identify one in a picture without effort. That is, humans can identify a previously unseen object from a textual description alone, while agents in previous interaction games have access to the same modality (a picture) and their shared communication protocol.
|
| 18 |
+
|
| 19 |
+
Based on these considerations, we extend the basic referential game used in (Lazaridou et al., 2016; Andreas & Klein, 2016; Jorge et al., 2016) and (Havrylov & Titov, 2017) into a multi-modal, multi-step referential game. Firstly, our two agents, the sender and receiver, are grounded in different modalities: one has access only to the visual modality, while the other has access only to textual information (multi-modal). The sender sees an image and communicates it to the receiver whose job is to determine which object the sender refers to, while only having access to a set of textual descriptions. Secondly, communication is bidirectional and symmetrical, in that both the sender and receiver may send an arbitrary binary vector to each other. Furthermore, we allow the receiver to autonomously decide when to terminate a conversation, which leads to an adaptive-length conversation (multistep). The multi-modal nature of our proposal enforces symmetric, high-bandwidth communication, as it is not enough for the agents to simply exchange the carbon copies of their modalities (e.g. communicating the value of an arbitrary pixel in an image) in order to solve the problem. The multistep nature of our work allows us to train the agents to develop an efficient strategy of communication, implicitly encouraging a shorter conversation for simpler objects and a longer conversation for more complex objects.
|
| 20 |
+
|
| 21 |
+
We evaluate and analyze the proposed multi-modal, multi-step referential game by creating a new dataset consisting of images of mammals and their textual descriptions. The task is somewhat related to recently proposed multi-modal dialogue games, such as that of (de Vries et al., 2016), but then played by agents using their own emergent communication. We build neural network-based sender and receiver, implementing techniques such as visual attention (Xu et al., 2015) and textual attention (Bahdanau et al., 2014). Each agent generates a multi-dimensional binary message at each time step, and the receiver decides whether to terminate the conversation. We train both agents jointly using policy gradient (Williams, 1992).
|
| 22 |
+
|
| 23 |
+
# 2 MULTI-MODAL, MULTI-STEP REFERENTIAL GAME
|
| 24 |
+
|
| 25 |
+
Game The proposed multi-modal, multi-step referential game is characterized by a tuple
|
| 26 |
+
|
| 27 |
+
$$
|
| 28 |
+
G = \langle S , O , O _ { S } , O _ { R } , s ^ { * } \rangle .
|
| 29 |
+
$$
|
| 30 |
+
|
| 31 |
+
$S$ is a set of all possible messages used for communication by both the sender and receiver. An analogy of $S$ in natural languages would be a set of all possible sentences. Unlike (Jorge et al., 2016), we let $S$ be shared between the two agents, which makes the proposed game a more realistic proxy to natural language conversations where two parties share a single vocabulary. In this paper, we define the set of symbols to be a set of $d$ -dimensional binary vectors, reminiscent of the widely-used bag-of-words representation of a natural language sentence. That is, $S = \{ 0 , 1 \} ^ { d }$ .
|
| 32 |
+
|
| 33 |
+
$O$ is a set of objects. $O _ { S }$ and $O _ { R }$ are the sets of two separate views, or modes, of the objects in $O$ , exposed to the sender and receiver, respectively. Due to the variability introduced by the choice of mode, the cardinalities of the latter two sets may differ, i.e., $| O _ { S } | \ne | O _ { R } |$ , and it is usual for the cardinalities of both $O _ { S }$ and $O _ { R }$ to be greater than or equal to that of $O$ , i.e., $| O _ { S } | \ge | O |$ and $\left| O _ { R } \right| \ge \left| O \right|$ . In this paper, for instance, $O$ is a set of selected mammals, and $O _ { S }$ and $O _ { R }$ are, respectively, images and textual descriptions of those mammals: $| O _ { S } | \gg | O _ { R } | = | O |$ .
|
| 34 |
+
|
| 35 |
+
The ground-truth map between $O _ { S }$ and $O _ { R }$ is given as
|
| 36 |
+
|
| 37 |
+
$$
|
| 38 |
+
s ^ { * } : O _ { S } \times O _ { R } \to \{ 0 , 1 \} .
|
| 39 |
+
$$
|
| 40 |
+
|
| 41 |
+

|
| 42 |
+
Figure 1: Visualizing a sender-receiver exchange at time step $t$ . See Sec. 2 and 3 for more details.
|
| 43 |
+
|
| 44 |
+
This function $s ^ { * }$ is used to determine whether elements $o _ { s } \in O _ { S }$ and $o _ { r } \in O _ { R }$ belong to the same object in $O$ . It returns 1 when they do, and 0 otherwise. At the end of a conversation, the receiver selects an element from $O _ { R }$ as an answer, and $s ^ { * }$ is used as a scorer of this particular conversation based on the sender’s object $o _ { s }$ and the receiver’s prediction $\hat { o } _ { r }$ .
|
| 45 |
+
|
| 46 |
+
Agents The proposed game is played between two agents, sender $A _ { S }$ and receiver $A _ { R }$ . A sender is a stochastic function that takes as input the sender’s view of an object $o _ { s } \in O _ { S }$ and the message $m _ { r } \in S$ received from the receiver and outputs a binary message $m _ { s } \in S$ . That is,
|
| 47 |
+
|
| 48 |
+
$$
|
| 49 |
+
A _ { S } : O _ { S } \times S S .
|
| 50 |
+
$$
|
| 51 |
+
|
| 52 |
+
We constrain the sender to be memory-less in order to ensure any message created by the sender is a response to an immediate message sent by the receiver.
|
| 53 |
+
|
| 54 |
+
Unlike the sender, it is necessary for the receiver to possess a memory in order to reason through a series of message exchanges with the sender and make a final prediction. The receiver also has an option to determine whether to terminate the on-going conversation. We thus define the receiver as:
|
| 55 |
+
|
| 56 |
+
$$
|
| 57 |
+
A _ { R } : S \times \mathbb { R } ^ { q } \to \Xi \times O _ { R } \times S \times \mathbb { R } ^ { q } ,
|
| 58 |
+
$$
|
| 59 |
+
|
| 60 |
+
where $\Xi = \{ 0 , 1 \}$ indicates whether to terminate the conversation. It receives the sender’s message $m _ { s } \in S$ and its memory $h \in \mathbb { R } ^ { q }$ from the previous step, and stochastically outputs: (1) whether to terminate the conversation $s \in \{ 0 , 1 \}$ , (2) its prediction $\hat { o } _ { r } \in O _ { R }$ (if decided to terminate) and (3) a message $m _ { r } \in S$ back to the sender (if decided not to terminate).
|
| 61 |
+
|
| 62 |
+
Play Given $G$ , one game instance is initiated by uniformly selecting an object $o$ from the object set $O$ . A corresponding view $o _ { s } \in O _ { S }$ is sampled and given to the sender $A _ { S }$ . The whole set $O _ { R }$ is provided to the receiver $A _ { R }$ . The receiver’s memory and initial message are learned as separate parameters.
|
| 63 |
+
|
| 64 |
+
# 3 AGENTS
|
| 65 |
+
|
| 66 |
+
At each time step $t \in \{ 1 , \dots , T _ { \operatorname* { m a x } } \}$ , the sender computes its message $m _ { s } ^ { t } = A _ { S } ( o _ { s } , m _ { r } ^ { t - 1 } )$ . This message is then transmitted to the receiver. The receiver updates its memory $h _ { r } ^ { t }$ , decides whether to terminate the conversation $s ^ { t }$ , makes its prediction $o _ { r } ^ { t }$ , and creates a response: $( s ^ { t } , o _ { r } ^ { t } , m _ { r } ^ { t } , h _ { r } ^ { t } ) =$ $A _ { R } ( m _ { s } ^ { t } , h _ { r } ^ { t - 1 } )$ . If $s ^ { t } = 1$ , the conversation terminates, and the receiver’s prediction $o _ { r } ^ { t }$ is used to score this game instance, i.e., $s ^ { * } \big ( o _ { s } , o _ { r } ^ { t } \big )$ . Otherwise, this process repeats in the next time step: $t \gets t + 1$ . Fig. 1 depicts a single sender-receiver exchange at time step $t$ .
|
| 67 |
+
|
| 68 |
+
Feedforward Sender Let $o _ { s } \in O _ { S }$ be a real-valued vector, and $m _ { r } \in S$ be a $d$ -dimensional binary message. We build a sender $A _ { S }$ as a feedforward neural network that outputs a $d$ -dimensional factorized Bernoulli distribution. It first computes the hidden state $h _ { s }$ by
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
h _ { s } = f _ { s } ( o _ { s } , m _ { r } ) ,
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+
and computes $p ( m _ { s , j } = 1 )$ for all $j = 1 , \ldots , d$ as
|
| 75 |
+
|
| 76 |
+
$$
|
| 77 |
+
p ( m _ { s , j } = 1 ) = \sigma ( w _ { s , j } ^ { \top } h _ { s } + b _ { s , j } ) ,
|
| 78 |
+
$$
|
| 79 |
+
|
| 80 |
+
where $\sigma$ is a sigmoid function, and $w _ { s , j } \in \mathbb { R } ^ { \dim ( h _ { s } ) }$ and $b _ { s , j } \in \mathbb { R }$ are the weight vector and bias, respectively. During training, we sample a sender’s message from this distribution, while during test time we take the most likely message, i.e., $m _ { s , j } = \arg \operatorname* { m a x } _ { b \in \{ 0 , 1 \} } p ( m _ { s , j } = b )$ .
|
| 81 |
+
|
| 82 |
+
Attention-based Sender When the view $o _ { s }$ of an object is given as a set of vectors $\{ o _ { s _ { 1 } } , \ldots , o _ { s _ { n } } \}$ rather than a single vector, we implement and test an attention mechanism from (Bahdanau et al., 2014; Xu et al., 2015). For each vector in the set, we first compute the attention weight against the received message mr as αj = $\begin{array} { r } { \alpha _ { j } = \frac { \exp ( f _ { s , \mathrm { a t } } ( o _ { s _ { j } } , m _ { r } ) ) } { \sum _ { j ^ { \prime } = 1 } ^ { n } \exp ( f _ { s , \mathrm { a t } } ( o _ { s _ { j ^ { \prime } } } , m _ { r } ) ) } } \end{array}$ s,att sj r exp(fs,att(os 0 ,mr)) , and take the weighted-sum of the input vectors: $\begin{array} { r } { \tilde { o } _ { s } = \sum _ { j = 1 } ^ { n } \alpha _ { j } o _ { s _ { j } } } \end{array}$ j0=1 j . This weighted sum is used instead of $o _ { s }$ as an input to $f _ { s }$ in Eq. (1). according to a receiver’s query.
|
| 83 |
+
|
| 84 |
+
Recurrent Receiver Let $o _ { r } \in O _ { R }$ be a real-valued vector, and $m _ { s } \in S$ be a $d$ -dimensional binary message received from the sender. A receiver $A _ { R }$ is a recurrent neural network that first updates its memory by $h _ { r } ^ { t } = f _ { r } ( m _ { s } ^ { t } , h _ { r } ^ { t - 1 } ) \in \mathbb { R } ^ { q }$ , where $f _ { r }$ is a recurrent activation function. We use a gated recurrent unit (GRU, Cho et al., 2014). The initial message from the receiver to the sender, $\bar { m } _ { r } ^ { 0 }$ , is learned as a separate parameter.
|
| 85 |
+
|
| 86 |
+
Given the updated memory vector $h _ { r } ^ { t }$ , the receiver first computes whether to terminate the conversation. This is done by outputting a stop probability, as in
|
| 87 |
+
|
| 88 |
+
$$
|
| 89 |
+
p ( s ^ { t } = 1 ) = \sigma ( w _ { r , s } ^ { \top } h _ { r } ^ { t } + b _ { r , s } ) ,
|
| 90 |
+
$$
|
| 91 |
+
|
| 92 |
+
where $w _ { r , s } \in \mathbb { R } ^ { q }$ and $b _ { r , s } \in \mathbb { R }$ are the weight vector and bias, respectively. The receiver terminates the conversation $\boldsymbol s ^ { t } = 1$ ) by either sampling from (during training) or taking the most likely value (during test time) of this distribution. If $s ^ { \bar { t } } = 0$ , the receiver computes the message distribution similarly to the sender as a $d$ -dimensional factorized Bernoulli distribution:
|
| 93 |
+
|
| 94 |
+
$$
|
| 95 |
+
p ( \boldsymbol { m } _ { r , j } ^ { t } = 1 ) = \sigma ( w _ { r , j } ^ { \top } \operatorname { t a n h } \left( W _ { r } ^ { \top } h _ { r } ^ { t } + U _ { r } ^ { \top } \Big ( \sum _ { o _ { r } \in O _ { R } } p ( o _ { r } = 1 ) g _ { r } ( o _ { r } ) \Big ) + c _ { r } \right) + b _ { r , j } ) ,
|
| 96 |
+
$$
|
| 97 |
+
|
| 98 |
+
where $g _ { r } : \mathbb { R } ^ { \dim ( o _ { r } ) } \mathbb { R } ^ { q }$ is a trainable function that embeds $o _ { r }$ into a $q$ -dimensional real-valued vector space. The second term inside the tanh function ensures that the message generated by the receiver takes into consideration the receiver’s current belief $p ( o _ { r } = 1 )$ (see Eq. (2)) on which object the sender is viewing.
|
| 99 |
+
|
| 100 |
+
If $s ^ { t } = 1$ (terminate), the receiver instead produces its prediction by computing the distribution over all the elements in $O _ { R }$ :
|
| 101 |
+
|
| 102 |
+
$$
|
| 103 |
+
p ( o _ { r } = 1 ) = \frac { \exp ( g _ { r } ( o _ { r } ) ^ { \top } h _ { r } ^ { t } ) } { \sum _ { o _ { r } ^ { \prime } \in O _ { R } } \exp ( g _ { r } ( o _ { r } ^ { \prime } ) ^ { \top } h _ { r } ^ { t } ) } .
|
| 104 |
+
$$
|
| 105 |
+
|
| 106 |
+
Again, $g _ { r } ( o _ { r } )$ is the embedding of an object $o$ based on the receiver’s view $o _ { r }$ , similarly to what was proposed by (Larochelle et al., 2008). The receiver’s prediction is given by $\begin{array} { r l } { \hat { o } _ { r } } & { { } = } \end{array}$ arg $\begin{array} { r } { \operatorname* { m a x } _ { o _ { r } \in O _ { R } } p ( o _ { r } = 1 ) \ } \end{array}$ , and the entire prediction distribution is used to compute the cross-entropy loss.
|
| 107 |
+
|
| 108 |
+
Attention-based Receiver Similarly to the sender, we can incorporate the attention mechanism in the receiver. This is done at the level of the embedding function $g _ { r }$ by modifying it to take as input both the set of vectors $o _ { r } = \{ o _ { r , 1 } , . . . , o _ { r , n } \}$ and the current memory vector $h _ { r } ^ { t }$ . Attention weights over the view vectors are computed against the memory vector, and their weighted sum ${ \tilde { o } } _ { r }$ , or its affine transformation to $\mathbb { R } ^ { q }$ , is returned.
|
| 109 |
+
|
| 110 |
+
# 4 TRAINING
|
| 111 |
+
|
| 112 |
+
Both the sender and receiver are jointly trained in order to maximize the score $s ^ { * } \mathopen { } \mathclose \bgroup \left( o _ { s } , \hat { o } _ { r } \aftergroup \egroup \right)$ . Our per-instance loss function $L ^ { i }$ is the sum of the classification loss $L _ { c } ^ { i }$ and the reinforcement learning loss $L _ { r } ^ { i }$ . The classification loss is a usual cross-entropy loss defined as
|
| 113 |
+
|
| 114 |
+
$$
|
| 115 |
+
L _ { c } ^ { i } = \log p ( o _ { r } ^ { * } = 1 ) ,
|
| 116 |
+
$$
|
| 117 |
+
|
| 118 |
+
where $o _ { r } ^ { * } \in O _ { R }$ is the view of the correct object. The reinforcement learning loss is defined as
|
| 119 |
+
|
| 120 |
+
$$
|
| 121 |
+
\dot { \bar { \mathbf { \xi } } _ { r } } = \sum _ { t = 1 } ^ { T } ( R - B _ { s } ( o _ { s } , m _ { r } ^ { t - 1 } ) ) \sum _ { j = 1 } ^ { d } \log p ( m _ { s , j } ^ { t } ) + ( R - B _ { r } ( m _ { r } ^ { t } , h _ { r } ^ { t - 1 } ) ) ( \log p ( s ^ { t } ) + \sum _ { j = 1 } ^ { d } \log p ( m _ { r , j } ^ { t } ) ) ,
|
| 122 |
+
$$
|
| 123 |
+
|
| 124 |
+
where $R$ is a reward given by the ground-truth mapping $s ^ { * }$ . This reinforcement learning loss corresponds to REINFORCE (Williams, 1992). $B _ { s }$ and $B _ { r }$ are baseline estimators for the sender and receiver, respectively, and both of them are trained to predict the final reward $R$ , as suggested by (Mnih & Gregor, 2014):
|
| 125 |
+
|
| 126 |
+
$$
|
| 127 |
+
L _ { B } ^ { i } = \sum _ { t = 1 } ^ { T } ( R - B _ { s } ( o _ { s } , m _ { r } ^ { t - 1 } ) ) ^ { 2 } + ( R - B _ { r } ( m _ { s } ^ { t } , h _ { r } ^ { t - 1 } ) ) ^ { 2 } .
|
| 128 |
+
$$
|
| 129 |
+
|
| 130 |
+
In order to facilitate the exploration by the sender and receiver during training, we regularize the negative entropies of the sender’s and receiver’s message distributions. We also minimize the negative entropy of the receiver’s termination distribution to encourage the conversation to be of length $1 - ( \frac { \bf \bar { 1 } } { 2 } ) ^ { T _ { \mathrm { m a x } } }$ )Tmax on average.
|
| 131 |
+
|
| 132 |
+
The final per-instance loss can then be written as
|
| 133 |
+
|
| 134 |
+
$$
|
| 135 |
+
L ^ { i } = L _ { c } ^ { i } + L _ { r } ^ { i } - \sum _ { t = 1 } ^ { T } \Big ( \lambda _ { s } H ( s ^ { t } ) + \lambda _ { m } \sum _ { j = 1 } ^ { d } ( H ( m _ { s , j } ^ { t } ) + H ( m _ { r , j } ^ { t } ) ) \Big ) ,
|
| 136 |
+
$$
|
| 137 |
+
|
| 138 |
+
where $H$ is the entropy, and $\lambda _ { s } \geq 0$ and $\lambda _ { m } \geq 0$ are regularization coefficients. We minimize this loss by computing its gradient with respect to the parameters of both the sender and receiver and taking a step toward the opposite direction.
|
| 139 |
+
|
| 140 |
+
We list all the mathematical symbols used in the description of the game in Appendix A.
|
| 141 |
+
|
| 142 |
+
# 5 EXPERIMENTAL SETTINGS
|
| 143 |
+
|
| 144 |
+
# 5.1 DATA COLLECTION AND PREPROCESSING
|
| 145 |
+
|
| 146 |
+
We collect a new dataset consisting of images and textual descriptions of mammals. We crawl the nodes in the subtree of the “mammal” synset in WordNet (Miller, 1995). For each node, we collect the word $o$ and the corresponding textual description $o _ { r }$ in order to construct the object set $O$ and the receiver’s view set $O _ { R }$ . For each word $o$ , we query Flickr to retrieve as many as 650 images 1. These images form the sender’s view set $O _ { S }$ .
|
| 147 |
+
|
| 148 |
+
We sample 70 mammals from the subtree and build three sets from the collected data. First, we keep a subset of sixty mammals for training (550 images per mammal) and set aside data for validation (50 images per mammal) and test (20 images per mammal). This constitutes the in-domain test, that measures how well the model does on mammals that it is familiar with. We use the remaining ten mammals to build an out-of-domain test set (100 images per mammal), which allows us to test the generalization ability of the sender and receiver to unseen objects, and thereby to determine whether the receiver indeed relies on the availability of a different mode from the sender.
|
| 149 |
+
|
| 150 |
+
In addition to the mammals, we build a third test set consisting of 10 different types of insects, rather than mammals. To construct this transfer test, we uniformly select 100 images per insect at random from the ImageNet dataset (Deng et al., 2009), while the descriptions are collected from WordNet, similarly to the mammals. The test is meant to measure an extreme case of zero-shot generalization, to an entirely different category of objects (i.e., insects rather than mammals, and images from ImageNet rather than from Flickr).
|
| 151 |
+
|
| 152 |
+
Image Processing Instead of a raw image, we use features extracted by ResNet-34 (He et al., 2016). With the attention-based sender, we use 64 $( 8 \times 8 )$ 512-dimensional feature vectors from the final convolutional layer. Otherwise, we use the 512-dimensional feature vector after average pooling those 64 vectors. We do not fine-tune the network.
|
| 153 |
+
|
| 154 |
+
Text Processing Each description is lowercased. Stopwords are filtered using the Stopwords Corpus included in NLTK (Bird et al., 2009). We treat each description as a bag of unique words by removing any duplicates. The average description length is 9.1 words with a standard deviation of 3.16. Because our dataset is relatively small, especially in the textual mode, we use pretrained 100-dimensional GloVe word embeddings (Pennington et al., 2014). With the attention-based receiver, we consider a set of such GloVe vectors as $o _ { r }$ , and otherwise, the average of those vectors is used as the representation of a description.
|
| 155 |
+
|
| 156 |
+
# 5.2 MODELS AND TRAINING
|
| 157 |
+
|
| 158 |
+
Feedforward Sender When attention is not used, the sender is configured to have a single hidden layer with 256 tanh units. The input $o _ { s }$ is constructed by concatenating the image vector, the receiver’s message vector, their point-wise difference and point-wise product, after embedding the image and message vectors into the same space by a linear transformation. The attention-based sender uses a single-layer feedforward network with 256 tanh units to compute the attention weights.
|
| 159 |
+
|
| 160 |
+
Recurrent Receiver The receiver is a single hidden-layer recurrent neural network with 64 gated recurrent units. When the receiver is configured to use attention over the words in each description, we use a feedforward network with a single hidden layer of 64 rectified linear units.
|
| 161 |
+
|
| 162 |
+
Baseline Networks The baseline networks $B _ { s }$ and $B _ { r }$ are both feedforward networks with a single hidden layer of 500 rectified linear units each. The receiver’s baseline network takes as input the recurrent hidden state $h _ { r } ^ { t - 1 }$ but does not backpropagate the error gradient through the receiver.
|
| 163 |
+
|
| 164 |
+
Training and Evaluation We train both the sender and receiver as well as associated baseline networks using RMSProp (Tieleman & Hinton, 2012) with learning rate set to $1 0 ^ { - 4 }$ and minibatches of size 64 each. The coefficients for the entropy regularization, $\lambda _ { s }$ and $\lambda _ { m }$ , are set to 0.08 and 0.01 respectively, based on the development set performance from the preliminary experiments. Each training run is early-stopped based on the development set accuracy for a maximum of 500 epochs. We evaluate each model on a test set by computing the accuracy $@ K$ , where K is set to be $10 \%$ of the number of categories in each of the three test sets (K is either 6 or 7, since we always include the classes from training). We use this metric to enable comparison between the different test sets and to avoid overpenalizing predicting similar classes, e.g. kangaroo and wallaby. We set the maximum length of a conversation to be 10, i.e., $T _ { \mathrm { m a x } } = 1 0$ . We train on a single GPU (Nvidia Titan X Pascal), and a single experiment takes roughly 8 hours for 500 epochs.
|
| 165 |
+
|
| 166 |
+
Code We used PyTorch [http://pytorch.org]. Our implementation of the agents and instructions on how to build the dataset are available on Github [https://github.com/nyu-dl/MultimodalGame].
|
| 167 |
+
|
| 168 |
+
# 6 RESULTS AND ANALYSIS
|
| 169 |
+
|
| 170 |
+
The model and approach in this paper are differentiated from previous work mainly by: 1) the variable conversation length, 2) the multi-modal nature of the game and 3) the particular nature of the communication protocol, i.e., the messages. In this section, we experimentally examine our setup and specifically test the following hypotheses:
|
| 171 |
+
|
| 172 |
+
• The more difficult or complex the referential game, the more dialogue turns would be needed if humans were to play it. Similarly, we expect the receiver to need more information, and ask more questions, if the problem is more difficult. Hence, we examine the relationship between conversation length and accuracy/difficulty.
|
| 173 |
+
• As the agents take turns in a continuing conversation, more information becomes available, which implies that the receiver should become more sure about its prediction, even if the problem is difficult to begin with. Thus, we separately examine the confidence of predictions as the conversation progresses.
|
| 174 |
+
The agents play very different roles in the game. On the one hand, we would hypothesize the receiver’s messages to become more and more specific. For example, if the receiver has already established that the picture is of a feline, it does not make sense to ask, e.g., whether
|
| 175 |
+
|
| 176 |
+
the animal has tusks or fins. This implies that the entropy of its messages should decrease. On the other hand, as questions become more specific, they are also likely to become more difficult for the sender to answer with high confidence. Answering that something is an aquatic mammal is easier than describing, e.g., the particular shape of a fin. Consequently, the entropy of the sender’s messages is likely to increase as it grows less confident in its answers. To examine this, we analyze the information theoretic content of the messages sent by both agents.
|
| 177 |
+
|
| 178 |
+
In what follows, we discuss experiments along the lines of these hypotheses. In addition, we analyze the impact of changing the message dimensionality, and the effect of applying visual and linguistic attention mechanisms.
|
| 179 |
+
|
| 180 |
+

|
| 181 |
+
Figure 2: (a) Difficulty (measured by F1) versus conversation length across classes. A negative correlation is observed, implying that difficult classes require more turns. (b) Accuracy $@ K$ versus conversation length for the in-domain (blue) and out-ofdomain (red) test sets.
|
| 182 |
+
|
| 183 |
+
Conversation length and accuracy/difficulty We train a pair of agents with an adaptive conversation length in which the receiver may terminate the conversation early based on the stop probability. Once training is done, we inspect the relationship between average conversation length and difficulty across classes, as well as the accuracy per the conversation length by partitioning the test examples into length-based bins.
|
| 184 |
+
|
| 185 |
+
We expect that more difficult classes require a higher average length of exchange. To test this hypothesis, we use the accuracy of a separate classifier as a proxy for the difficulty of a sample. Specifically, we train a classifier based on a pre-trained ResNet-50, in which we freeze all but the last layer, and obtain the F1 score per class evaluated on the in-domain test set. The Pearson correlation between the F1 score and average conversation length across classes is $- 0 . 8 1$ with a $p$ -value of $4 \times 1 0 ^ { - 1 5 }$ implying a statistically significant negative relationship, as displayed in Fig. 2 (a).
|
| 186 |
+
|
| 187 |
+
In addition, we present the accuracies against the conversation lengths (as automatically determined by the receiver) in Fig. 2 (b). We notice a clear trend with the in-domain test set: examples for which the conversations are shorter are better classified, which might indicate that they are easier. It is important to remember that the receiver’s stop probability is not artificially tied to the performance nor confidence of the receiver’s prediction, but is simply learned by playing the proposed game. A similar trend can be observed with the out-of-domain test set, however, to a lesser degree. A similar trend of having longer conversation for more difficult objects is also found with humans in the game of 20 questions (Cohen & Lake, 2016).2
|
| 188 |
+
|
| 189 |
+

|
| 190 |
+
Figure 3: (a) Prediction entropy over the conversation using the in-domain (blue) and out-of-domain (red) test sets. (b, c) Prediction certainty over time in example conversations about Kangaroo and Wolf, respectively.
|
| 191 |
+
|
| 192 |
+
Conversation length and confidence With the agents trained with an adaptive conversation length, we can investigate how the prediction uncertainty of the receiver evolves over time. We plot the evolution of the entropy of the prediction distribution in Fig. 3 (a) averaged per conversation length bucket. We first notice that the conversation length, determined by the receiver on its own, correlates well with the prediction confidence (measured as negative entropy) of the receiver. Also, it is clear on the in-domain test set that the entropy almost monotonically decreases over the conversation, and the receiver terminates the conversation when the predictive entropy converges. This trend is however not apparent with the out-of-domain test set, which we attribute to the difficulty of zero-shot generalization.
|
| 193 |
+
|
| 194 |
+
The goal of the conversation, i.e., the series of message exchanges, is to distinguish among many different objects. The initial message from the sender could for example give a rough idea of the high-level category that an object belongs to, after which the goal becomes to distinguish different objects within that high-level category. In other words, objects in a single such cluster, which are visually similar due to the sender’s access to the visual mode of an object, are predicted at different time steps in the conversation.
|
| 195 |
+
|
| 196 |
+
We qualitatively examine this hypothesis by visualizing how the predictive probabilities of the receiver evolve over a conversation. In Fig. 3 (b,c), we show two example categories – kangaroo and wolf. As the conversation progress and more information is gathered for the receiver, similar but incorrect categories receive smaller probabilities than the correct one. We notice a similar trend with all other categories.
|
| 197 |
+
|
| 198 |
+
Information theoretic message content In the previous section, we examined how prediction certainty evolved over time. We can do the same with the messages sent by the respective agents. In Fig. 4, we plot the entropies of the message distributions by the sender and receiver. We notice that, as the conversation progresses, the entropy decreases for the receiver, while it increases for the sender. This observation can be explained by the following conjecture. As the receiver accumulates information transmitted by the sender, the set of possible queries to send back to the sender shrinks, and consequently the entropy decreases. It could be said that the questions become more specific as more information becomes available to the receiver as it zones in on the correct answer. On the other hand, as the receiver’s message becomes more specific and difficult to answer, the certainty of the sender in providing the correct answer decreases, thereby increasing the entropy of the sender’s message distribution. We notice a similar trend on the out-of-domain test set as well.
|
| 199 |
+
|
| 200 |
+

|
| 201 |
+
Figure 4: Message entropy over the conversation on the in-domain test set of the sender (left) and receiver (right).
|
| 202 |
+
|
| 203 |
+
Effect of the message dimensionality Next, we vary the dimensionality $d$ of each message to investigate the impact of the constraint on the communication channel, while keeping the conversation length adaptive. We generally expect a better accuracy with a higher bandwidth. More specifically, we expect the generalization to unseen categories (out-of-domain test) would improve as the information bandwidth of the communication channel increases. When the bandwidth is limited, the agents will be forced to create a communication protocol highly specialized for categories seen during training. On the other hand, the agents will learn to decompose structures underlying visual and textual modes of an object into more generalizable descriptions with a higher bandwidth channel.
|
| 204 |
+
|
| 205 |
+
The accuracies reported in Fig. 5 agree well with this hypothesis. On the in-domain test set, we do not see significant improvement nor degradation as the message dimensionality changes. We observe, however, a strong correlation between the message dimensionality and the accuracy on the out-of-domain test set. With 32-dimensional messages, the agents were able to achieve up to $45 \%$ accuracy $\textcircled { \omega } 7$ on the out-of-domain test set which consists of 10 mammals not seen during training. The effect of modifying the message dimension was less clear when measured against the transfer set.
|
| 206 |
+
|
| 207 |
+

|
| 208 |
+
Figure 5: Accuracy $@ K$ on the InDomain $K = 6$ ) and Out-of-Domain ( $K = 7 ,$ ) test sets for the Adaptive models of varying message size. We notice the increasing accuracy on the out-ofdomain test set as the bandwidth of the channel increases.
|
| 209 |
+
|
| 210 |
+
Effect of Attention Mechanism All the experiments so far have been run without attention mechanism. We train additional three pairs of agents with 32-dimensional message vectors; (1) attentionbased sender, (2) attention-based receiver, and (3) attention-based sender and attention-based receiver. On the in-domain test set, we are not able to observe any improvement from the attention mechanism on either of the agents. We did however notice that the attention mechanism (attention-based receiver) significantly improves the accuracy on the transfer test set from $1 6 . 9 \%$ up to $2 7 . 4 \%$ . We conjecture that this is due to the fact that attention allows the agents to focus on the aspects of the objects (e.g. certain words in descriptions; or regions in images) that they are familiar with, which means that they are less susceptible to the noise introduced from being exposed to an entirely new category. We leave further analysis of the effect of the attention mechanism for future work.
|
| 211 |
+
|
| 212 |
+
Is communication necessary? One important consideration is whether the trained agents utilize the adaptability of the communication protocol. It is indeed possible that the sender does not learn to shape communication and simply relies on the random communication protocol decided by the random initialization of its parameters. In this case, the receiver will need to recover information from the sender sent via this random communication channel.
|
| 213 |
+
|
| 214 |
+
In order to verify this is not the case, we train a pair of agents without updating the parameters of the sender. As the receiver is still updated, and the sender’s information still flows toward the receiver, learning happens. We, however, observe that the overall performance significantly lags behind the case when agents are trained together, as shown in Fig. 6. This suggests that the agents must learn a new, task-specific communication protocol, which emerges in order to solve the problem successfully.3
|
| 215 |
+
|
| 216 |
+

|
| 217 |
+
Figure 6: Learning curves when both agents are updated (BAU), and only the receiver is updated (ORU).
|
| 218 |
+
|
| 219 |
+
# 7 CONCLUSION
|
| 220 |
+
|
| 221 |
+
In this paper, we have proposed a novel, multi-modal, multi-step referential game for building and analyzing communication-based neural agents. The design of the game enables more human-like communication between two agents, by allowing a variable-length conversation with a symmetric communication. The conducted experiments and analyses reveal three interesting properties of the communication protocol, or artificial language, that emerges from learning to play the proposed game.
|
| 222 |
+
|
| 223 |
+
First, the sender and receiver are able to adjust the length of the conversation based on the difficulty of predicting the correct object. The length of the conversation is found to (negatively) correlate with the confidence of the receiver in making predictions. Second, the receiver gradually asks more specific questions as the conversation progresses. This results in an increase of entropy in the sender’s message distribution, as there are more ways to answer those highly specific questions. We further observe that increasing the bandwidth of communication, measured in terms of the message dimensionality, allows for improved zero-shot generalization. Most importantly, we present a suite of hypotheses and associated experiments for investigating an emergent communication protocol, which we believe will be useful for the future research on emergent communication.
|
| 224 |
+
|
| 225 |
+
Future Direction Despite the significant extension we have made to the basic referential game, the proposed multi-modal, multi-step game also exhibits a number of limitations. First, an emergent communication from this game is not entirely symmetric as there is no constraint that prevents the two agents from partitioning the message space. This could be addressed by having more than two agents interacting with each other while exchanging their roles, which we leave as future work. Second, the message set $S$ consists of fixed-dimensional binary vectors. This choice effectively prevents other linguistic structures, such as syntax. Third, the proposed game, as well as any existing referential game, does not require any action, other than speaking. This is in contrast to the first line of research discussed earlier in Sec. 1, where communication happens among active agents. We anticipate a future research direction in which both of these approaches are combined.
|
| 226 |
+
|
| 227 |
+
# ACKNOWLEDGMENTS
|
| 228 |
+
|
| 229 |
+
We thank Brenden Lake and Alex Cohen for valuable discussion. We also thank Maximilian Nickel, Y-Lan Boureau, Jason Weston, Dhruv Batra, and Devi Parikh for helpful suggestions. KC thanks for support by AdeptMind, Tencent, eBay, NVIDIA, and CIFAR. AD thanks the NVIDIA Corporation for their donation of a Titan X Pascal. This work is done by KE as a part of the course DS-GA 1010-001 Independent Study in Data Science at the Center for Data Science, New York University. A part of Fig. 1 is licensed from EmmyMik/CC BY 2.0/https://www.flickr.com/photos/emmymik/8206632393/.
|
| 230 |
+
|
| 231 |
+
# REFERENCES
|
| 232 |
+
|
| 233 |
+
Jacob Andreas and Dan Klein. Reasoning about pragmatics with neural listeners and speakers. arXiv preprint arXiv:1604.00562, 2016.
|
| 234 |
+
|
| 235 |
+
Jacob Andreas, Anca Dragan, and Dan Klein. Translating neuralese. arXiv preprint arXiv:1704.06960, 2017.
|
| 236 |
+
|
| 237 |
+
Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In ICLR 2015, 2014.
|
| 238 |
+
|
| 239 |
+
Steven Bird, Ewan Klein, and Edward Loper. Natural language processing with Python: analyzing text with the natural language toolkit. ” O’Reilly Media, Inc.”, 2009.
|
| 240 |
+
|
| 241 |
+
Kyunghyun Cho, Bart van Merrienboer, Caglar Gulcehre, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoder-decoder for statistical machine translation. In Conference on Empirical Methods in Natural Language Processing (EMNLP 2014), 2014.
|
| 242 |
+
|
| 243 |
+
A Cohen and Brenden M Lake. Searching large hypothesis spaces by asking questions. In Proceedings of the 38th Annual Conference of the Cognitive Science Society, 2016.
|
| 244 |
+
|
| 245 |
+
Abhishek Das, Satwik Kottur, Jose MF Moura, Stefan Lee, and Dhruv Batra. Learning cooperative ´ visual dialog agents with deep reinforcement learning. arXiv preprint arXiv:1703.06585, 2017.
|
| 246 |
+
|
| 247 |
+
Harm de Vries, Florian Strub, Sarath Chandar, Olivier Pietquin, Hugo Larochelle, and Aaron Courville. Guesswhat?! visual object discovery through multi-modal dialogue. arXiv preprint arXiv:1611.08481, 2016.
|
| 248 |
+
|
| 249 |
+
Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pp. 248–255. IEEE, 2009.
|
| 250 |
+
|
| 251 |
+
Jakob N Foerster, Yannis M Assael, Nando de Freitas, and Shimon Whiteson. Learning to communicate to solve riddles with deep distributed recurrent q-networks. arXiv preprint arXiv:1602.02672, 2016.
|
| 252 |
+
|
| 253 |
+
Jon Gauthier and Igor Mordatch. A paradigm for situated and goal-driven language learning. arXiv preprint arXiv:1610.03585, 2016.
|
| 254 |
+
|
| 255 |
+
Serhii Havrylov and Ivan Titov. Emergence of language with multi-agent games: Learning to communicate with sequences of symbols. 2017.
|
| 256 |
+
|
| 257 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 770–778, 2016.
|
| 258 |
+
|
| 259 |
+
Emilio Jorge, Mikael Kageb ˚ ack, and Emil Gustavsson. Learning to play guess who? and inventing a ¨ grounded language as a consequence. arXiv preprint arXiv:1611.03218, 2016.
|
| 260 |
+
|
| 261 |
+
Douwe Kiela, Luana Bulat, Anita L Vero, and Stephen Clark. Virtual embodiment: A scalable long-term strategy for artificial intelligence research. arXiv preprint arXiv:1610.07432, 2016.
|
| 262 |
+
|
| 263 |
+
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012.
|
| 264 |
+
|
| 265 |
+
Brenden M Lake, Tomer D Ullman, Joshua B Tenenbaum, and Samuel J Gershman. Building machines that learn and think like people. arXiv preprint arXiv:1604.00289, 2016.
|
| 266 |
+
|
| 267 |
+
Hugo Larochelle, Dumitru Erhan, and Yoshua Bengio. Zero-data learning of new tasks. In AAAI, volume 1, pp. 3, 2008.
|
| 268 |
+
|
| 269 |
+
Angeliki Lazaridou, Alexander Peysakhovich, and Marco Baroni. Multi-agent cooperation and the emergence of (natural) language. arXiv preprint arXiv:1612.07182, 2016.
|
| 270 |
+
|
| 271 |
+
David Lewis. Convention: A philosophical study. John Wiley & Sons, 2008.
|
| 272 |
+
|
| 273 |
+
Tomas Mikolov, Armand Joulin, and Marco Baroni. A roadmap towards machine intelligence. arXiv preprint arXiv:1511.08130, 2015.
|
| 274 |
+
|
| 275 |
+
George A Miller. Wordnet: a lexical database for english. Communications of the ACM, 38(11): 39–41, 1995.
|
| 276 |
+
|
| 277 |
+
Andriy Mnih and Karol Gregor. Neural variational inference and learning in belief networks. arXiv preprint arXiv:1402.0030, 2014.
|
| 278 |
+
|
| 279 |
+
Igor Mordatch and Pieter Abbeel. Emergence of grounded compositional language in multi-agent populations. arXiv preprint arXiv:1703.04908, 2017.
|
| 280 |
+
|
| 281 |
+
Jeffrey Pennington, Richard Socher, and Christopher D. Manning. Glove: Global vectors for word representation. In Empirical Methods in Natural Language Processing (EMNLP), pp. 1532–1543, 2014.
|
| 282 |
+
|
| 283 |
+
Brian Skyrms. Signals: Evolution, learning, and information. Oxford University Press, 2010.
|
| 284 |
+
|
| 285 |
+
Luc Steels and Martin Loetzsch. The grounded naming game. Experiments in cultural language evolution, 3:41—59, 2012.
|
| 286 |
+
|
| 287 |
+
Florian Strub, Harm de Vries, Jeremie Mary, Bilal Piot, Aaron Courville, and Olivier Pietquin. End-to-end optimization of goal-driven and visually grounded dialogue systems. arXiv preprint arXiv:1703.05423, 2017.
|
| 288 |
+
|
| 289 |
+
Sainbayar Sukhbaatar, Rob Fergus, et al. Learning multiagent communication with backpropagation. In Advances in Neural Information Processing Systems, pp. 2244–2252, 2016.
|
| 290 |
+
|
| 291 |
+
Silviu Tantos. Detecting duplicate images using python. http://blog.iconfinder.com/ detecting-duplicate-images-using-python/, 2017. Accessed: 2017-05-19.
|
| 292 |
+
|
| 293 |
+
Tijmen Tieleman and Geoffrey Hinton. Lecture 6.5-rmsprop: Divide the gradient by a running average of its recent magnitude. COURSERA: Neural networks for machine learning, 4(2), 2012.
|
| 294 |
+
|
| 295 |
+
Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256, 1992.
|
| 296 |
+
|
| 297 |
+
Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron Courville, Ruslan Salakhudinov, Rich Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual attention. In International Conference on Machine Learning, pp. 2048–2057, 2015.
|
| 298 |
+
|
| 299 |
+
# A TABLE OF NOTATIONS
|
| 300 |
+
|
| 301 |
+
# Symbol
|
| 302 |
+
|
| 303 |
+
# DESCRIPTION
|
| 304 |
+
|
| 305 |
+
Table 1: Table of Notations
|
| 306 |
+
|
| 307 |
+
<table><tr><td>As</td><td>sender agent</td></tr><tr><td>AR</td><td>receiver agent</td></tr><tr><td>S</td><td> set of all possible messages used for communication by both agents</td></tr><tr><td>0</td><td> set of mammal classes</td></tr><tr><td>Os</td><td>set of mammal images available to the sender</td></tr><tr><td>OR</td><td>set of mammal descriptions available to the receiver</td></tr><tr><td>S*</td><td>ground-truth map between Os and OR,namely s*: Os × OR → {0,1}</td></tr><tr><td>0s</td><td>element of Os</td></tr><tr><td>0r</td><td>element of O R</td></tr><tr><td>品</td><td>element of OR corresponding to the correct object in a sender-receiver exchange</td></tr><tr><td></td><td>the receiver's predicted distribution over objects in OR at timestep t</td></tr><tr><td>or</td><td>the receiver's prediction</td></tr><tr><td>ms</td><td>binary message sent by the sender</td></tr><tr><td>mr</td><td>binary message sent by the receiver</td></tr><tr><td>E</td><td>set of binary indicators for terminating a conversation {O,1}</td></tr><tr><td>S</td><td>value of indicator for terminating conversation yielded by the receiver</td></tr><tr><td>st</td><td>value of indicator for terminating conversation yielded by the receiver at time step t</td></tr><tr><td>Tmax</td><td>maximal value for number of time steps in a conversation</td></tr><tr><td>t</td><td>time step in conversation between sender and receiver</td></tr><tr><td></td><td>binary message generated by sender at time step t</td></tr><tr><td>mr</td><td>binary message generated by receiver at time step t</td></tr><tr><td>hs</td><td>hidden state vector of the sender</td></tr><tr><td>hr</td><td>hidden state vector of the receiver</td></tr><tr><td>h</td><td>hidden state of receiver at time step t</td></tr><tr><td>fs(os,mr)</td><td>function computing hidden state h'§ of sender</td></tr><tr><td>fs,att(Os,mr)</td><td>function computing hidden state hg of attention-based sender</td></tr><tr><td>fr(ms,ht-1)</td><td>the receiver's recurrent activation function computing ht</td></tr><tr><td>Bs</td><td>baseline feedforward network of the sender</td></tr><tr><td>Bs</td><td>baseline feedforward network of the receiver</td></tr><tr><td>ms,j</td><td>the j-th coordinate of the sender's message</td></tr><tr><td>Ws,j</td><td>the j-th column of the sender's weight matrix</td></tr><tr><td>bs,j</td><td>the j-th coordinate of the sender's bias vector</td></tr><tr><td>gr(or)</td><td>embedding of an object o by the receiver's view Or</td></tr><tr><td></td><td>the j-th coordinate of the receiver's message</td></tr><tr><td>Wr</td><td>the receiver's weight matrix for its hidden space</td></tr><tr><td>Ur</td><td>the receiver's weight matrix for embeddings of Or ∈ OR</td></tr><tr><td>Cr</td><td>the receiver's bias vector for embeddings of or ∈ OR</td></tr><tr><td>Wr,j</td><td>the j-th column of the receiver's weight matrix Wr</td></tr><tr><td>brj</td><td>the j-th coordinate of the receiver's bias vector for hidden state</td></tr><tr><td></td><td>the transpose of vector U</td></tr><tr><td>Li</td><td>per-instance loss</td></tr><tr><td>L</td><td>per-instance reinforcement learning loss</td></tr><tr><td>LB</td><td>per-instance baseline loss</td></tr><tr><td>R</td><td>reward from ground-truth mapping s*</td></tr><tr><td>H</td><td>entropy</td></tr><tr><td>入m</td><td>entropy regularization coefficient for the binary messages distributions of both agent</td></tr><tr><td>入s</td><td></td></tr><tr><td></td><td>entropy regularization coefficient for the receiver's termination distribution</td></tr></table>
|
| 308 |
+
|
| 309 |
+
# B STABILITY OF TRAINING
|
| 310 |
+
|
| 311 |
+
We ran our standard setup4 six times using different random seeds. For each experiment, we trained the model until convergence using early stopping against the validation data, then measured the loss and accuracy on the in-domain test set. The accuracy $@ 6$ had mean of $9 6 . 6 \%$ with variance of $1 . 9 8 \mathrm { e } { - 1 }$ , the accuracy $@ 1$ had mean of $8 6 . 0 \%$ with variance $7 . 5 9 \mathrm { e } - 1$ , and the loss had mean of 0.611 with variance $2 . 7 2 \mathrm { e } { - 3 }$ . These results suggest that the model is not only effective at classifying images, but also robust to random restart.
|
md/train/rJQDjk-0b/rJQDjk-0b.md
ADDED
|
@@ -0,0 +1,344 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# UNBIASED ONLINE RECURRENT OPTIMIZATION
|
| 2 |
+
|
| 3 |
+
# Corentin Tallec
|
| 4 |
+
|
| 5 |
+
# Yann Ollivier
|
| 6 |
+
|
| 7 |
+
Laboratoire de Recherche en Informatique Université Paris Sud Gif-sur-Yvette, 91190, France corentin.tallec@u-psud.fr
|
| 8 |
+
|
| 9 |
+
Laboratoire de Recherche en Informatique Université Paris Sud Gif-sur-Yvette, 91190, France yann@yann-ollivier.org
|
| 10 |
+
|
| 11 |
+
# ABSTRACT
|
| 12 |
+
|
| 13 |
+
The novel Unbiased Online Recurrent Optimization (UORO) algorithm allows for online learning of general recurrent computational graphs such as recurrent network models. It works in a streaming fashion and avoids backtracking through past activations and inputs. UORO is computationally as costly as Truncated Backpropagation Through Time (truncated BPTT), a widespread algorithm for online learning of recurrent networks Jaeger (2002). UORO is a modification of NoBackTrack Ollivier et al. (2015) that bypasses the need for model sparsity and makes implementation easy in current deep learning frameworks, even for complex models. Like NoBackTrack, UORO provides unbiased gradient estimates; unbiasedness is the core hypothesis in stochastic gradient descent theory, without which convergence to a local optimum is not guaranteed. On the contrary, truncated BPTT does not provide this property, leading to possible divergence. On synthetic tasks where truncated BPTT is shown to diverge, UORO converges. For instance, when a parameter has a positive short-term but negative long-term influence, truncated BPTT diverges unless the truncation span is very significantly longer than the intrinsic temporal range of the interactions, while UORO performs well thanks to the unbiasedness of its gradients.
|
| 14 |
+
|
| 15 |
+
Current recurrent network learning algorithms are ill-suited to online learning via a single pass through long sequences of temporal data. Backpropagation Through Time (BPTT Jaeger (2002)), the current standard for training recurrent architectures, is well suited to many short training sequences. Treating long sequences with BPTT requires either storing all past inputs in memory and waiting for a long time between each learning step, or arbitrarily splitting the input sequence into smaller sequences, and applying BPTT to each of those short sequences, at the cost of losing long term dependencies.
|
| 16 |
+
|
| 17 |
+
This paper introduces Unbiased Online Recurrent Optimization (UORO), an online and memoryless learning algorithm for recurrent architectures: UORO processes and learns from data samples sequentially, one sample at a time. Contrary to BPTT, UORO does not maintain a history of previous inputs and activations. Moreover, UORO is scalable: processing data samples with UORO comes at a similar computational and memory cost as just running the recurrent model on those data.
|
| 18 |
+
|
| 19 |
+
Like most neural network training algorithms, UORO relies on stochastic gradient optimization. The theory of stochastic gradient crucially relies on the unbiasedness of gradient estimates to provide convergence to a local optimum. To this end, in the footsteps of NoBackTrack (NBT) Ollivier et al. (2015), UORO provides provably unbiased gradient estimates, in a scalable, streaming fashion.
|
| 20 |
+
|
| 21 |
+
Unlike NBT, though, UORO can be easily implemented in a black-box fashion on top of an existing recurrent model in current machine learning software, without delving into the structure and code of the model.
|
| 22 |
+
|
| 23 |
+
The framework for recurrent optimization and UORO is introduced in Section 2. The final algorithm is reasonably simple (Alg. 1), but its derivation (Section 3) is more complex. In Section 6, UORO is shown to provide convergence on a set of synthetic experiments where truncated BPTT fails to display reliable convergence. An implementation of UORO is provided as supplementary material.
|
| 24 |
+
|
| 25 |
+
# 1 RELATED WORK
|
| 26 |
+
|
| 27 |
+
A widespread approach to online learning of recurrent neural networks is Truncated Backpropagation Through Time (truncated BPTT) Jaeger (2002), which mimics Backpropagation Through Time, but zeroes gradient flows after a fixed number of timesteps. This truncation makes gradient estimates biased; consequently, truncated BPTT does not provide any convergence guarantee. Learning is biased towards short-time dependencies. 1. Storage of some past inputs and states is required.
|
| 28 |
+
|
| 29 |
+
Online, exact gradient computation methods have long been known (Real Time Recurrent Learning (RTRL) Williams & Zipser (1989); Pearlmutter (1995)), but their computational cost discards them for reasonably-sized networks.
|
| 30 |
+
|
| 31 |
+
NoBackTrack (NBT) Ollivier et al. (2015) also provides unbiased gradient estimates for recurrent neural networks. However, contrary to UORO, NBT cannot be applied in a blackbox fashion, making it extremely tedious to implement for complex architectures.
|
| 32 |
+
|
| 33 |
+
Other previous attempts to introduce generic online learning algorithms with a reasonable computational cost all result in biased gradient estimates. Echo State Networks (ESNs) Jaeger (2002); Jaeger et al. (2007) simply set to 0 the gradients of recurrent parameters. Others, e.g., Maass et al. (2002); Steil (2004), introduce approaches resembling ESNs, but keep a partial estimate of the recurrent gradients. The original Long Short Term Memory algorithm Hochreiter & Schmidhuber (1997) (LSTM now refers to a particular architecture) cuts gradient flows going out of gating units to make gradient computation tractable. Decoupled Neural Interfaces Jaderberg et al. (2016) bootstrap truncated gradient estimates using synthetic gradients generated by feedforward neural networks. The algorithm in Movellan et al. (2002) provides zeroth-order estimates of recurrent gradients via diffusion networks; it could arguably be turned online by running randomized alternative trajectories. Generally these approaches lack a strong theoretical backing, except arguably ESNs.
|
| 34 |
+
|
| 35 |
+
# 2 BACKGROUND
|
| 36 |
+
|
| 37 |
+
UORO is a learning algorithm for recurrent computational graphs. Formally, the aim is to optimize $\theta$ , a parameter controlling the evolution of a dynamical system
|
| 38 |
+
|
| 39 |
+
$$
|
| 40 |
+
\begin{array} { l } { s _ { t + 1 } = F _ { \mathrm { s t a t e } } ( x _ { t + 1 } , s _ { t } , \theta ) } \\ { o _ { t + 1 } = F _ { \mathrm { o u t } } ( x _ { t + 1 } , s _ { t } , \theta ) } \end{array}
|
| 41 |
+
$$
|
| 42 |
+
|
| 43 |
+
in order to minimize a total loss $\mathcal L : = \sum _ { 0 \leq t \leq T } \ell _ { t } ( o _ { t } , o _ { t } ^ { * } )$ , where $o _ { t } ^ { * }$ is a target output at time $t$ . For instance, a standard recurrent neural network, with hidden state $s _ { t }$ (preactivation values) and output $o _ { t }$ at time $t$ , is described with the update equations $\begin{array} { r } { F _ { \mathrm { s t a t e } } ( x _ { t + 1 } , s _ { t } , \theta ) : = \ W _ { x } x _ { t + 1 } + } \end{array}$ $W _ { s } \operatorname { t a n h } ( s _ { t } ) + b$ and $F _ { \mathrm { o u t } } ( x _ { t + 1 } , s _ { t } , \theta ) : = \bar { W _ { o } } \operatorname { t a n h } ( \bar { F _ { \mathrm { s t a t e } } } ( x _ { t + 1 } , s _ { t } , \theta ) ) ^ { \cdot } + b _ { o }$ ; here the parameter is $\theta = ( W _ { x } , W _ { s } , b , W _ { o } , b _ { o } )$ , and a typical loss might be $\ell _ { s } ( o _ { s } , o _ { s } ^ { * } ) : = ( o _ { s } - o _ { s } ^ { * } ) ^ { 2 }$ .
|
| 44 |
+
|
| 45 |
+
Optimization by gradient descent is standard for neural networks. In the spirit of stochastic gradient descent, we can optimize the total loss $\mathcal { L } = \sum _ { 0 \leq t \leq T } \ell _ { t } \big ( o _ { t } , o _ { t } ^ { * } \big )$ one term at a time and update the parameter online at each time step via
|
| 46 |
+
|
| 47 |
+
$$
|
| 48 |
+
\theta \gets \theta - { \eta _ { t } } \frac { { \partial \ell _ { t } } ^ { \top } } { \partial \theta }
|
| 49 |
+
$$
|
| 50 |
+
|
| 51 |
+
where $\eta _ { t }$ is a scalar learning rate at time $t$ . (Other gradient-based optimizers can also be used, once ∂\`t∂θ is known.) The focus is then to compute, or approximate, $\textstyle { \frac { \partial \ell _ { t } } { \partial \theta } }$ .
|
| 52 |
+
|
| 53 |
+
BPTT computes $\textstyle { \frac { \partial \ell _ { t } } { \partial \theta } }$ by unfolding the network through time, and backpropagating through the unfolded network, each timestep corresponding to a layer. BPTT thus requires maintaining the full unfolded network, or, equivalently, the history of past inputs and activations. 2 Truncated BPTT
|
| 54 |
+
|
| 55 |
+
only unfolds the network for a fixed number of timesteps, reducing computational cost in online settings Jaeger (2002). This comes at the cost of biased gradients, and can prevent convergence of the gradient descent even for large truncations, as clearly exemplified in Fig. 2a.
|
| 56 |
+
|
| 57 |
+
# 3 UNBIASED ONLINE RECURRENT OPTIMIZATION
|
| 58 |
+
|
| 59 |
+
Unbiased Online Recurrent Optimization is built on top of a forward computation of the gradients, rather than backpropagation. Forward gradient computation for neural networks (RTRL) is described in Williams & Zipser (1989) and we review it in Section 3.1. The derivation of UORO follows in Section 3.2. Implementation details are given in Section 3.3. UORO’s derivation is strongly connected to Ollivier et al. (2015) but differs in one critical aspect: the sparsity hypothesis made in the latter is relieved, resulting in reduced implementation complexity without any model restriction. The proof of UORO’s convergence to a local optimum can be found in Massé (2017).
|
| 60 |
+
|
| 61 |
+
# 3.1 FORWARD COMPUTATION OF THE GRADIENT
|
| 62 |
+
|
| 63 |
+
Forward computation of the gradient for a recurrent model (RTRL) is directly obtained by applying the chain rule to both the loss function and the state equation (1), as follows.
|
| 64 |
+
|
| 65 |
+
Direct differentiation and application of the chain rule to $\ell _ { t + 1 }$ yields
|
| 66 |
+
|
| 67 |
+
$$
|
| 68 |
+
\frac { \partial \ell _ { t + 1 } } { \partial \theta } = \frac { \partial \ell _ { t + 1 } } { \partial o } ( o _ { t + 1 } , o _ { t + 1 } ^ { \ast } ) \cdot \left( \frac { \partial F _ { \mathrm { o u t } } } { \partial s } ( x _ { t + 1 } , s _ { t } , \theta ) \frac { \partial s _ { t } } { \partial \theta } + \frac { \partial F _ { \mathrm { o u t } } } { \partial \theta } ( x _ { t + 1 } , s _ { t } , \theta ) \right) .
|
| 69 |
+
$$
|
| 70 |
+
|
| 71 |
+
Here, the term $\partial s _ { t } / \partial \theta$ represents the effect on the state at time $t$ of a change of parameter during the whole past trajectory. This term can be computed inductively from time $t$ to $t + 1$ . Intuitively, looking at the update equation (1), there are two contributions to $\partial s _ { t + 1 } / \partial \theta$ :
|
| 72 |
+
|
| 73 |
+
• The direct effect of a change of $\theta$ on the computation of $s _ { t + 1 }$ , given $s _ { t }$ .
|
| 74 |
+
• The past effect of $\theta$ on $s _ { t }$ via the whole past trajectory.
|
| 75 |
+
|
| 76 |
+
With this in mind, differentiating (1) with respect to $\theta$ yields
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
\frac { \partial s _ { t + 1 } } { \partial \theta } = \frac { \partial F _ { \mathrm { s t a t e } } } { \partial \theta } ( x _ { t + 1 } , s _ { t } , \theta ) + \frac { \partial F _ { \mathrm { s t a t e } } } { \partial s } ( x _ { t + 1 } , s _ { t } , \theta ) \frac { \partial s _ { t } } { \partial \theta } .
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
This gives a way to compute the derivative of the instantaneous loss without storing past history: at each time step, update $\partial { \bar { s } } _ { t } / \partial \theta$ from $\partial s _ { t - 1 } / \partial \theta$ , then use this quantity to directly compute $\partial \ell _ { t + 1 } / \partial \theta$ . This is how RTRL Williams & Zipser (1989) proceeds.
|
| 83 |
+
|
| 84 |
+
A huge disadvantage of RTRL is that $\partial s _ { t } / \partial \theta$ is of size $\mathrm { d i m ( s t a t e ) } \times \mathrm { d i m ( p a r a m s ) }$ . For instance, with a fully connected standard recurrent network with $n$ units, $\partial s _ { t } / \partial \theta$ scales as ${ \dot { n } } ^ { 3 }$ . This makes RTRL impractical for reasonably sized networks.
|
| 85 |
+
|
| 86 |
+
UORO modifies RTRL by only maintaining a scalable, rank-one, provably unbiased approximation of $\partial s _ { t } / \partial \theta$ , to reduce the memory and computational cost. This approximation takes the form $\widetilde { s } _ { t } \otimes \widetilde { \theta } _ { t }$ , where $\tilde { s } _ { t }$ is a column vector of the same dimension as $s _ { t }$ , $\tilde { \theta } _ { t }$ is a row vector of the same dimension as $\theta ^ { \top }$ , and $\otimes$ denotes the outer product. The resulting quantity is thus a matrix of the same size as $\partial s _ { t } / \partial \theta$ . The memory cost of storing $\tilde { s } _ { t }$ and $\tilde { \theta } _ { t }$ scales as $\mathrm { d i m ( s t a t e ) } + \mathrm { d i m ( p a r a m s ) }$ . Thus UORO is as memory costly as simply running the network itself (which indeed requires to store the current state and parameters). The following section details how $\tilde { s } _ { t }$ and $\tilde { \theta } _ { t }$ are built to provide unbiasedness.
|
| 87 |
+
|
| 88 |
+
# 3.2 RANK-ONE TRICK: FROM RTRL TO UORO
|
| 89 |
+
|
| 90 |
+
Given an unbiased estimation of $\partial s _ { t } / \partial \theta$ , namely, a stochastic matrix $\tilde { G } _ { t }$ such that $\mathbb { E } { \tilde { G } } _ { t } = \partial s _ { t } / \partial \theta$ , unbiased estimates of $\partial \ell _ { t + 1 } / \partial \theta$ and $\partial s _ { t + 1 } / \partial \theta$ can be derived by plugging $\tilde { G } _ { t }$ in (4) and (5). Unbiasedness is preserved thanks to linearity of the mean, because both (4) and (5) are affine in $\partial s _ { t } / \partial \theta$ .
|
| 91 |
+
|
| 92 |
+
Thus, assuming the existence of a rank-one unbiased approximation $\tilde { G } _ { t } = \tilde { s } _ { t } \otimes \tilde { \theta } _ { t }$ at time $t$ , we can plug it in (5) to obtain an unbiased approximation $\hat { G } _ { t + 1 }$ at time $t + 1$
|
| 93 |
+
|
| 94 |
+
$$
|
| 95 |
+
\hat { G } _ { t + 1 } = \frac { \partial F _ { \mathrm { s t a t e } } } { \partial \theta } ( x _ { t + 1 } , s _ { t } , \theta ) + \frac { \partial F _ { \mathrm { s t a t e } } } { \partial s } ( x _ { t + 1 } , s _ { t } , \theta ) \tilde { s } _ { t } \otimes \tilde { \theta } _ { t } .
|
| 96 |
+
$$
|
| 97 |
+
|
| 98 |
+
However, in general this is no longer rank-one.
|
| 99 |
+
|
| 100 |
+
To transform $\hat { G } _ { t + 1 }$ into $\tilde { G } _ { t + 1 }$ , a rank-one unbiased approximation, the following rank-one trick, introduced in Ollivier et al. (2015) is used:
|
| 101 |
+
|
| 102 |
+
Proposition 1. Let $A$ be a real matrix that decomposes as
|
| 103 |
+
|
| 104 |
+
$$
|
| 105 |
+
A = \sum _ { i = 1 } ^ { k } v _ { i } \otimes w _ { i } .
|
| 106 |
+
$$
|
| 107 |
+
|
| 108 |
+
Let ν be a vector of $k$ independent random signs, and $\rho$ a vector of $k$ positive numbers. Consider the rank-one matrix
|
| 109 |
+
|
| 110 |
+
$$
|
| 111 |
+
\tilde { A } : = \left( \sum _ { i = 1 } ^ { k } \rho _ { i } \nu _ { i } v _ { i } \right) \otimes \left( \sum _ { i = 1 } ^ { k } \frac { \nu _ { i } w _ { i } } { \rho _ { i } } \right)
|
| 112 |
+
$$
|
| 113 |
+
|
| 114 |
+
Then $\tilde { A }$ is an unbiased rank-one approximation of A: $\cdot \mathbb { E } _ { \nu } \tilde { A } = A$ .
|
| 115 |
+
|
| 116 |
+
The rank-one trick can be applied for any $\rho$ . The choice of $\rho$ influences the variance of the approximation; choosing
|
| 117 |
+
|
| 118 |
+
$$
|
| 119 |
+
\rho _ { i } = { \sqrt { \| w _ { i } \| / \| v _ { i } \| } }
|
| 120 |
+
$$
|
| 121 |
+
|
| 122 |
+
minimizes the variance of the approximation, $\mathbb { E } \left[ \lVert A - \tilde { A } \rVert _ { 2 } ^ { 2 } \right]$ Ollivier et al. (2015).
|
| 123 |
+
|
| 124 |
+
The UORO update is obtained by applying the rank-one trick twice to (6). First , ∂Fstate∂θ (xt+1, st, θ) is reduced to a rank one matrix, without variance minimization. 3 Namely, let $\nu$ be a vector of independant random signs; then,
|
| 125 |
+
|
| 126 |
+
$$
|
| 127 |
+
\frac { \partial F _ { \mathrm { s t a t e } } } { \partial \theta } ( x _ { t + 1 } , s _ { t } , \theta ) = \mathbb { E } _ { \nu } \left[ \nu \otimes \nu ^ { \top } \frac { \partial F _ { \mathrm { s t a t e } } } { \partial \theta } ( x _ { t + 1 } , s _ { t } , \theta ) \right] .
|
| 128 |
+
$$
|
| 129 |
+
|
| 130 |
+
This results in a rank-two, unbiased estimate of $\partial s _ { t + 1 } / \partial \theta$ by substituting (10) into (6)
|
| 131 |
+
|
| 132 |
+
$$
|
| 133 |
+
\frac { \partial F _ { \mathrm { s t a t e } } } { \partial s } ( x _ { t + 1 } , s _ { t } , \theta ) \tilde { s } _ { t } \otimes \tilde { \theta } _ { t } + \nu \otimes \left( \nu ^ { \top } \ \frac { \partial F _ { \mathrm { s t a t e } } } { \partial \theta } ( x _ { t + 1 } , s _ { t } , \theta ) \right) .
|
| 134 |
+
$$
|
| 135 |
+
|
| 136 |
+
Applying Prop. 1 again to this rank-two estimate, with variance minimization, yields UORO’s estimate $\tilde { G } _ { t + 1 }$
|
| 137 |
+
|
| 138 |
+
$$
|
| 139 |
+
\tilde { G } _ { t + 1 } = \left( \rho _ { 0 } \frac { \partial F _ { \mathrm { s t a t e } } } { \partial s } ( x _ { t + 1 } , s _ { t } , \theta ) \tilde { s } _ { t } + \rho _ { 1 } \nu \right) \otimes \left( \frac { \tilde { \theta } _ { t } } { \rho _ { 0 } } + \frac { \nu } { \rho _ { 1 } } ^ { \top } \frac { \partial F _ { \mathrm { s t a t e } } } { \partial \theta } ( x _ { t + 1 } , s _ { t } , \theta ) \right)
|
| 140 |
+
$$
|
| 141 |
+
|
| 142 |
+
which satisfies that $\mathbb { E } _ { \nu } \tilde { G } _ { t + 1 }$ is equal to (6). (By elementary algebra, some random signs that should appear in (12) cancel out.) Here
|
| 143 |
+
|
| 144 |
+
$$
|
| 145 |
+
\rho _ { 0 } = \sqrt { \frac { \| \tilde { \theta } _ { t } \| } { \| \frac { \partial F _ { \mathrm { s t a t e } } } { \partial s } ( x _ { t + 1 } , s _ { t } , \theta ) \tilde { s } _ { t } \| } } , \quad \rho _ { 1 } = \sqrt { \frac { \| \nu ^ { \top } \frac { \partial F _ { \mathrm { s t a t e } } } { \partial \theta } ( x _ { t + 1 } , s _ { t } , \theta ) \| } { \| \nu \| } }
|
| 146 |
+
$$
|
| 147 |
+
|
| 148 |
+
minimizes variance of the second reduction.
|
| 149 |
+
|
| 150 |
+
The unbiased estimation (12) is rank-one and can be rewritten as $\tilde { G } _ { t + 1 } = \tilde { s } _ { t + 1 } \otimes \tilde { \theta } _ { t + 1 }$ with the update
|
| 151 |
+
|
| 152 |
+
$$
|
| 153 |
+
\begin{array} { r l } & { \tilde { s } _ { t + 1 } \gets \rho _ { 0 } \displaystyle \frac { \partial F _ { \mathrm { s t a t e } } } { \partial s } ( x _ { t + 1 } , s _ { t } , \theta ) \tilde { s } _ { t } + \rho _ { 1 } \nu } \\ & { \tilde { \theta } _ { t + 1 } \gets \displaystyle \frac { \tilde { \theta } _ { t } } { \rho _ { 0 } } + \frac { \nu ^ { \top } } { \rho _ { 1 } } \frac { \partial F _ { \mathrm { s t a t e } } } { \partial \theta } ( x _ { t + 1 } , s _ { t } , \theta ) . } \end{array}
|
| 154 |
+
$$
|
| 155 |
+
|
| 156 |
+
3 Variance minimization is not used at this step, since computing $\sqrt { \frac { \lVert \boldsymbol { w } _ { i } \rVert } { \lVert \boldsymbol { v } _ { i } \rVert } }$ for every $i$ is not scalable.
|
| 157 |
+
|
| 158 |
+
Initially, $\partial s _ { 0 } / \partial \theta = 0$ , thus $\tilde { s } _ { 0 } = 0$ , $\tilde { \theta } _ { 0 } = 0$ yield an unbiased estimate at time 0. Using this initial estimate and the update rules (14)–(15), an estimate of $\partial s _ { t } / \partial \theta$ is obtained at all subsequent times, allowing for online estimation of $\partial \ell _ { t } / \partial \theta$ . Thanks to the construction above, by induction all these estimates are unbiased. 4
|
| 159 |
+
|
| 160 |
+
We are left to demonstrate that these update rules are scalably implementable.
|
| 161 |
+
|
| 162 |
+
# 3.3 IMPLEMENTATION
|
| 163 |
+
|
| 164 |
+
Implementing UORO requires maintaining the rank-one approximation and the corresponding gradient loss estimate. UORO’s estimate of the loss gradient $\bar { \partial } \ell _ { t + 1 } / \partial _ { \theta }$ at time $t + 1$ is expressed by plugging into (4) the rank-one approximation $\partial s _ { t } / \partial \theta \approx \tilde { s } _ { t } \otimes \tilde { \theta } _ { t }$ , which results in
|
| 165 |
+
|
| 166 |
+
$$
|
| 167 |
+
\left( \frac { \partial \ell _ { t + 1 } } { \partial o } ( o _ { t + 1 } , o _ { t + 1 } ^ { * } ) \frac { \partial F _ { \mathrm { o u t } } } { \partial s } ( x _ { t + 1 } , s _ { t } , \theta ) \cdot \tilde { s } _ { t } \right) \tilde { \theta } _ { t } + \frac { \partial \ell _ { t + 1 } } { \partial o } ( o _ { t + 1 } , o _ { t + 1 } ^ { * } ) \frac { \partial F _ { \mathrm { o u t } } } { \partial \theta } ( x _ { t + 1 } , s _ { t } , \theta ) .
|
| 168 |
+
$$
|
| 169 |
+
|
| 170 |
+
Backpropagating $\partial \ell _ { t + 1 } / \partial o _ { t + 1 }$ once through $F _ { \mathrm { o u t } }$ returns
|
| 171 |
+
|
| 172 |
+
$( \partial \ell _ { t + 1 } / \partial o _ { t + 1 } \cdot \partial F _ { \mathrm { o u t } } / \partial x _ { t + 1 }$ $\mathbf { \nabla } _ { 1 } \cdot \partial F _ { \mathrm { o u t } } / \partial x _ { t + 1 } , \partial \ell _ { t + 1 } / \partial o _ { t + 1 } \cdot \partial F _ { \mathrm { o u t } } / \partial s _ { t } , \partial \ell _ { t + 1 } / \partial o _ { t + 1 } \cdot \partial F _ { \mathrm { o u t } } / \partial \theta )$ , thus providing all necessary terms to compute (16).
|
| 173 |
+
|
| 174 |
+
Updating $\tilde { s }$ and $\tilde { \theta }$ requires applying (14)–(15) at each step. Backpropagating the vector of random signs $\nu$ once through $F _ { \mathrm { s t a t e } }$ returns $\big ( \_ { - } , \_ { - } , \nu ^ { \top } \partial F _ { \mathrm { s t a t e } } ( x _ { t + 1 } , s _ { t } , \theta ) / \partial \theta \big )$ , providing for (15).
|
| 175 |
+
|
| 176 |
+
Updating $\tilde { s }$ via (14) requires computing $( \partial F _ { \mathrm { s t a t e } } / \partial s _ { t } ) \cdot \tilde { s } _ { t }$ . This is computable numerically through
|
| 177 |
+
|
| 178 |
+
$$
|
| 179 |
+
\frac { \partial F _ { \mathrm { s t a t e } } } { \partial s } ( x _ { t + 1 } , s _ { t } , \theta ) \cdot \tilde { s } _ { t } = \operatorname* { l i m } _ { \varepsilon \to 0 } \frac { F _ { \mathrm { s t a t e } } \big ( x _ { t + 1 } , s _ { t } + \varepsilon \tilde { s } _ { t } , \theta \big ) - F _ { \mathrm { s t a t e } } \big ( x _ { t + 1 } , s _ { t } , \theta \big ) } { \varepsilon }
|
| 180 |
+
$$
|
| 181 |
+
|
| 182 |
+
computable through two applications of $F _ { \mathrm { s t a t e } }$ . This operation is referred to as tangent forward propagation Simard et al. (1991) and can also often be computed algebraically.
|
| 183 |
+
|
| 184 |
+
This allows for complete implementation of one step of UORO (Alg. 1). The cost of UORO (including running the model itself) is three applications of $F _ { \mathrm { s t a t e } }$ , one application of $F _ { \mathrm { o u t } }$ , one backpropagation through $F _ { \mathrm { o u t } }$ and $F _ { \mathrm { s t a t e } }$ , and a few elementwise operations on vectors and scalar products.
|
| 185 |
+
|
| 186 |
+
The resulting algorithm is detailed in Alg. 1. F.forward $( v )$ denotes pointwise application of $F$ at point $v$ , $\mathbf { \tilde { \mu } } _ { F . \mathbf { b a c k p r o p } } ( v , \delta o )$ backpropagation of row vector $\delta o$ through $F$ at point $v$ , and $F$ .forwarddiff $( v , \delta v )$ tangent forward propagation of column vector $\delta \boldsymbol { v }$ through $F$ at point $v$ . Notably, $F . \mathbf { b a c k p r o p } ( v , \delta o )$ has the same dimension as $v ^ { \top }$ , e.g. $F _ { \mathrm { o u t } }$ .backprop $( ( x _ { t + 1 } , s _ { t } , \theta ) , \delta o _ { t + 1 } )$ has three components, of the same dimensions as $x _ { t + 1 } ^ { \top }$ , $s _ { t } ^ { \top }$ and $\theta ^ { \top }$ .
|
| 187 |
+
|
| 188 |
+
The proposed update rule for stochastic gradient descent (3) can be directly adapted to other optimizers, e.g. Adaptative Momentum (Adam) Kingma & Ba (2014) or Adaptative Gradient Duchi et al. (2010). Vanilla stochastic gradient descent (SGD) and Adam are used hereafter. In Alg. 1, such optimizers are denoted by SGDOpt and the corresponding parameter update given current parameter $\theta$ , gradient estimate $g _ { t }$ and learning rate $\eta _ { t }$ is denoted SGDOpt.update $( g _ { t } , \eta _ { t } , \theta )$ .
|
| 189 |
+
|
| 190 |
+
# 3.4 MEMORY- $\mathcal { T }$ UORO AND RANK- $k$ UORO
|
| 191 |
+
|
| 192 |
+
The unbiased gradient estimates of UORO injects noise via $\nu$ , thus requiring smaller learning rates. To reduce noise, UORO can be used on top of truncated BPTT so that recent gradients are computed exactly.
|
| 193 |
+
|
| 194 |
+
Formally, this just requires applying Algorithm 1 to a new transition function $F ^ { T }$ which is just $T$ consecutive steps of the original model $F$ . Then the backpropagation operation in Algorithm 1 becomes a backpropagation over the last $T$ steps, as in truncated BPTT. The loss of one step of $F ^ { T }$ is the sum of the losses of the last $T$ steps of $F$ , namely $\ell _ { t + 1 } ^ { t + T } : = \sum _ { k = t + 1 } ^ { t + T } \ell _ { k }$ . Likewise, the forward tangent propagation is performed through $F ^ { T }$ . This way, we obtain an unbiased gradient estimate in which the gradients from the last $T$ steps are computed exactly and incur no noise. The resulting algorithm is referred to as memory- $T$ UORO. Its scaling in $T$ is similar to $T$ -truncated BPTT, both in
|
| 195 |
+
|
| 196 |
+
# Algorithm 1 — One step of UORO (from time $t$ to $t + 1$ )
|
| 197 |
+
|
| 198 |
+
# Inputs:
|
| 199 |
+
|
| 200 |
+
– $x _ { t + 1 }$ , $o _ { t + 1 } ^ { * }$ , $s _ { t }$ and $\theta$ : input, target, previous recurrent state, and parameters – $\tilde { s } _ { t }$ column vector of size state, $\tilde { \theta } _ { t }$ row vector of size params such that $\mathbb { E } \tilde { s } _ { t } \otimes \tilde { { \boldsymbol { \theta } } } _ { t } = \partial s _ { t } / \partial { \boldsymbol { \theta } }$ – SGDOpt and $\eta _ { t + 1 }$ : stochastic optimizer and its learning rate
|
| 201 |
+
|
| 202 |
+
# Outputs:
|
| 203 |
+
|
| 204 |
+
$/ { * }$ compute next state and loss \*/ $\begin{array} { r l } & { s _ { t + 1 } \xleftarrow { * } F _ { \mathrm { s t a t e . } } \mathbf { f o r w a r d } ( x _ { t + 1 } , s _ { t } , \theta ) , \quad o _ { t + 1 } \xleftarrow { } F _ { \mathrm { o u t . } } \mathbf { f o r w a r d } ( x _ { t + 1 } , s _ { t } , \theta ) } \\ & { \ell _ { t + 1 } \xleftarrow { * } \ell ( o _ { t + 1 } , o _ { t + 1 } ^ { * } ) } \end{array}$
|
| 205 |
+
|
| 206 |
+
# $/ { * }$ compute gradient estimate $^ { * }$
|
| 207 |
+
|
| 208 |
+
$$
|
| 209 |
+
\begin{array} { r l } & { \bigl ( \_ , \delta s , \dot { \delta } \theta \bigr ) \xleftarrow { } F _ { \mathrm { o u t } } . \mathbf { b a c k p r o p } \left( ( x _ { t + 1 } , s _ { t } , \theta ) , \frac { \partial \ell _ { t + 1 } } { \partial o _ { t + 1 } } \right) } \\ & { \tilde { g } _ { t + 1 } \xleftarrow { } \left( \delta s \cdot \tilde { s } _ { t } \right) \tilde { \theta } _ { t } + \delta \theta } \end{array}
|
| 210 |
+
$$
|
| 211 |
+
|
| 212 |
+
# $/ { * }$ prepare for reduction $^ { * }$
|
| 213 |
+
|
| 214 |
+
$$
|
| 215 |
+
\rho _ { 0 } \gets \sqrt { \frac { \lVert \tilde { { \boldsymbol { \theta } } } _ { t } \rVert } { \lVert \tilde { { \boldsymbol { s } } } _ { t + 1 } \rVert + \varepsilon } } + \varepsilon , \quad \rho _ { 1 } \gets \sqrt { \frac { \lVert \delta { \boldsymbol { \theta } } _ { g } \rVert } { \lVert \nu \rVert + \varepsilon } } + \varepsilon \mathrm { ~ w i t h ~ } \varepsilon = 1 0 ^ { - 7 }
|
| 216 |
+
$$
|
| 217 |
+
|
| 218 |
+
$$
|
| 219 |
+
\begin{array} { r l } & { \cdots \quad \cdots \quad ^ { \prime } } \\ & { \tilde { s } _ { t + 1 } \gets \rho _ { 0 } \tilde { s } _ { t + 1 } + \rho _ { 1 } \nu , \quad \tilde { \theta } _ { t + 1 } \gets \frac { \tilde { \theta } _ { t } } { \rho _ { 0 } } + \frac { \delta \theta _ { g } } { \rho _ { 1 } } } \\ & { / \ast \mathbf { u p d a t e } \theta \ast \prime } \\ & { \mathrm { S G D O p t . u p d a t e } ( \tilde { g } _ { t + 1 } , \eta _ { t + 1 } , \theta ) } \end{array}
|
| 220 |
+
$$
|
| 221 |
+
|
| 222 |
+
terms of memory and computation. In the experiments below, memory- $T$ UORO reduced variance early on, but did not significantly impact later performance.
|
| 223 |
+
|
| 224 |
+
The noise in UORO can also be reduced by using higher-rank gradient estimates (rank- $\cdot r$ instead of rank-1), which amounts to maintaining $r$ distinct values of $\tilde { s }$ and $\tilde { \theta }$ in Algorithm 1 and averaging the resulting values of $\tilde { g }$ . We did not exploit this possibility in the experiments below, although $r = 2$ visibly reduced variance in preliminary tests.
|
| 225 |
+
|
| 226 |
+
# 4 UORO’S VARIANCE IS STABLE AS TIME GOES BY
|
| 227 |
+
|
| 228 |
+
Gradient-based sequential learning on an unbounded data stream requires that the variance of the gradient estimate does not explode through time. UORO is specifically built to provide an unbiased estimate whose variance does not explode over time.
|
| 229 |
+
|
| 230 |
+
A precise statement regarding UORO’s convergence and boundedness of the variance of gradients is provided in Massé (2017). Informally, when the largest eigenvalue of the differential transition operator $\partial F _ { \mathrm { s t a t e } } / \partial s$ is uniformly bounded by a constant $\delta < 1$ (which characterizes stable dynamical systems), the normalizing factors in (14) and (15) enforce that the influence of previous $\nu$ ’s decrease exponentially with time.
|
| 231 |
+
|
| 232 |
+
We hereby provide an experimental validation of the boundedness of UORO’s variance in Fig. 1a. To monitor the variance of UORO’s estimate over time, a 64-unit GRU recurrent network is trained on the first $1 0 ^ { 7 }$ characters of the full works of Shakespeare using UORO. The network is then rerun
|
| 233 |
+
|
| 234 |
+

|
| 235 |
+
Figure 1: (a) The relative variance of UORO gradient estimates does not significantly increase with time. Note the logarithmic scale on the time axis. (b) The relative variance of UORO gradient estimates significantly increases with network size. Note the logarithmic scale on number of units. (c) Variance of larger networks affects learning on a small range copy task.
|
| 236 |
+
|
| 237 |
+
100 times on the 10000 first characters of the text, and gradients estimates at each time steps are computed, but not applied. The gradient relative variance, that is
|
| 238 |
+
|
| 239 |
+
$$
|
| 240 |
+
{ \frac { \mathbb { E } \left[ \left\| g _ { t } - \mathbb { E } \left[ g _ { t } \right] \right\| ^ { 2 } \right] } { \left\| \mathbb { E } \left[ g _ { t } \right] \right\| ^ { 2 } } } ,
|
| 241 |
+
$$
|
| 242 |
+
|
| 243 |
+
is computed, where the average is taken with respect to runs. This quantity appears to be stationary over time (Fig. 1a).
|
| 244 |
+
|
| 245 |
+
# 5 UORO’S VARIANCE INCREASES WITH THE NUMBER OF HIDDEN UNITS
|
| 246 |
+
|
| 247 |
+
As the number of hidden units in the recurrent network increases, the rank one approximation that is used to provide an unbiased gradient estimate becomes coarser. Consequently, the relative variance, as defined in (18), should increase as the number of hidden units increases.
|
| 248 |
+
|
| 249 |
+
This increase is experimentally verified in Fig. 1b. Untrained GRU networks with various number of units are run for 10 timesteps, 100 times for each size, and the UORO gradient estimate after these 10 timesteps is computed (but not applied). The relative variance of these gradients over the 100 runs is evaluated, for each network size. As shown in the figure, the relative variance increases with the number of units. Note the horizontal log scale.
|
| 250 |
+
|
| 251 |
+
The increase of the variance of the estimate with network size underlines the need for smaller learning rates when training large networks with UORO, compared to truncated backpropagation. This can imply slower learning for the kind of dependencies that truncated backpropagation can learn. The need for lower learning rates with larger networks is exemplified in Fig. 1c. GRU networks of various hidden sizes are trained with UORO on a simple copy task, as presented in Hochreiter & Schmidhuber (1997), with a lag of $T = 5$ . The networks are all trained with the same decreasing learning rate, $\begin{array} { r } { \begin{array} { r } { \eta _ { t } = \frac { 1 0 ^ { - 4 } } { 1 + 3 \cdot 1 0 ^ { - 3 } t } } \end{array} } \end{array}$ . For all network sizes except the largest, the error decreases slowly but steadily. For the largest network, the variance is too large compared to the learning rate, and the error jumps sharply midway through.
|
| 252 |
+
|
| 253 |
+
# 6 EXPERIMENTS ILLUSTRATING TRUNCATION BIAS
|
| 254 |
+
|
| 255 |
+
The set of experiments below aims at displaying specific cases where the biases from truncated BPTT are likely to prevent convergence of learning. On this test set, UORO’s unbiasedness provides steady convergence, highlighting the importance of unbiased estimates for general recurrent learning.
|
| 256 |
+
|
| 257 |
+
Influence balancing. The first test case exemplifies learning of a scalar parameter $\theta$ which has a positive influence in the short term, but a negative one in the long run. Short-sightedness of truncated algorithms results in abrupt failure, with the parameter exploding in the wrong direction, even with truncation lengths exceeding the temporal dependency range by a factor of 10 or so.
|
| 258 |
+
|
| 259 |
+

|
| 260 |
+
Figure 2: (a)Results for influence balancing with 23 units and 13 minus; note the vertical log scale. (b)Learning curves on distant brackets $( 1 , 5 , 1 0 )$ .
|
| 261 |
+
|
| 262 |
+

|
| 263 |
+
Figure 3: Datasets.
|
| 264 |
+
|
| 265 |
+
Consider the linear dynamics
|
| 266 |
+
|
| 267 |
+
$$
|
| 268 |
+
s _ { t + 1 } = A s _ { t } + ( \theta , \ldots , \theta , - \theta , \ldots , - \theta ) ^ { \top }
|
| 269 |
+
$$
|
| 270 |
+
|
| 271 |
+
with $A$ a square matrix of size $n$ with $A _ { i , i } = 1 / 2 , A _ { i , i + 1 } = 1 / 2$ , and 0 elsewhere; $\theta \in \mathbb { R }$ is a scalar parameter. The second term has $p$ positive- $\cdot \theta$ entries and $n - p$ negative- $\cdot \theta$ entries. Intuitively, the effect of $\theta$ on a unit diffuses to shallower units over time (Fig. 3a). Unit $i$ only feels the effect of $\theta$ from unit $i + n$ after $n$ time steps, so the intrinsic time scale of the system is $\approx n$ . The loss considered is a target on the shallowest unit $s ^ { 1 }$ ,
|
| 272 |
+
|
| 273 |
+
$$
|
| 274 |
+
\begin{array} { r } { \ell _ { t } = \frac { 1 } { 2 } ( s _ { t } ^ { 1 } - 1 ) ^ { 2 } . } \end{array}
|
| 275 |
+
$$
|
| 276 |
+
|
| 277 |
+
Learning is performed online with vanilla SGD, using gradient estimates either from UORO or $T$ - truncated BPTT with various $T$ . Learning rates are of the form $\begin{array} { r } { \begin{array} { r } { \eta _ { t } = \frac { \eta } { 1 + \sqrt { t } } } \end{array} } \end{array}$ for suitable values of $\eta$ .
|
| 278 |
+
|
| 279 |
+
As shown in Fig. 2a, UORO solves the problem while $T$ -truncated BPTT fails to converge for any learning rate, even for truncations $T$ largely above $n$ . Failure is caused by ill balancing of time dependencies: the influence of $\theta$ on the loss is estimated with the wrong sign due to truncation. For $n = 2 3$ units, with 13 minus signs, truncated BPTT requires a truncation $T \geq 2 0 0$ to converge.
|
| 280 |
+
|
| 281 |
+
Next-character prediction. The next experiment is character-level synthetic text prediction: the goal is to train a recurrent model to predict the $t + 1$ -th character of a text given the first $t$ online, with a single pass on the data sequence.
|
| 282 |
+
|
| 283 |
+
A single layer of 64 units, either GRU or LSTM, is used to output a probability vector for the next character. The cross entropy criterion is used to compute the loss.At each time $t$ we plot the cumulated loss per character on the first $t$ characters, $\textstyle { \frac { 1 } { t } } \sum _ { s = 1 } ^ { t } \ell _ { s }$ . (Losses for individual characters are quite noisy, as not all characters in the sequence are equally difficult to predict.) This would be the compression rate in bits per character if the models were used as online compression algorithms on the first $t$ characters. In addition, in Table 1 we report a “recent” loss on the last 100, 000 characters, which is more representative of the model at the end of learning.
|
| 284 |
+
|
| 285 |
+
Optimization was performed using Adam with the default setting $\beta _ { 1 } = 0 . 9$ and $\beta _ { 2 } = 0 . 9 9 9$ , and a decreasing learning rate $\begin{array} { r } { \eta _ { t } = \frac { \gamma } { 1 + \alpha \sqrt { t } } } \end{array}$ , with $t$ the number of characters processed. As convergence of
|
| 286 |
+
|
| 287 |
+

|
| 288 |
+
Figure 4: Learning curves on anbn(1,32)
|
| 289 |
+
|
| 290 |
+
UORO requires smaller learning rates than truncated BPTT, this favors UORO. Indeed UORO can fail to converge with non-decreasing learning rates, due to its stochastic nature.
|
| 291 |
+
|
| 292 |
+
DISTANT BRACKETS DATASET $( s , k , a )$ . The distant brackets dataset is generated by repeatedly outputting a left bracket, generating $s$ random characters from an alphabet of size $a$ , outputting a right bracket, generating $k$ random characters from the same alphabet, repeating the same first $s$ characters between brackets and finally outputting a line break. A sample is shown in Fig. 3b.
|
| 293 |
+
|
| 294 |
+
UORO is compared to 4-truncated BPTT. Truncation is deliberately shorter than the inherent time range of the data, to illustrate how bias can penalize learning if the inherent time range is unknown a priori. The results are given in Fig. 2b (with learning rates using $\alpha = 0 . 0 1 5$ and $\gamma = 1 0 ^ { - 3 }$ ). UORO beats 4-truncated BPTT in the long run, and succeeds in reaching near optimal behaviour both with GRUs and LSTMs. Truncated BPTT remains stuck near a memoryless optimum with LSTMs; with GRUs it keeps learning, but at a slow rate. Still, truncated BPTT displays faster early convergence.
|
| 295 |
+
|
| 296 |
+
$a ^ { n } b ^ { n } ( k , l )$ DATASET. The $a ^ { n } b ^ { n } ( k , l )$ dataset tests memory and counting Gers & Schmidhuber (2001); it is generated by repeatedly picking a random number $n$ between $k$ and $l$ , outputting a string of $n a$ ’s, a line break, n b’s, and a line break (see Fig. 3c). The difficulty lies in matching the number of $a$ ’s and $b$ ’s.
|
| 297 |
+
|
| 298 |
+
Table 1: Averaged loss on the $1 0 ^ { 5 }$ last iterations on $a ^ { n } b ^ { n } ( 1 , 3 2 )$ .
|
| 299 |
+
|
| 300 |
+
<table><tr><td></td><td>Truncation</td><td>LSTM GRU</td></tr><tr><td rowspan="3">UORO</td><td>No memory (default)</td><td>0.147 0.155</td></tr><tr><td>Memory-2</td><td>0.149 0.174</td></tr><tr><td>Memory-16</td><td>0.154 0.149</td></tr><tr><td rowspan="3">Truncated BPTT</td><td>1</td><td>0.178 0.231</td></tr><tr><td>2</td><td>0.149 0.285</td></tr><tr><td>16</td><td>0.144 0.207</td></tr></table>
|
| 301 |
+
|
| 302 |
+
Plots for a few setups are given in Fig. 4. The learning rates used $\alpha \ = \ 0 . 0 3$ and $\gamma \ = \ 1 0 ^ { - 3 }$ . Numerical results at the end of training are given in Table 1. For reference, the true entropy rate is $0 . 1 4 { \mathrm { ~ b p c } }$ , while the entropy rate of a model that does not understand that the numbers of $a ^ { \mathrm { i } }$ ’s and $b$ ’s coincide is double, 0.28 bpc.
|
| 303 |
+
|
| 304 |
+
Here, in every setup, UORO reliably converges and reaches near optimal performance. Increasing UORO’s range does not significantly improve results: providing an unbiased estimate is enough to provide reliable convergence in this case. Meanwhile, truncated BPTT performs inconsistently. Notably, with GRUs, it either converges to a poor local optimum corresponding to no understanding of the temporal structure, or exhibits gradient reascent in the long run. Remarkably, with LSTMs rather than GRUs, 16-truncated BPTT reliably reaches optimal behavior on this problem even with biased gradient estimates.
|
| 305 |
+
|
| 306 |
+
# CONCLUSION
|
| 307 |
+
|
| 308 |
+
We introduced UORO, an algorithm for training recurrent neural networks in a streaming, memoryless fashion. UORO is easy to implement, and requires as little computation time as truncated
|
| 309 |
+
|
| 310 |
+
BPTT, at the cost of noise injection. Importantly, contrary to most other approaches, UORO scalably provides unbiasedness of gradient estimates. Unbiasedness is of paramount importance in the current theory of stochastic gradient descent. Furthermore, UORO is experimentally shown to benefit from its unbiasedness, converging even in cases where truncated BPTT fails to reliably achieve good results or diverges pathologically.
|
| 311 |
+
|
| 312 |
+
# REFERENCES
|
| 313 |
+
|
| 314 |
+
John Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and stochastic optimization. Technical Report UCB/EECS-2010-24, EECS Department, University of California, Berkeley, Mar 2010. URL http://www2.eecs.berkeley.edu/Pubs/ TechRpts/2010/EECS-2010-24.html.
|
| 315 |
+
|
| 316 |
+
Felix A Gers and Jürgen Schmidhuber. Long short-term memory learns context free and context sensitive languages. In Artificial Neural Nets and Genetic Algorithms, pp. 134–137. Springer, 2001.
|
| 317 |
+
|
| 318 |
+
Audrunas Gruslys, Rémi Munos, Ivo Danihelka, Marc Lanctot, and Alex Graves. Memory-efficient backpropagation through time. CoRR, abs/1606.03401, 2016. URL http://arxiv.org/ abs/1606.03401.
|
| 319 |
+
|
| 320 |
+
Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural Comput., 9(8):1735– 1780, November 1997. ISSN 0899-7667. doi: 10.1162/neco.1997.9.8.1735. URL http://dx. doi.org/10.1162/neco.1997.9.8.1735.
|
| 321 |
+
|
| 322 |
+
Max Jaderberg, Wojciech Marian Czarnecki, Simon Osindero, Oriol Vinyals, Alex Graves, and Koray Kavukcuoglu. Decoupled neural interfaces using synthetic gradients. CoRR, abs/1608.05343, 2016. URL http://arxiv.org/abs/1608.05343.
|
| 323 |
+
|
| 324 |
+
Herbert Jaeger. Tutorial on training recurrent neural networks, covering BPPT, RTRL, EKF and the “echo state network” approach, 2002.
|
| 325 |
+
|
| 326 |
+
Herbert Jaeger, Mantas Lukoševicius, Dan Popovici, and Udo Siewert. Optimization and Ap- ˇ plications of Echo State Networks with Leaky-Integrator Neurons. Neural Networks, 20(3): 335–352, April 2007. ISSN 08936080. doi: 10.1016/j.neunet.2007.04.016. URL http: //www.sciencedirect.com/science/article/pii/S089360800700041X.
|
| 327 |
+
|
| 328 |
+
Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. URL http://arxiv.org/abs/1412.6980.
|
| 329 |
+
|
| 330 |
+
Wolfgang Maass, Thomas Natschläger, and Henry Markram. Real-time computing without stable states: A new framework for neural computation based on perturbations. Neural Comput., 14 (11):2531–2560, November 2002. ISSN 0899-7667. doi: 10.1162/089976602760407955. URL http://dx.doi.org/10.1162/089976602760407955.
|
| 331 |
+
|
| 332 |
+
Pierre-Yves Massé. Autour de l’Usage des gradients en apprentissage statistique. PhD thesis, 2017. URL https://hal.archives-ouvertes.fr/tel-01665478.
|
| 333 |
+
|
| 334 |
+
Javier R. Movellan, Paul Mineiro, and R. J. Williams. A Monte Carlo EM approach for partially observable diffusion processes: Theory and applications to neural networks. Neural Comput., 14 (7):1507–1544, July 2002. ISSN 0899-7667. doi: 10.1162/08997660260028593. URL http: //dx.doi.org/10.1162/08997660260028593.
|
| 335 |
+
|
| 336 |
+
Yann Ollivier, Corentin Tallec, and Guillaume Charpiat. Training recurrent networks online without backtracking. CoRR, abs/1507.07680, 2015. URL http://arxiv.org/abs/1507. 07680.
|
| 337 |
+
|
| 338 |
+
Barak A Pearlmutter. Gradient calculations for dynamic recurrent neural networks: A survey. IEEE Transactions on Neural networks, 6(5):1212–1228, 1995.
|
| 339 |
+
|
| 340 |
+
Patrice Y. Simard, Bernard Victorri, Yann LeCun, and John S. Denker. Tangent prop - a formalism for specifying selected invariances in an adaptive network. In John E. Moody, Stephen Jose Hanson, and Richard Lippmann (eds.), NIPS, pp. 895–903. Morgan Kaufmann, 1991. ISBN 1-55860-222-4. URL http://dblp.uni-trier.de/db/conf/nips/ nips1991.html#SimardVLD91.
|
| 341 |
+
|
| 342 |
+
Jochen J. Steil. Backpropagation-decorrelation: online recurrent learning with O(N) complexity. In Neural Networks, 2004. Proceedings. 2004 IEEE International Joint Conference on, volume 2, pp. 843–848 vol.2. IEEE, July 2004. ISBN 0-7803-8359-1. doi: 10.1109/ijcnn.2004.1380039. URL http://dx.doi.org/10.1109/ijcnn.2004.1380039.
|
| 343 |
+
|
| 344 |
+
Ronald J. Williams and David Zipser. A learning algorithm for continually running fully recurrent neural networks. Neural Comput., 1(2):270–280, June 1989. ISSN 0899-7667. doi: 10.1162/ neco.1989.1.2.270. URL http://dx.doi.org/10.1162/neco.1989.1.2.270.
|
md/train/rJUYGxbCW/rJUYGxbCW.md
ADDED
|
@@ -0,0 +1,380 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# PIXELDEFEND: LEVERAGING GENERATIVE MODELS TO UNDERSTAND AND DEFEND AGAINST ADVERSARIAL EXAMPLES
|
| 2 |
+
|
| 3 |
+
Yang Song
|
| 4 |
+
Stanford University
|
| 5 |
+
yangsong@cs.stanford.edu
|
| 6 |
+
|
| 7 |
+
Taesup Kim Université de Montréal taesup.kim@umontreal.ca
|
| 8 |
+
|
| 9 |
+
Sebastian Nowozin Microsoft Research nowozin@microsoft.com
|
| 10 |
+
|
| 11 |
+
Stefano Ermon Stanford University ermon@cs.stanford.edu
|
| 12 |
+
|
| 13 |
+
Nate Kushman
|
| 14 |
+
Microsoft Research
|
| 15 |
+
nkushman@microsoft.com
|
| 16 |
+
|
| 17 |
+
# ABSTRACT
|
| 18 |
+
|
| 19 |
+
Adversarial perturbations of normal images are usually imperceptible to humans, but they can seriously confuse state-of-the-art machine learning models. What makes them so special in the eyes of image classifiers? In this paper, we show empirically that adversarial examples mainly lie in the low probability regions of the training distribution, regardless of attack types and targeted models. Using statistical hypothesis testing, we find that modern neural density models are surprisingly good at detecting imperceptible image perturbations. Based on this discovery, we devised PixelDefend, a new approach that purifies a maliciously perturbed image by moving it back towards the distribution seen in the training data. The purified image is then run through an unmodified classifier, making our method agnostic to both the classifier and the attacking method. As a result, PixelDefend can be used to protect already deployed models and be combined with other model-specific defenses. Experiments show that our method greatly improves resilience across a wide variety of state-of-the-art attacking methods, increasing accuracy on the strongest attack from $63 \%$ to $84 \%$ for Fashion MNIST and from $32 \%$ to $70 \%$ for CIFAR-10.
|
| 20 |
+
|
| 21 |
+
# 1 INTRODUCTION
|
| 22 |
+
|
| 23 |
+
Recent work has shown that small, carefully chosen modifications to the inputs of a neural network classifier can cause the model to give incorrect labels (Szegedy et al., 2013; Goodfellow et al., 2014). This weakness of neural network models is particularly surprising because the modifications required are often imperceptible, or barely perceptible, to humans. As deep neural networks are being deployed in safety-critical applications such as self-driving cars (Amodei et al., 2016), it becomes increasingly important to develop techniques to handle these kinds of inputs.
|
| 24 |
+
|
| 25 |
+
Rethinking adversarial examples The existence of such adversarial examples seems quite surprising. A neural network classifier can get super-human performance (He et al., 2015) on clean test images, but will give embarrassingly wrong predictions on the same set of images if some imperceptible noise is added. What makes this noise so special to deep neural networks?
|
| 26 |
+
|
| 27 |
+
In this paper, we propose and empirically evaluate the following hypothesis: Even though they have very small deviations from clean images, adversarial examples largely lie in the low probability regions of the distribution that generated the data used to train the model. Therefore, they fool classifiers mainly due to covariate shift. This is analogous to training models on MNIST (LeCun et al., 1998) but testing them on Street View House Numbers (Netzer et al., 2011).
|
| 28 |
+
|
| 29 |
+
To study this hypothesis, we first need to estimate the probability density of the underlying training distribution. To this end, we leverage recent developments in generative models. Specifically, we choose a PixelCNN (van den Oord et al., 2016b) model for its state-of-the-art performance in modeling image distributions (van den Oord et al., 2016a; Salimans et al., 2017) and tractability of evaluating the data likelihood. In the first part of the paper, we show that a well-trained PixelCNN generative model is very sensitive to adversarial inputs, typically giving them several orders of magnitude lower likelihoods compared to those of training and test images.
|
| 30 |
+
|
| 31 |
+
Detecting adversarial examples An important step towards handling adversarial images is the ability to detect them. In order to catch any kind of threat, existing work has utilized confidence estimates from Bayesian neural networks (BNNs) or dropout (Li & Gal, 2017; Feinman et al., 2017). However, if their model is misspecified, the uncertainty estimates can be affected by covariate shift (Shimodaira, 2000). This is problematic in an adversarial setting, since the attacker might be able to make use of the inductive bias from the misspecified classifier to bypass the detection.
|
| 32 |
+
|
| 33 |
+
Protection against the strongest adversary requires a pessimistic perspective—our assumption is that the classifier cannot give reliable predictions for any input outside of the training distribution. Therefore, instead of relying on label uncertainties given by the classifier, we leverage statistical hypothesis testing to detect any input not drawn from the same distribution as training images.
|
| 34 |
+
|
| 35 |
+
Specifically, we first compute the probabilities of all training images under the generative model. Afterwards, for a novel input we compute the probability density at the input and evaluate its rank (in ascending order) among the density values of all training examples. Next, the rank can be used as a test statistic and gives us a $p$ -value for whether or not the image was drawn from the training distribution. This method is general and practical and we show that the $p$ -value enables us to detect adversarial images across a large number of different attacking methods with high probability, even when they differ from clean images by only a few pixel values.
|
| 36 |
+
|
| 37 |
+
Purifying adversarial examples Since adversarial examples are generated from clean images by adding imperceptible perturbations, it is possible to decontaminate them by searching for more probable images within a small distance of the original ones. By limiting the $L ^ { \infty }$ distance1, this image purification procedure generates only imperceptible modifications to the original input, so that the true labels of the purified images remain the same. The resulting purified images have higher probability under the training distribution, so we can expect that a classifier trained on the clean images will have more reliable predictions on the purified images. Moreover, for inputs which are not corrupted by adversarial perturbations the purified results remain in a high density region.
|
| 38 |
+
|
| 39 |
+
We use this intuition to build PixelDefend, an image purification procedure which requires no knowledge of the attack nor the targeted classifier. PixelDefend approximates the training distribution using a PixelCNN model. The constrained optimization problem of finding the highest probability image within an $\epsilon$ -ball of the original is computationally intractable, however, so we approximate it using a greedy decoding procedure. Since PixelDefend does not change the classification model, it can be combined with other adversarial defense techniques, including adversarial training (Goodfellow et al., 2014), to provide synergistic improvements. We show experimentally that PixelDefend performs exceptionally well in practice, leading to state-of-the art results against a large number of attacks, especially when combined with adversarial training.
|
| 40 |
+
|
| 41 |
+
Contributions Our main contributions are as follows:
|
| 42 |
+
|
| 43 |
+
• We show that generative models can be used for detecting adversarially perturbed images and observe that most adversarial examples lie in low probability regions.
|
| 44 |
+
• We introduce a novel family of methods for defending against adversarial attacks based on the idea of purification.
|
| 45 |
+
We show that a defensive technique from this family, PixelDefend, can achieve state-of-theart results on a large number of attacking techniques, improving the accuracy against the strongest adversary on the CIFAR-10 dataset from $32 \%$ to $70 \%$ .
|
| 46 |
+
|
| 47 |
+
# 2 BACKGROUND
|
| 48 |
+
|
| 49 |
+
# 2.1 ATTACKING METHODS
|
| 50 |
+
|
| 51 |
+
Given a test image $\mathbf { X }$ , an attacking method tries to find a small perturbation $\pmb { \Delta }$ with $\| \pmb { \Delta } \| _ { \infty } \le \epsilon _ { \mathrm { a t t a c k } }$ such that a classifier $f$ gives different predictions on $\mathbf { X } ^ { a d v } \triangleq \mathbf { X } + \Delta$ and $\mathbf { X }$ . Here colors in the image are represented by integers from 0 to 255. Each attack method is controlled by a configurable $\epsilon _ { \mathrm { a t t a c k } }$ parameter which sets the maximum perturbation allowed for each pixel in integer increments on the color scale. We only consider white-box attacks in this paper, i.e., the attack methods can get access to weights of the classifier. In the following, we give an introduction to all the attacking methods used in our experiments.
|
| 52 |
+
|
| 53 |
+
Random perturbation (RAND) Random perturbation is arguably the weakest attacking method, and we include it as the simplest baseline. Formally, the randomly perturbed image is given by
|
| 54 |
+
|
| 55 |
+
$$
|
| 56 |
+
{ \bf X } ^ { a d v } = { \bf X } + \mathcal { U } ( - \lfloor \epsilon _ { \mathrm { a t t a c k } } \rfloor , \lfloor \epsilon _ { \mathrm { a t t a c k } } \rfloor ) ,
|
| 57 |
+
$$
|
| 58 |
+
|
| 59 |
+
where $\textstyle { \mathcal { U } } ( a , b )$ denotes an element-wise uniform distribution of integers from $[ a , b ]$
|
| 60 |
+
|
| 61 |
+
Fast gradient sign method (FGSM) Goodfellow et al. (2014) proposed the generation of malicious perturbations in the direction of the loss gradient $\nabla _ { \mathbf { X } } L ( \mathbf { X } , y )$ , where $L ( \mathbf { X } , y )$ is the loss function used to train the model. The adversarial examples are computed by
|
| 62 |
+
|
| 63 |
+
$$
|
| 64 |
+
{ \bf X } ^ { a d v } = { \bf X } + \epsilon _ { \mathrm { a t t a c k } } \mathrm { s i g n } ( \nabla _ { \bf X } L ( { \bf X } , y ) ) .
|
| 65 |
+
$$
|
| 66 |
+
|
| 67 |
+
Basic iterative method (BIM) Kurakin et al. (2016) tested a simple variant of the fast gradient sign method by applying it multiple times with a smaller step size. Formally, the adversarial examples are computed as
|
| 68 |
+
|
| 69 |
+
$$
|
| 70 |
+
{ \bf X } _ { 0 } ^ { a d v } = { \bf X } , { \bf X } _ { n + 1 } ^ { a d v } = \mathrm { C l i p } _ { \bf x } ^ { \epsilon _ { \mathrm { a t a c k } } } \left\{ { \bf X } _ { n } ^ { a d v } + \alpha \mathrm { s i g n } ( \nabla _ { \bf X } L ( { \bf X } _ { n } ^ { a d v } , y ) ) \right\} ,
|
| 71 |
+
$$
|
| 72 |
+
|
| 73 |
+
where $\mathrm { C l i p } _ { \mathbf { X } } ^ { \epsilon _ { \mathrm { a t t a c k } } }$ means we clip the resulting image to be within the $\epsilon _ { \mathrm { a t t a c k } }$ -ball of $\mathbf { X }$ . Following Kurakin et al. (2016), we set $\alpha = 1$ and the number of iterations to be $\left\lfloor \operatorname* { m i n } ( \epsilon _ { \mathrm { a t t a c k } } + 4 , 1 . 2 5 \epsilon _ { \mathrm { a t t a c k } } ) \right\rfloor$ This method is also called Projected Gradient Descent (PGD) in Madry et al. (2017).
|
| 74 |
+
|
| 75 |
+
DeepFool DeepFool (Moosavi-Dezfooli et al., 2016) works by iteratively linearizing the decision boundary and finding the closest adversarial examples with geometric formulas. However, compared to FGSM and BIM, this method is much slower in practice. We clip the resulting image so that its perturbation is no larger than $\epsilon _ { \mathrm { a t t a c k } }$ .
|
| 76 |
+
|
| 77 |
+
Carlini-Wagner (CW) Carlini & Wagner (2017b) proposed an efficient optimization objective for iteratively finding the adversarial examples with the smallest perturbations. As with DeepFool, we clip the output image to make sure the perturbations are limited by $\epsilon _ { \mathrm { a t t a c k } }$ .
|
| 78 |
+
|
| 79 |
+
# 2.2 DEFENSE METHODS
|
| 80 |
+
|
| 81 |
+
Current defense methods generally fall into two classes. They either (1) change the network architecture or training procedure to make it more robust, or (2) modify adversarial examples to reduce their harm. In this paper, we take the following defense methods into comparison.
|
| 82 |
+
|
| 83 |
+
Adversarial training This defense works by generating adversarial examples on-the-fly during training and including them into the training set. FGSM adversarial examples are the most commonly used ones for adversarial training, since they are fast to generate and easy to train. Although training with higher-order adversarial examples (e.g., BIM) has witnessed some success in small datasets (Madry et al., 2017), other work has reported failure in larger ones (Kurakin et al., 2016). We consider both variants in our work.
|
| 84 |
+
|
| 85 |
+
Label smoothing In contrast to adversarial training, label smoothing (Warde-Farley & Goodfellow, 2016) is agnostic to the attack method. It converts one-hot labels to soft targets, where the correct class has value $1 - \epsilon$ while the other (wrong) classes have value $\epsilon / ( N - \bar { 1 } )$ . Here $\epsilon$ is a small constant and $N$ is the number of classes. When the classifier is re-trained on these soft targets rather than the one-hot labels it is significantly more robust to adversarial examples. This method was originally devised to achieve a similar effect as defensive distillation (Papernot et al., 2016c), and their performance is comparable. We didn’t compare to defensive distillation since it is more computationally expensive.
|
| 86 |
+
|
| 87 |
+
Feature squeezing Feature squeezing $\mathrm { { X u } }$ et al., 2017a) is both attack-agnostic and modelagnostic. Given any input image, it first reduces the color range from [0, 255] to a smaller value, and then smooths the image with a median filter. The resulting image is then passed to a classifier for predictions. Since this technique does not depend on attacking methods and classifiers, it can be combined with other defensive methods such as adversarial training, similar to PixelDefend.
|
| 88 |
+
|
| 89 |
+
# 2.3 EXPERIMENT METHODOLOGIES
|
| 90 |
+
|
| 91 |
+
Datasets Two datasets are used in our experiments: Fashion MNIST (Xiao et al., 2017) and CIFAR-10 (Krizhevsky et al.). Fashion MNIST was designed as a more difficult, but drop-in replacement for MNIST (LeCun et al., 1998). Thus it shares all of MNIST’s characteristics, i.e., 60, 000 training examples and 10, 000 test examples where each example is a $2 8 \times 2 8$ gray-scale image associated with a label from 1 of 10 classes. CIFAR-10 is another dataset that is also broadly used for image classification tasks. It consists of 60, 000 examples, where 50, 000 are used for training and 10, 000 for testing, and each sample is a $3 2 \times 3 2$ color image associated with 1 of 10 classes.
|
| 92 |
+
|
| 93 |
+
Models We examine two state-of-the-art deep neural network image classifiers: ResNet (He et al., 2016) and VGG (Simonyan & Zisserman, 2014). The architectures are described in Appendix C.
|
| 94 |
+
|
| 95 |
+
PixelCNN The PixelCNN (van den Oord et al., 2016b; Salimans et al., 2017) is a generative model with tractable likelihood especially designed for images. The model defines the joint distribution over all pixels by factorizing it into a product of conditional distributions.
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
p _ { \mathrm { C N N } } ( \mathbf { X } ) = \prod _ { i } p _ { \mathrm { C N N } } ( x _ { i } | x _ { 1 : ( i - 1 ) } ) .
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
The pixel dependencies are in raster scan order (row by row and column by column within each row). We train the PixelCNN model for each dataset using only clean (not perturbed) image samples. In Appendix D, we provide clean sample images from the datasets as well as generated image samples from PixelCNN (see Figure 8 and Figure 9).
|
| 102 |
+
|
| 103 |
+
As a convenient representation of $p _ { \mathrm { C N N } } ( \mathbf { X } )$ for images, we also use the concept of bits per dimension, which is defined as $\mathrm { B P D } ( \mathbf { X } ) \triangleq - \log p _ { \mathrm { C N N } } ( \mathbf { X } ) / ( I \times J \times K \times \log 2 )$ for an image of resolution $I \times J$ and $K$ channels.
|
| 104 |
+
|
| 105 |
+
# 3 DETECTING ADVERSARIAL EXAMPLES
|
| 106 |
+
|
| 107 |
+
Adversarial images are defined with respect to a specific classifier. Intuitively, a maliciously perturbed image that causes one network to give a highly confident incorrect prediction might not fool another network. However, recent work (Papernot et al., 2016a; Liu et al., 2016; Tramèr et al., 2017) has shown that adversarial images can transfer across different classifiers. This indicates that there are some intrinsic properties of adversarial examples that are independent of classifiers.
|
| 108 |
+
|
| 109 |
+
One possibility is that, compared to normal training and test images, adversarial examples have much lower probability densities under the image distribution. As a result, classifiers do not have enough training instances to get familiarized with this part of the input space. The resulting prediction task suffers from covariate shift, and since all of the classifiers are trained on the same dataset, this covariate shift will affect all of them similarly and will likely lead to misclassifications.
|
| 110 |
+
|
| 111 |
+
To empirically verify this hypothesis, we train a PixelCNN model on the CIFAR-10 (Krizhevsky & Hinton, 2009) dataset and use its log-likelihood as an approximation to the true underlying probability density. The adversarial examples are generated with respect to a ResNet (He et al., 2016), which gets $92 \%$ accuracy on the test images. We generate adversarial examples from RAND, FGSM, BIM, DeepFool and CW methods with $\epsilon _ { \mathrm { a t t a c k } } = 8$ . Note that as shown in Figure 1, the resulting adversarial perterbations are barely perceptible to humans.
|
| 112 |
+
|
| 113 |
+

|
| 114 |
+
Figure 1: An image sampled from the CIFAR-10 test dataset and various adversarial examples generated from it. The text above shows the attacking method while the text below shows the predicted label of the ResNet.
|
| 115 |
+
|
| 116 |
+

|
| 117 |
+
Figure 2: (a) Likelihoods of different perturbed images with $\epsilon _ { \mathrm { a t t a c k } } = 8$ . (b) Test errors of a ResNet on different adversarial examples.
|
| 118 |
+
|
| 119 |
+
However, the distribution of log-likelihoods show considerable difference between perturbed images and clean images. As summarized in Figure 2, even a $3 \%$ perturbation can lead to systematic decrease of log-likelihoods. Note that the PixelCNN model has no information about the attacking methods for producing those adversarial examples, and no information about the ResNet model either.
|
| 120 |
+
|
| 121 |
+
We can see from Figure 3(b) that random perturbations also push the images outside of the training distribution, even though they do not have the same adverse effect on accuracy. We believe this is due to an inductive bias that is shared by many neural network models but not inherent to all models, as discussed further in Appendix A.
|
| 122 |
+
|
| 123 |
+
Besides qualitative analysis, the log-likelihoods from PixelCNN also provide a quantitative measure for detecting adversarial examples. Combined with permutation test (Efron & Tibshirani, 1994), we can provide a uncertainty value for each input about whether it comes from the training distribution or not. Specifically, let the input $\mathbf { X } ^ { \prime } \overset { \mathrm { i . i . d . } } { \sim } q ( \mathbf { X } )$ and training images $\mathbf { X } _ { 1 } , \cdots , \mathbf { X } _ { N } \overset { \mathrm { i . i . d . } } { \sim } p ( \mathbf { X } )$ . The null hypothesis is $H _ { 0 } : p ( \mathbf { X } ) = { \\overset { \cdot } { q } } ( \mathbf { X } )$ while the alternative is $H _ { 1 } : p ( \mathbf { X } ) \neq q ( \mathbf { X } )$ . We first compute the probabilities give by a PixelCNN for $\mathbf { X } ^ { \prime }$ and $\mathbf { X } _ { 1 } , \cdots , \mathbf { X } _ { N }$ , then use the rank of $p _ { \mathrm { C N N } } ( \mathbf { X } ^ { \prime } )$ in $\{ p _ { \mathrm { C N N } } ( \mathbf { X } _ { 1 } ) , \cdots , \bar { p } _ { \mathrm { C N N } } ( \mathbf { \bar { X } } _ { N } ) \}$ as our test statistic:
|
| 124 |
+
|
| 125 |
+
$$
|
| 126 |
+
T = T ( \mathbf { X } ^ { \prime } ; \mathbf { X } _ { 1 } , \cdots , \mathbf { X } _ { N } ) \triangleq \sum _ { i = 1 } ^ { N } \mathbb { I } [ p _ { \mathrm { C N N } } ( \mathbf { X } _ { i } ) \leq p _ { \mathrm { C N N } } ( \mathbf { X } ^ { \prime } ) ] .
|
| 127 |
+
$$
|
| 128 |
+
|
| 129 |
+
Here $\mathbb { I } [ \cdot ]$ is the indicator function, which equals 1 when the condition inside brackets is true and otherwise equals 0. Let $T _ { i } = T ( { \bf X } _ { i } ; { \bf X } _ { 1 } , \cdot \cdot \cdot , { \bf X } _ { i - 1 } , { \bf X } ^ { \prime } , { \bf X } _ { i + 1 } , \cdot \cdot \cdot , { \bf X } _ { N } )$ . According to the permutation principle, $T _ { i }$ has the same distribution as $T$ under the null hypothesis $H _ { 0 }$ . We can therefore compute the $p$ -value exactly by
|
| 130 |
+
|
| 131 |
+
$$
|
| 132 |
+
p = \frac { 1 } { N + 1 } \left( \sum _ { i = 1 } ^ { N } \mathbb { I } [ T _ { i } \leq T ] + 1 \right) = \frac { T + 1 } { N + 1 } = \frac { 1 } { N + 1 } \left( \sum _ { i = 1 } ^ { N } \mathbb { I } [ p _ { \mathrm { C N N } } ( \mathbf { X } _ { i } ) \leq p _ { \mathrm { C N N } } ( \mathbf { X } ^ { \prime } ) ] + 1 \right) .
|
| 133 |
+
$$
|
| 134 |
+
|
| 135 |
+

|
| 136 |
+
Figure 3: The distribution of $p$ -values under the PixelCNN generative model. The inputs are more outside of the training distribution if their $p$ -value distribution has a larger deviation from uniform. Here “clean” means clean test images. From definition, the $p$ -values of clean training images have a uniform distribution.
|
| 137 |
+
|
| 138 |
+

|
| 139 |
+
Figure 4: An example of how purification works. The above row shows an image from CIFAR10 test set and various attacking images generated from it. The bottom row shows corresponding purified images. The text below each image is the predicted label given by our ResNet.
|
| 140 |
+
|
| 141 |
+
For CIFAR-10, we provide histograms of $p$ -values for different adversarial examples in Figure 3 and ROC curves of using $p$ -values for detection in Figure 6(a). Note that in the ideal case, the $p$ -value distribution of clean test images should be uniform. The method works especially well for attacks producing larger perturbations, such as RAND, FGSM, and BIM. For DeepFool and CW adversarial examples, we can also observe significant deviations from uniform. As shown in Figure 3(a), the $p$ - value distribution of test images are almost uniform, indicating good generalization of the PixelCNN model.
|
| 142 |
+
|
| 143 |
+
# 4 PURIFYING IMAGES WITH PIXELDEFEND
|
| 144 |
+
|
| 145 |
+
In many circumstances, simply detecting adversarial images is not sufficient. It is often critical to be able to correctly classify images despite such adversarial modifications. In this section we introduce PixelDefend, a specific instance of a new family of defense methods that significantly improves the state-of-the-art performance on advanced attacks, while simultaneously performing well against all other attacks.
|
| 146 |
+
|
| 147 |
+
# Algorithm 1 PixelDefend
|
| 148 |
+
|
| 149 |
+
Input: Image X, Defense parameter $\epsilon _ { \mathrm { d e f e n d } }$ , Pre-trained PixelCNN model $p _ { \mathrm { C N N } }$
|
| 150 |
+
Output: Purified Image $\mathbf { X } ^ { * }$
|
| 151 |
+
1: $\bar { \mathbf { X } } ^ { * } \mathbf { X }$
|
| 152 |
+
2: for each row $i$ do
|
| 153 |
+
3: for each column $j$ do
|
| 154 |
+
4: for each channel $k$ do
|
| 155 |
+
5: $x \gets \mathbf { X } [ i , j , k ]$
|
| 156 |
+
6: Set feasible range $R \gets [ \mathrm { m a x } ( x - \epsilon _ { \mathrm { d e f e n d } } , 0 ) , \mathrm { m i n } ( x + \epsilon _ { \mathrm { d e f e n d } } , 2 5 5 ) ]$
|
| 157 |
+
7: Compute the 256-way softmax $p _ { \mathrm { C N N } } ( \mathbf { X } ^ { * } )$ .
|
| 158 |
+
8: Update $\mathbf { X } ^ { * } [ i , j , k ] \gets \mathrm { a r g } \operatorname* { m a x } _ { z \in R } p _ { \mathrm { C N N } } [ i , j , k , z ]$
|
| 159 |
+
9: end for
|
| 160 |
+
10: end for
|
| 161 |
+
11: end for
|
| 162 |
+
|
| 163 |
+

|
| 164 |
+
Figure 5: The bits-per-dimension distributions of purified images from FGSM adversarial examples. We tested two purification methods, L-BFGS-B and greedy decoding, the latter of which is used in PixelDefend. A good purification method should give images that have lower bits per dimension compared to FGSM images and ideally similar bits per dimension compared to clean ones.
|
| 165 |
+
|
| 166 |
+
# 4.1 RETURNING IMAGES TO THE TRAINING DISTRIBUTION
|
| 167 |
+
|
| 168 |
+
The basic idea behind PixelDefend is to purify input images, by making small changes to them in order to move them back towards the training distribution, i.e., move the images towards a highprobability region. We then classify the purified image using any existing classifier. As the example in Figure 4 shows, the purified images can usually be classified correctly.
|
| 169 |
+
|
| 170 |
+
Formally, we have training image distribution $p ( \mathbf { X } )$ , and input image $\mathbf { X }$ of resolution $I \times J$ with $\mathbf { X } [ i , j , k ]$ the pixel at location $( i , j )$ and channel $k \in \{ 1 , \cdots , C \}$ . We wish to find an image $\mathbf { X } ^ { * }$ that maximizes $p ( \mathbf { X } )$ subject to the constraint that $\mathbf { X } ^ { * }$ is within the $\epsilon _ { \mathrm { d e f e n d } }$ -ball of $\mathbf { X }$ :
|
| 171 |
+
|
| 172 |
+
$$
|
| 173 |
+
\begin{array} { c } { \displaystyle { \operatorname* { m a x } _ { \mathbf { X } ^ { * } } p ( \mathbf { X } ^ { * } ) } } \\ { \mathrm { s . t . } \quad \left\| \mathbf { X } ^ { * } - \mathbf { X } \right\| _ { \infty } \leq \epsilon _ { \mathrm { d e f e n d } } . } \end{array}
|
| 174 |
+
$$
|
| 175 |
+
|
| 176 |
+
Here $\epsilon _ { \mathrm { d e f e n d } }$ reflects a trade-off, since large $\epsilon _ { \mathrm { d e f e n d } }$ may change the meaning of $\mathbf { X }$ while small ϵdefend may not be sufficient for returning $\mathbf { X }$ to the correct distribution. In practice, we choose ϵdefend to be some value that overestimates $\epsilon _ { \mathrm { a t t a c k } }$ but still keeps high accuracies on clean images. As in Section 3, we approximate $p ( \mathbf { X } )$ with the PixelCNN distribution $p _ { \mathrm { C N N } } ( \mathbf { X } )$ , which is trained on the same training set as the classifier.
|
| 177 |
+
|
| 178 |
+
However, exact constrained optimization of $p _ { \mathrm { C N N } } ( \mathbf { X } )$ is computationally intractable. Surprisingly, even gradient-based optimization faces great difficulty on that problem. We found that one advanced methods in gradient-based constrained optimization, L-BFGS-B (Byrd et al., 1995) (we use the scipy implementation based on Zhu et al. (1997)), actually decreases $p _ { \mathrm { C N N } } ( \mathbf { X } )$ for most random initializations within the $\epsilon _ { \mathrm { d e f e n d } }$ -ball.
|
| 179 |
+
|
| 180 |
+
For efficient optimization, we instead use a greedy technique described in Algorithm 1, which is similar to the greedy decoding process typically used in sequence-to-sequence models (Sutskever et al., 2014). The method is similar to generating images from PixelCNN, with the additional constraint that the generated image should be within an $\epsilon _ { \mathrm { d e f e n d } }$ -ball of a perturbed image. As an autoregressive model, PixelCNN is slow in image generation. Nonetheless, by caching redundant calculation, Ramachandran et al. (2017) proposes a very fast generation algorithm for PixelCNN. In our experiments, adoption of Ramachandran et al. (2017)’s method greatly increases the speed of PixelDefend. For CIFAR-10 images, PixelDefend on average processes 3.6 images per second on one NVIDIA TITAN Xp GPU.
|
| 181 |
+
|
| 182 |
+

|
| 183 |
+
Figure 6: ROC curves showing the efficacy of using $p$ -values as scores to detect adversarial examples. For computing the ROC, we assign negative labels to training images and positive labels to adversarial images (or clean test images). (a) Original adversarial examples. (b) Purified adversarial examples after PixelDefend.
|
| 184 |
+
|
| 185 |
+
To show the effectiveness of this greedy method compared to L-BFGS-B, we take the first 10 images from CIFAR-10 test set, attack them by FGSM with $\epsilon _ { \mathrm { a t t a c k } } = 8$ , and purify them with L-BFGS-B and PixelDefend respectively. We used random start points for L-BFGS-B and repeated 100 times for each image. As depicted in Figure 5, most L-BFGS-B attempts failed at minimizing the bits per dimension of FGSM adversarial examples. Because of the rugged gradient landscape of PixelCNN, L-BFGS-B even results in images that have lower probabilities. In contrast, PixelDefend works much better in increasing the probabilities of purified images, although their probabilities are still lower compared to clean ones.
|
| 186 |
+
|
| 187 |
+
In Figure 6 and Figure 7, we empirically show that after PixelDefend, purified images are more likely to be drawn from the training distribution. Specifically, Figure 6 shows that the detecting power of $p$ -values greatly decreases for purified images. For DeepFool and CW examples, purification makes them barely distinguishable from normal samples of the data distribution. This is also manifested by Figure 7, as the $p$ -value distributions of purified examples are closer to uniform. Visually, purified images indeed look much cleaner than adversarially perturbed ones. In Appendix E, we provide sampled purified images from Fashion MNIST and CIFAR-10.
|
| 188 |
+
|
| 189 |
+
# 4.2 ADAPTIVE PIXELDEFEND
|
| 190 |
+
|
| 191 |
+
One concern with the approach of purifying images is what happens when we purify a clean image. More generally, we will never know $\epsilon _ { \mathrm { a t t a c k } }$ and if we set $\epsilon _ { \mathrm { d e f e n d } }$ too large for a given attack, then we will modify all images to become the mode image, which would mostly result in misclassifications. One way to avoid this problem is to tune $\epsilon _ { \mathrm { d e f e n d } }$ adaptively based on the probability of the input image under the generative model. In this way, images that already have high probability under the training distribution would have a very low $\epsilon _ { \mathrm { d e f e n d } }$ preventing significant modification, while low probability images would have a high $\epsilon _ { \mathrm { d e f e n d } }$ thus allowing significant modifications. We implemented a very simple thresholding version of this, which sets $\epsilon _ { \mathrm { d e f e n d } }$ to zero if the input image probability is below a threshold value, and otherwise leaves it fixed at a manually chosen setting. In practice, we set this threshold based on knowledge of the set of possible attacks, so strictly speaking, the adaptive version of our technique is no longer attack-agnostic.
|
| 192 |
+
|
| 193 |
+

|
| 194 |
+
Figure 7: The distributions of $p$ -values under the PixelCNN model after PixelDefend purification.
|
| 195 |
+
|
| 196 |
+
Table 1: Fashion MNIST $( \epsilon _ { \mathrm { a t t a c k } } = 8 / 2 5 $ , $\epsilon _ { \mathrm { d e f e n d } } = 3 2$ )
|
| 197 |
+
|
| 198 |
+
<table><tr><td>NETWORK</td><td>TRAINING TECHNIQUE</td><td>CLEAN</td><td>RAND</td><td>FGSM</td><td>BIM</td><td>DEEP FOOL</td><td>Cw</td><td>STRONGEST ATTACK</td></tr><tr><td>ResNet</td><td>Normal</td><td>93/93</td><td>89/71</td><td>38/24</td><td>00/00</td><td>06/06</td><td>20/01</td><td>00/00</td></tr><tr><td>VGG</td><td>Normal</td><td>92/92</td><td>91/87</td><td>73/58</td><td>36/08</td><td>49/14</td><td>43/23</td><td>36/08</td></tr><tr><td rowspan="5">ResNet</td><td>Adversarial FGSM</td><td>93/93</td><td>92/89</td><td>85/85</td><td>51/00</td><td>63/07</td><td>67/21</td><td>51/00</td></tr><tr><td>Adversarial BIM</td><td>92/91</td><td>92/91</td><td>84/79</td><td>76/63</td><td>82/72</td><td>81/70</td><td>76/63</td></tr><tr><td>Label Smoothing</td><td>93/93</td><td>91/76</td><td>73/45</td><td>16/00</td><td>29/06</td><td>33/14</td><td>16/00</td></tr><tr><td>Feature Squeezing</td><td>84/84</td><td>84/70</td><td>70/28</td><td>56/25</td><td>83/83</td><td>83/83</td><td>56/25</td></tr><tr><td>Adversarial FGSM + Feature Squeezing</td><td>88/88</td><td>87/82</td><td>80/77</td><td>70/46</td><td>86/82</td><td>84/85</td><td>70/46</td></tr><tr><td>ResNet</td><td>Normal +PixelDefend</td><td>88/88</td><td>88/89</td><td>85/74</td><td>83/76</td><td>87/87</td><td>87/87</td><td>83/74</td></tr><tr><td>VGG</td><td>Normal+PixelDefend</td><td>89/89</td><td>89/89</td><td>87/82</td><td>85/83</td><td>88/88</td><td>88/88</td><td>85/82</td></tr><tr><td rowspan="2">ResNet</td><td>Adversarial FGSM +PixelDefend</td><td>90/89</td><td>91/90</td><td>88/82</td><td>85/76</td><td>90/88</td><td>89/88</td><td>85/76</td></tr><tr><td>Adversarial FGSM +Adaptive PixelDefend</td><td>91/91</td><td>91/91</td><td>88/88</td><td>85/84</td><td>89/90</td><td>89/84</td><td>85/84</td></tr></table>
|
| 199 |
+
|
| 200 |
+
# 4.3 PIXELDEFEND RESULTS
|
| 201 |
+
|
| 202 |
+
We carried out a comprehensive set of experiments to test various defenses versus attacks. Detailed information on experimental settings is provided in Appendix B. All experimental results are summarized in Tab. 1 and Tab. 2. In the upper part of the tables, we show how the various baseline defenses fare against each of the attacks, while in the lower part of the tables we show how our PixelDefend technique works. Each table cell contains accuracies on adversarial examples generated with different $\epsilon _ { \mathrm { a t t a c k } }$ . More specifically, for Fashion MNIST (Tab. 1), we tried $\epsilon _ { \mathrm { a t t a c k } } = 8$ and 25. The cells in Tab. 1 is formated as $x / y$ , where $x$ denotes the accuracy $( \% )$ on images attacked with $\epsilon _ { \mathrm { a t t a c k } } = 8$ , while $y$ denotes the accuracy when $\epsilon _ { \mathrm { a t t a c k } } = 2 5 $ . For CIFAR-10 (Tab. 2), we tried $\epsilon _ { \mathrm { a t t a c k } } = 2$ , 8, and 16, and the cells are formated in a similar way. We use the same $\epsilon _ { \mathrm { d e f e n d } }$ for different ϵattack’s to show that PixelDefend is insensitive to ϵattack.
|
| 203 |
+
|
| 204 |
+
From the tables we observe that adversarial training successfully defends against the basic FGSM attack, but cannot defend against the more advanced ones. This is expected, as training on simple adversarial examples does not guarantee robustness to more complicated attacking techniques. Consistent with Madry et al. (2017), adversarial training with BIM examples is more successful at preventing a wider spectrum of attacks. For example, it improves the accuracy on strongest attack from $2 \%$ to $32 \%$ on CIFAR-10 when $\epsilon _ { \mathrm { a t t a c k } } = 8$ . But the numbers are still not ideal even with respect to BIM attack itself. As in Tab. 2, it only gets $6 \%$ on BIM and $8 \%$ on CW when $\epsilon _ { \mathrm { a t t a c k } } = 1 6$ . We also observe that label smoothing, which learns smoothed predictions so that the gradient $\nabla _ { \mathbf { X } } L ( \mathbf { X } , y )$ becomes very small, is only effective against simple FGSM attack. Model-agnostic methods, such as feature squeezing, can be combined with other defenses for strengthened performance. We observe that combining it with adversarial training indeed makes it more robust. Actually, Tab. 1 and Tab. 2 show that feature squeezing combined with adversarial training dominates using feature squeezing along in all settings. It also gets good performance on DeepFool and CW attacks. However, for iterative attacks with larger perturbations, i.e., BIM, feature squeezing performs poorly. On CIFAR-10, it only gets $2 \%$ and $0 \%$ accuracy on BIM with $\epsilon _ { \mathrm { a t t a c k } } = 8$ and 16 respectively.
|
| 205 |
+
|
| 206 |
+
Table 2: CIFAR-10 $\mathcal { C } _ { \mathrm { a t t a c k } } = 2 / 8 / 1 6$ , $\epsilon _ { \mathrm { d e f e n d } } = 1 6$ )
|
| 207 |
+
|
| 208 |
+
<table><tr><td>NETWORK</td><td>TRAINING TECHNIQUE</td><td>CLEAN</td><td>RAND</td><td>FGSM</td><td>BIM</td><td>DEEP FOOL</td><td>CW</td><td>STRONGEST ATTACK</td></tr><tr><td>ResNet</td><td>Normal</td><td>92/92/92</td><td>92/87/76</td><td>33/15/11</td><td>10/00/00</td><td>12/06/06</td><td>07/00/00</td><td>07/00/00</td></tr><tr><td>VGG</td><td>Normal</td><td>89/89/89</td><td>89/88/80</td><td>60/46/30</td><td>44/02/00</td><td>57/25/11</td><td>37/00/00</td><td>37/00/00</td></tr><tr><td rowspan="5">ResNet</td><td>Adversarial FGSM</td><td>91/91/91</td><td>90/88/84</td><td>88/91/91</td><td>24/07/00</td><td>45/00/00</td><td>20/00/07</td><td>20/00/00</td></tr><tr><td>Adversarial BIM</td><td>87/87/87</td><td>87/87/86</td><td>80/52/34</td><td>74/32/06</td><td>79/48/25</td><td>76/42/08</td><td>74/32/06</td></tr><tr><td>Label Smoothing</td><td>92/92/92</td><td>91/88/77</td><td>73/54/28</td><td>59/08/01</td><td>56/20/10</td><td>30/02/02</td><td>30/02/01</td></tr><tr><td>Feature Squeezing</td><td>84/84/84</td><td>83/82/76</td><td>31/20/18</td><td>13/00/00</td><td>75/75/75</td><td>78/78/78</td><td>13/00/00</td></tr><tr><td>Adversarial FGSM + Feature Squeezing</td><td>86/86/86</td><td>85/84/81</td><td>73/67/55</td><td>55/02/00</td><td>85/85/85</td><td>83/83/83</td><td>55/02/00</td></tr><tr><td>ResNet</td><td>Normal+PixelDefend</td><td>85/85/88</td><td>82/83/84</td><td>73/46/24</td><td>71/46/25</td><td>80/80/80</td><td>78/78/78</td><td>71/46/24</td></tr><tr><td>VGG</td><td>Normal+PixelDefend</td><td>82/82/82</td><td>82/82/84</td><td>80/62/52</td><td>80/61/48</td><td>81/76/76</td><td>81/79/79</td><td>80/61/48</td></tr><tr><td rowspan="2">ResNet</td><td>Adversarial FGSM +PixelDefend</td><td>88/88/86</td><td>86/86/87</td><td>81/68/67</td><td>81/69/56</td><td>85/85/85</td><td>84/84/84</td><td>81/69/56</td></tr><tr><td>Adversarial FGSM +Adaptive PixelDefend</td><td>90/90/90</td><td>86/87/87</td><td>81/70/67</td><td>81/70/56</td><td>82/81/82</td><td>81/80/81</td><td>81/70/56</td></tr></table>
|
| 209 |
+
|
| 210 |
+
PixelDefend, our model-agnostic and attack-agnostic method, performs well on different classifiers (ResNet and VGG) and different attacks without modification. In addition, we can see that augmenting basic adversarial training with PixelDefend can sometimes double the accuracies. We hypothesize that the purified images from PixelDefend are still not perfect, and adversarially trained networks have more toleration for perturbations. This also corroborates the plausibility and benefit of combining PixelDefend with other defenses.
|
| 211 |
+
|
| 212 |
+
Furthermore, PixelDefend can simultaneously obtain accuracy above $70 \%$ for all other attacking techniques, while ensuring that performance on clean images only declines slightly. Models with PixelDefend consistently outperform other methods with respect to the strongest attack. On Fashion MNIST, PixelDefend methods improve the accuracy on strongest attack from $76 \%$ to $8 5 \%$ and $63 \%$ to $84 \%$ . On CIFAR-10, the improvements are even more significant, i.e., from $74 \%$ to $81 \%$ , $32 \%$ to $70 \%$ and $6 \%$ to $56 \%$ , for $\epsilon _ { \mathrm { a t t a c k } } = 2$ , 8, and 16 respectively. In a security-critical scenario, the weakest part of a system determines the overall reliability. Therefore, the outstanding performance of PixelDefend on the strongest attack makes it a valuable and useful addition for improving AI security.
|
| 213 |
+
|
| 214 |
+
# 4.4 END-TO-END ATTACK OF PIXELDEFEND
|
| 215 |
+
|
| 216 |
+
A natural question that arises is whether we can generate a new class of adversarial examples targeted specifically at the combined PixelDefend architecture of first purifying the image and then using an existing classifier to predict the label of the purified image. We have three pieces of empirical evidence to believe that such adversarial examples are hard to find in general. First, we attempted to apply the iterative BIM attack to an end-to-end differentiable version of PixelDefend generated by unrolling the PixelCNN purification process. However we found the resulting network was too deep and led to problems with vanishing gradients (Bengio et al., 1994), resulting in adversarial images that were identical to the original images. Moreover, attacking the whole system is very time consuming. Empirically, it took about 10 hours to generate 100 attacking images with one TITAN $\mathrm { X p }$ GPU which failed to fool PixelDefend. Secondly, we found the optimization problem in Eq. (4.1) was not amenable to gradient descent, as indicated in Figure 5. This makes gradient-based attacks especially difficult. Last but not least, the generative model and classifier are trained separately and have independent parameters. Therefore, the perturbation direction that leads to higher probability images has a smaller correlation with the perturbation direction that results in misclassification. Accordingly, it is harder to find adversarial examples that can fool both of them together. However, we will open source our codes and look forward to any possible attack from the community.
|
| 217 |
+
|
| 218 |
+
# 5 RELATED WORK
|
| 219 |
+
|
| 220 |
+
Most recent work on detecting adversarial examples focuses on adding an outlier class detection module to the classifier, such as Grosse et al. (2017), Gong et al. (2017) and Metzen et al. (2017). Those methods require the classification model to be changed, and are thus not model-agnostic. Feinman et al. (2017) also presents a detection method based on kernel density estimation and Bayesian neural network uncertainty. However, Carlini & Wagner (2017a) shows that all those methods can be bypassed.
|
| 221 |
+
|
| 222 |
+
Grosse et al. (2017) also studied the distribution of adversarial examples from a statistical testing perspective. They reported the same discovery that adversarial examples are outside of the training distribution. However, our work is different from theirs in several important aspects. First, the kernel-based two-sample test used in their paper needs a large number of suspicious inputs, while our method only requires one data point. Second, they mainly tested on first-order methods such as FGSM and JSMA (Papernot et al., 2016b). We show the efficacy of PixelCNN on a wider range of attacking methods (see Figure 3), including both first-order and iterative methods. Third, we further demonstrate that random perturbed inputs are also outside of the training distribution.
|
| 223 |
+
|
| 224 |
+
Some other work has focused on modifying the classifier architecture to increase its robustness, e.g., Gu & Rigazio (2014), Cisse et al. (2017) and Nayebi & Ganguli (2017). Although they have witnessed some success, such modifications of models might limit their representative power and are also not model-agnostic.
|
| 225 |
+
|
| 226 |
+
Our basic idea of moving points to higher-density regions is also present in other machine learning methods not specifically designed for handling adversarial data; for example, the manifold denoising method of Hein & Maier (2007), the direct density gradient estimation of Sasaki et al. (2014), and the denoising autoencoders of Vincent et al. (2008) all move data points from low to high-density regions. In the future some of these methods could be adapted to amortize the purification process directly, that is, to learn a purification network.
|
| 227 |
+
|
| 228 |
+
# 6 CONCLUSION
|
| 229 |
+
|
| 230 |
+
In this work, we discovered that state-of-the-art neural density models, e.g., PixelCNN, can detect small perturbations with high sensitivity. This sensitivity broadly exists for a large number of perturbations generated with different methods. An interesting fact is that PixelCNN is only sensitive in one direction—it is relatively easy to detect perturbations that lead to lower probabilities rather than higher probabilities.
|
| 231 |
+
|
| 232 |
+
Based on the sensitivity of PixelCNN, we utilized statistical hypothesis testing to verify that adversarial examples lie outside of the training distribution. With the permutation test, we give exact $p$ -values which can be used as a uncertainty measure for detecting outlier perturbations.
|
| 233 |
+
|
| 234 |
+
Furthermore, we make use of the sensitivity of generative models to explore the idea of purifying adversarial examples. We propose the PixelDefend algorithm, and experimentally show that returning adversarial examples to high probability regions of the training distribution can significantly decrease their damage to classifiers. Different from many other defensive techniques, PixelDefend is model-agnostic and attack-agnostic, which means it can be combined with other defenses to improve robustness without modifying the classification model. As a result PixelDefend is a practical and effective defense against adversarial inputs.
|
| 235 |
+
|
| 236 |
+
# REFERENCES
|
| 237 |
+
|
| 238 |
+
Dario Amodei, Chris Olah, Jacob Steinhardt, Paul Christiano, John Schulman, and Dan Mané. Concrete problems in ai safety. arXiv preprint arXiv:1606.06565, 2016.
|
| 239 |
+
|
| 240 |
+
Yoshua Bengio, Patrice Simard, and Paolo Frasconi. Learning long-term dependencies with gradient descent is difficult. IEEE transactions on neural networks, 5(2):157–166, 1994.
|
| 241 |
+
|
| 242 |
+
Richard H Byrd, Peihuang Lu, Jorge Nocedal, and Ciyou Zhu. A limited memory algorithm for bound constrained optimization. SIAM Journal on Scientific Computing, 16(5):1190–1208, 1995.
|
| 243 |
+
|
| 244 |
+
Nicholas Carlini and David Wagner. Adversarial examples are not easily detected: Bypassing ten detection methods. arXiv preprint arXiv:1705.07263, 2017a.
|
| 245 |
+
|
| 246 |
+
Nicholas Carlini and David Wagner. Towards evaluating the robustness of neural networks. In Security and Privacy (SP), 2017 IEEE Symposium on, pp. 39–57. IEEE, 2017b.
|
| 247 |
+
|
| 248 |
+
Moustapha Cisse, Piotr Bojanowski, Edouard Grave, Yann Dauphin, and Nicolas Usunier. Parseval networks: Improving robustness to adversarial examples. In International Conference on Machine Learning, pp. 854–863, 2017.
|
| 249 |
+
|
| 250 |
+
Bradley Efron and Robert J Tibshirani. An introduction to the bootstrap. CRC press, 1994.
|
| 251 |
+
|
| 252 |
+
Reuben Feinman, Ryan R Curtin, Saurabh Shintre, and Andrew B Gardner. Detecting adversarial samples from artifacts. arXiv preprint arXiv:1703.00410, 2017.
|
| 253 |
+
|
| 254 |
+
Zhitao Gong, Wenlu Wang, and Wei-Shinn Ku. Adversarial and clean data are not twins. arXiv preprint arXiv:1704.04960, 2017.
|
| 255 |
+
|
| 256 |
+
Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. arXiv preprint arXiv:1412.6572, 2014.
|
| 257 |
+
|
| 258 |
+
Kathrin Grosse, Praveen Manoharan, Nicolas Papernot, Michael Backes, and Patrick McDaniel. On the (statistical) detection of adversarial examples. arXiv preprint arXiv:1702.06280, 2017.
|
| 259 |
+
|
| 260 |
+
Shixiang Gu and Luca Rigazio. Towards deep neural network architectures robust to adversarial examples. arXiv preprint arXiv:1412.5068, 2014.
|
| 261 |
+
|
| 262 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In Proceedings of the IEEE international conference on computer vision, pp. 1026–1034, 2015.
|
| 263 |
+
|
| 264 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016.
|
| 265 |
+
|
| 266 |
+
Matthias Hein and Markus Maier. Manifold denoising. In Advances in neural information processing systems, pp. 561–568, 2007.
|
| 267 |
+
|
| 268 |
+
Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. 2009.
|
| 269 |
+
|
| 270 |
+
Alex Krizhevsky, Vinod Nair, and Geoffrey Hinton. Cifar-10 (canadian institute for advanced research). URL http://www.cs.toronto.edu/\~kriz/cifar.html.
|
| 271 |
+
|
| 272 |
+
Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial machine learning at scale. arXiv preprint arXiv:1611.01236, 2016.
|
| 273 |
+
|
| 274 |
+
Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
|
| 275 |
+
|
| 276 |
+
Yingzhen Li and Yarin Gal. Dropout inference in bayesian neural networks with alpha-divergences. arXiv preprint arXiv:1703.02914, 2017.
|
| 277 |
+
|
| 278 |
+
Yanpei Liu, Xinyun Chen, Chang Liu, and Dawn Song. Delving into transferable adversarial examples and black-box attacks. arXiv preprint arXiv:1611.02770, 2016.
|
| 279 |
+
|
| 280 |
+
Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. arXiv preprint arXiv:1706.06083, 2017.
|
| 281 |
+
|
| 282 |
+
Jan Hendrik Metzen, Tim Genewein, Volker Fischer, and Bastian Bischoff. On detecting adversarial perturbations. arXiv preprint arXiv:1702.04267, 2017.
|
| 283 |
+
|
| 284 |
+
Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, and Pascal Frossard. Deepfool: a simple and accurate method to fool deep neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2574–2582, 2016.
|
| 285 |
+
|
| 286 |
+
Aran Nayebi and Surya Ganguli. Biologically inspired protection of deep networks from adversarial attacks. arXiv preprint arXiv:1703.09202, 2017.
|
| 287 |
+
|
| 288 |
+
Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. In NIPS workshop on deep learning and unsupervised feature learning, volume 2011, pp. 5, 2011.
|
| 289 |
+
|
| 290 |
+
Nicolas Papernot, Patrick McDaniel, and Ian Goodfellow. Transferability in machine learning: from phenomena to black-box attacks using adversarial samples. arXiv preprint arXiv:1605.07277, 2016a.
|
| 291 |
+
|
| 292 |
+
Nicolas Papernot, Patrick McDaniel, Somesh Jha, Matt Fredrikson, Z Berkay Celik, and Ananthram Swami. The limitations of deep learning in adversarial settings. In Security and Privacy (EuroS&P), 2016 IEEE European Symposium on, pp. 372–387. IEEE, 2016b.
|
| 293 |
+
|
| 294 |
+
Nicolas Papernot, Patrick McDaniel, Xi Wu, Somesh Jha, and Ananthram Swami. Distillation as a defense to adversarial perturbations against deep neural networks. In Security and Privacy (SP), 2016 IEEE Symposium on, pp. 582–597. IEEE, 2016c.
|
| 295 |
+
|
| 296 |
+
Prajit Ramachandran, Tom Le Paine, Pooya Khorrami, Mohammad Babaeizadeh, Shiyu Chang, Yang Zhang, Mark A Hasegawa-Johnson, Roy H Campbell, and Thomas S Huang. Fast generation for convolutional autoregressive models. arXiv preprint arXiv:1704.06001, 2017.
|
| 297 |
+
|
| 298 |
+
Tim Salimans, Andrej Karpathy, Xi Chen, and Diederik P Kingma. Pixelcnn $^ { + + }$ : Improving the pixelcnn with discretized logistic mixture likelihood and other modifications. arXiv preprint arXiv:1701.05517, 2017.
|
| 299 |
+
|
| 300 |
+
Hiroaki Sasaki, Aapo Hyvärinen, and Masashi Sugiyama. Clustering via mode seeking by direct estimation of the gradient of a log-density. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pp. 19–34. Springer, 2014.
|
| 301 |
+
|
| 302 |
+
Hidetoshi Shimodaira. Improving predictive inference under covariate shift by weighting the loglikelihood function. Journal of statistical planning and inference, 90(2):227–244, 2000.
|
| 303 |
+
|
| 304 |
+
K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014.
|
| 305 |
+
|
| 306 |
+
Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In Advances in neural information processing systems, pp. 3104–3112, 2014.
|
| 307 |
+
|
| 308 |
+
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.
|
| 309 |
+
|
| 310 |
+
Florian Tramèr, Nicolas Papernot, Ian Goodfellow, Dan Boneh, and Patrick McDaniel. The space of transferable adversarial examples. arXiv preprint arXiv:1704.03453, 2017.
|
| 311 |
+
|
| 312 |
+
Aaron van den Oord, Nal Kalchbrenner, Lasse Espeholt, Oriol Vinyals, Alex Graves, et al. Conditional image generation with pixelcnn decoders. In Advances in Neural Information Processing Systems, pp. 4790–4798, 2016a.
|
| 313 |
+
|
| 314 |
+
Aaron van den Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. arXiv preprint arXiv:1601.06759, 2016b.
|
| 315 |
+
|
| 316 |
+
Pascal Vincent, Hugo Larochelle, Yoshua Bengio, and Pierre-Antoine Manzagol. Extracting and composing robust features with denoising autoencoders. In Proceedings of the 25th international conference on Machine learning, pp. 1096–1103. ACM, 2008.
|
| 317 |
+
|
| 318 |
+
David Warde-Farley and Ian Goodfellow. 11 adversarial perturbations of deep neural networks. Perturbations, Optimization, and Statistics, pp. 311, 2016.
|
| 319 |
+
Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms, 2017.
|
| 320 |
+
Weilin Xu, David Evans, and Yanjun Qi. Feature squeezing: Detecting adversarial examples in deep neural networks. arXiv preprint arXiv:1704.01155, 2017a.
|
| 321 |
+
Weilin Xu, David Evans, and Yanjun Qi. Feature squeezing mitigates and detects carlini/wagner adversarial examples. arXiv preprint arXiv:1705.10686, 2017b.
|
| 322 |
+
Ciyou Zhu, Richard H Byrd, Peihuang Lu, and Jorge Nocedal. Algorithm 778: L-bfgs-b: Fortran subroutines for large-scale bound-constrained optimization. ACM Transactions on Mathematical Software (TOMS), 23(4):550–560, 1997.
|
| 323 |
+
|
| 324 |
+
# APPENDIX A ON RANDOM PERTURBATIONS
|
| 325 |
+
|
| 326 |
+
One may observe from Figure 3(b) that random perturbations have very low $p$ -values, and thus also live outside of the high density area. Although many classifiers are robust to random noise, it is not a property granted by the dataset. The fact is that robustness to random noise could be from model inductive bias, and there exist classifiers which have high generalization performance on clean images, but can be attacked by small random perturbations.
|
| 327 |
+
|
| 328 |
+
It is easy to construct a concrete classifier that are susceptible to random perturbations. Our ResNet on CIFAR-10 gets $9 2 . 0 \%$ accuracy on the test set and $8 7 . 3 \%$ on randomly perturbed test images with $\epsilon _ { \mathrm { a t t a c k } } = 8$ . According to our PixelCNN, 175 of 10000 test images have a bits per dimension (BPD) larger than 4.5, while the number for random images is 9874. Therefore, we can define a new classifier
|
| 329 |
+
|
| 330 |
+
$$
|
| 331 |
+
\mathrm { R e s N e t ^ { \prime } ( X ) } \triangleq \left\{ \begin{array} { l l } { \mathrm { R e s N e t ( X ) } , } & { \mathrm { B P D } ( \mathbf { X } ) < 4 . 5 } \\ { \mathrm { r a n d o m \ l a b e l } , } & { \mathrm { B P D } ( \mathbf { X } ) \geq 4 . 5 } \end{array} \right. ,
|
| 332 |
+
$$
|
| 333 |
+
|
| 334 |
+
which will get roughly $9 2 \% \times 9 8 2 5 / 1 0 0 0 0 + 1 0 \% \times 1 7 5 / 1 0 0 0 0 \approx 9 0 . 6 \%$ accuracy on the test set, while only $8 7 . 3 \% \times 1 2 6 / 1 0 0 0 0 + 1 0 \% \times 9 8 7 4 / 1 0 0 0 0 \approx 1 1 . 0 \%$ accuracy on the randomly perturbed images. This classifier has comparable generalization performance to the original ResNet, but will give incorrect labels to most randomly perturbed images.
|
| 335 |
+
|
| 336 |
+
# APPENDIX B EXPERIMENTAL SETTINGS
|
| 337 |
+
|
| 338 |
+
Adversarial Training We have tested adversarial training with both FGSM and BIM examples. During training, we take special care of the label leaking problem as noted in Kurakin et al. (2016)— we use the predicted labels of the model to generate adversarial examples, instead of using the true labels. This prevents the adversarially trained network to perform better on adversarial examples than clean images by simply retrieving ground-truth labels. Following Kurakin et al. (2016), we also sample $\epsilon _ { \mathrm { a t t a c k } }$ from a truncated Gaussian distribution for generating FGSM or BIM adversarial examples, so that the adversarially trained network won’t overfit to any specific $\epsilon _ { \mathrm { a t t a c k } }$ . This is different from Madry et al. (2017), where the authors train and test with the same ϵattack.
|
| 339 |
+
|
| 340 |
+
For Fashion MNIST experiments, we randomly sample $\epsilon _ { \mathrm { a t t a c k } }$ from $\mathcal { N } ( 0 , \delta )$ , take the absolute value and truncate it to $[ 0 , 2 \delta ]$ , where $\delta \ : = \ : 8$ or 25. For CIFAR-10 experiments, we follow the same procedure but fix $\delta = 8$ .
|
| 341 |
+
|
| 342 |
+
Feature Squeezing For implementing the feature squeezing defense, we reduce the number of colors to 8 on Fashion MNIST, and use 32 colors for CIFAR-10. The numbers are chosen to make sure color reduction will not lead to significant deterioration of image quality. After color depth reduction, we apply a $2 \times 2$ median filter with reflective paddings, since it is reported in $\mathrm { X u }$ et al. (2017b) to be most effective for preventing CW attacks.
|
| 343 |
+
|
| 344 |
+
Models We use ResNet (62-layer) and VGG (16-layer) as classifiers. In our experiments, normally trained networks have the same architectures as adversarially trained networks. Since the images of Fashion MNIST contain roughly one quarter values of those of CIFAR-10, we use a smaller network for classifying Fashion MNIST. More specifically, we reduce the number of feature maps for Fashion MNIST to 1/4 while keeping the same depths. In practive, VGG is more robust than ResNet due to using of dropout layers. The network architecture details are described in Appendix C. For the PixelCNN generative model, we adopted the implementation of $\mathrm { P i x e l C N N + + }$ (Salimans et al., 2017), but modified the output from mixture of logistic distributions to softmax. The feature maps are also reduced to 1/4 for training PixelCNN on Fashion MNIST.
|
| 345 |
+
|
| 346 |
+
Adaptive Threshold We chose the adaptive threshold discussed in Section 4.2 using validation data. We set the threshold at the lowest value which did not decrease the performance of the strongest adversary. For Fashion MNIST, the threshold of bits per dimension was set to 1.8, and for CIFAR-10 the number was 3.2. As a reference, the mean value of bits per dimension for Fashion MNIST test images is 2.7 and for CIFAR-10 is 3.0. However, we admit that using a validation set to choose the best threshold makes the adaptive version of PixelDefend not strictly attack-agnostic.
|
| 347 |
+
|
| 348 |
+
# APPENDIX C IMAGE CLASSIFIER ARCHITECTURES∗
|
| 349 |
+
|
| 350 |
+
C.1 RESNET CLASSIFIER FOR CIFAR-10 & FASHION MNIST
|
| 351 |
+
|
| 352 |
+
<table><tr><td rowspan=1 colspan=1>NAME</td><td rowspan=1 colspan=2>CONFIGURATION</td></tr><tr><td rowspan=1 colspan=1>Initial Layer</td><td rowspan=1 colspan=2>conv (filter size: 3 × 3,feature maps: 16 (4), stride size: 1 × 1)</td></tr><tr><td rowspan=1 colspan=1>Residual Block 1</td><td rowspan=1 colspan=1>batch normalization & leaky reluconv (filter size: 3 × 3, feature maps: 16 (4), stride size: 1 × 1)batch normalization &leaky reluconv (filter size: 3 × 3, feature maps: 16 (4), stride size: 1 × 1)residual addition</td><td rowspan=1 colspan=1>×10 times</td></tr><tr><td rowspan=2 colspan=1>Residual Block 2</td><td rowspan=1 colspan=2>batch normalization& leaky reluconv (filter size: 3 × 3, feature maps: 32 (8), stride size: 2 × 2)batch normalization&leakyreluconv (filter size: 3 × 3, feature maps: 32 (8), stride size: 1 × 1)average pooling & padding & residual addition</td></tr><tr><td rowspan=1 colspan=1>batch normalization & leaky reluconv (filter size: 3 × 3, feature maps: 32(8), stride size: 1 × 1)batch normalization&leaky reluconv (filter size: 3 × 3, feature maps: 32(8), stride size: 1 × 1)residual addition</td><td rowspan=1 colspan=1>×9 times</td></tr><tr><td rowspan=2 colspan=1>Residual Block 3</td><td rowspan=1 colspan=2>batch normalization& leaky reluconv (filter size: 3 × 3, feature maps: 64 (16),stride size: 2 × 2)batch normalization & leaky reluconv (filter size: 3 × 3,feature maps: 64(16), stride size:1 × 1)average pooling & padding & residual addition</td></tr><tr><td rowspan=1 colspan=1>batch normalization & leaky reluconv(filter size: 3 × 3,feature maps: 64(16), stride size:1 × 1)batch normalization & leaky reluconv(filter size: 3 × 3,feature maps: 64(16), stride size:1 × 1)residual addition</td><td rowspan=1 colspan=1>×9 times</td></tr><tr><td rowspan=1 colspan=1>Pooling Layer</td><td rowspan=1 colspan=2>batch normalization & leaky relu & average pooling</td></tr><tr><td rowspan=1 colspan=1>Output Layer</td><td rowspan=1 colspan=2>fc_10 & softmax</td></tr></table>
|
| 353 |
+
|
| 354 |
+
# C.2 VGG CLASSIFIER FOR CIFAR-10 & FASHION MNIST
|
| 355 |
+
|
| 356 |
+
<table><tr><td rowspan=1 colspan=1>NAME</td><td rowspan=1 colspan=2>CONFIGURATION</td></tr><tr><td rowspan=2 colspan=1>Feature Block 1</td><td rowspan=1 colspan=1>conv (filter size: 3 × 3, feature maps: 16 (4), stride size: 1 × 1)batch normalization & relu</td><td rowspan=1 colspan=1>×2 times</td></tr><tr><td rowspan=1 colspan=2>max pooling (stride size: 2 × 2)</td></tr><tr><td rowspan=2 colspan=1>Feature Block 2</td><td rowspan=1 colspan=1>conv (filter size: 3 × 3, feature maps: 128 (32), stride size: 1 × 1)batch normalization & relu</td><td rowspan=1 colspan=1>×2 times</td></tr><tr><td rowspan=1 colspan=1>max pooling (stride size:2 × 2)</td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=2 colspan=1>Feature Block 3</td><td rowspan=1 colspan=1>conv (filter size: 3 × 3, feature maps: 512 (128), stride size: 1 × 1)batch normalization & relu</td><td rowspan=1 colspan=1>×3 times</td></tr><tr><td rowspan=1 colspan=2>max pooling (stride size: 2 × 2)</td></tr><tr><td rowspan=2 colspan=1>Feature Block 4</td><td rowspan=1 colspan=1>conv (filter size: 3 × 3, feature maps: 512 (128), stride size: 1 × 1)batch normalization & relu</td><td rowspan=1 colspan=1>×3 times</td></tr><tr><td rowspan=1 colspan=2>max pooling (stride size:2× 2) & flatten</td></tr><tr><td rowspan=1 colspan=1>Classifier Block</td><td rowspan=1 colspan=2>dropout & fc_512(128)& reludropout&fc_1O& softmax</td></tr></table>
|
| 357 |
+
|
| 358 |
+
# APPENDIX D SAMPLED IMAGES FROM PIXELCNN
|
| 359 |
+
|
| 360 |
+
# D.1 FASHION MNIST
|
| 361 |
+
|
| 362 |
+

|
| 363 |
+
Figure 8: True and generated images from Fashion MNIST. The upper part shows true images sampled from the dataset while the bottom shows generated images from PixelCNN.
|
| 364 |
+
|
| 365 |
+
D.2 CIFAR-10
|
| 366 |
+
|
| 367 |
+

|
| 368 |
+
Figure 9: True and generated images from CIFAR-10. The upper part shows true images sampled from the dataset while the bottom part shows generated images from PixelCNN.
|
| 369 |
+
|
| 370 |
+
# APPENDIX E SAMPLED PURIFIED IMAGES FROM PIXELDEFEND
|
| 371 |
+
|
| 372 |
+
# E.1 FASHION MNIST
|
| 373 |
+
|
| 374 |
+

|
| 375 |
+
Figure 10: The upper part shows adversarial images generated from FGSM attack while the bottom part shows corresponding purified images after PixelDefend. Here $\epsilon _ { \mathrm { a t t a c k } } = 2 5 $ and $\epsilon _ { \mathrm { d e f e n d } } = 3 2 $ .
|
| 376 |
+
|
| 377 |
+
# E.2 CIFAR-10
|
| 378 |
+
|
| 379 |
+

|
| 380 |
+
Figure 11: The upper part shows adversarial images generated from FGSM attack while the bottom part shows corresponding purified images by PixelDefend. Here $\epsilon _ { \mathrm { a t t a c k } } = 8$ and $\epsilon _ { \mathrm { d e f e n d } } = 1 6$ .
|
md/train/rJgMlhRctm/rJgMlhRctm.md
ADDED
|
@@ -0,0 +1,572 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# THE NEURO-SYMBOLIC CONCEPT LEARNER: INTERPRETING SCENES, WORDS, AND SENTENCES FROM NATURAL SUPERVISION
|
| 2 |
+
|
| 3 |
+
Jiayuan Mao MIT CSAIL and IIIS, Tsinghua University mjy14@mails.tsinghua.edu.cn
|
| 4 |
+
|
| 5 |
+
Chuang Gan MIT-IBM Watson AI Lab ganchuang@csail.mit.edu
|
| 6 |
+
|
| 7 |
+
Pushmeet Kohli
|
| 8 |
+
Deepmind
|
| 9 |
+
pushmeet@google.com
|
| 10 |
+
|
| 11 |
+
Joshua B. TenenbaumMIT BCS, CBMM, CSAILjbt@mit.edu
|
| 12 |
+
|
| 13 |
+
Jiajun Wu
|
| 14 |
+
MIT CSAIL
|
| 15 |
+
jiajunwu@mit.edu
|
| 16 |
+
|
| 17 |
+
# ABSTRACT
|
| 18 |
+
|
| 19 |
+
We propose the Neuro-Symbolic Concept Learner (NS-CL), a model that learns visual concepts, words, and semantic parsing of sentences without explicit supervision on any of them; instead, our model learns by simply looking at images and reading paired questions and answers. Our model builds an object-based scene representation and translates sentences into executable, symbolic programs. To bridge the learning of two modules, we use a neuro-symbolic reasoning module that executes these programs on the latent scene representation. Analogical to human concept learning, the perception module learns visual concepts based on the language description of the object being referred to. Meanwhile, the learned visual concepts facilitate learning new words and parsing new sentences. We use curriculum learning to guide the searching over the large compositional space of images and language. Extensive experiments demonstrate the accuracy and efficiency of our model on learning visual concepts, word representations, and semantic parsing of sentences. Further, our method allows easy generalization to new object attributes, compositions, language concepts, scenes and questions, and even new program domains. It also empowers applications including visual question answering and bidirectional image-text retrieval.
|
| 20 |
+
|
| 21 |
+
# 1 INTRODUCTION
|
| 22 |
+
|
| 23 |
+
Humans are capable of learning visual concepts by jointly understanding vision and language (Fazly et al., 2010; Chrupała et al., 2015; Gauthier et al., 2018). Consider the example shown in Figure 1-I. Imagine that someone with no prior knowledge of colors is presented with the images of the red and green cubes, paired with the questions and answers. They can easily identify the difference in objects’ visual appearance (in this case, color), and align it to the corresponding words in the questions and answers (Red and Green). Other object attributes (e.g., shape) can be learned in a similar fashion. Starting from there, humans are able to inductively learn the correspondence between visual concepts and word semantics (e.g., spatial relations and referential expressions, Figure 1-II), and unravel compositional logic from complex questions assisted by the learned visual concepts (Figure 1-III, also see Abend et al. (2017)).
|
| 24 |
+
|
| 25 |
+
Motivated by this, we propose the neuro-symbolic concept learner (NS-CL), which jointly learns visual perception, words, and semantic language parsing from images and question-answer pairs. NS-CL has three modules: a neural-based perception module that extracts object-level representations from the scene, a visually-grounded semantic parser for translating questions into executable programs, and a symbolic program executor that reads out the perceptual representation of objects, classifies their attributes/relations, and executes the program to obtain an answer.
|
| 26 |
+
|
| 27 |
+
I. Learning basic, object-based concepts.
|
| 28 |
+
|
| 29 |
+
II. Learning relational concepts based on referential expressions.
|
| 30 |
+
|
| 31 |
+
Q: How many objects are right of the red object?
|
| 32 |
+
A: 2.
|
| 33 |
+
Q: How many objects have the same material as the cube? A: 2
|
| 34 |
+
|
| 35 |
+

|
| 36 |
+
|
| 37 |
+
III. Interpret complex questions from visual cues.
|
| 38 |
+
|
| 39 |
+

|
| 40 |
+
Figure 1: Humans learn visual concepts, words, and semantic parsing jointly and incrementally. I. Learning visual concepts (red vs. green) starts from looking at simple scenes, reading simple questions, and reasoning over contrastive examples (Fazly et al., 2010). II. Afterwards, we can interpret referential expressions based on the learned object-based concepts, and learn relational concepts (e.g., on the right of, the same material as). III Finally, we can interpret complex questions from visual cues by exploiting the compositional structure.
|
| 41 |
+
|
| 42 |
+

|
| 43 |
+
|
| 44 |
+
Q: How many objects are both right of the green cylinder and have the same material as the small blue ball? A: 3
|
| 45 |
+
|
| 46 |
+
NS-CL learns from natural supervision (i.e., images and QA pairs), requiring no annotations on images or semantic programs for sentences. Instead, analogical to human concept learning, it learns via curriculum learning. NS-CL starts by learning representations/concepts of individual objects from short questions (e.g., What’s the color of the cylinder?) on simple scenes $\leq 3$ objects). By doing so, it learns object-based concepts such as colors and shapes. NS-CL then learns relational concepts by leveraging these object-based concepts to interpret object referrals (e.g., Is there a box right of a cylinder?). The model iteratively adapts to more complex scenes and highly compositional questions.
|
| 47 |
+
|
| 48 |
+
NS-CL’s modularized design enables interpretable, robust, and accurate visual reasoning: it achieves state-of-the-art performance on the CLEVR dataset (Johnson et al., 2017a). More importantly, it naturally learns disentangled visual and language concepts, enabling combinatorial generalization w.r.t. both visual scenes and semantic programs. In particular, we demonstrate four forms of generalization. First, NS-CL generalizes to scenes with more objects and longer semantic programs than those in the training set. Second, it generalizes to new visual attribute compositions, as demonstrated on the CLEVR-CoGenT (Johnson et al., 2017a) dataset. Third, it enables fast adaptation to novel visual concepts, such as learning a new color. Finally, the learned visual concepts transfer to new tasks, such as image-caption retrieval, without any extra fine-tuning.
|
| 49 |
+
|
| 50 |
+
# 2 RELATED WORK
|
| 51 |
+
|
| 52 |
+
Our model is related to research on joint learning of vision and natural language. In particular, there are many papers that learn visual concepts from descriptive languages, such as image-captioning or visually-grounded question-answer pairs (Kiros et al., 2014; Shi et al., 2018; Mao et al., 2016; Vendrov et al., 2016; Ganju et al., 2017), dense language descriptions for scenes (Johnson et al., 2016), video-captioning (Donahue et al., 2015) and video-text alignment (Zhu et al., 2015).
|
| 53 |
+
|
| 54 |
+
Visual question answering (VQA) stands out as it requires understanding both visual content and language. The state-of-the-art approaches usually use neural attentions (Malinowski & Fritz, 2014; Chen et al., 2015; Yang et al., 2016; Xu & Saenko, 2016). Beyond question answering, Johnson et al. (2017a) proposed the CLEVR (VQA) dataset to diagnose reasoning models. CLEVR contains synthetic visual scenes and questions generated from latent programs. Table 1 compares our model with state-of-the-art visual reasoning models (Andreas et al., 2016; Suarez et al., 2018; Santoro et al., 2017) along four directions: visual features, semantics, inference, and the requirement of extra labels.
|
| 55 |
+
|
| 56 |
+
For visual representations, Johnson et al. (2017b) encoded visual scenes into a convolutional feature map for program operators. Mascharka et al. (2018); Hudson & Manning (2018) used attention as intermediate representations for transparent program execution. Recently, Yi et al. (2018) explored an interpretable, object-based visual representation for visual reasoning. It performs well, but requires fully-annotated scenes during training. Our model also adopts an object-based visual representation, but the representation is learned only based on natural supervision (questions and answers).
|
| 57 |
+
|
| 58 |
+
Anderson et al. (2018) also proposed to represent the image as a collection of convolutional object features and gained substantial improvements on VQA. Their model encodes questions with neural networks and answers the questions by question-conditioned attention over the object features. In contrast, NS-CL parses question inputs into programs and executes them on object features to get the answer. This makes the reasoning process interpretable and supports combinatorial generalization over quantities (e.g., counting objects). Our model also learns general visual concepts and their association with symbolic representations of language. These learned concepts can then be explicitly interpreted and deployed in other vision-language applications such as image caption retrieval.
|
| 59 |
+
|
| 60 |
+
Table 1: Comparison with other frameworks on the CLEVR VQA dataset, w.r.t. visual features, implicit or explicit semantics and supervisions.
|
| 61 |
+
|
| 62 |
+
<table><tr><td rowspan="2">Models</td><td rowspan="2">Visual Features</td><td rowspan="2">Semantics</td><td colspan="2">Extra Labels</td><td rowspan="2">Inference</td></tr><tr><td>#Prog.</td><td>Attr.</td></tr><tr><td rowspan="2">FiLM (Perez et al.,2018) IEP (Johnson et al., 2017b)</td><td>Convolutional</td><td>Implicit</td><td>0</td><td>No</td><td>Feature Manipulation</td></tr><tr><td>Convolutional</td><td>Explicit</td><td>700K</td><td>No</td><td>Feature Manipulation</td></tr><tr><td rowspan="3">MAC (Hudson & Manning,2018) Stack-NMN (Hu et al., 2018)</td><td>Attentional</td><td>Implicit</td><td>0</td><td>No</td><td>Feature Manipulation</td></tr><tr><td>Attentional</td><td>Implicit</td><td>0</td><td>No</td><td>Attention Manipulation</td></tr><tr><td>Attentional</td><td>Explicit</td><td>700K</td><td>No</td><td>Attention Manipulation</td></tr><tr><td rowspan="2">NS-VQA (Yi et al., 2018) NS-CL</td><td>Object-Based</td><td>Explicit</td><td>0.2K</td><td>Yes</td><td>Symbolic Execution</td></tr><tr><td>Object-Based</td><td>Explicit</td><td>0</td><td>No</td><td>Symbolic Execution</td></tr></table>
|
| 63 |
+
|
| 64 |
+

|
| 65 |
+
Figure 2: We propose to use neural symbolic reasoning as a bridge to jointly learn visual concepts, words, and semantic parsing of sentences.
|
| 66 |
+
|
| 67 |
+
There are two types of approaches in semantic sentence parsing for visual reasoning: implicit programs as conditioned neural operations (e.g., conditioned convolution and dual attention) (Perez et al., 2018; Hudson & Manning, 2018) and explicit programs as sequences of symbolic tokens (Andreas et al., 2016; Johnson et al., 2017b; Mascharka et al., 2018). As a representative, Andreas et al. (2016) build modular and structured neural architectures based on programs for answering questions. Explicit programs gain better interpretability, but usually require extra supervision such as groundtruth program annotations for training. This restricts their application. We propose to use visual grounding as distant supervision to parse questions in natural languages into explicit programs, with zero program annotations. Given the semantic parsing of questions into programs, Yi et al. (2018) proposed a purely symbolic executor for the inference of the answer in the logic space. Compared with theirs, we propose a quasi-symbolic executor for VQA.
|
| 68 |
+
|
| 69 |
+
Our work is also related to learning interpretable and disentangled representations for visual scenes using neural networks. Kulkarni et al. (2015) proposed convolutional inverse graphics networks for learning and inferring pose of faces, while Yang et al. (2015) learned disentangled representation of pose of chairs from images. Wu et al. (2017) proposed the neural scene de-rendering framework as an inverse process of any rendering process. Siddharth et al. (2017); Higgins et al. (2018) learned disentangled representations using deep generative models. In contrast, we propose an alternative representation learning approach through joint reasoning with language.
|
| 70 |
+
|
| 71 |
+
# 3 NEURO-SYMBOLIC CONCEPT LEARNER
|
| 72 |
+
|
| 73 |
+
We present our neuro-symbolic concept learner, which uses a symbolic reasoning process to bridge the learning of visual concepts, words, and semantic parsing of sentences without explicit annotations for any of them. We first use a visual perception module to construct an object-based representation for a scene, and run a semantic parsing module to translate a question into an executable program. We then apply a quasi-symbolic program executor to infer the answer based on the scene representation. We use paired images, questions, and answers to jointly train the visual and language modules.
|
| 74 |
+
|
| 75 |
+

|
| 76 |
+
Figure 3: We treat attributes such as Shape and Color as neural operators. The operators map object representations into a visual-semantic space. We use similarity-based metric to classify objects.
|
| 77 |
+
|
| 78 |
+
Shown in Figure 2, given an input image, the visual perception module detects objects in the scene and extracts a deep, latent representation for each of them. The semantic parsing module translates an input question in natural language into an executable program given a domain specific language (DSL). The generated programs have a hierarchical structure of symbolic, functional modules, each fulfilling a specific operation over the scene representation. The explicit program semantics enjoys compositionality, interpretability, and generalizability.
|
| 79 |
+
|
| 80 |
+
The program executor executes the program upon the derived scene representation and answers the question. Our program executor works in a symbolic and deterministic manner. This feature ensures a transparent execution trace of the program. Our program executor has a fully differentiable design w.r.t. the visual representations and the concept representations, which supports gradient-based optimization during training.
|
| 81 |
+
|
| 82 |
+
# 3.1 MODEL DETAILS
|
| 83 |
+
|
| 84 |
+
Visual perception. Shown in Figure 2, given the input image, we use a pretrained Mask R-CNN (He et al., 2017) to generate object proposals for all objects. The bounding box for each single object paired with the original image is then sent to a ResNet-34 (He et al., 2015) to extract the region-based (by RoI Align) and image-based features respectively. We concatenate them to represent each object. Here, the inclusion of the representation of the full scene adds the contextual information, which is essential for the inference of relative attributes such as size or spatial position.
|
| 85 |
+
|
| 86 |
+
Concept quantization. Visual reasoning requires determining an object’s attributes (e.g., its color or shape). We assume each visual attribute (e.g., shape) contains a set of visual concept (e.g., Cube). In NS-CL, visual attributes are implemented as neural operators , mapping the object representation into an attribute-specific embedding space. Figure 3 shows an inference an object’s shape. Visual concepts that belong to the shape attribute, including Cube, Sphere and Cylinder, are represented as vectors in the shape embedding space. These concept vectors are also learned along the process. We measure the cosine distances $\langle \cdot , \cdot \rangle$ between these vectors to determine the shape of the object. Specifically, we compute the probability that an object $o _ { i }$ is a cube by $\sigma \left( \langle { \mathrm { S h a p e O f } } ( o _ { i } ) , \check { v } ^ { \mathrm { C u b e } } \rangle \dot { - } \gamma \right) / \tau$ , where ShapeOf(·) denotes the neural operator, $v ^ { \scriptscriptstyle \mathrm { C u b e } }$ the concept embedding of Cube and $\sigma$ the Sigmoid function. $\gamma$ and $\tau$ are scalar constants for scaling and shifting the values of similarities. We classify relational concepts (e.g., Left) between a pair of objects similarly, except that we concatenate the visual representations for both objects to form the representation of their relation.
|
| 87 |
+
|
| 88 |
+
DSL and semantic parsing. The semantic parsing module translates a natural language question into an executable program with a hierarchy of primitive operations, represented in a domain-specific language (DSL) designed for VQA. The DSL covers a set of fundamental operations for visual reasoning, such as filtering out objects with certain concepts or query the attribute of an object. The operations share the same input and output interface, and thus can be compositionally combined to form programs of any complexity. We include a complete specification of the DSL used by our framework in the Appendix A.
|
| 89 |
+
|
| 90 |
+

|
| 91 |
+
Figure 4: A. Demonstration of the curriculum learning of visual concepts, words, and semantic parsing of sentences by watching images and reading paired questions and answers. Scenes and questions of different complexities are illustrated to the learner in an incremental manner. B. Illustration of our neuro-symbolic inference model for VQA. The perception module begins with parsing visual scenes into object-based deep representations, while the semantic parser parse sentences into executable programs. A symbolic execution process bridges two modules.
|
| 92 |
+
|
| 93 |
+
Our semantic parser generates the hierarchies of latent programs in a sequence to tree manner (Dong & Lapata, 2016). We use a bidirectional GRU (Cho et al., 2014) to encode an input question, which outputs a fixed-length embedding of the question. A decoder based on GRU cells is applied to the embedding, and recovers the hierarchy of operations as the latent program. Some operations takes concepts their parameters, such as Filter( Red ) and Query( Shape ). These concepts are chosen from all concepts appeared in the input question. Figure 4(B) shows an example, while more details can be found in Appendix B.
|
| 94 |
+
|
| 95 |
+
Quasi-symbolic program execution. Given the latent program recovered from the question in natural language, a symbolic program executor executes the program and derives the answer based on the object-based visual representation. Our program executor is a collection of deterministic functional modules designed to realize all logic operations specified in the DSL. Figure 4(B) shows an illustrative execution trace of a program.
|
| 96 |
+
|
| 97 |
+
To make the execution differentiable w.r.t. visual representations, we represent the intermediate results in a probabilistic manner: a set of objects is represented by a vector, as the attention mask over all objects in the scene. Each element, $\mathrm { { M a s k } } _ { i } \in [ \bar { 0 } , 1 ]$ denotes the probability that the $i$ -th object of the scene belongs to the set. For example, shown in Figure 4(B), the first Filter operation outputs a mask of length 4 (there are in total 4 objects in the scene), with each element representing the probability that the corresponding object is selected out (i.e., the probability that each object is a green cube). The output “mask” on the objects will be fed into the next module (Relate in this case) as input and the execution of programs continues. The last module outputs the final answer to the question. We refer interested readers to Appendix C for the implementation of all operators.
|
| 98 |
+
|
| 99 |
+
# 3.2 TRAINING PARADIGM
|
| 100 |
+
|
| 101 |
+
Optimization objective. The optimization objective of NS-CL is composed of two parts: concept learning and language understanding. Our goal is to find the optimal parameters $\Theta _ { v }$ of the visual
|
| 102 |
+
|
| 103 |
+
perception module Perception (including the ResNet-34 for extracting object features, attribute operators. and concept embeddings) and $\Theta _ { s }$ of the semantic parsing module SemanticParse, to maximize the likelihood of answering the question $Q$ correctly:
|
| 104 |
+
|
| 105 |
+
$$
|
| 106 |
+
\Theta _ { v } , \Theta _ { s } \gets \arg \operatorname* { m a x } _ { \Theta _ { v } , \Theta _ { s } } \mathbb { E } _ { P } [ \operatorname* { P r } [ A = \mathrm { E x e c u t o r } ( \operatorname* { P e r c e p t i o n } ( S ; \Theta _ { v } ) , P ) ] ] ,
|
| 107 |
+
$$
|
| 108 |
+
|
| 109 |
+
where $P$ denotes the program, $A$ the answer, $S$ the scene, and Executor the quasi-symbolic executor.
|
| 110 |
+
The expectation is taken over $P \sim$ SemanticParse $\left( Q ; \Theta _ { s } \right)$ .
|
| 111 |
+
|
| 112 |
+
Recall the program executor is fully differentiable w.r.t. the visual representation. We compute the gradient w.r.t. $\Theta _ { v }$ as $\nabla _ { \Theta _ { v } } \mathbb { E } _ { P } [ D _ { \mathrm { K L } } ( \mathrm { E x e c u t o r } ( \mathrm { P e r c e p t i o n } ( S ; \Theta _ { v } ) , P ) \lVert A ) ]$ . We use REINFORCE (Williams, 1992) to optimize the semantic parser $\Theta _ { s }$ : $\nabla _ { \Theta _ { s } } ~ = ~ \mathbb { E } _ { P } [ r \cdot \log \mathrm { P r } [ P ~ =$ SemanticParse $\left( Q ; \Theta _ { s } \right) ] ]$ , where the reward $r = 1$ if the answer is correct and 0 otherwise. We also use off-policy search to reduce the variance of REINFORCE, the detail of which can be found in Appendix D.
|
| 113 |
+
|
| 114 |
+
Curriculum visual concept learning. Motivated by human concept learning as in Figure 1, we employ a curriculum learning approach to help joint optimization. We heuristically split the training samples into four stages (Figure 4(A)): first, learning object-level visual concepts; second, learning relational questions; third, learning more complex questions with perception modules fixed; fourth, joint fine-tuning of all modules. We found that this is essential to the learning of our neuro-symbolic concept learner. We include more technical details in Appendix E.
|
| 115 |
+
|
| 116 |
+
# 4 EXPERIMENTS
|
| 117 |
+
|
| 118 |
+
We demonstrate the following advantages of our NS-CL. First, it learns visual concepts with remarkable accuracy; second, it allows data-efficient visual reasoning on the CLEVR dataset (Johnson et al., 2017a); third, it generalizes well to new attributes, visual composition, and language domains.
|
| 119 |
+
|
| 120 |
+
We train NS-CL on 5K images ( $\textless 1 0 \%$ of CLEVR’s 70K training images). We generate 20 questions for each image for the entire curriculum learning process. The Mask R-CNN module is pretrained on 4K generated CLEVR images with bounding box annotations, following Yi et al. (2018).
|
| 121 |
+
|
| 122 |
+
# 4.1 VISUAL CONCEPT LEARNING
|
| 123 |
+
|
| 124 |
+
Classification-based concept evaluation. Our model treats attributes as neural operators that map latent object representations into an attribute-specific embedding space (Figure 3). We evaluate the concept quantization of objects in the CLEVR validation split. Our model can achieve near perfect classification accuracy $( \sim 9 9 \% )$ for all object properties, suggesting it effectively learns generic concept representations. The result for spatial relations is relatively lower, because CLEVR does not have direct queries on the spatial relation between objects. Thus, spatial relation concepts can only be learned indirectly.
|
| 125 |
+
|
| 126 |
+
Count-based concept evaluation. The SOTA methods do not provide interpretable representation on individual objects (Johnson et al., 2017a; Hudson & Manning, 2018; Mascharka et al., 2018) . To evaluate the visual concepts learned by such models, we generate a synthetic question set. The diagnostic question set contains simple questions as the following form: “How many red objects are there?”. We evaluate the performance on all concepts appeared in the CLEVR dataset.
|
| 127 |
+
|
| 128 |
+
Table 2 summarizes the results compared with strong baselines, including methods based on convolutional features (Johnson et al., 2017b) and those based on neural attentions (Mascharka et al., 2018; Hudson & Manning, 2018). Our approach outperforms IEP by a significant margin $( 8 \% )$ and attention-based baselines by ${ > } 2 \%$ , suggesting object-based visual representations and symbolic reasoning helps to interpret visual concepts.
|
| 129 |
+
|
| 130 |
+
# 4.2 DATA-EFFICIENT AND INTERPRETABLE VISUAL REASONING
|
| 131 |
+
|
| 132 |
+
NS-CL jointly learns visual concepts, words and semantic parsing by watching images and reading paired questions and answers. It can be directly applied to VQA.
|
| 133 |
+
|
| 134 |
+
<table><tr><td>Visual Mean Color Mat. Shape Size</td></tr><tr><td>IEP Conv. 90.6 91.0 90.0 89.9 90.6</td></tr><tr><td>MAC Attn. 95.9 98.0 91.4 94.4 94.2</td></tr><tr><td>TbD (hres.) Attn. 96.5 96.6 92.2 95.4 92.6</td></tr><tr><td>NS-CL Obj. 98.7 99.0 98.7 98.1 99.1</td></tr></table>
|
| 135 |
+
|
| 136 |
+
Table 2: We also evaluate the learned visual concepts using a diagnostic question set containing simple questions such as “How many red objects are there?”. NS-CL outperforms both convolutional and attentional baselines. The suggested object-based visual representation and symbolic reasoning approach perceives better interpretation of visual concepts.
|
| 137 |
+
|
| 138 |
+
Table 3: We compare different variants of baselines for a systematic study on visual features and data efficiency. Using only $10 \%$ of the training images, our model is able to achieve a comparable results with the baselines trained on the full dataset. See the text for details.
|
| 139 |
+
|
| 140 |
+
<table><tr><td>Model</td><td>Visual</td><td>Accuracy (100% Data) (10% Data)</td><td>Accuracy</td></tr><tr><td>TbD</td><td>Attn.</td><td>99.1</td><td>54.2</td></tr><tr><td>TbD-Object</td><td>Obj.</td><td>84.1</td><td>52.6</td></tr><tr><td>TbD-Mask</td><td>Attn.</td><td>99.0</td><td>55.0</td></tr><tr><td>MAC</td><td>Attn.</td><td>98.9</td><td>67.3</td></tr><tr><td>MAC-Object</td><td>Obj.</td><td>79.5</td><td>51.2</td></tr><tr><td>MAC-Mask</td><td>Attn.</td><td>98.7</td><td>68.4</td></tr><tr><td>NS-CL</td><td>Obj.</td><td>99.2</td><td>98.9</td></tr></table>
|
| 141 |
+
|
| 142 |
+
Table 4 summarizes results on the CLEVR validation split. Our model achieves the state-of-theart performance among all baselines using zero program annotations, including MAC (Hudson & Manning, 2018) and FiLM (Perez et al., 2018). Our model achieves comparable performance with the strong baseline TbD-Nets (Mascharka et al., 2018), whose semantic parser is trained using 700K programs in CLEVR (ours need 0). The recent NS-VQA model from Yi et al. (2018) achieves better performance on CLEVR; however, their system requires annotated visual attributes and program traces during training, while our NS-CL needs no extra labels.
|
| 143 |
+
|
| 144 |
+
Here, the visual perception module is pre-trained on ImageNet (Deng et al., 2009). Without pretraining, the concept learning accuracies drop by $0 . 2 \%$ on average and the QA accuracy drops by $0 . 5 \%$ . Meanwhile, NS-CL recovers the underlying programs of questions accurately $( > 9 9 . 9 \%$ accuracy). NS-CL can also detect ambiguous or invalid programs and indicate exceptions. Please see Appendix F for more details. NS-CL can also be applied to other visual reasoning testbeds. Please refer to Appendix G.1 for our results on the Minecraft dataset (Yi et al., 2018).
|
| 145 |
+
|
| 146 |
+
For a systematic study on visual features and data efficiency, we implement two variants of the baseline models: TbD-Object and MAC-Object. Inspired by (Anderson et al., 2018), instead of the input image, TbD-Object and MAC-Object take a stack of object features as input. TbD-Mask and MAC-Mask integrate the masks of objects by using them to guide the attention over the images.
|
| 147 |
+
|
| 148 |
+
Table 3 summarizes the results. Our model outperforms all baselines on data efficiency. This comes from the full disentanglement of visual concept learning and symbolic reasoning: how to execute program instructions based on the learned concepts is programmed. TbD-Object and MAC-Object demonstrate inferior results in our experiments. We attribute this to the design of model architectures and have a detailed analysis in Appendix F.3. Although TbD-Mask and MAC-Mask do not perform better than the originals, we find that using masks to guide attentions speeds up the training.
|
| 149 |
+
|
| 150 |
+
Besides achieving a competitive performance on the visual reasoning testbeds, by leveraging both object-based representation and symbolic reasoning, out model learns fully interpretable visual concepts: see Appendix H for qualitative results on various datasets.
|
| 151 |
+
|
| 152 |
+
# 4.3 GENERALIZATION TO NEW ATTRIBUTES AND COMPOSITIONS
|
| 153 |
+
|
| 154 |
+
Generalizing to new visual compositions. The CLEVR-CoGenT dataset is designed to evaluate models’ ability to generalize to new visual compositions. It has two splits: Split A only contains gray, blue, brown and yellow cubes, but red, green, purple, and cyan cylinders; split B imposes the opposite color constraints on cubes and cylinders. If we directly learn visual concepts on split A, it overfits to classify shapes based on the color, leading to a poor generalization to split B.
|
| 155 |
+
|
| 156 |
+
Our solution is based on the idea of seeing attributes as operators. Specifically, we jointly train the concept embeddings (e.g., Red, Cube, etc.) as well as the semantic parser on split A, keeping pretrained, frozen attribute operators. As we learn distinct representation spaces for different attributes, our model achieves an accuracy of $9 8 . 8 \%$ on split A and $9 8 . 9 \%$ on split B.
|
| 157 |
+
|
| 158 |
+
Table 4: Our model outperforms all baselines using no program annotations. It achieves comparable results with models trained by full program annotations such as TbD.
|
| 159 |
+
|
| 160 |
+
Figure 5: We test the combinatorial generalization w.r.t. the number of objects in scenes and the complexity of questions (i.e. the depth of the program trees). We makes four split of the data containing various complexities of scenes and questions. Our object-based visual representation and explicit program semantics enjoys the best (and almost-perfect) combinatorial generalization compared with strong baselines.
|
| 161 |
+
|
| 162 |
+
<table><tr><td>Model</td><td>Prog. Overall ( Anno.</td><td>Count</td><td>Cmp. Num.</td><td>Exist</td><td>Query Cmp. Attr. Attr.</td></tr><tr><td>Human</td><td>N/A 92.6</td><td>86.7</td><td>86.4</td><td>96.6</td><td>95.0 96.0</td></tr><tr><td>NMN</td><td>700K 72.1</td><td>52.5</td><td>72.7</td><td>79.3</td><td>79.0 78.0</td></tr><tr><td>N2NMN</td><td>700K 88.8</td><td>68.5</td><td>84.9</td><td>85.7</td><td>90.0 88.8</td></tr><tr><td>IEP</td><td>700K 96.9</td><td>92.7</td><td>98.7</td><td>97.1 98.1</td><td>98.9</td></tr><tr><td>DDRprog</td><td>700K 98.3</td><td>96.5</td><td>98.4</td><td>98.8 99.1</td><td>99.0</td></tr><tr><td>TbD</td><td>700K 99.1</td><td>97.6</td><td>99.4</td><td>99.2 99.5</td><td>99.6</td></tr><tr><td>RN</td><td>0 95.5</td><td>90.1</td><td>93.6</td><td>97.8</td><td>97.1</td></tr><tr><td>FiLM</td><td>0 97.6</td><td>94.5</td><td>93.8</td><td>99.2</td><td>97.9 99.2 99.0</td></tr><tr><td>MAC</td><td>0 98.9</td><td>97.2</td><td>99.4</td><td>99.5 99.3</td><td>99.5</td></tr><tr><td>NS-CL</td><td>0 98.9</td><td>98.2</td><td>99.0</td><td>98.8</td><td>99.3 99.1</td></tr></table>
|
| 163 |
+
|
| 164 |
+
<table><tr><td rowspan="2">Model</td><td colspan="2">Test</td></tr><tr><td> Split A Split B Split C Split D</td><td></td></tr><tr><td>MAC</td><td>97.3 N/A</td><td>92.9 N/A</td></tr><tr><td>IEP</td><td>96.1 92.1</td><td>91.5 90.9</td></tr><tr><td>TbD</td><td>98.8 94.5</td><td>94.3 91.9</td></tr><tr><td>NS-CL</td><td>98.9 98.9</td><td>98.7 98.8</td></tr></table>
|
| 165 |
+
|
| 166 |
+

|
| 167 |
+
Figure 6: Samples collected from four splits in Section 4.3 for illustration. Models are trained on split A but evaluated on all splits for testing the combinatorial generalization.
|
| 168 |
+
|
| 169 |
+
Generalizing to new visual concepts. We expect the process of concept learning can take place in an incremental manner: having learned 7 different colors, humans can learn the 8-th color incrementally and efficiently. To this end, we build a synthetic split of the CLEVR dataset to replicate the setting of incremental concept learning. Split A contains only images without any purple objects, while split B contains images with at least one purple object. We train all the models on split A first, and finetune them on 100 images from split B. We report the final QA performance on split B’s validation set. All models use a pre-trained semantic parser on the full CLEVR dataset.
|
| 170 |
+
|
| 171 |
+
Our model performs a $9 3 . 9 \%$ accuracy on the QA test in Split B, outperforming the convolutional baseline IEP (Johnson et al., 2017b) and the attentional baseline TbD (Mascharka et al., 2018) by $4 . 6 \%$ and $6 . 1 \%$ respectively. The acquisition of Color operator brings more efficient learning of new visual concepts.
|
| 172 |
+
|
| 173 |
+
# 4.4 COMBINATORIAL GENERALIZATION TO NEW SCENES AND QUESTIONS
|
| 174 |
+
|
| 175 |
+
Having learned visual concepts on small-scale scenes (containing only few objects) and simple questions (only single-hop questions), we humans can easily generalize the knowledge to larger-scale scenes and to answer complex questions. To evaluate this, we split the CLEVR dataset into four parts: Split A contains only scenes with less than 6 objects, and questions whose latent programs having a depth less than 5; Split B contains scenes with less than 6 objects, but arbitrary questions; Split C contains arbitrary scenes, but restricts the program depth being less than 5; Split D contains arbitrary scenes and questions. Figure 6 shows some illustrative samples.
|
| 176 |
+
|
| 177 |
+
As VQA baselines are unable to count a set of objects of arbitrary size, for a fair comparison, all programs containing the “count” operation over $> 6$ objects are removed from the set. For
|
| 178 |
+
|
| 179 |
+
<table><tr><td>Model</td><td>Retrieval Accuracy</td></tr><tr><td>IEP</td><td>95.5</td></tr><tr><td>TbD</td><td>97.0</td></tr><tr><td>NS-CL</td><td>96.9</td></tr></table>
|
| 180 |
+
|
| 181 |
+

|
| 182 |
+
Caption: There is a big yellow cylinder in front of a gray object.
|
| 183 |
+
|
| 184 |
+
<table><tr><td>Model</td><td>Retrieval Accuracy</td></tr><tr><td>CNN-LSTM</td><td>68.9</td></tr><tr><td>NS-CL</td><td>97.0</td></tr></table>
|
| 185 |
+
|
| 186 |
+
(c) Image-caption retrieval accuracy on the full dataset. Our model outperforms baselines and requires no extra training or fine-tuning of the visual perception module.
|
| 187 |
+
|
| 188 |
+
(a) An illustrative pair of image and caption in our synthetic dataset.
|
| 189 |
+
|
| 190 |
+
(b) Image-caption retrieval accuracy on a subset of data. Our model archives comparable results with VQA baselines.
|
| 191 |
+
|
| 192 |
+
Table 5: We introduce a new simple DSL for image-caption retrieval to evaluate how well the learned visual concepts transfer. Due to the difference between VQA and caption retrieval, VQA baselines are only able to infer the result on a partial set of data. The learned object-based visual concepts can be directly transferred into the new domain for free.
|
| 193 |
+
|
| 194 |
+
methods using explicit program semantics, the semantic parser is pre-trained on the full dataset and fixed. Methods with implicit program semantics (Hudson & Manning, 2018) learn an entangled representation for perception and reasoning, and cannot trivially generalize to more complex programs. We only use the training data from the Split A and then quantify the generalization ability on other three splits. Shown in Table 5, our NS-CL leads to almost-perfect generalization to larger scenes and more complex questions, outperforming all baselines by at least $4 \%$ in QA accuracy.
|
| 195 |
+
|
| 196 |
+
# 4.5 EXTENDING TO OTHER PROGRAM DOMAIN
|
| 197 |
+
|
| 198 |
+
The learned visual concepts can also be used in other domains such as image retrieval. With the visual scenes fixed, the learned visual concepts can be directly transferred into the new domain. We only need to learn the semantic parsing of natural language into the new DSL.
|
| 199 |
+
|
| 200 |
+
We build a synthetic dataset for image retrieval and adopt a DSL from scene graph–based image retrieval (Johnson et al., 2015). The dataset contains only simple captions: “There is an <object $\mathbf { A } >$ <relation $>$ <object $\mathbf { B } >$ .” (e.g., There is a box right of a cylinder). The semantic parser learns to extract corresponding visual concepts (e.g., box, right, and cylinder) from the sentence. The program can then be executed on the visual representation to determine if the visual scene contains such relational triples.
|
| 201 |
+
|
| 202 |
+
For simplicity, we treat retrieval as classifying whether a relational triple exists in the image. This functionality cannot be directly implemented on the CLEVR VQA program domain, because questions such as “Is there a box right of a cylinder” can be ambiguous if there exist multiple cylinders in the scene. Due to the entanglement of the visual representation with the specific DSL, baselines trained on CLEVR QA can not be directly applied to this task. For a fair comparison with them, we show the result in Table 5b on a subset of the generated image-caption pairs where the underlying programs have no ambiguity regarding the reference of object B. A separate semantic parser is trained for the VQA baselines, which translates captions into a CLEVR QA-compatible program (e.g., Exist(Filter(Box, Relate(Right, Filter(Cylinder))).
|
| 203 |
+
|
| 204 |
+
Table 5c compares our NS-CL against typical image-text retrieval baselines on the full image-caption dataset. Without any annotations of the sentence semantics, our model learns to parse the captions into the programs in the new DSL. It outperforms the CNN-LSTM baseline by $30 \%$ .
|
| 205 |
+
|
| 206 |
+
# 4.6 EXTENDING TO NATURAL IMAGES AND LANGUAGE
|
| 207 |
+
|
| 208 |
+
We further conduct experiments on MS-COCO (Lin et al., 2014) images. Results are presented on the VQS dataset (Gan et al., 2017). VQS contains a subset of images and questions from the original VQA 1.0 dataset (Antol et al., 2015). All questions in the VQS dataset can be visually grounded: each question is associated with multiple image regions, annotated by humans as essential for answering the question. Figure 7 illustrates an execution trace of NS-CL on VQS.
|
| 209 |
+
|
| 210 |
+
We use a syntactic dependency parser to extract programs and concepts from language (Andreas et al., 2016; Schuster et al., 2015). The object proposals and features are extracted from models pre-trained on the MS-COCO dataset and the ImageNet dataset, respectively. Illustrated in Figure 7, our model
|
| 211 |
+
|
| 212 |
+

|
| 213 |
+
Figure 7: Left: An example image-question pair from the VQS dataset and the corresponding execution trace of NS-CL. Right: Results on the VQS test set. Our model achieves a comparable results with the baselines.
|
| 214 |
+
|
| 215 |
+
Concept: Person On a Skateboard
|
| 216 |
+
|
| 217 |
+
<table><tr><td>Model</td><td>Accuracy</td></tr><tr><td>MLP</td><td>43.9</td></tr><tr><td>MAC</td><td>46.2</td></tr><tr><td>NS-CL</td><td>44.3</td></tr></table>
|
| 218 |
+
|
| 219 |
+
Concept: Horse
|
| 220 |
+
|
| 221 |
+

|
| 222 |
+
Figure 8: Concepts learned from VQS, including object categories, attributes, and relations.
|
| 223 |
+
|
| 224 |
+
shows competitive performance on QA accuracy, comparable with the MLP baseline (Jabri et al., 2016) and the MAC network (Hudson & Manning, 2018). Additional illustrative execution traces of NS-CL are in Appendix H. Beyond answering questions, NS-CL effectively learns visual concepts from data. Figure 8 shows examples of the learned visual concepts, including object categories, attributes, and relations. Experiment setup and implementation details are in Appendix G.2.
|
| 225 |
+
|
| 226 |
+
In this paper, we focus on a neuro-symbolic framework that learns visual concepts about object properties and relations. Indeed, visual question answering requires AI systems to reason about more general concepts such as events or activities (Levin, 1993). We leave the extension of NS-CL along this direction and its application to general VQA datasets (Antol et al., 2015) as future work.
|
| 227 |
+
|
| 228 |
+
# 5 DISCUSSION AND FUTURE WORK
|
| 229 |
+
|
| 230 |
+
We presented a method that jointly learns visual concepts, words, and semantic parsing of sentences from natural supervision. The proposed framework, NS-CL, learns by looking at images and reading paired questions and answers, without any explicit supervision such as class labels for objects. Our model learns visual concepts with remarkable accuracy. Based upon the learned concepts, our model achieves good results on question answering, and more importantly, generalizes well to new visual compositions, new visual concepts, and new domain specific languages.
|
| 231 |
+
|
| 232 |
+
The design of NS-CL suggests multiple research directions. First, constructing 3D object-based representations for realistic scenes needs further exploration (Anderson et al., 2018; Baradel et al., 2018). Second, our model assumes a domain-specific language for describing formal semantics. The integration of formal semantics into the processing of complex natural language would be meaningful future work (Artzi & Zettlemoyer, 2013; Oh et al., 2017). We hope our paper could motivate future research in visual concept learning, language learning, and compositionality.
|
| 233 |
+
|
| 234 |
+
Our framework can also be extended to other domains such as video understanding and robotic manipulation. Here, we would need to discover semantic representations for actions and interactions (e.g., push) beyond static spatial relations. Along this direction, researchers have studied building symbolic representations for skills (Konidaris et al., 2018) and learning instruction semantics from interaction (Oh et al., 2017) in constrained setups. Applying neuro-symbolic learning frameworks for concepts and skills would be meaningful future work toward robotic learning in complex interactive environments.
|
| 235 |
+
|
| 236 |
+
Acknowledgements. We thank Kexin Yi, Haoyue Shi, and Jon Gauthier for helpful discussions and suggestions. This work was supported in part by the Center for Brains, Minds and Machines (NSF STC award CCF-1231216), ONR MURI N00014-16-1-2007, MIT-IBM Watson AI Lab, and Facebook.
|
| 237 |
+
|
| 238 |
+
# REFERENCES
|
| 239 |
+
|
| 240 |
+
Omri Abend, Tom Kwiatkowski, Nathaniel J Smith, Sharon Goldwater, and Mark Steedman. Bootstrapping language acquisition. Cognition, 2017.
|
| 241 |
+
|
| 242 |
+
Peter Anderson, Xiaodong He, Chris Buehler, Damien Teney, Mark Johnson, Stephen Gould, and Lei Zhang. Bottom-up and top-down attention for image captioning and visual question answering. In CVPR, 2018.
|
| 243 |
+
|
| 244 |
+
Jacob Andreas, Marcus Rohrbach, Trevor Darrell, and Dan Klein. Learning to compose neural networks for question answering. In NAACL-HLT, 2016.
|
| 245 |
+
|
| 246 |
+
Stanislaw Antol, Aishwarya Agrawal, Jiasen Lu, Margaret Mitchell, Dhruv Batra, C Lawrence Zitnick, and Devi Parikh. VQA: Visual question answering. In ICCV, 2015.
|
| 247 |
+
|
| 248 |
+
Yoav Artzi and Luke Zettlemoyer. Weakly supervised learning of semantic parsers for mapping instructions to actions. TACL, 2013.
|
| 249 |
+
|
| 250 |
+
Fabien Baradel, Natalia Neverova, Christian Wolf, Julien Mille, and Greg Mori. Object level visual reasoning in videos. In ECCV, 2018.
|
| 251 |
+
|
| 252 |
+
Kan Chen, Jiang Wang, Liang-Chieh Chen, Haoyuan Gao, Wei Xu, and Ram Nevatia. Abc-cnn: An attention based convolutional neural network for visual question answering. arXiv:1511.05960, 2015.
|
| 253 |
+
|
| 254 |
+
Kyunghyun Cho, Bart Van Merrienboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger ¨ Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoder-decoder for statistical machine translation. In EMNLP, 2014.
|
| 255 |
+
|
| 256 |
+
Grzegorz Chrupała, Akos Kad´ ar, and Afra Alishahi. Learning language through pictures. In ´ ACL, 2015.
|
| 257 |
+
|
| 258 |
+
Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, 2009.
|
| 259 |
+
|
| 260 |
+
Jeffrey Donahue, Lisa Anne Hendricks, Sergio Guadarrama, Marcus Rohrbach, Subhashini Venugopalan, Kate Saenko, and Trevor Darrell. Long-term recurrent convolutional networks for visual recognition and description. In CVPR, 2015.
|
| 261 |
+
|
| 262 |
+
Li Dong and Mirella Lapata. Language to logical form with neural attention. In ACL, 2016.
|
| 263 |
+
|
| 264 |
+
Afsaneh Fazly, Afra Alishahi, and Suzanne Stevenson. A probabilistic computational model of cross-situational word learning. Cognit. Sci., 2010.
|
| 265 |
+
|
| 266 |
+
Chuang Gan, Yandong Li, Haoxiang Li, Chen Sun, and Boqing Gong. VQS: Linking segmentations to questions and answers for supervised attention in vqa and question-focused semantic segmentation. In ICCV, 2017.
|
| 267 |
+
|
| 268 |
+
Siddha Ganju, Olga Russakovsky, and Abhinav Gupta. What’s in a question: Using visual questions as a form of supervision. In CVPR, 2017.
|
| 269 |
+
|
| 270 |
+
Jon Gauthier, Roger Levy, and Joshua B Tenenbaum. Word learning and the acquisition of syntactic– semantic overhypotheses. In CogSci, 2018.
|
| 271 |
+
|
| 272 |
+
Jonas Gehring, Michael Auli, David Grangier, Denis Yarats, and Yann N Dauphin. Convolutional sequence to sequence learning. In ICML, 2017.
|
| 273 |
+
|
| 274 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2015.
|
| 275 |
+
|
| 276 |
+
Kaiming He, Georgia Gkioxari, Piotr Dollar, and Ross Girshick. Mask R-CNN. In ´ ICCV, 2017.
|
| 277 |
+
|
| 278 |
+
Irina Higgins, Nicolas Sonnerat, Loic Matthey, Arka Pal, Christopher P Burgess, Matthew Botvinick, Demis Hassabis, and Alexander Lerchner. Scan: learning abstract hierarchical compositional visual concepts. In ICLR, 2018.
|
| 279 |
+
|
| 280 |
+
Ronghang Hu, Jacob Andreas, Trevor Darrell, and Kate Saenko. Explainable neural computation via stack neural module networks. In ECCV, 2018.
|
| 281 |
+
|
| 282 |
+
Drew A Hudson and Christopher D Manning. Compositional attention networks for machine reasoning. In ICLR, 2018.
|
| 283 |
+
|
| 284 |
+
Allan Jabri, Armand Joulin, and Laurens van der Maaten. Revisiting visual question answering baselines. In ECCV, 2016.
|
| 285 |
+
|
| 286 |
+
Justin Johnson, Ranjay Krishna, Michael Stark, Li-Jia Li, David Shamma, Michael Bernstein, and Li Fei-Fei. Image retrieval using scene graphs. In CVPR, 2015.
|
| 287 |
+
|
| 288 |
+
Justin Johnson, Andrej Karpathy, and Li Fei-Fei. DenseCap: Fully convolutional localization networks for dense captioning. In CVPR, 2016.
|
| 289 |
+
|
| 290 |
+
Justin Johnson, Bharath Hariharan, Laurens van der Maaten, Li Fei-Fei, C Lawrence Zitnick, and Ross Girshick. CLEVR: A diagnostic dataset for compositional language and elementary visual reasoning. In CVPR, 2017a.
|
| 291 |
+
|
| 292 |
+
Justin Johnson, Bharath Hariharan, Laurens van der Maaten, Judy Hoffman, Li Fei-Fei, C Lawrence Zitnick, and Ross Girshick. Inferring and executing programs for visual reasoning. In ICCV, 2017b.
|
| 293 |
+
|
| 294 |
+
Ryan Kiros, Ruslan Salakhutdinov, and Richard S Zemel. Unifying visual-semantic embeddings with multimodal neural language models. arXiv:1411.2539, 2014.
|
| 295 |
+
|
| 296 |
+
George Konidaris, Leslie Pack Kaelbling, and Tomas Lozano-Perez. From skills to symbols: Learning symbolic representations for abstract high-level planning. JAIR, 2018.
|
| 297 |
+
|
| 298 |
+
Tejas D Kulkarni, William F Whitney, Pushmeet Kohli, and Josh Tenenbaum. Deep convolutional inverse graphics network. In NeurIPS, 2015.
|
| 299 |
+
|
| 300 |
+
Beth Levin. English verb classes and alternations, volume 1. University of Chicago Press, 1993.
|
| 301 |
+
|
| 302 |
+
Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In ´ ECCV, 2014.
|
| 303 |
+
|
| 304 |
+
M Malinowski and M Fritz. A multi-world approach to question answering about real-world scenes based on uncertain input. In NeurIPS, 2014.
|
| 305 |
+
|
| 306 |
+
Junhua Mao, Jiajing Xu, Kevin Jing, and Alan L Yuille. Training and evaluating multimodal word embeddings with large-scale web annotated images. In NeurIPS, 2016.
|
| 307 |
+
|
| 308 |
+
David Mascharka, Philip Tran, Ryan Soklaski, and Arjun Majumdar. Transparency by design: Closing the gap between performance and interpretability in visual reasoning. In CVPR, 2018.
|
| 309 |
+
|
| 310 |
+
Junhyuk Oh, Satinder Singh, Honglak Lee, and Pushmeet Kohli. Zero-shot task generalization with multi-task deep reinforcement learning. In ICML, 2017.
|
| 311 |
+
|
| 312 |
+
Jeffrey Pennington, Richard Socher, and Christopher Manning. Glove: Global vectors for word representation. In EMNLP, 2014.
|
| 313 |
+
|
| 314 |
+
Ethan Perez, Florian Strub, Harm De Vries, Vincent Dumoulin, and Aaron Courville. Film: Visual reasoning with a general conditioning layer. In AAAI, 2018.
|
| 315 |
+
|
| 316 |
+
Adam Santoro, David Raposo, David GT Barrett, Mateusz Malinowski, Razvan Pascanu, Peter Battaglia, and Timothy Lillicrap. A simple neural network module for relational reasoning. In NeurIPS, 2017.
|
| 317 |
+
|
| 318 |
+
Sebastian Schuster, Ranjay Krishna, Angel Chang, Li Fei-Fei, and Christopher D Manning. Generating semantically precise scene graphs from textual descriptions for improved image retrieval. In EMNLP Workshop, 2015.
|
| 319 |
+
|
| 320 |
+
Haoyue Shi, Jiayuan Mao, Tete Xiao, Yuning Jiang, and Jian Sun. Learning visually-grounded semantics from contrastive adversarial samples. In COLING, 2018.
|
| 321 |
+
|
| 322 |
+
N Siddharth, T. B. Paige, J.W. Meent, A. Desmaison, N. Goodman, P. Kohli, F. Wood, and P. Torr. Learning disentangled representations with semi-supervised deep generative models. In NeurIPS, 2017.
|
| 323 |
+
|
| 324 |
+
Joseph Suarez, Justin Johnson, and Fei-Fei Li. DDRprog: A clevr differentiable dynamic reasoning programmer. arXiv:1803.11361, 2018.
|
| 325 |
+
|
| 326 |
+
Richard S Sutton, David A McAllester, Satinder P Singh, and Yishay Mansour. Policy gradient methods for reinforcement learning with function approximation. In NeurIPS, 2000.
|
| 327 |
+
|
| 328 |
+
Ivan Vendrov, Ryan Kiros, Sanja Fidler, and Raquel Urtasun. Order-embeddings of images and language. In ICLR, 2016.
|
| 329 |
+
|
| 330 |
+
Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. MLJ, 8(3-4):229–256, 1992.
|
| 331 |
+
|
| 332 |
+
Jiajun Wu, Joshua B Tenenbaum, and Pushmeet Kohli. Neural scene de-rendering. In CVPR, 2017.
|
| 333 |
+
|
| 334 |
+
Huijuan Xu and Kate Saenko. Ask, attend and answer: Exploring question-guided spatial attention for visual question answering. In ECCV, 2016.
|
| 335 |
+
|
| 336 |
+
Jimei Yang, Scott E Reed, Ming-Hsuan Yang, and Honglak Lee. Weakly-supervised disentangling with recurrent transformations for 3d view synthesis. In NeurIPS, 2015.
|
| 337 |
+
|
| 338 |
+
Zichao Yang, Xiaodong He, Jianfeng Gao, Li Deng, and Alex Smola. Stacked attention networks for image question answering. In CVPR, 2016.
|
| 339 |
+
|
| 340 |
+
Kexin Yi, Jiajun Wu, Chuang Gan, Antonio Torralba, Pushmeet Kohli, and Joshua B Tenenbaum. Neural-Symbolic VQA: Disentangling reasoning from vision and language understanding. In NeurIPS, 2018.
|
| 341 |
+
|
| 342 |
+
Yukun Zhu, Ryan Kiros, Rich Zemel, Ruslan Salakhutdinov, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. In CVPR, 2015.
|
| 343 |
+
|
| 344 |
+
# A CLEVR DOMAIN-SPECIFIC LANGUAGE AND IMPLEMENTATIONS
|
| 345 |
+
|
| 346 |
+
We first introduce the domain-specific language (DSL) designed for the CLEVR VQA dataset (Johnson et al., 2017a). Table 6 shows the available operations in the DSL, while Table 7 explains the type system.
|
| 347 |
+
|
| 348 |
+
Table 6: All operations in the domain-specific language for CLEVR VQA.
|
| 349 |
+
|
| 350 |
+
<table><tr><td>Operation</td><td> Signature</td><td>Semantics</td></tr><tr><td>Scene</td><td>O→ObjectSet</td><td>Return all objects in the scene.</td></tr><tr><td>Filter</td><td>(ObjectSet, ObjConcept) -> ObjectSet</td><td>Filter out a set of objects having the object-level concept (e.g., red) from the input object set.</td></tr><tr><td>Relate</td><td>(Object, RelConcept) -→ObjectSet</td><td>Filter out a set of objects that have the relational concept (e.g.,left) with the input object.</td></tr><tr><td>AERelate</td><td>(Object, Attribute) -→ ObjectSet</td><td>(Attribute-Equality Relate) Filter out a set of objects that have the same atribute value (e.g., same color) as the input object.</td></tr><tr><td>Intersection</td><td>(ObjectSet, ObjectSet) -→ObjectSet</td><td>Return the intersection of two ob- ject sets.</td></tr><tr><td>Union</td><td>(ObjectSet, ObjectSet) -→ ObjectSet</td><td>Return the union of two object sets.</td></tr><tr><td>Query</td><td>(Object,Attribute) ->ObjConcept</td><td>Query the attribute (e.g., color) of the input object.</td></tr><tr><td>AEQuery</td><td>(Object, Object, Attribute) -→Bool</td><td>(Attribute-Equality Query) Query if two input objects have the same attribute value (e.g., same color).</td></tr><tr><td>Exist</td><td>(ObjectSet) -→Bool</td><td>Query if the set is empty.</td></tr><tr><td>Count</td><td>(ObjectSet) -→ Integer</td><td>Query the number of objects in the input set.</td></tr><tr><td>CLessThan</td><td>(ObjectSet, ObjectSet) -→Bool</td><td>(Counting LessThan) Query if the number of objects in the first input set is less than the one of the second set.</td></tr><tr><td></td><td>CGreaterThan (ObjectSet, ObjectSet) -→Bool</td><td>(Counting GreaterThan) Query if the number of objects in the first input set is greater than the one of the second set.</td></tr><tr><td>CEqual</td><td>(ObjectSet, ObjectSet) ->Bool</td><td>(Counting Equal) Query if the num- ber of objects in the first input set is the same as the one of the second set.</td></tr></table>
|
| 351 |
+
|
| 352 |
+
We note that some function takes Object as its input instead of ObjectSet. These functions require the uniqueness of the referral object. For example, to answer the question “What’s the color of the red object?”, there should be one and only one red object in the scene. During the program execution, the input object set will be implicitly cast to the single object (if the set is non-empty and there is only one object in the set). Such casting is named Unique in related works (Johnson et al., 2017b).
|
| 353 |
+
|
| 354 |
+
Table 7: The type system of the domain-specific language for CLEVR VQA.
|
| 355 |
+
|
| 356 |
+
<table><tr><td>Type</td><td>Example</td><td>Semantics</td></tr><tr><td>ObjConcept</td><td>Red, Cube,etc.</td><td>Object-level concepts.</td></tr><tr><td>Attribute</td><td>Color, Shape,etc.</td><td>Object-level attributes.</td></tr><tr><td>RelConcept</td><td>Left,Front,etc.</td><td>Relational concepts.</td></tr><tr><td>Object</td><td>:</td><td>A single object in the scene.</td></tr><tr><td>ObjectSet</td><td>{</td><td>A set of objects in the scene.</td></tr><tr><td>Integer</td><td>0,1,2,·</td><td>A single integer.</td></tr><tr><td>Bool</td><td>True,False</td><td>A single boolean value.</td></tr></table>
|
| 357 |
+
|
| 358 |
+
# B SEMANTIC PARSING
|
| 359 |
+
|
| 360 |
+
As shown in Appendix A, a program can be viewed as a hierarchy of operations which take concepts as their parameters. Thus, NS-CL generates the hierarchies of latent programs in a sequence to tree manner (Dong & Lapata, 2016). The semantic parser adopts an encoder-decoder architecture, which contains four neural modules: (1) a bidirectional GRU encoder IEncoder (Cho et al., 2014) to encode an input question into a fixed-length embedding, (2) an operation decoder OpDecoder that determines the operation tokens, such as Filter, in the program based on the sentence embedding, (3) a concept decoder ConceptDecoder that selects concepts appeared in the input question as the parameters for certain operations (e.g., Filter takes an object-level concept parameter while Query takes an attribute), and (4) a set of output encoders $\{ \mathsf { O E n c o d e r } _ { i } \}$ which encode the decoded operations by OpDecoder and output the latent embedding for decoding the next operation. The operation decoder, the concept decoder, and the output encoders work jointly and recursively to generate the hierarchical program layout. Algorithm 1 illustrates the algorithmic outline of the semantic parser.
|
| 361 |
+
|
| 362 |
+
# Algorithm 1: The String-to-Tree Semantic Parser.
|
| 363 |
+
|
| 364 |
+
Function parse $( f , \left\{ c _ { i } \right\} )$ ): program $\gets$ EmptyProgram(); program $. o p \gets \mathsf { O p D e c o d e r } ( f )$ ; if program.op requires a concept parameter then program.concept $\gets$ ConceptDecoder $\left( f , \left\{ c _ { i } \right\} \right)$ ; for $i = 0 , 1 , \cdots$ number of non-concept inputs of program.op do $\mathsf { \ L \ p r o g r a m . i n p u t { [ i ] } p a r s e }$ ( OEncoder $_ i ( f$ , program.op) , $\left\{ c _ { i } \right\}$ ); return program
|
| 365 |
+
|
| 366 |
+
The function parse takes two inputs: the current decoding state $f$ and all concepts appeared in the question, as a set $\left\{ c _ { i } \right\}$ . The parsing procedure begins with encoding the input question by IEncoder as $f _ { 0 }$ , extracting the concept set $\left\{ c _ { i } \right\}$ from the input question, and invoking parse $\left( f _ { 0 } , \left\{ c _ { i } \right\} \right)$ .
|
| 367 |
+
|
| 368 |
+
The concept set $\left\{ c _ { i } \right\}$ is extracted using hand-coded rules. We assume that each concept (including object-level concepts, relational concepts, and attributes) is associated with a single word in the question. For example, the word “red” is associated with the object-level concept Red, while the word “shape” is associated with the attribute Shape. Informally, we call these words concept words. For a given question $Q$ , the corresponding concept set $\left\{ c _ { i } \right\}$ is composed of all occurrences of the concept words in $Q$ . The set of concept words is known for the CLEVR dataset. For natural language questions, one could run POS tagging to find all concept words (Andreas et al., 2016; Schuster et al., 2015). We leave the automatic discovery of concept words as a future work (Gauthier et al., 2018). We use the word embedding of the concept words as the representation for the concepts $\left\{ c _ { i } \right\}$ . Note that, these “concept embeddings” are only for the program parsing. The visual module has separate concept embeddings for aligning object features with concepts in the visual-semantic space.
|
| 369 |
+
|
| 370 |
+
We now delve into the main function $p a r s e ( f , \{ c _ { i } \} )$ : we first decode the root operation $o p$ of the hierarchy by $\mathtt { O p D e c o d e r } ( f )$ . If op requires a concept parameter (an object-level concept, a relational concept, or an attribute), ConceptDecoder will be invoked to choose a concept from all concepts $\left\{ c _ { i } \right\}$ . Assuming op takes two non-concept inputs (e.g., the operation Intersection takes two object sets as its input), there will be two branches for this root node. Thus, two output encoders OEncode $\boldsymbol { \Sigma } _ { 0 }$ and OEncoder1 will be applied to transform the current state $f$ into two sub-states $f _ { 1 }$ and $f _ { 2 }$ . parse will be recursively invoked based on $f _ { 1 }$ and $f _ { 2 }$ to generate the two branches respectively. In the DSL, the number of non-concept inputs for any operation is at most 2.
|
| 371 |
+
|
| 372 |
+
In our implementation, the input encoder IEncoder first maps each word in the question into an embedding space. The word embeddings are composed of two parts: a randomly initialized word embedding of dimension 256 and a positional embedding of dimension 128 (Gehring et al., 2017). For a concept word, its word embedding only depends on which type it belongs to (i.e. object-level, relational or attribute). Thus, after being trained on a fixed dataset, the semantic parser can parse questions with novel (unseen) concept words. The sequence of word embeddings is then encoded by a two-layer GRU with a hidden dimension of $2 5 6 * 2$ (bidirectional). The function parse starts from the last hidden state of the GRU, and works recursively to generate the hierarchical program layout. Both OpDecoder and ConceptDecoder are feed-forward networks. ConceptDecoder performs attentions over the representations of all concepts $\left\{ c _ { i } \right\}$ to select the concepts. Output encoders OEncode $\boldsymbol { \Sigma } _ { 0 }$ and OEncoder1 are implemented as GRU cells.
|
| 373 |
+
|
| 374 |
+
Another pre-processing of the sentence is to group consecutive object-level concept words into a group and treat them together as a single concept, inspired by the notion of “noun phrases” in natural languages. The computational intuition behind this grouping is that, the latent programs of CLEVR questions usually contain multiple consecutive Filter tokens. During the program parsing and execution, we aim to fuse all such Filters into a single Filter operation that takes multiple concepts as its parameter.
|
| 375 |
+
|
| 376 |
+
A Running Example As a running example, consider again the question “What is the color of the cube right of the red matte object?”. We first process the sentence (by rules) as: “What is the <Attribute 1 (color) $>$ of the $<$ <(ObjConcept 1 (cube) $>$ <RelConcept 1 (right) $\mid >$ of the <ObjConcept 2 (red matte object) $> ? ^ { \prime }$ . The expected parsing result of this sentence is:
|
| 377 |
+
|
| 378 |
+
Query( $<$ Attribute $1 >$ , Filter(<ObjConcept $1 >$ , Relate( $<$ RelConcept $1 >$ , Filter( $<$ <ObjConcept $2 >$ , Scene) ) )
|
| 379 |
+
).
|
| 380 |
+
|
| 381 |
+
The semantic parser encode the word embeddings with IEncoder. The last hidden state of the GRU will be used as $f _ { 0 }$ . The word embeddings of the concept words form the set $\left\{ c _ { i } \right\} =$ {Attribute 1, ObjConcept 1, RelConcept 1, ObjConcept $2 \}$ . The function parse is then invoked recursively to generate the hierarchical program layout. Table 8 illustrates the decoding process step-by-step.
|
| 382 |
+
|
| 383 |
+
# C PROGRAM EXECUTION
|
| 384 |
+
|
| 385 |
+
In this section, we present the implementation of all operations listed in Table 6. We start from the implementation of Object-typed and ObjectSet-typed variables. Next, we discuss how to classify objects by object-level concepts or relational concept, followed by the implementation details of all operations.
|
| 386 |
+
|
| 387 |
+
Object-typed and ObjectSet-typed variables. We consider a scene with $n$ objects. An Objecttyped variable can be represented as a vector Object of length $n$ , where $\mathrm { O b j e c t } _ { i } \in [ 0 , 1 ]$ and $\bar { \Sigma _ { i } } \mathrm { O b j e c t } _ { i } = 1$ . ${ \mathrm { O b j e c t } } _ { i }$ can be interpreted as the probability that the $i$ -th object of the scene is being referred to. Similarly, an ObjectSet-typed variable can be represented as a vector ObjectSet of length $n$ , where $\mathrm { O b j e c t S e t } _ { i } \in [ 0 , 1 ]$ . ObjectSeti can be interpreted as the probability that the $i$ -the object is in the set. To cast an ObjectSet-typed variable ObjectSet as an Object-typed variable
|
| 388 |
+
|
| 389 |
+
Table 8: A step-by-step running example of the recursive parsing procedure. The parameter $\left\{ c _ { i } \right\}$ is omitted for better visualization.
|
| 390 |
+
|
| 391 |
+
<table><tr><td></td><td></td><td>StepInputsOutputs</td><td>Recursive Invocation</td></tr><tr><td rowspan="3">1</td><td rowspan="3">f</td><td>OpDecoder(fo)→ Query;</td><td rowspan="3">parse(f1)</td></tr><tr><td>ConceptDecoder(fo) →< Attribute 1 >;</td></tr><tr><td>OEncodero(fo,Query) →fi</td></tr><tr><td rowspan="3">2</td><td rowspan="3">f</td><td>OpDecoder(fi) →Filter;</td><td rowspan="3">parse(f2)</td></tr><tr><td>ConceptDecoder(fi) →< ObjConcept 1 >;</td></tr><tr><td>OEncodero(fi,Filter) →f2</td></tr><tr><td rowspan="3">3</td><td rowspan="3">f</td><td>OpDecoder(f2) →Relate;</td><td rowspan="3">parse(f3)</td></tr><tr><td>ConceptDecoder(f2) →<RelConcept1 >;</td></tr><tr><td>OEncodero(f2,Relate) →f3</td></tr><tr><td rowspan="3">4</td><td rowspan="3">f</td><td>OpDecoder(fs)→Filter;</td><td rowspan="3">parse(f4)</td></tr><tr><td>ConceptDecoder(fs) →< ObjConcept 2 >;</td></tr><tr><td>OEncodero(fs,Filter) → f4</td></tr><tr><td>5</td><td>f4</td><td>OpDecoder(f3)→Scene;</td><td>(End of branch.)</td></tr></table>
|
| 392 |
+
|
| 393 |
+
Object (i.e., the Unique operation), we compute: ${ \mathrm { O b j e c t } } = \operatorname { s o f t m a x } ( \sigma ^ { - 1 } ( { \mathrm { O b j e c t S e t } } ) )$ , where $\sigma ^ { - \tilde { 1 } } ( x ) = \log ( x / ( 1 - \bar { x } ) )$ is the logit function.
|
| 394 |
+
|
| 395 |
+
Concept quantization. Denote $o _ { i }$ as the visual representation of the $i$ -th object, $O C$ the set of all object-level concepts, and $A$ the set of all object-level attributes. Each object-level concept $o c$ (e.g., Red) is associated with a vector embedding $v ^ { o c }$ and a L1-normalized vector $b ^ { o c }$ of length $| { \cal { A } } | . \ b ^ { o c }$ represents which attribute does this object-level concept belong to (e.g., the concept Red belongs to the attribute $_ { \mathsf { C O 1 0 r } }$ ). All attributes $a \in A$ are implemented as neural operators, denoted as $u ^ { a }$ (e.g., $u ^ { \scriptscriptstyle \mathrm { C o l o r } }$ ). To classify the objects as being Red or not, we compute:
|
| 396 |
+
|
| 397 |
+
$$
|
| 398 |
+
\mathrm { P r } [ 0 \mathsf { b j e c t } i \mathrm { i s \mathsf { R e d } } ] = \sigma \left( \sum _ { a \in A } \left( b _ { a } ^ { \scriptscriptstyle \mathrm { R e d } } \cdot \frac { \langle u ^ { a } ( o _ { i } ) , v _ { \scriptscriptstyle \mathrm { R e d } } \rangle - \gamma } { \tau } \right) \right) ,
|
| 399 |
+
$$
|
| 400 |
+
|
| 401 |
+
where $\sigma$ denotes the Sigmoid function, $\langle \cdot , \cdot \rangle$ the cosine distance between two vectors. $\gamma$ and $\tau$ are scalar constants for scaling and shifting the values of similarities. By applying this classifier on all objects we will obtain a vector of length $n$ , denoted as ObjClassify(Red). Similarly, such classification can be done for relational concepts such as Left. This will result in an $n \times n$ matrix RelClassify(Left), where RelClassify $\left( \mathtt { I } \mathtt { e f t } \right) _ { j , i }$ is the probability that the object $i$ is left of the object $j$ .
|
| 402 |
+
|
| 403 |
+
To classify whether two objects have the same attribute (e.g., have the same Color), we compute:
|
| 404 |
+
|
| 405 |
+
Pr[object i has the same Color as object $j ] = \sigma \left( \frac { \langle u ^ { \mathrm { C o l o r } } ( o _ { i } ) , u ^ { \mathrm { C o l o r } } ( o _ { j } ) \rangle - \gamma } { \tau } \right) ,$
|
| 406 |
+
|
| 407 |
+
We can obtain a matrix AEClassify(Color) by applying this classifier on all pairs of objects, where AEClassifier $( \mathsf { C o l o r } ) _ { j , i }$ is the probability that the object $i$ and $j$ have the same Color.
|
| 408 |
+
|
| 409 |
+
Quasi-symbolic program execution. Finally, Table 9 summarizes the implementation of all operators. In practice, all probabilities are stored in the log space for better numeric stability.
|
| 410 |
+
|
| 411 |
+
# D OPTIMIZATION OF THE SEMANTIC PARSER
|
| 412 |
+
|
| 413 |
+
To tackle the optimization in a non-smooth program space, we apply an off-policy program search process (Sutton et al., 2000) to facilitate the learning of the semantic parser. Denote $\mathbb { P } ( s )$ as the set of all valid programs in the CLEVR DSL for the input question $s$ . We want to compute the gradient w.r.t. $\Theta _ { s }$ , the parameters of the semantic parser:
|
| 414 |
+
|
| 415 |
+
$$
|
| 416 |
+
\nabla _ { \Theta _ { s } } = \nabla _ { \Theta _ { s } } \mathbb { E } _ { P } [ r \cdot \log \mathrm { P r } [ P ] ] ,
|
| 417 |
+
$$
|
| 418 |
+
|
| 419 |
+
Table 9: All operations in the domain-specific language for CLEVR VQA. $\gamma _ { c } = 0 . 5$ and $\tau _ { c } = 0 . 2 5$ are constants for scaling and shift the probability. During inference, one can quantify all operations as Yi et al. (2018).
|
| 420 |
+
|
| 421 |
+
<table><tr><td>Signature</td><td>Implementation</td></tr><tr><td>Scene() →out: ObjectSet</td><td>outi :=1</td></tr><tr><td>Filter(in: ObjectSet,oc: ObjConcept) → out: ObjectSet</td><td>outi := min(ini,ObjClassify(oc)i)</td></tr><tr><td>Relate(in: Object,rc: RelConcept) → out:ObjectSet</td><td>outi :=∑;(inj · RelClassify(rc)j,i))</td></tr><tr><td>AERelate(in: Object, a: Attribute)→ out: ObjectSet</td><td>outi :=∑j(inj ·AEClassify(a)j,i))</td></tr><tr><td>Intersection(in(1):ObjectSet, in(2): ObjectSet) → out: ObjectSet</td><td>outi := min(in(1),in(2))</td></tr><tr><td>Union(in(1): ObjectSet,in(2): ObjectSet) → outi := max(in(1),in(2) out: ObjectSet</td><td></td></tr><tr><td>Query(in: Object, a: Attribute) → out: ObjConcept</td><td>ObjClassify(oc)i : bac Pr[out = oc] :=∑iini · ∑oc ObjClassify(oc') · ba</td></tr><tr><td>AEQuery(in(1): Object, in(2): Object, a: Attribute) →b: Bool</td><td>b:=∑∑,(in(1) .in2) .AEClassify(@))j))</td></tr><tr><td>Exist(in: ObjectSet) →b: Bool</td><td>b := maxi ini</td></tr><tr><td>Count(in: ObjectSet) →i: Integer</td><td>i:=∑ini</td></tr><tr><td>CLes sThan(in(1): ObjectSet, in(2): ObjectSet)→ b: Bool</td><td>b:=σ((∑in(2)-∑in(1)-1+γc)/Tc)</td></tr><tr><td>CGreaterThan(in(1): ObjectSet, in(2): ObjectSet) → b: Bool</td><td>b:=g((∑in(1)-∑in(2)-1+γc)/Tc)</td></tr><tr><td>CEqual(in(1): ObjectSet, in(2): ObjectSet)→b: Bool</td><td>b:=σ(-1∑in(1)-∑in(2)|+γc)/(γc:Te))</td></tr></table>
|
| 422 |
+
|
| 423 |
+
where $P \sim \mathrm { S e m a n t i c P a r s e } ( s ; \Theta _ { s } )$ . In REINFORCE, we approximate this gradient via Monte Carlo sampling.
|
| 424 |
+
|
| 425 |
+
An alternative solution is to exactly compute the gradient. Note that in the definition of the reward $r$ , only the set of programs $\mathbb { Q } ( s )$ leading to the correct answer will contribute to the gradient term. With the perception module fixed, the set $\mathbb { Q }$ can be efficiently determined by an off-policy exhaustive search of all possible programs $\mathbb { P } ( s )$ . In the third stage of the curriculum learning, we search for the set $\mathbb { Q }$ offline based on the quantified results of concept classification and compute the exact gradient $\nabla \Theta _ { s }$ . An intuitive explanation of the off-policy search is that, we enumerate all possible programs, execute them on the visual representation, and find the ones leading to the correct answer. We use $\mathbb { Q } ( s )$ as the “groundtruth” program annotation for the question, to supervise the learning, instead of running the Monte Carlo sampling-based REINFORCE.
|
| 426 |
+
|
| 427 |
+
Spurious program suppression. However, directly using $\mathbb { Q } ( s )$ as the supervision by computing $\begin{array} { r } { \ell = \sum _ { p \in \mathbb { Q } ( S ) } - \log \operatorname* { P r } ( p ) } \end{array}$ can be problematic, due to the spuriousness or the ambiguity of the programs. This comes from two aspects:
|
| 428 |
+
|
| 429 |
+
1) intrinsic ambiguity: two programs are different but equivalent. For example
|
| 430 |
+
|
| 431 |
+
P1: AEQuery(Color, Filter(Cube), Filter(Sphere)) and P2: Exist(Filter(Sphere, AERelate(Color, Filter(Cube))))
|
| 432 |
+
|
| 433 |
+
are equivalent.
|
| 434 |
+
|
| 435 |
+
2) extrinsic spuriousness: one of the program is incorrect, but also leads to the correct answer in a
|
| 436 |
+
|
| 437 |
+
specific scene. For example,
|
| 438 |
+
|
| 439 |
+
$$
|
| 440 |
+
\begin{array} { r l } & { \mathtt { P l } \colon \mathtt { F i } 1 \mathsf { t e r } \big ( \mathtt { R e d } , \mathtt { R e l } \mathsf { a t e } \big ( \mathtt { L e f t } , \mathtt { F i } 1 \mathsf { t e r } \big ( \mathtt { S p h e r e } \big ) \big ) \big ) } \\ & { \mathtt { P 2 } \colon \mathtt { F i } 1 \mathsf { t e r } \big ( \mathtt { R e d } , \mathtt { R e l } \mathsf { a t e } \big ( \mathtt { L e f t } , \mathtt { F i } 1 \mathsf { t e r } \big ( \mathtt { C u b e } \big ) \big ) \big ) } \end{array}
|
| 441 |
+
$$
|
| 442 |
+
|
| 443 |
+
may refer to the same red object in a specific scene. Motivated by the REINFORCE process, to suppress such spurious programs, we use the loss function:
|
| 444 |
+
|
| 445 |
+
$$
|
| 446 |
+
\ell = \sum _ { p \in \mathbb { Q } } \operatorname { s t o p - g r a d i e n t } ( \operatorname* { P r } [ p ] ) \cdot ( - \log \operatorname* { P r } [ p ] ) .
|
| 447 |
+
$$
|
| 448 |
+
|
| 449 |
+
The corresponding gradient $\nabla _ { \Theta _ { s } }$ is,
|
| 450 |
+
|
| 451 |
+
$$
|
| 452 |
+
\nabla \Theta _ { s } = \sum _ { p \in \Theta } \operatorname* { P r } [ p ] \cdot \nabla \Theta _ { s } \left( r \cdot \log \operatorname* { P r } [ P ] \right) = \nabla \Theta _ { s } \left( \sum _ { p \in \Theta } r \cdot \operatorname* { P r } [ p ] \right) .
|
| 453 |
+
$$
|
| 454 |
+
|
| 455 |
+
The key observation is that, given a sufficiently large set of scenes, a program can be identified as spurious if there exists at least one scene where the program leads to a wrong answer. As the training goes, spurious programs will get less update due to the sampling importance term $\mathrm { P r } [ p ]$ which weights the likelihood maximization term.
|
| 456 |
+
|
| 457 |
+
# E CURRICULUM LEARNING SETUP
|
| 458 |
+
|
| 459 |
+
During the whole training process, we gradually add more visual concepts and more complex question examples into the model. Summarized in Figure 4(A), in general, the whole training process is split into 3 stages. First, we only use questions from lesson 1 to let the model learn object-level visual concepts. Second, we train the model to parse simple questions and to learn relational concepts. In this step, we freeze the neural operators and concept embeddings of object-level concepts. Third, the model gets trained on the full question set (lesson 3), learning to understand questions of different complexities and various format. For the first several iterations in this step, we freeze the parameters in the perception modules. In addition, during the training of all stages, we gradually increase the number of objects in the scene: from 3 to 10.
|
| 460 |
+
|
| 461 |
+
We select questions for each lesson in the curriculum learning by their depth of the latent program layout. For eaxmple, the program “Query(Shape, Filter(Red, Scene))” has the depth of 3, while the program “Query(Shape, Filter(Cube, Relate(Left, Filter(Red, Scene))))” has the depth of 5. Since we have fused consecutive Filter operations into a single one, the maximum depth of all programs is 9 on the CLEVR dataset. We now present the detailed split of our curriculum learning lessons:
|
| 462 |
+
|
| 463 |
+
For lesson 1, we use only programs of depth 3. It contains three types of questions: querying an attribute of the object, querying the existence of a certain type of objects, count a certain type of objects, and querying if two objects have the same attribute (e.g., of the same color). These questions are almost about fundamental object-based visual concepts. For each image, we generate 5 questions of lesson 1.
|
| 464 |
+
|
| 465 |
+
For lesson 2, we use programs of depth less than 5, containing a number of questions regarding relations, such as querying the attribute of an object that is left of another object. We found that in the original CLEVR dataset, all Relate operations are followed by a Filter operation. This setup degenerates the performance of the learning of relational concepts such as Left. Thus, we add a new question template into the original template set: Count(Relate( · , Filter( · Scene))) (e.g., “What’s the number of objects that are left of the cube?”). For each image, we generate 5 questions of lesson 2.
|
| 466 |
+
|
| 467 |
+
For lesson 3, we use the full CLEVR question set.
|
| 468 |
+
|
| 469 |
+
Curriculum learning is crucial for the learning of our neuro-symbolic concept learner. We found that by removing the curriculum setup w.r.t. the number of object in the scenes, the visual perception module will get stuck at an accuracy that is similar to a random-guess model, even if we only use stage-1 questions. If we remove the curriculum setup w.r.t. the complexity of the programs, the joint training of the visual perception module and the semantic parser can not converge.
|
| 470 |
+
|
| 471 |
+
# F ABLATION STUDY
|
| 472 |
+
|
| 473 |
+
We conduct ablation studies on the accuracy of semantic parsing, the impacts of the ImageNet pretraining of visual perception modules, the data efficiency of our model, and the usage of object-based representations.
|
| 474 |
+
|
| 475 |
+
# F.1 SEMANTIC PARSING ACCURACY.
|
| 476 |
+
|
| 477 |
+
We evaluate how well our model recovers the underlying programs of questions. Due to the intrinsic equivalence of different programs, we evaluate the accuracy of programs by executing them on the ground-truth annotations of objects. Invalid or ambiguous programs are also considered as incorrect. Our semantic parser archives $> 9 9 . 9 \%$ QA accuracy on the validation split.
|
| 478 |
+
|
| 479 |
+
# F.2 IMPACTS OF THE IMAGENET PRE-TRAINING.
|
| 480 |
+
|
| 481 |
+
The only extra supervision of the visual perception module comes from the pre-training of the perception modules on ImageNet (Deng et al., 2009). To quantify the influence of this pre-training, we conduct ablation experiments where we randomly initialize the perception module following He et al. (2015). The classification accuracies of the learned concepts almost remain the same except for Shape. The classification accuracy of Shape drops from 98.7 to 97.5 on the validation set while the overall QA accuracy on the CLEVR dataset drops to 98.2 from 98.9. We speculate that large-scale image recognition dataset can provide prior knowledge of shape.
|
| 482 |
+
|
| 483 |
+
# F.3 DATA EFFICIENCY AND OBJECT-BASED REPRESENTATIONS
|
| 484 |
+
|
| 485 |
+
In this section, we study whether and how the number of training samples and feature representations affect the overall performance of various models on the CLEVR dataset. Specifically, we compare the proposed NS-CL against two strong baselines: TbD (Mascharka et al., 2018) and MAC (Hudson & Manning, 2018).
|
| 486 |
+
|
| 487 |
+
Baselines. For comparison, we implement two variants of the baseline models: TbD-Object and MAC-Object. Inspired by Anderson et al. (2018), instead of using a 2D convolutional feature map, TbD-Object and MAC-Object take a stack of object features as inputs, whose shape is $k \times d _ { o b j }$ . $k$ is the number of objects in the scene, and $d _ { o b j }$ is the feature dimension for a single object. In our experiments, we fix $k = 1 2$ as a constant value. If there are fewer than 12 objects in the scene, we add “null” objects whose features are all-zero vectors.
|
| 488 |
+
|
| 489 |
+
We extract object features in the same way as NS-CL. Features are extracted from a pre-trained ResNet-34 network before the last residual block for a feature map with high resolution. For each object, its feature is composed of two parts: region-based (by RoI Align) and image-based features. We concatenate them to represent each object. As discussed, the inclusion of the representation of the full scene is essential for the inference of relative attributes such as size or spatial position on the CLEVR domain.
|
| 490 |
+
|
| 491 |
+
TbD and MAC networks are originally designed to use image-level attention for reasoning. Thus, we implement two more baselines: TbD-Mask and MAC-Mask. Specifically, we replace the original attention module on images with a mask-guided attention. Denotes the union of all object masks as $M$ . Before the model applies the attention on the input image, we multiply the original attention map computed by the model with this mask $M$ . The multiplication silences the attention on pixels that are not part of any objects.
|
| 492 |
+
|
| 493 |
+
Results. Table 3 summarizes the results. We found that TbD-Object and MAC-Object approach show inferior results compared with the original model. We attribute this to the design of the network architectures. Take the Relate operation (e.g., finds all objects left of a specific object $x$ ) as an example. TbD uses a stack of dilated convolutional layers to propagate the attention from object $x$ to others. In TbD-Object, we replace the stack of 2D convolutions by several 1D convolution layers, operating over the $k \times d _ { o b j }$ object features. This ignores the equivalence of objects (the order of objects should not affect the results). In contrast, MAC networks always use the attention mechanism to extract information from the image representation. This operation is invariant to the order of objects, but is not suitable for handling quantities (e.g., counting objects).
|
| 494 |
+
|
| 495 |
+
As for TbD-Mask and MAC-Mask, although the mask-guided attention does not improve the overall performance, we have observed noticeably faster convergence during model training. TbD-Mask and MAC-Mask leverage the prior knowledge of object masks to facilitate the attention. Such prior has also been verified to be effective in the original TbD model: TbD employs an attention regularization during training, which encourages the model to attend to smaller regions.
|
| 496 |
+
|
| 497 |
+
In general, NS-CL is more data-efficient than MAC networks and TbD. Recall that NS-CL answers questions by executing symbolic programs on the learned visual concepts. Only visual concepts (such as Red and Left) and the interpretation of questions (how to translate questions into executable programs) need to be learned from data. In contrast, both TbD and MAC networks need to additionally learn to execute (implicit or explicit) programs such as counting.
|
| 498 |
+
|
| 499 |
+
For the experiments on the full CLEVR training set, we split 3,500 images $5 \%$ of the training data) as the hold-out validation set to tune the hyperparameters and select the best model. We then apply this model to the CLEVR validation split and report the testing performance. Our model reaches an accuracy of $9 9 . 2 \%$ using the CLEVR training set.
|
| 500 |
+
|
| 501 |
+
# G EXTENDING TO OTHER SCENE AND LANGUAGE DOMAINS
|
| 502 |
+
|
| 503 |
+
# G.1 MINECRAFT DATASET
|
| 504 |
+
|
| 505 |
+
We also extend the experiments to a new reasoning testbed: Minecraft worlds (Yi et al., 2018).
|
| 506 |
+
The Minecraft reasoning dataset differs from CLEVR in both visual appearance and question types.
|
| 507 |
+
Figure 9 gives an example instance from the dataset.
|
| 508 |
+
Q: What direction is the closest creature facing?
|
| 509 |
+
A: Left.
|
| 510 |
+
P: Query(Direction, FilterMost(Closest, Filter(Creature) ))
|
| 511 |
+
|
| 512 |
+

|
| 513 |
+
|
| 514 |
+
Figure 9: An example image and a related question-answering pair from the Minecraft dataset.
|
| 515 |
+
|
| 516 |
+
Setup. Following Yi et al. (2018), we generate 10,000 Minecraft scenes using the officially opensourced tools by Wu et al. (2017). Each image contains 3 to 6 objects. The objects are chosen from 12 categories, with 4 different facing directions (front, back, left and right). They stand on a 2D plane.
|
| 517 |
+
|
| 518 |
+
Besides different 3D visual appearance and image contexts, the Minecraft reasoning dataset introduces two new types of reasoning operations. We add them to our domain-specific language:
|
| 519 |
+
|
| 520 |
+
1. FilterMost(ObjectSet, Concept) ObjectSet: Given a set of objects, finds the “most” one. For example, FilterMost(Closest, set) locates the object in the input set that is cloest to the camera (e.g., what is the direction of the closest animal?) 2. BelongTo(Object, ObjectSet) Bool: Query if the input object belongs to a set.
|
| 521 |
+
|
| 522 |
+
Results. Table 10 summarizes the results and Figure 12 shows sample execution traces. We compare our method against the NS-VQA baseline (Yi et al., 2018), which uses strong supervision for both scene representation (e.g., object categories and positions) and program traces. In contrast, our method learns both by looking at images and reading question-answering pairs. NS-CL outperforms NS-VQA by $5 \%$ in overall accuracy. We attribute the inferior results of NS-VQA to its derendering module. Because objects in the Minecraft world usually occlude with each other, the detected object bounding boxes are inevitably noisy. During the training of the derendering module, each detected bounding box is matched with one of the ground-truth bounding boxes and uses its class and pose as supervision. Poorly localized bounding boxes lead to noisy labels and hurt the accuracy of the derendering module. This further influences the overall performance of NS-VQA.
|
| 523 |
+
|
| 524 |
+
<table><tr><td>Model</td><td>Overall</td><td>Count</td><td>Exist</td><td>Belong</td><td>Query</td></tr><tr><td>NS-VQA</td><td>87.7</td><td>83.3</td><td>91.5</td><td>91.1</td><td>86.4</td></tr><tr><td>NS-CL</td><td>93.3</td><td>91.3</td><td>95.6</td><td>93.9</td><td>94.3</td></tr></table>
|
| 525 |
+
|
| 526 |
+
Table 10: Our model achieves comparable results on the Minecraft dataset with baselines trained by full program annotations.
|
| 527 |
+
|
| 528 |
+
# G.2 VQS DATASET
|
| 529 |
+
|
| 530 |
+
We conduct experiments on the VQS dataset (Gan et al., 2017). VQS is a subset of the VQA 1.0 dataset (Antol et al., 2015). It contains questions that can be visually grounded: each question is associated with multiple image regions, annotated by humans as necessary for answering the question.
|
| 531 |
+
|
| 532 |
+
Q: Does this man have any pens on him?
|
| 533 |
+
|
| 534 |
+
A: Yes.
|
| 535 |
+
P: Exist(Filter(Man, Relate(Have, Filter(Pen)) ))
|
| 536 |
+
|
| 537 |
+

|
| 538 |
+
Figure 10: An example image from the VQS dataset. The orange bounding boxes are object proposals. On the right, we show the original question and answer in natural language, as well as the latent program recovered by our parser. To answer this question, models are expected to attend to the man and his pen in the pocket.
|
| 539 |
+
|
| 540 |
+
Setup. All models are trained on the first 63,509 images of the training set, and tested on the test split. For hyper-parameter tuning and model selection, the rest 5,000 images from the training set are used for validation. We use the multiple-choice setup for VQA: the models choose their most confident answer from 18 candidate answers for each question.
|
| 541 |
+
|
| 542 |
+
To obtain the latent programs from natural languages, we use a pre-trained syntactic dependency parser (Andreas et al., 2016; Schuster et al., 2015) for extracting programs and concepts that need to be learned. A sample question and the program obtained by our parser is shown in Figure 10. The concept embeddings are initialized by the bag of words (BoW) over the GloVe word embeddings (Pennington et al., 2014).
|
| 543 |
+
|
| 544 |
+
Baselines. We compare our model against two representative baselines: MLP (Jabri et al., 2016) and MAC (Hudson & Manning, 2018).
|
| 545 |
+
|
| 546 |
+
MLP is a standard baseline for visual-question answering, which treats the multiple-choice task as a ranking problem. For a specific candidate answer, a multi-layer perceptron (MLP) model is used to encode a tuple of the image, the question, and the candidate answer. The MLP outputs a score for each tuple, and the answer to the question is the candidate with the highest score. We encode the image with a ResNet-34 pre-trained on ImageNet and use BoW over the GloVe word embeddings for the question and option encoding.
|
| 547 |
+
|
| 548 |
+
We slightly modify the MAC network for the VQS dataset. For each candidate answer, we concatenate the question and the answer as the input to the model. The MAC model outputs a score from 0 to 1 and the answer to the question is the candidate with the highest score. The image features are extracted from the same ResNet-34 model.
|
| 549 |
+
|
| 550 |
+
Results. Table 7 summarizes the results. NS-CL achieves comparable results with the MLP baseline and the MAC network designed for visual reasoning. Our model also brings transparent reasoning over natural images and language. Example execution traces generated by NS-CL are shown in Figure 13. Besides, the symbolic reasoning process helps us to inspect the model and diagnose the error sources. See the caption for details.
|
| 551 |
+
|
| 552 |
+
# H VISUALIZATION OF EXECUTION TRACES AND VISUAL CONCEPTS
|
| 553 |
+
|
| 554 |
+
Another appealing benefit is that our reasoning model enjoys full interpretability. Figure 11, Figure 12, and Figure 13 show NS-CL’s execution traces on CLEVR, Minecraft, and VQS, respectively. As a side product, our system detects ambiguous and invalid programs and throws out exceptions. As an example (Figure 11), the question “What’s the color of the cylinder?” can be ambiguous if there are multiple cylinders or even invalid if there are no cylinders.
|
| 555 |
+
|
| 556 |
+
Figure 14 and Figure 15 include qualitative visualizations of the concepts learned from the CLEVR and Minecraft datasets, including object categories, attributes, and relations. We choose samples from the validation or test split of each dataset by generating queries of the corresponding concepts. We set a threshold to filter the returned images and objects. For quantitative evaluations of the learned concepts on the CLEVR dataset, please refer to Table 2 and Table 5.
|
| 557 |
+
|
| 558 |
+

|
| 559 |
+
Figure 11: Visualization of the execution trace generated by our Neuro-Symbolic Concept Learner on the CLEVR dataset. Example A and B are successful executions that generate correct answers. In example C, the execution aborts at the first operator. To inspect the reason why the execution engine fails to find the corresponding object, we can read out the visual representation of the object, and locate the error source as the misclassification of the object material. Example D shows how our symbolic execution engine can detect invalid or ambiguous programs during the execution by performing sanity checks.
|
| 560 |
+
|
| 561 |
+

|
| 562 |
+
Figure 12: Exemplar execution trace generated by our Neuro-Symbolic Concept Learner on the Minecraft reasoning dataset. Example A, B and C are successful execution. Example C demonstrates the semantics of the FilterMost operation. Example D shows a failure case: the detection model fails to detect a pig hiding behind the big tree.
|
| 563 |
+
|
| 564 |
+

|
| 565 |
+
Figure 13: Illustrative execution trace generated by our Neuro-Symbolic Concept Learner on the VQS dataset. Execution traces A and B shown in the figure leads to the correct answer to the question. Our model effectively learns visual concepts from data. The symbolic reasoning process brings transparent execution trace and can easily handle quantities (e.g., object counting in Example A). In Example C, although NS-CL answers the question correctly, it locates the wrong object during reasoning: a dish instead of the cake. In Example D, our model misclassifies the sport as frisbee.
|
| 566 |
+
|
| 567 |
+

|
| 568 |
+
Concept: Cylinder
|
| 569 |
+
Figure 14: Concepts learned on the CLEVR dataset.
|
| 570 |
+
|
| 571 |
+

|
| 572 |
+
Figure 15: Concepts learned on the Minecraft dataset.
|
md/train/rJlDnoA5Y7/rJlDnoA5Y7.md
ADDED
|
@@ -0,0 +1,331 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# VON MISES-FISHER LOSS FOR TRAINING SEQUENCE TO SEQUENCE MODELS WITH CONTINUOUS OUTPUTS
|
| 2 |
+
|
| 3 |
+
Sachin Kumar & Yulia Tsvetkov Language Technologies Institute Carnegie Mellon University {sachink,ytsvetko}@cs.cmu.edu
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
The Softmax function is used in the final layer of nearly all existing sequence-tosequence models for language generation. However, it is usually the slowest layer to compute which limits the vocabulary size to a subset of most frequent types; and it has a large memory footprint. We propose a general technique for replacing the softmax layer with a continuous embedding layer. Our primary innovations are a novel probabilistic loss, and a training and inference procedure in which we generate a probability distribution over pre-trained word embeddings, instead of a multinomial distribution over the vocabulary obtained via softmax. We evaluate this new class of sequence-to-sequence models with continuous outputs on the task of neural machine translation. We show that our models train up to $2 . 5 \mathrm { x }$ faster than the state-of-the-art models while achieving comparable translation quality. These models are capable of handling very large vocabularies without compromising on translation quality or speed. They also produce more meaningful errors than the softmax-based models, as these errors typically lie in a subspace of the vector space of the reference translations1.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Due to the power law distribution of word frequencies, rare words are extremely common in any language (Zipf, 1935). Yet, the majority of language generation tasks—including machine translation (Sutskever et al., 2014; Bahdanau et al., 2014; Luong et al., 2015), summarization (Rush et al., 2015; See et al., 2017; Paulus et al., 2018), dialogue generation (Vinyals & Le, 2015), question answering (Yin et al., 2015), speech recognition (Graves et al., 2013; Xiong et al., 2017), and others—generate words by sampling from a multinomial distribution over a closed output vocabulary. This is done by computing scores for each candidate word and normalizing them to probabilities using a softmax layer.
|
| 12 |
+
|
| 13 |
+
Since softmax is computationally expensive, current systems limit their output vocabulary to a few tens of thousands of most frequent words, sacrificing linguistic diversity by replacing the long tail of rare words by the unknown word token, $\langle { \mathrm { u n k } } \rangle$ . Unsurprisingly, at test time this leads to an inferior performance when generating rare or out-of-vocabulary words. Despite the fixed output vocabulary, softmax is computationally the slowest layer. Moreover, its computation follows a large matrix multiplication to compute scores over the candidate words; this makes softmax expensive in terms of memory requirements and the number of parameters to learn (Mnih & Kavukcuoglu, 2013; Morin & Bengio, 2005; de Brebisson & Vincent, 2016). Several alternatives have been proposed for alle- ´ viating these problems, including sampling-based approximations of the softmax function (Bengio & Senecal, 2003; Mnih & Kavukcuoglu, 2013), approaches proposing a hierarchical structure of the softmax layer (Morin & Bengio, 2005; Chen et al., 2016), and changing the vocabulary to frequent subword units, thereby reducing the vocabulary size (Sennrich et al., 2016).
|
| 14 |
+
|
| 15 |
+
We propose a novel technique to generate low-dimensional continuous word representations, or word embeddings (Mikolov et al., 2013; Pennington et al., 2014; Bojanowski et al., 2017) instead of a probability distribution over the vocabulary at each output step. We train sequence-to-sequence models with continuous outputs by minimizing the distance between the output vector and the pretrained word embedding of the reference word. At test time, the model generates a vector and then searches for its nearest neighbor in the target embedding space to generate the corresponding word. This general architecture can in principle be used for any language generation (or any recurrent regression) task. In this work, we experiment with neural machine translation, implemented using recurrent sequence-to-sequence models (Sutskever et al., 2014) with attention (Bahdanau et al., 2014; Luong et al., 2015).
|
| 16 |
+
|
| 17 |
+
To the best of our knowledge, this is the first work that uses word embeddings—rather than the softmax layer—as outputs in language generation tasks. While this idea is simple and intuitive, in practice, it does not yield competitive performance with standard regression losses like $\ell _ { 2 }$ . This is because $\ell _ { 2 }$ loss implicitly assumes a Gaussian distribution of the output space which is likely false for embeddings. In order to correctly predict the outputs corresponding to new inputs, we must model the correct probability distribution of the target vector conditioned on the input (Bishop, 1994). A major contribution of this work is a new loss function based on defining such a probability distribution over the word embedding space and minimizing its negative log likelihood (§3).
|
| 18 |
+
|
| 19 |
+
We evaluate our proposed model with the new loss function on the task of machine translation, including on datasets with huge vocabulary sizes, in two language pairs, and in two data domains (§4). In $\ S 5$ we show that our models can be trained up to $2 . 5 \mathrm { x }$ faster than softmax-based models while performing on par with state-of-the-art systems in terms of generation quality. Error analysis (§6) reveals that the models with continuous outputs are better at correctly generating rare words and make errors that are close to the reference texts in the embedding space and are often semantically-related to the reference translation.
|
| 20 |
+
|
| 21 |
+
# 2 BACKGROUND
|
| 22 |
+
|
| 23 |
+
Traditionally, all sequence to sequence language generation models use one-hot representations for each word in the output vocabulary $\nu$ . More formally, each word $w$ is represented as a unique vector ${ \mathbf o } ( w ) \in \{ 0 , 1 \} ^ { V }$ , where $V$ is the size of the output vocabulary and only one entry $i d ( w )$ (corresponding the word ID of $w$ in the vocabulary) in $\mathbf { o } ( w )$ is 1 and the rest are set to 0. The models produce a distribution $\mathbf { p } _ { t }$ over the output vocabulary at every step $t$ using the softmax function:
|
| 24 |
+
|
| 25 |
+
$$
|
| 26 |
+
\mathbf { p } _ { t } ( w ) = \frac { e ^ { s _ { w } } } { \sum _ { v \in \mathcal { V } } e ^ { s _ { v } } }
|
| 27 |
+
$$
|
| 28 |
+
|
| 29 |
+
where, $s _ { w } = W _ { h w } \mathbf { h } _ { t } + b _ { w }$ is the score of the word $w$ given the hidden state $\mathbf { h }$ produced by the LSTM cell (Hochreiter & Schmidhuber, 1997) at time step $t$ . $W \in \mathbb { R } ^ { V \times H }$ and $b \in \mathbb { R } ^ { v }$ are trainable parameters. $H$ is the size of the hidden layer $\mathbf { h }$ .
|
| 30 |
+
|
| 31 |
+
These parameters are trained by minimizing the negative log-likelihood (aka cross-entropy) of this distribution by treating $\mathbf { o } ( w )$ as the target distribution. The loss function is defined as follows:
|
| 32 |
+
|
| 33 |
+
$$
|
| 34 |
+
\mathrm { N L L } ( \mathbf { p _ { t } } , \mathbf { o } ( w ) ) = - \log ( \mathbf { p _ { t } } ( w ) )
|
| 35 |
+
$$
|
| 36 |
+
|
| 37 |
+
This loss computation involves a normalization proportional to the size of the output vocabulary $V$ . This becomes a bottleneck in natural language generation tasks where the vocabulary size is typically tens of thousands of words. We propose to address this bottleneck by representing words as continuous word vectors instead of one-hot representations and introducing a novel probabilistic loss to train these models as described in §3.2 Here, we briefly summarize prior work that aimed at alleviating the sofmax bottleneck problem.
|
| 38 |
+
|
| 39 |
+
We briefly summarize existing modifications to the sofmax layer, capitalizing on conceptually different approaches.
|
| 40 |
+
|
| 41 |
+
Sampling-Based Approximations Sampling-based approaches completely do away with computing the normalization term of softmax by considering only a small subset of possible outputs. These include approximations like Importance Sampling (Bengio & Senecal, 2003), Noise Constrastive Estimation (Mnih & Kavukcuoglu, 2013), Negative Sampling (Mikolov et al., 2013), and Blackout (Ji et al., 2015). These alternatives significantly speed-up training time but degrade generation quality.
|
| 42 |
+
|
| 43 |
+
Structural Approximations Morin & Bengio (2005) replace the flat softmax layer with a hierarchical layer in the form of a binary tree where words are at the leaves. This alleviates the problem of expensive normalization, but these gains are only obtained at training time. At test time, the hierarchical approximations lead to a drop in performance compared to softmax both in time efficiency and in accuracy. Chen et al. (2016) propose to divide the vocabulary into clusters based on their frequencies. Each word is produced by a different part of the hidden layer making the output embedding matrix much sparser. This leads to performance improvement both in training and decoding. However, it assigns fewer parameters to rare words which leads to inferior performance in predicting them (Ruder, 2017).
|
| 44 |
+
|
| 45 |
+
Self Normalization Approaches Andreas et al. (2015); Devlin et al. (2014) add additional terms to the training loss which makes the normalization factor close to 1, obviating the need to explicitly normalize. The evaluation of certain words can be done much faster than in softmax based models which is extremely useful for tasks like language modeling. However, for generation tasks, it is necessary to ensure that the normalization factor is exactly 1 which might not always be the case, and thus it might require explicit normalization.
|
| 46 |
+
|
| 47 |
+
Subword-Based Methods Jozefowicz et al. (2016) introduce character-based methods to reduce vocabulary size. While character-based models lead to significant decrease in vocabulary size, they often differentiate poorly between similarly spelled words with different meanings. Sennrich et al. (2016) find a middle ground between characters and words based on sub-word units obtained using Byte Pair Encoding (BPE). Despite its limitations (Oda et al., 2017), BPE achieves good performance while also making the model truly open vocabulary. BPE is the state-of-the art approach currently used in machine translation. We thus use this as a baseline in our experiments.
|
| 48 |
+
|
| 49 |
+
# 3 LANGUAGE GENERATION WITH CONTINUOUS OUTPUTS
|
| 50 |
+
|
| 51 |
+
In our proposed model, each word type in the output vocabulary is represented by a continuous vector $\mathbf { e } ( w ) \in \mathbb { R } ^ { m }$ where $m \ll V$ . This representation can be obtained by training a word embedding model on a large monolingual corpus (Mikolov et al., 2013; Pennington et al., 2014; Bojanowski et al., 2017).
|
| 52 |
+
|
| 53 |
+
At each generation step, the decoder of our model produces a continuous vector $\hat { \mathbf { e } } \in \mathbb { R } ^ { m }$ . The output word is then predicted by searching for the nearest neighbor of ˆe in the embedding space:
|
| 54 |
+
|
| 55 |
+
$$
|
| 56 |
+
w _ { \mathrm { p r e d i c t e d } } = \underset { w } { \operatorname { a r g m i n } } \{ d ( \hat { \mathbf { e } } , \mathbf { e } ( w ) ) | w \in \mathcal { V } \}
|
| 57 |
+
$$
|
| 58 |
+
|
| 59 |
+
where $\nu$ is the output vocabulary, $d$ is a distance function. In other words, the embedding space could be considered to be quantized into $V$ components and the generated continuous vector is mapped to a word based on the quanta in which it lies. The mapped word is then passed to the next step of the decoder (Gray, 1990). While training this model, we know the target vector $\mathbf { e } ( w )$ , and minimize its distance from the output vector ˆe. With this formulation, our model is directly trained to optimize towards the information encoded by the embeddings. For example, if the embeddings are primarily semantic, as in Mikolov et al. (2013) or Bojanowski et al. (2017), the model would tend to output words in a semantic space, that is produced words would either be correct or close synonyms (which we see in our analysis in $\ S 6$ ), or if we use synactico-semantic embeddings (Levy & Goldberg, 2014; Ling et al., 2015), we might be able to also control for syntatic forms.
|
| 60 |
+
|
| 61 |
+
We propose a novel probabilistic loss function—a probabilistic variant of cosine loss—which gives a theoretically grounded regression loss for sequence generation and addresses the limitations of existing empirical losses (described in $\ S 4 . 2 )$ . Cosine loss measures the closeness between vector directions. A natural choice for estimating directional distributions is von Mises-Fisher (vMF) defined over a hypersphere of unit norm. That is, a vector close to the mean direction will have high probability. VMF is considered the directional equivalent of Gaussian distribution 3. Given a target word $w$ , its density function is given as follows:
|
| 62 |
+
|
| 63 |
+
$$
|
| 64 |
+
p ( \mathbf { e } ( w ) ; \pmb { \mu } , \kappa ) = C _ { m } ( \kappa ) e ^ { \kappa \pmb { \mu } ^ { T } \mathbf { e } ( w ) } ,
|
| 65 |
+
$$
|
| 66 |
+
|
| 67 |
+
where $\pmb { \mu }$ and $\mathbf { e } ( w )$ are vectors of dimension $m$ with unit norm, $\kappa$ is a positive scalar, also called the concentration parameter. $\kappa = 0$ defines a uniform distribution over the hypersphere and $\kappa = \infty$ defines a point distribution at $\pmb { \mu }$ . $C _ { m } ( \kappa )$ is the normalization term:
|
| 68 |
+
|
| 69 |
+
$$
|
| 70 |
+
C _ { m } ( \kappa ) = \frac { \kappa ^ { m / 2 - 1 } } { ( 2 \pi ) ^ { m / 2 } I _ { m / 2 - 1 } ( \kappa ) } ,
|
| 71 |
+
$$
|
| 72 |
+
|
| 73 |
+
where $I _ { v }$ is called modified Bessel function of the first kind of order $v$ . The output of the model at each step is a vector $\hat { \mathbf { e } }$ of dimension $m$ . We use $\kappa = \| \hat { \mathbf e } \|$ . Thus the density function becomes:
|
| 74 |
+
|
| 75 |
+
$$
|
| 76 |
+
p ( \mathbf { e } ( w ) ; \hat { \mathbf { e } } ) = \mathrm { v M F } ( \mathbf { e } ( w ) ; \hat { \mathbf { e } } ) = C _ { m } ( \| \hat { \mathbf { e } } \| ) e ^ { \hat { \mathbf { e } } ^ { T } \mathbf { e } ( w ) }
|
| 77 |
+
$$
|
| 78 |
+
|
| 79 |
+
It is noteworthy that equation 2 is very similar to softmax computation (except that $\mathbf { e } ( \mathbf { w } )$ is a unit vector), the main difference being that normalization is not done by summing over the vocabulary, which makes it much faster than the softmax computation. More details about it’s computation are given in the appendix.
|
| 80 |
+
|
| 81 |
+
he negative log-likelihood of the vMF distribution, which at each output step is given by:
|
| 82 |
+
|
| 83 |
+
$$
|
| 84 |
+
\mathrm { N L L v M F } ( \hat { \mathbf { e } } ; \mathbf { e } ( w ) ) = - \log \left( C _ { m } ( \| \hat { \mathbf { e } } \| ) \right) - \hat { \mathbf { e } } ^ { T } \mathbf { e } ( w )
|
| 85 |
+
$$
|
| 86 |
+
|
| 87 |
+
Regularization of NLLvMF In practice, we observe that the NLLvMF loss puts too much weight on increasing $\lVert \hat { \mathbf e } \rVert$ , making the second term in the loss function decrease rapidly without significant decrease in the cosine distance. To account for this, we add a regularization term. We experiment with two variants of regularization.
|
| 88 |
+
|
| 89 |
+
$\mathrm { N L L v M F _ { r e g 1 } }$ : We add $\lambda _ { 1 } \lVert \hat { \mathbf e } \rVert$ to the loss function, where $\lambda _ { 1 }$ is a scalar hyperparameter.4 This makes intuitive sense in that the length of the output vector should not increase too much. The regularized loss function is as follows:
|
| 90 |
+
|
| 91 |
+
$$
|
| 92 |
+
\mathrm { N L I v M F } _ { \mathrm { r e g _ { 1 } } } ( \hat { \mathbf { e } } ) = - \log C _ { m } ( \| \hat { \mathbf { e } } \| ) - \hat { \mathbf { e } } ^ { T } \mathbf { e } ( w ) + \lambda _ { 1 } \| \hat { \mathbf { e } } \|
|
| 93 |
+
$$
|
| 94 |
+
|
| 95 |
+
NLLvMF $\mathrm { r e g 2 }$ : We modify the previous loss function as follows:
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
\mathrm { N L L v M F } _ { \mathrm { r e g _ { 2 } } } ( \hat { \mathbf { e } } ) = - \log C _ { m } ( \Vert \hat { \mathbf { e } } \Vert ) - \lambda _ { 2 } \hat { \mathbf { e } } ^ { T } \mathbf { e } ( w )
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
$- \log C _ { m } ( \| \hat { \mathbf { e } } \| )$ decreases slowly as $\lVert \hat { \mathbf e } \rVert$ increases as compared the second term. Adding a $\lambda _ { 2 } < 1$ the second term controls for how fast it can decrease.5
|
| 102 |
+
|
| 103 |
+
# 4 EXPERIMENTS
|
| 104 |
+
|
| 105 |
+
# 4.1 EXPERIMENTAL SETUPS
|
| 106 |
+
|
| 107 |
+
We modify the standard seq2seq models in OpenNMT6 in PyTorch7 (Klein et al., 2017) to implement the architecture described in $\ S 3$ . This model has a bidirectional LSTM encoder with an attentionbased decoder (Luong et al., 2015). The encoder has one layer whereas the decoder has 2 layers of size 1024 with the input word embedding size of 512. For the baseline systems, the output at each decoder step multiplies a weight matrix $( H \times V )$ followed by softmax. This model is trained until convergence on the validation perplexity. For our proposed models, we replace the softmax layer with the continuous output layer $( H \times m )$ where the outputs are $m$ dimensional. We empirically choose $m = 3 0 0$ for all our experiments. Additional hyperparameter settings can be found in the appendix. These models are trained until convergence on the validation loss. Out of vocabulary words are mapped to an $\langle { \mathrm { u n k } } \rangle$ token8. We assign $\langle { \mathrm { u n k } } \rangle$ an embedding equal to the average of embeddings of all the words which are not present in the target vocabulary of the training set but are present in vocabulary on which the word embeddings are trained. Following Denkowski & Neubig (2017), after decoding a post-processing step replaces the $\langle { \mathrm { u n k } } \rangle$ token using a dictionary look-up of the word with highest attention score. If the word does not exist in the dictionary, we back off to copying the source word itself. Bilingual dictionaries are automatically extracted from our parallel training corpus using word alignment (Dyer et al., 2013)9. We evaluate all the models on the test data using the BLEU score (Papineni et al., 2002).
|
| 108 |
+
|
| 109 |
+
We evaluate our systems on standard machine translation datasets from IWSLT’16 (Cettolo et al., 2016), on two target languages, English: German English, French English and a morphologically richer language French: English French. The training sets for each of the language pairs contain around 220,000 parallel sentences. We use TED Test $2 0 1 3 + 2 0 1 4$ (2,300 sentence pairs) as developments sets and TED Test $2 0 1 5 \substack { + 2 0 1 6 }$ (2,200 sentence pairs) as test sets respectively for all the language pairs. All mentioned setups have a total vocabulary size of around 55,000 in the target language of which we choose top 50,000 words by frequency as the target vocabulary10.
|
| 110 |
+
|
| 111 |
+
We also experiment with a much larger WMT’16 German English (Bojar et al., 2016) task whose training set contains around 4.5M sentence pairs with the target vocabulary size of around 800,000. We use newstest2015 and newstest2016 as development and test data respectively. Since with continuous outputs we do not need to perform a time consuming softmax computation, we can train the proposed model with very large target vocabulary without any change in training time per batch. We perform this experiment with WMT’16 de–en dataset with a target vocabulary size of 300,000 (basically all the words in the target vocabulary for which we had trained embeddings). But to able to produce these words, the source vocabulary also needs to be increased to have their translations in the inputs, which would lead to a huge increase in the number of trainable parameters. Instead, we use sub-words computed using BPE as source vocabulary. We use 100,000 merge operations to compute the source vocabulary as we observe using a smaller number leads to too small (and less meaningful) sub-word units which are difficult to align with target words.
|
| 112 |
+
|
| 113 |
+
Both of these datasets contain examples from vastly different domains, while IWSLT’16 contains less formal spoken language, WMT’16 contains data primarily from news.
|
| 114 |
+
|
| 115 |
+
We train target word embeddings for English and French on corpora constructed using WMT’16 (Bojar et al., 2016) monolingual datasets containing data from Europarl, News Commentary, News Crawl from 2007 to 2015 and News Discussion (everything except Common Crawl due to its large memory requirements). These corpora consist of $\mathrm { 4 B + }$ tokens for English and $^ { 2 \mathrm { B } + }$ tokens for French. We experiment with two embedding models: word2vec Mikolov et al. (2013) and fasttext Bojanowski et al. (2017) which were trained using the hyper-parameters recommended by the authors.
|
| 116 |
+
|
| 117 |
+
# 4.2 EMPIRICAL LOSS FUNCTIONS
|
| 118 |
+
|
| 119 |
+
We compare our proposed loss function with standard loss functions used in multivariate regression.
|
| 120 |
+
|
| 121 |
+
Squared Error $( \ell _ { 2 } )$ is the most common distance function used when the model outputs are continuous (Lehmann & Casella, 1998). For each target word $w$ , it is given as $\mathcal { L } _ { \ell _ { 2 } } = \| \hat { \mathbf e } - \mathbf e ( w ) \| ^ { 2 }$
|
| 122 |
+
|
| 123 |
+
$\ell _ { 2 }$ penalizes large errors more strongly and therefore is sensitive to outliers. To avoid this we use a square rooted version of $\ell _ { 2 }$ loss. But it has been argued that there is a mismatch between the objective function used to learn word representations (maximum likelihood based on inner product), the distance measure for word vectors (cosine similarity), and $\ell _ { 2 }$ distance as the objective function to learn transformations of word vectors (Xing et al., 2015). This argument prompts us to look at cosine loss.
|
| 124 |
+
|
| 125 |
+
Cosine Loss is given as $\begin{array} { r } { \mathcal { L } _ { \mathrm { c o s i n e } } = 1 - \frac { \hat { \mathbf { e } } ^ { T } \mathbf { e } ( w ) } { \lVert \hat { \mathbf { e } } \rVert . \lVert \mathbf { e } ( w ) \rVert } } \end{array}$ . This loss minimizes the distance between the directions of output and target vectors while disregarding their magnitudes. The target embedding space in this case becomes a set of points on a hypersphere of dimension $m$ with unit radius.
|
| 126 |
+
|
| 127 |
+
Max Margin Loss Lazaridou et al. (2015) argue that using pairwise losses like $\ell _ { 2 }$ or cosine distance for learning vectors in high dimensional spaces leads to hubness: word vectors of a subset of words appear as nearest neighbors of many points in the output vector space. To alleviate this, we experiment with a margin-based ranking loss (which has been shown to reduce hubness) to train the model to rank the word vector prediction $\hat { \mathbf { e } }$ for target vector $\mathbf { e } ( w )$ higher than any other word vector $\mathbf { e } ( w ^ { \prime } )$ in the embedding space. $\begin{array} { r } { \mathcal { L } _ { \mathrm { m m } } = \sum _ { w ^ { \prime } \in \mathcal { V } , w ^ { \prime } \neq w } \operatorname* { m a x } \{ \bar { 0 } , \bar { \gamma } + \mathrm { \bar { ~ } c o s } ( \hat { \mathbf { e } } , \mathbf { e } ( w ^ { \prime } ) ) - \cos ( \hat { \mathbf { e } } , \mathbf { e } ( w ) ) \} } \end{array}$ where, $\gamma$ is a hyperparameter11 representing the margin and $w ^ { \prime }$ denotes negative examples. We use only one informative negative example as described in Lazaridou et al. (2015) which is closest to $\hat { \mathbf { e } }$ and farthest from the target word vector $\mathbf { e } ( w )$ . But, searching for this negative example requires iterating over the vocabulary which brings back the problem of slow loss computation.
|
| 128 |
+
|
| 129 |
+
# 4.3 DECODING
|
| 130 |
+
|
| 131 |
+
In the case of empirical losses, we output the word whose target embedding is the nearest neighbor to the vector in terms of the distance (loss) defined. In the case of NLLvMF, we predict the word whose target embedding has the highest value of vMF probability density wrt to the output vector. This predicted word is fed as the input for the next time step. Our nearest-neighbor decoding scheme is equivalent to a greedy decoding; we thus compare to baseline models with beam size of 1.
|
| 132 |
+
|
| 133 |
+
# 4.4 TYING THE TARGET EMBEDDINGS
|
| 134 |
+
|
| 135 |
+
Until now we discussed the embeddings in the output layer. Additionally, decoder in a sequenceto-sequence model has an input embedding matrix as the previous output word is fed as an input to the decoder. Much of the size of the trainable parameters in all the models is occupied by these input embedding weights. We experiment with keeping this embedding layer fixed and tied with pre-trained target output embeddings (Press & Wolf, 2016). This leads to significant reduction in the number of parameters in our model.
|
| 136 |
+
|
| 137 |
+
# 5 RESULTS
|
| 138 |
+
|
| 139 |
+
Translation Quality Table 1 shows the BLEU scores on the test sets for several baseline systems, and various configurations including the types of losses, types of inputs/outputs used (word, BPE, or embedding)12 and whether the model used tied embeddings in the decoder or not.
|
| 140 |
+
|
| 141 |
+
$\ell _ { 2 }$ loss attains the lowest BLEU scores among the proposed models; our manual error analysis reveals that the high error rate is due to the hubness phenomenon, as we described in $\ S 4 . 2$ . The BLEU scores improve for cosine loss, confirming the argument of Xing et al. (2015) that cosine distance is a better suited similarity (or distance) function for word embeddings. Best results—for MaxMargin and NLLvMF losses—surpass the strong BPE baseline in translation French English and English French, and attain slightly lower but competitive results on German English.
|
| 142 |
+
|
| 143 |
+
Since we represent each target word by its embedding, the quality of embeddings should have an impact on the translation quality. We measure this by training our best model with fasttext embeddings (Bojanowski et al., 2017), which leads to $> 1$ BLEU improvement. Tied embeddings are the most effective setups: they not only achieve highest translation quality, but also dramatically reduce parameters requirements and the speed of convergence.
|
| 144 |
+
|
| 145 |
+
Table 1: Translation quality experiments (BLEU scores) on IWSLT16 datasets
|
| 146 |
+
|
| 147 |
+
<table><tr><td rowspan="2">Embedding Model</td><td rowspan="2">Tied Emb</td><td rowspan="2">Source Type/ Target Type</td><td rowspan="2">Loss</td><td colspan="3">BLEU</td></tr><tr><td>fr-en</td><td>de-en</td><td>en-fr</td></tr><tr><td></td><td>no</td><td>word→word</td><td>CE</td><td>31.0</td><td>24.7</td><td>29.3</td></tr><tr><td></td><td>no</td><td>word→BPE</td><td>CE</td><td>29.1</td><td>24.1</td><td>29.8</td></tr><tr><td>=</td><td>no</td><td>BPE→BPE</td><td>CE</td><td>31.4</td><td>25.8</td><td>31.0</td></tr><tr><td>word2vec</td><td>no</td><td>word-→emb</td><td>L2</td><td>27.2</td><td>19.4</td><td>26.4</td></tr><tr><td>word2vec</td><td>no</td><td>word-→emb</td><td>Cosine</td><td>29.1</td><td>21.9</td><td>26.6</td></tr><tr><td>word2vec</td><td>no</td><td>word-→emb</td><td>MaxMargin</td><td>29.6</td><td>21.4</td><td>26.7</td></tr><tr><td>fasttext</td><td>no</td><td>word-emb</td><td>MaxMargin</td><td>31.0</td><td>25.0</td><td>29.0</td></tr><tr><td>fasttext</td><td>yes</td><td>word-→>emb</td><td>MaxMargin</td><td>32.1</td><td>25.0</td><td>31.0</td></tr><tr><td>word2vec</td><td>no</td><td>word-→emb</td><td>NLLvMF1 reg1</td><td>29.5</td><td>22.7</td><td>26.6</td></tr><tr><td>word2vec</td><td>no</td><td>word-→emb</td><td>NLLvMFreg1+reg2</td><td>29.7</td><td>21.6</td><td>26.7</td></tr><tr><td>word2vec</td><td>yes</td><td>word-→emb</td><td>NLLvMFreg1+reg2</td><td>29.7</td><td>22.2</td><td>27.5</td></tr><tr><td>fasttext</td><td>no</td><td>word-→emb</td><td>NLLvMFreg1+reg2</td><td>30.4</td><td>23.4</td><td>27.6</td></tr><tr><td>fasttext</td><td>yes</td><td>word-→emb</td><td>NLLvMFreg1+reg2</td><td>32.1</td><td>25.1</td><td>31.7</td></tr></table>
|
| 148 |
+
|
| 149 |
+
Table 2 shows results on WMT’16 test set in terms of BLEU and METEOR (Denkowski & Lavie, 2014) trained only for best-performing setups in table 1. METEOR uses paraphrase tables and WordNet synonyms for common words. This may explain why METEOR scores, unlike BLEU, close the gap with the baseline models: as we found in the qualitative analysis of outputs, our models often output synonyms of the reference words, which are plausible translations but are penalized by BLEU. 13 Examples are included in the Appendix.
|
| 150 |
+
|
| 151 |
+
Table 2: Translation quality experiment on WMT16 de–en
|
| 152 |
+
|
| 153 |
+
<table><tr><td>Loss</td><td>BLEU</td><td>METEOR</td></tr><tr><td>CE</td><td>22.9</td><td>23.9</td></tr><tr><td>CE (BPE)</td><td>30.1</td><td>28.7</td></tr><tr><td>MaxMargin</td><td>24.3</td><td>25.2</td></tr><tr><td>NLLvMFregi+reg2</td><td>28.8</td><td>28.2</td></tr></table>
|
| 154 |
+
|
| 155 |
+
Training Time Table 4 shows the average training time per batch. In figure 1 (left), we show how many samples per second our proposed model can process at training time compared to the baseline. As we increase the batch size, the gap between the baseline and the proposed models increases. Our proposed models can process large mini-batches while still training much faster than the baseline models. The largest mini-batch size with which we can train our model is 512, compared to 184 in the baseline model. Using max-margin loss leads to a slight increase in the training time compared to NLLvMF. This is because its computation needs a negative example which requires iterating over the entire vocabulary. Since our model requires look-up of nearest neighbors in the target embedding table while testing, it currently takes similar time as that of softmax-based models. In future work, approximate nearest neighbors algorithms Johnson et al. (2017) can be used to improve translation time.
|
| 156 |
+
|
| 157 |
+
We also compare the speed of convergence, using BLEU scores on dev data. In figure 1 (right), we plot the BLEU scores against the number of epochs. Our model convergences much faster than the baseline models leading to an even larger improvement in overall training time (Similar figures for more datasets can be found in the appendix). As a result, as shown in table 3, the total training time of our proposed model (until convergence) is less than up-to $2 . 5 \mathrm { x }$ of the total training time of the baseline models.
|
| 158 |
+
|
| 159 |
+
Memory Requirements As shown in Table 4 our best performing model requires less than $1 \%$ o f the number of parameters in input and output layers, compared to BPE-based baselines.
|
| 160 |
+
|
| 161 |
+

|
| 162 |
+
Figure 1: Left: Comparison of samples processed per second by the softmax vs. BPE vs. continuous output vMF models for IWSLT16 fr–en. Right: Comparison of convergence times of our models and baseline models on IWSLT16 fr–en validation sets. Baseline softmax as well as BPE converge at epoch 12 whereas our proposed model (NLLvMF) converges at epoch 7.
|
| 163 |
+
|
| 164 |
+
Table 3: Total convergence times in hours(h)/days(d).
|
| 165 |
+
|
| 166 |
+
<table><tr><td></td><td>Softmax</td><td>BPE</td><td>Embw/NLL-vMF</td></tr><tr><td>fr-en</td><td>4h</td><td>4.5h</td><td>1.9h</td></tr><tr><td>de-en</td><td>3h</td><td>3.5h</td><td>1.5h</td></tr><tr><td>en-fr</td><td>1.8h</td><td>2.8h</td><td>1.3</td></tr><tr><td>WMT de-en</td><td>4.3d</td><td>4.5d</td><td>1.6d</td></tr></table>
|
| 167 |
+
|
| 168 |
+
# 6 ERROR ANALYSIS
|
| 169 |
+
|
| 170 |
+
Translation of Rare Words We evaluate the translation accuracy of words in the test set based on their frequency in the training corpus. Table 5 shows how the $F _ { 1 }$ score varies with the word frequency. $F _ { 1 }$ score gives a balance between recall (the fraction of words in the reference that the predicted sentence produces right) and precision (the fraction of produced words that are in reference). We show substantial improvements over softmax and BPE baselines in translating less frequent and rare words, which we hypothesize is due to having learned good embeddings of such words from the monolingual target corpus where these words are not as rare. Moreover, in BPE based models, rare words on the source side are split in smaller units which are in some cases not properly translated in subword units on the target side if transparent alignments don’t exist. For example, the word saboter in French is translated to $s a b + o t + t a t e$ by the BPE model whereas correctly translated as sabotage by our model. Also, a rare word retraite in French in translated to pension by both Softmax and BPE models (pension is a related word but less rare in the corpus) instead of the expected translation retirement which our model gets right.
|
| 171 |
+
|
| 172 |
+
We conducted a thorough analysis of outputs across our experimental setups. Few examples are shown in the appendix. Interestingly, there are many examples where our models do not exactly match the reference translations (so they do not benefit from in terms of BLEU scores) but produce meaningful translations. This is likely because the model produces nearby words of the target words or paraphrases instead of the target word (which are many times synonyms).
|
| 173 |
+
|
| 174 |
+
Since we are predicting embeddings instead of actual words, the model tends to be weaker sometimes and does not follow a good language model and leads to ungrammatical outputs in cases where the baseline model would perform well. Integrating a pre-trained language model within the decoding framework is one potential avenue for our future work. Another reason for this type of errors could be our choice of target embeddings which are not modeled to (explicitly) capture syntactic relationships. Using syntactically inspired embeddings (Levy & Goldberg, 2014; Ling et al., 2015) might help reduce these errors. However, such fluency errors are not uncommon also in softmax and BPE-based models either.
|
| 175 |
+
|
| 176 |
+
Table 4: Comparison of number of parameters needed for input and output layer, train time per batch (with batch size of 64) for IWSLT16 fr–en. Numbers in parentheses indicate the fraction of parameters compared to word/word baseline model.
|
| 177 |
+
|
| 178 |
+
<table><tr><td>Output Type</td><td>Tied</td><td>Loss</td><td>#Parameters Input Layer</td><td>#Parameters Output Layer</td><td>Training time</td></tr><tr><td>word</td><td>No</td><td>CE</td><td>25.6M (1.0x)</td><td>51.2M (1.0x)</td><td>(ms) 400 (1.0x)</td></tr><tr><td>BPE</td><td>No</td><td>CE</td><td>8.192M (0.32x)</td><td>16.384M (0.32x)</td><td>346 (0.86x)</td></tr><tr><td>emb</td><td>No</td><td>L2</td><td>25.6M (1.0x)</td><td>307.2K (0.006x)</td><td>160 (0.4x)</td></tr><tr><td>emb</td><td>No</td><td>Cosine</td><td>25.6M (1.0x)</td><td>307.2K (0.006x)</td><td>160 (0.4x)</td></tr><tr><td>emb</td><td>No</td><td>MaxMargin</td><td>25.6M (1.0x)</td><td>307.2K (0.006x)</td><td>178 (0.43x)</td></tr><tr><td>emb</td><td>Yes</td><td>MaxMargin</td><td>153.6K (0.006x)</td><td>307.2K (0.006x)</td><td>178 (0.43x)</td></tr><tr><td>emb</td><td>No</td><td>NLLvMFx</td><td>25.6M (1.0x)</td><td>307.2K (0.006x)</td><td>170 (0.42x)</td></tr><tr><td>emb</td><td>Yes</td><td>NLLvMFx</td><td>153.6K (0.006x)</td><td>307.2K (0.006x)</td><td>170 (0.42x)</td></tr></table>
|
| 179 |
+
|
| 180 |
+
Table 5: Test set unigram $F _ { 1 }$ scores of occurrence in the predicted sentences based on their frequencies in the training corpus for different models for fr–en.
|
| 181 |
+
|
| 182 |
+
<table><tr><td>Word Freq</td><td>Softmax</td><td>BPE</td><td>Max Margin</td><td>Embw/NLL-vMF</td></tr><tr><td>1</td><td>0.42</td><td>0.50</td><td>0.30</td><td>0.52</td></tr><tr><td>2</td><td>0.16</td><td>0.26</td><td>0.25</td><td>0.31</td></tr><tr><td>3</td><td>0.14</td><td>0.22</td><td>0.25</td><td>0.33</td></tr><tr><td>4</td><td>0.29</td><td>0.24</td><td>0.30</td><td>0.33</td></tr><tr><td>5-9</td><td>0.28</td><td>0.33</td><td>0.38</td><td>0.37</td></tr><tr><td>10-99</td><td>0.54</td><td>0.53</td><td>0.53</td><td>0.55</td></tr><tr><td>100-999</td><td>0.60</td><td>0.61</td><td>0.60</td><td>0.60</td></tr><tr><td>1000+</td><td>0.69</td><td>0.70</td><td>0.69</td><td>0.69</td></tr></table>
|
| 183 |
+
|
| 184 |
+
# 7 CONCLUSION
|
| 185 |
+
|
| 186 |
+
This work makes several contributions. We introduce a novel framework of sequence to sequence learning for language generation using word embeddings as outputs. We propose new probabilistic loss functions based on vMF distribution for learning in this framework. We then show that the proposed model trained on the task of machine translation leads to reduction in trainable parameters, to faster convergence, and a dramatic speed-up, up to $2 . 5 \mathrm { x }$ in training time over standard benchmarks. Table 6 visualizes a comparison between different types of softmax approximations and our proposed method.
|
| 187 |
+
|
| 188 |
+
State-of-the-art results in softmax-based models are highly optimized after a few years on research in neural machine translation. The results that we report are comparable or slightly lower than the strongest baselines, but these setups are only an initial investigation of translation with the continuous output layer. There are numerous possible directions to explore and improve the proposed setups. What are additional loss functions? How to setup beam search? Should we use scheduled sampling? What types of embeddings to use? How to translate with the embedding output into morphologically-rich languages? Can low-resource neural machine translation benefit from translation with continuous outputs if large monolingual corpora are available to pre-train strong target-side embeddings? We will explore these questions in future work.
|
| 189 |
+
|
| 190 |
+
Furthermore, the proposed architecture and the probabilistic loss (NLLvMF) have the potential to benefit other applications which have sequences as outputs, e.g. speech recognition. NLLvMF could be used as an objective function for problems which currently use cosine or $\ell _ { 2 }$ distance, such as learning multilingual word embeddings. Since the outputs of our models are continuous (rather than class-based discrete symbols), these models can potentially simplify training of generative adversarial networks for language generation.
|
| 191 |
+
|
| 192 |
+
<table><tr><td></td><td>Sampling BasedStructure Based</td><td></td><td></td><td>Subword UnitsEmb w/NLL-vMF</td></tr><tr><td>Training Time</td><td>Θ</td><td>O</td><td>③③</td><td>?</td></tr><tr><td>Test Time</td><td>Θ</td><td>Θ</td><td></td><td>O</td></tr><tr><td> Accuracy</td><td>?</td><td>?</td><td>①</td><td></td></tr><tr><td>Parameters</td><td>Θ</td><td>?</td><td>0</td><td></td></tr><tr><td>Handle Huge Vocab</td><td>?</td><td>?</td><td>0</td><td>日日日</td></tr></table>
|
| 193 |
+
|
| 194 |
+
Table 6: Comparison of softmax alternatives. Red denotes worse than softmax, green denotes better than softmax (fractional improvements) and blue denotes huge improvement (more than 2X) over softmax.
|
| 195 |
+
|
| 196 |
+
# REFERENCES
|
| 197 |
+
|
| 198 |
+
Jacob Andreas, Maxim Rabinovich, Michael I. Jordan, and Dan Klein. On the accuracy of selfnormalized log-linear models. In Proc NIPS, 2015.
|
| 199 |
+
|
| 200 |
+
Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In Proc. ICLR, 2014.
|
| 201 |
+
|
| 202 |
+
Yoshua Bengio and Jean-Sebastien Senecal. Quick training of probabilistic neural nets by impor- ´ tance sampling. In Proc. AISTATS, 2003.
|
| 203 |
+
|
| 204 |
+
Christopher M. Bishop. Mixture density networks. Technical report, 1994.
|
| 205 |
+
|
| 206 |
+
Piotr Bojanowski, Edouard Grave, Armand Joulin, and Tomas Mikolov. Enriching word vectors with subword information. Transactions of the Association for Computational Linguistics, 5, 2017.
|
| 207 |
+
|
| 208 |
+
Ondrej Bojar, Rajen Chatterjee, Christian Federmann, Yvette Graham, Barry Haddow, Matthias Huck, Antonio Jimeno Yepes, Philipp Koehn, Varvara Logacheva, Christof Monz, et al. Findings of the 2016 conference on machine translation. In Proc. WMT, pp. 131–198, 2016.
|
| 209 |
+
|
| 210 |
+
M Cettolo, J Niehues, S Stuker, L Bentivogli, R Cattoni, and M Federico. The IWSLT 2016 evalua-¨ tion campaign. In Proc. IWSLT, 2016.
|
| 211 |
+
|
| 212 |
+
Wenlin Chen, David Grangier, and Michael Auli. Strategies for training large vocabulary neural language models. In Proc. ACL, 2016.
|
| 213 |
+
|
| 214 |
+
Alexandre de Brebisson and Pascal Vincent. An exploration of softmax alternatives belonging to ´ the spherical loss family. In Proc. ICLR, 2016.
|
| 215 |
+
|
| 216 |
+
Michael Denkowski and Alon Lavie. Meteor universal: Language specific translation evaluation for any target language. In Proc. EACL 2014 Workshop on Statistical Machine Translation, 2014.
|
| 217 |
+
|
| 218 |
+
Michael J. Denkowski and Graham Neubig. Stronger baselines for trustable results in neural machine translation. CoRR, abs/1706.09733, 2017.
|
| 219 |
+
|
| 220 |
+
Jacob Devlin, Rabih Zbib, Zhongqiang Huang, Thomas Lamar, Richard Schwartz, and John Makhoul. In Proc. ACL, 2014.
|
| 221 |
+
|
| 222 |
+
Chris Dyer, Victor Chahuneau, and Noah A. Smith. A simple, fast, and effective reparameterization of IBM Model 2. In Proc. NAACL, 2013.
|
| 223 |
+
|
| 224 |
+
Alex Graves, Abdel-rahman Mohamed, and Geoffrey Hinton. Speech recognition with deep recurrent neural networks. In Proc. ICASSP, pp. 6645–6649, 2013.
|
| 225 |
+
|
| 226 |
+
Robert M. Gray. Vector quantization. In Readings in Speech Recognition. 1990.
|
| 227 |
+
|
| 228 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural Computation, 9:1735– 1780, 1997.
|
| 229 |
+
|
| 230 |
+
Shihao Ji, S. V. N. Vishwanathan, Nadathur Satish, Michael J. Anderson, and Pradeep Dubey. Blackout: Speeding up recurrent neural network language models with very large vocabularies. CoRR, 2015. URL http://arxiv.org/abs/1511.06909.
|
| 231 |
+
Jeff Johnson, Matthijs Douze, and Herve J ´ egou. Billion-scale similarity search with gpus. ´ arXiv preprint arXiv:1702.08734, 2017.
|
| 232 |
+
Rafal Jozefowicz, Oriol Vinyals, Mike Schuster, Noam Shazeer, and Yonghui Wu. Exploring the limits of language modeling, 2016. URL https://arxiv.org/pdf/1602.02410.pdf.
|
| 233 |
+
Guillaume Klein, Yoon Kim, Yuntian Deng, Jean Senellart, and Alexander M. Rush. Opennmt: Open-source toolkit for neural machine translation. In Proc. ACL, 2017.
|
| 234 |
+
Angeliki Lazaridou, Georgiana Dinu, and Marco Baroni. Hubness and pollution: Delving into cross-space mapping for zero-shot learning. In Proc. ACL, 2015.
|
| 235 |
+
E.L. Lehmann and G. Casella. Theory of Point Estimation. Springer Verlag, 1998. ISBN 0387985026.
|
| 236 |
+
Omer Levy and Yoav Goldberg. Dependency-based word embeddings. In Proc. ACL. The Association for Computer Linguistics, 2014.
|
| 237 |
+
Wang Ling, Chris Dyer, Alan Black, and Isabel Trancoso. Two/too simple adaptations of word2vec for syntax problems. In Proc. NAACL-HLT 2015, 2015.
|
| 238 |
+
Minh-Thang Luong, Hieu Pham, and Christopher D. Manning. Effective approaches to attentionbased neural machine translation. In Proc. EMNLP, 2015.
|
| 239 |
+
Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. Distributed representations of words and phrases and their compositionality. In Proc. NIPS. 2013.
|
| 240 |
+
Andriy Mnih and Koray Kavukcuoglu. Learning word embeddings efficiently with noise-contrastive estimation. In Proc. NIPS, pp. 2265–2273, 2013.
|
| 241 |
+
Frederic Morin and Yoshua Bengio. Hierarchical probabilistic neural network language model. In Robert G. Cowell and Zoubin Ghahramani (eds.), Proc. AISTATS, pp. 246–252, 2005.
|
| 242 |
+
Yusuke Oda, Philip Arthur, Graham Neubig, Koichiro Yoshino, and Satoshi Nakamura. Neural machine translation via binary code prediction. In Proc. ACL, 2017.
|
| 243 |
+
Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. BLEU: a method for automatic evaluation of machine translation. In Proc. ACL, pp. 311–318, 2002.
|
| 244 |
+
Romain Paulus, Caiming Xiong, and Richard Socher. A deep reinforced model for abstractive summarization. In Proc. ICLR, 2018.
|
| 245 |
+
Jeffrey Pennington, Richard Socher, and Christopher D. Manning. Glove: Global vectors for word representation. In Proc. EMNLP, 2014.
|
| 246 |
+
Yuval Pinter, Robert Guthrie, and Jacob Eisenstein. Mimicking word embeddings using subword rnns. In Proc. EMNLP, 2017.
|
| 247 |
+
Ofir Press and Lior Wolf. Using the output embedding to improve language models. CoRR, abs/1608.05859, 2016.
|
| 248 |
+
Sebastian Ruder. A survey of cross-lingual embedding models. CoRR, 2017.
|
| 249 |
+
Diego Ruiz-Antoln and Javier Segura. A new type of sharp bounds for ratios of modified bessel functions. Journal of Mathematical Analysis and Applications, 2016.
|
| 250 |
+
Alexander M. Rush, Sumit Chopra, and Jason Weston. A neural attention model for abstractive sentence summarization. In Proc. EMNLP, 2015.
|
| 251 |
+
Abigail See, Peter J. Liu, and Christopher D. Manning. Get to the point: Summarization with pointer-generator networks. In Proc. ACL, pp. 1073–1083, 2017.
|
| 252 |
+
|
| 253 |
+
Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. In Proc. ACL, 2016.
|
| 254 |
+
|
| 255 |
+
Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In Proc. NIPS, pp. 3104–3112, 2014.
|
| 256 |
+
|
| 257 |
+
Oriol Vinyals and Quoc V. Le. A neural conversational model. CoRR, abs/1506.05869, 2015.
|
| 258 |
+
|
| 259 |
+
Chao Xing, Dong Wang, Chao Liu, and Yiye Lin. Normalized word embedding and orthogonal transform for bilingual word translation. In HLT-NAACL, 2015.
|
| 260 |
+
|
| 261 |
+
Wayne Xiong, Jasha Droppo, Xuedong Huang, Frank Seide, Michael L Seltzer, Andreas Stolcke, Dong Yu, and Geoffrey Zweig. Toward human parity in conversational speech recognition. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 25(12):2410–2423, 2017.
|
| 262 |
+
|
| 263 |
+
Jun Yin, Xin Jiang, Zhengdong Lu, Lifeng Shang, Hang Li, and Xiaoming Li. Neural generative question answering. CoRR, abs/1512.01337, 2015.
|
| 264 |
+
|
| 265 |
+
George Kingsley Zipf. The psycho-biology of language. 1935.
|
| 266 |
+
|
| 267 |
+
# 8 APPENDIX
|
| 268 |
+
|
| 269 |
+
8.1 HYPERPARAMETER AND INFRASTRUCTURE DETAILS
|
| 270 |
+
Table 7: Hyperparameters Details
|
| 271 |
+
Table 8: Infrastructure details. All the experiments were run with this configuration
|
| 272 |
+
|
| 273 |
+
<table><tr><td rowspan=1 colspan=1>Parameter</td><td rowspan=1 colspan=1>Value</td></tr><tr><td rowspan=1 colspan=1>LSTMLayers: Encoder</td><td rowspan=1 colspan=1>1</td></tr><tr><td rowspan=1 colspan=1>LSTM Layers: Decoder</td><td rowspan=1 colspan=1>2</td></tr><tr><td rowspan=1 colspan=1>Hidden Dimension (H)</td><td rowspan=1 colspan=1>1024</td></tr><tr><td rowspan=1 colspan=1>Input Word Embedding Size</td><td rowspan=1 colspan=1>512</td></tr><tr><td rowspan=1 colspan=1>Output Vector Size</td><td rowspan=1 colspan=1>300</td></tr><tr><td rowspan=1 colspan=1>Optimizer</td><td rowspan=1 colspan=1>Adam</td></tr><tr><td rowspan=1 colspan=1>Learning Rate (Baseline)</td><td rowspan=1 colspan=1>0.0002</td></tr><tr><td rowspan=1 colspan=1>Learning Rate (Our Models)</td><td rowspan=1 colspan=1>0.0005</td></tr><tr><td rowspan=1 colspan=1>Max Sentence Length</td><td rowspan=1 colspan=1>100</td></tr><tr><td rowspan=1 colspan=1>Vocabulary Size (Source)</td><td rowspan=1 colspan=1>50000</td></tr><tr><td rowspan=1 colspan=1>Vocabulary Size (Target)</td><td rowspan=1 colspan=1>50000</td></tr></table>
|
| 274 |
+
|
| 275 |
+
<table><tr><td rowspan=1 colspan=1>PyTorch</td><td rowspan=1 colspan=1>0.3.0</td></tr><tr><td rowspan=1 colspan=1>CPU</td><td rowspan=1 colspan=1>Intel(R) Xeon(R) CPU2.40GHz (32 Cores)</td></tr><tr><td rowspan=1 colspan=1>RAM</td><td rowspan=1 colspan=1>190G</td></tr><tr><td rowspan=1 colspan=1>#GPUs/experiment</td><td rowspan=1 colspan=1>1</td></tr><tr><td rowspan=1 colspan=1>GPU</td><td rowspan=1 colspan=1>GeForceGTXTITAN X</td></tr></table>
|
| 276 |
+
|
| 277 |
+
# 8.2 GRADIENT COMPUTATION FOR NLLVMF LOSS
|
| 278 |
+
|
| 279 |
+
NLLvMF loss is given as
|
| 280 |
+
|
| 281 |
+
$$
|
| 282 |
+
\mathrm { N L L v M F } ( \hat { \mathbf { e } } ; \mathbf { e } ( w ) ) = - \log \left( C _ { m } \| \hat { \mathbf { e } } \| \right) - \hat { \mathbf { e } } ^ { T } \mathbf { e } ( w ) ,
|
| 283 |
+
$$
|
| 284 |
+
|
| 285 |
+
where $C _ { m } ( \kappa )$ is given as:
|
| 286 |
+
|
| 287 |
+
$$
|
| 288 |
+
C _ { m } ( \kappa ) = \frac { \kappa ^ { m / 2 - 1 } } { ( 2 \pi ) ^ { m / 2 } I _ { m / 2 - 1 } ( \kappa ) } .
|
| 289 |
+
$$
|
| 290 |
+
|
| 291 |
+
The normalization constant is not directly differentiable because Bessel function cannot be written in a closed form. The gradient of the first component $( \log \left( C _ { m } \lvert \lvert \hat { \mathbf { e } } \rvert \rvert \right) )$ of the loss is given as
|
| 292 |
+
|
| 293 |
+
$$
|
| 294 |
+
\Delta \log ( C _ { m } ( \kappa ) ) = - \frac { I _ { m / 2 } ( \kappa ) } { I _ { m / 2 - 1 } ( \kappa ) } .
|
| 295 |
+
$$
|
| 296 |
+
|
| 297 |
+
This involves two computations of Bessel function $( I _ { v } ( z ) )$ for $m \ = \ 3 0 0$ for which we use scipy.special.ive. For high values of $v ^ { 1 4 }$ and low values of $z$ , the values of the Bessel function can become really small and lead to underflow (but the gradient is still large). To deal with underflow, the gradient value could be approximated with it’s (tight) lower bound (Ruiz-Antoln & Segura, 2016),
|
| 298 |
+
|
| 299 |
+
$$
|
| 300 |
+
- \frac { I _ { m / 2 } ( \kappa ) } { I _ { m / 2 - 1 } ( \kappa ) } \geq - \frac { z } { v - 1 + \sqrt { ( v + 1 ) ^ { 2 } + z ^ { 2 } } }
|
| 301 |
+
$$
|
| 302 |
+
|
| 303 |
+
That is, in the initial steps of training, one might need to use to the approximation of the gradient to train the model and switch to the actual computation later on. One could also approximate the value of $\log \left( C _ { m } ( \kappa ) \right)$ by integrating over the approximate gradient value which is given as
|
| 304 |
+
|
| 305 |
+
$$
|
| 306 |
+
\log { \left( C _ { m } ( \kappa ) \right) } \geq \sqrt { ( v + 1 ) ^ { 2 } + z ^ { 2 } } - ( v - 1 ) \log ( v - 1 + \sqrt { ( v + 1 ) ^ { 2 } + z ^ { 2 } } ) .
|
| 307 |
+
$$
|
| 308 |
+
|
| 309 |
+
In practice, we see that replacing $\log \left( C _ { m } ( \kappa ) \right)$ with this approximation in the loss function gives similar performance on the test data as well alleviates the problem of underflow. We thus recommend using it.
|
| 310 |
+
|
| 311 |
+
Figure 2 shows the convergence time results for more IWSLT datasets. The results shown are averaged over multiple runs, and are in line with results reported in Figure 1.
|
| 312 |
+
|
| 313 |
+

|
| 314 |
+
Figure 2: Comparison of convergence times of our models and baseline models on IWSLT16 de–en (left) and en–fr (right) validation sets.
|
| 315 |
+
|
| 316 |
+
In Table 1, we present results of translation quality with our proposed model and comparable baselines with a beam size of one. Here, for completeness, table 9 shows additional results with softmaxbased models with a beam size of 5.
|
| 317 |
+
|
| 318 |
+
<table><tr><td>Loss</td><td>BLEU</td></tr><tr><td>IWSLT fr-en</td><td>32.2</td></tr><tr><td>IWSLT de-en</td><td>26.1</td></tr><tr><td>IWSLT en-fr</td><td>32.4</td></tr><tr><td>WMT de-en</td><td>31.9</td></tr></table>
|
| 319 |
+
|
| 320 |
+
Table 9: Translation quality experiments using beam search with BPE based baseline models with a beam size of 5
|
| 321 |
+
|
| 322 |
+
With our proposed models, in principle, it is possible to generate candidates for beam search by using $K$ -Nearest Neighbors. But how to rank the partially generated sequences is not trivial (one could use the loss values themselves to rank, but initial experiments with this setting did not result in significant gains). In this work, we focus on enabling training with continuous outputs efficiently and accurately giving us huge gains in training time. The question of decoding with beam search requires substantial investigation and we leave it for future work.
|
| 323 |
+
|
| 324 |
+
8.4 SAMPLE TRANSLATIONS FROM TEST SETS
|
| 325 |
+
|
| 326 |
+
<table><tr><td>Input</td><td>Une ducation est critique, mais rgler ce problme va ncessiter que chacun d'entre nous s'engage et soit un meilleur exemple pour les femmes et filles dans nos vies.</td></tr><tr><td>Reference</td><td>An education is critical, but tackling this problem is going to require each and everyone of us to step up and be better role models for the women and girls in our own lives.</td></tr><tr><td>Predicted (BPE)</td><td>Education is critical, but it's going to require that each of us will come in and if you do a better example for women and girls in our lives.</td></tr><tr><td>Predicted (L2)</td><td>Education is critical, but to to do this is going to require that each of us of to engage and or a better example of the women and girls in our lives. That's critical ,but that's that it's going to require that each of us</td></tr><tr><td>Predicted (Cosine)</td><td>is going to take that the problem and they're going to if you're a better example for women and girls in our lives.</td></tr><tr><td>Predicted (MaxMargin) Predicted (NLLvMFreg)</td><td>Education is critical, but that problem is going to require that every one of us is engaging and is a better example for women and girls in our lives. Education is critical,but fixed this problem is going to require that all of us engage and be a better example for women and girls in our lives.</td></tr></table>
|
| 327 |
+
|
| 328 |
+
Table 10: Translation examples. Red and blue colors highlight translation errors; red are bad and blue are outputs that are good translations, but are considered as errors by the BLEU metric. Our systems tend to generate a lot of such “meaningful” errors.
|
| 329 |
+
Table 11: Example of fluency errors in the baseline model. Red and blue colors highlight translation errors; red are bad and blue are outputs that are good translations, but are considered as errors by the BLEU metric.
|
| 330 |
+
|
| 331 |
+
<table><tr><td>Input</td><td>Pourquoi ne sommes nous pas de simples robots qui traitent toutes ces donnes, produisent ces rsultats, sans faire l'exprience de ce film intrieur ?</td></tr><tr><td>Reference</td><td>Why aren't we just robots who process all this input, produce all that output, without experiencing the inner movie at all?</td></tr><tr><td>Predicted (BPE)</td><td>Why don't we have simple robots that are processing all of this data, produce these results, without doing the experience of that inner movie?</td></tr><tr><td>Predicted (L2)</td><td>Why are we not that we do that that are technologized and that that that's all these results, that they're actually doing these results, without do the experience of this film inside?</td></tr><tr><td>Predicted (Cosine) Predicted</td><td>Why are we not simple robots that all that data and produce these data without the experience of this film inside?</td></tr><tr><td>(MaxMargin)</td><td>Why aren't we just simple robots that have all this data, make these results, without making the experience of this inside movie?</td></tr><tr><td>Predicted (NLLvMFreg)</td><td>Why are we not simple robots that treat all this data, produce these results, without having the experience of this inside film?</td></tr></table>
|
md/train/rJlf_RVKwr/rJlf_RVKwr.md
ADDED
|
@@ -0,0 +1,509 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SENSIBLE ADVERSARIAL LEARNING
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
The trade-off between robustness and standard accuracy has been consistently reported in the machine learning literature. Although the problem has been widely studied to understand and explain this trade-off, the problem seems to remain as an open problem. In this paper, motivated by the fact that the high dimensional distribution is poorly represented by limited data samples, we introduce sensible adversarial learning and demonstrate the synergistic effect between pursuits of natural accuracy and robustness. Specifically, we define a sensible adversary which is useful for learning a defense model and keeping a high natural accuracy simultaneously. We theoretically establish that the Bayes rule is the most robust multi-class classifier with the 0-1 loss under sensible adversarial learning. We propose a novel and efficient algorithm that trains a robust model with sensible adversarial examples, without a significant drop in natural accuracy. Our model on CIFAR10 yields state-of-the-art results against various attacks with perturbations restricted to $\ell _ { \infty }$ with $\epsilon = 8 / 2 5 5$ , e.g., the robust accuracy $5 7 . 2 3 \%$ against PGD attacks as well as the natural accuracy $9 1 . 5 1 \%$ .
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
With many impressive successes of deep learning, there are a multitude of applications of deep neural networks (DNNs) that permeate in our everyday life. As DNNs are applied in securitycritical systems such as malware detection, face identification, and autonomous driving, robustness of DNNs against adversarial attacks, i.e., the intently perturbed inputs to fool the system, has become an important research topic (Szegedy et al., 2013; Papernot et al., 2016; Biggio et al., 2013).
|
| 12 |
+
|
| 13 |
+
One of the most widely studied classes of adversarial perturbations is $\ell _ { p }$ -norm constrained adversarial perturbations (Szegedy et al., 2013). Madry et al. (2017) formalize the adversarial learning against this class of perturbations as a minimization problem of adversarial risk defined in a following way. Let $( X , y ) \in \mathcal { X } \times \mathcal { Y }$ be from some unknown distribution $\mathbb { P } _ { X , Y }$ . Given a loss function $\ell : \mathcal { V } \times \mathcal { V } \mathbb { R }$ and a constraint constant $\epsilon > 0$ , the adversarial robust risk is
|
| 14 |
+
|
| 15 |
+
$$
|
| 16 |
+
\mathcal { R } _ { r o b } ( f ) = \mathbb { E } _ { X , Y } \big [ \operatorname* { m a x } _ { \| \delta \| _ { p } \leq \epsilon } \ell ( f ( X + \delta ) , y ) \big ] .
|
| 17 |
+
$$
|
| 18 |
+
|
| 19 |
+
Many adversarial learning methods can be interpreted as empirical minimization of (1) (Goodfellow et al., 2014; Kurakin et al., 2016b; Ruitong Huang & Szepesvari, 2015; Madry et al., 2017). For this optimization problem, Madry et al. (2017) propose to train a robust model with the augmented data generated by the projected gradient descent method (PGD). On this adversarial training, they make two important observations. First, it costs natural accuracy. A network trained with adversarial examples tends to have a lower natural accuracy than a naturally trained network. This trade-off is observed even with a small training $\epsilon$ . Second, the adversarial training requires a larger model capacity than the natural training does. If the model capacity is only sufficient for the natural learning, the adversarial training can converge to a constant function.
|
| 20 |
+
|
| 21 |
+
For a large $\epsilon$ , the optimization problem of (1) itself may pose the trade-off. For instance, Tsipras et al. (2018) show an example of an inherent tension between pursuits of accuracy and robustness when $\epsilon$ is large enough to change the true class. For a smaller $\epsilon$ , however, the formulation in (1) does not explicitly pose any conflict between the pursuit of robustness and accuracy. Note that $\mathcal { R } _ { r o b } ( f )$ is an upper bound of the standard risk of $f$ . A perfectly robust model $f$ with $\mathcal { R } _ { r o b } ( f ) = 0$ is also perfectly accurate for natural learning. If the perfect classifier exists in a given model class, the trade-off may be caused by the large sample complexity of adversarially robust generalization (Schmidt et al., 2018; Yin et al., 2018; Stutz et al., 2019). Without sufficiently large amount of data, the empirical minimization of (1) may result in a large standard risk by converging to a model of a poor robust risk. On the other hand, if robust learning converges to a constant function, it cannot achieve natural accuracy. In this sense, to resolve the trade-off problem, we may need to deal with the increased requirement on the model capacity.
|
| 22 |
+
|
| 23 |
+
In this paper, we propose a novel framework, called sensible adversary, in order to overcome the trade-off between natural accuracy and robustness. In particular, we restrict adversarial perturbations not to cross the Bayes decision boundary besides the $\epsilon$ -ball constraint, so that the perturbation ball is adaptively modified for every single data point. Our main contributions are:
|
| 24 |
+
|
| 25 |
+
• Under the framework of sensible adversary, the pursuit of robustness and accuracy given an
|
| 26 |
+
enough model capacity can align with each other, i.e., there is no trade-off. We theoretically
|
| 27 |
+
establish the Bayes rule is most robust against the sensible adversary. If the Bayes decision
|
| 28 |
+
boundary can be far from data manifolds at least by $\epsilon$ , our pursuit of sensible robustness does not cost any adversarial robust risk.
|
| 29 |
+
We propose an efficient algorithm for sensible adversarial training , which utilizes sensible
|
| 30 |
+
adversaries in the absence of the true Bayes rule. This sensible adversarial training enjoys robustness without a significant drop of natural accuracy. Furthermore, the algorithm is not sensitive to the model capacity. When insufficient model capacity is given, our algorithm does not collapse to a constant function. Instead, it trains a model as robust as possible.
|
| 31 |
+
We experimentally demonstrate that sensible adversarial training enables to stably learn
|
| 32 |
+
a robust and accurate model. In particular, on CIFAR10, we achieve $9 1 . 5 1 \%$ natural test
|
| 33 |
+
accuracy and $5 7 . 2 3 \%$ robust test accuracy against $\ell _ { \infty }$ PGD attacks constrained to $\epsilon =$ $8 / 2 5 5$ . To the best of our knowledge, there is no approaches known to achieve natural
|
| 34 |
+
accuracy more than $9 0 \%$ , while achieving more than $5 5 \%$ of robust accuracy against PGD
|
| 35 |
+
attacks of $\epsilon = 8 / 2 5 5$ . Moreover, no previous approaches pursuing robustness against this
|
| 36 |
+
attack achieved the natural accuracy more than .
|
| 37 |
+
|
| 38 |
+
# 1.1 RELATED WORK
|
| 39 |
+
|
| 40 |
+
Madry et al. (2017) formalize adversarial learning as a mini-max problem given perturbation restriction, and theoretically and empirically established the feasibility of the optimization. Our sensible adversary redefines the set of perturbation in the inner maximization problem on which their theoretical result is directly applicable. Tsipras et al. (2018) investigate the possible source of robust trade-off. The key idea is that when there are features that are useful for natural classification but vulnerable to adversarial perturbations, a robust model would abandon these features because otherwise all of these features can adversarially move to promote incorrect prediction. Our work explores the possibility of learning a robust model while not allowing such collective adversarial migration. While a class change by adversarial examples typically has been prevented by using a small $\epsilon$ , Suggala et al. (2018) explicitly ignore an adversarial perturbation that crosses the decision boundary of a Bayes rule. Zhang et al. (2019) also investigate the Bayes decision boundary to resolve the trade-off problem. They search for a model $f$ having a small weighted sum of the natural risk and a probability that an adversarial example can cross the decision boundary of $f$ . Gilmer et al. (2018) show that in high dimensional setting, even small test error can imply the existence of adversarial examples for most of data points. Our effort to prioritize natural accuracy to find a robust model is consistent to the view in Gilmer et al. (2018). More related work will be presented in Appendix A.
|
| 41 |
+
|
| 42 |
+
# 1.2 NOTATION
|
| 43 |
+
|
| 44 |
+
Let $\mathcal { F }$ denote the class of functions represented by DNNs with a fixed architecture. An optimal robust model w.r.t. $\mathbb { P } _ { X , Y }$ is denoted by $f _ { r o b } ~ = ~ \arg \operatorname* { m i n } _ { f \in \mathcal { F } } \mathcal { R } _ { r o b } ( f )$ . Denote the standard risk w.r.t $\mathbb { P } _ { X , Y }$ by $\mathcal { R } _ { s t d } ( f ) = \mathbb { E } _ { X , Y } [ \ell ( f ( X ) , y ) ]$ and its optimal natural model by $f _ { s t d } =$ ar $\mathrm { g } \operatorname* { m i n } _ { f \in \mathscr { F } } \mathscr { R } _ { s t d } ( f )$ . Let $\tilde { \mathbb { P } } _ { X , Y } ~ = ~ \mathbb { P } _ { X , Y } | _ { \tilde { \mathcal { X } } \times \mathcal { Y } }$ denote a restricted distribution of $\mathbb { P } _ { X , Y }$ on a subset $\tilde { { \mathcal { X } } } \times { \mathcal { Y } } \subset \mathcal { X } \times { \mathcal { Y } } .$ . Likewise, denote the standard risk w.r.t $\tilde { \mathbb { P } } _ { X , Y }$ by $\mathcal { \tilde { R } } _ { s t d } ( f )$ and the robust risk w.r.t $\tilde { \mathbb { P } } _ { X , Y }$ by $\tilde { \mathcal { R } } _ { r o b } ( f )$ . For a set $A$ , the $\epsilon$ -neighborhood in $\ell _ { p }$ -norm is defined as $B ( A , \epsilon ) \ : = \ : \{ y | \| y - x \| _ { p } \ : \leq \ : \epsilon , x \in A \}$ , and the interior is denoted by $i n \dot { t } ( A )$ . Denote the $\epsilon$ -
|
| 45 |
+
|
| 46 |
+
neighborhood of the decision boundary of $f$ by ${ D B ( f , \epsilon ) = \{ x | \exists x ^ { \prime } \in B ( x , \epsilon ) } $ s.t. $f ( x ) \neq f ( x ^ { \prime } ) \}$ .
|
| 47 |
+
Let ${ \hat { p } } _ { f , y } ( x )$ denote the predicted probability of the label of $x$ being $y$ by a model $f$ .
|
| 48 |
+
|
| 49 |
+
# 2 ADVERSARIAL LEARNING MAY HELP STANDARD LEARNING
|
| 50 |
+
|
| 51 |
+
In this section, we use a toy example to investigate the synergistic effect between the pursuit of robustness and natural accuracy.
|
| 52 |
+
|
| 53 |
+
Example: We can easily find an example of trade-off wherever an $\epsilon$ -ball attack can cross the manifold boundary between classes. For example, consider a two-dimensional random vector $\boldsymbol { X } \ = \ ( X _ { 1 } , X _ { 2 } )$ on $\mathcal { X } = ( 0 , 1 ) \times ( 0 , 1 )$ with a binary class $Y \sim B e r ( p )$ , where $p > 0 . 5$ . Let the conditional distribution be $\begin{array} { r } { ( X _ { 1 } , X _ { 2 } ) | Y = 0 \sim U { \dot { n } } i f ( ( 0 , \frac 1 2 ) \times ( 0 , 1 ) ) } \end{array}$ and $( X _ { 1 } , X _ { 2 } ) | Y = 1 \sim$ $U n i f ( ( { \textstyle { \frac { 1 } { 2 } } } , 1 ) \times ( 0 , 1 ) )$ . Then the Bayes Rule is $f ^ { B } ( x ) = s i g n ( x _ { 1 } - 0 . 5 )$ , and it is a perfect classifier, in that $\mathcal { R } _ { s t d } ( f ^ { B } ) = 0$ with $\ell$ as the 0-1 loss. If $p > 0 . 5$ , the robust classifier against $\epsilon$ -ball attacks is $f _ { r o b } ( x ) = s i g n ( x _ { 1 } - ( 0 . 5 - \epsilon ) )$ . Its decision boundary is deviated by $- \epsilon$ from that of the Bayes rule, and this deviation costs natural accuracy by $\mathcal { R } _ { s t d } ( f _ { r o b } ) - \mathcal { R } _ { s t d } ( f ) = ( 1 - p ) \epsilon$ . However, when the data points reside in a high-dimensional space, the samples are too sparse to represent the underlying true distribution. To take this phenomenon into account, consider a distribution $\tilde { \mathbb { P } } _ { X , Y } = \mathbb { P } _ { X , Y } | _ { \tilde { \mathcal { X } } \times \mathcal { Y } }$ on a subset $\tilde { { \mathcal { X } } } \times { \mathcal { Y } } \subset \mathcal { X } \times { \mathcal { Y } }$ . Assume that we only observe data generated from $\tilde { \mathbb { P } } _ { X , Y }$ , and the training and test sets do not provide any information on $\tilde { \mathcal { X } } ^ { c } \times \mathcal { Y }$ . Now by applying this support restriction to the example above, we demonstrate how adversarial learning dramatically changes from harming to benefiting natural accuracy.
|
| 54 |
+
|
| 55 |
+
The Cheese hole distribution: For the above example, we restrict the support on $\tilde { \mathcal { X } } = \cup _ { i = 1 } ^ { 3 } \cup _ { j = 1 } ^ { 3 }$ $H _ { i j }$ , where $\begin{array} { r } { H _ { i j } = ( ( \frac { \alpha } { 2 } , \frac { 3 \alpha } { 2 } ) + 2 \alpha ( i - 1 ) ) \times ( ( \frac { \alpha } { 2 } , \frac { 3 \alpha } { 2 } ) + 2 \alpha ( j - 1 ) ) , } \end{array}$ $\begin{array} { r } { \alpha = \frac { 1 } { 6 } } \end{array}$ , and $j = 1 , 2 , 3$ . Therefore the sampling support $\tilde { \mathcal X }$ comprises of nine small squares equally spaced by $\alpha$ . This is illustrated in Figure 1 (a). Among all classifiers which predict the same as $f ^ { B }$ on $\tilde { \mathcal X }$ , the worst one, denoted by $\tilde { f } ^ { \tilde { B } * }$ , predicts exact opposite on $x \in \tilde { \mathcal { X } } ^ { c }$ as illustrated in Figure 1 (b). For this worst case, the true standard risk w.r.t $\mathbb { P } _ { X , Y }$ is $\textstyle { \frac { 3 } { 4 } }$ , although the standard risk w.r.t. $\tilde { \mathbb { P } } _ { X , Y }$ is zero.
|
| 56 |
+
|
| 57 |
+
We argue that pursuing robustness can mitigate this discrepancy. Among minimizers of $\tilde { \mathcal { R } } _ { r o b }$ , let $\tilde { f } _ { r o b } ^ { * }$ be the worst classifier in that it predicts incorrectly outside $\tilde { \mathcal X }$ as depicted in Figure 1 (c). On $B ( \tilde { \mathcal { X } } , \epsilon ) , \tilde { f } _ { r o b } ^ { * }$ should correctly classify, except on $A _ { \epsilon } = \{ ( x _ { 1 } , x _ { 2 } ) | 0 . 5 - \epsilon \leq x _ { 1 } \leq 0 . 5 \} \cap B ( \tilde { \mathcal { X } } , \epsilon )$ . In this situation, the inaccuracy of $\tilde { f } _ { r o b } ^ { * }$ is compensated by its increased accuracy on $B ( \tilde { \mathcal { X } } , \epsilon ) \setminus A _ { \epsilon }$ . Moreover, the composition of $\mathcal { R } _ { r o b } ( { \tilde { f } } ^ { B * } )$ is particularly interesting, and it is easy to show that
|
| 58 |
+
|
| 59 |
+
$$
|
| 60 |
+
\mathcal { R } _ { r o b } ( \tilde { f } ^ { B * } ) = \mathbb { P } \big ( \tilde { f } ^ { B * } ( Y ) = X , X \in D B ( \tilde { f } ^ { B * } , \epsilon ) \big ) + 3 / 4 ,
|
| 61 |
+
$$
|
| 62 |
+
|
| 63 |
+
where $3 / 4$ is from the standard inaccuracy on $\tilde { \mathcal X } ^ { c }$ . The major part of $\mathcal { R } _ { r o b } ( { \tilde { f } } ^ { B * } )$ comes from the inaccuracy of $\tilde { f } ^ { B * }$ outside of the sampling support $\tilde { \mathcal X }$ . Therefore by simply reducing this inaccuracy on $\tilde { \mathcal X } ^ { c }$ , we can lower the robust risk by $3 / 4$ . Another interesting observation is that $B _ { \epsilon } = \{ ( x _ { 1 } , x _ { 2 } ) | 0 . 5 - \epsilon < x _ { 1 } < 0 . 5 + \epsilon \}$ is the only area where the Bayes rule $f ^ { B }$ has its robust risk. Note that $\mathcal { R } _ { r o b } ( f ^ { B } ) = \mathbb { P } ( X \in \bar { B _ { \epsilon } } , f ^ { B } ( X ) \bar { = } Y ) = 2 \epsilon$ which is greater than the optimal robust risk. The reason why $f ^ { B }$ is not most robust is simply because it is accurate on $B _ { \epsilon }$ . This prevents $f ^ { B }$ from being a robust function under the current adversarial robustness framework.
|
| 64 |
+
|
| 65 |
+
These observations have two implications. First, the robust pursuit can help to increase natural accuracy outside of $\tilde { \mathcal X }$ where the samples are poorly representative. Second, by accurately correcting the model outside of $\tilde { \mathcal X }$ in a standard sense, the robust risk can be significantly decreased. This is where the pursuit of robustness and accuracy coincides.
|
| 66 |
+
|
| 67 |
+
Toward respecting the original data structure: What if we regard the adversarial robust risk near the class border as reasonable gullibility? This corresponds to pursuit of robustness only against adversarial examples which do not cross between the class manifolds, i.e., as long as this does not harm the natural accuracy on $\tilde { \mathcal X }$ . We call this robustness as sensible robustness, which respects the structure represented by data. In this example, the sensible robustness can increase both robustness and natural accuracy. Let $\tilde { f } _ { r o b } ^ { s * }$ denote the worst case sensibly robust classifier w.r.t $\tilde { \mathbb { P } } _ { X , Y }$ . The decision boundary of $\tilde { f } ^ { s * }$ should not deviate to the left on $B ( \tilde { \mathcal { X } } , \epsilon )$ no matter how large $\epsilon$ is, as depicted in Figure 1 (d). Note that when $\epsilon \geq \alpha / 2$ , ${ \tilde { f } } _ { r o b } ^ { * }$ is the unique minimizer of $\tilde { \mathcal { R } } _ { r o b } ( f )$ as $B ( \tilde { \mathcal { X } } , \epsilon )$ covers $\mathcal { X }$ .
|
| 68 |
+
|
| 69 |
+

|
| 70 |
+
Figure 1: Cheese holes distribution. (a) The outer square is the support of the underlying true distribution $\mathbb { P } _ { X , Y }$ , but the sampling is restricted on the small squares $\bar { \mathcal { X } } \times \mathcal { y }$ with distribution $\tilde { \mathbb { P } } _ { X , Y }$ . (b) The worst case naturally optimal model w.r.t. $\tilde { \mathbb { P } } _ { X , Y }$ . (c) The worst case robustly optimal model w.r.t. $\tilde { \mathbb { P } } _ { X , Y }$ . (d) The worst case sensibly robust model w.r.t. $\tilde { \mathbb { P } } _ { X , Y }$ .
|
| 71 |
+
|
| 72 |
+
# 3 SENSIBLE ADVERSARIAL ROBUSTNESS
|
| 73 |
+
|
| 74 |
+
In this section, we introduce a sensible adversary framework. Consider a general multi-class case with the 0-1 loss, where $\mathcal { V } = [ K ]$ . Assume the model capacity is enough so that the Bayes rule $f ^ { B } \in \mathcal { F }$ . We consider $\ell _ { p }$ -norm constrained adversarial attacks, where $p \in \{ 0 , 1 , . . . , \infty \}$ .
|
| 75 |
+
|
| 76 |
+
Definition 1. (sensible adversarial example) For a classifier $f$ , let $S _ { x , \epsilon } ( f ) = \{ z \in \mathcal { X } | | z - x | | _ { p } \leq$ $\epsilon , f ( z ) = y \}$ . Then the sensible adversarial example of $( x , y )$ w.r.t $f$ is defined as
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
\tilde { x } = \left\{ \begin{array} { l l } { x , \qquad } & { \mathrm { i f ~ } f ^ { B } ( x ) \neq y } \\ { \arg \operatorname* { m a x } _ { \mathbf { \mu } } \ \ell ( f ( z ) , y ) , \qquad } & { \mathrm { o t h e r w i s e } . } \end{array} \right.
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
Definition 2. (sensible robustness) Let the sensible adversarial loss be $\ell _ { r o b , \epsilon } ^ { s } ( f , x , y ) = \ell ( f ( \tilde { x } ) , y )$ where $\tilde { x }$ is a sensible adversarial example as defined above. Then the sensible robust risk of a model $f$ is defined by
|
| 83 |
+
|
| 84 |
+
$$
|
| 85 |
+
\begin{array} { r } { \mathcal { R } _ { r o b } ^ { s } ( f ) = \mathbb { E } _ { \mathbb { P } _ { X , Y } } \Big [ \ell _ { r o b , \epsilon } ^ { s } ( f , X , Y ) \Big ] = \mathbb { E } _ { \mathbb { P } _ { X , Y } } \Big [ \ell ( f ( \tilde { X } ) , Y ) \Big ] . } \end{array}
|
| 86 |
+
$$
|
| 87 |
+
|
| 88 |
+
We call its minimizer as a sensibly robust model w.r.t $\mathbb { P } _ { X , Y }$ and denote by $f _ { r o b } ^ { s }$ , i.e.,
|
| 89 |
+
|
| 90 |
+
$$
|
| 91 |
+
f _ { r o b } ^ { s } = \arg \operatorname* { m i n } _ { f \in \mathcal { F } } \mathcal { R } _ { r o b } ^ { s } ( f ) .
|
| 92 |
+
$$
|
| 93 |
+
|
| 94 |
+
Remark 1. Intuitively, a sensible adversarial example is an adversarial example restricted not to cross the decision boundary of the Bayes rule. In addition, a sensible adversary does not perturb a data point that the Bayes rule incorrectly classifies. Therefore, it is natural to expect that pursuing sensible robustness would not cost natural accuracy, and the following theorem confirms it.
|
| 95 |
+
|
| 96 |
+
Theorem 1. Let $\mathcal { R } _ { s t d } ^ { * }$ denote the minimum standard risk which is $\mathcal { R } _ { s t d } ( f ^ { B } )$ . Then we have $\mathcal { R } _ { r o b } ^ { s } ( f ^ { B } ) = \mathcal { R } _ { s t d } ^ { * }$ . Furthermore, $f ^ { B }$ is the unique minimizer of $\mathcal { R } _ { r o b } ^ { s } ( f )$ among $f \in { \mathcal { F } }$ .
|
| 97 |
+
|
| 98 |
+
Theorem 2. Let $S _ { X , \epsilon }$ be an $\epsilon$ -ball centered at $X$ . Then for any $f \in { \mathcal { F } }$ and for any set $A \subset$ $\mathcal { X } \setminus D B ( f ^ { B } , \epsilon )$ ,
|
| 99 |
+
|
| 100 |
+
$$
|
| 101 |
+
\begin{array} { r } { \mathbb { P } \Big ( \exists x ^ { \prime } \in S _ { X , \epsilon } \circ . t . \ f ^ { B } ( x ^ { \prime } ) \neq Y , X \in A \Big ) \leq \mathbb { P } \Big ( \exists x ^ { \prime } \in S _ { X , \epsilon } \circ . t . \ f ( x ^ { \prime } ) \neq Y , X \in A \Big ) . } \end{array}
|
| 102 |
+
$$
|
| 103 |
+
|
| 104 |
+
Remark 2. According to the Theorem 1, a sensibly robust model w.r.t $\mathbb { P } _ { X , Y }$ is the Bayes rule, i.e., $f _ { r o b } ^ { s } = f ^ { B }$ . This sensible robustness costs adversarial robustness since $f ^ { B }$ may have a larger adversarial robust risk compared with $f _ { r o b }$ , a direct minimizer of (1). However, Theorem 2 shows $f ^ { B }$ is equally or even more robust than $f _ { r o b }$ except on a certain area. In particular, Theorem 2 shows that $f ^ { { \tilde { B } } }$ is the most robust model except on $\dot { D } B ( f ^ { B } , \epsilon )$ . Therefore, $f ^ { B }$ is most robust almost everywhere if the decision boundary of $f ^ { B }$ can lie outside of $B ( \mathcal { X } , \epsilon )$ , so that $\mathcal { X } \setminus D B ( f ^ { B } , \epsilon ) = \mathcal { X }$ . For example, this happens when each class has its own support apart from each other by at least $2 \epsilon$ .
|
| 105 |
+
|
| 106 |
+
Algorithm 1 Sensible adversarial training for $\ell _ { \infty }$ norm restriction
|
| 107 |
+
|
| 108 |
+
<table><tr><td colspan="2">1: =X adu</td></tr><tr><td>2: repeat 3:</td><td></td></tr><tr><td>4:</td><td>for k = 1.,...,K</td></tr><tr><td>5:</td><td>(k) ←IIB(xi,e)(sign(Vl(f(ad),yi))+) (k-1)) (k-1)) xiadu ), I: the projection operator</td></tr><tr><td>6:</td><td>if l(f,xiadv,yi) > log (k)</td></tr><tr><td>7:</td><td>(sensible reversion) xi,ad (K) (k-1) xi,adu</td></tr><tr><td>8:</td><td>break</td></tr><tr><td>9:</td><td>0←0-n2∑m=1 Vθl(f,xiadv,Yi)/m m (K)</td></tr><tr><td>10: until training converged</td><td></td></tr></table>
|
| 109 |
+
|
| 110 |
+
The next theorem shows that even when we only have data from $\tilde { \mathbb { P } } _ { X , Y }$ restricted on $\tilde { \mathcal { X } } \times \mathcal { Y }$ , we can find $f _ { r o b } ^ { s }$ , the optimal function w.r.t. $\mathbb { P } _ { X , Y }$ .
|
| 111 |
+
|
| 112 |
+
Theorem 3. Let ${ \mathcal { A } } _ { \epsilon } = \Big \{ f \in \mathcal { F } \big | \tilde { \mathbb { P } } \big ( f ( x ) = f ^ { B } ( x )$ , $\forall x \in S _ { X , \epsilon } ( f ^ { B } ) ) = 1 \}$ and $\tilde { \mathcal { R } } _ { r o b } ^ { s } ( f ) =$ $\mathbb { E } _ { \tilde { \mathbb { P } } _ { X , Y } } [ \ell _ { r o b , \epsilon } ^ { s } ( f , X , Y ) ]$ . Then, for any $\epsilon > 0$ , $\tilde { \mathcal { R } } _ { r o b } ^ { s } ( f )$ is only minimized by any $f \in A _ { \epsilon }$ . Furthermore, if $B ( \tilde { \mathcal { X } } , \epsilon ) \supset \mathcal { X }$ , $f ^ { B }$ is the unique minimizer of $\tilde { \mathcal { R } } _ { r o b } ^ { s } ( f )$ .
|
| 113 |
+
|
| 114 |
+
Remark 3. It is interesting to compare our work with that of Suggala et al. (2018). We notice there are some critical differences between these two works. Given $\mathcal { V } \in \{ - 1 , 1 \}$ , Suggala et al. (2018) define an adversarial risk as
|
| 115 |
+
|
| 116 |
+
$$
|
| 117 |
+
\mathbb { R } _ { a d v } ( f ) = \mathbb { E } [ \operatorname* { m a x } _ { g ( x ) = g ( x + \delta ) , \| \delta \| \le \epsilon } \ell ( f ( x + \delta _ { x } ) , g ( x ) ) - \ell ( f ( x ) , g ( x ) ) ] .
|
| 118 |
+
$$
|
| 119 |
+
|
| 120 |
+
Unlike our definition of sensible adversary, if $g$ is a Bayes rule $f ^ { B }$ , their adversary tries to increase the loss w.r.t. not $y$ but a deterministic function of $x$ . Therefore, for making $f ^ { B }$ being an optimal robust model, their objective should always have an additional term, e.g., $R _ { n a t } ( f ) + \bar { \lambda { R } } _ { a d v } ( f )$ for $0 < \lambda < \infty$ because an $f$ s.t. $f ( x ) \neq g ( x )$ w.p. 1 can minimize $R _ { a d v } ( f )$ . Unlike their approach, our sensible adversarial risk (3) can alone be optimized making the Bayes rule as the optimal model.
|
| 121 |
+
|
| 122 |
+
# 4 ALGORITHM
|
| 123 |
+
|
| 124 |
+
A transition from theory to algorithm poses two main challenges. First, the 0-1 loss function in the theory is hard to optimize. Therefore, as a common practice, we use the cross-entropy loss. Second, $f ^ { B }$ on the entire space is practically unavailable. We note that a model that performs well on natural data can be a nice approximation of $f ^ { B }$ on the restricted support $\tilde { \mathcal { X } } \times \mathcal { Y }$ . Therefore, we generalize sensible adversary in (2) to utilize a general loss function and a reference model that substitutes $f ^ { B }$ .
|
| 125 |
+
|
| 126 |
+
Definition 3. (generalized sensible adversarial example) Consider a loss function $\ell$ . For a classifier $f$ and $c \in ( 0 , 1 ]$ , let $S _ { x , \epsilon } ( f ) = \{ z \in \mathcal { X } | \| z - x \| _ { p } \leq \bar { \epsilon }$ , $\ell ( f ( z ) , y ) \leq \log { \frac { 1 } { c } } \} \cup \{ x \}$ . Then given a reference model $f _ { r }$ , the sensible adversarial example of $f$ for $( x , y )$ is defined as
|
| 127 |
+
|
| 128 |
+
$$
|
| 129 |
+
\begin{array} { r } { \tilde { x } | _ { f _ { r } } = \left\{ \begin{array} { l l } { x , \qquad } & { \mathrm { i f ~ } f _ { r } ( x ) \neq y } \\ { \mathrm { a r g ~ m a x ~ } \ell ( f ( z ) , y ) , \qquad } & { \mathrm { o t h e r w i s e . } } \end{array} \right. } \end{array}
|
| 130 |
+
$$
|
| 131 |
+
|
| 132 |
+
If $\ell$ is the cross-entropy loss, the condition $\ell ( f _ { r } ( x ) , y ) \leq \log \frac { 1 } { c }$ is equivalent to ${ \hat { p } } _ { f _ { r } , y } ( x ) \geq c$ . In binary case with $c = 0 . 5$ , this requires the perturbed examples not to cross the decision boundary of $f _ { r }$ , and for general $c$ , not to reach to a vicinity of the boundary.
|
| 133 |
+
|
| 134 |
+
Table 1: The test result on natural examples and $\ell _ { \infty }$ -attacks for CIFAR10 $\acute { \epsilon } = 8 / 2 5 5$ ). The PGD attacks are generated with 20 random restarts and counted the worst case only.
|
| 135 |
+
|
| 136 |
+
<table><tr><td></td><td>NAT</td><td>CW40</td><td>DeepFool</td><td>FGSM</td><td>LBFGS</td><td>MIFGSM</td><td>PGD100</td></tr><tr><td>SENSE</td><td>91.51</td><td>67.01</td><td>78.89</td><td>72.72</td><td>85.94</td><td>68.87</td><td>57.23</td></tr><tr><td>TRADE</td><td>84.92</td><td>62.19</td><td>61.38</td><td>61.06</td><td>81.58</td><td>57.95</td><td>54.72</td></tr></table>
|
| 137 |
+
|
| 138 |
+
Table 2: The transfer attack results between the TRADE and SENSE model on CIFAR10. The $\ell _ { \infty }$ PGD40 and MIFGSM attacks are generated. The subscripts of the column names denote the generating model. The denominator and numerator in each cell are the number of adversarial attacks and correct predictions respectively $( \epsilon = 8 / 2 5 5 )$ ).
|
| 139 |
+
|
| 140 |
+
<table><tr><td>Defence model</td><td>PGDSEN SE</td><td>PGDTRADE</td><td>MIFGSMSENSE</td><td>MIFGSMTRADE</td></tr><tr><td>TRADE</td><td>7831/10000</td><td>5655/10000</td><td>1584/3113</td><td>5888/10000</td></tr><tr><td>SENSE</td><td>6499/10000</td><td>6961/10000</td><td>6887/10000</td><td>2916/4112</td></tr></table>
|
| 141 |
+
|
| 142 |
+
In our algorithm we set $f _ { r }$ as a naturally trained model or a current model. Given a $f _ { r }$ , the implementation of sensible adversarial attacks is straightforward. For a correctly classified natural example by $f _ { r }$ , we add perturbations in the similar way to the PGD method (Madry et al., 2017). The difference is that during the $\mathbf { K }$ -step of PGD iterations, once the loss of a currently generated example exceeds $\log { \frac { 1 } { c } }$ , we reverse it back to the previous step and break the iteration. This requires no additional forward- or backward-propagation, compared with the PGD method. The proposed algorithm is in Algorithm 1 for the $\ell _ { \infty }$ -norm and in Algorithm 2 in Appendix C for the other $\ell _ { p }$ -norms.
|
| 143 |
+
|
| 144 |
+
The definition of the sensible adversary in (4) divides the data into three subsets: $A _ { f _ { r } } = \{ x | f _ { r } ( x ) \neq$ $y$ or $S _ { x , \epsilon } ( f _ { r } ) = \{ x \} \}$ , $B _ { f _ { r } } = \{ x | S _ { x , \epsilon } ( f _ { r } ) \neq S _ { x , \epsilon }$ , $S _ { x , \epsilon } ( f _ { r } ) \neq \{ x \} \}$ , and $C _ { f _ { r } } = \overset { \cdot } { \chi } \setminus ( A _ { f } \cup B _ { f } )$ . Therefore, our algorithms generate a sensible adversarial example $\left. \tilde { x } ^ { s } \right| _ { f _ { r } = f }$ in three different ways: (1) $\tilde { x } ^ { s } = x$ for $x \in A _ { f }$ , (2) $\tilde { x } ^ { s } \ne \tilde { x } ^ { p }$ for $x \in B _ { f }$ , and (3) $\tilde { x } ^ { s } = \tilde { x } ^ { p }$ for $x \in C _ { f }$ , where $\tilde { x } ^ { p }$ is a full $\mathbf { K }$ -step PGD attack. Therefore, sensible adversarial training inherently involves a set selection mechanism. The sensible adversarial loss $\ell ^ { s } ( f , x , y )$ can be written as
|
| 145 |
+
|
| 146 |
+
$$
|
| 147 |
+
\begin{array} { r l } & { \quad \ell ( f , x , y ) 1 _ { x \in A _ { f } } + \ell ( f , \tilde { x } ^ { s } , y ) 1 _ { x \in B _ { f } } + \ell ( f , \tilde { x } ^ { p } , y ) 1 _ { x \in C _ { f } } } \\ & { = \ell ( f , x , y ) 1 _ { \ell ( f , x , y ) > \log \frac { 1 } { c } } + \ell ( f , \tilde { x } ^ { s } , y ) 1 _ { \tilde { x } ^ { p } \neq \tilde { x } ^ { s } } , \ell ( f , x , y ) { \le } \log \frac { 1 } { c } + \ell ( f , \tilde { x } ^ { p } , y ) 1 _ { \ell ( f , \tilde { x } ^ { p } , y ) { \le } \log \frac { 1 } { c } } . } \end{array}
|
| 148 |
+
$$
|
| 149 |
+
|
| 150 |
+
When $c \geq 0 . 5$ , this optimization problem has a strong motivation to increase $| C _ { f } |$ , i.e., the number of sensible adversarial attacks that are identical to full PGD attacks. Because $A _ { f } \equiv \{ x | \ell ( f ( x ) , y ) >$ $\log { \frac { 1 } { c } } \}$ for $c \geq 0 . 5$ , the loss on the natural stage $A _ { f }$ is always greater than the loss of the sensibly reversed stage $B _ { f }$ and the full PGD stage $C _ { f }$ . Furthermore, the loss for $x \in B _ { f }$ is always approximately $\begin{array} { r } { \log { \frac { 1 } { c } } } \end{array}$ by adaptive sensible perturbations. Therefore, paradoxically, the smallest loss is only achievable by full PGD examples. In other words, sensible adversarial training penalizes when $x \notin C _ { f }$ . We note that the optimization problem has a smooth landscape; Although the data points may jump around between $A _ { f } , B _ { f }$ , and $C _ { f }$ , there is no obvious discontinuity in the loss. Therefore, during the training, $\ell ^ { s } ( f , x , y )$ smoothly slides down, making both $\ell ( f , x , y )$ and $\ell ( f , \tilde { x } ^ { p } , y )$ smaller than $\begin{array} { r } { \log { \frac { 1 } { c } } } \end{array}$ . This enables to learn a naturally and adversarially accurate model. More discussion on the stability of our algorithms are presented in Appendix D.
|
| 151 |
+
|
| 152 |
+
# 5 EXPERIMENTS
|
| 153 |
+
|
| 154 |
+
# 5.1 EXPERIMENT 1: ROBUSTNESS AGAINST $\epsilon$ -BALL ATTACKS
|
| 155 |
+
|
| 156 |
+
CIFAR10 We train WideResNet-34-10 (He et al., 2016) with sensible adversarial examples of $\epsilon = 8 / 2 5 5$ and $c = 0 . 7$ with the step number $K = 1 0$ and size $\eta _ { 1 } = \epsilon / 5$ . We attack our model with various white-box attacks with perturbations restricted to $\ell _ { \infty }$ with $\dot { \epsilon } = 8 / 2 5 5$ . We compare the performance with TRADE using the same architecture (Zhang et al., 2019), which is know to be robust and accurate. The result is in Table 1. Our model achieves $9 1 . 5 1 \%$ natural accuracy. This is $3 . 7 \%$ drop in natural accuracy from $9 5 . 2 \%$ , which is an accuracy that a naturally trained model can achieve (Madry et al., 2017). With this architecture, Madry et al. (2017) achieve $4 7 . 0 4 \%$ robust accuracy against PGD20 attacks and $8 7 . 3 \%$ natural accuracy. As a black-box attack, we try transfer attacks between the TRADE and SENSE model by the $\ell _ { \infty }$ based PGD and MIFGSM, which are known to be effective for transfer attack $\acute { \epsilon } = 8 / 2 5 \dot { 5 } )$ ). We obtain adversarial examples by applying PGD and MIFGSM on a generating model, and then use the examples to attack a defense model. The result is in Table 2. Overall we observe that our model outperforms both the TRADE and Madry model. In particular, sensible adversary achieves more than $5 5 \%$ of robust accuracy against PGD attacks of $\bar { \epsilon } = 8 / 2 5 5$ . This performance is consistent to the test margin distribution in Figure 8, and this is discussed in detail in Appendix E. For PGD100, we conduct random 20 restarts and count only the worst case. The step number 100 and step size 2/255 of the PGD attacks are justified by the plot in Figure 11 in Appendix H.
|
| 157 |
+
|
| 158 |
+
Table 3: MNIST: test results of our models on natural examples and $\ell _ { \infty }$ based attacks $\acute { \epsilon } = 0 . 3$
|
| 159 |
+
|
| 160 |
+
<table><tr><td>Defence model</td><td>Natural</td><td>PGD500</td><td>C&W40</td></tr><tr><td>SENSE</td><td>99.51</td><td>91.74</td><td>96.02</td></tr><tr><td>TRADE</td><td>99.48</td><td>93.30</td><td>96.90</td></tr></table>
|
| 161 |
+
|
| 162 |
+

|
| 163 |
+
Figure 2: The natural and robust accuracies of our models for the varying parameter $c$
|
| 164 |
+
|
| 165 |
+
MNIST We consider a CNN model with three convolutional layers followed by a fully connected linear layer, which is the same architecture in (Zhang et al., 2019). We train an MNIST model with sensible adversarial examples of $\epsilon = 0 . 3$ and $c = 0 . 5$ with the step number $K = 1 0$ and size $\eta _ { 1 } = 0 . 0 5$ . The robust test result in Table 3 shows the comparable performance of our model. The step size of the PGD500 attack is 0.01, and the serenity check on the PGD attack is in Appendix H. We conduct 100 random restarts and count only the worst case for each test example.
|
| 166 |
+
|
| 167 |
+
# 5.2 EXPERIMENT 2: SENSITIVITY ANALYSIS
|
| 168 |
+
|
| 169 |
+
MNIST: We perform the sensibility analysis to understand the effect of $c$ and the model capacity for two reasons. First, the sensible training prevents full PGD perturbations on an example until the loss on it becomes less than $\log { \frac { 1 } { c } }$ , which could hardly happen for a model with a small capacity. Second, as Madry et al. (2017) point out, when the model capacity is insufficient for adversarial learning, the model collapses to a constant function. We are interested in a range of $c$ that keeps sensible learning from collapsing. Therefore, we consider a sequence of CNNs of the increasing number of kernels similar to Madry et al. (2017), where we denote the capacity by $q \in \{ 1 , 2 , 3 , \bar { 4 } , 5 \}$ . The details of the model architectures are presented in Appendix H. When we train them with natural examples, the networks of capacity 1 and 2 achieve about $9 5 \%$ and $9 7 \%$ accuracy, whereas the networks of the other capacities achieve more than $9 9 \%$ . When trained with regular PGD examples, the networks with capacity 1,2, and 3 collapse. Therefore, capacity 3 is enough only for natural learning, and capacities 1 and 2 are possibly insufficient even for natural learning.
|
| 170 |
+
|
| 171 |
+

|
| 172 |
+
Figure 3: The prediction margins at convergence of capacity 5 on the test set. The natural margin of a model $f$ at $( x , y )$ is $\begin{array} { r } { \log \hat { p } _ { f , y } ( x ) - \operatorname* { m a x } _ { y ^ { \prime } \ne y } \log \hat { p } _ { f , y ^ { \prime } } ( x ) } \end{array}$ . The adversarial margin is calculated by $\begin{array} { r } { \log \hat { p } _ { f , y } \big ( \tilde { x } ^ { p } \big ) - \operatorname* { m a x } _ { y ^ { \prime } \not = y } \log \hat { p } _ { f , y ^ { \prime } } \big ( \tilde { x } ^ { p } \big ) } \end{array}$ , where $\tilde { x } ^ { p }$ is a full PGD attack.
|
| 173 |
+
|
| 174 |
+
For each capacity $q$ , we train the models with sensible adversarial examples on MNIST with the hyperparameters $c \in \{ 0 , 0 . 1 , \cdot \cdot \cdot , 0 . 9 , 1 \}$ . Note that sensible adversarial training is identical to natural training when $c = 1$ , and to adversarial learning without any perturbations for incorrectly classified natural examples when $c = 0$ . Figure 2 shows the natural and robust accuracy against PGD-40 attacks with varying $c$ for each capacity. In general, the natural accuracy tends to increase as $c$ increases while robustness decreases. For capacities 3, 4 and 5, the accuracies are almost insensitive to varying $c$ . On the other hand, the tendency is most distinct in capacity 1. In this case, the network obtains best robustness when $c = 0 . 5$ , which is the least loss bound among $c \geq 0 . 5$ , the range of $c$ with stable learning property. Even for capacity 1, however, the sensible learning does not collapse except when $c = 0$ . We also see that $c = 0 . 5$ is least sensitive to the model capacity.
|
| 175 |
+
|
| 176 |
+
Note that capacities 2 and 3 do not collapse even with $c = 0$ . When $c = 0$ , the only difference of the sensible adversarial learning from the regular PGD training is that the sensible learning requires robustness only for the correctly classified natural examples. When $c = 0$ , at the convergence of the models of capacities 1 and 2, about $5 \%$ of the data points are allowed to be free from the perturbation. By paying only the $5 \%$ of robust training accuracy, the sensible learning avoids collapsing and obtains about $80 \%$ of robust accuracy and $90 \%$ of natural accuracy.
|
| 177 |
+
|
| 178 |
+
Intuitively, an insufficient model capacity or locally close class manifolds can make a virtual decision boundary that is inevitable to keep a nice natural performance. In the algorithm, the sensible reversion prevents adversarial examples from crossing this boundary. This effectively reduces the requirement of the model capacity posed by the regular adversarial learning. The sensible reversion also allows a robust model to have larger margins than the PGD trained model for the majority of the dataset as in Figure 3. The PGD trained model has majority adversarial margins as positive. Instead, it has much smaller natural margins than the naturally trained model. The SENSE model with $c = 0 . 5$ has comparably large adversarial and natural margins. Instead, the number of data points with negative adversarial margins is larger than that of the PGD trained model. As $c$ increases to 0.9, this model has much smaller and more negative adversarial margins. On the other hand, its two types of margins are generally even larger. This phenomenon is consistent to the decreasing robustness in Figure 2 for capacity 5. In general, for a fixed capacity, increasing $c$ increases the natural and adversarial margins of the majority of the data, while it also increases the portion of data of negative adversarial margins.
|
| 179 |
+
|
| 180 |
+
The cost for this highly confident prediction is the robustness near the decision boundary at convergence, i.e., the portion of the data points in the natural and sensibly reversed stage. When we consider the margin on the training set, we find that there is a linear relationship between the portion of the data points having negative adversarial margins and the test accuracy. In practice, such a portion can be an indicator about the robustness of the model or the sufficiency of the model capacity, without directly testing the model.
|
| 181 |
+
|
| 182 |
+
Table 4: The sensitivity of $c$ on CIFAR models of WideResNet
|
| 183 |
+
|
| 184 |
+
<table><tr><td>CIFAR WideResNet</td><td>c=0.0</td><td>c=0.3</td><td>c=0.5</td><td>c=0.6</td><td>c=0.7</td><td>c=0.8</td></tr><tr><td>Natural data</td><td>82.88</td><td>86.76</td><td>90.42</td><td>90.87</td><td>91.51</td><td>92.35</td></tr><tr><td>PGD100</td><td>43.70</td><td>46.90</td><td>50.95</td><td>55.90</td><td>57.80</td><td>55.60</td></tr></table>
|
| 185 |
+
|
| 186 |
+
Table 5: The sensitivity of $c$ on CIFAR models with CNNs
|
| 187 |
+
|
| 188 |
+
<table><tr><td>CIFAR CNNs</td><td>c=0.1</td><td>c=0.5 c=0.9</td><td> natural training</td></tr><tr><td>NAT</td><td>66.26</td><td>75.70 82.02</td><td>80.85</td></tr><tr><td>PGD40</td><td>26.67</td><td>20.26 3.95</td><td>0.00</td></tr></table>
|
| 189 |
+
|
| 190 |
+
CIFAR: We train train WideResNet-34-10 with several different $c$ values. Except that for $c = 0 . 8$ we stopped learning at 120 epoch, other models are trained for 300 epochs. We report the adversarial accuracy against and PGD100 attacks with a step size $\eta _ { 1 } = 2 / 2 5 5$ for the first 2000 test examples, with random 20 restarts. The results are in Table 4.
|
| 191 |
+
|
| 192 |
+
Interestingly, while the natural accuracy positively correlated to the $c$ value, the robustness does not show clear negative correlation to $c$ . Rather, as $c$ become closer to 0.7, more robust result the model shows. As we see that $c = 0 . 8$ has better robustness than $c \leq 0 . 5$ , in CIFAR, the main reason of the observed trade-off could attribute to the influential adversarial perturbations.
|
| 193 |
+
|
| 194 |
+
For the CIFAR dataset, we also try to train a robust model with a small capacity. We intentionally choose the CNNs model that is used in Experiment 1 for MNIST. This model can be not enough for adversarial training on CIFAR. We report the results in Table 5. Given the serious lack of model capacity, the decrease in natural accuracy of SENSE models compared with the naturally trained model is not serious, while achieving better robust accuracy numbers. Note that none of our models collapse, and therefore the possibility of sensible adversarial training is not sensitive to the choice of $c$ even in the lack of model capacity.
|
| 195 |
+
|
| 196 |
+
# 6 CONCLUDING REMARKS
|
| 197 |
+
|
| 198 |
+
In this paper, we proposed a sensible adversary which is useful for learning a defense model, keeping a high natural accuracy simultaneously. We theoretically establish that the Bayes rule is most robust under the framework of sensible adversarial learning. Our learning algorithm is efficient and stable, and not sensitive to the choice of the main hyperparameter $c$ . Also, $c$ has a clear meaning as the lowest prediction-probability bound. Our empirical experiments yield state-of-the-art results of adversarial learning on the CIFAR10 and MNIST datasets. In addition, we showed that the sensible approach can effectively deal with the lack of model capacity. This is because by paying a robust accuracy on a certain area, the algorithm protects the model from being collapsed by influential adversarial examples. Furthermore, the sensible adversarial learning trains a model to have high prediction margins on both natural and adversarial examples.
|
| 199 |
+
|
| 200 |
+
We now mention several future directions for research on sensible adversary. One remaining theoretical problem is to develop generalization error bounds for sensible adversary learning, so that we can theoretically justify our empirical performance. In fact, in this work, we did not tackle the lack of sample size. In particular, as our algorithm tends to produce a model with large natural and adversarial prediction margins, in the lack of sample size, it is not clear if this large margins are always beneficial. Therefore, there is much remaining work to be done to theoretically understand the high margin tendency of the models trained with sensible adversarial examples with relation to generalization.
|
| 201 |
+
|
| 202 |
+
REFERENCES
|
| 203 |
+
Battista Biggio, Igino Corona, Davide Maiorca, Blaine Nelson, Nedim Srndi ˇ c, Pavel Laskov, Giorgio Giacinto, ´ and Fabio Roli. Evasion attacks against machine learning at test time. In Joint European conference on machine learning and knowledge discovery in databases, pp. 387–402. Springer, 2013.
|
| 204 |
+
Sebastien Bubeck, Eric Price, and Ilya Razenshteyn. Adversarial examples from computational constraints. ´ arXiv preprint arXiv:1805.10204, 2018.
|
| 205 |
+
Gavin Weiguang Ding, Kry Yik Chau Lui, Xiaomeng Jin, Luyu Wang, and Ruitong Huang. On the sensitivity of adversarial robustness to input data distributions. arXiv preprint arXiv:1902.08336, 2019a.
|
| 206 |
+
Gavin Weiguang Ding, Luyu Wang, and Xiaomeng Jin. AdverTorch v0.1: An adversarial robustness toolbox based on pytorch. arXiv preprint arXiv:1902.07623, 2019b.
|
| 207 |
+
Yinpeng Dong, Fangzhou Liao, Tianyu Pang, Hang Su, Jun Zhu, Xiaolin Hu, and Jianguo Li. Boosting adversarial attacks with momentum. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 9185–9193, 2018.
|
| 208 |
+
Justin Gilmer, Luke Metz, Fartash Faghri, Samuel S Schoenholz, Maithra Raghu, Martin Wattenberg, and Ian Goodfellow. Adversarial spheres. arXiv preprint arXiv:1801.02774, 2018.
|
| 209 |
+
Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. arXiv preprint arXiv:1412.6572, 2014.
|
| 210 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016.
|
| 211 |
+
Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical report, Citeseer, 2009.
|
| 212 |
+
Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial examples in the physical world. arXiv preprint arXiv:1607.02533, 2016a.
|
| 213 |
+
Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial machine learning at scale. arXiv preprint arXiv:1611.01236, 2016b.
|
| 214 |
+
Yann LeCun, Corinna Cortes, and CJ Burges. Mnist handwritten digit database. AT&T Labs [Online]. Available: http://yann. lecun. com/exdb/mnist, 2:18, 2010.
|
| 215 |
+
Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. arXiv preprint arXiv:1706.06083, 2017.
|
| 216 |
+
Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, and Pascal Frossard. Deepfool: a simple and accurate method to fool deep neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 2574–2582, 2016.
|
| 217 |
+
Maria-Irina Nicolae, Mathieu Sinn, Minh Ngoc Tran, Ambrish Rawat, Martin Wistuba, Valentina Zantedeschi, Nathalie Baracaldo, Bryant Chen, Heiko Ludwig, Ian Molloy, and Ben Edwards. Adversarial robustness toolbox v0.8.0. CoRR, 1807.01069, 2018. URL https://arxiv.org/pdf/1807.01069.
|
| 218 |
+
Nicolas Papernot, Patrick McDaniel, Somesh Jha, Matt Fredrikson, Z Berkay Celik, and Ananthram Swami. The limitations of deep learning in adversarial settings. In 2016 IEEE European Symposium on Security and Privacy (EuroS&P), pp. 372–387. IEEE, 2016.
|
| 219 |
+
Jonas Rauber, Wieland Brendel, and Matthias Bethge. Foolbox v0.8.0: A python toolbox to benchmark the robustness of machine learning models. CoRR, abs/1707.04131, 2017. URL http://arxiv.org/abs/ 1707.04131.
|
| 220 |
+
Dale Schuurmans Ruitong Huang, Bing Xu and Csaba Szepesvari. Learning with a strong adversary. arXiv preprint arXiv:1511.03034, 2015.
|
| 221 |
+
Ludwig Schmidt, Shibani Santurkar, Dimitris Tsipras, Kunal Talwar, and Aleksander Madry. Adversarially robust generalization requires more data. In Advances in Neural Information Processing Systems, pp. 5014– 5026, 2018.
|
| 222 |
+
David Stutz, Matthias Hein, and Bernt Schiele. Disentangling adversarial robustness and generalization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 6976–6987, 2019.
|
| 223 |
+
Dong Su, Huan Zhang, Hongge Chen, Jinfeng Yi, Pin-Yu Chen, and Yupeng Gao. Is robustness the cost of accuracy?–a comprehensive study on the robustness of 18 deep image classification models. In Proceedings of the European Conference on Computer Vision (ECCV), pp. 631–648, 2018.
|
| 224 |
+
Arun Sai Suggala, Adarsh Prasad, Vaishnavh Nagarajan, and Pradeep Ravikumar. Revisiting adversarial risk. arXiv preprint arXiv:1806.02924, 2018.
|
| 225 |
+
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.
|
| 226 |
+
Pedro Tabacof and Eduardo Valle. Exploring the space of adversarial images. In 2016 International Joint Conference on Neural Networks (IJCNN), pp. 426–433. IEEE, 2016.
|
| 227 |
+
Dimitris Tsipras, Shibani Santurkar, Logan Engstrom, Alexander Turner, and Aleksander Madry. Robustness may be at odds with accuracy. stat, 1050:11, 2018.
|
| 228 |
+
Dong Yin, Kannan Ramchandran, and Peter Bartlett. Rademacher complexity for adversarially robust generalization. arXiv preprint arXiv:1810.11914, 2018.
|
| 229 |
+
Hongyang Zhang, Yaodong Yu, Jiantao Jiao, Eric P Xing, Laurent El Ghaoui, and Michael I Jordan. Theoretically principled trade-off between robustness and accuracy. arXiv preprint arXiv:1901.08573, 2019.
|
| 230 |
+
|
| 231 |
+
# Appendices
|
| 232 |
+
|
| 233 |
+
# A ADDITIONAL RELATED WORK
|
| 234 |
+
|
| 235 |
+
Bubeck et al. (2018) conjecture that learning a robust model is information theoretically possible but computationally intractable. They introduce an example which is not robustly learnable in polynomial time. Our view is consistent with Bubeck et al. (2018) in that a robust model exists, but we search for an efficient algorithm to estimate a robust model in a reasonable time. Su et al. (2018) compared various naturally trained models on ImageNet, and found that the trade-off varies among different model architectures. Also, they empirically discovered that more accurate models tend to be less robust when the models are trained with natural examples. Stutz et al. (2019) demonstrate that given a large training set, adversarial training can produce a robust model that is as accurate as a naturally trained model. Our work to maximize the synergistic effect between natural and adversarial accuracy is consistent to their demonstration. Also, they show that most of PGD attacks are offmanifold of the original data, and by on-manifold adversarial training, the natural accuracy can be improved. If we see the restricted space $\tilde { \mathcal X }$ as the data manifold, and $\tilde { \mathcal X } ^ { c }$ as off-manifold, our sensible framework aligns with their view, given the data manifolds of different classes are separated by at least 2. Kurakin et al. (2016b) suggest adversarial learning that trains with data randomly divided into two parts, a natural and adversarial set. We divide data in a data adaptive way into three parts including a sensibly reversed adversarial set. The relationship between their approach and our algorithm is discussed more in Appendix F.
|
| 236 |
+
|
| 237 |
+
# B PROOFS OF THEOREMS
|
| 238 |
+
|
| 239 |
+
To save the space, we use $\eta ( k | x )$ to denote $\mathbb { P } ( Y = k | X = x )$ .
|
| 240 |
+
|
| 241 |
+
Theorem 1. (Restated) Let $\mathcal { R } _ { s t d } ^ { * }$ denote the minimum standard risk which is $\mathcal { R } _ { s t d } ( f ^ { B } )$ . Then we have $\mathcal { R } _ { r o b } ^ { s } ( f ^ { B } ) = \mathcal { R } _ { s t d } ^ { * }$ . Furthermore, $f ^ { B }$ is the unique minimizer of $\mathcal { R } _ { r o b } ^ { s } ( f )$ among $f \in { \mathcal { F } }$ .
|
| 242 |
+
|
| 243 |
+
Proof.
|
| 244 |
+
|
| 245 |
+
$$
|
| 246 |
+
\begin{array} { r l } & { \mathcal { R } _ { r o b } ^ { s } ( f ^ { B } ) = \mathbb { P } ( f ^ { B } ( \tilde { X } ) \neq Y ) } \\ & { \quad \quad = \mathbb { P } ( f ^ { B } ( X ) \neq Y ) + \mathbb { P } ( f ^ { B } ( X ) = Y , \mathrm { a n d } \ \exists x ^ { \prime } \in S _ { X , \epsilon } ( f ^ { B } ) \ s . t . \ f ^ { B } ( x ^ { \prime } ) \neq Y ) } \\ & { \quad \quad = \mathbb { P } ( f ^ { B } ( X ) \neq Y ) + 0 , \quad \ \mathrm { ~ b y ~ t h e ~ d e f n i t i o n ~ o f ~ } S _ { X , \epsilon } ( f ^ { B } ) } \\ & { \quad \quad = \mathcal { R } _ { s t d } ( f ^ { B } ) = \mathcal { R } _ { s t d } ^ { * } . } \end{array}
|
| 247 |
+
$$
|
| 248 |
+
|
| 249 |
+
It is obvious that $f ^ { B }$ is a minimizer of $\mathcal { R } _ { r o b } ^ { s } ( f )$ because $\mathcal { R } _ { s t d } ^ { * }$ is a lower bound of $\mathcal { R } _ { r o b } ^ { s } ( f )$ for any $f \in { \mathcal { F } }$ .
|
| 250 |
+
Now we show $f ^ { B }$ is the unique minimizer of $\mathcal { R } _ { r o b } ^ { s } ( f )$ .
|
| 251 |
+
|
| 252 |
+
$$
|
| 253 |
+
\begin{array} { l } { { \displaystyle { \mathcal R } _ { r \to \theta } ^ { s } ( f ) = \mathbb { P } ( f ^ { B } ( X ) \neq Y , f ( X ) \neq Y ) + \mathbb { P } ( f ^ { B } ( X ) = Y ; \exists x ^ { \prime } \in S _ { x , r } ( f ^ { B } ) \ s , t , f ( x ^ { \prime } ) \neq Y ) } } \\ { { \displaystyle = \sum _ { k = 1 } ^ { K } \mathbb { P } ( f ^ { B } ( X ) \neq k , f ( X ) \neq k , Y = k ) + \mathbb { P } ( f ^ { B } ( X ) = k , \exists x ^ { \prime } \in S _ { X ^ { \prime } } ( f ^ { B } ) \ s , t , f ( x ^ { \prime } ) \neq k , Y = \pmb { \mathbb { P } } ( f ^ { B } ( X ) \neq k , T ) ) } } \\ { ~ } \\ { { \displaystyle = \sum _ { k = 1 } ^ { K } \int _ { X } \mathbb { P } ( f ^ { B } ( x ) \neq k , f ( x ) \neq k , Y = k | X = x ) } } \\ { { \displaystyle ~ + \mathbb { P } ( f ^ { B } ( x ) = k , \exists x ^ { \prime } \in S _ { x , r } ( f ^ { B } ) \ s , t , f ( x ^ { \prime } ) \neq k , Y = k | X = x ) d \mathbb { P } ( x ) } } \\ { { \displaystyle = \sum _ { k = 1 } ^ { K } \int _ { X } 1 _ { f ^ { B } ( x ) \neq k , f ( x ) \neq k } \eta ( k | x ) + 1 _ { f ^ { B } ( x ) = k , \exists x ^ { \prime } \in S _ { x , r } ( f ^ { n } ) \ s , t , f ( x ^ { \prime } ) \neq k } \eta ( k | x ) d \mathbb { P } ( x ) } } \\ { { \displaystyle = \mathbb { R } _ { s \neq 0 } ( f ) + \sum _ { k = 1 } ^ { K } \int _ { X } 1 _ { f ^ { B } ( x ) = k } ( 1 _ { \exists x ^ { \prime } \in S _ { x , r } ( f ^ { B } ) \ s , t , f ( x ^ { \prime } ) \neq k } - 1 _ { f ( x ) \neq k } ) \eta ( k | x ) d \mathbb { P } ( x ) } } \end{array}
|
| 254 |
+
$$
|
| 255 |
+
|
| 256 |
+
The last equality is by $1 _ { f ^ { B } ( x ) \neq k , f ( x ) \neq k } = ( 1 - 1 _ { f ^ { B } ( x ) = k } ) 1 _ { f ( x ) \neq k } .$
|
| 257 |
+
|
| 258 |
+
The first term $\mathcal { R } _ { s t d } ( f )$ is uniquely minimized by the Bayes rule $f ^ { B }$ . The second term is always non-negative, and is zero when $f = f ^ { B }$ . Therefore, $\mathcal { R } _ { r o b } ^ { s } ( f )$ is uniquely minimized by $f ^ { B }$ .
|
| 259 |
+
|
| 260 |
+
Theorem 2. (Restated) Let $S _ { X , \epsilon }$ be an $\epsilon$ -ball centered at $X$ . Then for any $f \in { \mathcal { F } }$ and for any set $A \subset$ $\mathcal { X } \setminus D B ( f ^ { B } , \epsilon )$ ,
|
| 261 |
+
|
| 262 |
+
$$
|
| 263 |
+
\begin{array} { r } { \mathbb { P } \Big ( \exists x ^ { \prime } \in S _ { X , \epsilon } \circ . t . \ f ^ { B } ( x ^ { \prime } ) \neq Y , X \in A \Big ) \leq \mathbb { P } \Big ( \exists x ^ { \prime } \in S _ { X , \epsilon } \circ . t . \ f ( x ^ { \prime } ) \neq Y , X \in A \Big ) . } \end{array}
|
| 264 |
+
$$
|
| 265 |
+
|
| 266 |
+
Proof. For any set $\begin{array} { r } { A \subset \mathcal { X } \backslash D B ( f ^ { B } , \epsilon ) , { \mathbb { P } } ( \exists x ^ { \prime } \in S _ { X , \epsilon } \circ . t . f ^ { B } ( x ^ { \prime } ) \neq Y , X \in A ) = { \mathbb { P } } ( f ^ { B } ( X ) \neq \mathbb { P } ) , } \end{array}$ . Note that on any subset $B \subset { \mathcal { X } }$ , the Bayes rule has the least error probability. Therefore, $\mathbb { P } ( f ^ { B } ( X ) \neq Y , X \in$ $A ) \leq \mathbb { P } ( f ( X ) \neq Y , X \in A ) \leq \mathbb { P } ( \exists x ^ { \prime } \in S _ { X , \epsilon } \ \varepsilon$ s.t. $f ( x ^ { \prime } ) \neq Y , { \hat { X } } \in A )$ . The last inequality is trivial because if $f ( X ) \neq Y \Rightarrow \exists x ^ { \prime } \in S _ { X , \epsilon } \ \varepsilon$ .t. $f ( x ^ { \prime } ) \neq Y$ . □
|
| 267 |
+
|
| 268 |
+
Theorem 3. (Restated) Let $\mathcal { A } _ { \epsilon } = \big \{ f \in \mathcal { F } \big | \tilde { \mathbb { P } } \big ( f ( x ) = f ^ { B } ( x ) , \forall x \in S _ { X , \epsilon } ( f ^ { B } ) \big ) = 1 \big \}$ and $\tilde { \mathcal { R } } _ { r o b } ^ { s } ( f ) =$ $\mathbb { E } _ { \tilde { \mathbb { P } } _ { X , Y } } [ \ell _ { r o b , \epsilon } ^ { s } ( f , X , Y ) ]$ . Then, for any $\epsilon > 0$ , $\tilde { \mathcal { R } } _ { r o b } ^ { s } ( f )$ is only minimized by any $f \in \mathcal A _ { \epsilon }$ . Furthermore, if $B ( \tilde { \mathcal { X } } , \epsilon ) \supset \mathcal { X } , f ^ { B }$ is the unique minimizer of $\tilde { \mathcal { R } } _ { r o b } ^ { s } ( f )$ .
|
| 269 |
+
|
| 270 |
+
Proof. The sensible risk of $f$ w.r.t. the restricted distribution corresponding to (6) is
|
| 271 |
+
|
| 272 |
+
$$
|
| 273 |
+
\begin{array} { l } { \displaystyle \tilde { \mathcal { R } } _ { r o b } ^ { s } ( f ) = \tilde { \mathcal { R } } _ { s t d } ( f ) + \sum _ { k = 1 } ^ { K } \int _ { \tilde { x } } \mathbf { 1 } _ { f ^ { B } ( x ) = k } \big ( \mathbf { 1 } _ { \exists x ^ { \prime } \in S _ { x , c } ( f ^ { B } ) \ s . t . \ f ( x ^ { \prime } ) \neq k } - \mathbf { 1 } _ { f ( x ) \neq k } \big ) \eta ( k | x ) d \tilde { \mathbb { P } } ( x ) } \\ { \displaystyle \qquad = \tilde { \mathcal { R } } _ { s t d } ( f ) + \int _ { \tilde { \mathcal { X } } } \sum _ { k = 1 } ^ { K } \mathbf { 1 } _ { f ^ { B } ( x ) = k } \big ( \mathbf { 1 } _ { \exists x ^ { \prime } \in S _ { x , c } ( f ^ { B } ) \ s . t . \ f ( x ^ { \prime } ) \neq f ^ { B } ( x ) } - \mathbf { 1 } _ { f ( x ) \neq f ^ { B } ( x ) } \big ) \eta \big ( f ^ { B } ( x ) | x \big ) d \tilde { \mathbb { P } } ( x ) } \\ { \displaystyle \qquad = \tilde { \mathcal { R } } _ { s t d } ( f ) + \int _ { \tilde { \mathcal { X } } } \big ( \mathbf { 1 } _ { \exists x ^ { \prime } \in S _ { x , c } ( f ^ { B } ) \ s . t . \ f ( x ^ { \prime } ) \neq f ^ { B } ( x ) } - \mathbf { 1 } _ { f ( x ) \neq f ^ { B } ( x ) } \big ) \eta \big ( f ^ { B } ( x ) | x \big ) d \tilde { \mathbb { P } } ( x ) } \end{array}
|
| 274 |
+
$$
|
| 275 |
+
|
| 276 |
+
because $\tilde { \mathbb { P } } ( Y = k | X = x ) = \mathbb { P } ( Y = k | X = x )$ for $x \in \tilde { \mathcal { X } }$ . The minimum of $\tilde { \mathcal { R } } _ { r o b } ^ { s } ( f )$ is achieved by $f ^ { B }$ with the minimum value $\tilde { \mathcal { R } } ^ { * } = \tilde { \mathcal { R } } _ { s t d } ( f ^ { B } ) + 0$ . Therefore, any function $f$ that $\tilde { \mathcal { R } } _ { s t d } ( f ) > \tilde { \mathcal { R } } ^ { * }$ cannot achieve the minimum of $\tilde { \mathcal { R } } _ { r o b } ^ { s } ( f )$ because the term $\left( 1 _ { \exists x ^ { \prime } \in S _ { x , \epsilon } ( f ^ { B } ) } \right.$ s.t. $f ( x ^ { \prime } ) { \neq } f ^ { B } ( x ) \ - \ 1 _ { f ( x ) { \neq } f ^ { B } ( x ) } )$ in (8) is always non-negative. Therefore, only functions in $\mathcal { A } = \left\{ f \in \mathcal { F } | \tilde { \mathbb { P } } \big ( f ( X ) = f ^ { B } ( X ) \big ) = 1 \right\}$ need to be considered as possible minimizers of $\tilde { \mathcal { R } } _ { r o b } ^ { s } ( f )$ .
|
| 277 |
+
|
| 278 |
+
Note that $\mathcal { A } _ { \epsilon } \subset \mathcal { A }$ . By the definition, we know that $f \in { \mathcal { A } } \setminus { \mathcal { A } } _ { \epsilon }$ if and only if
|
| 279 |
+
|
| 280 |
+
$$
|
| 281 |
+
\begin{array} { r l } & { i ) \tilde { \mathbb { P } } \big ( f ( X ) = f ^ { B } ( X ) \big ) = 1 } \\ & { i i ) \tilde { \mathbb { P } } \big ( f ( x ) = f ^ { B } ( x ) , \forall x \in S _ { X , \epsilon } ( f ^ { B } ) \big ) < 1 } \end{array}
|
| 282 |
+
$$
|
| 283 |
+
|
| 284 |
+
Therefore, for $f \in \mathcal { A } \backslash \mathcal { A } _ { \epsilon }$ , $\exists A \subset { \tilde { \mathcal { X } } }$ s.t. $\tilde { \mathbb { P } } ( X \in A ) > 0$ and $\exists x ^ { \prime } \in S _ { x , \epsilon } ( f ^ { B } )$ for $\forall x \in A$ s.t. $f ( x ^ { \prime } ) \neq f ^ { B } ( x ^ { \prime } )$ For this $f$ , the equation in (8) can be written as $\tilde { \mathcal { R } } _ { r o b } ^ { s } ( f ) = \tilde { \mathcal { R } } ^ { * } + \alpha$ for some $\alpha \geq 0$ . Now we show that $\alpha > 0$
|
| 285 |
+
|
| 286 |
+
Note that by the definition of the Bayes rule, $\mathbb { P } ( y = f ^ { B } ( x ) | X = x ) \ge \frac { 1 } { K }$ . Otherwise, $\begin{array} { r } { 1 = \sum _ { k = 1 } ^ { K } { \mathbb { P } } ( y = } \end{array}$ $k | X = x ) \leq K \mathbb { P } ( y = f ^ { B } ( x ) | X = x ) < 1$ , which is contradict. Then, for the $f \in { \mathcal { A } } \setminus { \mathcal { A } } _ { \epsilon }$ and $A \subset { \tilde { \mathcal { X } } }$ that are described above,
|
| 287 |
+
|
| 288 |
+
$$
|
| 289 |
+
\begin{array} { r l } & { \displaystyle \int ( 1 _ { \exists x ^ { \prime } \in S _ { x , \epsilon } ( f ^ { B } ) ~ s . t . ~ f ( x ^ { \prime } ) \neq f ^ { B } ( x ) } - 1 _ { f ( x ) \neq f ^ { B } ( x ) } ) \eta \big ( f ^ { B } ( x ) | x \big ) d \tilde { \mathbb { P } } ( x ) } \\ & { \ge \displaystyle \frac { 1 } { K } \int _ { \tilde { \mathcal { X } } } \big ( 1 _ { \exists x ^ { \prime } \in S _ { x , \epsilon } ( f ^ { B } ) ~ s . t . ~ f ( x ^ { \prime } ) \neq f ^ { B } ( x ) } - 1 _ { f ( x ) \neq f ^ { B } ( x ) } \big ) d \tilde { \mathbb { P } } ( x ) } \\ & { = \displaystyle \frac { 1 } { K } \int _ { \tilde { \mathcal { X } } } \big ( 1 _ { \exists x ^ { \prime } \in S _ { x , \epsilon } ( f ^ { B } ) ~ s . t . ~ f ( x ^ { \prime } ) \neq f ^ { B } ( x ) } \big ) d \mathbb { P } ( x ) ~ \mathrm { b y } ~ f \in \mathcal { A } } \\ & { \ge \displaystyle \frac { 1 } { K } \int _ { A } \big ( 1 _ { \exists x ^ { \prime } \in S _ { x , \epsilon } ( f ^ { B } ) ~ s . t . ~ f ( x ^ { \prime } ) \neq f ^ { B } ( x ) } \big ) d \mathbb { P } ( x ) = \frac { \mathbb { P } ( A ) } { K } > 0 . } \end{array}
|
| 290 |
+
$$
|
| 291 |
+
|
| 292 |
+
Therefore, $\alpha > 0$ . Note that for any $f \in A _ { \epsilon }$ , the second term in (8) is zero by the definition of $\mathcal { A } _ { \epsilon }$ . Therefore, first result of the theorem is proved. Furthermore, for $\epsilon$ such that $B ( \tilde { \mathcal { X } } , \epsilon ) \supset \mathcal { X } , \mathcal { A } _ { \epsilon } = \{ f ^ { B } \}$ . Therefore, when $B ( \tilde { \mathcal { X } } , \epsilon ) \supset \mathcal { X } , f ^ { B }$ is the unique minimizer of $\tilde { \mathcal { R } } _ { r o b } ^ { s } ( f )$ . □
|
| 293 |
+
|
| 294 |
+
Theorem 4. Let $\mathcal { A } = \left\{ f \in \mathcal { F } | \tilde { \mathbb { P } } \big ( f ( X ) = f ^ { B } ( X ) \big ) = 1 \right\}$ , and take a reference function $f _ { r } \in \mathcal { A }$ . Consider extended sensible adversarial examples, with $c < 1$ and $\ell$ as the 0-1 loss. Then, for any $\epsilon > 0$ , $\tilde { \mathcal { R } } _ { r o b } ^ { s } ( f | f _ { r } ) =$ $\mathbb { E } _ { \tilde { \mathbb { P } } _ { X , Y } } [ \ell ( f ( \tilde { X } | _ { f _ { r } } , Y ) ]$ is uniquely minimized by $f _ { r }$ .
|
| 295 |
+
|
| 296 |
+
Theorem 4 says that for $f _ { r } \in \mathcal { A }$ , which behaves as the Bayes rule $f ^ { B }$ on the restricted support, the corresponding sensible adversarial risk $E _ { \tilde { \mathbb { P } } _ { X , Y } } [ \ell ( f ( \tilde { X } | _ { f _ { r } } , Y ) ]$ is minimized only by $f _ { r }$ . This implies that if we do not have any information about the Bayes rule on $\tilde { \mathcal X } ^ { c }$ , the sensibly optimal model w.r.t. $\tilde { \mathbb { P } } _ { X , Y }$ can be arbitrary on $\tilde { \mathcal X } ^ { c }$ although this optimal model is the Bayes rule on $\tilde { \mathcal X }$ . Our algorithm deals with this arbitrariness by searching for a better reference function in each iteration. As a current model is used as a reference function, i.e., the estimation of the defense model and the reference model is identical, the algorithm essentially pursues sensibleness on $\tilde { \mathcal X }$ and robustness on $\tilde { \mathcal X } ^ { c }$ of the trained model. Note that on $\tilde { \mathcal X }$ , sensibleness a sufficient condition for natural accuracy.
|
| 297 |
+
|
| 298 |
+
Proof. By using the same way to derive (6) and (8) and noting that $f _ { r } ( x ) = f ^ { B } ( x )$ on $\tilde { \mathcal X }$ , we get
|
| 299 |
+
|
| 300 |
+
$$
|
| 301 |
+
\begin{array} { l } { \displaystyle \tilde { \mathcal { R } } _ { r o b } ^ { s } ( f | f _ { r } ) = \tilde { \mathcal { R } } _ { s t d } ( f ) + \sum _ { k = 1 } ^ { K } \int _ { \tilde { \mathcal { X } } } 1 _ { f ^ { B } ( x ) = k } \big ( 1 _ { \exists x ^ { \prime } \in S _ { x , \epsilon } ( f _ { r } ) ~ s . t . ~ f ( x ^ { \prime } ) \neq k } - 1 _ { f ( x ) \neq k } \big ) \eta ( k | x ) d \tilde { \mathbb { P } } ( x ) } \\ { \displaystyle \qquad = \tilde { \mathcal { R } } _ { s t d } ( f ) + \int _ { \tilde { \mathcal { X } } } ( 1 _ { \exists x ^ { \prime } \in S _ { x , \epsilon } ( f _ { r } ) ~ s . t . ~ f ( x ^ { \prime } ) \neq f ^ { B } ( x ) } - 1 _ { f ( x ) \neq f ^ { B } ( x ) } ) \eta \big ( f ^ { B } ( x ) | x \big ) d \tilde { \mathbb { P } } ( x ) } \end{array}
|
| 302 |
+
$$
|
| 303 |
+
|
| 304 |
+
Because $f _ { r } ( x ) = f ^ { B } ( x )$ on $\tilde { \mathcal X }$ , $\tilde { \mathcal { R } } _ { s t d } ( f _ { r } ) = \tilde { \mathcal { R } } _ { s t d } ( f ^ { B } )$ . This implies $f _ { r }$ minimizes $\mathcal { \tilde { R } } _ { r o b } ^ { s } ( f | f _ { r } )$ because $\mathcal { \tilde { R } } _ { s t d } ( f ^ { B } )$ is the minimum of $\mathcal { \tilde { R } } _ { s t d } ( f )$ for all $f \in { \mathcal { F } }$ and the second term in (9) is non-negative. This implies any function $f$ s.t. $\tilde { \mathcal { R } } _ { s t d } ( f ) ~ > ~ \tilde { \mathcal { R } } _ { s t d } ( f ^ { B } )$ cannot achieve the minimum of $\mathcal { \tilde { R } } _ { r o b } ^ { s } ( f | f _ { r } )$ . Therefore, as a minimizer of $\mathcal { \tilde { R } } _ { r o b } ^ { s } ( f | f _ { r } )$ , we only need to consider $f \in { \mathcal { A } }$ . Note that $1 _ { f ( x ) \neq f ^ { B } ( x ) } = 0$ for $f \in { \mathcal { A } }$ on $\tilde { \mathcal X }$ . Therefore, by letting $\mathcal { \tilde { R } } _ { s t d } ^ { * }$ be $\mathcal { \tilde { R } } _ { s t d } ( f ^ { B } )$ , the equation in (9) can be written as
|
| 305 |
+
|
| 306 |
+
$$
|
| 307 |
+
\begin{array} { r l r } & { } & { \tilde { \mathcal { R } } _ { r o b } ^ { s } ( f | f _ { r } ) = \tilde { \mathcal { R } } _ { s t d } ^ { * } + \displaystyle \int _ { \tilde { \mathcal { X } } } 1 _ { \exists \boldsymbol { x } ^ { \prime } \in S _ { \boldsymbol { x } , \epsilon } ( f _ { r } ) ~ s . t . ~ f ( \boldsymbol { x } ^ { \prime } ) \neq f ^ { B } ( \boldsymbol { x } ) } \eta \big ( f ^ { B } ( \boldsymbol { x } ) | \boldsymbol { x } \big ) d \tilde { \mathbb { P } } ( \boldsymbol { x } ) } \\ & { } & { \qquad = \tilde { \mathcal { R } } _ { s t d } ^ { * } + \displaystyle \int _ { \tilde { \mathcal { X } } } 1 _ { \exists \boldsymbol { x } ^ { \prime } \in S _ { \boldsymbol { x } , \epsilon } ( f _ { r } ) ~ s . t . ~ f ( \boldsymbol { x } ^ { \prime } ) \neq f _ { r } ( \boldsymbol { x } ) } \eta \big ( f ^ { B } ( \boldsymbol { x } ) | \boldsymbol { x } \big ) d \tilde { \mathbb { P } } ( \boldsymbol { x } ) } \end{array}
|
| 308 |
+
$$
|
| 309 |
+
|
| 310 |
+
Note that $\eta ( f ^ { B } ( x ) | x )$ is positive on $\tilde { \mathcal X }$ . Therefore, for $f \in { \mathcal { A } }$ to minimize (10), it must satisfy that $\tilde { \mathbb { P } } ( \exists x ^ { \prime } \in$ $S _ { X , \epsilon } ( f _ { r } )$ s.t. $f ( x ^ { \prime } ) \neq f _ { r } ( x ^ { \prime } ) ) = 0$ . This essentially says $f$ should be $f _ { r }$ .
|
| 311 |
+
|
| 312 |
+
# C ALGORITHM
|
| 313 |
+
|
| 314 |
+
# Algorithm 2 Sensible adversarial training for $\ell _ { p }$ norm restriction
|
| 315 |
+
|
| 316 |
+
<table><tr><td colspan="2">=X adv</td></tr><tr><td colspan="2">2:repeat for i =1,.,.m,s.t. f(xiadv)= yi (0) 4:</td></tr><tr><td colspan="2"></td></tr><tr><td colspan="2">for k = 1.,..., K</td></tr><tr><td colspan="2"></td></tr><tr><td colspan="2">(k) (k-1)) xi,adu ←IIBp(xi,e)(m1 (k</td></tr><tr><td colspan="2">Ve(f(xiad),yi)lp</td></tr><tr><td colspan="2">(k) 6:</td></tr><tr><td colspan="2">(K) (k-1)</td></tr><tr><td colspan="2">(sensible reversion)</td></tr><tr><td colspan="2">xiadu break (K)</td></tr></table>
|
| 317 |
+
|
| 318 |
+
Algorithm 2 is a straightforward extension of Algorithm 1 from $\ell _ { \infty }$ norm to $\ell _ { p }$ norm. In addition, we present another way to realize the sensible reversion. After stepping back when the loss exceeds the threshold, we can add a random noise as the next step instead of just breaking the iteration as in Algorithm 1 and 2. Considering the nature of (mini-) batch leaning, this random noise does not add much computational cost because until every loss exceeds the threshold, the for loop would keep calculating the forward and backward loop with fixed perturbation for the reversed examples. This algorithm for $\ell _ { \infty }$ norm is presented in Algorithm 3, of which the objective function is also (5). Algorithm 3 also reverses the adversarial example when the loss is greater than $\begin{array} { c } { { \mathrm { l o } \dot { \mathrm { g } } \frac { 1 } { c } } } \end{array}$ . The only difference is that instead of breaking the iteration after the reversion, it considers a random noise as the next step. This can lead to more effective search for the local loss maximizer in the ball ${ } _ { x , \epsilon } ( f )$ in definition 4. The extension of Algorithm 3 to $\ell _ { p }$ norm is straight forward, and thus omitted.
|
| 319 |
+
|
| 320 |
+
# Algorithm 3 Sensible adversarial training for $\ell _ { \infty }$ norm restriction
|
| 321 |
+
|
| 322 |
+
Input: Initialized $f = f _ { \theta }$ , $c \in ( 0 , 1 )$ , step number $K$ , step sizes $\eta _ { 1 } , \eta _ { 2 }$ , data $X _ { a d v } ^ { ( 0 ) } = X$ repeat
|
| 323 |
+
|
| 324 |
+
3: for $i = 1 , . . . , m$ , s.t. $f ( x _ { i , a d v } ^ { ( 0 ) } ) = y _ { i }$ for $k = 1 , . . . , K$ $\tilde { x } _ { i } \gets \Pi _ { B ( x _ { i } , \epsilon ) } ( s t e p _ { i } ^ { ( k ) } + x _ { i , a d v } ^ { ( k - 1 ) } )$ , Π: the projection operator
|
| 325 |
+
6: if $\begin{array} { r } { \ell ( f , \tilde { x } _ { i } , y _ { i } ) \leq \log \frac { 1 } { c } } \end{array}$ $x _ { i , a d v } ^ { ( k ) } = \tilde { x } _ { i }$ step (k+1)i = η1sign(∇x\`(f (x(k)i,adv), yi))
|
| 326 |
+
9: else $\stackrel { \prime } { x _ { i , a d v } ^ { ( k ) } } = x _ { i , a d v } ^ { ( k - 1 ) }$ $s t e p _ { i } ^ { ( k + 1 ) } =$ random noise
|
| 327 |
+
|
| 328 |
+
12: $\begin{array} { r } { \theta \gets \theta - \eta _ { 2 } \sum _ { i = 1 } ^ { m } \nabla _ { \theta } \ell ( f , x _ { i , a d v } ^ { ( K ) } , y _ { i } ) / m } \end{array}$ until training converged
|
| 329 |
+
|
| 330 |
+
# D THE LANDSCAPE FOR SENSIBLE ROBUST OPTIMIZATION
|
| 331 |
+
|
| 332 |
+
Note that when the original examples are incorrectly classified, full PGD examples can be very influential in regular adversarial training. If we do not add any perturbations on these potentially influential examples and add full PGD perturbations on the other examples, the resultant examples are equivalent to the sensible adversarial examples when $c = 0$ . Experiment 1 shows this small change keeps the models from collapsing, demonstrating how influential the PGD perturbations on the incorrectly classified natural examples. However, an adversarial training with the sensible adversarial examples with $c = 0$ , the empirical loss can largely fluctuate during the training; Once an incorrectly classified natural example becomes correctly classified, its full PGD attack can pose a sudden large gradient for the model update. Then, when it is incorrectly classified again, the loss on it suddenly reduces to the natural loss that is distinctly smaller than the large loss value on its full PGD attack. Therefore, whenever an example changes its state between a correctly and incorrectly classified example, i.e., the full PGD and natural stage, the corresponding loss can fluctuate making the learning unstable.
|
| 333 |
+
|
| 334 |
+
However, if we add sensible reversion step, particularly if $c \geq 0 . 5$ , this fluctuation does not occur. Between the two stages, the sensibly reversed stage provides a kind of cushion between the natural and full PGD stage, preventing the sudden change in the loss value as described. Until $S _ { x , \epsilon } ( f ) = S _ { x , \epsilon }$ , the sensibly adversarial perturbation for $x$ is adapted to make the loss of the current function approximately equal to $\begin{array} { r } { \log { \frac { 1 } { c } } } \end{array}$ . As the abstraction in Figure 4, it is like to have a virtually extended area at $\hat { p } _ { f , y } ( x ) = c$ on the loss function that is locally flat on $\{ \tilde { x } ^ { s } | S _ { x , \epsilon } ( f ) = S _ { x , \epsilon } \}$ , i.e., on a set of $\tilde { x } ^ { s }$ that are in the sensibly reversed stage. However, in spite of the existence of such a flat loss area, the model still can learn with $\tilde { x } ^ { s }$ in sensibly reversed stage. This is obvious because the cross-entropy loss has its non-zero gradient when it is $\begin{array} { r } { \log { \frac { 1 } { c } } } \end{array}$ . Interestingly, when the model is updated in a way to decrease the loss of the previous $\tilde { x } ^ { s }$ , the new sensible perturbation is again adapted to have the loss approximately equal to $\begin{array} { r } { \log { \frac { 1 } { c } } } \end{array}$ . Therefore, the course of training directs the model to have sensible adversarial examples in the full PGD stage. Furthermore, as long as $c > 0$ , even when $\tilde { x } ^ { s }$ is in a sensibly reversed stage, it still has perturbation in an adapted $\epsilon$ -ball. This helps to obtain a robustness although it is not on a full $\epsilon$ ball.
|
| 335 |
+
|
| 336 |
+
Note that for $c \geq 0 . 5$ , the learning is very stable because only natural examples can overpower the training; The large loss values are only achievable by sensible attack in the natural stage. Any single full PGD attack cannot dominate the next update of the training because the loss function has relatively small gradients on the full PGD stage. Therefore, our algorithms not only effectively ignore any influential full PGD attacks that may overpower the next update but also train a model that allows as many sensible attacks to be full PGD attacks. In other words, our algorithms can stably learn a robust model.
|
| 337 |
+
|
| 338 |
+
# E HIGH MARGIN PROPERTY OF SENSIBLE ADVERSARIAL TRAINING
|
| 339 |
+
|
| 340 |
+
In sensible adversarial learning, the natural accuracy clearly takes priority over the adversarial accuracy. The perturbed example is not allowed to cross the decision boundary of the Bayes rule in (2) or to reach the vicinity of the decision boundary of a reference function in (4). As mentioned, when the cross-entropy loss is used, ${ \hat { p } } _ { f , y } ( x ) \geq c$ is a prerequisite for adding any adversarial perturbation on $x$ . We note that this condition provides
|
| 341 |
+
|
| 342 |
+
# An abstraction of the sensible adversarial loss
|
| 343 |
+
|
| 344 |
+

|
| 345 |
+
Figure 4: An abstraction of the sensible adversarial loss when $c \geq 0 . 5$ . When $x$ is in the sensibly reversed stage for a current model $f$ , the loss of $\tilde { x } ^ { s }$ is approximately $\log { \frac { 1 } { c } }$ . Although the loss is approximately the same while $x$ stays in this stage, the model updates in a way to pushes the sensible adversarial example to become a full PGD attack as the arrow.
|
| 346 |
+
|
| 347 |
+
a lower bound of the following natural margin as
|
| 348 |
+
|
| 349 |
+
$$
|
| 350 |
+
M ( f , x , y ) = \log \hat { p } _ { f , y } ( x ) - \operatorname* { m a x } _ { y ^ { \prime } \neq y } \log \hat { p } _ { f , y ^ { \prime } } ( x ) \geq \log \frac { \hat { p } _ { f , y } ( x ) } { 1 - \hat { p } _ { f , y } ( x ) } \geq \log \frac { c } { 1 - c } .
|
| 351 |
+
$$
|
| 352 |
+
|
| 353 |
+
Therefore, the priority of natural accuracy hints that the learning will prevent the natural margin from being sacrificed for the sake of adversarial robustness. We note that the natural margin of $_ x$ is an upper bound of its adversarial margin. Therefore, if a model cannot confidently predict a natural example $_ x$ , neither can the model confidently predict any adversarial examples of $x$ .
|
| 354 |
+
|
| 355 |
+
Experiment 1 We investigate the margins of the models trained in Experiment 2, to understand the effect of $c$ . In Figure 5 we draw density plots of the margins on the test set for varying $c$ for the fixed capacities. Overall, we see that a larger $c$ results in a larger adversarial margins and natural margins. In Figure 6, we also draw the margins but for varying model capacity. In general, for a each $c$ , a smaller capacity has more data points of negative margins. However, for naturally trained models, i.e., the models with $c = 1 . 0$ , a larger model has smaller adversarial margins. This is consistent to the observation of $\mathtt { S u }$ et al. (2018) that accurate models tend to be less robust when the models are trained with natural examples. On the other hand, although not displayed, the plots corresponding to $c = 0 . 9$ are essentially similar to the plots in the second low. This implies even for large $c$ , our method is not like natural learning; The models trained with $c = 0 . 9$ still have larger natural and adversarial margins.
|
| 356 |
+
|
| 357 |
+
Note that in Figure 3, the regular PGD model of capacity 5 has only few negative adversarial margins. Instead, their natural margins significantly smaller than those of the natural models. In contrast, our model has negative adversarial margins for a few more data points. Note that the majority of both natural and adversarial margins of the our models are significantly larger than that of the regular PGD models. For capacity 1,2 and 3, the regular PGD models collapse having small ”mean” of adversarial losses. On the contrary, our models deal with the lack of model capacity by letting more portion of examples to have negative margins. As demonstrated by Figure 5, in our methods the mean adversarial loss can be arbitrarily large. Instead, it maintains a large portion of points having relatively large adversarial margins, i.e., being far from decision boundaries.
|
| 358 |
+
|
| 359 |
+
The flip side of the advantage of high margin is the possibility of over fitting. For $c \geq 0 . 5$ in Figure 7, the best robust accuracies are not achieved when capacity is 5 but when capacity is 3. On the contrary, the PGD method achieves better robustness as the capacity increases. Therefore, there is a possibility of over-fitting problem that arises form the high margin property of sensible adversarial learning.
|
| 360 |
+
|
| 361 |
+

|
| 362 |
+
The margin distributions for the varying the loss parameter c
|
| 363 |
+
Figure 5: The prediction margins at convergence of the models in Experiment 1 on the test set.
|
| 364 |
+
|
| 365 |
+
Experiment 2 In Figure 8, we draw the plot of natural and adversarial margins on the testset of CIFAR10. Compared with the distribution of the TRADE model, the natural margin of the SENSE model is large. For the adversarial margins, the SENSE model has two clearly separated clusters; one is of negative margins and the other is of positive margins. Instead, the positive margins are distributed on the larger values. We remark that this phenomenon is consistent to the sensible idea to allow to be fooled near the decision boundary of the Bayes rule. When the capacity is not enough, the concept of the decision boundary is not of the Bayes rule. Its is projected to an inevitable boundary of a model with nice natural performance, caused by the lack of model capacity. The portion of negative adversarial margin is a cost for sensibility and with this cost, the model can obtain robustness as much as possible given a model capacity. We see the portion of adversarial margins of the SENSE model in the negative area in Figure 8 is not small. This may imply the current model capacity and the sample size for SENSE are not enough.
|
| 366 |
+
|
| 367 |
+
# F COMPARISON WITH OTHER METHODS
|
| 368 |
+
|
| 369 |
+
The sensible selection and reversion in our approach distinguish sensible learning from other approaches that balance between the natural and adversarial accuracy. The objective function of our algorithm can be rewritten as follows. For $f \in { \mathcal { F } }$ ,
|
| 370 |
+
|
| 371 |
+
$$
|
| 372 |
+
\begin{array} { l } { \displaystyle \mathcal { L } ( f ) = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \ell ^ { s } ( f , x _ { i } , y _ { i } ) } \\ { \displaystyle = \frac { | A _ { f } | } { n } \hat { \mathcal { R } } _ { s t d } ( f | A _ { f } ) + \frac { | B _ { f } | } { n } \hat { \mathcal { R } } _ { r o b } ^ { s } ( f | B _ { f } ) + \frac { | C _ { f } | } { n } \hat { \mathcal { R } } _ { r o b } ( f | C _ { f } ) , } \end{array}
|
| 373 |
+
$$
|
| 374 |
+
|
| 375 |
+
where $\ell ^ { s } ( f , x , y )$ is defined in (5).
|
| 376 |
+
|
| 377 |
+
The margin distributions for the varying capacity
|
| 378 |
+
|
| 379 |
+

|
| 380 |
+
Figure 6: The prediction margins at convergence of the models in Experiment 1 on the test set.
|
| 381 |
+
|
| 382 |
+
Kurakin et al. (2016b) suggest adversarial training that randomly divides data into two parts, a natural and adversarial set. The objective function can be written as the following. For random index sets $A$ and $C$ s.t. $| A | + | C | = n$ and $A \cap C = \phi$ ,
|
| 383 |
+
|
| 384 |
+
$$
|
| 385 |
+
\begin{array} { r } { \mathcal { L } ( f ) = \displaystyle \frac { 1 } { | A | + \lambda | C | } \big [ \displaystyle \sum _ { i \in A } \ell ( f ( x _ { i } ) , y _ { i } ) + \lambda \displaystyle \sum _ { i \in C } \ell ( f ( \tilde { x } _ { i } ) , y _ { i } ) \big ] } \\ { = \displaystyle \frac { | A | } { | A | + \lambda | C | } \hat { \mathcal { R } } _ { s t d } ( f | A ) + \lambda \displaystyle \frac { | C | } { | A | + \lambda | C | } \hat { \mathcal { R } } _ { r o b } ( f | C ) , } \end{array}
|
| 386 |
+
$$
|
| 387 |
+
|
| 388 |
+
where $\tilde { x } _ { i }$ is an adversarial example of $x _ { i }$
|
| 389 |
+
|
| 390 |
+
Our approach is similar in that we also divide the data for different usage. However, we divide the data by not a random but an adaptive way, so that $\ell ^ { s } ( f , x _ { i } , y _ { i } ) \geq \ell ^ { s } ( f , x _ { j } , y _ { j } )$ for $x _ { i } \in A _ { f }$ and $x _ { j } \in C _ { f }$ . Also, we have an additional set other than a natural and fully adversarial set. This additional set, a sensibly reversed adversarial set, plays an important role in allowing a data point smoothly changes its identity between a natural example and a full adversarial example. Note that we do not have any weight controllers like $\lambda$ in (12). The hyperparameter $c$ itself controls the importance of the natural accuracy in comparison to the adversarial accuracy.
|
| 391 |
+
|
| 392 |
+
Zhang et al. (2019) investigate the Bayes decision boundary to resolve the trade-off problem. They propose TRADE, of which the objective function is for $\beta > 0$ ,
|
| 393 |
+
|
| 394 |
+
$$
|
| 395 |
+
\mathcal { L } ( f ) = \mathbb { E } \big [ \ell ( f ( X ) , y ) + \beta \operatorname* { m a x } _ { X ^ { \prime } \in B ( X , \epsilon ) } \ell ( f ( X ^ { \prime } ) , f ( X ) ) \big ] .
|
| 396 |
+
$$
|
| 397 |
+
|
| 398 |
+
This formulation shows several key differences between TRADE and SENSE. First, (13) uniformly restricts the perturbation norm to $\epsilon$ for all data points, whereas (11) selects the sets for $A _ { f }$ , $B _ { f }$ and $C _ { f }$ and restricts the perturbation in different ways. Second, the main parameter $\beta$ in (13) controls the importance of the natural accuracy in comparison to the smoothness of the model. However, the main parameter $c$ in (11) directly controls the lower bound of the natural and adversarial loss of the individual data. This is the lower bound on the prediction probability $c$ if $\ell$ is the cross entropy loss. Third, the term $\ell ( f ( X ^ { \prime } ) , f ( X ) )$ in (13) leads the model to be smooth to all directions in the input space, but $\ell ^ { s } ( f , x , y )$ in (11) leads to be close to one. Therefore, intuitively, TRADE achieves robustness by obtaining smoothness of the model, whereas SENSE achieves robustness by reformulating (1) in a way to promote high confidency of the robust prediction. This may provide an intuition on the plot of the margin density in Figure 8. By this intuition, we apply PGD attacks with larger perturbation of the training $\epsilon$ . We apply the attacks on our trained models and the TRADE model by Zhang et al. (2019) for MNIST and CIFAR10. The results are in Table 6 and Table 7.
|
| 399 |
+
|
| 400 |
+

|
| 401 |
+
Figure 7: Another visualization of Figure 2. The name of each panel denotes the hyperparameter $c$ . -Inf denotes the model trained with the PGD method.
|
| 402 |
+
|
| 403 |
+

|
| 404 |
+
Figure 8: Adversarial and natural prediction margins on CIFAR10 of the SENSE and TRADE model. The margins are calculated by $M ( f , x , y ) = \log \hat { p } _ { y } ( x ) - \operatorname* { m a x } _ { y ^ { \prime } \neq y } \log \hat { p } _ { y ^ { \prime } } ( x ) = s _ { y } ( x ) -$ $\operatorname* { m a x } _ { y ^ { \prime } \neq y } s _ { y ^ { \prime } } ( x )$ , where $s$ denote a score function of $f$ , i.e., the output of the neural network.
|
| 405 |
+
|
| 406 |
+
Table 6: MNIST: test results of the our models on natural examples and $\ell _ { \infty }$ based attacks.
|
| 407 |
+
|
| 408 |
+
<table><tr><td>Defence model</td><td>∈=0.3</td><td>∈ = 0.33</td><td>∈ = 0.36</td><td>e = 0.39</td></tr><tr><td>SENSE</td><td>96.46</td><td>92.89</td><td>83.15</td><td>63.51</td></tr><tr><td>TRADE</td><td>96.72</td><td>90.56</td><td>46.94</td><td>11.66</td></tr></table>
|
| 409 |
+
|
| 410 |
+
Table 7: CIFAR: test results of the our models on natural examples and $\ell _ { \infty }$ based attacks.
|
| 411 |
+
|
| 412 |
+
<table><tr><td>Defence model</td><td>∈ = 10/255</td><td>∈ = 12/255</td><td>∈ = 14/255</td><td>∈ = 16/255</td></tr><tr><td>SENSE</td><td>62.63</td><td>60.39</td><td>58.05</td><td>55.09</td></tr><tr><td>TRADE</td><td>47.61</td><td>39.05</td><td>31.57</td><td>25.15</td></tr></table>
|
| 413 |
+
|
| 414 |
+
# G ADDITIONAL INFORMATION ABOUT CHEESE HOLE DISTRIBUTION
|
| 415 |
+
|
| 416 |
+
Figure 9 (e) compares the worst-case standard risk $\mathcal { R } _ { s t d } ( { \tilde { f } } _ { r o b } ^ { * } )$ and $\mathcal { R } _ { s t d } \big ( \tilde { f } ^ { B * } \big )$ . Although $\mathcal { R } _ { s t d } \big ( \tilde { f } _ { r o b } ^ { * } \big )$ does not consistently decrease as $\epsilon$ increases, it is always much smaller than $\mathcal { R } _ { s t d } ( { \tilde { f } } ^ { B * } )$ . Therefore, pursuit of robustness leads to a more naturally accurate classifier. Figure 9 (e) shows that, as $\epsilon$ increases from $\epsilon = \alpha / 2$ to 1, the standard risk of the robustly optimal model gradually increases whereas the sensibly robust model keeps zero risk. Figure 9 (f) demonstrates the robustness against (red). Although sensibly robust models have large adversa $\epsilon$ -ball attacks of al robustness in $\tilde { f } _ { n a t } ^ { B * }$ (black), sing to 1 $\tilde { f } _ { r o b } ^ { * }$ (blue), and increases, t $\tilde { f } _ { r o b } ^ { s * }$ $\epsilon$ because more and more adversarial examples can cross the border, while the model keeps its decision boundary consistent to the class border line. On the other hand, adversarially robust functions have constant robust risk for $\epsilon > 1 / 4$ . This is because the robust functions predict as $y = 1$ for every $x \in \mathcal { X }$ .
|
| 417 |
+
|
| 418 |
+

|
| 419 |
+
Figure 9: Cheese holes distribution. (e) and (f) The natural and robust risk when $p = 0 . 5 5$ . The black, blue, and red colors are the worst cases of naturally, adversarially, and sensibly robust functions. (g) The robustly optimal model when $\epsilon > 0 . 2 5$ . (h) The sensibly robust model when $\epsilon > 1 / 1 2$ .
|
| 420 |
+
|
| 421 |
+
The sketch of the proof on the standard and adversarial robust risks in (e) and (f) in Figure 9 We first calculate the three classes of functions which minimize natural, adversarial robust, and sensibly robust risk respectively, w.r.t $\tilde { \mathbb { P } } _ { X , Y }$ . Then for each class, we consider the worst case function from each class, in that the function maximizes the standard risk w.r.t $\mathbb { P } _ { X , Y }$ . The corresponding standard risks are in Figure 9 (e).
|
| 422 |
+
|
| 423 |
+
Likewise, for each class, we consider the worst case function from each class, in that the function maximizes the adversarial robust risk w.r.t $\mathbb { P } _ { X , Y }$ . The corresponding adversarial robust risks are in Figure 1 (f).
|
| 424 |
+
|
| 425 |
+
First, the minimizers of each risk w.r.t. $\tilde { \mathbb { P } } _ { X , Y }$ are as following.
|
| 426 |
+
|
| 427 |
+
1) Let $\tilde { \mathcal { F } } _ { B }$ be a set of naturally optimal functions w.r.t $\tilde { \mathbb { P } } _ { X , Y }$ :
|
| 428 |
+
|
| 429 |
+
$$
|
| 430 |
+
\tilde { \mathcal { F } } _ { B } = \{ f \in \mathcal { F } | f ( x ) = s i g n ( x _ { 1 } - 0 . 5 ) \mathrm { f o r } ( x _ { 1 } , x _ { 2 } ) \in \tilde { \mathcal { X } } \}
|
| 431 |
+
$$
|
| 432 |
+
|
| 433 |
+
2) Let $\tilde { \mathcal { F } } _ { r o b } ^ { s }$ be a set of sensibly optimal functions w.r.t $\tilde { \mathbb { P } } _ { X , Y }$ :
|
| 434 |
+
|
| 435 |
+
$$
|
| 436 |
+
\tilde { \mathcal { F } } _ { r o b } ^ { s } = \{ f \in \mathcal { F } | f ( x ) = s i g n ( x _ { 1 } - 0 . 5 ) \mathrm { f o r } ( x _ { 1 } , x _ { 2 } ) \in B ( \tilde { \mathcal { X } } , \epsilon ) \} .
|
| 437 |
+
$$
|
| 438 |
+
|
| 439 |
+
3) Let $\tilde { \mathcal { F } } _ { r o b }$ be a set of robustly optimal functions w.r.t $\tilde { \mathbb { P } } _ { X , Y }$ :
|
| 440 |
+
|
| 441 |
+
$$
|
| 442 |
+
\tilde { \mathcal { F } } _ { r o b } = \{ f \in \mathcal { F } | f ( x ) = g ( x ) \mathrm { f o r } ( x _ { 1 } , x _ { 2 } ) \in B ( \tilde { \mathcal { X } } , \epsilon ) \} ,
|
| 443 |
+
$$
|
| 444 |
+
|
| 445 |
+
where
|
| 446 |
+
|
| 447 |
+
$$
|
| 448 |
+
g ( x ) = \left\{ \begin{array} { l l } { s i g n ( x _ { 1 } - 0 . 5 + \epsilon ) \mathrm { i f } \epsilon < \alpha / 2 \mathrm { o r } \epsilon \geq 3 \alpha / 4 } \\ { 1 _ { ( x _ { 1 } \geq 0 . 5 - \epsilon ) } - 1 _ { ( x _ { 1 } \leq 3 \alpha / 2 + \epsilon ) } \mathrm { i f } \alpha / 2 \leq \epsilon < 3 \alpha / 4 } \end{array} \right.
|
| 449 |
+
$$
|
| 450 |
+
|
| 451 |
+
Second, we consider the worst case standard risk w.r.t. $\mathbb { P } _ { X , Y }$ for each class above.
|
| 452 |
+
|
| 453 |
+
1) $\operatorname* { m a x } _ { f \in { \tilde { \mathcal { F } } } _ { B } } \mathcal { R } _ { s t d } ( f )$ : Although $p \neq 0 . 5$ , due to the symmetry of the shape of $\tilde { \mathcal X }$ , $\operatorname* { m a x } _ { f \in { \tilde { \mathcal { F } } } _ { B } } \mathcal { R } _ { s t d } ( f )$ is the area on $\chi \setminus { \tilde { \mathcal { X } } }$ , the area outside the small nine squares.
|
| 454 |
+
|
| 455 |
+
2) $\operatorname* { m a x } _ { f \in \tilde { \mathcal { F } } _ { r o b } ^ { s } } \mathcal { R } _ { s t d } ( f )$ : For the same reason above, $\operatorname* { m a x } _ { f \in \tilde { \mathcal { F } } _ { r o b } ^ { s } } \mathcal { R } _ { s t d } ( f )$ is the area on $\mathcal { X } \setminus B ( \tilde { \mathcal { X } } , \epsilon )$ , the area outside the small nine squares extended by $\epsilon$ .
|
| 456 |
+
|
| 457 |
+
3) $\operatorname* { m a x } _ { f \in \tilde { \mathcal { F } } _ { r o b } } \mathcal { R } _ { s t d } ( f )$ : When $\epsilon < \alpha / 2$ or $\epsilon \geq 3 \alpha / 4$ , we consider the deviated line on $B ( \tilde { \mathcal { X } } , \epsilon )$ , and regard the model outside $B ( \tilde { \mathcal { X } } , \epsilon )$ as incorrect. The risk is calculated easily by using the fact that the risk of any $f \in \tilde { \mathcal { F } } _ { r o b }$ on is $B ( \tilde { \mathcal { X } } , \epsilon )$ is $3 \times \operatorname* { m i n } ( a + 2 \epsilon , 2 a ) \times ( 1 - p ) \times \operatorname* { m i n } ( 2 \epsilon , 0 . 5 ) / 0 . 5$ . When $\alpha / 2 \le \epsilon < 3 \alpha / 4$ , since $B ( \tilde { \mathcal { X } } , \epsilon )$ covers $\tilde { \mathcal X }$ , the worst case functions are in a form of $f ( x ) = s i g n ( x _ { 1 } - 0 . 5 + c _ { \epsilon } )$ for some $c$ on the entire $\tilde { \mathcal X }$ . For each $\epsilon$ s.t. $3 \alpha / 2 + \epsilon < x _ { 1 } < 0 . 5 - \epsilon$ , it is easy to find the corresponding $c _ { \epsilon }$ .
|
| 458 |
+
|
| 459 |
+
Last, for the worst case adversarial robust risk w.r.t. $\mathbb { P } _ { X , Y }$ , we can calculate the risks in a similar way to above.
|
| 460 |
+
|
| 461 |
+
# H ADDITIONAL INFORMATION ABOUT EXPERIMENTS
|
| 462 |
+
|
| 463 |
+
# H.1 EXPERIMENT 1
|
| 464 |
+
|
| 465 |
+
We consider the MNIST and CIFAR-10 dataset (LeCun et al., 2010; Krizhevsky & Hinton, 2009).
|
| 466 |
+
|
| 467 |
+
Training For each dataset, we initialize our model by a naturally trained model. Then, we train the initialized model with sensible adversarial examples with the specifications in Table 8.
|
| 468 |
+
|
| 469 |
+
Table 8: The learning specifications for the SENSE models in experiment 1
|
| 470 |
+
|
| 471 |
+
<table><tr><td>Dataset</td><td>E</td><td>m1</td><td>K C</td><td>Initial m2</td><td>Epoch</td></tr><tr><td>MNIST</td><td>0.3</td><td>0.05</td><td>10 0.5</td><td>0.01</td><td>500</td></tr><tr><td>CIfAR10</td><td>8 255</td><td>8 × 2 255 10</td><td>10 0.7</td><td>0.1</td><td>300</td></tr></table>
|
| 472 |
+
|
| 473 |
+
Testing with white-box attacks For white-box attacks, we consider PGD (Madry et al., 2017), C&W (Ding et al., 2019a), DeepFool (Moosavi-Dezfooli et al., 2016), FGSM (Kurakin et al., 2016a), LBFGS (Tabacof & Valle, 2016), and MIFGSM (Dong et al., 2018). In Experiment 1, we consider adversarial perturbations with $\ell _ { \infty }$ -norm less than $\epsilon$ , where $\epsilon = 0 . 3$ for the MNIST dataset and $\epsilon = 8 / 2 5 5$ for the CIFAR10 dataset.
|
| 474 |
+
|
| 475 |
+
We attack our models with the white-box attacks. We use the attacks implemented in Foolbox (Rauber et al., 2017), Advertorch (Ding et al., 2019b), and Adversarial Robustness 360 Toolbox (ART) (Nicolae et al., 2018). The attack specifications are in Table 9. The options that are not listed in the table are kept as default of the attack generating functions.
|
| 476 |
+
|
| 477 |
+
Table 9: The white-box attack specifications. We denote the step size and step number by $\eta _ { 1 }$ and $K$
|
| 478 |
+
|
| 479 |
+
<table><tr><td>Dataset</td><td>Attack</td><td>71</td><td>K</td><td>Python package</td><td>Function</td></tr><tr><td>MNIST MNIST</td><td>PGD500 C&W40</td><td>0.01 0.01 2</td><td>500 40 100</td><td>Advertorch ART Advertorch</td><td>LinfPGDAttack CarliniLInfMethod</td></tr><tr><td>CIfAR10 CIfAR10 CIfAR10 CIfAR10 CIfAR10 CIfAR10</td><td>PGD100 C&W40 DeepFool FGSM LBFGS MIFGSM</td><td>255 8 1 default 8 255 default 8 × 1 255 40.001</td><td>40 default 1 default 40</td><td>ART Foolbox Advertorch Foolbox Foolbox</td><td>LinfPGDAttack CarliniLInfMethod DeepFoolLinfinityAttack GradientSignAttack LBFGSAttack MomentumIterativeAttack (distance=Linfinity, return_early=False)</td></tr></table>
|
| 480 |
+
|
| 481 |
+
We set the step size for MIFGSM as slightly smaller than $\frac { 8 } { 2 5 5 } \times \frac { 1 } { 4 0 }$ in order to keep the adversarial example from having the perturbation norm greater than $\epsilon = 8 / 2 5 5$ . For the performance of TRADE on C&W40, we apply the C&W40 attack with the same specifications in Table 9. For the other results of TRADE in Table 1, we refer to Zhang et al. (2019). For PGD attacks, we draw accuracy and loss plots for increasing step numbers in Figure 10 and Figure 11. They show that for the chosen step sizes, the chosen step numbers are enough to generate proper local maximizer of the PGD objective function. Particularly, for CIFAR, we use the step size 2/255 rather than $\epsilon \times 2 / 2 5 5$ as it is more efficient.
|
| 482 |
+
|
| 483 |
+
PGD attack serenity check We test with 100 random restarts, and for the step size 0.01, the step number 500 seem enough by Figure 10.
|
| 484 |
+
|
| 485 |
+

|
| 486 |
+
Figure 10: The convergence check for the PGD attacks on the MNIST model. We used a step size 0.01. We can see that $K = 5 0 0$ is enough to achieve the lowest point by counting the worst case of random restarts.
|
| 487 |
+
|
| 488 |
+
Testing with black-box attacks We attack our models with PGD40 and MIFGSM swith the specifications in Table 9. As the Foolbox implementation for MIGSM only returns the successful attacks on the generating model, we only apply these attacks on the defense model. We note that the argument return early of MIFGSM is set to False as in Table 9. For TRADE, we use the models by Zhang et al. (2019) for both MNIST and CIFAR10.
|
| 489 |
+
|
| 490 |
+

|
| 491 |
+
Figure 11: The convergence check for the PGD attacks on the CIFAR model. We used a step size 0.01 and for CIFAR, 2/255. We can see that $K = 1 0 0$ is enough to achieve the lowest point by counting the worst case of random restarts.
|
| 492 |
+
|
| 493 |
+
# H.2 EXPERIMENT 2
|
| 494 |
+
|
| 495 |
+
Model Architecture We conduct Experiment 2 on the MNIST dataset (LeCun et al., 2010). We consider a sequence of CNNs with the increasing number of kernels. A network of capacity $q$ has two convolutional layers with $2 ^ { ( d - 1 ) }$ and $2 ^ { d }$ filters respectively, followed by a fully connected linear layer of $2 ^ { ( d + 4 ) }$ units. Each layer is activated by ReLU. Each convolutional layer is followed by $2 \times 2$ a max-pooling layer. The size of all convolutional filters is $5 \times 5$ .
|
| 496 |
+
|
| 497 |
+
With a similar sequence of CNNs, Madry et al. (2017) investigate the model behavior when the capacity increases. They have capacity scale 1,2,4,8 and 16. In their experiment, capacity scale 1 and 2 collapse. our capacities 2 and 3 are comparable to the capacity scale 1 and 2 by Madry et al. (2017). Likewise, our capacities 4 and 5 are comparable to their capacity scale 4 and $8 ^ { 1 }$ . Therefore, our result, which shows the PGD models of capacity 1,2 and 3 collapse, is consistent to the result by Madry et al. (2017).
|
| 498 |
+
|
| 499 |
+
Training We train the sequence of MNIST models with sensibly adversarial example with $\epsilon = 0 . 3$ , $\eta _ { 1 } =$ 0.05 and $K = 1 0$ for varying $c \in \{ 0 . 0 , 0 . 1 , \cdot \cdot \cdot , 0 . 9 \}$ . The initial learning rate $\eta _ { 2 }$ is 0.01, and we train for 500 epochs. When training the PGD models, we use the same hyperparameters except $c$ .
|
| 500 |
+
|
| 501 |
+
Testing The MNIST models are tested with $\ell _ { \infty }$ PGD attacks of $\epsilon = 0 . 3$ with the step number $K = 4 0$ and step size $\eta _ { 1 } = 0 . 0 1$ . We generate the attacks by using a Python package Advertorch by Ding et al. (2019b).
|
| 502 |
+
|
| 503 |
+
# H.3 ADDITIONAL EXPERIMENT FOR TABLE 6 AND TABLE 7
|
| 504 |
+
|
| 505 |
+
We conduct our additional experiment on the MNIST and CIFAR-10 dataset (LeCun et al., 2010; Krizhevsky & Hinton, 2009). For each dataset, we consider the SENSE model trained in Experiment 1 and the TRADE model by Zhang et al. (2019). We note that for each dataset, the TRADE and SENSE model share the same architecture. On theses models, we apply the PGD attacks with perturbations larger than the training $\epsilon$ . We generate the PGD attacks, using a Python package Advertorch by Ding et al. (2019b) with the following attack specifications.
|
| 506 |
+
|
| 507 |
+
MNIST Let $\epsilon _ { 0 } = 0 . 3$ , which is the training $\epsilon$ for each model. For $\delta \in \{ 1 . 1 , 1 . 2 , 1 . 3 \}$ , we generate the $\ell _ { \infty }$ PGD attacks of $\epsilon = \delta \epsilon _ { 0 }$ with the step number $K = 4 0 \times \delta$ and step size $\eta _ { 1 } = 0 . 0 1$ .
|
| 508 |
+
|
| 509 |
+
CI R-10 Let $\epsilon _ { 0 } = 8 / 2 5 5$ which is the training $\epsilon$ odel. For $\delta \in \{ \frac { 1 0 } { 8 } , \frac { 1 2 } { 8 } , \frac { 1 4 } { 8 } , \frac { 1 6 } { 8 } \}$ , we generate $\ell _ { \infty }$ PGD attacks of $\epsilon = \delta \epsilon _ { 0 }$ $K = 4 0 \times \delta$ $\eta _ { 1 } = \dot { \epsilon } _ { 0 } / 2 0$ .
|
md/train/rJxRmlStDB/rJxRmlStDB.md
ADDED
|
@@ -0,0 +1,271 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SELF-INDUCED CURRICULUM LEARNING IN NEURAL MACHINE TRANSLATION
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Self-supervised neural machine translation (SS-NMT) learns how to extract/select suitable training data from comparable —rather than parallel— corpora and how to translate, in a way that the two tasks support each other in a virtuous circle. SSNMT has been shown to be competitive with state-of-the-art unsupervised NMT. In this study we provide an in-depth analysis of the sampling choices the SS-NMT model takes during training. We show that, without it having been told to do so, the model selects samples of increasing (i) complexity and $( i i )$ task-relevance in combination with (iii) a denoising curriculum. We observe that the dynamics of the mutual-supervision of both system internal representation types is vital for the extraction and hence translation performance. We show that in terms of the human Gunning-Fog Readability index (GF), SS-NMT starts by extracting and learning from Wikipedia data suitable for high school $\scriptstyle ( \mathbf { G } \mathrm { F = } 1 0 - 1 1 )$ ) and quickly moves towards content suitable for first year undergraduate students $[ \mathrm { G F } { = } 1 3$ ).
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Human learners, when faced with a new task, generally focus on simple examples before applying their gained knowledge on more complex instances. This approach to learning based on sampling from a curriculum of increasing complexity has also been shown to be beneficial for machines and has been named curriculum learning (CL) (Bengio et al., 2009) by the machine learning community. Previous research on curriculum learning has focused on selecting the best distribution of data — i.e. order, difficulty and closeness to the final task— to train a system. In this approach, data is prepared for the system to ease the learning task. In this work, we follow a complementary approach: we design a system that selects by itself the data to be trained on, and we analyse the selected distribution of data —order, difficulty and closeness to the final task— without imposing it beforehand. Our method resembles self-paced learning (SPL) (Kumar et al., 2010), in that it uses the emerging model hypothesis to select samples online that fit into its space as opposed to most curriculum learning approaches that rely on judgements by the target hypothesis, i.e. an external teacher (Hacohen & Weinshall, 2019) to design the curriculum.
|
| 12 |
+
|
| 13 |
+
The task explored in our work is machine translation (MT). In particular, we focus on self-supervised machine translation (SS-NMT) (Ruiter et al., 2019), which exploits the internal representations of an emergent neural machine translation (NMT) system to select useful data for training, where each selection decision is dependent on the current state of the model. Self-supervised learning (Raina et al., 2007; Bengio et al., 2013) involves a primary task (PT), for which labelled data is not available, and an auxiliary task (AT) that enables the PT to be learned by exploiting supervisory signals within the data. In the case of SS-NMT, both tasks —data extraction and learning NMT— enable and enhance each other, such that this mutual supervision leads to a self-induced curriculum, which is the subject to our analysis.
|
| 14 |
+
|
| 15 |
+
Curriculum learning has been widely studied. In Section 2 we describe the related work on CL, especially focusing on MT. Section 3 introduces the main aspects of self-supervised neural machine translation. Here, we analyse the quality of both the primary and the auxiliary tasks. This is followed by a detailed study of the self-induced curriculum in Section 4 where we analyse the characteristics of the distribution of training data obtained in the auxiliary task of the system. Finally, we draw our conclusion in Section 5.
|
| 16 |
+
|
| 17 |
+
# 2 RELATED WORK
|
| 18 |
+
|
| 19 |
+
In recent years, machine translation (MT) has experienced major improvements in translation quality by the introduction of neural architectures including RNNs (Cho et al., 2014; Bahdanau et al., 2014) and transformers (Vaswani et al., 2017). However, these rely on the availability of large amounts of parallel data. To overcome the need for labelled data, unsupervised neural machine translation (Lample et al., 2018a; Artetxe et al., 2018b; Yang et al., 2018) focuses on the exploitation of vast amounts of monolingual data by combining denoising autoencoders with back-translation and multilingual encoders. Further combining these with phrase tables from statistical machine translation (SMT) leads to impressive results (Lample et al., 2018b; Artetxe et al., 2018a; Ren et al., 2019; Artetxe et al., 2019). Nevertheless, as these still rely on hundreds of millions of monolingual sentences —which are not easy to come by for most languages— alternative methods focusing on the exploitation of smaller amounts of comparable corpora have recently been introduced in the form of self-supervised NMT (Ruiter et al., 2019). Here, the internal representations of an emergent NMT system are used to identify useful sentences in aligned documents. As the selection is dependent on the current state of the model, it resembles a type of self-paced learning Kumar et al. (2010). Also Wu et al. (2019) exploit comparable corpora and include similar sentences in NMT training. A comparison between both approaches is given in Section 3.1.
|
| 20 |
+
|
| 21 |
+
The data selection in SS-NMT is directly related to curriculum learning, which, in its essence, is the idea of presenting training samples in a meaningful order to benefit the learning, e.g. in the form of faster convergence or better performance (Bengio et al., 2009). Inspired by human learners, Elman (1993) argue that a neural network’s optimization can be accelerated by providing samples in order of increasing complexity. While sample difficulty is an intuitive measure on which to base a learning schedule on, a variety of curricula focus on other metrics such as task-relevance or noise.
|
| 22 |
+
|
| 23 |
+
Up to now, curriculum learning in NMT has had a strong focus on the relevance of training samples to a given translation task, e.g. domain adaptation, where the task is the optimization for a specific domain. van der Wees et al. (2017) train on increasingly relevant samples by the gradual exclusion of irrelevant ones. In line with the basic hypotheses of CL, they observed an increase in BLEU over a static NMT baseline and a significant speed-up in training as the data size is incrementally reduced. Reversely, Zhang et al. (2019) adapt an NMT model to a domain by introducing increasingly domain-distant (difficult) samples. This contradictory behavior of benefiting from both increasingly difficult (domain-distant) and easy (domain-relevant) samples has been analyzed by Weinshall et al. (2018), showing that the initial phases of training benefit from easy samples w.r.t. the target hypothesis, while also being boosted (Freund & Schapire, 1996) by samples that are difficult w.r.t. the current hypothesis (Hacohen & Weinshall, 2019). Such boosting methods, where the model focuses longer on difficult samples, have been applied to NMT by Zhang et al. (2017). In a more complex setup, Wang et al. (2019b) adapt an NMT model to several domains by introducing samples with increasing relevance to all selected domains. In Wang et al. (2019a) both domain-relevance and NMT denoising are combined into a single curriculum.
|
| 24 |
+
|
| 25 |
+
The denoising curriculum for NMT proposed by Wang et al. (2018) is quite related to our approach in that they also apply an online data selection approach to build the curriculum based on the current hypothesis of the model. However, the noise scores for the dataset at each training step depend on fine-tuning the model on a small selection of clean data, which comes with a high computational cost. To alleviate this cost, Kumar et al. (2019) use reinforcement learning on the pre-scored noisy corpus to jointly learn the denoising curriculum with NMT. In Section 3.2 we show that our model exploits its self-supervised nature to perform denoising by selecting parallel pairs with increasing accuracy —without the need of additional noise metrics.
|
| 26 |
+
|
| 27 |
+
Difficulty-based curricula for NMT that take into account sentence length and vocabulary frequency have been shown to improve translation quality when samples are presented in increasing complexity Kocmi & Bojar (2017). Platanios et al. (2019) link the introduction of difficult samples with the NMT models’ competence. Other difficulty-orderings have been explored extensively in Zhang et al. (2018), showing that they, too, can speed-up training without a loss in translation performance.
|
| 28 |
+
|
| 29 |
+
As a by-product, SS-NMT extracts cross-lingual similar sentence pairs, so the extractions can be compared to parallel data mining systems where strictly parallel sentences are expected. Early approaches exploited structural information of web-pages (Resnik & Smith, 2003) or Wikipedia (Adafre & de Rijke, 2006). Others relied on statistical measures such as cross-lingual information retrieval (Utiyama & Isahara, 2003), maximum entropy classifiers (Munteanu & Marcu, 2005), conditional random fields (Smith et al., 2010), SMT or a combination of methods (Fung & Cheung,
|
| 30 |
+
|
| 31 |
+
<table><tr><td rowspan="2"></td><td colspan="3">L1(en)</td><td colspan="3">L2(fr/de/es)</td></tr><tr><td># Sents (M)</td><td># Tokens (M)</td><td>Q</td><td># Sents (M)</td><td># Tokens (M)</td><td>Q</td></tr><tr><td>WPenfr</td><td>117/42</td><td>2693/1205</td><td>28</td><td>38/25</td><td>644/710</td><td>16</td></tr><tr><td>WPende</td><td>117/37</td><td>2693/987</td><td>29</td><td>51/30</td><td>1081/742</td><td>24</td></tr><tr><td>WPenes</td><td>117/35</td><td>2693/937</td><td>32</td><td>27/20</td><td>691/572</td><td>17</td></tr><tr><td>EPenfr</td><td>1+6</td><td>25+80</td><td>28</td><td>1+3</td><td>27+87</td><td>16</td></tr><tr><td>EPende</td><td>1+9</td><td>25+180</td><td>29</td><td>1+7</td><td>26+192</td><td>24</td></tr><tr><td>EPenes</td><td>1+7</td><td>24+84</td><td>32</td><td>1+4</td><td>26+91</td><td>17</td></tr></table>
|
| 32 |
+
|
| 33 |
+
Table 1: Number of sentences and tokens for all corpora used. For WP, we report the sizes for both the monolingual/comparable editions. Sizes for pseudo-comparable EP corpora are reported for both true+false splits. Average sentences per article $( \emptyset )$ is given for all comparable corpora.
|
| 34 |
+
|
| 35 |
+
2004; Yasuda & Sumita, 2008; Abdul-Rauf & Schwenk, 2009; Barron-Cede ´ no et al., 2015). Nowa- ˜ days, sentence representations obtained from NMT systems or devoted architectures are achieving a new state of the art on parallel sentence extraction and filtering, see for instance (Espana-Bonet et al., ˜ 2017; Gregoire & Langlais, 2018; Schwenk, 2018; Bouamor & Sajjad, 2018; Artetxe & Schwenk, ´ 2019a; Hangya & Fraser, 2019; Chaudhary et al., 2019). Due to its multilingual aspect, we consider the state-of-the-art method used in Schwenk et al. (2019) as a comparison point (see Section 3.2).
|
| 36 |
+
|
| 37 |
+
# 3 SELF-SUPERVISED NEURAL MACHINE TRANSLATION, SS-NMT
|
| 38 |
+
|
| 39 |
+
SS-NMT is a joint data selection and training framework for machine translation, which was originally introduced in Ruiter et al. (2019). It enables the learning of NMT on comparable rather than parallel data; where comparable data is a collection of multilingual topic-aligned documents. The basic architecture is a standard NMT system that uses the semantic information encoded in the internal representations of the network to determine at training time if an input sentence pair is parallel enough or not, and therefore whether it should be used for training or not. The selection is made online, so, the more the semantic representations improve during training, the more truly parallel sentence pairs are selected. Because of this, the nature of the selected pairs evolves during training, and this evolution is what we analyze as induced curriculum learning in Section 4. SS-NMT can be applied to different NMT architectures. Ruiter et al. (2019) showed good performance of SS-NMT both for RNN-based and transformer neural systems, differing in the internal semantic representations used to select the data. In this work, we focus on transformer architectures as they nowadays reach a higher translation quality (Barrault et al., 2019).
|
| 40 |
+
|
| 41 |
+
Let us assume a bidirectional NMT system $\{ L 1 , L 2 \} \to \{ L 1 , L 2 \}$ where the engine learns to translate simultaneously from a language $L 1$ into another language $L 2$ and vice-versa with a single encoder and a single decoder. This is important in the self-supervised architecture because it allows us to represent the two languages in the same semantic space. The input data to train the system is a monolingual corpus of sentences in $L 1$ and a monolingual corpus of sentences in $L 2$ and the system learns to select the adequate pairs. In order to speed-up the training, we use a comparable corpus such as Wikipedia, where we can safely assume that there are comparable (similar) and parallel sentence pairs in related documents $D _ { L 1 } , D _ { L 2 }$ .
|
| 42 |
+
|
| 43 |
+
Given a document pair $D _ { L 1 } , D _ { L 2 }$ , the SS-NMT system encodes each sentence of each document into two fixed-length vectors $C _ { w }$ and $C _ { h }$ , such that
|
| 44 |
+
|
| 45 |
+
$$
|
| 46 |
+
C _ { w } = \sum _ { t = 1 } ^ { T } w _ { t } , \qquad C _ { h } = \sum _ { t = 1 } ^ { T } h _ { t } ,
|
| 47 |
+
$$
|
| 48 |
+
|
| 49 |
+
where $w _ { t }$ is the word embedding at time step $t$ and $h _ { t }$ the encoder output. For each of the sentence representations referred to as $s$ , all combinations of sentences $s _ { L 1 } \times s _ { L 2 } \mathbf { \bar { \phi } } \Vert \mathbf { s } _ { L 1 } \in D _ { L 1 }$ and $s _ { L 2 } \in D _ { L 2 }$ are encoded and then scored using the margin-based measure by Artetxe $\&$ Schwenk (2019b):
|
| 50 |
+
|
| 51 |
+
$$
|
| 52 |
+
\operatorname* { m a r g i n } ( s _ { \mathrm { L 1 } } , s _ { \mathrm { L 2 } } ) = \frac { \sin ( s _ { \mathrm { L 1 } } , s _ { \mathrm { L 2 } } ) } { \operatorname { a v r } _ { \mathrm { k N N } } ( s _ { \mathrm { L 1 } } , P _ { k } ) / 2 + \operatorname { a v r } _ { \mathrm { k N N } } ( s _ { \mathrm { L 2 } } , Q _ { k } ) / 2 } ,
|
| 53 |
+
$$
|
| 54 |
+
|
| 55 |
+
Table 2: BLEU, TER and METEOR scores of the self-supervised NMT systems trained on the three $e n \mathrm { - } \{ f r , d e , e s \}$ comparable WPs and tested on NT13/NT14. We compare the performance with current state-of-the-art (SOTA) systems in supervised NMT (Edunov et al.) / unsupervised NMT (Lample et al., 2018b) / unsupervised NMT+SMT (Artetxe et al., 2019).
|
| 56 |
+
|
| 57 |
+
<table><tr><td></td><td colspan="6">SS-NMT</td><td colspan="2">SOTA</td></tr><tr><td></td><td colspan="3">L1-L2</td><td colspan="3">L2-L1</td><td>L1-L2</td><td>L2-L1</td></tr><tr><td></td><td>BLEU</td><td>TER</td><td>METEOR</td><td>BLEU</td><td>TER</td><td>METEOR</td><td>BLEU</td><td>BLEU</td></tr><tr><td>en-fr</td><td>29.48</td><td>51.94</td><td>57.35</td><td>27.69</td><td>53.39</td><td>64.22</td><td>45.6/25.1/36.2</td><td>-/24.2/33.5</td></tr><tr><td>en-de</td><td>14.40</td><td>69.28</td><td>39.95</td><td>18.84</td><td>62.15</td><td>55.13</td><td>35.0/17.2/22.5</td><td>-/21.0/22.5</td></tr><tr><td>en-es</td><td>28.57</td><td>52.60</td><td>55.63</td><td>28.43</td><td>54.09</td><td>63.86</td><td>1/-1</td><td>111</td></tr></table>
|
| 58 |
+
|
| 59 |
+
where $\operatorname { a v r } _ { \mathrm { k N N } } ( X , Y _ { k } )$ corresponds to the average similarity between a sentence $X$ and $k { \mathrm { N N } } ( X )$ its $k$ nearest neighbors $Y _ { k }$ in the other language:
|
| 60 |
+
|
| 61 |
+
$$
|
| 62 |
+
\operatorname { a v r } _ { \mathrm { k N N } } ( X , Y _ { k } ) = \sum _ { Y \in k \mathrm { N N } ( X ) } { \frac { \sin ( X , Y ) } { k } } .
|
| 63 |
+
$$
|
| 64 |
+
|
| 65 |
+
What follows is a selection process, that identifies the top scoring $s _ { L 2 }$ for each $s _ { L 1 }$ and vice-versa. If a pair $\left\{ s _ { L 1 } , s _ { L 2 } \right\}$ is top scoring for both language directions and for both sentence representations, it is accepted without the addition of any hyperparameter or threshold. This is the high precision, medium recall approach in Ruiter et al. (2019) and we use $k = 4$ as in Artetxe & Schwenk (2019b). Whenever enough pairs have been collected to create a batch, the system trains on it, updating its weights afterwards and proceeding to fill the next batch.
|
| 66 |
+
|
| 67 |
+
# 3.1 TRANSLATION QUALITY
|
| 68 |
+
|
| 69 |
+
Experimental Setup We use Wikipedia (WP) as a comparable corpus to train the self-supervised system. We download the English, French, German and Spanish WP dumps1, pre-process them and extract the comparable articles per language pair using Wikitailor (Barron-Cede ´ no et al., 2015). ˜ All articles are normalized, tokenized and truecased using standard Moses (Koehn et al., 2007) scripts. For each language pair, a shared byte-pair encoding (BPE) (Sennrich et al., 2016) of $1 0 0 k$ merge operations is applied. The number of sentences, tokens and average article length is reported in Table 1. For validation we use newstest2012 (NT12) and for testing newstest2013 (NT13) for en-es and newstest2014 (NT14) for $e n { - } \{ f r , d e \}$ . We use an OpenNMT-based (Klein et al., 2017) implementation of SS-NMT. Our models follow transformer base as defined in Vaswani et al. (2017). All systems are trained on a single GPU GTX TITAN using a batch size of 50 sentences with maximum sentence length being 50 tokens.
|
| 70 |
+
|
| 71 |
+
Monolingual embeddings trained using word2vec on the complete WP editions are projected into a common multilingual space via vecmap (Artetxe et al., 2017) to attain bilingual embeddings between en- $\{ f r , d e , e s \}$ . These embeddings initialise the word embeddings $( C _ { w } )$ in our system.
|
| 72 |
+
|
| 73 |
+
Finally, as a control experiment and purely in order to analyse the quality of the data selection auxiliary task, we use the Europarl (EP) corpus (Koehn, 2005). The corpus is pre-processed in the same way as WP, and we create a synthetic comparable corpus from it as explained in Section 3.2. For these experiments, we use the same corpora for validation and testing as mentioned above.
|
| 74 |
+
|
| 75 |
+
Automatic Evaluation Translation quality is evaluated by means of three automatic metrics: BLEU (Papineni et al., 2002), TER (Snover et al., 2006) and METEOR (Lavie & Agarwal, 2007). SS-NMT translation performance training on the en- $\{ f r , d e , e s \}$ comparable Wikipedias is reported in Table 2 together with a comparison to the current state-of-the-art (SOTA) in supervised and unsupervised NMT( $+ \mathrm { S M T } )$ . SS-NMT is on par with the current SOTA in unsupervised NMT, slightly outperforming it by ${ \sim } 3 { - } 4$ BLEU points in $e n { - } f r$ while having a lower performance on en–de $\mathit { \Omega } \sim 3$ BLEU). Notice that unsupervised systems such as Lample et al. (2018b) use more than $4 0 0 M$ monolingual sentences for training while we use an order of magnitude less by exploiting comparable corpora. However, once unsupervised NMT is combined with statistical methods, these outperform SS-NMT by large margins, i.e. ${ \sim } 6$ for $e n { - } f r$ and ${ \sim } 5 { - } 9$ BLEU for en–de. In a recent study by Wu et al. (2019), online data extraction from comparable documents has been combined with unsupervised methods for NMT, which allows for the additional exploitation of large amounts of monolingual data. They achieve similar BLEU scores as SS-NMT for en2es (28.1) and $e s 2 e n$ (27.6) on NT13; notably SS-NMT trains on comparable data only.
|
| 76 |
+
|
| 77 |
+

|
| 78 |
+
Figure 1: Accumulated (ac) and epoch-wise (ep) precision and recall on the $e n { - } f r$ EP-based control experiments. A non-linearity on training steps per epoch can be observed in the $x$ -axis.
|
| 79 |
+
|
| 80 |
+
# 3.2 DATA EXTRACTION QUALITY
|
| 81 |
+
|
| 82 |
+
Experimental Setup To get an idea of the extraction performance of an SS-NMT system, we perform control experiments on synthetic comparable corpora, as there is no underlying ground truth to Wikipedia. For these purposes, we use the $e n \mathrm { - } \{ f r , \bar { d } e , e s \}$ versions of EP. After setting aside $1 M$ parallel pairs as true samples to evaluate the extraction performance on, all remaining pairs are scrambled to create negative samples (false). In order to keep the synthetic comparable corpora close to the statistics of the original comparable WPs, we control the true:false sentence pair ratio and mimic what we observe in our extractions from WP. To estimate it, we start with the assumption that all accepted sentences are true (parallel) examples, and that the false examples (non-parallel) can be obtained as the total number of sentences minus the accepted ones. With this, we expect base true:false ratios of 1:4 for $e n \mathrm { - } \{ f r , e s \}$ and 1:8 for $e n { \mathrm { - } } d e$ . The negative samples are oversampled in order to meet this ratio given that there are $1 M$ true samples. Further, we calculate the average article length of the comparable WPs and split the mixed corpus of true and false samples into articles. The detailed statistics of the synthetic pseudo-comparable EPs are reported in Table 1. We extract and train the SS-NMT system on these synthetic corpora after having initialized each model with the same bilingual embeddings as before.
|
| 83 |
+
|
| 84 |
+
Automatic Evaluation The extracted pairs from EP at each epoch are compared to the $1 M$ ground truth pairs to calculate the epoch-wise extraction precision (P) and recall (R). Further, we also take the concatenation of all extracted sentences up to a certain epoch in training in order to report the accumulated P and R. As we are interested in the final extraction decision based on the votes of both representations $C _ { w }$ and $C _ { h }$ (dual), but also in the decisions of each single representation $( C _ { w } , C _ { h } )$ , we report the performance for all three representation combinations on $\mathrm { E P } _ { e n f r }$ in Figure 1. Similar curves can be observed for $\mathrm { E P } _ { e n d e }$ and $\mathrm { E P } _ { e n e s }$ , which are considered in the discussion below.
|
| 85 |
+
|
| 86 |
+
At the beginning of training, the extraction precision of each representation itself is rather low with $\mathsf { P { \in } } [ 0 . 4 5 , 0 . 6 6 ]$ for $C _ { w }$ and $\mathsf { P } { \in } [ 0 . 1 4 , 0 . 4 0 ]$ for $C _ { h }$ . The fact that $C _ { w }$ is initialized using pretrained embeddings, while $C _ { h }$ is not, leads to this large difference in initial precision between the two. However, as both representations are combined via their intersections, the final decision of the model is high precision already at the beginning of training with values around $\sim 0 . 7 8 - 0 . 8 7$ . As training progresses and the internal representations are adapted to the task, the precision of $C _ { h }$ is greatly improved, leading to an overall high precision extraction which converges at $\sim 0 . 9 6 - 0 . 9 9$ . This development of extracting parallel pairs with increasing precision can be viewed as a type of denoising curriculum as described by Wang et al. (2018).
|
| 87 |
+
|
| 88 |
+
The recall of the model, being bounded by the performance of the weakest representation, is very low at the beginning of training $\left( \mathbf { R } \in [ 0 . 0 3 , 0 . 0 4 ] \right)$ due to the lack of task knowledge in $C _ { h }$ . However, as training progresses and $C _ { h }$ improves, the accumulated extraction recall of the model rises to high values of $\stackrel { \cdot } { \sim } 0 . \bar { 9 } 5 - 0 . 9 8$ . Interestingly, the epoch-wise recall is much lower than the accumulated, which provides evidence for the hypothesis that SS-NMT models visit different relevant samples at different points in training, such that it has visited most of the samples at some point during training, but not at every epoch.
|
| 89 |
+
|
| 90 |
+
Table 3: BLEU scores of a supervised NMT system trained on Wikimatrix as well as the unique pairs collected by SS-NMT in the first $( \mathrm { N M T } _ { i n i t } )$ , intermediate $( \mathrm { N M T } _ { m i d } )$ , final $( \mathrm { N M T } _ { e n d } )$ and all $( \mathrm { N M T } _ { a l l } )$ ) epochs of training. Evaluation performed on NT14 (en- $\{ f r , d e \} )$ and NT13 (en-es) respectively.
|
| 91 |
+
|
| 92 |
+
<table><tr><td></td><td colspan="3">en-fr</td><td colspan="3">en-de</td><td colspan="3">en-es</td></tr><tr><td></td><td>#Pairs</td><td>en2fr</td><td>fr2en</td><td>#Pairs</td><td>en2de</td><td>de2en</td><td>#Pairs</td><td>en2es</td><td>es2en</td></tr><tr><td>NMTinit</td><td>2.14M</td><td>21.80</td><td>21.07</td><td>0.32M</td><td>3.44</td><td>4.88</td><td>2.51M</td><td>26.98</td><td>28.85</td></tr><tr><td>NMTmid</td><td>3.14M</td><td>28.91</td><td>26.61</td><td>1.13M</td><td>11.18</td><td>15.70</td><td>3.96M</td><td>28.33</td><td>27.92</td></tr><tr><td>NMTend</td><td>3.17M</td><td>28.80</td><td>26.48</td><td>1.18M</td><td>11.89</td><td>15.91</td><td>3.99M</td><td>28.34</td><td>28.09</td></tr><tr><td>NMTall</td><td>5.38M</td><td>26.79</td><td>25.24</td><td>2.21M</td><td>11.63</td><td>15.52</td><td>5.41M</td><td>27.85</td><td>27.62</td></tr><tr><td>SS-NMT</td><td>5.38M</td><td>29.48</td><td>27.69</td><td>2.21M</td><td>14.40</td><td>18.84</td><td>5.41M</td><td>28.57</td><td>28.43</td></tr><tr><td>Wikimatrix</td><td>2.76M</td><td>33.50</td><td>30.12</td><td>1.57M</td><td>13.61</td><td>12.17</td><td>3.38M</td><td>29.60</td><td>28.30</td></tr></table>
|
| 93 |
+
|
| 94 |
+
It should be stressed that the successful extraction of increasingly precise pairs in combination with high recall is the result of the dynamics of both internal representations $C _ { w }$ and $C _ { h }$ . As $C _ { h }$ is less informative at the beginning of training, $C _ { w }$ guides the final decision to ensure high precision; and as $C _ { w }$ is high in recall throughout the training, $C _ { h }$ ensures a gentle growth in final recall by setting a good lower bound. The intersection of both ensures that errors committed by one have a chance of being caught by the other; a mutual supervision between representations.
|
| 95 |
+
|
| 96 |
+
Comparison We compare on the $e n - \{ f r , d e , e s \}$ corpora provided by Wikimatrix (Schwenk et al., 2019), which we pre-process as described in 3.1. As these consist of a collection of mined sentence pairs together with their similarity scores, a manual threshold $\theta$ needs to be set to extract pairs. We run the extraction script using $\theta = 1 . 0 4$ , which has been suggested to be a good choice for most language pairs.2 We then use the resulting corpus to train a supervised NMT system using the same specifications as in 3.1.
|
| 97 |
+
|
| 98 |
+
The results can be viewed in table 3. For en- $f r$ , the supervised system trained on Wikimatrix outperforms SS-NMT by 3-4 BLEU points, while the opposite is the case for en-de, where SSNMT achieves 1-5 BLEU points more. For en-es, both approaches perform similarly. The variable performance of the two approaches may be due to the varying appropriateness of the extraction threshold $\theta$ in Wikimatrix. This yields the problem that for each language and corpus, a new optimal threshold needs to be found; a problem that SS-NMT overcomes by its use of two representation types that compliment each other during extraction without the need of a manually set threshold.
|
| 99 |
+
|
| 100 |
+
# 4 SELF-INDUCED CURRICULA
|
| 101 |
+
|
| 102 |
+
# 4.1 ORDER & CLOSENESS TO THE TRANSLATION TASK
|
| 103 |
+
|
| 104 |
+
As a first indicator of the existence of a preferred choice in the order of the extracted sentence pairs, we compare the performance of SS-NMT with different supervised NMT models trained on the data extracted by SS-NMT at different points in training. We consider the first $( \mathrm { N M T } _ { i n i t } )$ ), intermediate $( \mathrm { N M T } _ { m i d } )$ and final $( \mathrm { N M T } _ { e n d } )$ epochs of training as well as the concatenation of all unique pairs $( \mathrm { N M T } _ { a l l }$ ). We then train four supervised NMT models on this data. The difference in the translation quality one can obtain using only the data selected at different epochs illustrates the closeness of these data to the final translation task: we expect data extracted towards the end of the SS-NMT training to include more sentences which are parallel —as demanded by a translation task— and therefore to achieve a higher translation quality.
|
| 105 |
+
|
| 106 |
+
For each language pair and system, Table 3 shows the number of sentence pairs used for training and the achieved BLEU score. The SS-NMT training outperforms all the supervised versions across all tested languages. Notably, the performance is 1–3 BLEU points above the supervised system trained on all extracted data, despite the fact that the SS-NMT system uses a much smaller amount of data in its first epochs. This suggests that the SS-NMT system is able to exclude previously accepted false positives at later epochs, while training directly on the entirety of its extracted data leads to a recurring visitation of the same erroneous samples. Further, the quality and quantity of the extracted data grows as training continues for all languages analysed. This can be observed by the fact that the concatenation of the data extracted across epochs $( \mathrm { N M T } _ { a l l } )$ ) is always outperformed by the last and thus largest epoch $( \mathrm { N M T } _ { e n d } ,$ ), despite being much larger in size.
|
| 107 |
+
|
| 108 |
+

|
| 109 |
+
Figure 2: Perplexities on the English data extracted by SS-NMT (left) and average similarity scores of the accepted pairs (right).
|
| 110 |
+
|
| 111 |
+

|
| 112 |
+
Figure 3: Gunning Fog Index (left) and percentage of homographs (right) of extracted English data seen during the first $4 0 k$ steps in training.
|
| 113 |
+
|
| 114 |
+
A second indicator of the closeness of the curriculum to the final task is of course the similarity between the selected sentence pairs during training. In our case, we estimate similarity between pairs by their margin-based scores (Eq. 2) during training. At the beginning of training, the average similarity between extracted pairs is comparatively low, but it quickly rises within the first $1 0 0 k$ training steps to values close to margin ${ \sim } 1 . 0 7$ and margin ${ \sim } 1 . 1 2$ depending on the language pair. This evolution is depicted in Figure 2 (right). The increase in the mean similarity of the accepted pairs provides evidence for the base hypothesis that internal representations of translations grow closer in the cross-lingual space, and the system is able to exploit this fact by extracting increasingly similar —and accurate as seen in Section 3.2— pairs.
|
| 115 |
+
|
| 116 |
+
# 4.2 ORDER & COMPLEXITY
|
| 117 |
+
|
| 118 |
+
Establishing the complexity of a sentence is a complex task by itself. Complexity can be estimated by the loss of an instance with respect to the gold or target. In our self-supervised approach, there is no target for the sentence extraction task, so we try to infer complexity by other means.
|
| 119 |
+
|
| 120 |
+
First, we study the behaviour of the average perplexity throughout training. Perplexities of the extracted data are estimated using a language model trained with KenLM (Heafield, 2011) on the monolingual WPs for the four languages in our study. We observe the same behaviour in the four cases which can be illustrated by the English curves plotted in Figure 2 (left). Perplexity drops heavily within the first $1 0 k$ steps for all languages and models. This indicates that the data extracted in the first epoch includes more outliers, and the distribution of extracted sentences moves closer to the average observed in the monolingual WPs as training advances. The larger number of outliers at the beginning of training can be attributed to the larger number of homographs and short sentences (see Figure 3 (right)) at the beginning of training, leading to a skewed distribution of selected sentences.
|
| 121 |
+
|
| 122 |
+

|
| 123 |
+
Figure 4: Kernel density estimated Gunning Fog distributions and box plots over the monolingual Wikipedias (left) and over extracted en (en–de) sentences at different points in training (right). For comparison, the distribution over monolingual $ { \mathrm { W P } } _ { e n }$ is included in the latter case.
|
| 124 |
+
|
| 125 |
+
The presence of homographs is vital for the self-supervised system in its initialization phase. At the beginning of training, only word embeddings, and therefore $C _ { w }$ , are initialized with pre-trained data, while $\bar { C } _ { h }$ is randomly initialized. Thus, words that have the same index in the vocabulary — homographs— play an important role in identifying similar sentences using $C _ { h }$ , making up around $1 / 3$ of all tokens observed in the first epoch. As training progresses, and both $C _ { w }$ and $C _ { h }$ are adapted to the training data, the prevalence of homographs drops and the extraction is now less dependent on a shared vocabulary.
|
| 126 |
+
|
| 127 |
+
Finally, we analyze the complexity of the sentences that a SS-NMT system selects at different points of training by measuring their readability. For this, we apply a modified version of the Gunning Fog Index (GF) (Gunning, 1952), which is a measure of the years of schooling needed to understand a written text given the complexity of its sentences and vocabulary. It is defined as:
|
| 128 |
+
|
| 129 |
+
$$
|
| 130 |
+
\mathrm { G F } = 0 . 4 \left[ \left( \frac { w } { s } \right) + 1 0 0 \left( \frac { c } { w } \right) \right] ,
|
| 131 |
+
$$
|
| 132 |
+
|
| 133 |
+
where $w$ and $s$ are the number of words and sentences in a text. $c$ is the number of complex words, which are defined as words containing more than 2 syllables. The original formula excluded several linguistic phenomena from the complex word definition such as compound words, inflectional suffixes or familiar jargon; we do not apply all the language-dependent linguistic analysis.
|
| 134 |
+
|
| 135 |
+
Since our training data is build up with Wikipedia articles, the diversity in the complexity of the sentences is limited to the range of complexities observed in Wikipedia. Figure 4 (left) shows the Gunning Fog distributions over the monolingual WPs. We plot the probability density function for the Gunning Fox Index for the four WP editions estimated via a kernel density estimation. We observe that each distribution is made up of two overlapping distributions; one with low sentence complexity containing article titles and headers, and one with a higher average complexity and larger standard deviation containing content sentences.
|
| 136 |
+
|
| 137 |
+
To study the behaviour during training, we compare the Gunning Fog distributions of the English data extracted at the beginning, middle and end of $\mathbf { S } \mathbf { S } \mathbf { - } \mathbf { N } \mathbf { M } \mathbf { T } _ { e n d e }$ with that of the original mono $ { \mathrm { W P } } _ { e n }$ . In the extracted data, we observe that the overlapping distributions are less pronounced and that there is no trail of highly complex sentences. This is due to $( i )$ the pre-processing of the input data, which removes sentences containing less than 6 tokens, thus removing most WP titles and short sentences, and $( i i )$ the length accepted in our batches, which is constrained to 50 tokens per sentence, removing highly complex strings. Apart from this, the distributions in the middle and the end of training come close to the underlying one, but we observe a large shift towards very simple sentences in the first epoch. This shows that the system extracts mostly simple content at the beginning of training, but soon moves towards complex sentences that were previously not yet identifiable as parallel.
|
| 138 |
+
|
| 139 |
+
A more detailed evolution is depicted in Figure 3 (left). We accumulate extracted sentences within the period of $1 k$ steps each and report their GF scores. Here we observe how the complexity of the sentences extracted rises strongly within the first $2 0 k$ steps of training. For English, most models start with text that is deemed to be suitable for high school students (grade 10–11) and quickly turns to more complex sentences suited for undergraduate students in their first year ${ \sim } 1 3$ years of schooling). The mean of the full set of sentences in the English Wikipedia is of ${ \sim } 1 2$ , which corresponds to a high school senior. For all other languages, a similar trend of growing sentence complexity can be observed.
|
| 140 |
+
|
| 141 |
+
# 5 SUMMARY AND CONCLUSIONS
|
| 142 |
+
|
| 143 |
+
This paper explores self-supervised NMT systems where learning the MT model is done simultaneously with the selection of parallel sentences. This association makes the system define its own curriculum. We observe that the dynamics of mutual-supervision of both system’s internal representations, $C _ { w }$ and $C _ { h }$ , is imperative to the high recall and precision extraction of SS-NMT. Their combination for data selection over time resembles a denoising curriculum architecture in that the percentage of unprecise pairs —i.e. non-translations— decreases from $18 \%$ to $2 \%$ , with an especially fast descend at the beginning of training.
|
| 144 |
+
|
| 145 |
+
Even if the quality of the extraction increases with time, the lower-similarity sentences used at the beginning of the training are still relevant for the translation engine. We analyze the translation quality of a supervised NMT system trained on the extracted data at each epoch of the SS-NMT and observe a continuous increase in BLEU which cannot only be accounted for by the varying numbers of extracted pairs per epoch. Analogously, we also analyze the similarity scores of extracted sentences and see that they also increase over time. As extracted pairs are increasingly similar — and precise as argued before— the extraction itself resembles a secondary curriculum of growing task-relevance, where the task at hand is NMT learning with parallel sentences.
|
| 146 |
+
|
| 147 |
+
A tertiary curriculum of increased sample complexity could be observed via an analysis of the extracted data’s Gunning Fog indexes. Here, the system starts with sentences suitable for high school students $\scriptstyle ( \mathbf { G } \mathrm { F } = 1 0 - 1 1$ ) and quickly moves towards content suitable for first year undergraduate students $\mathrm { ( G F = 1 } 3$ ); an overachiever indeed as the norm over the complete WP is around $\mathrm { G F } { = } 1 2$ .
|
| 148 |
+
|
| 149 |
+
Lastly, by estimating the perplexity with an external language model trained on WP, we observe a steep decrease at the beginning of training with fast convergence. This indicates that the extracted data quickly starts to resemble the underlying distribution of all WP data, with a larger amount of outliers at the beginning. These outliers can be accounted for by the importance of homographs at the beginning of training. This raises the question of how SS-NMT will perform on really distant languages, which is something that will need to be examined in our future work.
|
| 150 |
+
|
| 151 |
+
# REFERENCES
|
| 152 |
+
|
| 153 |
+
Sadaf Abdul-Rauf and Holger Schwenk. On the use of comparable corpora to improve SMT performance. In Proceedings of the 12th Conference of the European Chapter of the ACL (EACL 2009), pp. 16–23, Athens, Greece, March 2009. Association for Computational Linguistics.
|
| 154 |
+
|
| 155 |
+
Sisay Fissaha Adafre and Maarten de Rijke. Finding similar sentences across multiple languages in Wikipedia. In Proceedings of the Workshop on NEW TEXT Wikis and blogs and other dynamic text sources, 2006. URL https://www.aclweb.org/anthology/W06-2810.
|
| 156 |
+
|
| 157 |
+
Mikel Artetxe and Holger Schwenk. Margin-based parallel corpus mining with multilingual sentence embeddings. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 3197–3203, Florence, Italy, July 2019a. Association for Computational Linguistics.
|
| 158 |
+
|
| 159 |
+
Mikel Artetxe and Holger Schwenk. Margin-based parallel corpus mining with multilingual sentence embeddings. In Proceedings of the 57th Conference of the Association for Computational Linguistics, ACL 2019, Florence, Italy, July 28- August 2, 2019, Volume 1: Long Papers, pp. 3197–3203, 2019b.
|
| 160 |
+
|
| 161 |
+
Mikel Artetxe, Gorka Labaka, and Eneko Agirre. Learning bilingual word embeddings with (almost) no bilingual data. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 451–462, 2017.
|
| 162 |
+
|
| 163 |
+
Mikel Artetxe, Gorka Labaka, and Eneko Agirre. Unsupervised statistical machine translation. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pp. 3632–3642, Brussels, Belgium, November 2018a. Association for Computational Linguistics.
|
| 164 |
+
|
| 165 |
+
Mikel Artetxe, Gorka Labaka, Eneko Agirre, and Kyunghyun Cho. Unsupervised neural machine translation. In Proceedings of the Sixth International Conference on Learning Representations, ICLR, April 2018b.
|
| 166 |
+
|
| 167 |
+
Mikel Artetxe, Gorka Labaka, and Eneko Agirre. An effective approach to unsupervised machine translation. August 2019.
|
| 168 |
+
|
| 169 |
+
Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural Machine Translation by Jointly Learning to Align and Translate. In Proceedings of the 3rd International Conference on Learning Representations (ICLR 2015), San Diego, CA, September 2014.
|
| 170 |
+
|
| 171 |
+
Loc Barrault, Ondej Bojar, Marta R. Costa-juss, Christian Federmann, Mark Fishel, Yvette Graham, Barry Haddow, Matthias Huck, Philipp Koehn, Shervin Malmasi, Christof Monz, Mathias Mller, Santanu Pal, Matt Post, and Marcos Zampieri. Findings of the 2019 conference on machine translation (wmt19). In Proceedings of the Fourth Conference on Machine Translation (Volume 2: Shared Task Papers, Day 1), pp. 1–61, Florence, Italy, August 2019. Association for Computational Linguistics.
|
| 172 |
+
|
| 173 |
+
Alberto Barron-Cede ´ no, Cristina Espa ˜ na-Bonet, Josu Boldoba, and Llu ˜ ´ıs Marquez. A Factory of \` Comparable Corpora from Wikipedia. In Proceedings of the Eighth Workshop on Building and Using Comparable Corpora, pp. 3–13, 2015.
|
| 174 |
+
|
| 175 |
+
Yoshua Bengio, Jer´ ome Louradour, Ronan Collobert, and Jason Weston. Curriculum learning. In ˆ Proceedings of the 26th Annual International Conference on Machine Learning, pp. 41–48, New York, NY, USA, 2009. ACM.
|
| 176 |
+
|
| 177 |
+
Yoshua Bengio, Aaron Courville, and Pascal Vincent. Representation learning: A review and new perspectives. IEEE Trans. Pattern Anal. Mach. Intell., 35(8):1798–1828, August 2013.
|
| 178 |
+
|
| 179 |
+
Houda Bouamor and Hassan Sajjad. H2@bucc18: Parallel sentence extraction from comparable corpora using multilingual sentence embeddings. In Reinhard Rapp, Pierre Zweigenbaum, and Serge Sharoff (eds.), Proceedings of the Eleventh International Conference on Language Resources and Evaluation (LREC 2018), Paris, France, may 2018. European Language Resources Association (ELRA).
|
| 180 |
+
|
| 181 |
+
Vishrav Chaudhary, Yuqing Tang, Francisco Guzman, Holger Schwenk, and Philipp Koehn. Low- ´ resource corpus filtering using multilingual sentence embeddings. In Proceedings of the Fourth Conference on Machine Translation (Volume 3: Shared Task Papers, Day 2), pp. 261–266, Florence, Italy, August 2019. Association for Computational Linguistics.
|
| 182 |
+
|
| 183 |
+
Kyunghyun Cho, Bart van Merrienboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, ¨ Holger Schwenk, and Yoshua Bengio. Learning Phrase Representations Using RNN Encoder– Decoder for Statistical Machine Translation. In Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP 2014), pp. 1724–1734, Doha, Qatar, October 2014. Association for Computational Linguistics.
|
| 184 |
+
|
| 185 |
+
Sergey Edunov, Myle Ott, Michael Auli, and David Grangier. Understanding back-translation at scale. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pp. 489–500, Brussels, Belgium. Association for Computational Linguistics.
|
| 186 |
+
|
| 187 |
+
Jeffrey L. Elman. Learning and development in neural networks: the importance of starting small. Cognition, 48(1):71 – 99, 1993.
|
| 188 |
+
|
| 189 |
+
Cristina Espana-Bonet, Ad ˜ am Csaba Varga, Alberto Barr ´ on-Cede ´ no, and Josef van Genabith. An ˜ empirical analysis of NMT-derived interlingual embeddings and their use in parallel sentence identification. IEEE Journal of Selected Topics in Signal Processing, 11(8):1340–1350, 2017.
|
| 190 |
+
|
| 191 |
+
Yoav Freund and Robert E. Schapire. Experiments with a new boosting algorithm. In Proceedings of the Thirteenth International Conference on International Conference on Machine Learning, pp. 148–156, San Francisco, CA, USA, 1996. Morgan Kaufmann Publishers Inc.
|
| 192 |
+
|
| 193 |
+
Pascale Fung and Percy Cheung. Mining very-non-parallel corpora: Parallel sentence and lexicon extraction via bootstrapping and em. In Proceedings of the 2004 Conference on Empirical Methods in Natural Language Processing, pp. 57–63, Barcelona, Spain, July 2004. Association for Computational Linguistics.
|
| 194 |
+
|
| 195 |
+
Francis Gregoire and Philippe Langlais. Extracting parallel sentences with bidirectional recurrent ´ neural networks to improve machine translation. In Proceedings of the 27th International Conference on Computational Linguistics, pp. 1442–1453, Santa Fe, New Mexico, USA, August 2018. Association for Computational Linguistics.
|
| 196 |
+
|
| 197 |
+
Robert Gunning. The Technique of Clear Writing. McGraw-Hill, 1952.
|
| 198 |
+
|
| 199 |
+
Guy Hacohen and Daphna Weinshall. On the power of curriculum learning in training deep networks. arXiv preprint arXiv:1904.03626, 2019.
|
| 200 |
+
|
| 201 |
+
Viktor Hangya and Alexander Fraser. Unsupervised parallel sentence extraction with parallel segment detection helps machine translation. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 1224–1234, Florence, Italy, July 2019. Association for Computational Linguistics.
|
| 202 |
+
|
| 203 |
+
Kenneth Heafield. Kenlm: Faster and smaller language model queries. In Proceedings of the Sixth Workshop on Statistical Machine Translation, pp. 187–197, Stroudsburg, PA, USA, 2011. Association for Computational Linguistics.
|
| 204 |
+
|
| 205 |
+
Guillaume Klein, Yoon Kim, Yuntian Deng, Jean Senellart, and Alexander Rush. Opennmt: Opensource toolkit for neural machine translation. In Proceedings of ACL 2017, System Demonstrations, pp. 67–72. Association for Computational Linguistics, 2017.
|
| 206 |
+
|
| 207 |
+
Tom Kocmi and Ondrej Bojar. Curriculum learning and minibatch bucketing in neural machine translation. In Recent Advances in Natural Language Processing (RANLP, 2017.
|
| 208 |
+
|
| 209 |
+
Philipp Koehn. Europarl: A Parallel Corpus for Statistical Machine Translation. In Conference Proceedings: the tenth Machine Translation Summit, pp. 79–86, Phuket, Thailand, 2005. AAMT, AAMT.
|
| 210 |
+
|
| 211 |
+
Philipp Koehn, Hieu Hoang, Alexandra Birch, Chris Callison-Burch, Marcello Federico, Nicola Bertoldi, Brooke Cowan, Wade Shen, Christine Moran, Richard Zens, Chris Dyer, Ondrej Bojar, Alexandra Constantin, and Evan Herbst. Moses: Open source toolkit for statistical machine translation. In Proceedings of the 45th Annual Meeting of the Association for Computational Linguistics Companion Volume Proceedings of the Demo and Poster Sessions, pp. 177–180. Association for Computational Linguistics, 2007.
|
| 212 |
+
|
| 213 |
+
Gaurav Kumar, George Foster, Colin Cherry, and Maxim Krikun. Reinforcement learning based curriculum optimization for neural machine translation. In Proceedings of the Annual Conference of the North American Chapter of the Association for Computational Linguistics (NAACL), 2019.
|
| 214 |
+
|
| 215 |
+
M. P. Kumar, Benjamin Packer, and Daphne Koller. Self-paced learning for latent variable models. In J. D. Lafferty, C. K. I. Williams, J. Shawe-Taylor, R. S. Zemel, and A. Culotta (eds.), Advances in Neural Information Processing Systems 23, pp. 1189–1197. Curran Associates, Inc., 2010.
|
| 216 |
+
|
| 217 |
+
Guillaume Lample, Alexis Conneau, Ludovic Denoyer, and Marc’Aurelio Ranzato. Unsupervised machine translation using monolingual corpora only. In Proceedings of the Sixth International Conference on Learning Representations, ICLR, April 2018a.
|
| 218 |
+
|
| 219 |
+
Guillaume Lample, Myle Ott, Alexis Conneau, Ludovic Denoyer, and Marc’Aurelio Ranzato. Phrase-based & neural unsupervised machine translation. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pp. 5039–5049. Association for Computational Linguistics, 2018b.
|
| 220 |
+
|
| 221 |
+
Alon Lavie and Abhaya Agarwal. Meteor: An automatic metric for mt evaluation with high levels of correlation with human judgments. In Proceedings of the Second Workshop on Statistical Machine Translation, pp. 228–231, Stroudsburg, PA, USA, 2007. Association for Computational Linguistics.
|
| 222 |
+
|
| 223 |
+
Dragos Stefan Munteanu and Daniel Marcu. Improving machine translation performance by exploiting non-parallel corpora. Comput. Linguist., 31(4):477–504, December 2005.
|
| 224 |
+
|
| 225 |
+
Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: A method for automatic evaluation of machine translation. In Proceedings of the 40th Annual Meeting on Association for Computational Linguistics, pp. 311–318, Stroudsburg, PA, USA, 2002. Association for Computational Linguistics.
|
| 226 |
+
|
| 227 |
+
Emmanouil Antonios Platanios, Otilia Stretcu, Graham Neubig, Barnabas Poczos, and Tom M Mitchell. Competence-based curriculum learning for neural machine translation. arXiv preprint arXiv:1903.09848, 2019.
|
| 228 |
+
|
| 229 |
+
Rajat Raina, Alexis Battle, Honglak Lee, Benjamin Packer, and Andrew Y. Ng. Self-taught learning: Transfer learning from unlabeled data. In Proceedings of the 24th International Conference on Machine Learning, pp. 759–766, New York, NY, USA, 2007. ACM.
|
| 230 |
+
|
| 231 |
+
Shuo Ren, Zhirui Zhang, Shujie Liu, Ming Zhou, and Shuai Ma. Unsupervised neural machine translation with smt as posterior regularization, 2019.
|
| 232 |
+
|
| 233 |
+
Philip Resnik and Noah A. Smith. The web as a parallel corpus. Computational Linguistics, 29(3): 349–380, 2003. doi: 10.1162/089120103322711578. URL https://www.aclweb.org/ anthology/J03-3002.
|
| 234 |
+
|
| 235 |
+
Dana Ruiter, Cristina Espana-Bonet, and Josef van Genabith. Self-supervised neural machine trans- ˜ lation. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 1828–1834, Florence, Italy, July 2019. Association for Computational Linguistics.
|
| 236 |
+
|
| 237 |
+
Holger Schwenk. Filtering and mining parallel data in a joint multilingual space. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pp. 228–234, Melbourne, Australia, July 2018. Association for Computational Linguistics.
|
| 238 |
+
|
| 239 |
+
Holger Schwenk, Vishrav Chaudhary, Shuo Sun, Hongyu Gong, and Francisco Guzman. Wiki- ´ matrix: Mining $1 3 5 \mathrm { m }$ parallel sentences in 1620 language pairs from wikipedia. arXiv preprint arXiv:1907.05791, 2019.
|
| 240 |
+
|
| 241 |
+
Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural Machine Translation of Rare Words with Subword Units. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, (ACL 2016), Volume 1: Long Papers, pp. 1715–1725, Berlin, Germany, 2016.
|
| 242 |
+
|
| 243 |
+
Jason R. Smith, Chris Quirk, and Kristina Toutanova. Extracting parallel sentences from comparable corpora using document level alignment. In Human Language Technologies: The 2010 Annual Conference of the North American Chapter of the Association for Computational Linguistics, HLT ’10, pp. 403–411, Stroudsburg, PA, USA, 2010. Association for Computational Linguistics.
|
| 244 |
+
|
| 245 |
+
Matthew Snover, Bonnie Dorr, Richard Schwartz, Linnea Micciulla, and Ralph Weischedel. A study of translation error rate with targeted human annotation. In In Proceedings of the Association for Machine Transaltion in the Americas (AMTA 2006, 2006.
|
| 246 |
+
|
| 247 |
+
Masao Utiyama and Hitoshi Isahara. Reliable measures for aligning Japanese-English news articles and sentences. In Proceedings of the 41st Annual Meeting of the Association for Computational Linguistics, pp. 72–79, Sapporo, Japan, July 2003. Association for Computational Linguistics.
|
| 248 |
+
|
| 249 |
+
Marlies van der Wees, Arianna Bisazza, and Christof Monz. Dynamic data selection for neural machine translation. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing., 2017.
|
| 250 |
+
|
| 251 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Ł ukasz Kaiser, and Illia Polosukhin. Attention is all you need. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett (eds.), Advances in Neural Information Processing Systems 30, pp. 5998–6008. Curran Associates, Inc., 2017.
|
| 252 |
+
|
| 253 |
+
Wei Wang, Taro Watanabe, Macduff Hughes, Tetsuji Nakagawa, and Ciprian Chelba. Denoising neural machine translation training with trusted data and online data selection. In Proceedings of the Third Conference on Machine Translation, pp. 133–143. Association for Computational Linguistics, 2018.
|
| 254 |
+
|
| 255 |
+
Wei Wang, Isaac Caswell, and Ciprian Chelba. Dynamically composing domain-data selection with clean-data selection by ”co-curricular learning” for neural machine translation. arXiv preprint arXiv:1906.01130, 2019a.
|
| 256 |
+
|
| 257 |
+
Wei Wang, Ye Tian, Jiquan Ngiam, Yinfei Yang, Isaac Caswell, and Zarana Parekh. Learning a multitask curriculum for neural machine translation. arXiv preprint arXiv:1908.10940, 2019b.
|
| 258 |
+
|
| 259 |
+
Daphna Weinshall, Gad Cohen, and Dan Amir. Curriculum learning by transfer learning: Theory and experiments with deep networks. In International Conference on Machine Learning (ICML), volume 36, 2018.
|
| 260 |
+
|
| 261 |
+
Lijun Wu, Jinhua Zhu, Di He, Fei Gao, Tao QIN, Jianhuang Lai, and Tie-Yan Liu. Machine translation with weakly paired documents. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pp. 4366–4375, Hong Kong, China, November 2019. Association for Computational Linguistics.
|
| 262 |
+
|
| 263 |
+
Zhen Yang, Wei Chen, Feng Wang, and Bo Xu. Unsupervised neural machine translation with weight sharing. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 46–55. Association for Computational Linguistics, 2018.
|
| 264 |
+
|
| 265 |
+
Keiji Yasuda and Eiichiro Sumita. Method for building sentence-aligned corpus from wikipedia. In AAAI Workshop on Wikipedia and Artificial Intelligence (WikiAI08), 2008.
|
| 266 |
+
|
| 267 |
+
Dakun Zhang, Jungi Kim, Josep Crego, and Jean Senellart. Boosting neural machine translation. In Proceedings of the Eighth International Joint Conference on Natural Language Processing (Volume 2: Short Papers, pp. 271–276, Taipei, Taiwan, 2017. Asian Federation of Natural Language Processing.
|
| 268 |
+
|
| 269 |
+
Xuan Zhang, Gaurav Kumar, Huda Khayrallah, Kenton Murray, Jeremy Gwinnup, Marianna J Martindale, Paul McNamee, Kevin Duh, and Marine Carpuat. An empirical exploration of curriculum learning for neural machine translation. arXiv preprint arXiv:1811.00739, 2018.
|
| 270 |
+
|
| 271 |
+
Xuan Zhang, Pamela Shapiro, Gaurav Kumar, Paul McNamee, Marine Carpuat, and Kevin Duh. Curriculum learning for domain adaptation in neural machine translation. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), June 2019.
|
md/train/rk4Qso0cKm/rk4Qso0cKm.md
ADDED
|
@@ -0,0 +1,340 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# AD V-BNN: IMPROVED ADVERSARIAL DEFENSE THROUGH ROBUST BAYESIAN NEURAL NETWORK
|
| 2 |
+
|
| 3 |
+
Xuanqing Liu1, Yao $\mathbf { L i } ^ { 2 , }$ ∗, Chongruo $\mathbf { W } \mathbf { u } ^ { 3 , \ast } \&$ Cho-Jui Hsieh1
|
| 4 |
+
|
| 5 |
+
1: Department of Computer Science, UCLA Los Angeles, CA 90095, UCLA {xqliu,choheish}@cs.ucla.edu 2: Department of Statistics, UC Davis 3: Department of Computer Science, UC Davis Davis, CA 95616, USA {crwu,yaoli}@ucdavis.edu
|
| 6 |
+
|
| 7 |
+
# ABSTRACT
|
| 8 |
+
|
| 9 |
+
We present a new algorithm to train a robust neural network against adversarial attacks. Our algorithm is motivated by the following two ideas. First, although recent work has demonstrated that fusing randomness can improve the robustness of neural networks (Liu et al., 2017), we noticed that adding noise blindly to all the layers is not the optimal way to incorporate randomness. Instead, we model randomness under the framework of Bayesian Neural Network (BNN) to formally learn the posterior distribution of models in a scalable way. Second, we formulate the mini-max problem in BNN to learn the best model distribution under adversarial attacks, leading to an adversarial-trained Bayesian neural network. Experiment results demonstrate that the proposed algorithm achieves state-of-the-art performance under strong attacks. On CIFAR-10 with VGG network, our model leads to $14 \%$ accuracy improvement compared with adversarial training (Madry et al., 2017) and random self-ensemble (Liu et al., 2017) under PGD attack with 0.035 distortion, and the gap becomes even larger on a subset of ImageNet1.
|
| 10 |
+
|
| 11 |
+
# 1 INTRODUCTION
|
| 12 |
+
|
| 13 |
+
Deep neural networks have demonstrated state-of-the-art performances on many difficult machine learning tasks. Despite the fundamental breakthroughs in various tasks, deep neural networks have been shown to be utterly vulnerable to adversarial attacks (Szegedy et al., 2013; Goodfellow et al., 2015). Carefully crafted perturbations can be added to the inputs of the targeted model to drive the performances of deep neural networks to chance-level. In the context of image classification, these perturbations are imperceptible to human eyes but can change the prediction of the classification model to the wrong class. Algorithms seek to find such perturbations are denoted as adversarial attacks (Chen et al., 2018; Carlini & Wagner, 2017b; Papernot et al., 2017), and some attacks are still effective in the physical world (Kurakin et al., 2017; Evtimov et al., 2017). The inherent weakness of lacking robustness to adversarial examples for deep neural networks brings out security concerns, especially for security-sensitive applications which require strong reliability.
|
| 14 |
+
|
| 15 |
+
To defend from adversarial examples and improve the robustness of neural networks, many algorithms have been recently proposed (Papernot et al., 2016; Zantedeschi et al., 2017; Kurakin et al., 2017; Huang et al., 2015; Xu et al., 2015). Among them, there are two lines of work showing effective results on medium-sized data (e.g., CIFAR-10). The first line of work uses adversarial training to improve robustness, and the recent algorithm proposed in Madry et al. (2017) has been recognized as one of the most successful defenses, as shown in Athalye et al. (2018). The second line of work adds stochastic components in the neural network to hide gradient information from attackers. In the black-box setting, stochastic outputs can significantly increase query counts for attacks using finite-difference techniques (Chen et al., 2018; Ilyas et al., 2018), and even in the white-box setting the recent Random Self-Ensemble (RSE) approach proposed by Liu et al. (2017) achieves similar performance to Madry’s adversarial training algorithm.
|
| 16 |
+
|
| 17 |
+
In this paper, we propose a new defense algorithm called Adv-BNN. The idea is to combine adversarial training and Bayesian network, although trying BNNs in adversarial attacks is not new (e.g. (Li & Gal, 2017; Feinman et al., 2017; Smith & Gal, 2018)), and very recently Ye & Zhu (2018) also tried to combine Bayesian learning with adversarial training, this is the first time we scale the problem to complex data and our approach achieves better robustness than previous defense methods. The contributions of this paper can be summarized below:
|
| 18 |
+
|
| 19 |
+
• Instead of adding randomness to the input of each layer (as what has been done in RSE), we directly assume all the weights in the network are stochastic and conduct training with techniques commonly used in Bayesian Neural Network (BNN).
|
| 20 |
+
• We propose a new mini-max formulation to combine adversarial training with BNN, and show the problem can be solved by alternating between projected gradient descent and SGD.
|
| 21 |
+
• We test the proposed Adv-BNN approach on CIFAR10, STL10 and ImageNet143 datasets, and show significant improvement over previous approaches including RSE and adversarial training.
|
| 22 |
+
|
| 23 |
+
Notations A neural network parameterized by weights $\pmb { w } \in \mathbb { R } ^ { d }$ is denoted by $f ( { \pmb x } ; { \pmb w } )$ , where $\ b { x } \in \mathbb { R } ^ { p }$ is an input example and $y$ is the corresponding label, the training/testing dataset is ${ \mathcal { D } } _ { \mathrm { t r / t e } }$ with size $N _ { \mathrm { t r / t e } }$ respectively. When necessary, we abuse ${ \mathcal { D } } _ { \mathrm { t r / t e } }$ to define the empirical distributions, i.e. Dtr/te = 1Ntr/t $\begin{array} { r } { \mathcal { D } _ { \mathrm { t r / t e } } = \frac { 1 } { N _ { \mathrm { t r / t e } } } \sum _ { i = 1 } ^ { N _ { \mathrm { t r / t e } } } \delta ( x _ { i } ) \delta ( y _ { i } ) } \end{array}$ e PNtr/tei=1 δ(xi)δ(yi), where δ(·) is the Dirac delta function. xo represents the original input and $\pmb { x } ^ { \mathrm { a d v } }$ denotes the adversarial example. The loss function is represented as $\ell \big ( f ( \pmb { x } _ { i } ; \pmb { w } ) , y _ { i } \big )$ , where $i$ is the index of the data point. Our approach works for any loss but we consider the cross-entropy loss in all the experiments. The adversarial perturbation is denoted as $\pmb { \xi } \in \mathbb { R } ^ { p }$ , and adversarial example is generated by ${ \pmb x } ^ { \mathrm { a d v } } = { \pmb x } _ { o } + { \pmb \xi }$ . In this paper, we focus on the attack under norm constraint Madry et al. (2017), so that $\| \pmb { \xi } \| \le \gamma$ . In order to align with the previous works, in the experiments we set the norm to $\| \cdot \| _ { \infty }$ . The Hadamard product is denoted as $\odot$ .
|
| 24 |
+
|
| 25 |
+
# 2 BACKGROUNDS
|
| 26 |
+
|
| 27 |
+
# 2.1 ADVERSARIAL ATTACK AND DEFENSE
|
| 28 |
+
|
| 29 |
+
In this section, we summarize related works on adversarial attack and defense.
|
| 30 |
+
|
| 31 |
+
Attack: Most algorithms generate adversarial examples based on the gradient of loss function with respect to the inputs. For example, FGSM (Goodfellow et al., 2015) perturbs an example by the sign of gradient, and use a step size to control the $\ell _ { \infty }$ norm of perturbation. Kurakin et al. (2017) proposes to run multiple iterations of FGSM. More recently, C&W attack Carlini & Wagner (2017a) formally poses attack as an optimization problem, and applies a gradient-based iterative solver to get an adversarial example. Both C&W attack and PGD attack (Madry et al., 2017) have been frequently used to benchmark the defense algorithms due to their effectiveness (Athalye et al., 2018). Throughout, we take the PGD attack as an example, largely following Madry et al. (2017).
|
| 32 |
+
|
| 33 |
+
The goal of PGD attack is to find adversarial examples in a $\gamma$ -ball, which can be naturally formulated as the following objective function:
|
| 34 |
+
|
| 35 |
+
$$
|
| 36 |
+
\operatorname* { m a x } _ { \| \pmb { \xi } \| _ { \infty } \leq \gamma } \ell ( f ( \pmb { x } _ { o } + \pmb { \xi } ; \pmb { w } ) , y _ { o } ) .
|
| 37 |
+
$$
|
| 38 |
+
|
| 39 |
+
Starting from $\pmb { x } ^ { 0 } = \pmb { x } _ { o }$ , PGD attack conducts projected gradient descent iteratively to update the adversarial example:
|
| 40 |
+
|
| 41 |
+
$$
|
| 42 |
+
\begin{array} { r } { \pmb { x } ^ { t + 1 } = \Pi _ { \gamma } \left\{ \pmb { x } ^ { t } + \alpha \cdot \mathrm { s i g n } \Big ( \nabla _ { \pmb { x } } \ell \big ( f ( \pmb { x } ^ { t } ; \pmb { w } ) , y _ { o } \big ) \Big ) \right\} , } \end{array}
|
| 43 |
+
$$
|
| 44 |
+
|
| 45 |
+
where $\Pi _ { \gamma }$ is the projection to the set $\{ { \pmb x } | \| { \pmb x } - { \pmb x } _ { o } \| _ { \infty } \le { \gamma } \}$ . Although multi-step PGD iterations may not necessarily return the optimal adversarial examples, we decided to apply it in our experiments, following the previous work of (Madry et al., 2017). An advantage of PGD attack over C&W attack is that it gives us a direct control of distortion by changing $\gamma$ , while in C&W attack we can only do this indirectly via tuning the regularizer.
|
| 46 |
+
|
| 47 |
+
Since we are dealing with networks with random weights, we elaborate more on which strategy should attackers take to increase their success rate, and the details can be found in Athalye et al. (2018). In random neural networks, an attacker seeks a universal distortion $\boldsymbol { \xi }$ that cheats a majority of realizations of the random weights. This can be achieved by maximizing the loss expectation
|
| 48 |
+
|
| 49 |
+
$$
|
| 50 |
+
\pmb { \xi } \triangleq \underset { \| \pmb { \xi } \| _ { \infty } \leq \gamma } { \arg \operatorname* { m a x } } \underset { \pmb { w } } { \mathbb { E } } \big [ \ell \big ( f \big ( \pmb { x } _ { o } + \pmb { \xi } ; \pmb { w } \big ) , y _ { o } \big ) \big ] .
|
| 51 |
+
$$
|
| 52 |
+
|
| 53 |
+
Here the model weights $\pmb { w }$ are considered as random vector following certain distributions. In fact, solving (3) to a saddle point can be done easily by performing multi-step (projected) SGD updates. This is done inherently in some iterative attacks such as C&W or PGD discussed above, where the only difference is that we sample new weights $\pmb { w }$ at each iteration.
|
| 54 |
+
|
| 55 |
+
Defense: There are a large variety of defense methods proposed in recent years, e.g. denoiser based HGD (Liao et al., 2017) and randomized image preprocessing (Xie et al., 2017). Readers can find more from Kurakin et al. (2018). Below we select two representative ones that turn out to be effective to white box attacks. They are the major baselines in our experiments.
|
| 56 |
+
|
| 57 |
+
The first example is the adversarial training (Szegedy et al., 2013; Goodfellow et al., 2015). It is essentially a data augmentation method, which trains the deep neural networks on adversarial examples until the loss converges. Instead of searching for adversarial examples and adding them into the training data, Madry et al. (2017) proposed to incorporate the adversarial search inside the training process, by solving the following robust optimization problem:
|
| 58 |
+
|
| 59 |
+
$$
|
| 60 |
+
\pmb { w } ^ { * } = \underset { \pmb { w } } { \arg \operatorname* { m i n } } \ \underset { ( \pmb { x } , \pmb { y } ) \sim \mathcal { D } _ { \mathrm { t r } } } { \mathbb { E } } \left\{ \underset { \| \pmb { \xi } \| _ { \infty } \leq \gamma } { \operatorname* { m a x } } \ell \big ( f ( \pmb { x } + \pmb { \xi } ; \pmb { w } ) , \ b { y } \big ) \right\} ,
|
| 61 |
+
$$
|
| 62 |
+
|
| 63 |
+
where ${ \mathcal { D } } _ { \mathrm { t r } }$ is the training data distribution. The above problem is approximately solved by generating adversarial examples using PGD attack and then minimizing the classification loss of the adversarial example. In this paper, we propose to incorporate adversarial training in Bayesian neural network to achieve better robustness.
|
| 64 |
+
|
| 65 |
+
The other example is RSE (Liu et al., 2017), in this algorithm the authors proposed a “noise layer”, which fuses input features with Gaussian noise. They show empirically that an ensemble of models can increase the robustness of deep neural networks. Besides, their method can generate an infinite number of models on-the-fly without any additional memory cost. The noise layer is applied in both training and testing phases, so the prediction accuracy will not be largely affected. Our algorithm is different from RSE in two folds: 1) We add noise to each weight instead of input or hidden feature, and formally model it as a BNN. 2) We incorporate adversarial training to further improve the performance.
|
| 66 |
+
|
| 67 |
+
# 2.2 BAYESIAN NEURAL NETWORKS (BNN)
|
| 68 |
+
|
| 69 |
+
The idea of BNN is illustrated in Fig. 1. Given the observable random variables $( { \pmb x } , y )$ , we aim to estimate the distributions of hidden variables $\textbf { \em w }$ . In our case, the observable random variables correspond to the features $_ { \textbf { \em x } }$ and labels $y$ , and we are interested in the posterior over the weights $p ( \pmb { w } | \pmb { x } , y )$ given the prior $p ( \pmb { w } )$ . However, the exact solution of posterior is often intractable: notice that $\begin{array} { r } { p ( \pmb { w } | \pmb { x } , y ) = \frac { p ( \pmb { x } , y | \pmb { w } ) p ( \pmb { w } ) } { p ( \pmb { x } , y ) } } \end{array}$ but the denominator involves a high dimensional integral (Blei et al., 2017), hence the conditional probabilities are hard to compute. To speedup inference, we generally have two approaches—we can either sample ${ \pmb w } \sim \bar { p ( { \pmb w } | { \pmb x } , \bar { y ) } }$ efficiently without knowing the closed-form formula through, for example, Stochastic Gradient Langevin Dynamics (SGLD) (Welling & Teh, 2011), or we can approximate the true posterior $p ( \pmb { w } | \pmb { x } , y )$ by a parametric distribution $q _ { \pmb { \theta } } ( \pmb { w } )$ , where the unknown parameter $\pmb \theta$ is estimated by minimizing ${ \sf K L } \big ( q _ { \theta } ( { \pmb w } ) \parallel p ( { \pmb w } | { \pmb x } , y ) \big )$ over $\pmb \theta$ . For
|
| 70 |
+
|
| 71 |
+

|
| 72 |
+
Figure 1: Illustration of Bayesian neural networks.
|
| 73 |
+
|
| 74 |
+
neural network, the exact form of KL-divergence can be unobtainable, but we can easily find an unbiased gradient estimator of it using backward propagation, namely Bayes by Backprop (Blundell et al., 2015).
|
| 75 |
+
|
| 76 |
+
Despite that both methods are widely used and analyzed in-depth, they have some obvious shortcomings, making high dimensional Bayesian inference remain to be an open problem. For SGLD and its extension (e.g. (Li et al., 2016)), since the algorithms are essentially SGD updates with extra Gaussian noise, they are very easy to implement. However, they can only get one sample ${ \pmb w } \sim p ( { \pmb w } | { \pmb x } , y )$ in each minibatch iteration at the cost of one forward-backward propagation, thus not efficient enough for fast inference. In addition, as the step size $\eta _ { t }$ in SGLD decreases, the samples become more and more correlated so that one needs to generate many samples in order to control the variance. Conversely, the variational inference method is efficient to generate samples since we know the approximated posterior $q _ { \pmb { \theta } } ( \pmb { w } )$ once we minimized the KL-divergence. The problem is that for simplicity we often assume the approximation $q _ { \theta }$ to be a fully factorized Gaussian distribution:
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
q _ { \pmb \theta } ( \pmb w ) = \prod _ { i = 1 } ^ { d } q _ { \pmb \theta _ { i } } ( \pmb w _ { i } ) , \mathrm { ~ a n d ~ } q _ { \pmb \theta _ { i } } ( \pmb w _ { i } ) = \mathcal N ( \pmb w _ { i } ; \pmb \mu _ { i } , \pmb \sigma _ { i } ^ { 2 } ) .
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
Although our assumption (5) has a simple form, it inherits the main drawback from mean-field approximation. When the ground truth posterior has significant correlation between variables, the approximation in (5) will have a large deviation from true posterior $p ( \pmb { w } | \pmb { x } , y )$ . This is especially true for convolutional neural networks, where the values in the same convolutional kernel seem to be highly correlated. However, we still choose this family of distribution in our design as the simplicity and efficiency are mostly concerned.
|
| 83 |
+
|
| 84 |
+
In fact, there are many techniques in deep learning area borrowing the idea of Bayesian inference without mentioning explicitly. For example, Dropout (Srivastava et al., 2014) is regarded as a powerful regularization tool for deep neural networks, which applies an element-wise product of the feature maps and i.i.d. Bernoulli or Gaussian r.v. $B ( 1 , \alpha )$ (or $\bar { \mathcal { N } } ( 1 , \alpha ) \}$ . If we allow each dimension to have an independent dropout rate and take them as model parameters to be learned, then we can extend it to the variational dropout method (Kingma et al., 2015). Notably, learning the optimal dropout rates for data relieves us from manually tuning hyper-parameter on hold-out data. Similar idea is also used in RSE (Liu et al., 2017), except that it was used to improve the robustness under adversarial attacks. As we discussed in the previous section, RSE incorporates Gaussian noise $\epsilon \sim \mathcal { N } ( 0 , \sigma ^ { 2 } )$ in an additive manner, where the variance $\sigma ^ { 2 }$ is user predefined in order to maximize the performance. Different from RSE, our Adv-BNN has two degrees of freedom (mean and variance) and the network is trained on adversarial examples.
|
| 85 |
+
|
| 86 |
+
# 3 METHOD
|
| 87 |
+
|
| 88 |
+
In our method, we combine the idea of adversarial training (Madry et al., 2017) with Bayesian neural network, hoping that the randomness in the weights $\textbf { \em w }$ provides stronger protection for our model.
|
| 89 |
+
|
| 90 |
+
To build our Bayesian neural network, we assume the joint distribution $q _ { \mu , s } ( \pmb { w } )$ is fully factorizable (see (5)), and each posterior $q _ { \pmb { \mu } _ { i } , \pmb { s } _ { i } } ( \pmb { w } _ { i } )$ follows normal distribution with mean $\pmb { \mu _ { i } }$ and standard deviation $\exp ( { \pmb { s } } _ { i } ) > 0$ . The prior distribution is simply isometric Gaussian $\mathcal { N } ( \mathbf { 0 } _ { d } , s _ { 0 } ^ { 2 } I _ { d \times d } )$ . We choose the Gaussian prior and posterior for its simplicity and closed-form KL-divergence, that is, for any two Gaussian distributions $s$ and $t$ ,
|
| 91 |
+
|
| 92 |
+
$$
|
| 93 |
+
\mathsf { K L } ( s \parallel t ) = \log \frac { \sigma _ { t } } { \sigma _ { s } } + \frac { \sigma _ { s } ^ { 2 } + ( \mu _ { s } - \mu _ { t } ) ^ { 2 } } { 2 \sigma _ { t } ^ { 2 } } - 0 . 5 , \qquad s \mathrm { o r } t \sim \mathcal { N } ( \mu _ { s \mathrm { o r } t } , \sigma _ { s \mathrm { o r } t } ^ { 2 } ) .
|
| 94 |
+
$$
|
| 95 |
+
|
| 96 |
+
Note that it is also possible to choose more complex priors such as “spike-and-slab” (Ishwaran et al., 2005) or Gaussian mixture, although in these cases the KL-divergence of prior and posterior is hard to compute and practically we replace it with the Monte-Carlo estimator, which has higher variance, resulting in slower convergence rate (Kingma, 2017).
|
| 97 |
+
|
| 98 |
+
Following the recipe of variational inference, we adapt the robust optimization to the evidence lower bound (ELBO) w.r.t. the variational parameters during training. First of all, recall the ELBO on the original dataset (the unperturbed data) can be written as
|
| 99 |
+
|
| 100 |
+
$$
|
| 101 |
+
- \mathsf { K L } \big ( q _ { \mu , s } ( w ) \parallel p ( w ) \big ) + \sum _ { ( \mathbf { x } _ { i } , y _ { i } ) \in \mathcal { D } _ { \mathrm { t r } } } \mathbb { E } _ { w \sim q _ { \mu , s } } \log p ( y _ { i } | x _ { i } , w ) ,
|
| 102 |
+
$$
|
| 103 |
+
|
| 104 |
+
rather than directly maximizing the ELBO in (7), we consider the following alternative objective,
|
| 105 |
+
|
| 106 |
+
$$
|
| 107 |
+
\mathcal { L } ( \mu , s ) \triangleq - \mathsf { K L } \big ( q _ { \mu , s } ( w ) \parallel p ( w ) \big ) + \sum _ { ( x _ { i } , y _ { i } ) \in \mathcal { D } _ { \mathrm { t r } } } \operatorname* { m i n } _ { \| x _ { i } ^ { \mathrm { a d v } } - x _ { i } \| \leq \gamma } \mathbb { E } _ { w \sim q _ { \mu , s } } \log p ( y _ { i } | x _ { i } ^ { \mathrm { a d v } } , w ) .
|
| 108 |
+
$$
|
| 109 |
+
|
| 110 |
+
This is essentially finding the minima for each data point $( \boldsymbol { x } _ { i } , \boldsymbol { y } _ { i } ) \in \mathcal { D } _ { \mathrm { t r } }$ inside the $\gamma$ -norm ball, we can also interpret (8) as an even looser lower bound of evidence. So the robust optimization procedure is to maximize (8), i.e.
|
| 111 |
+
|
| 112 |
+
$$
|
| 113 |
+
\mu ^ { * } , s ^ { * } = \underset { \mu , s } { \arg \operatorname* { m a x } } \mathcal { L } ( \mu , s ) .
|
| 114 |
+
$$
|
| 115 |
+
|
| 116 |
+
To make the objective more specific, we combine (8) with (9) and get
|
| 117 |
+
|
| 118 |
+
$$
|
| 119 |
+
\underset { \mu , s } { \arg \operatorname* { m a x } } \left\{ \big [ \sum _ { \left( \mathbf { x } _ { i } , y _ { i } \right) \in \mathcal { D } _ { \mathrm { t r } } } \operatorname* { m i n } _ { \left\| \mathbf { x } _ { i } ^ { \mathrm { a d v } } - \mathbf { x } _ { i } \right\| \leq \gamma } \mathbb { E } _ { w \sim q _ { \mu , s } } \log p ( y _ { i } | x _ { i } ^ { \mathrm { a d v } } , w ) \big ] - \mathsf { K L } \big ( q _ { \mu , s } ( w ) \big \| p ( w ) \big ) \right\}
|
| 120 |
+
$$
|
| 121 |
+
|
| 122 |
+
In our case, $p ( \boldsymbol { y } | \mathbf { x } ^ { \mathrm { a d v } } , \boldsymbol { w } ) = \mathrm { S o f t m a x } \big ( f ( \mathbf { x } _ { i } ^ { \mathrm { a d v } } ; \boldsymbol { w } ) \big ) [ \boldsymbol { y } _ { i } ]$ is the network output on the adversarial sample $( x _ { i } ^ { \mathrm { a d v } } , y _ { i } )$ . More generally, we can reformulate our model as $y = f ( { \pmb x } ; { \pmb w } ) { + } \zeta$ and assume the residual $\zeta$ follows either Logistic $( 0 , 1 )$ or Gaussian distribution depending on the specific problem, so that our framework includes both classification and regression tasks. We can see that the only difference between our Adv-BNN and the standard BNN training is that the expectation is now taken over the adversarial examples $( \boldsymbol { x } ^ { \mathrm { a d v } } , \boldsymbol { y } )$ , rather than natural examples $( { \pmb x } , y )$ . Therefore, at each iteration we first apply a randomized PGD attack (as introduced in eq (3)) for $T$ iterations to find $\pmb { x } ^ { \mathrm { a d v } }$ , and then fix the $\pmb { x } ^ { \mathrm { a d v } }$ to update $\mu , s$ .
|
| 123 |
+
|
| 124 |
+
When updating $\pmb { \mu }$ and $\pmb { s }$ , the KL term in (8) can be calculated exactly by (6), whereas the second term is very complex (for neural networks) and can only be approximated by sampling. Besides, in order to fit into the back-propagation framework, we adopt the Bayes by Backprop algorithm (Blundell et al., 2015). Notice that we can reparameterize $\pmb { w } = \pmb { \mu } + \exp ( \pmb { s } ) \odot \pmb { \epsilon } .$ , where $\epsilon \sim \mathcal { N } ( \mathbf { 0 } _ { d } , I _ { d \times d } )$ is a parameter free random vector, then for any differentiable function $h ( w , \mu , s )$ , we can show that
|
| 125 |
+
|
| 126 |
+
$$
|
| 127 |
+
\begin{array} { l } { \displaystyle \frac { \partial } { \partial \mu } \mathop { \mathbb { E } } _ { w } [ h ( w , \mu , s ) ] = \mathop { \mathbb { E } } _ { \epsilon } \left[ \frac { \partial } { \partial w } h ( w , \mu , s ) + \frac { \partial } { \partial \mu } h ( w , \mu , s ) \right] } \\ { \displaystyle \frac { \partial } { \partial s } \mathop { \mathbb { E } } _ { w } [ h ( w , \mu , s ) ] = \mathop { \mathbb { E } } _ { \epsilon } \left[ \exp ( s ) \odot \epsilon \odot \frac { \partial } { \partial w } h ( w , \mu , s ) + \frac { \partial } { \partial s } h ( w , \mu , s ) \right] . } \end{array}
|
| 128 |
+
$$
|
| 129 |
+
|
| 130 |
+
Now the randomness is decoupled from model parameters, and thus we can generate multiple $\epsilon$ to form a unbiased gradient estimator. To integrate into deep learning framework more easily, we also designed a new layer called RandLayer, which is summarized in appendix.
|
| 131 |
+
|
| 132 |
+
It is worth noting that once we assume the simple form of variational distribution (5), we can also adopt the local reparameterization trick (Kingma et al., 2015). That is, rather than sampling the weights $\pmb { w }$ , we directly sample the activations and enjoy the lower variance during the sampling process. Although in our experiments we find the simple Bayes by Backprop method efficient enough.
|
| 133 |
+
|
| 134 |
+
For ease of doing SGD iterations, we rewrite (9) into a finite sum problem by dividing both sides by the number of training samples $N _ { \mathrm { t r } }$
|
| 135 |
+
|
| 136 |
+
$$
|
| 137 |
+
\mu ^ { * } , s ^ { * } = \underset { \mu , s } { \arg \operatorname* { m i n } } - \frac { 1 } { N _ { \mathrm { t r } } } \sum _ { i = 1 } ^ { N _ { \mathrm { t r } } } \log p ( y _ { i } | x _ { i } ^ { \mathrm { a d v } } , w ) + \frac { 1 } { N _ { \mathrm { t r } } } g ( \mu , s ) ,
|
| 138 |
+
$$
|
| 139 |
+
|
| 140 |
+
here we define $g ( \pmb { \mu } , \pmb { s } ) \triangleq { \sf K L } ( q _ { \pmb { \mu } , \pmb { s } } ( \pmb { w } ) \parallel p ( \pmb { w } ) )$ by the closed form solution (6), so there is no randomness in it. We sample new weights by $\pmb { w } = \mu + \exp ( \pmb { s } ) \odot \pmb { \epsilon }$ in each forward propagation, so that the stochastic gradient is unbiased. In practice, however, we need a weaker regularization for
|
| 141 |
+
|
| 142 |
+
small dataset or large model, since the original regularization in (12) can be too large. We fix this problem by adding a factor $0 < \alpha \leq 1$ to the regularization term, so the new loss becomes
|
| 143 |
+
|
| 144 |
+
$$
|
| 145 |
+
- \frac { 1 } { N _ { \mathrm { t r } } } \sum _ { i = 1 } ^ { N _ { \mathrm { t r } } } \log p ( y _ { i } | x _ { i } ^ { \mathrm { a d v } } , w ) + \frac { \alpha } { N _ { \mathrm { t r } } } g ( \pmb { \mu } , \pmb { s } ) , \quad 0 < \alpha \leq 1 .
|
| 146 |
+
$$
|
| 147 |
+
|
| 148 |
+
In our experiments, we found little to no performance degradation compared with the same network without randomness, if we choose a suitable hyper-parameter $\alpha$ , as well as the prior distribution $\mathcal { N } ( \mathbf { 0 } , s _ { 0 } ^ { 2 } I )$ .
|
| 149 |
+
|
| 150 |
+
The overall training algorithm is shown in Alg. 1. To sum up, our Adv-BNN method trains an arbitrary Bayesian neural network with the min-max robust optimization, which is similar to Madry et al. (2017). As we mentioned earlier, even though our model contains noise and eventually the gradient information is also noisy, by doing multiple forward-backward iterations, the noise will be cancelled out due to the law of large numbers. This is also the suggested way to bypass some stochastic defenses in Athalye et al. (2018).
|
| 151 |
+
|
| 152 |
+
# Algorithm 1 Code snippet for training Adv-BNN
|
| 153 |
+
|
| 154 |
+
<table><tr><td colspan="2">1: procedure pgd_attack(x,y,w)</td><td></td></tr><tr><td>2:</td><td colspan="2">Perform the PGD-attack (2), omitted for brevity</td></tr><tr><td>3:</td><td>procedure train(data,w)</td><td></td></tr><tr><td>4:</td><td>DInput: dataset and network weights w</td><td></td></tr><tr><td>5:</td><td>for(x,y) in data do</td><td></td></tr><tr><td>6:</td><td>xadv ← pgd.attack(x,y, w)</td><td>Generate adversarial images</td></tr><tr><td>7:</td><td>w ←μ+exp(s)①∈,∈~N(0d,Idxd)</td><td>Samplenewmodel parameters</td></tr><tr><td>8:</td><td>y ← forward(w,xadv)</td><td>Forward propagation</td></tr><tr><td>9:</td><td>loss_ce ← cross_entropy(y,y)</td><td>Cross-entropy loss</td></tr><tr><td>10:</td><td>loss_kl ←kl_divergence(w)</td><td>KL-divergence following (6)</td></tr><tr><td>11:</td><td>L(μ,s)←loss_ce+ α ·loss_kl Ntr</td><td>Total loss following (13)</td></tr><tr><td>12:</td><td>,←backward(L(μ,s)) p's</td><td>Backward propagation to get gradients</td></tr><tr><td>13:</td><td>μ,s←μ-nt, aL 8- nts </td><td>>SGD update,omitting momentum and weight decay</td></tr><tr><td colspan="2">14: return net</td><td></td></tr></table>
|
| 155 |
+
|
| 156 |
+
Will it be beneficial to have randomness in adversarial training? After all, both randomized network and adversarial training can be viewed as different ways for controlling local Lipschitz constants of the loss surface around the image manifold, and thus it is non-trivial to see whether combining those two techniques can lead to better robustness. The connection between randomized network (in particular, RSE) and local Lipschitz regularization has been derived in Liu et al. (2017). Adversarial training can also be connected to local Lipschitz regularization with the following arguments. Recall that the loss function given data $( x _ { i } , y _ { i } )$ is denoted as $\ell \big ( f ( \pmb { x } _ { i } ; \pmb { w } ) , y _ { i } \big )$ , and similarly the loss on perturbed data $( { \pmb x } _ { i } + { \pmb \xi } , y _ { i } )$ is $\ell \big ( f ( \pmb { x } _ { i } + \pmb { \xi } ; \pmb { w } ) , y _ { i } \big )$ . Then if we expand the loss to the first order
|
| 157 |
+
|
| 158 |
+
$$
|
| 159 |
+
\begin{array} { r } { \Delta \ell \triangleq \ell \big ( f ( { \boldsymbol x } _ { i } + { \boldsymbol \xi } ; { \boldsymbol w } ) , { \boldsymbol y } _ { i } \big ) - \ell \big ( f ( { \boldsymbol x } _ { i } ; { \boldsymbol w } ) , { \boldsymbol y } _ { i } \big ) = { \boldsymbol \xi } ^ { \mathsf { T } } \nabla _ { { \boldsymbol x } _ { i } } \ell \big ( f ( { \boldsymbol x } _ { i } ; { \boldsymbol w } ) , { \boldsymbol y } _ { i } \big ) + { \boldsymbol O } ( \| { \boldsymbol \xi } \| ^ { 2 } ) , } \end{array}
|
| 160 |
+
$$
|
| 161 |
+
|
| 162 |
+
we can see that the robustness of a deep model is closely related to the gradient of the loss over the input, i.e. $\nabla _ { \pmb { x } _ { i } } \ell \big ( f ( \pmb { x } _ { i } ) , y _ { i } \big )$ . If $\| \nabla _ { \pmb { x } _ { i } } \ell \big ( f ( \pmb { x } _ { i } ) , y _ { i } \big ) \|$ is large, then we can find a suitable $\boldsymbol { \xi }$ such that $\Delta \ell$ is large. Under such condition, the perturbed image ${ \pmb x } _ { i } + { \pmb \xi }$ is very likely to be an adversarial example. It turns out that adversarial training (4) directly controls the local Lipschitz value on the training set, this can be seen if we combine (14) with (4)
|
| 163 |
+
|
| 164 |
+
$$
|
| 165 |
+
\begin{array} { l } \displaystyle { \operatorname* { m i n } _ { w } \ell \big ( f \big ( { \boldsymbol x } _ { i } ^ { \mathrm { a d v } } ; { \boldsymbol w } \big ) , y _ { i } \big ) = \operatorname* { m i n } _ { { \boldsymbol w } } \operatorname* { m a x } _ { \boldsymbol \parallel \xi \boldsymbol \parallel \leq \gamma } \ell \big ( f \big ( { \boldsymbol x } _ { i } + { \boldsymbol \xi } ; { \boldsymbol w } \big ) } \\ { = \displaystyle { \operatorname* { m i n } _ { { \boldsymbol w } } \operatorname* { m a x } _ { \boldsymbol \parallel \xi \boldsymbol \parallel \leq \gamma } \ell \big ( f \big ( { \boldsymbol x } _ { i } ; { \boldsymbol w } \big ) , y _ { i } \big ) + \xi ^ { \top } \nabla _ { { \boldsymbol x } _ { i } } \ell \big ( f \big ( { \boldsymbol x } _ { i } ; { \boldsymbol w } \big ) , y _ { i } \big ) + \mathcal O ( \| \boldsymbol \xi \| ^ { 2 } ) . } } \end{array}
|
| 166 |
+
$$
|
| 167 |
+
|
| 168 |
+
Moreover, if we ignore the higher order term $\mathcal { O } ( \| \pmb { \xi } \| ^ { 2 } )$ then (15) becomes
|
| 169 |
+
|
| 170 |
+
$$
|
| 171 |
+
\operatorname* { m i n } _ { \pmb { w } } \ell ( f ( \pmb { x } _ { i } ; \pmb { w } ) , y _ { i } ) + \gamma \cdot \| \nabla _ { \pmb { x } _ { i } } \ell ( f ( \pmb { x } _ { i } ; \pmb { w } ) , y _ { i } ) \| .
|
| 172 |
+
$$
|
| 173 |
+
|
| 174 |
+
In other words, the adversarial training can be simplified to Lipschitz regularization, and if the model generalizes, the local Lipschitz value will also be small on the test set. Yet, as (Liu & Hsieh,
|
| 175 |
+
|
| 176 |
+
2018) indicates, for complex dataset like CIFAR-10, the local Lipschitz is still very large on test set, even though it is controlled on training set. The drawback of adversarial training motivates us to combine the randomness model with adversarial training, and we observe a significant improvement over adversarial training or RSE alone (see the experiment section below).
|
| 177 |
+
|
| 178 |
+
# 4 EXPERIMENTAL RESULTS
|
| 179 |
+
|
| 180 |
+
In this section, we test the performance of our robust Bayesian neural networks (Adv-BNN) with strong baselines on a wide variety of datasets. In essence, our method is inspired by adversarial training (Madry et al., 2017) and BNN (Blundell et al., 2015), so these two methods are natural baselines. If we see a significant improvement in adversarial robustness, then it means that randomness and robust optimization have independent contributions to defense. Additionally, we would like to compare our method with RSE (Liu et al., 2017), another strong defense algorithm relying on randomization. Lastly, we include the models without any defense as references. For ease of reproduction, we list the hyper-parameters in the appendix. Readers can also refer to the source code on github.
|
| 181 |
+
|
| 182 |
+
It is known that adversarial training becomes increasingly hard for high dimensional data (Schmidt et al., 2018). In addition to standard low dimensional dataset such as CIFAR-10, we also did experiments on two more challenging datasets: 1) STL-10 (Coates et al., 2011), which has 5,000 training images and 8,000 testing images. Both of them are $9 6 \times 9 6$ pixels; 2) ImageNet-143, which is a subset of ImageNet (Deng et al., 2009), and widely used in conditional GAN training (Miyato & Koyama, 2018). The dataset has 18,073 training and 7,105 testing images, and all images are $6 4 \times 6 4$ pixels. It is a good benchmark because it has much more classes than CIFAR-10, but is still manageable for adversarial training.
|
| 183 |
+
|
| 184 |
+
# 4.1 EVALUATING MODELS UNDER WHITE BOX $\ell _ { \infty }$ -PGD ATTACK
|
| 185 |
+
|
| 186 |
+
In the first experiment, we compare the accuracy under the white box $\ell _ { \infty }$ -PGD attack. We set the maximum $\ell _ { \infty }$ distortion to $\gamma \in \mathrm { ~ [ ~ 0 : 0 ~ . 0 7 : 0 ~ . 0 0 5 ] ~ }$ and report the accuracy on test set. The results are shown in Fig. 2. Note that when attacking models with stochastic components, we adjust PGD accordingly as mentioned in Section 2.1. To demonstrate the relative performance more clearly, we show some numerical results in Tab. 1.
|
| 187 |
+
|
| 188 |
+

|
| 189 |
+
Figure 2: Accuracy under $\ell _ { \infty }$ -PGD attack on three different datasets: CIFAR-10, STL-10 and ImageNet-143. In particular, we adopt a smaller network for STL-10 namely “Model $\mathbf { A } ^ { \mathsf { { s } } , 1 }$ , while the other two datasets are trained on VGG.
|
| 190 |
+
|
| 191 |
+
From Fig. 2 and Tab. 1 we can observe that although BNN itself does not increase the robustness of the model, when combined with the adversarial training method, it dramatically increase the testing accuracy for ${ \sim } 1 0 \%$ on a variety of datasets. Moreover, the overhead of Adv-BNN over adversarial training is small: it will only double the parameter space (for storing mean and variance), and the total training time does not increase much. Finally, similar to RSE, modifying existing network architectures into BNN is fairly simple, we only need to replace Conv/BatchNorm/Linear layers by their variational version. Hence we can easily build robust models based on existing ones.
|
| 192 |
+
|
| 193 |
+
Table 1: Comparing the testing accuracy under different levels of PGD attacks. We include our method, Adv-BNN, and the state of the art defense method, the multi-step adversarial training proposed in Madry et al. (2017). The better accuracy is marked in bold. Notice that although our Adv-BNN incurs larger accuracy drop in the original test set (where $\| \pmb { \xi } \| _ { \infty } = 0 )$ , we can choose a smaller $\alpha$ in (13) so that the regularization effect is weakened, in order to match the accuracy.
|
| 194 |
+
|
| 195 |
+
<table><tr><td>Data</td><td>Defense</td><td>0</td><td>0.015</td><td>0.035</td><td>0.055</td><td>0.07</td></tr><tr><td>CIFAR10</td><td>Adv. Training Adv-BNN</td><td>80.3 79.7</td><td>58.3 68.7</td><td>31.1 45.4</td><td>15.5 26.9</td><td>10.3 18.6</td></tr><tr><td>STL10</td><td>Adv. Training Adv-BNN</td><td>63.2 59.9</td><td>46.7 51.8</td><td>27.4 37.6</td><td>12.8 27.2</td><td>7.0 21.1</td></tr><tr><td>Data</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>Defense Adv. Training</td><td>0 48.7</td><td>0.004 37.6</td><td>0.01</td><td>0.016</td><td>0.02</td></tr><tr><td>ImageNet-143</td><td>Adv-BNN</td><td>47.3</td><td>43.8</td><td>23.0 39.3</td><td>12.4 30.2</td><td>7.5 24.6</td></tr></table>
|
| 196 |
+
|
| 197 |
+
# 4.2 BLACK BOX TRANSFER ATTACK
|
| 198 |
+
|
| 199 |
+
Is our Adv-BNN model susceptible to transfer attack? we answer this question by studying the affinity between models, because if two models are similar (e.g. in loss landscape) then we can easily attack one model using the adversarial examples crafted through the other. In this section, we measure the adversarial sample transferability between different models namely None (no defense), BNN, Adv.Train, RSE and Adv-BNN. This is done by the method called “transfer attack” (Liu et al., 2016). Initially it was proposed as a black box attack algorithm: when the attacker has no access to the target model, one can instead train a similar model from scratch (called source model), and then generate adversarial samples with source model. As we can imagine, the success rate of transfer attack is directly linked with how similar the source/target models are. In this experiment, we are interested in the following question: how easily can we transfer the adversarial examples between these five models? We study the affinity between those models, where the affinity is defined by
|
| 200 |
+
|
| 201 |
+
$$
|
| 202 |
+
\rho _ { A \mapsto B } = { \frac { \operatorname { A c c } [ B ] - \operatorname { A c c } [ B \vert A ] } { \operatorname { A c c } [ B ] - \operatorname { A c c } [ B \vert B ] } } ,
|
| 203 |
+
$$
|
| 204 |
+
|
| 205 |
+
where $\rho _ { A \mapsto B }$ measures the success rate using source model $A$ and target model $B$ , $\operatorname { A c c } [ B ]$ denotes the accuracy of model $B$ without attack, $\bar { \mathrm { A c c } } [ B | A ( \mathrm { o r } B ) ]$ means the accuracy under adversarial samples generated by model $A ( \ o { \mathrm { o r } } \ : B )$ . Most of the time, it is easier to find adversarial examples through the target model itself, so we have $\operatorname { A c c } [ B | A ] \ \geq \ \operatorname { A c c } [ B | B ]$ and thus $0 \leq \rho _ { A \mapsto B } \leq 1$ . However, $\rho _ { A \mapsto B } = \rho _ { B \mapsto A }$ is not necessarily true, so the affinity matrix is not likely to be symmetric. We illustrate the result in Fig. 3.
|
| 206 |
+
|
| 207 |
+
We can observe that $\left\{ \mathrm { N o n e , B N N } \right\}$ are similar models, their affinity is strong $( \rho \approx 0 . 8 5 )$ for both direction: $\rho _ { \mathtt { B N N } \mapsto \mathtt { N o n e } }$ and $\rho _ { \mathrm { N o n e r } \mathrm { B N N } }$ . Likewise, $\left\{ \mathrm { R S E , A d v - B N N , A d v \cdot T r a i n } \right\}$ constitute the other group, yet the affinity is not very strong $( \rho \approx 0 . 5 { \sim } 0 . 6 )$ , meaning these three methods are all robust to the black box attack to some extent.
|
| 208 |
+
|
| 209 |
+
# 4.3 MISCELLANEOUS EXPERIMENTS
|
| 210 |
+
|
| 211 |
+
Following experiments are not crucial in showing the success of our method, however, we still include them to help clarifying some doubts of careful readers.
|
| 212 |
+
|
| 213 |
+

|
| 214 |
+
Figure 3: Black box, transfer attack experiment results. We select all combinations of source and target models trained from 5 defense methods and calculate the affinity according to (17).
|
| 215 |
+
|
| 216 |
+
The first question is about sample efficiency, recall in prediction stage we sample weights from the approximated posterior and generate the label by
|
| 217 |
+
|
| 218 |
+
$$
|
| 219 |
+
\hat { y } = \mathop { \arg \operatorname* { m a x } } _ { y } \frac { 1 } { m } \sum _ { k = 1 } ^ { m } p ( y | x , w _ { k } ) , \quad w _ { k } \sim q _ { \mu , s } .
|
| 220 |
+
$$
|
| 221 |
+
|
| 222 |
+
In practice, we do not want to average over lots of forward propagation to control the variance, which will be much slower than other models during the prediction stage. Here we take ImageNet-143 dat $\iota + \mathrm { V G G }$ network as an example, to show that only $1 0 { \sim } 2 0$ forward operations are sufficient for robust and accurate prediction. Furthermore, the number seems to be independent on the adversarial distortion, as we can see in Fig. 4(left). So our algorithm is especially suitable to large scale scenario.
|
| 223 |
+
|
| 224 |
+
One might also be concerned about whether 20 steps of PGD iterations are sufficient to find adversarial examples. It has been known that for certain adversarial defense method, the effectiveness appears to be worse than claimed (Engstrom et al., 2018), if we increase the PGD-steps from 20 to 100. In Fig. $4 ( r i g h t )$ , we show that even if we increase the number of iteration to 1000, the accuracy does not change very much. This means that even the adversary invests more resources to attack our model, its marginal benefit is negligible.
|
| 225 |
+
|
| 226 |
+

|
| 227 |
+
Figure 4: Left: we tried different number of forward propagation and averaged the results to make prediction (18). We see that for different scales of perturbation $\gamma \in \{ 0 , 0 . 0 1 , 0 . 0 2 \}$ , choosing number of ensemble $n = 1 0 { \sim } 2 0$ is good enough. Right: testing accuracy stabilizes quickly as #PGDsteps goes greater than 20, so there is no necessity to further increase the number of PGD steps.
|
| 228 |
+
|
| 229 |
+
# 5 CONCLUSION & DISCUSSION
|
| 230 |
+
|
| 231 |
+
To conclude, we find that although the Bayesian neural network has no defense functionality, when combined with adversarial training, its robustness against adversarial attack increases significantly. So this method can be regarded as a non-trivial combination of BNN and the adversarial training: robust classification relies on the controlled local Lipschitz value, while adversarial training does not generalize this property well enough to the test set; if we train the BNN with adversarial examples, the robustness increases by a large margin. Admittedly, our method is still far from the ideal case, and it is still an open problem on what the optimal defense solution will be.
|
| 232 |
+
|
| 233 |
+
# REFERENCES
|
| 234 |
+
|
| 235 |
+
Anish Athalye, Nicholas Carlini, and David Wagner. Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. arXiv preprint arXiv:1802.00420, 2018.
|
| 236 |
+
David M Blei, Alp Kucukelbir, and Jon D McAuliffe. Variational inference: A review for statisticians. Journal of the American Statistical Association, 112(518):859–877, 2017.
|
| 237 |
+
Charles Blundell, Julien Cornebise, Koray Kavukcuoglu, and Daan Wierstra. Weight uncertainty in neural network. In International Conference on Machine Learning, pp. 1613–1622, 2015.
|
| 238 |
+
Nicholas Carlini and David Wagner. Adversarial examples are not easily detected: Bypassing ten detection methods. In Proceedings of the 10th ACM Workshop on Artificial Intelligence and Security, AISec ’17, pp. 3–14, New York, NY, USA, 2017a. ACM. ISBN 978-1-4503-5202- 4. doi: 10.1145/3128572.3140444. URL http://doi.acm.org/10.1145/3128572. 3140444.
|
| 239 |
+
Nicholas Carlini and David Wagner. Towards evaluating the robustness of neural networks. In Security and Privacy (SP), 2017 IEEE Symposium on, pp. 39–57. IEEE, 2017b.
|
| 240 |
+
Pin-Yu Chen, Huan Zhang, Yash Sharma, Jinfeng Yi, and Cho-Jui Hsieh. Zoo: Zeroth order optimization based black-box attacks to deep neural networks without training substitute models. In Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence, 2018.
|
| 241 |
+
Adam Coates, Andrew $\mathrm { N g }$ , and Honglak Lee. An analysis of single-layer networks in unsupervised feature learning. In Proceedings of the fourteenth international conference on artificial intelligence and statistics, pp. 215–223, 2011.
|
| 242 |
+
Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pp. 248–255. Ieee, 2009.
|
| 243 |
+
Logan Engstrom, Andrew Ilyas, and Anish Athalye. Evaluating and understanding the robustness of adversarial logit pairing. arXiv preprint arXiv:1807.10272, 2018.
|
| 244 |
+
Ivan Evtimov, Kevin Eykholt, Earlence Fernandes, Tadayoshi Kohno, Bo Li, Atul Prakash, Amir Rahmati, and Dawn Song. Robust physical-world attacks on machine learning models. arXiv preprint arXiv:1707.08945, 2017.
|
| 245 |
+
Reuben Feinman, Ryan R Curtin, Saurabh Shintre, and Andrew B Gardner. Detecting adversarial samples from artifacts. arXiv preprint arXiv:1703.00410, 2017.
|
| 246 |
+
Ian Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In International Conference on Learning Representations, 2015. URL http:// arxiv.org/abs/1412.6572.
|
| 247 |
+
Ruitong Huang, Bing Xu, Dale Schuurmans, and Csaba Szepesvari. Learning with a strong adver- ´ sary. arXiv preprint arXiv:1511.03034, 2015.
|
| 248 |
+
Andrew Ilyas, Logan Engstrom, Anish Athalye, and Jessy Lin. Black-box adversarial attacks with limited queries and information. arXiv preprint arXiv:1804.08598, 2018.
|
| 249 |
+
|
| 250 |
+
Hemant Ishwaran, J Sunil Rao, et al. Spike and slab variable selection: frequentist and bayesian strategies. The Annals of Statistics, 33(2):730–773, 2005.
|
| 251 |
+
|
| 252 |
+
Diederik P Kingma. Variational inference & deep learning: A new synthesis. 2017.
|
| 253 |
+
|
| 254 |
+
Diederik P Kingma, Tim Salimans, and Max Welling. Variational dropout and the local reparameterization trick. In Advances in Neural Information Processing Systems, pp. 2575–2583, 2015.
|
| 255 |
+
|
| 256 |
+
Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial machine learning at scale. In International Conference of Learning Representation, 2017.
|
| 257 |
+
|
| 258 |
+
Alexey Kurakin, Ian Goodfellow, Samy Bengio, Yinpeng Dong, Fangzhou Liao, Ming Liang, Tianyu Pang, Jun Zhu, Xiaolin Hu, Cihang Xie, et al. Adversarial attacks and defences competition. arXiv preprint arXiv:1804.00097, 2018.
|
| 259 |
+
|
| 260 |
+
Chunyuan Li, Changyou Chen, David E Carlson, and Lawrence Carin. Preconditioned stochastic gradient langevin dynamics for deep neural networks. In AAAI, volume 2, pp. 4, 2016.
|
| 261 |
+
|
| 262 |
+
Yingzhen Li and Yarin Gal. Dropout inference in bayesian neural networks with alpha-divergences. arXiv preprint arXiv:1703.02914, 2017.
|
| 263 |
+
|
| 264 |
+
Fangzhou Liao, Ming Liang, Yinpeng Dong, Tianyu Pang, Jun Zhu, and Xiaolin Hu. Defense against adversarial attacks using high-level representation guided denoiser. arXiv preprint arXiv:1712.02976, 2017.
|
| 265 |
+
|
| 266 |
+
Xuanqing Liu and Cho-Jui Hsieh. From adversarial training to generative adversarial networks. arXiv preprint arXiv:1807.10454, 2018.
|
| 267 |
+
|
| 268 |
+
Xuanqing Liu, Minhao Cheng, Huan Zhang, and Cho-Jui Hsieh. Towards robust neural networks via random self-ensemble. arXiv preprint arXiv:1712.00673, 2017.
|
| 269 |
+
|
| 270 |
+
Yanpei Liu, Xinyun Chen, Chang Liu, and Dawn Song. Delving into transferable adversarial examples and black-box attacks. arXiv preprint arXiv:1611.02770, 2016.
|
| 271 |
+
|
| 272 |
+
Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. arXiv preprint arXiv:1706.06083, 2017.
|
| 273 |
+
|
| 274 |
+
Takeru Miyato and Masanori Koyama. cgans with projection discriminator. 2018.
|
| 275 |
+
|
| 276 |
+
Nicolas Papernot, Patrick McDaniel, Xi Wu, Somesh Jha, and Ananthram Swami. Distillation as a defense to adversarial perturbations against deep neural networks. In Security and Privacy (SP), 2016 IEEE Symposium on, pp. 582–597. IEEE, 2016.
|
| 277 |
+
|
| 278 |
+
Nicolas Papernot, Patrick McDaniel, Ian Goodfellow, Somesh Jha, Z Berkay Celik, and Ananthram Swami. Practical black-box attacks against machine learning. In Proceedings of the 2017 ACM on Asia Conference on Computer and Communications Security, pp. 506–519. ACM, 2017.
|
| 279 |
+
|
| 280 |
+
Ludwig Schmidt, Shibani Santurkar, Dimitris Tsipras, Kunal Talwar, and Aleksander Madry. Adversarially robust generalization requires more data. arXiv preprint arXiv:1804.11285, 2018.
|
| 281 |
+
|
| 282 |
+
Lewis Smith and Yarin Gal. Understanding measures of uncertainty for adversarial example detection. arXiv preprint arXiv:1803.08533, 2018.
|
| 283 |
+
|
| 284 |
+
Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. The Journal of Machine Learning Research, 15(1):1929–1958, 2014.
|
| 285 |
+
|
| 286 |
+
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.
|
| 287 |
+
|
| 288 |
+
Max Welling and Yee W Teh. Bayesian learning via stochastic gradient langevin dynamics. In Proceedings of the 28th International Conference on Machine Learning (ICML-11), pp. 681–688, 2011.
|
| 289 |
+
|
| 290 |
+
Cihang Xie, Jianyu Wang, Zhishuai Zhang, Zhou Ren, and Alan Yuille. Mitigating adversarial effects through randomization. arXiv preprint arXiv:1711.01991, 2017.
|
| 291 |
+
|
| 292 |
+
Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron Courville, Ruslan Salakhudinov, Rich Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual attention. In International Conference on Machine Learning, pp. 2048–2057, 2015.
|
| 293 |
+
|
| 294 |
+
Nanyang Ye and Zhanxing Zhu. Bayesian adversarial learning. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett (eds.), Advances in Neural Information Processing Systems 31, pp. 6892–6901. Curran Associates, Inc., 2018. URL http: //papers.nips.cc/paper/7921-bayesian-adversarial-learning.pdf.
|
| 295 |
+
|
| 296 |
+
Valentina Zantedeschi, Maria-Irina Nicolae, and Ambrish Rawat. Efficient defenses against adversarial attacks. In Proceedings of the 10th ACM Workshop on Artificial Intelligence and Security, pp. 39–49. ACM, 2017.
|
| 297 |
+
|
| 298 |
+
# A HOW TO ATTACK THE RANDOMIZED NETWORK
|
| 299 |
+
|
| 300 |
+
We largely follow the guidelines of attacking networks with “obfuscated gradients” in Athalye et al. (2018). Specifically, we derive the algorithm for white box attack to random networks denoted as $f ( w ; \epsilon )$ , where $\pmb { w }$ is the (fixed) network parameters and $\epsilon$ is the random vector. Many random neural networks can be reparameterized to this form, where each forward propagation returns different results. In particular, this framework includes our Adv-BNN model by setting ${ \pmb w } = ( { \pmb \mu } , { \pmb s } )$ . Recall the prediction is made through “majority voting”:
|
| 301 |
+
|
| 302 |
+
$$
|
| 303 |
+
\begin{array} { r } { \hat { y } = \underset { y } { \arg \operatorname* { m i n } } \ \underset { \epsilon } { \mathbb { E } } \left( f ( \boldsymbol { x } ; \boldsymbol { w } , \epsilon ) , y \right) . } \end{array}
|
| 304 |
+
$$
|
| 305 |
+
|
| 306 |
+
So the optimal white-box attack should maximize the loss (19) on the ground truth label $y ^ { * }$ . That is,
|
| 307 |
+
|
| 308 |
+
$$
|
| 309 |
+
\pmb { \xi } ^ { \ast } = \underset { \pmb { \xi } } { \arg \operatorname* { m a x } } \underset { \pmb { \epsilon } } { \mathbb { E } } \left( f ( \pmb { x } + \pmb { \xi } ; \pmb { w } , \boldsymbol { \epsilon } ) , y ^ { * } \right) ,
|
| 310 |
+
$$
|
| 311 |
+
|
| 312 |
+
and then ${ \pmb x } ^ { \mathrm { a d v } } \triangleq { \pmb x } + { \pmb \xi } ^ { * }$ . To do that we apply SGD optimizer and sampling $\epsilon$ at each iteration,
|
| 313 |
+
|
| 314 |
+
$$
|
| 315 |
+
\pmb { \xi } _ { t + 1 } \gets \pmb { \xi } _ { t } + \eta _ { t } \frac { \partial } { \partial \pmb { \xi } } \ell \big ( f ( \pmb { x } + \pmb { \xi } ; \pmb { w } , \pmb { \epsilon } ) , y ^ { * } \big ) \Big | _ { \pmb { \xi } = \pmb { \xi } _ { t } } ,
|
| 316 |
+
$$
|
| 317 |
+
|
| 318 |
+
one can see the iteration (21) approximately solves (20).
|
| 319 |
+
|
| 320 |
+
# B FORWARD & BACKWARD IN RANDLAYER
|
| 321 |
+
|
| 322 |
+
It is very easy to implement the forward & backward propagation in BNN. Here we introduce the RandLayer that can seamlessly integrate into major deep learning frameworks. We take PyTorch as an example, the code snippet is shown in Alg. 1.
|
| 323 |
+
|
| 324 |
+
Algorithm 1: Code snippet for implementing RandLayer
|
| 325 |
+
|
| 326 |
+
<table><tr><td>15 if :ctx.needs_input_grad[0]:</td></tr><tr><td>grad_mu = grad_output + mu/(sigma_O*sigma_0*N)</td></tr><tr><td>16 if ctx.needs_input_grad[1]:</td></tr><tr><td>17 grad_sigma = grad_output*tmp*eps - 1 / N + tmp*tmp/(sigma_0*sigma_0*N)</td></tr><tr><td>18</td></tr><tr><td>19 return grad_mu,grad_sigma,grad_eps,grad_sigma_0,grad_N 20 rand_layer = RandLayerFunc.apply</td></tr></table>
|
| 327 |
+
|
| 328 |
+
Based on RandLayer, we can further implement variational Linear layer below in Alg. 2. The other layers such as Conv/BatchNorm are very similar.
|
| 329 |
+
|
| 330 |
+
Algorithm 2: Code snippet for implementing variational Linear layer
|
| 331 |
+
|
| 332 |
+
<table><tr><td colspan="2">class Linear(Module): __init_(self,d_in,d_out):</td></tr><tr><td colspan="2">def self.d_in = d_in</td></tr><tr><td colspan="2"></td></tr><tr><td colspan="2"></td></tr><tr><td colspan="2">self.d_in = d_in</td></tr><tr><td colspan="2">self.d_out = d_out</td></tr><tr><td colspan="2">self.init_s = init_s</td></tr><tr><td colspan="2">self.mu_weight = Parameter(torch.Tensor(d_out,d_in))</td></tr><tr><td colspan="2">self.sigma_weight = Parameter(torch.Tensor(d_out,d_in))</td></tr><tr><td colspan="2">self.register_buffer('eps_weight',torch.Tensor(d_out,d_in))</td></tr><tr><td colspan="2">def forward(self,x):</td></tr><tr><td colspan="2">weight = rand_layer(self.mu_weight, self.sigma_weight, self.eps_weight)</td></tr><tr><td colspan="2">bias = None</td></tr></table>
|
| 333 |
+
|
| 334 |
+
# C HYPER-PARAMETERS
|
| 335 |
+
|
| 336 |
+
We list the key hyper-parameters in Tab. 2, note that we did not tune the hyper-parameters very hard, therefore it is entirely possible to find better ones.
|
| 337 |
+
|
| 338 |
+
Table 2: Hyper-parameters setting in our experiments.
|
| 339 |
+
|
| 340 |
+
<table><tr><td>Name</td><td>Value</td><td>Notes</td></tr><tr><td>k</td><td>20</td><td>#PGD iterations in attack</td></tr><tr><td>k'</td><td>10</td><td>#PGD iterations in adversarial training</td></tr><tr><td>2</td><td>CIFAR10/STL10: 8/256, ImageNet: 0.01</td><td>loo-norm in adversarial training</td></tr><tr><td>00</td><td>CIFAR10: 0.05,others: 0.15</td><td>Std. of the prior distribution (not sensitive)</td></tr><tr><td>α</td><td>CIFAR10: 1.0,others: 1.0/50</td><td>See (13)</td></tr><tr><td>n</td><td>10~20</td><td>#Forward passes when doing ensemble inference</td></tr></table>
|
md/train/ryxmrpNtvH/ryxmrpNtvH.md
ADDED
|
@@ -0,0 +1,294 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# DEEPER INSIGHTS INTO WEIGHT SHARING IN NEURAL ARCHITECTURE SEARCH
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
With the success of deep neural networks, Neural Architecture Search (NAS) as a way of automatic model design has attracted wide attention. As training every child model from scratch is very time-consuming, recent works leverage weight-sharing to speed up the model evaluation procedure. These approaches greatly reduce computation by maintaining a single copy of weights on the super-net and share the weights among every child model. However, weight-sharing has no theoretical guarantee and its impact has not been well studied before. In this paper, we conduct comprehensive experiments to reveal the impact of weight-sharing: (1) The bestperforming models from different runs or even from consecutive epochs within the same run have significant variance; (2) Even with high variance, we can extract valuable information from training the super-net with shared weights; (3) The interference between child models is a main factor that induces high variance; (4) Properly reducing the degree of weight sharing could effectively reduce variance and improve performance.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Learning to design neural architectures automatically has aroused wide interests recently due to its success in many different machine learning tasks. One stream of neural architectures search (NAS) methods is based on reinforcement learning (RL) (Zoph & Le, 2016; Zoph et al., 2018; Tan et al., 2019), where a neural architecture is built from actions and its performance is used as reward. This approach usually demands considerable computation power — each search process takes days with hundreds of GPUs. Population based algorithms (Gaier & Ha, 2019; Liang et al., 2018; Jaderberg et al., 2017) are another popular approach for NAS, new trials could inherit neural architecture from better performing ones as well as their weights, and mutate the architecture to explore better ones. It also has high computation cost.
|
| 12 |
+
|
| 13 |
+
To speed up the search process, a family of methods attracts increasing attention with greatly reduced computation (Pham et al., 2018; Liu et al., 2018c; Bender et al., 2018). Instead of training every child model, they build a single model, called super-net, from neural architecture search space, and maintain a single copy of weights on the super-net. Several training approaches have been proposed on this model, e.g., training with RL controller (Pham et al., 2018), training by applying dropout (Bender et al., 2018) or architecture weights on candidate choices (Liu et al., 2018c). In these approaches, weight-sharing is the key for the speedup. However, weight sharing has no theoretical guarantee and its impact has not been well studied before. The directions of improving such methods would be more clear if some key questions had been answered: 1) How far is the accuracy of found architecture from the best one within search space? 2) Could the best architecture be stably found in multiple runs of search process? 3) How does weight sharing affect the accuracy and stability of the found architecture?
|
| 14 |
+
|
| 15 |
+
In this paper, we answer the above-mentioned questions using comprehensive experiments and analysis. To understand the behavior of weight sharing approaches, we use a small search space, which makes it possible to have ground truth for comparison. It is a simplified NAS problem, therefore, making it easy to show the ability of the NAS algorithms with weight sharing. As a result, we find that the rank of child models is very unstable in different runs of the search process, and also very different from ground truth. In fact, the instability 1 commonly exists not only in different runs, but also in consecutive training epochs within the same run. Also worthy of note, in spite of high variance, we can extract statistical information from the variance, the statistics can be innovatively leveraged to prune search space and improve the search result.
|
| 16 |
+
|
| 17 |
+
To further understand where the variance comes from, we record and analyze more metric data from the experiments. It is witnessed that some child models have interference with each other, and the degree of this interference varies depending on different child models. At the very end of the super-net training, training each child model in one mini-batch can make this model be the best performing one on the validation data. Based on the insights, we further explore partial weight sharing, that is, each child model could selectively share weights with others, rather than all of them sharing the same copy of weights. It can be seen as reduced degree of weight sharing. One method we have explored is sharing weights of common prefix layers among child models. Another method is to cluster child models into groups, each of which shares a copy of weights. Experiment results show that partial weight sharing makes the rank of child models more stable and becomes closer to ground truth. It implies that with proper degree or control of weight sharing, better child models can be more stably found.
|
| 18 |
+
|
| 19 |
+
To summarize, our main contributions are as follows:
|
| 20 |
+
|
| 21 |
+
• We define new metrics for evaluating the performance of the NAS methods based on weight sharing, and propose a down-scaled search space which makes it possible to have a deeper analysis by comparing it with ground truth.
|
| 22 |
+
• We design various experiments, and deliver some interesting observations and insights. More importantly, we reveal that valuable statistics can be extracted from training the super-net, which can be leveraged to improve performance.
|
| 23 |
+
• We take a step further to explain the reasons of high variance. Then we use decreased degree of weight sharing, which shows lower variance and better performance, to support the reasoning.
|
| 24 |
+
|
| 25 |
+
# 2 RELATED WORKS
|
| 26 |
+
|
| 27 |
+
Neural Architecture Search (NAS) is invented to relieve human experts from laborious job of engineering neural network components and architectures by automatically searching optimal neural architecture from a human-defined search space. Arguably, the recent growing interesting in NAS research begins from the work by Zoph and Le (Zoph & Le, 2016) where they train a controller using policy gradients (Williams, 1992) to discover and generate network models that achieve state-ofthe-art performance. Following these works, there is a growing interest in using RL in NAS (Pham et al., 2018; Baker et al., 2017; Tan et al., 2019; Zoph et al., 2018). There have also been studies in evolutionary approaches (Real et al., 2019; 2017; Miikkulainen et al., 2017; Xie & Yuille, 2017; Liu et al., 2018b). Most of these works still demand high computational cost that is not affordable for large networks or datasets.
|
| 28 |
+
|
| 29 |
+
Weight sharing approaches Weight sharing means sharing architecture weights among different components or models. Pham et al. (2018) combined this approach with previous work of NAS (Zoph & Le, 2016) and proposed Efficient Neural Architecture Search (ENAS), where a super-net is constructed which contains every possible architecture in the search space as its child model, and thus all the architectures sampled from this super-net share the weights of their common graph nodes. It significantly reduces the computational complexity of NAS by directly training and evaluating sampled child models directly on the shared weight. After the training is done, a subset of child models is chosen and they are either finetuned or trained from scratch to get the final model.
|
| 30 |
+
|
| 31 |
+
Many follow-up works leverage weight sharing as a useful technique that can be decoupled from RL controllers, including applying dropout on candidate choices (Bender et al., 2018), converting the discrete search space into a differentiable one (Liu et al., 2018c; Wu et al., 2018; Xie et al., 2019), searching via sparse optimization (Zhang et al., 2018), and directly searching for child models for large-scale target tasks and hardwares (Cai et al., 2019).
|
| 32 |
+
|
| 33 |
+
Previous studies on stability of weight sharing All the weight-sharing approaches are based on the assumption that the rank of child models obtained by evaluating a child model of the trained super-net is valid, or at least, capable of finding one of the best child models in the search space.
|
| 34 |
+
|
| 35 |
+
However, this assumption does not generally hold. For example, Guo et al. (2019) believed that child models are deeply coupled during optimization, causing high interference among each other. Sciuto et al. (2019) discovered that there is little correlation between the rank found by weight sharing and rank of actual performance. Anonymous (2020) also conducted a benchmark experiment that shows a similar instability when the search space contains thousands of child models, by leveraging ground truth results measured by Ying et al. (2019). However on the other hand, research on transfer learning (Razavian et al., 2014), where a particular model trained on a particular task can work well on another task, and multitask learning (Luong et al., 2015), where multiple models trained for multiple tasks share the same weights during training, suggest otherwise and encourage the weights to be shared among child models, to reduce the long training time from scratch to convergence (Pham et al., 2018). Therefore, in this paper we show whether weight sharing helps and why, using comprehensive experiments.
|
| 36 |
+
|
| 37 |
+
# 3 WEIGHT-SHARING: VARIANCE AND INVARIANCE
|
| 38 |
+
|
| 39 |
+
# 3.1 METHODOLOGY
|
| 40 |
+
|
| 41 |
+
The space of a typical neural architecture search task usually has more than $1 0 ^ { 1 0 }$ different child models (Tan et al., 2019; Liu et al., 2018a; 2019), thus, it is impossible to train them all, which leads to the problem that without ground truth it is hard to assess how good the found child model is in the search space. To solve this problem, we down-scale search space under the assumption that small search space is easier than large search space, if the search methods works in large search space they are also supposed to work in small search space.
|
| 42 |
+
|
| 43 |
+
$O _ { ( i , j ) }$ can be one of the following:
|
| 44 |
+
|
| 45 |
+
1. $3 \times 3$ max pooling
|
| 46 |
+
2. $3 \times 3$ separable convolutions
|
| 47 |
+
3. $5 \times 5$ separable convolutions
|
| 48 |
+
4. $3 \times 3$ dilated separable convolutions
|
| 49 |
+
|
| 50 |
+

|
| 51 |
+
Figure 1: Down-scaled search space.
|
| 52 |
+
|
| 53 |
+
Following DARTS (Liu et al., 2018c), we design a search space for a cell, as shown in Figure 1, and stack four cells each of which has the same chosen structure, forming a convolutional neural network. A cell is defined as a directed acyclic graph (DAG) of $n$ nodes (tensors) $x _ { 1 } , \ldots , x _ { n }$ . A cell starts with $x _ { 0 }$ , which is the output tensor of its previous cell fed through a 1x1 conv layer to match the targeted number of channels in the current layer. The output of the cell is simply the sum of $x _ { 1 } , \ldots , x _ { n }$ . The DAG is designed to be densely connected, i.e.,
|
| 54 |
+
|
| 55 |
+
$$
|
| 56 |
+
x _ { j } = \sum _ { 0 \leq i < j } O _ { ( i , j ) } ( x _ { i } )
|
| 57 |
+
$$
|
| 58 |
+
|
| 59 |
+
where $O _ { ( i , j ) }$ is the selected operation at edge $( i , j )$ . In the down-scaled search space, each cell contains only two nodes (i.e., $n = 2$ ) and $O _ { ( i , j ) }$ is one of the four primitive operations in Figure 1. Thus, a child model only has $4 ^ { 3 } = 6 4$ possible choices, which makes it easy to have ground truth. For convenience, we also name all the child models with three digits (each digit is in [1, 4]), denoting the choice of $O _ { ( 0 , 1 ) } , O _ { ( 0 , 2 ) } , O _ { ( 1 , 2 ) }$ respectively.
|
| 60 |
+
|
| 61 |
+
As introduced in the previous section, sharing a single copy of weights can be seen as training an expanded super-net. To better understand the effect of weight sharing, we simplify the training process. Specifically, we uniformly generate child models. Each mini-batch trains one child model and only the weights of this model are updated by back-propagation. After training the shared weights for a number of epochs, we use these shared weights to evaluate the performance of all child models on the validation set. On the other hand, the ground truth performance of each child model is obtained by training each of them independently from scratch with the same setting as weight sharing, and averaging over 10 runs with different random seeds for initializations. The lookup table can be found in Appendix C.
|
| 62 |
+
|
| 63 |
+
For the rest of the experiments listed in this paper, if not otherwise specified, the models are trained with the dataset of CIFAR-10 on an NVidia K80 GPU. We use SGD with momentum 0.9 and weight decay $1 0 ^ { - 3 }$ as our optimizer. The initial learning rate is set to 0.025 and annealed down to 0.001 following a cosine schedule without restart (Loshchilov & Hutter, 2016). The batch size is set to 256. Number of epochs is 200. Detailed experiment settings are described in Appendix A.
|
| 64 |
+
|
| 65 |
+
# 3.2 VARIANCE OF WEIGHT SHARING
|
| 66 |
+
|
| 67 |
+
To measure stability and performance of weight sharing methods, we first need to measure a rank, as weight sharing methods use the performance ranks of child models on validation set to choose the final output child model. We leverage Kendall’s rank correlation coefficient, i.e., Kendall’s Tau (Kendall, 1938), which provides a measure of correspondence between two ranks $R _ { 1 }$ and $R _ { 2 }$ . Intuitively, $\tau ( R _ { 1 } , R _ { 2 } )$ can be as high as 1 if $R _ { 1 }$ and $R _ { 2 }$ are perfectly matched, or as low as $- 1$ when $R _ { 1 }$ and $R _ { 2 }$ are exactly inverted. We use instance to denote the procedure of training the super-net and generating a rank $R _ { i }$ of child models on validation set. We then define the following three metrics.
|
| 68 |
+
|
| 69 |
+
• S-Tau: S-Tau is to measure the stability of generated ranks from multiple instances. For $N$ instances with ranks $R _ { 1 } , R _ { 2 } , \ldots , R _ { N }$ , S-Tau can be calculated as,
|
| 70 |
+
|
| 71 |
+
$$
|
| 72 |
+
{ \frac { 2 } { N ( N - 1 ) } } \sum _ { 1 \le i < j \le N } \tau ( R _ { i } , R _ { j } )
|
| 73 |
+
$$
|
| 74 |
+
|
| 75 |
+
• GT-Tau: This metric is to compare the rank produced by an instance with ground truth rank. We also use Kendall’s Tau to measure the correlation of the two ranks, i.e., $\tau ( \bar { R } , R _ { \mathrm { g t } } )$ .
|
| 76 |
+
|
| 77 |
+
• Top-n-Rank $\mathbf { ( T n R ) }$ : It is to measure how good an instance is at finding the top child model(s). TnR is obtained by choosing the top $n$ child models from the generated rank of an instance and finding the best ground truth rank of these $n$ child models.
|
| 78 |
+
|
| 79 |
+
Similar to a good deep learning model that could constantly converge to a point that has similar performance, weight-sharing NAS is also expected to have such stability. If we use the same initialization seed and the same sequence of child models for mini-batches in different instances, they will produce the same rank after the same number of epochs. To measure the stability when applying different seeds or sequences, we do several experiments and the results are shown in Table 1. For the first three rows, each of them is an experiment that runs 10 instances. The first one makes initialization seed different in different instances while keeping other configurations the same. The second one uses a random child model sampler with different seeds to generate different order of the 64 child models for different instances, each instance repeats the order in mini-batch training, and seeds for weight initializations are the same for those instances. The only difference between the second and the third one is that after every 64 mini-batches a new order of the child models is randomly generated for the next 64 mini-batches, we call it different order with shuffle.
|
| 80 |
+
|
| 81 |
+
From the numbers, we can see that different initialization seeds make the generated ranks very different. Some instances generate high correlation ranks while some others even show negative correlation. To give an intuitive understanding of the S-Tau values, we also show two baselines, i.e., random rank which includes 10 randomly generated ranks and ground truth which trains the 64 child models independently and generate a rank in every instance. The rank generated by training child models independently is much more stable. S-Tau of different orders with or without shuffle is lower than 0.5. But S-Tau values of the three experiments under the same epoch are not comparable, because S-Tau varies a lot in different epochs. For example, as shown in Figure 2, S-Tau of the 10 instances with different seeds varies in the range of 0.4 even in the last several epochs — it could be as low as 0.3 or as high as 0.7, which, to some extent, explains inconsistent results from previous works (Sciuto et al., 2019). Observation 1: The rank of child models on validation set is very unstable in different instances.
|
| 82 |
+
|
| 83 |
+
We also compared the generated ranks with the ground truth rank with GT-Tau as shown in Table 2. Similar to S-Tau, GT-Tau values of the three experiments are also much lower than that of ground truth, and the variance of GT-Tau across different instances is also high, which implies that the generated rank is not qualified to guide the choosing of good-performing child models. This is further proved by T1R and T3R. T1R ranges from 15 to 19, meaning that if choosing top 1 child model it is unlikely to obtain a good-performing model. T3R is slightly better than T1R, but at the cost of training more child models from scratch, which is usually not affordable for large search space. Observation 2: Though weight sharing shows the trend of following ground truth (has correlation), the generated rank is still far from the ground truth rank, seemingly having a hard limit.
|
| 84 |
+
|
| 85 |
+
Table 1: Instability of multiple runs (i.e., instances) measured with S-Tau. Max Tau means the maximum value of the $\frac { N ( N - 1 ) } { 2 }$ Taus. Similarly, Min Tau is the minimum value. The numbers are obtained at the 200-th epoch.
|
| 86 |
+
|
| 87 |
+
<table><tr><td>Experiments</td><td>S-Tau</td><td>Max Tau</td><td>Min Tau</td></tr><tr><td>Different seeds</td><td>0.5415</td><td>0.7977</td><td>0.2471</td></tr><tr><td>Different orders</td><td>0.3930</td><td>0.7021</td><td>-0.0129</td></tr><tr><td>Diff. orders (shufffle)</td><td>0.4403</td><td>0.7163</td><td>0.0764</td></tr><tr><td>Random rank</td><td>0.0382</td><td>0.2181</td><td>-0.1552</td></tr><tr><td>Ground truth</td><td>0.7120</td><td>0.8191</td><td>0.6650</td></tr><tr><td>Different epochs</td><td>0.5310</td><td>0.8752</td><td>0.0918</td></tr></table>
|
| 88 |
+
|
| 89 |
+

|
| 90 |
+
Figure 2: S-Tau evaluated after every epochs for “Diff. seeds”, “Diff. orders (shuffle)” and “Ground truth”.
|
| 91 |
+
|
| 92 |
+
Table 2: Comparison with ground truth with GT-Tau and TnR. Each number is an average of 10 numbers, either from 10 instances or from 10 epochs of one instance. The subscript shows the standard variance of these 10 numbers.
|
| 93 |
+
|
| 94 |
+
<table><tr><td></td><td>GT-Tau</td><td>T1R</td><td>T3R</td></tr><tr><td>Different seeds</td><td>0.4567±0.1478</td><td>18.5000±1.2042</td><td>17.6000±0.4899</td></tr><tr><td>Different orders</td><td>0.4625±0.0993</td><td>16.9000±5.7000</td><td>11.5000±5.3712</td></tr><tr><td>Diff. orders (shuffle)</td><td>0.5108±0.0665</td><td>15.6000±8.4758</td><td>11.2000±5.5462</td></tr><tr><td>Ground truth</td><td>0.7985±0.0257</td><td>4.8000±3.8419</td><td>1.6000±0.9165</td></tr><tr><td>Different epochs</td><td>0.5053±0.1399</td><td>15.2000±6.9828</td><td>13.2000±7.4404</td></tr></table>
|
| 95 |
+
|
| 96 |
+
Now that multiple instances have shown high variance, how about the stability of one single instance near the end of the training? We then look into a single instance by measuring variance of the ranks generated in consecutive epochs. Specifically, for each instances from the previous three experiments, we obtain 10 ranks each from one of the last 10 epochs (i.e., 191 – 200), measure the stability of the 10 ranks and compare them with ground truth rank. We calculate S-Tau to show the mutual correlation among these 10 ranks. This value turns out to vary between 0.39 to 0.63 for different orders (shuffle), which means there is high variance between epochs even within a single instance. We show the median number among instances in Table 1. GT-Tau also varies a lot along epochs. Taking one instance from “Diff. orders (shuffle)” with final GT-Tau 0.47, we found that, as shown in Table 2, actually its GT-Tau varies between 0.1 to 0.7, with standard variance 0.14, in the last 10 epochs. Observation 3: The generated ranks in the last several epochs of the same instance are highly unstable, indicating that picking a different epoch to generate the rank has great impact on the finally obtained performance.
|
| 97 |
+
|
| 98 |
+
# 3.3 EXPLOITABLE FROM VARIANCE
|
| 99 |
+
|
| 100 |
+
Though the generated ranks show high variance, there is some statistical information that can be extracted from the variance. For the “Diff. orders (shuffle)” experiment, we have 10 ranks on the 200th epoch of the 10 instances. For each child model, we retrieve its rank values in the 10 ranks, and show the distributions in Figure 3a. The child models are ordered with their ground truth accuracy, the left ones are better than the right ones. We can see that bad-performing models are more likely ranked as bad ones (also observed by Bender et al. (2018)), while it is almost not possible to tell which one is better from the good-performing ones. Furthermore, we evaluate the ranks generated from the last 10 epochs of the same instance in the same way. The result is shown in Figure 3b, which is a almost same result as the multi-instance experiment, implying that we can simply run one instance and generate multiple ranks from different epochs, these ranks can be used to quickly filter out bad-performing models. Insight 1: Though weight sharing is unstable, the generated ranks can be leveraged to quickly filter out bad-performing child models, and potentially used to do search space pruning, e.g., progressively discarding the bottom-ranked child models and only further training the top ones.
|
| 101 |
+
|
| 102 |
+

|
| 103 |
+
Figure 3: Distribution of rank achieved for each child model, ordered from the ground-truth-best to worst. Each box extends from the lower to upper quartile values of its corresponding data, with a line marking the median. The whiskers show the range of the data. Outliers are marked with circles.
|
| 104 |
+
|
| 105 |
+

|
| 106 |
+
Figure 4: For the solid line part, all the child models share one copy, while the dotted lines represent the part where each child model training independently. The accuracies are evaluated after each mini-batch, and GT-Tau is calculated correspondingly.
|
| 107 |
+
|
| 108 |
+
As shown in the previous experiment, a single instance can converge to a state that the performance of some child models can no longer be distinguished, which can be seen as a kind of stable state. In this state, further training of the super-net does not improve the quality of ranks (also proved in $\ S 4 . 1 )$ . We propose to finetune each child models independently by inheriting the weights from a snapshot of the super-net. Specifically, in Figure 4a, we train the super-net for 100 epochs and then finetune the child models for 64 mini-batches. We can see from Figure $_ \mathrm { 4 c }$ that GT-Tau quickly increases up to 0.6 with only 10 mini-batches. Finetuning from the 200-th epoch shows even better results in Figure 4b:
|
| 109 |
+
|
| 110 |
+
the convergence is faster (using 5 mini-batches) and GT-Tau is more stable (close to 0.8, Figure 4d). Insight 2: Weight sharing super-net could act as a good pretrained model. Finetuning child models with limited mini-batches could greatly improve the quality of the rank.
|
| 111 |
+
|
| 112 |
+
# 4 UNDERSTANDING VARIANCE OF WEIGHT SHARING
|
| 113 |
+
|
| 114 |
+
Understanding the source of variance is the key to better leverage the power of weight sharing. In this section, we measure more numbers and design different experiments to understand where the variance comes from and how to reduce the variance.
|
| 115 |
+
|
| 116 |
+
# 4.1 SOURCE OF VARIANCE
|
| 117 |
+
|
| 118 |
+
The first step is to find out the reasons why there is high variance in consecutive epochs of a single instance. We pick an instance from the “Diff. seeds” experiment. In this instance we evaluate the performance of the 64 child models on the validation set after every mini-batch near the end of training. The result is shown in Figure 5a. The curves has obvious periodicity with the length of 64 mini-batches, i.e., the number of child models. Curves with light colors are mainly located at the upper of the figure, but they are not always the better ones. In some mini-batches the curves with darker colors perform better. In Figure 5, if the $i$ -th mini-batch trains child model $c$ , we use a diamond marker to label $c$ ’s curve. We can see that in most of mini-batches training a child model makes this child model performs the best. Some bad-performing child models can also become the best one by training them in mini-batches. It implies that training a child model can easily perturb the rank of the previous mini-batch.
|
| 119 |
+
|
| 120 |
+

|
| 121 |
+
Figure 5: The validation performance of all child models, evaluated after each of the last 128 mini-batches. Each curve corresponds to one child model. Markers are marked on the child model trained in the current mini-batch. Lighter colors correspond to higher ground truth ranks. The difference between ordered and shuffled is “shuffled” generate a new order of child models every 64 mini-batches. Each figure shows a window of 128 mini-batches. It’s clear that in Figure 5a a pattern is repeated twice and the periodicity is 64 mini-batches.
|
| 122 |
+
|
| 123 |
+
To further verify this phenomenon, we show the result of an instance with shuffled sequence of child models in Figure 5b. There is no periodicity, but other results are very similar. Though curves with light colors generally perform better than the other curves, it is still hard to tell which one of them is better than others. The instability of rank during the last mini-batches in Figure 5 also implies the instability of GT-Tau, which means GT-Tau retrieved at the end of the training can also be highly unreliable. In fact, for the instance shown in Figure 5a, GT-Tau varies between 0.0 and 0.6 in the last 128 mini-batches.
|
| 124 |
+
|
| 125 |
+
In the rest of this section, we decrease the degree of weight sharing with different approaches. To faithfully reveal their effectiveness, we calculate the average GT-Tau for an instance in the last $k$ mini-batches due to the variance among mini-batches. We call it GT-Tau-Mean- $k$ . To see the stability of GT-Tau, we also obtain the standard variance of these $k$ GT-Taus, which we call GT-Tau-Std- $k$ .
|
| 126 |
+
|
| 127 |
+
Table 3: GT-Tau-Mean-64 and GT-Tau-Std-64, averaged over 10 instances. The subscript is the standard variance corresponding to the average.
|
| 128 |
+
(a) Group Sharing
|
| 129 |
+
|
| 130 |
+
<table><tr><td rowspan="2">m</td><td colspan="2">Grouping By Random</td><td colspan="2">Grouping By Similarity</td></tr><tr><td>Mean-64</td><td>Std-64</td><td>Mean-64</td><td>Std-64</td></tr><tr><td>1</td><td>0.4988±0.0320</td><td>0.1497±0.0455</td><td>0.4988±0.0320</td><td>0.1497±0.0455</td></tr><tr><td>2</td><td>0.4577±0.0424</td><td>0.1371±0.0233</td><td>0.3425±0.0490</td><td>0.1442±0.0424</td></tr><tr><td>4</td><td>0.2736±0.0216</td><td>0.1340±0.0235</td><td>0.7075±0.0137</td><td>0.0702±0.0156</td></tr><tr><td>8</td><td>0.2539±0.0463</td><td>0.1462±0.0172</td><td>0.6917±0.0267</td><td>0.0457±0.0088</td></tr><tr><td>16</td><td>0.1658±0.0316</td><td>0.1255±0.0155</td><td>0.7200±0.0213</td><td>0.0411±0.0098</td></tr><tr><td>32</td><td>0.2903±0.0256</td><td>0.1104±0.0087</td><td>0.7360±0.0164</td><td>0.0364±0.0096</td></tr><tr><td>64</td><td>0.8032±0.0255</td><td>0.0151±0.0036</td><td>0.8032±0.0255</td><td>0.0151±0.0036</td></tr></table>
|
| 131 |
+
|
| 132 |
+
(b) Prefix Sharing
|
| 133 |
+
|
| 134 |
+
<table><tr><td>k Mean-64</td><td>Std-64</td></tr><tr><td>0 0.6960±0.0193</td><td>0.0129±0.0066</td></tr><tr><td>1 0.4837±0.0822 2</td><td>0.0939±0.0545</td></tr><tr><td>0.4159±0.0504 0.4448±0.0689</td><td>0.1925±0.0362</td></tr><tr><td>3 4 0.5174±0.0340</td><td>0.1881±0.0468 0.1592±0.0163</td></tr></table>
|
| 135 |
+
|
| 136 |
+
# 4.2 GROUP SHARING: REDUCE VARIANCE
|
| 137 |
+
|
| 138 |
+
# 4.2.1 GROUPING BY RANDOM
|
| 139 |
+
|
| 140 |
+
Trying to reduce variance, we divide the child models into groups, each of which is trained independently and maintains one copy of weights. We first, naively, randomly divide all the child models in a search space into $m$ groups. Therefore, for a search space of $n$ child models, $m = 1$ corresponds to fully weight sharing and $m = n$ corresponds to no weight sharing.
|
| 141 |
+
|
| 142 |
+
We conduct experiments on our search space of 64 child models. $m$ is chosen from 1, 2, 4, 8, 16, 32 and 64. For each $m$ , we repeat the experiment for 10 instances, with the same group partition, but different seeds for initialization of weights. We run each group for 200 epochs and evaluate the validation accuracy of every child model at each of the last 64 mini-batches to obtain GT-Tau-Mean64, GT-Tau-Std-64, and average them over instances, as shown in Table 3a.
|
| 143 |
+
|
| 144 |
+
Actually, breaking down the complexity through random grouping does not increase stability but actually backfires. From $m = 1 6$ , the worst performing case, we take an instance for case study. We calculate GT-Tau-Mean-64 for each group, i.e., the including child models. The average GT-TauMean-64 of the 16 groups is as low as 0.2570. To compare, We partition the ranks generated by an instance from $m = 1$ into those 16 groups, and calculate GT-Tau-Mean-64 for each group in the same way, the average GT-Tau-Mean-64 is 0.5610 which is much higher than 0.2570. Thus, we argue that the downgrading of GT-Tau on the full rank mainly comes from internal instability inside groups. By examining the accuracy and rank of child models in each group, we find that interference among child models commonly exists in almost all the groups, even for $m = 3 2$ where there are only 2 child models per group. Such interference causes a drastic reordering of the rank of child models.
|
| 145 |
+
|
| 146 |
+

|
| 147 |
+
Figure 6: Validation accuracy of a group with 4 child models. Markers are marked on child models trained in the current mini-batch.
|
| 148 |
+
|
| 149 |
+
To dive deeper, we plot the accuracy of the child models from a group in the instance of $m = 1 6$ , as shown in Figure 6a. Some child models facilitate each other, while some others degrade each other. Specifically, the child models 143, 144 and 344 go up and down consistently, while the child model
|
| 150 |
+
|
| 151 |
+
424 acts exactly the opposite. Note that, 424 is the best-performing one in ground truth but performs the worst in this group, which indicates that properly choosing the child models for co-training (i.e., weight sharing) is the key to obtain a good rank. This is further supported by Figure 6b which shows the accuracy of these four child models when $m = 1$ . With more other child models joining in for co-training, the four child models’ curves become very different from that in Figure 6a. For example, the curves of 344 and 424 become very similar.
|
| 152 |
+
|
| 153 |
+
On the other hand, from the first column in Table 3a, we can see that GT-Tau-Mean-64 first decreases then increases when $m$ changes from 1 to 64. A possible explanation is that when many child models share a single copy of weights, a single child model cannot bias the group a lot, while when each group becomes very small, the child models share less weights with each other, thus also not easy to bias each other too much. Observation 1: Two child models have (higher or lower) interference with each other when they share weights. A child model’s validation accuracy highly depends on the child models it is jointly trained with.
|
| 154 |
+
|
| 155 |
+
# 4.2.2 GROUPING BY SIMILARITY
|
| 156 |
+
|
| 157 |
+
According to the observations above, we further explore how it works by grouping child models based on similarity. We sort the child models lexicographically from 111 to 444, then slice the sequence into $m$ groups. For example, when $m = 8$ , group 1 has the child models from 111 to 124, group 2 is from 131 to 144, group 3 is from 211 to 224, and so on. The results are shown on the right of Table 3a. We can see that there is a global trend of stabilization from $m = 1$ to 64, i.e., GT-Tau-Mean-64 goes higher and GT-Tau-Std-64 gets lower. Observation 2: A smart grouping can generally improve the stability of training.
|
| 158 |
+
|
| 159 |
+
In our case, “smart” means “similar”. However, this might not be the case for more complex search space, where “similar” can be poorly defined, or the range of the space is too large, or even infinite. Admittedly, for larger and more complex search space, such smart grouping has to be found by other means, e.g., correlation matrix among child models. We leave it in future work.
|
| 160 |
+
|
| 161 |
+
# 4.3 PREFIX SHARING
|
| 162 |
+
|
| 163 |
+
Inspired by the great success of transfer learning (Caruana, 1995; Mesnil et al., 2011; Kornblith et al., 2019), we try to do a similar thing by sharing one copy of “backbone” network while keeping a separated copy of “head” for each child model. In particular, we use $k$ to denote the number of cells shared. When $k = 0$ , only the first two conv layers are shared. When $k = 4$ , all the layers except the final fully-connected layers are shared. In the experiments, we increase the total epochs from 200 to 2000, as the models require more computation to reasonably converge.
|
| 164 |
+
|
| 165 |
+
The results are shown in Table 3b. Obviously, sharing fewer cells improves the GT-Tau and accuracy (more experiment numbers can be seen in Appendix B). The performance becomes better but at the cost of consuming more computation power. For example, though a high and stable GT-Tau is obtained when $k = 0$ , it takes over 1000 epochs for it to climb up to above 0.6. But still, this cost is much lower than ground truth, which takes $6 4 \times 2 0 0 = 1 2 8 0 0$ epochs in total.
|
| 166 |
+
|
| 167 |
+
# 5 CONCLUSION
|
| 168 |
+
|
| 169 |
+
Neural architecture search is becoming a feasible way to explore new models, but its excessive computation cost impels researchers to resort to the power of weight sharing. In this paper we use comprehensive experiments to have a close look at weight sharing, and illustrate many interesting insights. By designing more sophisticated experiments, we further dig out the reasons of high variance of weight sharing. To further improve NAS, we believe the key is to figure out how to smartly leverage shared weights. This paper suggests controlling the degree of weight-sharing, either model-based and rule-based, evaluating them on the small search space and providing deeper insights. We hope to inspire the community to find more stable yet efficient approaches.
|
| 170 |
+
|
| 171 |
+
# REFERENCES
|
| 172 |
+
|
| 173 |
+
Anonymous. Nas-bench-1shot1: Benchmarking and dissecting one-shot neural architecture search. In Submitted to International Conference on Learning Representations, 2020. URL https: //openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ SJx9ngStPH. under review.
|
| 174 |
+
|
| 175 |
+
Bowen Baker, Otkrist Gupta, Nikhil Naik, and Ramesh Raskar. Designing neural network architectures using reinforcement learning. In 5th International Conference on Learning Representations, ICLR 2017, Toulon, France, April 24-26, 2017, Conference Track Proceedings, 2017.
|
| 176 |
+
|
| 177 |
+
Gabriel Bender, Pieter-Jan Kindermans, Barret Zoph, Vijay Vasudevan, and Quoc Le. Understanding and simplifying one-shot architecture search. In International Conference on Machine Learning, pp. 549���558, 2018.
|
| 178 |
+
|
| 179 |
+
Han Cai, Ligeng Zhu, and Song Han. Proxylessnas: Direct neural architecture search on target task and hardware. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019, 2019.
|
| 180 |
+
|
| 181 |
+
Rich Caruana. Learning many related tasks at the same time with backpropagation. In Advances in neural information processing systems, pp. 657–664, 1995.
|
| 182 |
+
|
| 183 |
+
Adam Gaier and David Ha. Weight agnostic neural networks. arXiv preprint arXiv:1906.04358, 2019.
|
| 184 |
+
|
| 185 |
+
Zichao Guo, Xiangyu Zhang, Haoyuan Mu, Wen Heng, Zechun Liu, Yichen Wei, and Jian Sun. Single path one-shot neural architecture search with uniform sampling. CoRR, abs/1904.00420, 2019.
|
| 186 |
+
|
| 187 |
+
Max Jaderberg, Valentin Dalibard, Simon Osindero, Wojciech M Czarnecki, Jeff Donahue, Ali Razavi, Oriol Vinyals, Tim Green, Iain Dunning, Karen Simonyan, et al. Population based training of neural networks. arXiv preprint arXiv:1711.09846, 2017.
|
| 188 |
+
|
| 189 |
+
Maurice G Kendall. A new measure of rank correlation. Biometrika, 30(1/2):81–93, 1938.
|
| 190 |
+
|
| 191 |
+
Simon Kornblith, Jonathon Shlens, and Quoc V Le. Do better imagenet models transfer better? In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2661–2671, 2019.
|
| 192 |
+
|
| 193 |
+
Liam Li and Ameet Talwalkar. Random search and reproducibility for neural architecture search. arXiv preprint arXiv:1902.07638, 2019.
|
| 194 |
+
|
| 195 |
+
Jason Liang, Elliot Meyerson, and Risto Miikkulainen. Evolutionary architecture search for deep multitask networks. In Proceedings of the Genetic and Evolutionary Computation Conference, pp. 466–473. ACM, 2018.
|
| 196 |
+
|
| 197 |
+
Chenxi Liu, Barret Zoph, Maxim Neumann, Jonathon Shlens, Wei Hua, Li-Jia Li, Li Fei-Fei, Alan Yuille, Jonathan Huang, and Kevin Murphy. Progressive neural architecture search. In Proceedings of the European Conference on Computer Vision (ECCV), pp. 19–34, 2018a.
|
| 198 |
+
|
| 199 |
+
Chenxi Liu, Liang-Chieh Chen, Florian Schroff, Hartwig Adam, Wei Hua, Alan L Yuille, and Li FeiFei. Auto-deeplab: Hierarchical neural architecture search for semantic image segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 82–92, 2019.
|
| 200 |
+
|
| 201 |
+
Hanxiao Liu, Karen Simonyan, Oriol Vinyals, Chrisantha Fernando, and Koray Kavukcuoglu. Hierarchical representations for efficient architecture search. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 - May 3, 2018, Conference Track Proceedings, 2018b.
|
| 202 |
+
|
| 203 |
+
Hanxiao Liu, Karen Simonyan, and Yiming Yang. Darts: Differentiable architecture search. arXiv preprint arXiv:1806.09055, 2018c.
|
| 204 |
+
|
| 205 |
+
Ilya Loshchilov and Frank Hutter. SGDR: stochastic gradient descent with restarts. CoRR, abs/1608.03983, 2016.
|
| 206 |
+
|
| 207 |
+
Minh-Thang Luong, Quoc V Le, Ilya Sutskever, Oriol Vinyals, and Lukasz Kaiser. Multi-task sequence to sequence learning. arXiv preprint arXiv:1511.06114, 2015.
|
| 208 |
+
|
| 209 |
+
Gregoire Mesnil, Yann Dauphin, Xavier Glorot, Salah Rifai, Yoshua Bengio, Ian Goodfellow, Erick ´ Lavoie, Xavier Muller, Guillaume Desjardins, David Warde-Farley, et al. Unsupervised and transfer learning challenge: a deep learning approach. In Proceedings of the 2011 International Conference on Unsupervised and Transfer Learning workshop-Volume 27, pp. 97–111. JMLR. org, 2011.
|
| 210 |
+
|
| 211 |
+
Risto Miikkulainen, Jason Zhi Liang, Elliot Meyerson, Aditya Rawal, Daniel Fink, Olivier Francon, Bala Raju, Hormoz Shahrzad, Arshak Navruzyan, Nigel Duffy, and Babak Hodjat. Evolving deep neural networks. CoRR, abs/1703.00548, 2017.
|
| 212 |
+
|
| 213 |
+
Hieu Pham, Melody Y Guan, Barret Zoph, Quoc V Le, and Jeff Dean. Efficient neural architecture search via parameter sharing. arXiv preprint arXiv:1802.03268, 2018.
|
| 214 |
+
|
| 215 |
+
Ali Sharif Razavian, Hossein Azizpour, Josephine Sullivan, and Stefan Carlsson. CNN features off-the-shelf: an astounding baseline for recognition. CoRR, abs/1403.6382, 2014.
|
| 216 |
+
|
| 217 |
+
Esteban Real, Sherry Moore, Andrew Selle, Saurabh Saxena, Yutaka Leon Suematsu, Jie Tan, Quoc V. Le, and Alexey Kurakin. Large-scale evolution of image classifiers. In Proceedings of the 34th International Conference on Machine Learning, ICML 2017, Sydney, NSW, Australia, 6-11 August 2017, pp. 2902–2911, 2017.
|
| 218 |
+
|
| 219 |
+
Esteban Real, Alok Aggarwal, Yanping Huang, and Quoc V. Le. Regularized evolution for image classifier architecture search. In The Thirty-Third AAAI Conference on Artificial Intelligence, AAAI 2019, The Thirty-First Innovative Applications of Artificial Intelligence Conference, IAAI 2019, The Ninth AAAI Symposium on Educational Advances in Artificial Intelligence, EAAI 2019, Honolulu, Hawaii, USA, January 27 - February 1, 2019., pp. 4780–4789, 2019.
|
| 220 |
+
|
| 221 |
+
Christian Sciuto, Kaicheng Yu, Martin Jaggi, Claudiu Musat, and Mathieu Salzmann. Evaluating the search phase of neural architecture search. CoRR, abs/1902.08142, 2019.
|
| 222 |
+
|
| 223 |
+
Mingxing Tan, Bo Chen, Ruoming Pang, Vijay Vasudevan, Mark Sandler, Andrew Howard, and Quoc V Le. Mnasnet: Platform-aware neural architecture search for mobile. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2820–2828, 2019.
|
| 224 |
+
|
| 225 |
+
Ronald J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 8(3):229–256, May 1992. doi: 10.1007/BF00992696.
|
| 226 |
+
|
| 227 |
+
Bichen Wu, Xiaoliang Dai, Peizhao Zhang, Yanghan Wang, Fei Sun, Yiming Wu, Yuandong Tian, Peter Vajda, Yangqing Jia, and Kurt Keutzer. Fbnet: Hardware-aware efficient convnet design via differentiable neural architecture search. CoRR, abs/1812.03443, 2018.
|
| 228 |
+
|
| 229 |
+
Lingxi Xie and Alan L. Yuille. Genetic CNN. CoRR, abs/1703.01513, 2017.
|
| 230 |
+
|
| 231 |
+
Sirui Xie, Hehui Zheng, Chunxiao Liu, and Liang Lin. SNAS: stochastic neural architecture search. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019, 2019.
|
| 232 |
+
|
| 233 |
+
Chris Ying, Aaron Klein, Esteban Real, Eric Christiansen, Kevin Murphy, and Frank Hutter. NAS-Bench-101: Towards Reproducible Neural Architecture Search. arXiv e-prints, art. arXiv:1902.09635, Feb 2019.
|
| 234 |
+
|
| 235 |
+
Xinbang Zhang, Zehao Huang, and Naiyan Wang. You only search once: Single shot neural architecture search via direct sparse optimization. CoRR, abs/1811.01567, 2018.
|
| 236 |
+
|
| 237 |
+
Barret Zoph and Quoc V Le. Neural architecture search with reinforcement learning. arXiv preprint arXiv:1611.01578, 2016.
|
| 238 |
+
|
| 239 |
+
Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V Le. Learning transferable architectures for scalable image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 8697–8710, 2018.
|
| 240 |
+
|
| 241 |
+
# A EXPERIMENT SETTINGS
|
| 242 |
+
|
| 243 |
+
# A.1 OVERVIEW
|
| 244 |
+
|
| 245 |
+
Since our network architecture is very similar with that introduced in DARTS Liu et al. (2018c), we basically follow the settings in DARTS, with a few modifications.
|
| 246 |
+
|
| 247 |
+
1. Batch size: We following the settings from a PyTorch implementation of DART $S ^ { 2 }$ and set batch size to 256. The current batch size divides one epoch into 196 mini-batches.
|
| 248 |
+
2. Number of epochs: Previous works Liu et al. (2018c); Li & Talwalkar (2019) all set the number of epochs as a constant number. We follow the similar settings and set it to 200. Empirically, we experiment with epochs from 50 to 2000, though they show different final accuracies, all our Tau’s reported in this paper seems insensitive to the number of epochs trained, except when the number of epochs is too small for the instance to reach a plateau. See Appendix A.2.1 and Appendix B for more information.
|
| 249 |
+
3. Learning rate: Following DARTS, we use an initial learning rate 0.025, annealing down to 0.001 following a cosine schedule depending on the total number of epochs.
|
| 250 |
+
4. Optimizer: We use SGD as our optimizer to train graphs. Weight decay is set to be $1 0 ^ { - 3 }$ as smaller networks often needs larger weight decays. The momentum is set to be 0.9, and the velocities (momentum buffer) for parameters shares if the corresponding parameter shares.
|
| 251 |
+
5. Network: The first 2 conv layers of the entire network expand the 3-channel image into 48 channels. Each of the following 4 cells will first compress the input into 16 channels and feeds into the DAG and concat the output of nodes (32 channels in our settings). The momentum of batch normalization is set to be 0.4 (under the semantics of PyTorch3).
|
| 252 |
+
|
| 253 |
+
For reproducibility, we set a certain seed before running all the experiments, and we removed the non-deterministic behavior in CuDNN.
|
| 254 |
+
|
| 255 |
+
# A.2 EFFECTS OF HYPERPAMETERS
|
| 256 |
+
|
| 257 |
+
In order to justify results of this paper are not just any coincidence of a carefully picked set of hyperparameters. We compare some of the results here with those with difference choices.
|
| 258 |
+
|
| 259 |
+
# A.2.1 NUMBER OF EPOCHS
|
| 260 |
+
|
| 261 |
+
To show that the phenomenon in Figure 5a is not just a result of training too few epochs, we repeat the same experiment with the same experiment settings, with number of epochs set to 2000, obtaining Figure 7, which shows similar periodicity and instability, despite the overall accuracy is higher.
|
| 262 |
+
|
| 263 |
+
# A.2.2 MOMENTUMS
|
| 264 |
+
|
| 265 |
+
Larger momentums help preserve the information from previous mini-batches, during which other child models are training, thus, presumably stabilize the training.
|
| 266 |
+
|
| 267 |
+
Batch norm Following the definitions in PyTorch, higher BN momentum indicates that the mean and variance in the current mini-batch have a higher weight. We compare accuracy curves for BN momentum is lower (0.1) and higher (0.9), each repeating 3 times with different seeds for initializations. Experiments show that lower BN momentum helps stabilize the training in a short term, but it’s still trembling in the long term, see Figure 8.
|
| 268 |
+
|
| 269 |
+
SGD momentum We compare the results of accuracy curves when SGD momentum is set to 0 with 0.9. Results are shown as in Figure 9. The accuracy seems to vary in a greater range, compared to Figure 5a, and GT-Tau varies between $- 0 . 1$ and 0.5, which is more unstable.
|
| 270 |
+
|
| 271 |
+

|
| 272 |
+
Figure 7: Validation accuracy for all child models for each of the last 128 mini-batches of 2000 epochs.
|
| 273 |
+
|
| 274 |
+

|
| 275 |
+
Figure 8: GT-Tau curves over last 128 mini-batches. Each color represents one instance.
|
| 276 |
+
|
| 277 |
+

|
| 278 |
+
Figure 9: Validation accuracy for all child models for each of the last 128 mini-batches, when SGD momentum is set to 0.
|
| 279 |
+
|
| 280 |
+
# B PREFIX SHARING: DETAILS
|
| 281 |
+
|
| 282 |
+
Table 4: Supplementary to Table 3. GT-Tau-Mean-64 and GT-Tau-Std-64 follow the same scheme. Similar to these two metrics, accuracy of each child model in each instance is first averaged over 64 mini-batches, and then mean and std of all child model accuracies in an instance are calculated. Finally we average mean and std from each instance over 10 instances. The subscript is the standard variance of the corresponding average.
|
| 283 |
+
|
| 284 |
+
<table><tr><td>Epochs</td><td>k</td><td>GT-Tau-Mean-64</td><td>GT-Tau-Std-64</td><td>Accuracy Mean</td><td>Accuracy Std</td></tr><tr><td>2000</td><td>0</td><td>0.6960±0.0193</td><td>0.0129±0.0066</td><td>0.7793±0.0036</td><td>0.0245±0.0010</td></tr><tr><td>2000</td><td>1</td><td>0.4837±0.0822</td><td>0.0939±0.0545</td><td>0.7691±0.0089</td><td>0.0378±0.0040</td></tr><tr><td>2000</td><td>2</td><td>0.4159±0.0504</td><td>0.1925±0.0362</td><td>0.6972±0.0159</td><td>0.0640±0.0081</td></tr><tr><td>2000</td><td>3</td><td>0.4448±0.0689</td><td>0.1881±0.0468</td><td>0.6636±0.0178</td><td>0.0823±0.0113</td></tr><tr><td>2000</td><td>4</td><td>0.5174±0.0340</td><td>0.1592±0.0163</td><td>0.6639±0.0166</td><td>0.0995±0.0166</td></tr><tr><td>200</td><td>0</td><td>0.0441±0.1348</td><td>0.0145±0.0044</td><td>0.6083±0.0065</td><td>0.0173±0.0020</td></tr><tr><td>200</td><td>1</td><td>0.3895±0.0731</td><td>0.0989±0.0339</td><td>0.6435±0.0114</td><td>0.0298±0.0058</td></tr><tr><td>200</td><td>2</td><td>0.4104±0.0496</td><td>0.1801±0.0418</td><td>0.6035±0.0138</td><td>0.0535±0.0105</td></tr><tr><td>200</td><td>3</td><td>0.4545±0.0581</td><td>0.1570±0.0385</td><td>0.6081±0.0181</td><td>0.0667±0.0086</td></tr><tr><td>200</td><td>4</td><td>0.4899±0.0501</td><td>0.1622±0.0534</td><td>0.6177±0.0171</td><td>0.0800±0.0181</td></tr></table>
|
| 285 |
+
|
| 286 |
+
As shown in Table 4, in the case of 200 epochs, accuracy is much lower than that after 2000 epochs. Also, GT-Tau shows an ascending trend, which is quite the opposite of the phenomenon observed in larger epochs. We argue that this is due to the insufficient training for smaller $k$ . Prefix sharing causes the networks to having multiple copies and these copies cannot be trained independently (as opposed to parallelizing the groups in $\ S 4 . 2 )$ ). Running 2000 epochs in prefix sharing is fair and necessary, with acceptable time cost (about 2 days on a GPU for one instance).
|
| 287 |
+
|
| 288 |
+
# C GROUND TRUTH LOOKUP TABLE
|
| 289 |
+
|
| 290 |
+
Shown in Table 5 is a table containing accuracies of all 64 child models, along with their ranks.
|
| 291 |
+
|
| 292 |
+
Table 5: Accuracies of child models when they are trained independently. The three digits of child model labels correspond to $O _ { ( 0 , 1 ) }$ , $O _ { ( 0 , 2 ) }$ and $O _ { ( 1 , 2 ) }$ respectively. Evaluations are repeated 10 times with different seeds of weight initialization, and averages and standard variances are calculated. Ranks are based on the average values. The higher, the better.
|
| 293 |
+
|
| 294 |
+
<table><tr><td>Child Model</td><td>Acc Mean</td><td>Acc Std</td><td>Rank</td><td>Child Model</td><td>Acc Mean</td><td>Acc Std</td><td>Rank</td></tr><tr><td>111</td><td>70.13</td><td>0.23</td><td>64</td><td>311</td><td>81.78</td><td>0.20</td><td>53</td></tr><tr><td>112</td><td>78.23</td><td>0.75</td><td>62</td><td>312</td><td>83.52</td><td>0.25</td><td>27</td></tr><tr><td>113</td><td>81.06</td><td>0.42</td><td>57</td><td>313</td><td>83.31</td><td>0.34</td><td>32</td></tr><tr><td>114</td><td>79.98</td><td>0.40</td><td>59</td><td>314</td><td>83.48</td><td>0.26</td><td>28</td></tr><tr><td>121</td><td>77.77</td><td>0.37</td><td>63</td><td>321</td><td>82.91</td><td>0.25</td><td>41</td></tr><tr><td>122</td><td>81.77</td><td>0.50</td><td>54</td><td>322</td><td>84.24</td><td>0.22</td><td>18</td></tr><tr><td>123</td><td>83.10</td><td>0.21</td><td>39</td><td>323</td><td>84.33</td><td>0.29</td><td>13</td></tr><tr><td>124</td><td>82.58</td><td>0.43</td><td>49</td><td>324</td><td>84.62</td><td>0.19</td><td>11</td></tr><tr><td>131</td><td>81.14</td><td>0.21</td><td>56</td><td>331</td><td>82.91</td><td>0.22</td><td>42</td></tr><tr><td>132</td><td>83.15</td><td>0.36</td><td>38</td><td>332</td><td>83.98</td><td>0.13</td><td>25</td></tr><tr><td>133</td><td>83.21</td><td>0.28</td><td>34</td><td>333</td><td>84.70</td><td>0.53</td><td>10</td></tr><tr><td>134</td><td>82.77</td><td>0.19</td><td>48</td><td>334</td><td>84.47</td><td>0.41</td><td>12</td></tr><tr><td>141</td><td>79.62</td><td>1.04</td><td>60</td><td>341</td><td>83.39</td><td>0.18</td><td>29</td></tr><tr><td>142</td><td>82.86</td><td>0.17</td><td>46</td><td>342</td><td>84.32</td><td>0.51</td><td>14</td></tr><tr><td>143</td><td>82.87</td><td>0.31</td><td>43</td><td>343</td><td>84.23</td><td>0.35</td><td>19</td></tr><tr><td>144</td><td>82.07</td><td>0.38</td><td>51</td><td>344</td><td>84.32</td><td>0.49</td><td>15</td></tr><tr><td>211</td><td>78.67</td><td>0.49</td><td>61</td><td>411</td><td>80.43</td><td>0.73</td><td>58</td></tr><tr><td>212</td><td>81.86</td><td>0.37</td><td>52</td><td>412</td><td>82.94</td><td>0.44</td><td>40</td></tr><tr><td>213</td><td>83.31</td><td>0.28</td><td>31</td><td>413</td><td>82.87</td><td>0.19</td><td>43</td></tr><tr><td>214</td><td>82.81</td><td>0.30</td><td>47</td><td>414</td><td>83.21</td><td>0.53</td><td>34</td></tr><tr><td>221</td><td>81.42</td><td>0.15</td><td>55</td><td>421</td><td>83.27</td><td>0.21</td><td>33</td></tr><tr><td>222</td><td>83.20</td><td>0.30</td><td>36</td><td>422</td><td>84.76</td><td>0.56</td><td>8</td></tr><tr><td>223</td><td>84.22</td><td>0.31</td><td>20</td><td>423</td><td>84.73</td><td>0.33</td><td>9</td></tr><tr><td>224</td><td>84.17</td><td>0.32</td><td>22</td><td>424</td><td>84.77</td><td>0.57</td><td>7</td></tr><tr><td>231</td><td>82.87</td><td>0.44</td><td>45</td><td>431</td><td>83.39</td><td>0.25</td><td>30</td></tr><tr><td>232</td><td>83.81</td><td>0.43</td><td>26</td><td>432</td><td>84.80</td><td>0.42</td><td>6</td></tr><tr><td>233</td><td>84.28</td><td>0.28</td><td>16</td><td>433</td><td>84.84</td><td>0.57</td><td>5</td></tr><tr><td>234</td><td>84.19</td><td>0.50</td><td>21</td><td>434</td><td>85.23</td><td>0.17</td><td>1</td></tr><tr><td>241</td><td>83.20</td><td>0.31</td><td>37</td><td>441</td><td>82.19</td><td>0.26</td><td>50</td></tr><tr><td>242</td><td>84.28</td><td>0.14</td><td>17</td><td>442</td><td>84.87</td><td>0.59</td><td>3</td></tr><tr><td>243</td><td>84.03</td><td>0.19</td><td>24</td><td>443</td><td>84.93</td><td>0.23</td><td>2</td></tr><tr><td>244</td><td>84.08</td><td>0.36</td><td>23</td><td>444</td><td>84.85</td><td>0.35</td><td>4</td></tr></table>
|
md/train/ryykVe-0W/ryykVe-0W.md
ADDED
|
@@ -0,0 +1,242 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LEARNING INDEPENDENT FEATURES WITH ADVERSARIAL NETS FOR NON-LINEAR ICA
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Reliable measures of statistical dependence could be useful tools for learning independent features and performing tasks like source separation using Independent Component Analysis (ICA). Unfortunately, many of such measures, like the mutual information, are hard to estimate and optimize directly. We propose to learn independent features with adversarial objectives (Goodfellow et al., 2014; Arjovsky et al., 2017; Huszar, 2016) which optimize such measures implicitly. These objectives compare samples from the joint distribution and the product of the marginals without the need to compute any probability densities. We also propose two methods for obtaining samples from the product of the marginals using either a simple resampling trick or a separate parametric distribution. Our experiments show that this strategy can easily be applied to different types of model architectures and solve both linear and non-linear ICA problems.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
When unsupervised models are developed to learn interesting features of data, this often implies that each feature represents some interesting unique property of the data that cannot easily be derived from the other features. A sensible way to learn such features is by ensuring that they are statistically independent. However, the removal of all possible dependencies from a set of features is not an easy task. Therefore, research on the extraction of such statistically independent features has so far mostly focussed on the linear case, which is known as Independent Component Analysis (ICA; Hyvarinen ¨ et al. 2004). Linear ICA has many applications and has been especially popular as a method for blind source separation (BSS) and its application domains include medical signal analysis (e.g., EEG and ECG), audio source separation and image processing (see Naik & Kumar 2011 for a comprehensive overview of ICA applications). Unfortunately, the linear ICA model is not always appropriate and in the light of the recent success of deep learning methods, it would be interesting to learn more general non-linear feature transformations. Some non-linear and also non-iid ICA methods have been proposed (Almeida, 2003; Hyvarinen & Morioka, 2017) but the learning of general non-linear ICA models is both ill-defined and still far from being solved.
|
| 12 |
+
|
| 13 |
+
One obstacle in way of learning independent features is the lack of measures of independence that are easy to optimize. Many learning algorithms for linear and non-linear Independent Component Analysis are in some way based on a minimization of the mutual information (MI) or similar measures which compare a joint distribution with the product of its marginals. Such measures are typically hard to estimate in practice. This is why a popular ICA method like Infomax (Bell & Sejnowski, 1995), for example, only minimizes the mutual information indirectly by maximizing the joint entropy of the features instead. While there is some work on estimators for mutual information and independence based non-parametric methods (Kraskov et al., 2004; Gretton et al., 2005), it is typically not straightforward to employ such measures as optimization criteria.
|
| 14 |
+
|
| 15 |
+
Recently, the framework of Generative Adversarial Networks (GANs) was proposed for learning generative models (Goodfellow et al., 2014) and matching distributions. GAN training can be seen as approximate minimization of the Jensen-Shannon divergence between two distributions without the need to compute densities. Other recent work extended this interpretation of GANs to other divergences and distances between distributions (Arjovsky et al., 2017; Hjelm et al., 2017; Mao et al., 2016). While most work on GANs applies this matching of distributions in the context of generative modelling, some recent work has extended these ideas to learn features which are invariant to different domains (Ganin et al., 2016) or noise conditions (Serdyuk et al., 2016).
|
| 16 |
+
|
| 17 |
+
We show how the GAN framework allows us to define new objectives for learning statistically independent features. The gist of the idea is to use adversarial training to train some joint distribution to produce samples which become indistinguishable from samples of the product of its marginals. Our empirical work shows that auto-encoder type models which are trained to optimize our independence objectives can solve both linear and non-linear ICA problems with different numbers of sources and observations. Unlike many other ICA methods, our objective is more or less independent of the mixing function and doesn’t use properties that are specific for the linear or so-called ‘post-nonlinear’ case. We also propose a heuristic for model selection for such architectures that seems to work reasonably well in practice.
|
| 18 |
+
|
| 19 |
+
# 2 BACKGROUND
|
| 20 |
+
|
| 21 |
+
The mutual information of two stochastic variables $Z _ { 1 }$ and $Z _ { 2 }$ corresponds to the Kullback-Leibler (KL) divergence between their joint density and the product of the marginal densities:
|
| 22 |
+
|
| 23 |
+
$$
|
| 24 |
+
I ( Z _ { 1 } , Z _ { 2 } ) = \int \int p ( z _ { 1 } , z _ { 2 } ) \log \frac { p ( z _ { 1 } , z _ { 2 } ) } { p ( z _ { 1 } ) p ( z _ { 2 } ) } \mathrm { d } z _ { 1 } z _ { 2 } .
|
| 25 |
+
$$
|
| 26 |
+
|
| 27 |
+
We will often write densities like $p ( Z _ { 1 } = z _ { 1 } )$ as $p ( z _ { 1 } )$ to save space. The MI is zero if and only if all the variables are mutually independent. One benefit of working with MI as a measure of dependence/independence, is that it can easily be related to other information theoretical quantities, like for example the entropies of the distributions involved. Another nice property of the mutual information is that, unlike differential entropy, it is invariant under reparametrizations of the marginal variables (Kraskov et al., 2004). This means that if two functions $f$ and $g$ are homeomorphisms, the $I ( Z _ { 1 } , Z _ { 2 } ) = I ( f ( Z _ { 1 } ) , g ( Z _ { 2 } ) )$ . Unfortunately, the mutual information is often hard to compute or estimate, especially for high dimensional sample spaces.
|
| 28 |
+
|
| 29 |
+
Generative Adversarial Networks (GANs; Goodfellow et al. 2014) provide a framework for matching distributions without the need to compute densities. During training, two neural networks are involved: the generator and the discriminator. The generator is a function $G ( \cdot )$ which maps samples from a known distribution (e.g., the unit variance multivariate normal distribution) to points that live in the same space as the samples of the data set. The discriminator is a classifier $D ( \cdot )$ which is trained to separate the ‘fake’ samples from the generator from the ‘real’ samples in the data set. The parameters of the generator are optimized to ‘fool’ the discriminator and maximize its loss function using gradient information propagated through the samples.1 In the original formulation of the GAN framework, the discriminator is optimized using the cross-entropy loss. The full definition of the GAN learning objective is given by
|
| 30 |
+
|
| 31 |
+
$$
|
| 32 |
+
\operatorname* { m i n } _ { G } \operatorname* { m a x } _ { D } E _ { \mathrm { d a t a } } [ \log D ( \mathbf { x } ) ] + E _ { \mathrm { g e n } } [ \log ( 1 - D ( \mathbf { y } ) ) ] ,
|
| 33 |
+
$$
|
| 34 |
+
|
| 35 |
+
where $E _ { \mathrm { d a t a } }$ and $E _ { \mathrm { g e n } }$ denote expectations with respect to the data and generator distributions.
|
| 36 |
+
|
| 37 |
+
Since we will evaluate our models on ICA source separation problems, we will describe this setting in a bit more detail as well. The original linear ICA model assumes that some observed multivariate signal $\mathbf { x }$ can be modelled as
|
| 38 |
+
|
| 39 |
+
$$
|
| 40 |
+
\begin{array} { r } { { \bf x } = { \bf A } { \bf s } , } \end{array}
|
| 41 |
+
$$
|
| 42 |
+
|
| 43 |
+
where $\mathbf { A }$ is a linear transformation and s is a set of mutually independent source signals which all have non-Gaussian distributions. Given the observations $\mathbf { x }$ , the goal is to retrieve the source signals s. When the source signals are indeed non-Gaussian (or there is at least no more than one Gaussian source), the matrix A is of full column rank and the number of observations is at least as large as the number of sources, linear ICA is guaranteed to be identifiable (Comon, 1994) up to a permutation and rescaling of the sources. When the mixing of the signals is not linear, identifiability cannot be guaranteed in general and the problem is ill-posed. However, under certain circumstances, some specific types of non-linear mixtures like post non-linear mixtures (PNL) can still be separated (Taleb & Jutten, 1999). Separability can sometimes also be observed (albeit not guaranteed) when the number of mixtures/observations is larger than the number of source signals.
|
| 44 |
+
|
| 45 |
+
# 3 MINIMIZING AND MEASURING DEPENDENCE
|
| 46 |
+
|
| 47 |
+
For the moment, assume that we have access to samples from both the joint distribution $p ( \mathbf { z } )$ and the product of the marginals $\prod _ { i } p ( z _ { i } )$ . We now want to measure how dependent/independent the individual variables of the joint distribution are without measuring any densities. As pointed out by Arjovsky et al. (2017), the earth mover’s distance between two distributions $q$ and $r$ can, under certain conditions, be approximated by letting $f ( \cdot )$ be a neural network and solving the following optimization problem:
|
| 48 |
+
|
| 49 |
+
$$
|
| 50 |
+
\operatorname* { m a x } _ { \| f \| _ { L } \leq 1 } E _ { \mathbf { z } \sim q ( \mathbf { z } ) } [ f ( \mathbf { z } ) ] - E _ { \mathbf { z } \sim r ( \mathbf { z } ) } [ f ( \mathbf { z } ) ] .
|
| 51 |
+
$$
|
| 52 |
+
|
| 53 |
+
If we substitute $q$ and $r$ for $p ( \mathbf { z } )$ and $\Pi _ { i } p ( z _ { i } )$ , respectively, we can consider Equation 4 to be an approximate measure of dependence for $p ( \mathbf { z } )$ that can serve as an alternative to the mutual information in the sense that the objective it approximates will be zero if and only if the distributions are the same and therefore the variables are independent. Now if it is also possible to backpropagate gradients through the samples with respect to the parameters of the distribution, we can use these to minimize Equation 4 and make the variables more independent. Similarly, the standard GAN objective can be used to approximately minimize the JS-divergence between the joint and marginal distributions instead. While we focussed on learning independent features and the measuring of dependence is not the subject of the research in this paper, we think that the adversarial networks framework may provide useful tools for this as well.
|
| 54 |
+
|
| 55 |
+
Finally, as shown in a blog post (Huszar, 2016), the standard GAN objective can also be adapted to approximately optimize the KL-divergence. This objective is obviously an interesting case because it results in an approximate optimization of the mutual information itself but in preliminary experiments we found it harder to optimize than the more conventional GAN objectives.
|
| 56 |
+
|
| 57 |
+
# 3.1 OBTAINING THE SAMPLES
|
| 58 |
+
|
| 59 |
+
So far, we assumed that we had access to both samples from the joint distribution and from the product of the marginals. To obtain approximate samples from the product of the marginals, we propose to either resample the values of samples from the joint distribution or to train a separate generator network with certain architectural constraints.
|
| 60 |
+
|
| 61 |
+
Given a sample $( z _ { 1 } , \ldots , z _ { M } ) ^ { \mathsf { T } }$ of some joint distribution $p ( z _ { 1 } , \dots , z _ { M } )$ , a sample of the marginal distribution $p ( z _ { 1 } )$ can be obtained by simply discarding all the other variables from the joint sample. obtain samples from the complete product samples from the joint distribution and mak $\textstyle \prod _ { i = 1 } ^ { M } p ( z _ { i } )$ , the same mt each of the od can be used by takingdimensions from the new $M$ $M$
|
| 62 |
+
factorized sample is taken from a different sample of the joint. In other words, given $K$ joint samples where $K \geq M$ , one can randomly choose $M$ integers from $\{ 1 , \ldots , N \}$ without replacement and use them to select the elements of the sample from the factorized distribution. When using sampling with replacement, a second sample obtained in this way from the same batch of joint samples would not be truly independent of the first. We argue that this is not a big problem in practice as long as one ensures that the batches are large enough and randomly chosen.
|
| 63 |
+
|
| 64 |
+
Another way to simulate the product of marginal distributions is by using a separate generator network which is trained to optimize the same objective as the generator of the joint distribution. By sampling independent latent variables and transforming each of them with a separate multi-layer perceptron, this generator should be able to learn to approximate the joint distribution with a factorized distribution without imposing a specific prior. While it may be more difficult to learn the marginal distributions explicitly, it could in some situations be useful to have an explicit model for this distribution available after training for further analysis or if the goal is to build a generative model. While the resampling method above is obviously simpler, this parameterized approach may be especially useful when the data are not iid (like in time series) and one doesn’t want to ignore the inter-sample dependencies.
|
| 65 |
+
|
| 66 |
+
# 4 ADVERSARIAL NON-LINEAR INDEPENDENT COMPONENTS ANALYSIS
|
| 67 |
+
|
| 68 |
+
As a practical application of the ideas described above, we will now develop a system for learning independent components. The goal of the system is to learn an encoder network $F ( \mathbf { x } )$ which maps data/signals to informative features $\mathbf { z }$ which are mutually independent. We will use an adversarial objective to achieve this in the manner described above. However, enforcing independence by itself does not guarantee that the mapping from the observed signals $\mathbf { x }$ to the predicted sources $\mathbf { z }$ is informative about the input. To enforce this, we add a decoder network $V ( \mathbf { z } )$ , which tries to reconstruct the data from the predicted features as was done by Schmidhuber (1992).
|
| 69 |
+
|
| 70 |
+

|
| 71 |
+
Figure 1: Schematic representation of the entire system for learning non-linear ICA. Specific functional shapes can be enforced by choosing a suitable decoder architecture.
|
| 72 |
+
|
| 73 |
+
Given the encoder, the decoder, the discriminator, samples from the data, the joint distribution, and the product of the marginals, we can now compute the GAN objective from Equation 2 (or Equation 4, assuming the Lipschitz constraint is also enforced) and add the reconstruction objective to it. This leads to the following total objective function:
|
| 74 |
+
|
| 75 |
+
$$
|
| 76 |
+
O = E _ { \mathbf { x } \sim p ( \mathbf { x } ) } \left[ J ( \mathbf { x } ) + \lambda \lVert \mathbf { x } - V ( F ( \mathbf { x } ) ) \rVert _ { 2 , 1 } \right] ,
|
| 77 |
+
$$
|
| 78 |
+
|
| 79 |
+
where $\| \cdot \| _ { 2 , 1 }$ is the $L _ { 1 }$ norm and $\lambda$ is a hyperparameter which controls the trade-off between the reconstruction quality and the adversarial independence criterion $J$ . Figure 1 shows a schematic representation of the training setup in its entirety. The full procedure of our setup using the standard GAN objective is given by Algorithm 1.
|
| 80 |
+
|
| 81 |
+
# Algorithm 1 Adversarial Non-linear ICA train loop
|
| 82 |
+
|
| 83 |
+
input data $\mathcal { X }$ , encoder $F$ , decoder $V$ , discriminator $D$ , (optional) generator $G$ while Not converged do sample a batch $\mathbf { X }$ of $N$ data (column) vectors from $\mathcal { X }$ $\mathbf { Z } F ( \mathbf { X } )$ // apply encoder $\hat { \mathbf { X } } V ( \mathbf { Z } ) / ,$ / apply decoder $\hat { \mathbf { Z } } \gets \mathrm { R e s a m p l e } ( \mathbf { Z } )$ or sample $\hat { \mathbf { Z } } \sim G ( \hat { \mathbf { Z } } )$ $J = \log ( D ( \mathbf { Z } ) ) + \log ( 1 - D ( \hat { \mathbf { Z } } ) )$ Update $D$ to maximize $J$ $R = \| \mathbf { X } - \hat { \mathbf { X } } \| _ { 2 , 1 }$ Update $F , V$ and possibly $G$ to minimize $J + \lambda R$ end while
|
| 84 |
+
|
| 85 |
+
Finally, we found that it is important to normalize the features vectors within a batch before permuting them and presenting them to the discriminator. This prevents them both from going to zero and from growing indefinitely in magnitude, potentially causing the discriminator to fail because it cannot keep up with the overall changes of the feature distribution. We also used these normalized features as input for the decoder, followed by an element-wise rescaling using trainable parameters, similar to what is done in batch normalization (Ioffe & Szegedy, 2015). Without normalization of the decoder inputs, the models would sometimes get stuck in degenerate solutions.
|
| 86 |
+
|
| 87 |
+
# 5 RELATED WORK
|
| 88 |
+
|
| 89 |
+
Many optimization methods for ICA are either based on non-Gaussianity, like the popular FastICA algorithm (Hyvarinen & Oja, 1997), or on minimization of the mutual information of the extracted ¨ source signals, as is implicitly done with Infomax methods (Bell & Sejnowski, 1995). The Infomax ICA algorithm maximizes the joint entropy of the estimated signals. Given a carefully constructed architecture, the marginal entropies are bounded and the maximization leads to a minimization of the mutual information. Infomax has been extended to non-linear neural network models and the
|
| 90 |
+
|
| 91 |
+

|
| 92 |
+
Figure 2: The decoder architecture used for the PNL experiments. It can only learn transformations in which a linear transformation is followed by the application of non-linear scalar functions to each of the dimensions.
|
| 93 |
+
|
| 94 |
+
MISEP model (Almeida, 2003) is a successful example of this. Infomax methods don’t need an additional decoder component to ensure invertibility and there are no sampling methods involved. Unlike our model however, training involves a computation of the gradient of the logarithm of the determinant of the jacobian for each data point. This can be computationally demanding and also requires the number of sources and mixtures to be equal. Furthermore, our method provides a way of promoting independence of features decoupled from maximizing their information.
|
| 95 |
+
|
| 96 |
+
This work was partially inspired by Jurgen Schmidhuber’s work on the learning of binary factorial ¨ codes (Schmidhuber, 1992). In that work, an auto-encoder is also combined with an adversarial objective, but one based on the mutual predictability of the variables rather than separability from the product of the marginals. To our knowledge, this method for learning binary codes has not yet been adapted for continuous variables. Our method has the advantage that only a single discriminator-type network is needed for any number of source signals. That said, Schmidhuber’s setup doesn’t require any sampling and a continuous version of it would be an interesting subject for future research.
|
| 97 |
+
|
| 98 |
+
The architectures in our experiments are also similar to Adversarial Auto-Encoders (AAEs) (Makhzani et al., 2015). In AAEs, the GAN principle is used to match the distribution at the output of an encoder when fed by the data with some prior as part of a Variational Autoencoder (VAE) (Kingma & Welling, 2013) setup. Similar to in our work, the KL-divergence between two distributions is replaced with the GAN objective. When a factorized prior is used (as is typically done), the AAE also learns to produce independent features. However, the chosen prior also forces the learned features to adhere to its specific shape and this may be in competition with the independence property. We actually implemented uniform and normal priors for our model but were not able to learn signal separation with those. That said, the recently proposed $\beta$ -VAE (Higgins et al., 2016) has been analysed in the context of learning disentangled representations and appears to be quite effective at doing so. Another recent related model is InfoGAN (Chen et al., 2016). InfoGAN is a generative GAN model in which the mutual information between some latent variables and the outputs is maximized. While this also promotes independence of some of the latent variables, the desired goal is now to provide more control over the generated samples.
|
| 99 |
+
|
| 100 |
+
Some of the more successful estimators of mutual information are based on nearest neighbor methods which compare the relative distances of complete vectors and individual variables (Kraskov et al., 2004). An estimator of this type has also been used to perform linear blind source separation using an algorithm in which different rotations of components are compared with each other (Stogbauer et al., 2004). Unfortunately, this estimator is biased when variables are far from inde- ¨ pendent and not differentiable, limiting it’s use as a general optimization criterion. Other estimators of mutual information and dependence/independence in general are based on kernel methods (Gretton et al., 2005; 2008). These methods have been very successful at linear ICA but have, to our knowledge, not been evaluated on more general non-linear problems.
|
| 101 |
+
|
| 102 |
+
Finally, there has been recent work on invertible non-linear mappings that allows the training of tractable neural network latent variable models which can be interpreted as non-linear independent component analysis. Examples of these are the NICE and real-NVP models (Dinh et al., 2014; 2016). An important difference with our work is that these models require one to specify the distribution of the source signals in advance.
|
| 103 |
+
|
| 104 |
+

|
| 105 |
+
Figure 3: Source signals used in the experiments.
|
| 106 |
+
|
| 107 |
+
# 6 EXPERIMENTS
|
| 108 |
+
|
| 109 |
+
We looked at linear mixtures, post non-linear mixtures which are not linear but still separable and overdetermined general non-linear mixtures which may not be separable. ICA extracts the source signals only up to a permutation and scaling. Therefore, all results are measured by considering all possible pairings of the predicted signals and the source signals and measuring the average absolute correlation of the best pairing. We will just refer to this as $\rho _ { \mathrm { m a x } }$ or simply ‘correlation’. We will refer to our models with the name ‘Anica’, which is short for Adversarial Non-linear Independent Component Analysis.
|
| 110 |
+
|
| 111 |
+
Source signals We used both synthetic signals and actual speech signals as sources for our experiments (see Figure 3). The synthetic source signals were created with the goal to include both sub-gaussian and super-gaussian distributions, together with some periodic signals for visualization purposes. The data set consisted of the first 4000 samples of these signals.2 For the audio separation tasks, we used speech recordings from the 16kHz version of the freely available TSP data set (Kabal, 2002). The first source was an utterance from a male speaker $\left( \mathtt { M A } 0 2 \_ 0 4 \_ \mathtt { w a v } \right)$ , the second source an utterance from a female speaker (FA01 03.wav), and the third source was uniform noise. All signals were normalized to have a peak amplitude of 1. The signals were about two seconds long, which translated to roughly 32k samples.
|
| 112 |
+
|
| 113 |
+
Linear ICA As a first proof of concept, we trained a model in which both the model and the transformation of the source signals are linear. The mixed signals $\mathbf { x }$ were created by forming a matrix A with elements sampled uniformly from the interval $[ - . 5 , . 5 ]$ and multiplying it with the source signals s. Both the encoder and decoder parts of the model were linear transformations. The discriminator network was a multilayer perceptron with one hidden layer of 64 rectified linear units.
|
| 114 |
+
|
| 115 |
+
Post non-linear mixtures To generate post non-linear mixtures, we used the same procedure as we used for generating the linear mixture, but followed by a non-linear function. For the synthetic signals we used the hyperbolic tangent function. For the audio data we used a different function for each of the three mixtures: $g _ { 1 } ( x ) { \dot { \ } } = \operatorname { t a n h } ( x )$ , $g _ { 2 } ( x ) = ( x + x ^ { 3 } ) / 2$ and $g _ { 3 } ( x ) = e ^ { x }$ . We found during preliminary experiments that we obtained the best results when the encoder, which learns the inverse of the mixing transformation, is as flexible as possible, while the decoder is constrained in the types of functions it can learn. One could also choose a flexible decoder while keeping the encoder constrained but this didn’t seem to work well in practice. The encoder was a multi-layer perceptron (MLP) with two hidden layers of rectified linear units (ReLU; Nair & Hinton 2010). The first layer of the decoder was a linear transformation. Subsequently, each output was processed by a separate small MLP with two layers of 16 hidden ReLU units and a single input and output. This decoder was chosen to constrain the model to PNL compatible functions. Note that we did not use any sigmoid functions in our model. The discriminator network was again multilayer perceptron with one hidden layer of 64 rectified linear units.
|
| 116 |
+
|
| 117 |
+
Over-determined multi-layer non-linear mixture With this task, we illustrate the benefit of our method when there are more mixture signals than sources for general non-linear mixture problem. The transformation of the source signals was $\mathbf { x } = \operatorname { t a n h } ( \mathbf { \cdot B } \operatorname { t a n h } ( \mathbf { A } \mathbf { s } ) )$ , where A and $\mathbf { B }$ were randomly sampled matrices of $2 4 \times 6$ and $2 4 \times 2 4$ dimensions, respectively. Both the encoder and decoder for this task were MLPs with two hidden layers of ReLU units. The discriminator had two hidden layer with the same number of hidden units as was chosen for the encoder and decoder networks. There is no guarantee of identifiability for this task, but the large number of observations makes it more likely.
|
| 118 |
+
|
| 119 |
+
Baselines For the linear problems, we compared our results with the FastICA (Hyvarinen & Oja, ¨ 1997) implementation from Scikit-learn (Pedregosa et al., 2011) (we report the PNL and MLP results as well just because it’s possible). For the PNL problems, we implemented a version of the MISEP model (Almeida, 2003) with a neural network architecture specifically proposed for these types of problems (Zheng et al., 2007). We also computed $\rho _ { \mathrm { m a x } }$ for the mixed signals. Unfortunately, we couldn’t find a proper baseline for the over-determined MLP problem.
|
| 120 |
+
|
| 121 |
+
# .1 OPTIMIZATION AND HYPER-PARAMETER TUNING SELECTION
|
| 122 |
+
|
| 123 |
+
Model comparison with adversarial networks is still an open problem. We found that when we measured the sum of the adversarial loss and the reconstruction loss on held-out data, the model with the lowest loss was typically not a good model in terms of signal separation. This can for example happen when the discriminator diverges and the adversarial loss becomes very low even though the features are not independent. When one knows how the source signals are supposed to look (or sound) this may be less of a problem but even then, this would not be a feasible way to compare numerous models with different hyper-parameter settings. We found that the reliability of the score, measured as the standard deviation over multiple experiments with identical hyperparameters, turned out to be a much better indicator of signal separation performance.
|
| 124 |
+
|
| 125 |
+
For each model, we performed a random search over the number of hidden units in the MLPs, the learning rate and the scaling of the initial weight matrices of the separate modules of the model. For each choice of hyper-parameters, we ran five experiments with different seeds. After discarding diverged models, we selected the models with the lowest standard deviation in optimization loss on a held-out set of 500 samples. We report both the average correlation scores of the model settings selected in this fashion and the ones which were highest on average in terms of the correlation scores themselves. The latter represent potential gains in performance if in future work more principled methods for GAN model selection are developed. To make our baseline as strong as possible, we performed a similar hyper-parameter search for the PNLMISEP model to select the number of hidden units, initial weight scaling and learning rate. All models were trained for 500000 iterations on batches of 64 samples using RMSProp (Tieleman & Hinton, 2012).
|
| 126 |
+
|
| 127 |
+
The standard JS-divergence optimizing GAN loss was used for all the hyper-parameter tuning experiment. We didn’t find it necessary to use the commonly used modification of this loss for preventing the discriminator from saturating. We hypothesize that this is because the distributions are very similar during early training, unlike the more conventional GAN problem where one starts by comparing data samples to noise. For investigating the convergence behavior we also looked at the results of a model trained with the Wasserstein GAN loss and gradient penalty (Gulrajani et al., 2017).
|
| 128 |
+
|
| 129 |
+
# 6.2 RESULTS
|
| 130 |
+
|
| 131 |
+
As Table 1 shows, the linear problems get solved up to very high precision for the synthetic tasks by all models, verifying that adversarial learning can be used to learn ICA. The PNL correlations obtained by the Anica models for the synthetic signals were slightly worse than of the PNLMISEP baseline. Unfortunately, the model selection procedure also didn’t identify good settings for the Anica- $\mathbf { g }$ model and there is a large discrepancy between the chosen hyper-parameter settings and the ones that lead to the best correlation scores. The MLP results on the MLP task were high in general and the scores of the best performing hyper-parameter settings are on par with those for the PNL
|
| 132 |
+
|
| 133 |
+

|
| 134 |
+
Figure 4: Convergence plots for the linear synthetic source task.
|
| 135 |
+
|
| 136 |
+
Table 1: Maximum correlation results on all tasks for the synthetic data. A $\mathbf { \dot { g } } ^ { \prime }$ in the suffix of the model name indicates that a separate generator network was used instead of the resampling method. Two scores separated by a $\cdot / { \cdot }$ indicate that the first score was obtained using the model selection described in Section 6.1 while the second score is simply the best score a posteriori. Parentheses refer contain the standard deviation of the scores multiplied with $1 0 ^ { - 4 }$ .
|
| 137 |
+
|
| 138 |
+
<table><tr><td>Method</td><td>Linear</td><td>PNL</td><td>MLP</td></tr><tr><td>Anica</td><td>.9987(6.5)/.9994(1.4)</td><td>.9794(53)/.9877(7.9)</td><td>.9667(325)/.9831(16)</td></tr><tr><td>Anica-g</td><td>.9996(1.2)/.9996(1.2)</td><td>.7098(724)/.9802(47)</td><td>.9770(33)/.9856(10.8)</td></tr><tr><td>PNLMISEP</td><td>=</td><td>.9920(24)</td><td>=</td></tr><tr><td>FastICA</td><td>.9998</td><td>.8327</td><td>.9173</td></tr><tr><td>Mixed</td><td>.5278</td><td>.6174</td><td>1</td></tr></table>
|
| 139 |
+
|
| 140 |
+
task. This indicates that the overcompleteness of the task was in this case sufficiently helpful for making the problem separable up to some reasonable precision.
|
| 141 |
+
|
| 142 |
+
On the audio tasks (see Table 2), the results for the linear models were of very high precision but not better than those obtained with FastICA, unless one would be able to select settings based on the correlation scores directly. This still indicates that the method is able to learn the task at high precision without explicitly using properties which are specific to the linear problem. On the PNL task, the resampling based model scored better than the baseline (although we admit it may not be a very strong one). The Anica-g model scored worse when the hyper-parameter selection procedure was used but the score of the best working settings suggests that it might do similarly well as the resampling model with a better model selection procedure. See the appendix for some reconstruction plots of some of the individual models.
|
| 143 |
+
|
| 144 |
+
To get more insight in the convergence behavior of the models, we plotted the correlations with the source signals, the discriminator costs and the reconstruction costs of two linear models for the synthetic signals in Figure 4. For both a GAN and a WGAN version of the resampling-based model, the recognition and discriminator costs seem to be informative about the convergence of the correlation scores. However, we also observed situations in which the losses made a sudden jump after being stuck at a suboptimal value for quite a while and this might indicate why the consistency of the scores may be more important than their individual values.
|
| 145 |
+
|
| 146 |
+
Table 2: Maximum correlation results on all tasks for the audio data. A $\mathbf { \dot { g } }$ in the suffix of the model name indicates that a separate generator network was used instead of the resampling method. Two scores separated by a $\cdot / { \cdot }$ indicate that the first score was obtained using the model selection described in Section 6.1 while the second score is simply the best score a posteriori. Parentheses refer contain the standard deviation of the scores multiplied with $1 0 ^ { - 4 }$ .
|
| 147 |
+
|
| 148 |
+
<table><tr><td>Method</td><td>Linear</td><td>PNL</td></tr><tr><td>Anica</td><td>.9996(4.9)/1.0(.1)</td><td>.9929(18)/.9948(12)</td></tr><tr><td>Anica-g</td><td>.9996(3.1)/1.0(.1)</td><td>.9357(671)/.9923(19)</td></tr><tr><td>PNLMISEP</td><td>1</td><td>.9567(471)</td></tr><tr><td>FastICA</td><td>1.0</td><td>.8989</td></tr><tr><td>Mixed</td><td>.5338</td><td>.6550</td></tr></table>
|
| 149 |
+
|
| 150 |
+
# 7 DISCUSSION
|
| 151 |
+
|
| 152 |
+
As our results showed, adversarial objectives can successfully be used to learn independent features in the context of non-linear ICA source separation. We showed that the methods can be applied to a variety of architectures, work for signals that are both sub-gaussian and super-gaussian. The method were also able so separate recordings of human speech.
|
| 153 |
+
|
| 154 |
+
A serious difficulty with evaluating general methods for learning independent features is that the non-linear ICA problem is ill-posed. Ideally, we should use a general measure of both the independence and amount of information in the learned features. Both quantities are very hard to estimate in higher dimensions and preliminary attempts to use either the Hilbert Schmidt Independence Criterion (Gretton et al., 2005) and nearest-neighbor methods (Kraskov et al., 2004) for model selection haven’t been succesful yet. We think that our overcomplete learning setup and heuristic model selection method are first steps in the way to evaluating these models but more principled approaches are desperately needed. We hope that future work on convergence measures for GANs will also improve the practical applicability of our methods by allowing for more principled model selection.
|
| 155 |
+
|
| 156 |
+
To conclude, our results show that adversarial objectives can be used to maximize independence and solve linear and non-linear ICA problems without relying on specific properties of the mixing process. While the ICA models we implemented are not always easy to optimize, they seem to work well in practice and can easily be applied to various different types of architectures and problems. Future work should be devoted to a more thorough theoretical analysis of of the proposed methods for minimizing and measuring dependence and how to evaluate them.
|
| 157 |
+
|
| 158 |
+
# ACKNOWLEDGMENTS
|
| 159 |
+
|
| 160 |
+
# REFERENCES
|
| 161 |
+
|
| 162 |
+
Lu´ıs B Almeida. Misep–linear and nonlinear ica based on mutual information. Journal of Machine Learning Research, 4(Dec):1297–1318, 2003.
|
| 163 |
+
Martin Arjovsky, Soumith Chintala, and Leon Bottou. Wasserstein gan. ´ arXiv preprint arXiv:1701.07875, 2017.
|
| 164 |
+
Anthony J Bell and Terrence J Sejnowski. An information-maximization approach to blind separation and blind deconvolution. Neural computation, 7(6):1129–1159, 1995.
|
| 165 |
+
Xi Chen, Yan Duan, Rein Houthooft, John Schulman, Ilya Sutskever, and Pieter Abbeel. Infogan: Interpretable representation learning by information maximizing generative adversarial nets. CoRR, abs/1606.03657, 2016. URL http://arxiv.org/abs/1606.03657.
|
| 166 |
+
Pierre Comon. Independent component analysis, a new concept? Signal processing, 36(3):287–314, 1994.
|
| 167 |
+
Laurent Dinh, David Krueger, and Yoshua Bengio. Nice: Non-linear independent components estimation. arXiv preprint arXiv:1410.8516, 2014.
|
| 168 |
+
|
| 169 |
+
Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using real nvp. arXiv preprint arXiv:1605.08803, 2016.
|
| 170 |
+
|
| 171 |
+
Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, Franc¸ois Laviolette, Mario Marchand, and Victor Lempitsky. Domain-adversarial training of neural networks. Journal of Machine Learning Research, 17(59):1–35, 2016.
|
| 172 |
+
|
| 173 |
+
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.
|
| 174 |
+
|
| 175 |
+
Arthur Gretton, Ralf Herbrich, Alexander Smola, Olivier Bousquet, and Bernhard Scholkopf. Kernel ¨ methods for measuring independence. Journal of Machine Learning Research, 6(Dec):2075– 2129, 2005.
|
| 176 |
+
|
| 177 |
+
Arthur Gretton, Kenji Fukumizu, Choon H Teo, Le Song, Bernhard Scholkopf, and Alex J Smola. ¨ A kernel statistical test of independence. In Advances in neural information processing systems, pp. 585–592, 2008.
|
| 178 |
+
|
| 179 |
+
Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron Courville. Improved training of wasserstein gans. arXiv preprint arXiv:1704.00028, 2017.
|
| 180 |
+
|
| 181 |
+
Irina Higgins, Loic Matthey, Arka Pal, Christopher Burgess, Xavier Glorot, Matthew Botvinick, Shakir Mohamed, and Alexander Lerchner. beta-vae: Learning basic visual concepts with a constrained variational framework. In ICLR, 2016.
|
| 182 |
+
|
| 183 |
+
R Devon Hjelm, Athul Paul Jacob, Tong Che, Kyunghyun Cho, and Yoshua Bengio. Boundaryseeking generative adversarial networks. arXiv preprint arXiv:1702.08431, 2017.
|
| 184 |
+
|
| 185 |
+
Ferenc Huszar. An alternative update rule for generative adversarial networks. Unpublished note (retrieved on 7 Oct 2016), 2016.
|
| 186 |
+
|
| 187 |
+
Aapo Hyvarinen and Hiroshi Morioka. Nonlinear ica of temporally dependent stationary sources. In Artificial Intelligence and Statistics, pp. 460–469, 2017.
|
| 188 |
+
|
| 189 |
+
Aapo Hyvarinen and Erkki Oja. One-unit learning rules for independent component analysis. ¨ Advances in neural information processing systems, pp. 480–486, 1997.
|
| 190 |
+
|
| 191 |
+
Aapo Hyvarinen, Juha Karhunen, and Erkki Oja. ¨ Independent component analysis, volume 46. John Wiley & Sons, 2004.
|
| 192 |
+
|
| 193 |
+
Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015.
|
| 194 |
+
|
| 195 |
+
Peter Kabal. Tsp speech database. McGill University, Database Version, 1(0):09–02, 2002.
|
| 196 |
+
|
| 197 |
+
Diederik $\mathrm { \bf P }$ Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013.
|
| 198 |
+
|
| 199 |
+
Alexander Kraskov, Harald Stogbauer, and Peter Grassberger. Estimating mutual information. ¨ Physical review E, 69(6):066138, 2004.
|
| 200 |
+
|
| 201 |
+
Alireza Makhzani, Jonathon Shlens, Navdeep Jaitly, Ian Goodfellow, and Brendan Frey. Adversarial autoencoders. arXiv preprint arXiv:1511.05644, 2015.
|
| 202 |
+
|
| 203 |
+
Xudong Mao, Qing Li, Haoran Xie, Raymond YK Lau, Zhen Wang, and Stephen Paul Smolley. Least squares generative adversarial networks. arXiv preprint ArXiv:1611.04076, 2016.
|
| 204 |
+
|
| 205 |
+
Ganesh R Naik and Dinesh K Kumar. An overview of independent component analysis and its applications. Informatica, 35(1), 2011.
|
| 206 |
+
|
| 207 |
+
Vinod Nair and Geoffrey E Hinton. Rectified linear units improve restricted boltzmann machines. In Proceedings of the 27th international conference on machine learning (ICML-10), pp. 807–814, 2010.
|
| 208 |
+
|
| 209 |
+
Fabian Pedregosa, Gael Varoquaux, Alexandre Gramfort, Vincent Michel, Bertrand Thirion, Olivier ¨ Grisel, Mathieu Blondel, Peter Prettenhofer, Ron Weiss, Vincent Dubourg, et al. Scikit-learn: Machine learning in python. Journal of Machine Learning Research, 12(Oct):2825–2830, 2011.
|
| 210 |
+
|
| 211 |
+
Jurgen Schmidhuber. Learning factorial codes by predictability minimization. ¨ Neural Computation, 4(6):863–879, 1992.
|
| 212 |
+
|
| 213 |
+
Dmitriy Serdyuk, Kartik Audhkhasi, Philemon Brakel, Bhuvana Ramabhadran, Samuel Thomas, ´ and Yoshua Bengio. Invariant representations for noisy speech recognition. arXiv preprint arXiv:1612.01928, 2016.
|
| 214 |
+
|
| 215 |
+
Harald Stogbauer, Alexander Kraskov, Sergey A Astakhov, and Peter Grassberger. Least-dependent- ¨ component analysis based on mutual information. Physical Review E, 70(6):066123, 2004.
|
| 216 |
+
|
| 217 |
+
Anisse Taleb and Christian Jutten. Source separation in post-nonlinear mixtures. IEEE transactions on Signal Processing, 47(10):2807–2820, 1999.
|
| 218 |
+
|
| 219 |
+
Tijmen Tieleman and Geoffrey Hinton. Lecture 6.5-rmsprop: Divide the gradient by a running average of its recent magnitude. COURSERA: Neural networks for machine learning, 4(2), 2012.
|
| 220 |
+
|
| 221 |
+
Chun-Hou Zheng, De-Shuang Huang, Kang Li, George Irwin, and Zhan-Li Sun. Misep method for postnonlinear blind source separation. Neural computation, 19(9):2557–2578, 2007.
|
| 222 |
+
|
| 223 |
+
# A SYNTHETIC SIGNALS
|
| 224 |
+
|
| 225 |
+
The synthetic signals were defined as follows:
|
| 226 |
+
|
| 227 |
+
$$
|
| 228 |
+
\begin{array} { r l } & { s _ { 1 } ( t ) = \mathrm { s i g n } ( \cos ( 3 1 0 \pi t ) ) , } \\ & { s _ { 2 } ( t ) = \sin ( 1 6 0 0 \pi t ) , } \\ & { s _ { 3 } ( t ) = \sin ( 6 0 0 \pi t + 6 \cos ( 1 2 0 \pi t ) ) , } \\ & { s _ { 4 } ( t ) = \sin ( 1 8 0 \pi t ) , } \\ & { s _ { 5 } ( t ) \sim \mathrm { u n i f o r m } ( x | [ - 1 , 1 ] ) , } \\ & { s _ { 6 } ( t ) \sim \mathrm { l a p l a c e } ( x | \mu = 0 , b = 1 ) . } \end{array}
|
| 229 |
+
$$
|
| 230 |
+
|
| 231 |
+
The experiments were done using the first 4000 samples with $t$ linearly spaced between [0, 0.4].
|
| 232 |
+
|
| 233 |
+
# B FIGURES
|
| 234 |
+
|
| 235 |
+

|
| 236 |
+
Figure 5: Sources and reconstructions for the linear synthetic source ICA task. The predictions have been rescaled to lie within the range $[ - 1 , 1 ]$ for easier comparison with the source signals. This causes the laplacian samples to appear scaled down. The scores $\rho _ { \mathrm { m a x } }$ represent the maximum absolute correlation over all possible permutations of the signals.
|
| 237 |
+
|
| 238 |
+

|
| 239 |
+
Figure 6: Reconstructions for the post-nonlinear mixture and MLP mixture of the synthetic sources.
|
| 240 |
+
|
| 241 |
+

|
| 242 |
+
Figure 7: Sources and reconstructions for the post-nonlinear mixture of audio signals.
|
md/train/vKxFYApxBjr/vKxFYApxBjr.md
ADDED
|
@@ -0,0 +1,270 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Exploiting Domain-Specific Features to Enhance Domain Generalization
|
| 2 |
+
|
| 3 |
+
Manh-Ha Bui1 Toan Tran1 Anh Tuan Tran1 Dinh Phung1,2 1 VinAI Research, Vietnam 2 Monash University, Australia {v.habm1, v.toantm3, v.anhtt152, v.dinhpq2}@vinai.io ∗
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
Domain Generalization (DG) aims to train a model, from multiple observed source domains, in order to perform well on unseen target domains. To obtain the generalization capability, prior DG approaches have focused on extracting domaininvariant information across sources to generalize on target domains, while useful domain-specific information which strongly correlates with labels in individual domains and the generalization to target domains is usually ignored. In this paper, we propose meta-Domain Specific-Domain Invariant (mDSDI) - a novel theoretically sound framework that extends beyond the invariance view to further capture the usefulness of domain-specific information. Our key insight is to disentangle features in the latent space while jointly learning both domain-invariant and domainspecific features in a unified framework. The domain-specific representation is optimized through the meta-learning framework to adapt from source domains, targeting a robust generalization on unseen domains. We empirically show that mDSDI provides competitive results with state-of-the-art techniques in DG. A further ablation study with our generated dataset, Background-Colored-MNIST, confirms the hypothesis that domain-specific is essential, leading to better results when compared with only using domain-invariant.
|
| 8 |
+
|
| 9 |
+
# 1 Introduction and Related work
|
| 10 |
+
|
| 11 |
+
Domain Generalization (DG) has recently become an important research topic in machine learning due to its real-world applicability and its close connection to the way humans generalize to learn in a new domain. In a DG framework, the learner is trained on multiple datasets collected under different environments without any access to any data on the target domain (1). One of the most notable approaches to this problem is to learn the “domain-invariant” features across these training datasets, with the assumption that these invariant representations are also held in unseen target domains (2; 3; 4; 5; 6). While this has been shown to work well in practice, its key drawback is completely ignoring “domain-specific” information that could aid the generalization performance, especially when the number of source domains increases (7).
|
| 12 |
+
|
| 13 |
+
For instance, consider the problem of classifying dog or fish images from two source domains: sketch and photo. While the sketch contains a conceptual drawing of the animal, the photo includes their taken picture within a background. In this case, sketch domain-invariant is kept across domains, while domain-specific, e.g., a dog in a house or fish in the ocean, will be discarded due to only existing in the photo domain. However, this background information, when present, could lead to an improvement of the classification performance in target domains due to common association between the objects of its background, and when negligent sketches are hard to distinguish. From a theoretical standpoint, there has also been strong recent evidence to indicate the insufficiency of learning domaininvariant representation for successful adaptation in domain adaptation problems (8; 9). For example,
|
| 14 |
+
|
| 15 |
+
Zhao et al. (8) has pointed out the degradation in target predictive performance if domain-invariant representations are forced while the marginal label distributions on the source and target domains are overly different.
|
| 16 |
+
|
| 17 |
+
Utilizing domain-specific features in DG has been widely studied in recent works (e.g., (10; 7)). Ding and Fu (10) introduce multiple domain-specific networks for each domain, then use the structured low-rank constraints to align them with domain-invariant. While this encourages the better transfer of knowledge, its main problem is the requirement of too many domain-specific networks. More recently, Chattopadhyay et al. (7) proposed a masking strategy to disentangle domain-invariant and domain-specific to further boost domain-specific learning, but its key drawback is that domaininvariant/domain-specific representations might not be disentangled since the learning and inferring procedures are performed implicitly (i.e., without any theoretical guarantee) through a mask generalization process. That means it lacks a clear motivation as well as theoretical justifications.
|
| 18 |
+
|
| 19 |
+
Regarding meta-learning related work, a typical approach involving meta-learning in DG is MLDG (11) that is based on gradient update which simulates train/test domain shift within each mini-batch, mainly to learn transferable weight representations from meta-source domains to quickly adapt to the meta-target domain, and so improve generalization ability. However, their task objective adapts for all representation features which include domain-invariant, since low effectiveness because domain-invariant is stable across domains, pushing to adapt those features might affect the stability of those domain-invariant, leading to a lower generalization performance on the target domain.
|
| 20 |
+
|
| 21 |
+
To handle these domain-invariant shortcomings, in this paper, we propose a novel theoretically sound DG approach that aims to extract label-informative domain-specific and then explicitly disentangles the domain-invariant and domain-specific representations in an efficient way without training multiple networks for domain-specific. Following the meta-learning idea and mitigating previous work’s drawbacks, we apply a meta-learning technique specifically to exploit domain-specific quality which should need to be adapted to unseen domains from source domains. Our contributions in this work are summarized as follows:
|
| 22 |
+
|
| 23 |
+
• We provide a theoretical analysis based on the information bottleneck principle to point out the limitation of only learning invariant and the importance of domain-specific representation by a certainly plausible assumption.
|
| 24 |
+
• We then develop a rigorous framework to formulate elements of domain-invariant/domainspecific representations, in which our key insight is to introduce an effective metaoptimization training framework (11) to learn domain-specific representation from multiple training domains. Without accessing any data from unseen target domains, the meta-training procedure provides a suitable mechanism to self-learn domain-specific representation. We term our approach meta-Domain Specific-Domain Invariant (mDSDI) and provide necessary theoretical verifications for it.
|
| 25 |
+
• To demonstrate the merit of the proposed mDSDI framework, we extensively evaluate mDSDI on several state-of-the-art DG benchmark datasets, including Colored-MNIST, Rotated-MNIST, VLCS, PACS, Office-Home, Terra Incognita, DomainNet in addition to our newly created Background-Colored-MNIST for the ablation study to examine the behavior of our mDSDI.
|
| 26 |
+
|
| 27 |
+
# 2 Methodology
|
| 28 |
+
|
| 29 |
+
# 2.1 Problem setting and Definitions
|
| 30 |
+
|
| 31 |
+
Let $\boldsymbol { \mathcal { X } } \subset \mathbb { R } ^ { D }$ be the sample space and $\mathcal { V } \subset \mathbb { R }$ the label space. Denote the set of joint probability distributions on $\mathcal { X } \times \mathcal { V }$ by $\mathcal { P } _ { \mathcal { X } \times \mathcal { Y } }$ , and the set of probability marginal distributions on $\mathcal { X }$ by $\mathcal { P } _ { \mathcal { X } }$ . A domain is defined by a joint distribution $P ( x , y ) \in \mathcal P _ { \mathcal { X } \times \mathcal { Y } }$ , and let $\mathcal { P }$ be a measure on $\mathcal { P } _ { \mathcal { X } \times \mathcal { Y } }$ , i.e., whose realizations are distributions on $\mathcal { X } \times \mathcal { V }$ .
|
| 32 |
+
|
| 33 |
+
Denote $N$ source domains by $S ^ { ( i ) } = \{ ( x _ { j } ^ { ( i ) } , y _ { j } ^ { ( i ) } ) \} _ { j = 1 } ^ { n _ { i } }$ , $i = 1 , \ldots , N$ , where $n _ { i }$ is the number of data points in $S ^ { ( i ) }$ , i.e., $( x _ { j } ^ { ( i ) } , y _ { j } ^ { ( i ) } ) \stackrel { i i d } { \sim } P ^ { ( i ) } ( x , y )$ where $P ^ { ( i ) } ( x , y ) \sim \mathcal { P }$ ; and $x _ { j } ^ { ( i ) } \sim P _ { \mathcal { X } } ^ { ( i ) }$ , in which $P _ { \mathcal { X } } ^ { ( i ) } \sim P _ { \mathcal { X } }$ . In a typical DG framework, a learning model which is only trained on the set of source domains $\{ S ^ { ( i ) } \} _ { i = 1 } ^ { N }$ without any access to the (unlabeled) data points in the target domain, arrives at a good generalization performance on the test dataset $S ^ { T } = \{ ( x _ { j } ^ { T } , y _ { j } ^ { T } ) \} _ { j = 1 } ^ { n _ { T } }$ , where $( x _ { j } ^ { T } , y _ { j } ^ { T } ) \overset { i i d } { \sim } P ^ { T } ( x , y )$ and $P ^ { T } ( x , y ) \sim \mathcal { P }$ .
|
| 34 |
+
|
| 35 |
+
First, we present the definition of domain-invariant representation in a latent space $\mathcal { Z }$ under covariate shift assumption (i.e., the conditional distribution $P ( \boldsymbol { y } | \boldsymbol { x } )$ is unchanged across the source domains):
|
| 36 |
+
|
| 37 |
+
Definition 1. A feature extraction mapping $Q : \mathcal { X } \mathcal { Z }$ is said to be domain-invariant if the distribution $P _ { Q } ( Q ( X ) )$ is unchanged across the source domains, i.e., $\forall i , j = 1 , \ldots , N , i \neq j w e$ have $P _ { Q } ^ { ( i ) } ( Q ( X ) ) \equiv P _ { Q } ^ { ( j ) } ( Q ( X ) )$ , where $P _ { Q } ^ { ( i ) } ( Q ( X ) ) = P _ { Q } ( Q ( X ) | X \sim P _ { \ X } ^ { ( i ) } )$ , $i = 1 , \ldots , N .$ . In this case, the corresponding latent representation $Z _ { I } = Q ( X )$ is then called the domain-invariant representation (see (3) also).
|
| 38 |
+
|
| 39 |
+
As mentioned in the example in the introduction part, the definition 1 reveals that the extracted domain-invariant latent $Z _ { I }$ could be the conceptual drawing of the animal which is shared in both sketch and photo domains. However, when existing background information is taken by a picture such as a house or ocean, it is crucial to take these backgrounds into account because the domain-invariant feature extraction $Q$ might ignore them by only existing in the photo domain. Therefore, we next introduce the definition of domain-specific in latent space as follows:
|
| 40 |
+
|
| 41 |
+
Definition 2. A feature extraction mapping $R : \mathcal { X } \mathcal { Z }$ is said to be domain-specific $i f \ \forall i , j =$ $1 , \dots , N , \ i \ \neq \ j$ such that $P _ { R } ^ { ( i ) } ( R ( X ) ) \neq P _ { R } ^ { ( j ) } ( R ( X ) )$ , where $P _ { R } ^ { ( i ) } ( R ( X ) ) = P _ { R } ( R ( X ) | X \sim$ $P _ { \mathcal { X } } ^ { ( i ) } )$ ), $i = 1 , \ldots , N$ . In this case, given $X \sim P _ { \mathcal { X } } ^ { ( i ) }$ the corresponding latent representation $Z _ { S } ^ { ( i ) } = $ $R ( X )$ is then called the domain-specific representation w.r.t. the domain .
|
| 42 |
+
|
| 43 |
+
Definition 2 states that for any domain $i$ and $j$ , the distributions of the domain-specific latent $P _ { R } ^ { ( i ) } ( R ( X ) )$ and ven t $P _ { R } ^ { ( j ) } ( R ( X ) )$ must bes from comand letely different. For instance, following our menthat are sketch and photo domain, the mapping $i$ $j$ $R ( X )$ should extract specific information that only belongs to the domain including the shadow of the fish drawing in the sketch and ocean background information in the photo domain.
|
| 44 |
+
|
| 45 |
+
To this end, this paper aims to show that only learning domain-invariant will limit the prediction performance and generalization ability. Hence, we next provide a formal explanation for the motivation of learning domain-specific, by showing the potential drawback of only learning domain-invariance in terms of predicting class labels.
|
| 46 |
+
|
| 47 |
+

|
| 48 |
+
2.2 A theoretical analysis under the Information bottleneck method
|
| 49 |
+
Figure 1: Venn diagram showing relationships between source domains represented by $X ^ { 1 }$ , $X ^ { 2 }$ , target domain represented by $X ^ { T }$ , and label $Y$ . (a) The learning procedure of minimal and sufficient label-related representation in definition 3. (b) Explaining the theorem 1 where the domain-invariant based method provides an inferior prediction performance to our proposed method that incorporates both domain-invariant $I ( Z _ { I ^ { * } } ; Y )$ and labelrelated domain-specific values $\epsilon$ made by our assumption 1. (c) A case when the unseen (target) domain has different $X ^ { T }$ and $Y ^ { T }$ , while domain-invariant information is still stable across domains, some domain-specific in source domains become redundant information.
|
| 50 |
+
|
| 51 |
+
Notations. Given three arbitrary random variables $A , B$ , and $C$ , let us use $I ( A ; B )$ to represent mutual information between $A$ and $B$ ; $I ( A ; B | C )$ to represent conditional mutual information of $A$ and $B$ given $C$ ; $H ( A )$ to represent entropy of $A$ ; and $H ( A | B )$ to represent conditional entropy for random variables $A$ given $B$ . For simplicity, we consider the case with two source domains $S ^ { 1 } , S ^ { 2 }$ (the results with multiple source domains can be naturally extended from there). We also define two corresponding random variables $X ^ { i } \sim P _ { \mathcal { X } } ^ { ( i ) }$ , that are sampled from the marginal distribution $P _ { \mathcal { X } }$ in the domain $S ^ { i } , i = 1 , 2$ .
|
| 52 |
+
|
| 53 |
+
Figure 1 illustrates all the definitions and assumptions above used for our theoretical verification (in Theorem 1). In particular, in that figure, each of the four colored rectangles represents an individual entropy: $H ( X ^ { 1 } )$ for domain $S ^ { 1 }$ is in blue, $H ( X ^ { 2 } )$ for domain $S ^ { 2 }$ is in red, $\overset { \vartriangle } { \boldsymbol { H } } ( X ^ { T } )$ for the target domain is in black, and $H ( Y )$ for the class label is in green border rectangle.
|
| 54 |
+
|
| 55 |
+
We first show the ineffectiveness of only learning domain-invariant information when compared with incorporating domain-specific in source domain $S ^ { 1 }$ (and similarly with domain $S ^ { 2 }$ ). Our justification partly relies on the following assumption about the correlation between the domainspecific representation and the class label:
|
| 56 |
+
|
| 57 |
+
Assumption 1. (Label-correlated domain-specificity) Assuming that there exists a domain-specific representation $Z _ { S } ^ { ( 1 ) }$ extracted by the deterministic mapping $Z _ { S } ^ { ( 1 ) } = R ( X ^ { 1 } )$ in definition 2, which correlates with label in domain $S ^ { 1 }$ such that $I ( Z _ { S } ^ { ( 1 ) } ; Y | X ^ { 2 } ) = I ( X ^ { 1 } ; Y | X ^ { 2 } ) = \varepsilon _ { 1 }$ , where $\varepsilon _ { 1 } > 0$ is a constant.
|
| 58 |
+
|
| 59 |
+
Assumption 1 indicates that, for the source domain $S ^ { 1 }$ , we can learn $Z _ { S } ^ { ( 1 ) } = R ( X ^ { 1 } )$ such that $I ( Z _ { S } ^ { ( 1 ) } ; Y | X ^ { 2 } )$ is strictly positive and equals to $I ( X ^ { 1 } ; Y | X ^ { 2 } )$ , where $I ( X ^ { 1 } ; Y | X ^ { 2 } )$ is the specific information that correlates with the label in the domain $S ^ { 1 }$ , but not in the domain $S ^ { 2 }$ (12). For instance, in the example mentioned in the introduction, if domain $S ^ { 1 }$ is “photo” while $S ^ { 2 }$ is “sketch”, the value of $\epsilon _ { 1 }$ should be positive because the background information such as a house, the ocean also provides information to predict whether the object is a dog or fish without considering its conceptual drawing. This assumption is particularly valid and practically plausible and is demonstrated by several examples observed in our experiments. For instance, for the DomainNet benchmark dataset, in the real-world domain, many bed pictures contain a bed in the room or bike pictures that have bicycles parked on the street. Other examples are in PACS such as dogs in the yard or guitars lying on a table in photo and art domains. These examples are strongly related to assumption 1, in which specific information correlates with labels in a particular domain.
|
| 60 |
+
|
| 61 |
+
We next present supervised learning frameworks under the umbrella of the information theory (13; 14) and the information bottleneck method (13; 15) that generalizes minimal sufficient statistics to the minimal (i.e., less complexity) and sufficient (i.e, better fidelity) representations. The learning process of such representations is equivalent to solving the following objectives:
|
| 62 |
+
|
| 63 |
+
Definition 3. (Minimal and sufficient representations with label $( l 4 ) ,$ ). Let $Z _ { X ^ { 1 } } = G ( X ^ { 1 } )$ is the output of a deterministic latent mapping $G$ . A representation $Z _ { s u p }$ is said to be the sufficient label-related representation and $Z _ { \mathrm { s u p } ^ { * } }$ is said to be the minimal and sufficient representation $i f$ :
|
| 64 |
+
|
| 65 |
+
$$
|
| 66 |
+
Z _ { s u p } = \mathop { \mathrm { a r g m a x } } _ { G } I ( Z _ { X ^ { 1 } } ; Y ) ~ a n d ~ Z _ { \mathrm { s u p } ^ { * } } = \mathop { \mathrm { a r g m i n } } _ { Z _ { \mathrm { s u p } } } I ( Z _ { \mathrm { s u p } } ; X ^ { 1 } ) ~ s . t . ~ I ( Z _ { \mathrm { s u p } } ; Y )
|
| 67 |
+
$$
|
| 68 |
+
|
| 69 |
+
The learning procedure for definition 3 is illustrated in Figure 1: (a). The method is equivalent to employ compressed representations to reduce the complexity (redundant information) of ${ \bar { I } } ( Z _ { X ^ { 1 } } ; X ^ { 1 } )$ by minimizing and providing sufficient representation to class label $Y$ by maximizing $I ( Z _ { X ^ { 1 } } ; Y )$ . Similarly and motivated by multi-view information bottleneck settings (16), we present the objective of learning sufficient (and minimal) representations with domain-invariant information in the below definition:
|
| 70 |
+
|
| 71 |
+
Definition 4. (Minimal and sufficient representations with domain-invariance $( I 6 )$ ). Let $Z _ { X ^ { 1 } } =$ $Q ( X ^ { 1 } )$ is the output of a deterministic domain invariant mapping $Q$ in the definition $^ { l }$ . Then $Z _ { I }$ is said to be the sufficient domain-invariant representation and $Z _ { I ^ { * } }$ is said to be the minimal and sufficient representation $i f$ :
|
| 72 |
+
|
| 73 |
+
$$
|
| 74 |
+
Z _ { I } = \underset { Q } { \operatorname { a r g m a x } } I ( Z _ { X ^ { 1 } } ; X ^ { 2 } ) \mathrm { ~ } a n d ~ Z _ { I ^ { * } } = \underset { Z _ { I } } { \operatorname { a r g m i n } } I ( Z _ { I } ; X ^ { 1 } ) \mathrm { ~ } s . t . \mathrm { ~ } I ( Z _ { I } ; X ^ { 2 } ) \mathrm { ~ } i s \mathrm { ~ } m a ^ { \dag }
|
| 75 |
+
$$
|
| 76 |
+
|
| 77 |
+
Definition 4 introduces a learning strategy for domain-invariance across domains (or views) that preserves shared information across two domains by maximizing $I ( Z _ { X ^ { 1 } } ; X ^ { 2 } )$ ; and also reduces specificity (redundant information) of the domain $S ^ { 1 }$ by minimizing $I ( Z _ { X ^ { 1 } } ; X ^ { 1 } )$ . We next present a lemma about the conditional independence between the latent representation $Z _ { X ^ { 1 } }$ and both the label $Y$ and the random variable $X ^ { 2 }$ when $Q , R ,$ , and $G$ are deterministic functions of the random variable $X ^ { 1 }$ :
|
| 78 |
+
|
| 79 |
+
Lemma 1. (Determinism $( l 4 ) ,$ ) If $P ( Z _ { X ^ { 1 } } | X ^ { 1 } )$ is a Dirac delta function, then the following conditional independence holds: $Y$ ⊥⊥ $Z _ { X ^ { 1 } } | X ^ { 1 }$ and $X ^ { 2 }$ ⊥⊥ $Z _ { X ^ { 1 } } | X ^ { 1 }$ , inducing a Markov chain $X ^ { 2 } Y \mathbf { \bar { } } X ^ { 1 } Z _ { X ^ { 1 } }$ .
|
| 80 |
+
|
| 81 |
+
The proof of Lemma 1 is provided in Appendix A.1.
|
| 82 |
+
|
| 83 |
+
Lemma 1 simply states that $Z _ { X ^ { 1 } }$ contains no more information than $X ^ { 1 }$ . Now, we show the ineffectiveness of only learning domain-invariant approach, based on the existence of the label-related domain-specific in the following theorem:
|
| 84 |
+
|
| 85 |
+
Theorem 1. (Label-related information with domain-specificity) Assuming that there exists a domainspecific value $\varepsilon _ { 1 } > 0$ in domain $S ^ { 1 }$ (see Assumption $I$ ), the label-related representation - based learning approach (i.e., using $Z _ { s u p }$ and $Z _ { s u p ^ { * } }$ ) provides better prediction performance than the domain-invariant representation - based method (i.e., using $Z _ { I }$ and $Z _ { I ^ { * } }$ ). Formally,
|
| 86 |
+
|
| 87 |
+
$$
|
| 88 |
+
I ( X ^ { 1 } ; Y ) = I ( Z _ { s u p } ; Y ) = I ( Z _ { s u p ^ { * } } ; Y ) = I ( Z _ { I ^ { * } } ; Y ) + \varepsilon _ { 1 } > I ( Z _ { I ^ { * } } ; Y ) .
|
| 89 |
+
$$
|
| 90 |
+
|
| 91 |
+
The proof of Theorem 1 is mainly based on the result of Lemma 1, and is provided in Appendix A.2.
|
| 92 |
+
|
| 93 |
+
The visualization of Theorem 1 is depicted by Figure 1: (b), where the domain-specific value for domain $S ^ { 2 }$ , $\varepsilon _ { 2 }$ is obtained in the same way as $\varepsilon _ { 1 }$ . It indicates that if an existing domain-specific representation has the positive corresponding information value $\varepsilon$ , the domain-invariance-based learning method provides an inferior prediction performance to our proposed method that incorporates both domain-invariant and label-related domain-specific.
|
| 94 |
+
|
| 95 |
+
Now, Theorem 1 suggests that besides optimizing a domain-invariant mapping $Q$ as usual, we should jointly optimize domain-specific mapping $R$ to achieve a better generalization performance. However, in domain generalization, we are not allowed to access the target domain for training and must use $Q$ and $R$ from source domains. As pointed out in (10; 17; 7), although domain-invariant might be the same because it is unchanged across source domains, there is no guarantee whether this domain-specific information on the source domain is relevant to the target domain while making the prediction. Figure 1: (c) illustrates this case when the target domain has different $X ^ { T }$ and $Y ^ { T }$ , then some extracted domain-specific from source domains become redundant information. Therefore, the next raising question is how to learn domain-invariant and domain-specific effectively.
|
| 96 |
+
|
| 97 |
+
To handle these shortcomings, we next propose a unified framework that jointly optimizes both $Q$ and $R$ by disentangling their feature representation. In particular, the deterministic mapping $Q$ is optimized by adversarial learning to extract useful domain-invariant features across domains. Meanwhile, by leveraging the transfer weight representations from meta-source domains to adapt to a meta-target domain, we apply meta-learning to deterministic mapping $R$ to force it to extract relevant domain-specific features of the target domain to improve generalization ability.
|
| 98 |
+
|
| 99 |
+
# 2.3 Algorithm: meta-Domain Specific-Domain Invariant (mDSDI)
|
| 100 |
+
|
| 101 |
+
So far, we have discussed the main ideas of our proposed method. Here we discuss implementation details for our proposed mDSDI approach.
|
| 102 |
+
|
| 103 |
+
Figure 2 shows the graphical model and overview of our mDSDI framework. In particular, our unified network consists of the following components: a domain-invariant representation $Z _ { I } = Q _ { \theta _ { Q } } ( X )$ ; a domain-specific representation $Z _ { S } = R _ { \theta _ { R } } ( X )$ ; a domain discriminator $D _ { \theta _ { D _ { I } } } : Z _ { I } \to \overline { { { 1 , N } } }$ ; a domain classifier $D _ { \theta _ { D _ { S } } } : Z _ { S } \overline { { { 1 , N } } }$ and a classifier $F _ { \theta _ { F } } : Z _ { I } \oplus Z _ { S } \to \mathcal { V } .$ . We also denote domain random variable by $D$ , sample space by $\mathcal { D }$ , and outcome by $d$ .
|
| 104 |
+
|
| 105 |
+
Domain-Invariant and Domain-Specific Extraction. The domain-invariant representation $Z _ { I }$ defined in Definition 1, is obtained by using an adversarial training framework (3), in which the domain discriminator $D _ { \theta _ { D _ { I } } }$ tries to maximize the prediction probability of the domain label from the latent $Z _ { I }$ I, while the goal of the encoder $Q _ { \theta _ { Q } }$ is to map the sample $X$ to the latent $Z _ { I }$ , such that $D _ { \theta _ { D _ { I } } }$ cannot discriminate the domain of $X$ . This task can be performed by solving the following min-max game:
|
| 106 |
+
|
| 107 |
+
$$
|
| 108 |
+
\operatorname* { m i n } _ { \theta _ { Q } } \operatorname* { m a x } _ { \theta _ { D _ { I } } } \left\{ L _ { Z _ { I } } : = - \mathbb { E } _ { x , d \sim X , D } \left[ d \log D _ { I } ( Q ( x ) ) \right] \right\} .
|
| 109 |
+
$$
|
| 110 |
+
|
| 111 |
+
To extract the domain-specific $Z _ { S }$ defined in Definition 2, we propose the use of the domain classifier $D _ { \theta _ { D _ { S } } }$ , that is trained to predict the domain label from $Z _ { S }$ . The corresponding parameters $\theta _ { D _ { S } }$ and
|
| 112 |
+
|
| 113 |
+

|
| 114 |
+
Figure 2: The graphical model (a) and overall architecture (b) for our proposed mDSDI, including: domaininvariant $Z _ { I }$ is optimized via adversarial training with domain discriminator $D _ { I }$ , domain-specific $Z _ { S }$ is optimized via domain classifier $D _ { S }$ , these latent $Z _ { I }$ and $\bar { Z } _ { S }$ are disentangled by using covariance matrix. To push them to contain label information, these latents are integrated into a classifier $F$ which is optimized via cross-entropy with the label $Y$ . To make the model able to adapt specific information from source to unseen domain while still remaining domain-invariance information across domains, we additionally push $Z _ { S }$ through a meta-learning procedure.
|
| 115 |
+
|
| 116 |
+
$\theta _ { R }$ are, therefore, optimized with the objective function below:
|
| 117 |
+
|
| 118 |
+
$$
|
| 119 |
+
\operatorname* { m i n } _ { \theta _ { D _ { S } } , \theta _ { R } } \left\{ L _ { Z _ { S } } : = - \mathbb { E } _ { x , d \sim X , D } \left[ d \log D _ { S } ( R ( x ) ) \right] \right\} .
|
| 120 |
+
$$
|
| 121 |
+
|
| 122 |
+
Disentanglement between Domain-Invariant and Domain-Specific. The disentanglement condition between two random vectors $Z _ { I }$ and $Z _ { S }$ can be solved by forcing their covariance matrix, denoted by $\mathrm { C o v } ( Z _ { I } , Z _ { S } )$ close to 0. A detailed discussion of disentangled two representations is provided in Appendix B.3. The related parameters $( \theta _ { Q } , \theta _ { R } )$ are then updated in the following optimization problem:
|
| 123 |
+
|
| 124 |
+
$$
|
| 125 |
+
\operatorname* { m i n } _ { \theta _ { Q } , \theta _ { R } } \left\{ L _ { D } : = \mathbb { E } _ { x \sim X } \left[ \| \mathrm { C o v } ( Q ( x ) , R ( x ) ) \| _ { 2 } \right] \right\} ,
|
| 126 |
+
$$
|
| 127 |
+
|
| 128 |
+
where $\| \cdot \| _ { 2 }$ is the $L _ { 2 }$ norm.
|
| 129 |
+
|
| 130 |
+
Sufficiency of domain-specific and domain-invariant w.r.t. the classification task. The goal of the classifier $F$ parameterized by $\theta _ { F }$ is to predict the label of the original sample $X$ based on the domain-invariant $Z _ { I }$ and domain-specific $Z _ { S }$ , i.e.,
|
| 131 |
+
|
| 132 |
+
$$
|
| 133 |
+
\hat { Y } = F _ { \theta _ { F } } ( Z _ { I } \oplus Z _ { S } ) ,
|
| 134 |
+
$$
|
| 135 |
+
|
| 136 |
+
where $\oplus$ denotes the concatenation operation. Then, the training process of $F$ is then performed by solving
|
| 137 |
+
|
| 138 |
+
$$
|
| 139 |
+
\operatorname* { m i n } _ { \theta _ { Q } , \theta _ { R } , \theta _ { F } } \left\{ L _ { T } : = - \mathbb { E } _ { x , y \sim X , Y } \left[ y \log F ( Q ( x ) , R ( x ) ) \right] \right\} .
|
| 140 |
+
$$
|
| 141 |
+
|
| 142 |
+
Meta-Training for Domain-Specific Information. To encourage the domain-specific representation $Z _ { S }$ to adapt information learned from the source domains to the unseen target domain, we introduce the use of meta-learning framework (11), targeting a robust generalization. Note that the domaininvariant feature $Z _ { I }$ remains during the meta-learning procedure. In particular, each source domain $S _ { m } , \ m \in \overline { { 1 , N } }$ is split into two sub-domains, namely meta-train $S _ { m r }$ and meta-test $S _ { m e }$ . The domain-specific parameters $\theta _ { R }$ and the classifier parameters $\theta _ { F }$ are then jointly optimized as follows:
|
| 143 |
+
|
| 144 |
+
$$
|
| 145 |
+
\operatorname* { m i n } _ { w } \left\{ L _ { T _ { m } } : = f \left( w - \nabla f \left( w , S _ { m r } \right) , S _ { m e } \right) \right\} ,
|
| 146 |
+
$$
|
| 147 |
+
|
| 148 |
+
where $w = ( \theta _ { R } , \theta _ { F } )$ and
|
| 149 |
+
|
| 150 |
+
$$
|
| 151 |
+
f \left( \boldsymbol { w } , \boldsymbol { S _ { m } } \right) = - \mathbb { E } _ { \boldsymbol { x } , \boldsymbol { y } \sim \boldsymbol { X } , \boldsymbol { Y } } \left[ \boldsymbol { y } \log \boldsymbol { F } ( \boldsymbol { Z } _ { I } , \boldsymbol { R } ( \boldsymbol { x } ) ) \right] .
|
| 152 |
+
$$
|
| 153 |
+
|
| 154 |
+
Training and Inference. The pseudo-code for training and inference processes of our proposed mDSDI framework is presented in Algorithm 1. Each iteration of the training process consists of two steps:
|
| 155 |
+
|
| 156 |
+
i) First, we integrate the objective functions (1), (2), (3) and (5) to construct an objective function $L _ { A }$ defined as follows:
|
| 157 |
+
|
| 158 |
+
$$
|
| 159 |
+
\operatorname* { m i n } _ { \theta _ { Q } , \theta _ { D _ { S } } , \theta _ { R } , \theta _ { F } } \operatorname* { m a x } _ { \theta _ { D _ { I } } } \left\{ L _ { A } : = \lambda _ { Z _ { I } } L _ { Z _ { I } } + \lambda _ { Z _ { S } } L _ { Z _ { S } } + \lambda _ { D } L _ { D } + L _ { T } \right\} ,
|
| 160 |
+
$$
|
| 161 |
+
|
| 162 |
+
where $\lambda _ { Z _ { I } } , \lambda _ { Z _ { S } }$ and $\lambda _ { D }$ are selected as the balanced parameters.
|
| 163 |
+
|
| 164 |
+
ii) The second step is to employ meta-training to adapt task-related domain-specific from source domains to unseen domains. In each mini-batch, the meta-train and meta-test are split, then the gradient transformation step from meta-train domains to the meta-test domain is performed by solving the optimization problem (6).
|
| 165 |
+
|
| 166 |
+
Algorithm 1: Training and Inference processes of mDSDI
|
| 167 |
+
|
| 168 |
+
Training Input: Source domain $S ^ { ( i ) }$ , encoder $Q _ { \theta _ { Q } }$ , $R _ { \theta _ { R } }$ , domain classifier $D _ { \theta _ { D _ { I } } }$ , $D _ { \theta _ { D _ { S } } }$ for $Z _ { I }$ ,
|
| 169 |
+
$Z _ { S }$ , task classifier $F _ { \theta _ { F } }$ , batch size $B$ , learning rate $\eta$ . Output: The optimal: $Q _ { \theta _ { Q } } ^ { * } , R _ { \theta _ { R } } ^ { * } , F _ { \theta _ { F } } ^ { * } ;$
|
| 170 |
+
for $i t e = 1 $ iterations do Sample $S _ { B }$ with a mini-batch $B$ for each domain $S ^ { ( i ) }$ ; Compute $L _ { A }$ using Eq. (8) and perform gradient update $\nabla _ { \theta _ { Q } , \theta _ { R } , \theta _ { D _ { I } } , \theta _ { D _ { S } } , \theta _ { F } } L _ { A }$ with $\eta$ .; for $j = 1 N$ (number of source domains) do Split Meta-train $S _ { B / j }$ , Meta-test $S _ { j }$ ; Meta-train: Perform gradient update $\nabla _ { { \boldsymbol { \theta } } _ { R } , { \boldsymbol { \theta } } _ { F } }$ by minimizing Eq. (7) with $S _ { B / j }$ and $\eta$ ; Meta-test: Compute $L _ { T _ { m } }$ using Eq. (6) with $S _ { j }$ and updated gradient from Meta-train; Meta-optimization: Perform gradient update $\dot { \nabla } _ { \theta _ { R } , \theta _ { F } } L _ { T _ { m } }$ with $\eta$ ; end
|
| 171 |
+
end
|
| 172 |
+
Inference Input: Target domain $S ^ { T }$ , optimal: $Q _ { \theta _ { Q } } ^ { * }$ , $R _ { \theta _ { R } } ^ { * }$ , $F _ { \theta _ { F } } ^ { * }$ . Output: $Y ^ { T }$ using Eq. (4);
|
| 173 |
+
|
| 174 |
+
# 3 Experiments
|
| 175 |
+
|
| 176 |
+
# 3.1 Experimental settings
|
| 177 |
+
|
| 178 |
+
Dataset. To evaluate the effectiveness of the proposed method, we utilize 7 commonly used datasets including: Colored-MNIST (18): includes 70000 samples of dimension (2, 28, 28) in binary classification problem with noisy label, from MNIST over 3 domains with noisy rate $d \in \{ 0 . 1 , 0 . 3$ , $0 . 9 \}$ , Rotated-MNIST (19): contains 70000 samples of dimension $( 1 , 2 8 , 2 8 )$ and 10 classes, rotated from MNIST over 6 domains $d \in \{ 0 , 1 5 , 3 0 , 4 5 , 6 0 , 7 5 \}$ , VLCS (20): includes 10729 samples of dimension $( 3 , 2 2 4 , 2 2 4 )$ and 5 classes, over 4 photographic domains $d \in \{ \mathrm { C a l t e c h } 1 0 1$ , LabelMe, SUN09, $\mathrm { V O C } 2 0 0 7 \}$ , PACS (2): contains 9991 images of dimension (3, 224, 224) and 7 classes, over 4 domains $d \in \{$ artpaint, cartoon, sketches, photo $\}$ , Office-Home (21): has 15500 daily images of dimension $( 3 , 2 2 4 , 2 2 4 )$ and 65 categories, over 4 domains $d \in \{ \mathrm { a r t } .$ , clipart, product, real $\}$ , Terra Incognita (22): includes 24778 wild photographs of dimension $( 3 , 2 2 4 , 2 2 4 )$ and 10 animals, over 4 camera-trap domains $d \in \{ \mathrm { L 1 0 0 , L 3 8 , L 4 3 , L 4 6 } \}$ , and DomainNet (23): contains 586575 images of dimension (3, 224, 224) and 345 classes, over 6 domains $d \in \{$ clipart, infograph, painting, quickdraw, real, sketch $\}$ . The detail of each dataset is provided in Appendix C.1.
|
| 179 |
+
|
| 180 |
+
Baseline. Following DomainBed (24) settings, we compare our model with 14 related methods in DG which are divided by 5 common techniques, including: Standard Empirical Risk Minimization: Empirical Risk Minimization (ERM (25)); domain-specific-learning: Group Distributionally Robust Optimization (GroupDRO (26)), Marginal Transfer Learning (MTL (1; 27)), Adaptive Risk Minimization (ARM (28)); Meta-learning: Meta-Learning for DG (MLDG (11)); domain-invariantlearning: Invariant Risk Minimization (IRM (18)), Deep CORrelation ALignment (CORAL (29)), Maximum Mean Discrepancy (MMD (30)), Domain Adversarial Neural Networks (DANN (31)), Class-conditional DANN (CDANN (32)), Risk Extrapolation (VREx (33)); Augmenting data: Interdomain Mixup (Mixup (34; 35; 36)), Style-Agnostic Networks (SagNets (37)), Representation Self Challenging (RSC (38)). The detail of each method is provided in Appendix C.2.
|
| 181 |
+
|
| 182 |
+
We use the training-domain validation set technique as proposed in DomainBed (24) for model selection. In particular, for all datasets, we first merge the raw training and validation, then, we run the test three times with three different seeds. For each random seed, we randomly split training and validation and choose the model maximizing the accuracy on the validation set, then compute performance on the given test sets. The mean and standard deviation of classification accuracy from these three runs are reported. We evaluate generalization performance based on backbones MNIST-ConvNet (24) for MNIST datasets and ResNet-50 (39) for non-MNIST datasets to compare with the mentioned methods. Data-processing techniques, model architectures, hyper-parameters, and changes of objective functions during training are presented in detail in Appendix C.3 C.5. All source code to reproduce results are available at https://github.com/VinAIResearch/mDSDI.
|
| 183 |
+
|
| 184 |
+
# 3.2 Results
|
| 185 |
+
|
| 186 |
+
Table 1: Classification accuracy $( \% )$ for all algorithms and datasets summarization. Our mDSDI method achieves highest accuracy on average when comparing 14 popular DG algorithms across 7 benchmark datasets.
|
| 187 |
+
|
| 188 |
+
<table><tr><td>Method</td><td>CMNIST</td><td>RMNIST</td><td>VLCS</td><td>PACS</td><td>OfficeHome</td><td>TerraInc</td><td>DomainNet</td><td>Average</td></tr><tr><td>ERM (25)</td><td>51.5±0.1</td><td>98.0±0.0</td><td>77.5±0.4</td><td>85.5±0.2</td><td>66.5±0.3</td><td>46.1±1.8</td><td>40.9±0.1</td><td>66.6</td></tr><tr><td>IRM (18)</td><td>52.0±0.1</td><td>97.7±0.1</td><td>78.5±0.5</td><td>83.5±0.8</td><td>64.3±2.2</td><td>47.6±0.8</td><td>33.9±2.8</td><td>65.4</td></tr><tr><td>GroupDRO (26)</td><td>52.1±0.0</td><td>98.0±0.0</td><td>76.7±0.6</td><td>84.4±0.8</td><td>66.0±0.7</td><td>43.2±1.1</td><td>33.3±0.2</td><td>64.8</td></tr><tr><td>Mixup (34; 35;36)</td><td>52.1±0.2</td><td>98.0±0.1</td><td>77.4±0.6</td><td>84.6±0.6</td><td>68.1±0.3</td><td>47.9±0.8</td><td>39.2±0.1</td><td>66.7</td></tr><tr><td>MLDG (11)</td><td>51.5±0.1</td><td>97.9±0.0</td><td>77.2±0.4</td><td>84.9±1.0</td><td>66.8±0.6</td><td>47.7±0.9</td><td>41.2±0.1</td><td>66.7</td></tr><tr><td>CORAL (29)</td><td>51.5±0.1</td><td>98.0±0.1</td><td>78.8±0.6</td><td>86.2±0.3</td><td>68.7±0.3</td><td>47.6±1.0</td><td>41.5±0.1</td><td>67.5</td></tr><tr><td>MMD (30)</td><td>51.5±0.2</td><td>97.9±0.0</td><td>77.5±0.9</td><td>84.6±0.5</td><td>66.3±0.1</td><td>42.2±1.6</td><td>23.4±9.5</td><td>63.3</td></tr><tr><td>DANN (31)</td><td>51.5±0.3</td><td>97.8±0.1</td><td>78.6±0.4</td><td>83.6±0.4</td><td>65.9±0.6</td><td>46.7±0.5</td><td>38.3±0.1</td><td>66.1</td></tr><tr><td>CDANN (32)</td><td>51.7±0.1</td><td>97.9±0.1</td><td>77.5±0.1</td><td>82.6±0.9</td><td>65.8±1.3</td><td>45.8±1.6</td><td>38.3±0.3</td><td>65.6</td></tr><tr><td>MTL (1; 27)</td><td>51.4±0.1</td><td>97.9±0.0</td><td>77.2±0.4</td><td>84.6±0.5</td><td>66.4±0.5</td><td>45.6±1.2</td><td>40.6±0.1</td><td>66.2</td></tr><tr><td>SagNets (37)</td><td>51.7±0.0</td><td>98.0±0.0</td><td>77.8±0.5</td><td>86.3±0.2</td><td>68.1±0.1</td><td>48.6±1.0</td><td>40.3±0.1</td><td>67.2</td></tr><tr><td>ARM (28)</td><td>56.2±0.2</td><td>98.2±0.1</td><td>77.6±0.3</td><td>85.1±0.4</td><td>64.8±0.3</td><td>45.5±0.3</td><td>35.5±0.2</td><td>66.1</td></tr><tr><td>VREx (33)</td><td>51.8±0.1</td><td>97.9±0.1</td><td>78.3±0.2</td><td>84.9±0.6</td><td>66.4±0.6</td><td>46.4±0.6</td><td>33.6±2.9</td><td>65.6</td></tr><tr><td>RSC (38)</td><td>51.7±0.2</td><td>97.6±0.1</td><td>77.1±0.5</td><td>85.2±0.9</td><td>65.5±0.9</td><td>46.6±1.0</td><td>38.9±0.5</td><td>66.1</td></tr><tr><td>mDSDI(Ours)</td><td>52.2±0.2</td><td>98.0±0.1</td><td>79.0±0.3</td><td>86.2±0.2</td><td>69.2±0.4</td><td>48.1±1.4</td><td>42.8±0.1</td><td>67.9</td></tr></table>
|
| 189 |
+
|
| 190 |
+
Table 1 summarizes the results of our experiments on 7 benchmark datasets when compared with mentioned methods. The full result per dataset and domain is provided in Appendix C.4. From these results, we draw three conclusions about our mDSDI model:
|
| 191 |
+
|
| 192 |
+
Our mDSDI still preserves domain-invariant information. We observe in some target domains which have background-less images and assume only contain domain-invariant information such as Colored-MNIST, Rotated-MNIST, or Terra Incognita (similar observation in cartoon or sketch in PACS, clip-art or product in OfficeHome, and quickdraw in DomainNet. Full results in Appendix C.4), our mDSDI model still achieves competitive results with other baselines (e.g., $5 2 . 2 \%$ in ColoredMNIST, $9 8 . 0 \%$ in Rotated-MNIST, and $4 8 . 1 \%$ in Terra Incognita) which are based on domaininvariant-learning techniques such as DANN, C-DANN, CORAL, MMD, IRM, and VREx. Those results demonstrate the effectiveness of our adversarial training technique for extracting domaininvariant features. Furthermore, due to considering disentangled domain-invariant and domainspecific latent, even in situations where the samples do not have domain-specific, our model still performs well by retaining informative domain-invariance.
|
| 193 |
+
|
| 194 |
+
Our mDSDI could capture the usefulness of domain-specific information. In contrast, we observe that in some target domains that have relevant domain-specific with source domains such as landscape background of the object class from photographic pictures in VLCS (similar observation in PACS such as dogs in the yard or guitars lying on a table in photo and art domain, bed in the room or bike parked on the street in the Art and Real-world domain of OfficeHome. Full results in Appendix C.4), mDSDI achieves significantly higher results than other methods (e.g., $7 9 . 0 \%$ in VLCS, $8 6 . 2 \%$ in PACS). This means that our domain-invariant features not only support generalization better but also our domain-specific ones cover helpful information in special scenarios such as backgrounds and colors related to objects in the classification task. Moreover, when comparing with other domain-specific based techniques such as GroupDRO, MTL, and ARM, the results showed that domain-specific features learned by meta-training from our model are more helpful than theirs and have captured useful domain-specific features from those object-background relations.
|
| 195 |
+
|
| 196 |
+
Extending beyond the invariance view to usefulness domain-specific information is important. As shown in Table 1, our mDSDI has the highest average number with $6 7 . 9 \%$ (highlighted with statistically significant according to a $t$ -test at a significance level $\alpha = 0 . 0 5$ ). The reason why our model outperforms other baselines could be explained by the fact that their domain-invariant methods are not able to capture domain-specific information, and so have poor performance. Meanwhile, when comparing with other domain-specific based methods, their models only concentrate on domainspecific techniques, and so provide inferior domain-invariant information to our techniques in some background-less images. In contrast, due to considering disentangled domain-invariant and domainspecific features, and having the right strategy to learn each latent, our model captures both this useful information, hence, outperforms their results. Not only has the highest average number, but our method also dominates other methods on a known large-scale dataset such as $6 9 . 2 \%$ in Office-Home or $4 2 . 8 \%$ in DomainNet. This implies that besides the essential combination between domain-invariant and domain-specific, when the number of datasets increases, our method can extract more relevant information for complex tasks, such as classifying 345 classes in DomainNet. These results also mean that our model has a balance between informative domain-invariant and domainspecific features to adapt better to different environments than others, therefore showing the highest average in all settings.
|
| 197 |
+
|
| 198 |
+
# 3.3 How does mDSDI work?
|
| 199 |
+
|
| 200 |
+

|
| 201 |
+
Figure 3: Feature visualization for domain-invariant: (a): different colors represent different classes; (b): different colors indicate different domains. Feature visualization for domain-specific: (c): different colors represent different classes; (d): different colors indicate different domains. Source domain includes: art (red), cartoon (green), sketch (blue) while target domain is photo (black) in the domain plots. Best viewed in color (Zoom in for details).
|
| 202 |
+
|
| 203 |
+
To better understand our framework, we visualize the distribution of the learned features with tSNE (40) to analyze the feature space of domain-invariant and domain-specific. As shown in Figure 3 on PACS Dataset, our domain-invariant extractor can minimize the distance between the distribution of the domains (see Figure 3: (b)). However, these domain-invariant features still make mistakes on the classification task, indicated by a mixture of points from different class labels in the middle (see Figure 3: (a)), and many of these points are from the target domain (black color in the Figure 3: (b)). Meanwhile, the domain-specific representation better distinguishes points by class label (see Figure 3: (c)). More importantly, the photo domain’s specific features (black) are close to the art domain (red) (see Figure 3: (d)). This is reasonable because only these two domains include backgrounds related to the object class. It implies that meta-training in our model well learns specific features that can be adapted to the new unseen domain.
|
| 204 |
+
|
| 205 |
+
# 3.4 Ablation study: Important of mDSDI on the Background-Colored-MNIST dataset
|
| 206 |
+
|
| 207 |
+
This section examines our system design by checking its performance under different settings in the real scenario with our generated dataset (a similar experiment with PACS benchmark dataset is in Appendix C.6).
|
| 208 |
+
|
| 209 |
+
Background-Colored-MNIST dataset. Figure 4 illustrates our Background-Colored-MNIST, generated from the original MNIST. We assume the domain-invariant is the digit’s sketch and design the dataset so that the background color is domain-specific. As a result, on the unseen domain, domain-specific will be useful for the classification task. Specifically, the dataset includes three source domains $d _ { t r }$ , different by digit’s color red, green, blue , generated from a subset with 1000 training images for MNIST per each domain. In each source domain, the background color is the same for intra-class images but different across classes. In the target domain, 10000 testing images of MNIST are colored for one target domain $d _ { t e }$ with digit color $\left\{ \mathrm { o r a n g e } \right\}$ . In this domain, each class’s background color is similar to the same class’s background color in one of three source domains.
|
| 210 |
+
|
| 211 |
+
Importance of mDSDI. We aim to prove the combination of learning disentangled representation domain-specific, domain-invariant, and meta-training on domain-specific are important in this scenario. To do so, we compare our model under nine settings: learning domain-invariant only (DI), learning domain-specific only (DS), meta-training on domain-invariant (DI-Meta), meta-training on domain-specific (DS-Meta), a combination of domain-invariant and domain-specific without disentanglement loss $L _ { D }$ (DSDI-Without $L _ { D }$ ), a combination of domain-invariant and domain-specific without meta-training (DSDI-Without Meta), meta-training on both representation $Z _ { I }$ and $Z _ { S }$ (DSDIMeta), meta-training on domain-invariant without domain-specific (DSDI-Meta DI) and our proposed framework (mDSDI-Meta DS), which is meta-training on domain-specific without domain-invariant. Table 2 shows that our model is the best setting with $8 9 . 7 \%$ . It proves that combining domain-invariant and domain-specific is crucial by dominating the settings with only domain-invariant or domainspecific (DI, DI-Meta, DS, DS-Meta). Regarding disentangling two representations $Z _ { I }$ and $Z _ { S }$ , it is worth noting that without disentanglement loss $L _ { D }$ , the model only achieves $8 1 . 4 \%$ , which is lower than mDSDI. It reveals adding disentanglement loss $L _ { D }$ is essential to boost our model performance. Compared with meta-training on both, which only reaches $8 2 . 1 \%$ and on domain-invariant are $7 9 . 0 \%$ , it implies that meta-training is necessary but only for the domain-specific, and our arguments are reasonable. It also shows that our combination with domain-invariant and domain-specific is not easy: a deep ensemble between two neural networks, but existing a deep-down insight in our framework in DG, when compared with mDSDI-Without Meta which can be seen as a type of ensemble, is only around $8 0 . 4 \%$ .
|
| 212 |
+
|
| 213 |
+

|
| 214 |
+
Figure 4: Background-Colored-MNIST Dataset, where source domains include $\{$ red, green, blue $\}$ digit colors and target domain has $\left\{ { \mathrm { o r a n g e } } \right\}$ color.
|
| 215 |
+
|
| 216 |
+
Table 2: Classification accuracy $( \% )$ on BackgroundColored-MNIST. Ablation study shows impact of domain-invariant when combined with meta-training on domain-specific in our method.
|
| 217 |
+
|
| 218 |
+
<table><tr><td>Method</td><td>Accuracy</td></tr><tr><td>DI</td><td>65.7±4.6</td></tr><tr><td>DI-Meta</td><td>63.6±5.1</td></tr><tr><td>DS</td><td>70.7±4.8</td></tr><tr><td>DS-Meta</td><td>75.3±3.4</td></tr><tr><td>DSDI-Without L D</td><td>81.4±2.6</td></tr><tr><td>DSDI-WithoutMeta</td><td>80.4±1.7</td></tr><tr><td>DSDI-Meta</td><td>82.1±1.4</td></tr><tr><td>DSDI-Meta DI</td><td>79.0±2.3</td></tr><tr><td>mDSDI-Meta DS (Ours)</td><td>89.7±0.8</td></tr></table>
|
| 219 |
+
|
| 220 |
+
# 4 Conclusion and Discussion
|
| 221 |
+
|
| 222 |
+
Despite being aware of the importance of domain-specific information, little investigation into the theory and a rigorous algorithm to explore its representation. To the best of our knowledge, our work provides the first theoretical analysis to understand and realize the efficiency of domain-specific information in domain generalization. The domain-specific contains unique characteristics and when combined with domain-invariant information can significantly aid performance on unseen domains. Following our theoretical insights based on the information bottleneck principle, we propose a mDSDI algorithm which disentangles these features. We next introduce the use of the meta-training scheme to support domain-specific to adapt information from source domains to unseen domains. Our experimental results demonstrate mDSDI brings out competitive results with related approaches in domain generalization. In addition, the ablation study with our Background-Colored-MNIST further illustrated and demonstrated the efficiency of combining domain-invariant and domain-specific via our proposed mDSDI. Our theoretical analysis and proposed mDSDI framework can facilitate fundamental progress in understanding the behavior of both domain-invariant and domain-specific representation in domain generalization.
|
| 223 |
+
|
| 224 |
+
Toward a robustness algorithm that can effectively learn both domain-invariant and domain-specific features, there are certainly many challenges that remain in our paper, for example, a theorem to explain when domain-specific may hurt performance in the unseen domain, a stronger connection between theory in implementation, a method to make two representations to be non-linearly independent as well as a lower computational cost of the covariance matrix. In the future, we plan to continue tackling these challenges to provide a better understanding and learning framework in domain generalization then extending to broader settings of transfer learning. A detailed clarification, discussion, and plausible methods in the future work are provided in Appendix B.
|
| 225 |
+
|
| 226 |
+
References
|
| 227 |
+
[1] Gilles Blanchard, Gyemin Lee, and Clayton Scott. Generalizing from several related classification tasks to a new unlabeled sample. In J. Shawe-Taylor, R. Zemel, P. Bartlett, F. Pereira, and K. Q. Weinberger, editors, Advances in Neural Information Processing Systems, volume 24, pages 2178–2186. Curran Associates, Inc., 2011.
|
| 228 |
+
[2] Da Li, Yongxin Yang, Yi-Zhe Song, and Timothy M Hospedales. Deeper, broader and artier domain generalization. In Proceedings of the IEEE international conference on computer vision, pages 5542–5550, 2017.
|
| 229 |
+
[3] Y. Li, X. Tian, M. Gong, Y. Liu, T. Liu, K. Zhang, and D. Tao. Deep domain generalization via conditional invariant adversarial networks. In ECCV, 2018.
|
| 230 |
+
[4] Shoubo Hu, Kun Zhang, Zhitang Chen, and Laiwan Chan. Domain generalization via multidomain discriminant analysis, 2019.
|
| 231 |
+
[5] Maximilian Ilse, Jakub M. Tomczak, Christos Louizos, and Max Welling. Diva: Domain invariant variational autoencoders, 2019.
|
| 232 |
+
[6] Ching-Yao Chuang, Antonio Torralba, and Stefanie Jegelka. Estimating generalization under distribution shifts via domain-invariant representations, 2020.
|
| 233 |
+
[7] Prithvijit Chattopadhyay, Yogesh Balaji, and Judy Hoffman. Learning to balance specificity and invariance for in and out of domain generalization, 2020.
|
| 234 |
+
[8] Han Zhao, Remi Tachet des Combes, Kun Zhang, and Geoffrey J. Gordon. On learning invariant representation for domain adaptation. CoRR, abs/1901.09453, 2019.
|
| 235 |
+
[9] Fredrik D. Johansson, David Sontag, and Rajesh Ranganath. Support and invertibility in domain-invariant representations, 2019.
|
| 236 |
+
[10] Z. Ding and Y. Fu. Deep domain generalization with structured low-rank constraint. IEEE Transactions on Image Processing, 27(1):304–313, 2018.
|
| 237 |
+
[11] Da Li, Yongxin Yang, Yi-Zhe Song, and Timothy M. Hospedales. Learning to generalize: Meta-learning for domain generalization, 2017.
|
| 238 |
+
[12] Naftali Tishby, Fernando C. Pereira, and William Bialek. The information bottleneck method. In Proc. of the 37-th Annual Allerton Conference on Communication, Control and Computing, pages 368–377, 1999.
|
| 239 |
+
[13] Naftali Tishby, Fernando C. Pereira, and William Bialek. The information bottleneck method. In Proc. of the 37-th Annual Allerton Conference on Communication, Control and Computing, pages 368–377, 1999.
|
| 240 |
+
[14] Yao-Hung Hubert Tsai, Yue Wu, Ruslan Salakhutdinov, and Louis-Philippe Morency. Selfsupervised learning from a multi-view perspective. In International Conference on Learning Representations, 2021.
|
| 241 |
+
[15] Alessandro Achille and Stefano Soatto. Emergence of invariance and disentanglement in deep representations, 2018.
|
| 242 |
+
[16] Marco Federici, Anjan Dutta, Patrick Forré, Nate Kushman, and Zeynep Akata. Learning robust representations via multi-view information bottleneck. CoRR, abs/2002.07017, 2020.
|
| 243 |
+
[17] Vihari Piratla, Praneeth Netrapalli, and Sunita Sarawagi. Efficient domain generalization via common-specific low-rank decomposition, 2020.
|
| 244 |
+
[18] Martin Arjovsky, Léon Bottou, Ishaan Gulrajani, and David Lopez-Paz. Invariant risk minimization, 2020.
|
| 245 |
+
[19] Muhammad Ghifary, W. Bastiaan Kleijn, Mengjie Zhang, and David Balduzzi. Domain generalization for object recognition with multi-task autoencoders. CoRR, abs/1508.07680, 2015.
|
| 246 |
+
[20] Chen Fang, Ye Xu, and Daniel N. Rockmore. Unbiased metric learning: On the utilization of multiple datasets and web images for softening bias. In 2013 IEEE International Conference on Computer Vision, pages 1657–1664, 2013.
|
| 247 |
+
[21] Hemanth Venkateswara, Jose Eusebio, Shayok Chakraborty, and Sethuraman Panchanathan. Deep hashing network for unsupervised domain adaptation, 2017.
|
| 248 |
+
[22] Sara Beery, Grant Van Horn, and Pietro Perona. Recognition in terra incognita. CoRR, abs/1807.04975, 2018.
|
| 249 |
+
[23] Xingchao Peng, Qinxun Bai, Xide Xia, Zijun Huang, Kate Saenko, and Bo Wang. Moment matching for multi-source domain adaptation, 2019.
|
| 250 |
+
[24] Ishaan Gulrajani and David Lopez-Paz. In search of lost domain generalization. CoRR, abs/2007.01434, 2020.
|
| 251 |
+
[25] Vladimir N. Vapnik. Statistical Learning Theory. Wiley-Interscience, 1998.
|
| 252 |
+
[26] Shiori Sagawa, Pang Wei Koh, Tatsunori B. Hashimoto, and Percy Liang. Distributionally robust neural networks for group shifts: On the importance of regularization for worst-case generalization, 2020.
|
| 253 |
+
[27] Gilles Blanchard, Aniket Anand Deshmukh, Urun Dogan, Gyemin Lee, and Clayton Scott. Domain generalization by marginal transfer learning, 2021.
|
| 254 |
+
[28] Marvin Zhang, Henrik Marklund, Nikita Dhawan, Abhishek Gupta, Sergey Levine, and Chelsea Finn. Adaptive risk minimization: A meta-learning approach for tackling group distribution shift, 2021.
|
| 255 |
+
[29] Baochen Sun and Kate Saenko. Deep coral: Correlation alignment for deep domain adaptation, 2016.
|
| 256 |
+
[30] Haoliang Li, Sinno Jialin Pan, Shiqi Wang, and Alex C. Kot. Domain generalization with adversarial feature learning. In 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5400–5409, 2018.
|
| 257 |
+
[31] Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, François Laviolette, Mario Marchand, and Victor Lempitsky. Domain-adversarial training of neural networks, 2016.
|
| 258 |
+
[32] Ya Li, Mingming Gong, Xinmei Tian, Tongliang Liu, and Dacheng Tao. Domain generalization via conditional invariant representation, 2018.
|
| 259 |
+
[33] David Krueger, Ethan Caballero, Joern-Henrik Jacobsen, Amy Zhang, Jonathan Binas, Dinghuai Zhang, Remi Le Priol, and Aaron Courville. Out-of-distribution generalization via risk extrapolation (rex), 2021.
|
| 260 |
+
[34] Minghao Xu, Jian Zhang, Bingbing Ni, Teng Li, Chengjie Wang, Qi Tian, and Wenjun Zhang. Adversarial domain adaptation with domain mixup, 2019.
|
| 261 |
+
[35] Shen Yan, Huan Song, Nanxiang Li, Lincan Zou, and Liu Ren. Improve unsupervised domain adaptation with mixup training, 2020.
|
| 262 |
+
[36] Yufei Wang, Haoliang Li, and Alex C. Kot. Heterogeneous domain generalization via domain mixup. ICASSP 2020 - 2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), May 2020.
|
| 263 |
+
[37] Hyeonseob Nam, HyunJae Lee, Jongchan Park, Wonjun Yoon, and Donggeun Yoo. Reducing domain gap by reducing style bias, 2021.
|
| 264 |
+
[38] Zeyi Huang, Haohan Wang, Eric P. Xing, and Dong Huang. Self-challenging improves crossdomain generalization, 2020.
|
| 265 |
+
[39] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. CoRR, abs/1512.03385, 2015.
|
| 266 |
+
[40] Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of Machine Learning Research, 9(86):2579–2605, 2008.
|
| 267 |
+
[41] Thomas M. Cover and Joy A. Thomas. Elements of Information Theory (Wiley Series in Telecommunications and Signal Processing). Wiley-Interscience, USA, 2006.
|
| 268 |
+
[42] Arthur Gretton, Karsten M. Borgwardt, Malte J. Rasch, Bernhard Schölkopf, and Alexander Smola. A kernel two-sample test. Journal of Machine Learning Research, 13(25):723–773, 2012.
|
| 269 |
+
[43] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization, 2017.
|
| 270 |
+
[44] Seonguk Seo, Yumin Suh, Dongwan Kim, Jongwoo Han, and Bohyung Han. Learning to optimize domain specific normalization for domain generalization. CoRR, abs/1907.04275, 2019.
|
md/train/wHkKTW2wrmm/wHkKTW2wrmm.md
ADDED
|
@@ -0,0 +1,285 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Neural Additive Models: Interpretable Machine Learning with Neural Nets
|
| 2 |
+
|
| 3 |
+
Rishabh Agarwal∗ Google Research, Brain Team
|
| 4 |
+
|
| 5 |
+
Levi Melnick Microsoft Research
|
| 6 |
+
|
| 7 |
+
Nicholas Frosst Cohere
|
| 8 |
+
|
| 9 |
+
Xuezhou Zhang University of Wisconsin-Madison
|
| 10 |
+
|
| 11 |
+
Ben Lengerich MIT
|
| 12 |
+
|
| 13 |
+
Rich Caruana Microsoft Research
|
| 14 |
+
|
| 15 |
+
Geoffrey E. Hinton Google Research, Brain Team
|
| 16 |
+
|
| 17 |
+
# Abstract
|
| 18 |
+
|
| 19 |
+
Deep neural networks (DNNs) are powerful black-box predictors that have achieved impressive performance on a wide variety of tasks. However, their accuracy comes at the cost of intelligibility: it is usually unclear how they make their decisions. This hinders their applicability to high stakes decision-making domains such as healthcare. We propose Neural Additive Models (NAMs) which combine some of the expressivity of DNNs with the inherent intelligibility of generalized additive models. NAMs learn a linear combination of neural networks that each attend to a single input feature. These networks are trained jointly and can learn arbitrarily complex relationships between their input feature and the output. Our experiments on regression and classification datasets show that NAMs are more accurate than widely used intelligible models such as logistic regression and shallow decision trees. They perform similarly to existing state-of-the-art generalized additive models in accuracy, but are more flexible because they are based on neural nets instead of boosted trees. To demonstrate this, we show how NAMs can be used for multitask learning on synthetic data and on the COMPAS recidivism data due to their composability, and demonstrate that the differentiability of NAMs allows them to train more complex interpretable models for COVID-19. Source code is available at neural-additive-models.github.io.
|
| 20 |
+
|
| 21 |
+
# 1 Introduction
|
| 22 |
+
|
| 23 |
+
While deep neural networks have achieved impressive results on tasks such as computer vision [17] and language modeling [31], it is notoriously difficult to understand how such networks make predictions, and they are often considered as black-box models. This hinders their applicability to highstakes domains such as healthcare, finance and criminal justice. Various efforts have been made to demystify the predictions of neural networks (NNs). For example, one family of methods, represented by LIME [33], attempt to explain individual predictions of a neural network by approximating it locally with interpretable models such as linear models and shallow trees2. However, these approaches often fail to provide a global view of the model and their explanations often are not faithful to what the original model computes or do not provide enough detail to understand the model’s behavior [35].
|
| 24 |
+
|
| 25 |
+
In this paper, we make restrictions on the structure of neural networks, which yields a family of glass-box models called Neural Additive Models (NAMs), that are inherently interpretable while suffering little loss in prediction accuracy when applied to tabular data. Methodologically, NAMs belong to a model family called Generalized Additive Models (GAMs) [14]. GAMs have the form:
|
| 26 |
+
|
| 27 |
+
$$
|
| 28 |
+
g ( \mathbb { E } [ y ] ) = \beta + f _ { 1 } ( x _ { 1 } ) + f _ { 2 } ( x _ { 2 } ) + \cdot \cdot \cdot + f _ { K } ( x _ { K } )
|
| 29 |
+
$$
|
| 30 |
+
|
| 31 |
+
where $\mathbf { x } = ( x _ { 1 } , \ x _ { 2 } , \ \ldots , \ x _ { K } )$ is the input with $K$ features, $y$ is the target variable, $g ( . )$ is the link function (e.g., logistic function) and each $f _ { i }$ is a univariate shape function with $\mathbb { E } [ f _ { i } ] = 0$ . Generalized linear models, such as logistic regression, are a special form of GAMs where each $f _ { i }$ is restricted to be linear.
|
| 32 |
+
|
| 33 |
+
NAMs learn a linear combination of networks that each attend to a single input feature: each $f _ { i }$ in (1) is parametrized by a neural network. These networks are trained jointly using backpropagation and can learn arbitrarily complex shape functions. Interpreting NAMs is easy as the impact of a feature on the prediction does not rely on the other features and can be understood by visualizing its corresponding shape function (e.g., plotting $f _ { i } ( x _ { i } )$ vs. $x _ { i }$ ). While interpretability of NAMs may seem heuristic, the graphs learned by NAMs are an exact description of how NAMs compute a prediction.
|
| 34 |
+
|
| 35 |
+

|
| 36 |
+
Figure 1: NAM architecture for binary classification. Each input variable is handled by a different neural network. This results in easily interpretable yet highly accurate models.
|
| 37 |
+
|
| 38 |
+
Traditionally, GAMs were fitted via iterative backfitting using smooth low-order splines, which reduce overfitting and can be fit analytically. More recently, GAMs [5] were fitted with boosted decision trees to improve accuracy and to allow GAMs to learn jumps in the feature shaping functions to better match patterns seen in real data that smooth splines could not easily capture. This paper examines using DNNs to fit generalized additive models (NAMs) which provides the following advantages:
|
| 39 |
+
|
| 40 |
+
• NAMs introduce an expressive yet intelligible class of models to the deep learning (DL) community, a much larger community than the one using tree-based GAMs.
|
| 41 |
+
• NAMs are likely to be combined with other DL methods in ways we don’t foresee. This is important because a key drawback of deep learning is interpretability. For example, NAMs have already been employed for survival analysis [46].
|
| 42 |
+
• NAMs, due to the flexibility of NNs, can be easily extended to various settings problematic for boosted decision trees. For example, extending boosted tree GAMs to multitask, multiclass or multi-label learning requires significant changes to how trees are trained, but is easily accomplished with NAMs without requiring changes to how neural nets are trained due to their composability (Section 4.2). Futhermore, the differentiability of NAMs allows them to train more complex interpretable models for COVID-19 (Section 4.1).
|
| 43 |
+
Graphs learned by NAMs are not just an explanation but an exact description of how NAMs compute a prediction. As such, a decision-maker can easily interpret NAMs and understand exactly how they make decisions. This would help harness the expressivity of neural nets on high-stakes domains with intelligibility requirements, e.g., in-hospital mortality prediction [22].
|
| 44 |
+
• NAMs are more scalable as inference and training can be done on GPUs/TPUs or other specialized hardware using the same toolkits developed for deep learning over the past decade – GAMs currently cannot.
|
| 45 |
+
• Accurate GAMs [5] currently require millions of decision trees to fit each shape function while NAMs only use a small ensemble (2 - 100) of neural nets. Thus, NAMs are relatively much easier to extend compared to GAMs.
|
| 46 |
+
|
| 47 |
+

|
| 48 |
+
Figure 2: Accurately Fitting the Toy Dataset: Training predictions learned by a single hidden layer neural network with 1024 (a) standard ReLU, and (b) ReLU- $\mathbf { \nabla } \cdot \mathbf { n }$ with $\operatorname { E x U }$ hidden units trained for 10,000 epochs on the binary classification dataset described in Section 2. We can see that the ReLU network has learned a fairly smooth function while the $\operatorname { E x U }$ network has learned a very jumpy function. We find that a DNN with three hidden layers also learned smooth functions (see Figure A.3).
|
| 49 |
+
|
| 50 |
+
# 2 Neural Additive Models
|
| 51 |
+
|
| 52 |
+
Modeling jagged shape functions is required to learn accurate additive models as there are often sharp jumps in real-world datasets, e.g., see Figure 4 for jumps in graphs for PFRatio and Bilirubin which correspond to real patterns in the MIMIC-II dataset [38] (Section A.1). Similarly, Caruana et al. [5] observe that GAMs fit using splines tend to over regularize and miss genuine details in real data, yielding less accuracy than tree-based GAMs. Therefore, we require that neural networks (NNs) are able to learn highly non-linear shape functions, to fit these patterns.
|
| 53 |
+
|
| 54 |
+
Although NNs can approximate arbitrarily complex functions [18], we find that standard NNs fail to model highly jumpy 1D functions, and demonstrate this failure empirically using a toy dataset. The toy dataset is constructed as follows: For the input $x$ , we sample 100 evenly spaced points in [-1, 1]. For each $x$ , we sample $p$ uniformly random in [0.1, 0.9) and generate 100 labels from a Bernoulli random variable which takes the value 1 with probability $p$ . This creates a binary classification dataset of $( x , y )$ tuples with 10,000 points. Figure 2 shows the log-odds of the empirical probability $p$ (i.e., $\log { \frac { p } { 1 - p } } )$ of classifying the label of $x$ as 1 for each input $x$ . This dataset tests the NN’s ability to “overfit” the data, rather than its ability to generalize.
|
| 55 |
+
|
| 56 |
+
Over-parameterized NNs with ReLUs [25] and standard initializations such as Kaiming initialization [16] and Xavier initialization [10] struggle to overfit this dataset when trained using mini-batch gradient descent, despite the NN architecture being expressive enough3(see Figures 2(a) and A.3). This difficulty of learning large local fluctuations with ReLU networks without affecting their global behavior when fitting jagged functions might be due to their bias towards smoothness [2, 32].
|
| 57 |
+
|
| 58 |
+
We propose exp-centered (ExU) hidden units to overcome this neural net failure: we simply learn the weights in the logarithmic space with inputs shifted by a bias. Specifically, for a scalar input $x$ , each hidden unit using an activation function $f$ computes $h ( x )$ given by
|
| 59 |
+
|
| 60 |
+
$$
|
| 61 |
+
h ( x ) = f \left( e ^ { w } * ( x - b ) \right)
|
| 62 |
+
$$
|
| 63 |
+
|
| 64 |
+
where $w$ and $b$ are the weight and bias parameters. The intuition behind $\operatorname { E x U }$ units is as follows: For modeling jagged functions, a hidden unit should be able to change its output significantly, with a tiny change in input. This requires the unit to have extremely large weight values depending on the sharpness of the jump. The ExU unit computes a linear function of input where the slope can be very steep with small weights, making it easier to modify the output easily during training. ExU units do not improve the expressivity of neural nets, however they do improve their learnability for fitting jumpy functions. While we use ExU units to train accurate NAMs, they are more generally applicable for approximating jumpy functions with neural nets.
|
| 65 |
+
|
| 66 |
+
We noticed that $\mathrm { E x U }$ units with standard weight initialization also struggle to learn jagged curves; instead initializing the weights using a normal distribution $\mathcal { N } ( x , 0 . 5 )$ with $x \in [ 3 , 4 ]$ works well in practice. This initialization simply ensures that the initial network starts with a jagged (random)
|
| 67 |
+
|
| 68 |
+

|
| 69 |
+
Figure 3: Regularizing ExU networks. Output of a ExU feature net trained with dropout $= 0 . 2$ for the age feature in the MIMIC-II dataset [38]. Predictions from individual subnets (as a result of dropping out hidden units) are much more jagged than the average predictions using the entire feature net. Refer to Section A.3 for an overview of regularization approaches used in this work.
|
| 70 |
+
|
| 71 |
+

|
| 72 |
+
Figure 4: ExU vs. standard hidden units. On MIMIC-II, NAMs trained with ExU units learn jumpier graphs than with standard units while achieving a similar AUC $( \approx ~ 0 . 8 2 9 )$ Ensembling them further improves performance $( \approx 0 . 8 3 0 )$ Note that white regions in the plots correspond to regions with low data density (typically a few points) and thus we see much higher variance in the learned shape functions. We present a detailed case study on the MIMIC-II dataset in Section A.1.
|
| 73 |
+
|
| 74 |
+
function which we empirically find to be crucial for fitting any jumpy function. Furthermore, we use ReLU activations capped at $n$ (ReLU- $\mathbf { \nabla } \cdot n$ ) [21] to ensure that each ExU unit is active in a small input range, making it easier to model sharp jumps in a function without significantly affecting the global behavior. ExU-units can be combined with any activation function (i.e., any $f$ can be used in (2)), but ReLU- $^ n$ performs well in practice. Figure 2(b) shows that NNs with $\operatorname { E x U }$ units are able to fit the toy dataset significantly better than standard NNs.
|
| 75 |
+
|
| 76 |
+
Finally, realistic shape functions typically tend to be smooth with large jumps at only a few points (Figure 4). To avoid overfitting with ExUs, strong regularization is crucial which can learn such realistic functions (e.g., Figure 3). With ReLUs, we can typically fit smooth functions but they might miss some of these jumps. To avoid overfitting when fitting NAMs with ExUs, we employ various regularization methods including dropout, weight decay, output penalty, and feature dropout (see Section A.3 for an overview).
|
| 77 |
+
|
| 78 |
+
# 2.1 Intelligibility and Modularity of NAMs
|
| 79 |
+
|
| 80 |
+
The intelligibility of NAMs results in part from the ease with which they can be visualized. Because each feature is handled independently by a learned shape function parameterized by a neural net, one can get a full view of the model by simply graphing the individual shape functions. For data with a small number of inputs, it is possible to have an accessible explanation of the model’s behavior visualized fully on a single page. Please note these shape function plots are not just an explanation but an exact description of how NAMs compute a prediction. A decision-maker can easily interpret such models and understand exactly how they make decisions, for example, we validated the behavior of NAMs on the MIMIC-II dataset [38] with a doctor (Appendix A.1).
|
| 81 |
+
|
| 82 |
+
We set the average score for each graph (i.e., each feature) averaged across the entire training dataset to zero by subtracting the mean score. To make individual shape functions identifiable and modular, a single bias term is then added to the model so that the average predictions across all data points matches the observed baseline. This makes interpreting the contribution of each term easier: e.g., on binary classification tasks, negative scores decrease probability, and positive scores increase probability compared to the baseline probability of observing that class. This property also allows each graph to be removed from the NAM (zeroed out) without introducing bias to the predictions.
|
| 83 |
+
|
| 84 |
+
Visualization. We plot each shape function and the corresponding data density on the same graph. Specifically, we plot each learned shape function $f _ { k } ( x _ { k } )$ vs. $x _ { k }$ for an ensemble of NAMs using a semi transparent blue line, which allows us to see when the models in the ensemble learned the same shape function and when they diverged. This provides a sense of the confidence of the learned shape functions. We also plot on the same graphs the normalized data density, in the form of pink bars. The darker the shade of pink, the more data there is in that region. This allows us to know when the model had adequate training data to learn appropriate shape functions.
|
| 85 |
+
|
| 86 |
+
Table 1: Single-task learning NAM results. Means and standard deviations are reported from 5-fold cross validation. Higher AUCs and lower RMSEs are better. We report results on two widely used regression datasets, namely California Housing [27] for predicting housing prices and FICO [9] for understanding credit score predictions, as well as two classification datasets, namely Credit [7] for financial fraud detection and MIMICII [38] for predicting mortality in ICUs. We present a case study on the MIMIC-II dataset in Section A.1 and discuss the interpretations from NAMs on other datasets in Section A.2.
|
| 87 |
+
|
| 88 |
+
<table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>MIMIC-II (AUC)</td><td rowspan=1 colspan=1>Credit (AUC)</td><td rowspan=1 colspan=1>CA Housing (RMSE)</td><td rowspan=1 colspan=1>FICO (RMSE)</td></tr><tr><td rowspan=1 colspan=1>Log./Linear Reg.CART</td><td rowspan=1 colspan=1>0.791 ± 0.0070.768 ± 0.008</td><td rowspan=1 colspan=1>0.975 ± 0.0100.956 ± 0.004</td><td rowspan=1 colspan=1>0.728 ± 0.0150.720 ± 0.006</td><td rowspan=1 colspan=1>4.344 ± 0.0564.900 ± 0.113</td></tr><tr><td rowspan=1 colspan=1>NAMsEBMs</td><td rowspan=1 colspan=1>0.830± 0.0080.835 ± 0.007</td><td rowspan=1 colspan=1>0.980 ± 0.0020.976 ± 0.009</td><td rowspan=1 colspan=1>0.562 ± 0.0070.557 ± 0.009</td><td rowspan=1 colspan=1>3.490 ± 0.0813.512 ± 0.095</td></tr><tr><td rowspan=1 colspan=1>XGBoostDNNs</td><td rowspan=1 colspan=1>0.844 ± 0.0060.832 ± 0.009</td><td rowspan=1 colspan=1>0.981 ± 0.0080.978 ± 0.003</td><td rowspan=1 colspan=1>0.532 ± 0.0140.492 ± 0.009</td><td rowspan=1 colspan=1>3.345 ± 0.0713.324 ± 0.092</td></tr></table>
|
| 89 |
+
|
| 90 |
+

|
| 91 |
+
Figure 5: Understanding individual predictions for credit scores. Feature contribution using the learned NAMs for predicting scores of two applicants in the FICO dataset [9]. For a given input, each feature net in the NAM acts as a lookup table and returns a contribution term. These contributions are combined in a modular way: they are added up, and passed through a link function for prediction. the longer a person’s credit history, the better it is for their credit score The high scoring applicant has a long credit history (Average Months on File), which contributes to their credit score better. On the contrary, the low scoring applicant used their credit quite frequently (Total Number of Trades) and has a large burden (Net Fraction Installment Burden), thus resulting in a low score.
|
| 92 |
+
|
| 93 |
+

|
| 94 |
+
Figure 6: California Housing. Graphs learned by NAMs trained to predict house prices [27] for two most important features. As expected, The house prices increase linearly with median income in high data density regions. Furthermore, the graph for longitude shows sharp jumps in price prediction around the location of San Francisco and Los Angeles.
|
| 95 |
+
|
| 96 |
+
# 3 Evaluating the Accuracy of NAMs
|
| 97 |
+
|
| 98 |
+
In this section, we evaluate the single-task learning capacity of NAMs against the following baselines on both regression and classification tasks:
|
| 99 |
+
|
| 100 |
+
• Logistic / Linear Regression and Decision Trees (CART): Prevalent intelligible models. For both methods above we use the sklearn implementation [28], and tune the hyper-parameters with grid search.
|
| 101 |
+
• Explainable Boosting Machines (EBMs): Current state-of-the-art GAMs [5, 23] which use
|
| 102 |
+
gradient boosting of millions of shallow bagged trees that cycle one-at-a-time through the features.
|
| 103 |
+
• Deep Neural Networks (DNNs): Unrestricted, full-complexity models which can model higherorder interaction between the input features. This gives us a sense of how much accuracy we sacrifice in order to gain interpretability with NAMs.
|
| 104 |
+
• Gradient Boosted Trees (XGBoost): Another class of full-complexity models that provides an upper bound on the achievable test accuracy in our experiments. We use the XGBoost implementation [6].
|
| 105 |
+
|
| 106 |
+

|
| 107 |
+
Figure 7: Estimating personalized treatment benefits for Covid-19 patients. NAMs provide a unique combination of intelligibility and differentiability which make them suitable as a component in contextual parameter generation (a). By applying NAMs in this way, we are able to estimate and interpret personalized benefits of medical treatments for Covid-19 patients (b-d).
|
| 108 |
+
|
| 109 |
+
Training and Evaluation. Feature nets in NAMs are selected amongst (1) DNNs containing 3 hidden layers with 64, 64 and 32 units and ReLU activation, and (2) single hidden layer NNs with $1 0 2 4 \mathrm { E x U }$ units and ReLU-1 activation. We perform 5-fold cross validation to evaluate the accuracy of the learned models. To measure performance in Table 1, we use area under the precision-recall curve (AUC) for binary classification and root mean-squared error (RMSE) for regression. More details about training and evaluation protocols can be found in Section A.5 in the appendix.
|
| 110 |
+
|
| 111 |
+
NAMs achieve comparable performance to EBMs on both classification and regression datasets, making them a competitive alternative to EBMs. Given this observation, we next look at some additional capabilities of NAMs that are not available to EBMs or any tree-based learning methods.
|
| 112 |
+
|
| 113 |
+
# 4 Unique Capabilities of NAMs
|
| 114 |
+
|
| 115 |
+
# 4.1 Intelligible Parameter Generation: Leveraging the Differentiability of NAMs
|
| 116 |
+
|
| 117 |
+
Medical treatment protocols are designed to deliver treatments to patients who would most benefit from them. To optimize treatment protocols, we would like a model which provides an intelligible map from patient information to an estimate of benefit for each potential treatment. To accomplish this, we use a NAM to generate parameters for personalized models of mortality risk given treatment (Fig. 7). By training to match predicted mortality risk with observed mortality, the NAM encodes expected treatment benefits as a function of patient information. NAMs are the only nonlinear GAM suitable for this application because NAMs are differentiable and can be trained via backpropagation.
|
| 118 |
+
|
| 119 |
+
Figure 7 shows a NAM trained to predict treatment benefits for Covid-19 patients. We train the model on deidentified data from over 3000 Covid-19 patients. The model suggests that the benefits of anti-coagulants and NSAIDs decrease with increased Neutrophil / Lymphocyte Ratio (NLR), while the effectiveness of glucocorticoids slightly increases with increasing NLR. NLR is a marker of inflammation and severe Covid-19; it is thus expected that anti-coagulants (which target a distinct biomedical pathway) and NSAIDs (which are weaker) would not be as effective for patients with elevated NLR. In contrast, glucocorticoids become more effective for patients with more inflammation. This example shows the utility of a differentiable nonlinear additive model such as NAMs.
|
| 120 |
+
|
| 121 |
+
# 4.2 Multitask Learning
|
| 122 |
+
|
| 123 |
+
One advantage of NAMs is that they are easily extended to multitask learning (MTL) [4], whereas MTL is not available in EBMs or in any major boosted-tree package. In NAMs, the composability of neural nets makes it easy to train multiple subnets per feature. The model can learn task-specific weights over these subnets to allow sharing of subnets (shape functions) across tasks while also allowing subnets to differentiate between tasks as needed. However, it is unclear how to implement MTL in EBMs and possibly requires changes to both the backfitting procedure and the information gain rule in decision trees. Figure 8 shows a multitask NAM architecture that can jointly learn different feature representations for each task while preserving the intelligibility and modularity of NAMs. As we show, this can benefit both accuracy and interpretability. We first demonstrate multitask NAMs on a synthetic dataset before showing their utility on a multitask formulation of the COMPAS recidivism prediction dataset.
|
| 124 |
+
|
| 125 |
+
Multitask NAM Architecture. The multitask architecture is identical to that of single task NAMs except that each feature is associated with multiple subnets and the model jointly learns a task-specific weighted sum over their outputs that determines the shape function for each feature and task. The outputs corresponding to each task are summed and a bias is added to obtain the final prediction score. The number of subnets does not need to be the same as the number of tasks — the number of subnets can be less than, equal to, or even more than the number of tasks. Although the shape plot for each task is a linear combination of the shape plots learned by each subnet for that feature, this generates a single unique shape plot for each task and there is no need to examine what has been learned by the individual subnets for interpreting multitask NAMs.
|
| 126 |
+
|
| 127 |
+

|
| 128 |
+
Figure 8: Multitask NAM architecture for binary classification. Multiple subnets are trained on each input feature and weighted sums are learned over the subnets.
|
| 129 |
+
|
| 130 |
+
# 4.2.1 Experiments on Synthetic Multitask Data
|
| 131 |
+
|
| 132 |
+
Multitask models often show improvement over single task learning when tasks are similar to each other and training data is limited. We construct a synthetic dataset that showcases the benefit of multitask learning in NAMs and demonstrates their ability to learn task-specific shape plots when needed. We define 6 related tasks, each a function of three variables. All 6 tasks are the same function of variables $x _ { 0 }$ and $x _ { 1 }$ , and differ only in the function applied to $x _ { 2 }$ :
|
| 133 |
+
|
| 134 |
+
$$
|
| 135 |
+
{ \begin{array} { r l r l } & { T a s k _ { 0 } = f ( x _ { 0 } ) + g ( x _ { 1 } ) + h ( x _ { 2 } ) } & & { T a s k _ { 1 } = f ( x _ { 0 } ) + g ( x _ { 1 } ) + i ( x _ { 2 } ) } \\ & { T a s k _ { 2 } = f ( x _ { 0 } ) + g ( x _ { 1 } ) - h ( x _ { 2 } ) } & & { T a s k _ { 3 } = f ( x _ { 0 } ) + g ( x _ { 1 } ) - i ( x _ { 2 } ) } \\ & { T a s k _ { 4 } = f ( x _ { 0 } ) + g ( x _ { 1 } ) + \left( h ( x _ { 2 } ) + i ( x _ { 2 } ) \right) } & & { T a s k _ { 5 } = f ( x _ { 0 } ) + g ( x _ { 1 } ) - \left( h ( x _ { 2 } ) + i ( x _ { 2 } ) \right) } \end{array} }
|
| 136 |
+
$$
|
| 137 |
+
|
| 138 |
+
Functions $f ( x _ { 0 } ) , g ( x _ { 1 } ) , h ( x _ { 2 } )$ and $i ( x _ { 2 } )$ are as follows:
|
| 139 |
+
|
| 140 |
+
$$
|
| 141 |
+
\begin{array} { r l r l r l r l } { { 1 . 5 } } & { { } } & { { \mathit { f } ( x _ { 0 } ) } } & { { } } & { { \mathit { 0 . 0 } } } & { { } } & { { } } & { { } } & { { } } & { { } } \\ { 1 . 5 } & { { } } & { { } } & { { } } & { { } } & { { } } & { { } } & { { } } \\ { 0 . 5 } & { { } } & { { } } & { { } } & { { } } & { { } } & { { } } \\ { 0 . 5 } & { { } } & { { } } & { { } } & { { } } & { { } } & { { } } & { { } } \\ { 0 . 0 } & { { } } & { { } } & { { } } & { { } } & { { - 1 . 0 } \left[ \displaystyle \sum _ { j = 1 } ^ { j } \right] } & { { } } & { { } } & { { } } & { { } } & { { } } \\ { - 1 } & { { } } & { { } } & { { } } & { { - 1 . } } & { { } } & { { } } & { { } } & { { } } \\ { - 1 } & { { } } & { { } } & { { } } & { { - 1 } } & { { } } & { { } } & { { 1 } } & { { } } \end{array}
|
| 142 |
+
$$
|
| 143 |
+
|
| 144 |
+
A NAM with two subnets per feature can model every function of $x _ { 2 }$ by learning two subnets, one for $h ( x _ { 2 } )$ and one for $i ( x _ { 2 } )$ and assigning appropriate weights to the output of each. Because we would not know this in advance with real data, we use 6 subnets so that each of the 6 tasks (outputs) could, if needed, learn independent shape functions. We train models on 2,500 training examples, evaluate them on a test set of 10,000 examples, and average the results over 20 trials. Also, we ensured that each subnet has enough parameters to easily learn the necessary feature shape plots. So MTL is not doing better than STL because STL has inadequate capacity and MTL has more capacity.
|
| 145 |
+
|
| 146 |
+

|
| 147 |
+
Figure 9: Single and Multitask NAM shape plots for $x _ { 2 }$ from a typical (median) run of each task. The learned shape function is blue; the generator function is black. See A.8.2 for details of the generator functions.
|
| 148 |
+
|
| 149 |
+
Table 2: MSE for STL and MTL NAMs on synthetic data. Average of 20 runs. Lower MSEs are better.
|
| 150 |
+
|
| 151 |
+
<table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>Task 0</td><td rowspan=1 colspan=1>Task 1</td><td rowspan=1 colspan=1>Task 2</td><td rowspan=1 colspan=1>Task 3</td><td rowspan=1 colspan=1>Task 4</td><td rowspan=1 colspan=1>Task 5</td><td rowspan=1 colspan=1>Mean</td></tr><tr><td rowspan=1 colspan=1>Single Task NAMMultitask NAM</td><td rowspan=1 colspan=1>0.9650.710</td><td rowspan=1 colspan=1>1.1160.715</td><td rowspan=1 colspan=1>1.3470.709</td><td rowspan=1 colspan=1>0.9440.711</td><td rowspan=1 colspan=1>1.0580.717</td><td rowspan=1 colspan=1>1.0660.709</td><td rowspan=1 colspan=1>1.0830.712</td></tr></table>
|
| 152 |
+
|
| 153 |
+

|
| 154 |
+
Figure 10: Single and Multitask COMPAS Recidivism Prediction. Plots in the left column show the shape functions for each input feature learned by an ensemble of 100 single task NAMs. Thin blue lines represent shape functions for individual members of the ensemble. Pink bars represent the normalized data density for each feature. Plots in the right column show the Race and Charge degree shape plots for an ensemble of 100 multitask NAMS, with the Women task shown in green, and the Men task in blue.
|
| 155 |
+
|
| 156 |
+
Table 2 shows that on average across all tasks, multitask NAMs achieve mean squared error $34 \%$ lower than single task NAMs, and at least $2 5 \%$ lower on each individual task. In all 120 trials of the 6 tasks combined, MTL achieved a better score than STL on 119 of the 120 trials. Figure 9 shows the shape plots learned by median runs of STL and MTL for the functions of $x _ { 2 }$ that vary among tasks. Furthermore, we illustrate that a multi-task NAM is as interpretable as a single task NAM by plotting the multi-task NAM predictions on the 3 input features for each of the tasks in Figure A.6.
|
| 157 |
+
|
| 158 |
+
# 4.2.2 Single and Multitask COMPAS Recidivism Prediction
|
| 159 |
+
|
| 160 |
+
COMPAS is a proprietary score developed to predict recidivism risk, which is used to inform bail, sentencing and parole decisions and has been the subject of scrutiny for racial bias [1, 8, 42]. In 2016, ProPublica released recidivism data [30] on defendants in Broward County, Florida.
|
| 161 |
+
|
| 162 |
+
Single Task Recidivism Prediction: First, we ask whether this dataset is biased using the transparency of single-task NAMs. Figure 10 shows the learned single-task NAM which is as accurate as black-box models on this dataset (see Table 1). The shape function for race indicates that the learned NAM may be racially biased: Black defendants are predicted to be higher risk for reoffending than white or Asian defendants. This suggests that the recidivism data may be racially-biased. The modularity of NAMs makes it easy to correct this bias by simply removing the contributions learned from the race attribute by zeroing out its mean-centered graph in the learned NAM. Although this would drop the AUC score as we are removing a discriminative feature, it may be a more fair model to use for making bail decisions. It is important to keep potentially offending attributes in the model during training so that the bias can be detected and then removed after training. If the offending variables are eliminated before training, it makes debiasing the model more difficult: if the offending attributes are correlated with other training attributes, the bias is likely to spread to those attributes [3]. The transparency and modularity of NAMs allows one to detect unanticipated biases in data and makes it easier to correct the bias in the learned model.
|
| 163 |
+
|
| 164 |
+
Table 3: ROC AUC for multitask and single task NAMs on COMPAS dataset, broken down by gender. Each cell contains the mean AUC $\pm$ one standard deviation obtained via 5-fold cross validation. Higher AUCs are better.
|
| 165 |
+
|
| 166 |
+
<table><tr><td>Model</td><td>COMPAS Women</td><td>COMPAS Men</td><td>COMPAS Combined</td></tr><tr><td>Single Task NAM</td><td>0.716 ± 0.026</td><td>0.735 ± 0.009</td><td>0.737 ± 0.010</td></tr><tr><td>Multitask NAM</td><td>0.723 ± 0.019</td><td>0.737 ± 0.009</td><td>0.739 ± 0.010</td></tr></table>
|
| 167 |
+
|
| 168 |
+
Multitask Recidivism Prediction: In some settings multitask learning can increase accuracy and intelligibility by learning task-specific shape plots that expose task-specific patterns in the data that would not be learned by single task learning. We reformulate COMPAS as a multitask problem where recidivism prediction for men and women are treated as separate tasks on a NAM with two outputs. Indeed, we find that a multitask NAM reveals different relationships between race, charge degree, and recidivism risk for men and women while achieving slightly higher overall accuracy.
|
| 169 |
+
|
| 170 |
+
The right column of Figure 10 displays a selection of shape plots learned for a multitask NAM trained on the same data as the single task NAM but with Male and Female as separate output tasks. (The remaining MTL shape plots are similar for the two genders, reinforcing that these are strongly related tasks, but we omit them for brevity.) The race shape plot in the multitask NAM shows a different pattern of racial bias for each gender. The curve for men looks similar to that of the single task NAM (which is expected because men make up $81 \%$ of the data), but the curve for women suggests that recidivism risk is lower for Black women and higher for Caucasian and Hispanic women than for their male counterparts. The multitask shape plots also reveal that charge degree is almost twice as important for women as it is for men. The straightforward extension of NAMs to the multitask setting offers a useful modelling technique not currently available with tree-based GAMs.
|
| 171 |
+
|
| 172 |
+
# 5 Related Work
|
| 173 |
+
|
| 174 |
+
Generalized Additive Neural Networks (GANNs) [29] are somewhat similar to the NAMs we propose here. Like NAMs, GANNs used a restriction in the neural net architecture to force it to learn additive functions of individual features. GANNs, however, predate deep learning and use a single hidden layer with typically only 1-5 hidden units. Furthermore, GANNs did not use backpropagation [37], required human-in-the-loop evaluation and were not successful in training accurate or scalable GAMs with neural nets. See Section A.7 for a more detailed overview of GANNs.
|
| 175 |
+
|
| 176 |
+
In contrast, NAMs in this paper benefit from the advances in deep learning. They use a large number of hidden units and multiple hidden layers per input feature subnet to allow more complex, more accurate shape functions to be learned. Furthermore, NAMs use novel $\operatorname { E x U }$ hidden units to allow subnets to learn the more non-linear functions often required for accurate additive models, and then form an ensemble of these nets to provide uncertainty estimates, further improve accuracy and reduce the high-variance that can result from encouraging the model to learn highly non-linear functions.
|
| 177 |
+
|
| 178 |
+
Prior to NAMs, the state-of-the-art in high-accuracy, interpretable generalized additive models [12, 14] are the GAM [23] and $\mathrm { G A ^ { 2 } M }$ [24] based on regularized boosted decision trees which were successfully applied to healthcare datasets [5]. We compare the accuracy of NAMs to these models in Section 3. We note that pairwise interactions, similar to $\mathrm { { G A ^ { 2 } M s } }$ , can be easily added to NAMs – $\mathrm { { G A ^ { 2 } M s } }$ use a heuristic to compute the importance of each pairwise interaction by fitting residual from first-order terms and select the k $( \le 1 0 )$ most important interactions. We don’t consider such interactions to keep the paper focused on additive modeling with neural nets.
|
| 179 |
+
|
| 180 |
+
# 6 Conclusion and Future Work
|
| 181 |
+
|
| 182 |
+
We present Neural Additive Models (NAMs), which combine the inherent interpretability of GAMs with the expressivity of DNNs, opening the door for other advances in interpretability in deep learning. NAMs are competitive in accuracy to GAMs and accurate alternatives to prevalent interpretable models (e.g., shallow trees) while being more easily extendable than existing GAMs due to their differentiability and composability.
|
| 183 |
+
|
| 184 |
+
A promising direction for future work is improving the expressivity of NAMs by incorporating higher-order feature interactions. While such interactions may result in more expressivity, they might worsen the intelligibility of the learned NAM. Thus, finding a small number of crucial interactions seems important for more expressive yet intelligible NAMs. Another interesting avenue is developing better activation functions or feature representations for easily expressing complex functions using NAMs. For example, fourier features [43] have been shown to be highly effective for learning high frequency functions via neural networks and might be useful for training expressive NAMs.
|
| 185 |
+
|
| 186 |
+
Extending and applying NAMs beyond tabular data to more complex tasks with high-dimensional inputs, such as computer vision and language understanding, is an exciting avenue for future work. While NAMs only use some of the expressivity of DNNs, one can imagine using NAMs in a realworld pipeline where intelligibility is required for decision making from representation [36] (e.g., features learned from images, speech etc). Much of the existing interpretability work in deep learning focuses on making learned representations interpretable. Also, NAMs can be used for interpretability across multiple raw features (e.g., multimodal inputs) where interpretability within a NAM network can utilize existing interpretability methods in ML – recently CNN-LSTM based extension of NAMs have already been developed for genomics [40] where the input to each NAM network was a one-hot encoded DNA sequence (passed as an image). Overall, we believe that NAMs are likely to broaden the use of inherently interpretable models in the deep learning community.
|
| 187 |
+
|
| 188 |
+
# Broader Impact
|
| 189 |
+
|
| 190 |
+
Interpretability in AI systems might be desirable or necessary for various reasons – see [44] for an overview; we discuss some of them in the context of NAMs below:
|
| 191 |
+
|
| 192 |
+
• Safeguarding against bias: NAMs can check whether training data is used in ways that result in bias or discriminatory outcomes and can be easily corrected for bias to yield possibly more fair models – e.g., Section 4.2.2 demonstrates this utility for recidivism risk prediction.
|
| 193 |
+
• Improving AI system design: NAMs allow developers to interrogate why it behaved in a certain way (e.g., tracking system malfunctions), and develop improvements – Section A.1 shows that NAMs can explain seemingly anomalous results in healthcare as well as uncover problems that might put some kinds of patients at risk and need correction before deploying the system.
|
| 194 |
+
• Adhering to regulatory standards or policy requirements: Interpretability of NAMs can be important in enforcing legal rights surrounding a system – e.g., credit scores in the United States, have a well-established “right to explanation”. NAMs can also enable individuals to contest model outputs, e.g., challenging an unsuccessful loan application, based on the interpretations provided by NAMs for a specific decision (Figure 5).
|
| 195 |
+
• Assessing risk, robustness, and vulnerability: This can be particularly important if an AI system is deployed in a new environment, where we cannot be sure of its effectiveness – e.g., NAMs for fraud detection (Section A.2.2) can be analyzed to understand the risks involved or how it might fail before deploying it to unseen customers.
|
| 196 |
+
• Giving users confidence in the system: Interpretations from NAMs might provide users confidence that it works as intended – e.g., expensive house prices near metropolitan areas such as San Francisco, as predicted by NAMs (Figure 6), is expected for a trustworthy model.
|
| 197 |
+
• Data-driven scientific discovery: NAMs can be applied in natural sciences – e.g., ecology [12], medicine [13], astronomy [15] etc. – to obtain novel scientific insights and discoveries from observational or simulated data [34, 45] while remaining scalable to the ever-increasing data.
|
| 198 |
+
|
| 199 |
+
There are also pitfalls associated with interpretability methods – NAMs are no exception. Different contexts give rise to different interpretability needs – e.g., public have different expectations of systems used in healthcare vs. recruitment [19]. Furthermore, AI system designs often need to balance competing demands – e.g., to optimize the accuracy of a system or ensure fairness (NAMs for making bail decisions with race feature “removed” may be less accurate but more fair). In many critical decision-making areas – e.g., healthcare, justice, and public services – complex processes have developed over time to provide safeguards, audit functions, or other forms of accountability. NAMs may therefore be only the first step in creating trustworthy systems. Those developing NAMs must consider how their use fits in the wider socio-technical context of its deployment
|
| 200 |
+
|
| 201 |
+
# Acknowledgments
|
| 202 |
+
|
| 203 |
+
We would like to thank Kevin Swersky for reviewing an early draft of the paper. We also thank Sarah Tan for providing us with pre-processed versions of some of the datasets used in the paper. RA would also like to thank Marlos C. Machado and Marc G. Bellemare for helpful discussions.
|
| 204 |
+
|
| 205 |
+
# References
|
| 206 |
+
|
| 207 |
+
There’s software used across the country to predict future criminals. And it’s biased against blacks, 2016. URL https://www.propublica.org/article/ machine-bias-risk-assessments-in-criminal-sentencing. [Accessed February 1, 2020]. [2] Devansh Arpit, Stanislaw Jastrzkebski, Nicolas Ballas, David Krueger, Emmanuel Bengio, Maxinder S Kanwal, Tegan Maharaj, Asja Fischer, Aaron Courville, Yoshua Bengio, et al. A closer look at memorization in deep networks. ICML, 2017. [3] Richard Berk, Hoda Heidari, Shahin Jabbari, Michael Kearns, and Aaron Roth. Fairness in criminal justice risk assessments: The state of the art. Sociological Methods & Research, 2018.
|
| 208 |
+
[4] Rich Caruana. Multitask learning. Machine Learning, 1997.
|
| 209 |
+
[5] Rich Caruana, Yin Lou, Johannes Gehrke, Paul Koch, Marc Sturm, and Noemie Elhadad. Intelligible models for healthcare: Predicting pneumonia risk and hospital 30-day readmission. SIGKDD, 2015.
|
| 210 |
+
[6] Tianqi Chen and Carlos Guestrin. XGBoost: A scalable tree boosting system. SIGKDD, 2016.
|
| 211 |
+
[7] Andrea Dal Pozzolo. Adaptive machine learning for credit card fraud detection. PhD Thesis, Department of Computer Science, Université Libre de Bruxelles, 2015. [8] Julia Dressel and Hany Farid. The accuracy, fairness, and limits of predicting recidivism. Science advances, 2018.
|
| 212 |
+
[9] FICO. FICO Explainable Machine Learning Challenge. https://community.fico.com/s/ explainable-machine-learning-challenge, 2018.
|
| 213 |
+
[10] Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. AISTATS, 2010.
|
| 214 |
+
[11] Daniel Golovin, Benjamin Solnik, Subhodeep Moitra, Greg Kochanski, John Karro, and D Sculley. Google vizier: A service for black-box optimization. SIGKDD, 2017.
|
| 215 |
+
[12] Antoine Guisan, Thomas C Edwards Jr, and Trevor Hastie. Generalized linear and generalized additive models in studies of species distributions: setting the scene. Ecological modelling, 2002.
|
| 216 |
+
[13] T Hastie and R Tibshirani. Generalized additive models for medical research. Statistical methods in medical research, 1995.
|
| 217 |
+
[14] Trevor Hastie and Robert Tibshirani. Generalized Additive Models. Chapman and Hall/CRC, 1990.
|
| 218 |
+
[15] M W Hattab, R S de Souza, B Ciardi, J-P Paardekooper, S Khochfar, and C Dalla Vecchia. A case study of hurdle and generalized additive models in astronomy: the escape of ionizing radiation. Monthly Notices of the Royal Astronomical Society, 2018.
|
| 219 |
+
[16] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. CVPR, 2015.
|
| 220 |
+
[17] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. CVPR, 2016.
|
| 221 |
+
[18] Kurt Hornik, Maxwell Stinchcombe, Halbert White, et al. Multilayer feedforward networks are universal approximators. Neural Networks, 1989.
|
| 222 |
+
[19] ICO. Project explain: Interim report. 2019. https://ico.org.uk/media/2615039/ project-explain-20190603.pdf.
|
| 223 |
+
[20] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 224 |
+
[21] Alex Krizhevsky. Convolutional deep belief networks on cifar-10. 2010.
|
| 225 |
+
[22] Christine K Lee, Muntaha Samad, Ira Hofer, Maxime Cannesson, and Pierre Baldi. Development and validation of an interpretable neural network for prediction of postoperative in-hospital mortality. NPJ digital medicine, 2021.
|
| 226 |
+
[23] Yin Lou, Rich Caruana, and Johannes Gehrke. Intelligible models for classification and regression. SIGKDD, 2012.
|
| 227 |
+
[24] Yin Lou, Rich Caruana, Johannes Gehrke, and Giles Hooker. Accurate intelligible models with pairwise interactions. SIGKDD, 2013.
|
| 228 |
+
[25] Vinod Nair and Geoffrey E Hinton. Rectified linear units improve restricted boltzmann machines. ICML, 2010.
|
| 229 |
+
[26] Harsha Nori, Samuel Jenkins, Paul Koch, and Rich Caruana. Interpretml: A unified framework for machine learning interpretability. arXiv preprint arXiv:1909.09223, 2019.
|
| 230 |
+
[27] R Kelley Pace and Ronald Barry. Sparse spatial autoregressions. Statistics & Probability Letters, 1997.
|
| 231 |
+
[28] Fabian Pedregosa, Gaël Varoquaux, Alexandre Gramfort, Vincent Michel, Bertrand Thirion, Olivier Grisel, Mathieu Blondel, Peter Prettenhofer, Ron Weiss, Vincent Dubourg, et al. Scikitlearn: Machine learning in python. JMLR, 2011.
|
| 232 |
+
[29] William JE Potts. Generalized additive neural networks. SIGKDD, 1999.
|
| 233 |
+
[30] ProPublica. COMPAS Data and analysis for ‘Machine Bias’. https://github.com/ propublica/compas-analysis, 2016.
|
| 234 |
+
[31] Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. 2018.
|
| 235 |
+
[32] Nasim Rahaman, Aristide Baratin, Devansh Arpit, Felix Draxler, Min Lin, Fred A Hamprecht, Yoshua Bengio, and Aaron Courville. On the spectral bias of neural networks. ICML, 2018.
|
| 236 |
+
[33] Marco Tulio Ribeiro, Sameer Singh, and Carlos Guestrin. " why should i trust you?" explaining the predictions of any classifier. SIGKDD, 2016.
|
| 237 |
+
[34] Ribana Roscher, Bastian Bohn, Marco F Duarte, and Jochen Garcke. Explainable machine learning for scientific insights and discoveries. arXiv preprint arXiv:1905.08883, 2019.
|
| 238 |
+
[35] Cynthia Rudin. Stop explaining black box machine learning models for high stakes decisions and use interpretable models instead. Nature Machine Intelligence, 2019.
|
| 239 |
+
[36] Cynthia Rudin, Chaofan Chen, Zhi Chen, Haiyang Huang, Lesia Semenova, and Chudi Zhong. Interpretable machine learning: Fundamental principles and 10 grand challenges. arXiv preprint arXiv:2103.11251, 2021.
|
| 240 |
+
[37] David E Rumelhart, Geoffrey E Hinton, and Ronald J Williams. Learning representations by back-propagating errors. Nature, 1986.
|
| 241 |
+
[38] Mohammed Saeed, Mauricio Villarroel, Andrew T Reisner, Gari Clifford, Li-Wei Lehman, George Moody, Thomas Heldt, Tin H Kyaw, Benjamin Moody, and Roger G Mark. Multiparameter intelligent monitoring in intensive care ii (mimic-ii): a public-access intensive care unit database. Critical care medicine, 2011.
|
| 242 |
+
[39] Jasper Snoek, Hugo Larochelle, and Ryan P Adams. Practical bayesian optimization of machine learning algorithms. NeurIPS, 2012.
|
| 243 |
+
[40] Divyanshi Srivastava, Begüm Aydin, Esteban O Mazzoni, and Shaun Mahony. An interpretable bimodal neural network characterizes the sequence and preexisting chromatin predictors of induced transcription factor binding. Genome Biology, 2021.
|
| 244 |
+
[41] Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. JMLR, 2014.
|
| 245 |
+
[42] Sarah Tan, Rich Caruana, Giles Hooker, and Yin Lou. Distill-and-compare: Auditing black-box models using transparent model distillation. AAAI/ACM Conference on AI, Ethics, and Society, 2018.
|
| 246 |
+
[43] Matthew Tancik, Pratul P Srinivasan, Ben Mildenhall, Sara Fridovich-Keil, Nithin Raghavan, Utkarsh Singhal, Ravi Ramamoorthi, Jonathan T Barron, and Ren Ng. Fourier features let networks learn high frequency functions in low dimensional domains. arXiv preprint arXiv:2006.10739, 2020.
|
| 247 |
+
[44] The Royal Society. Explainable AI: The Basics - Policy Briefing. 2019. https://royalsociety.org/-/media/policy/projects/explainable-ai/ AI-and-interpretability-policy-briefing.pdf.
|
| 248 |
+
|
| 249 |
+
[45] The Royal Society and The Alan Turing Institute. The AI revolution in scientific research. 2019. https://royalsociety.org/-/media/policy/projects/ai-and-society/ AI-revolution-in-science.pdf.
|
| 250 |
+
|
| 251 |
+
[46] Lev V Utkin, Egor D Satyukov, and Andrei V Konstantinov. Survnam: The machine learning survival model explanation. arXiv preprint arXiv:2104.08903, 2021.
|
| 252 |
+
|
| 253 |
+
# Checklist
|
| 254 |
+
|
| 255 |
+
1. For all authors...
|
| 256 |
+
|
| 257 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
|
| 258 |
+
(b) Did you describe the limitations of your work? [Yes]
|
| 259 |
+
(c) Did you discuss any potential negative societal impacts of your work? [Yes]
|
| 260 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 261 |
+
|
| 262 |
+
2. If you are including theoretical results...
|
| 263 |
+
|
| 264 |
+
(a) Did you state the full set of assumptions of all theoretical results? [N/A] (b) Did you include complete proofs of all theoretical results? [N/A]
|
| 265 |
+
|
| 266 |
+
3. If you ran experiments...
|
| 267 |
+
|
| 268 |
+
(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]
|
| 269 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes]
|
| 270 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes]
|
| 271 |
+
(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]
|
| 272 |
+
|
| 273 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 274 |
+
|
| 275 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes]
|
| 276 |
+
(b) Did you mention the license of the assets? [Yes]
|
| 277 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [N/A]
|
| 278 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [Yes]
|
| 279 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [Yes]
|
| 280 |
+
|
| 281 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 282 |
+
|
| 283 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 284 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 285 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|
md/train/yJqcM36Qvnu/yJqcM36Qvnu.md
ADDED
|
@@ -0,0 +1,303 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Federated Graph Classification over Non-IID Graphs
|
| 2 |
+
|
| 3 |
+
Han Xie, Jing Ma, Li Xiong, Carl Yang⇤ Department of Computer Science, Emory University {han.xie, jing.ma, lxiong, j.carlyang}@emory.edu
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
Federated learning has emerged as an important paradigm for training machine learning models in different domains. For graph-level tasks such as graph classification, graphs can also be regarded as a special type of data samples, which can be collected and stored in separate local systems. Similar to other domains, multiple local systems, each holding a small set of graphs, may benefit from collaboratively training a powerful graph mining model, such as the popular graph neural networks (GNNs). To provide more motivation towards such endeavors, we analyze real-world graphs from different domains to confirm that they indeed share certain graph properties that are statistically significant compared with random graphs. However, we also find that different sets of graphs, even from the same domain or same dataset, are non-IID regarding both graph structures and node features. To handle this, we propose a graph clustered federated learning (GCFL) framework that dynamically finds clusters of local systems based on the gradients of GNNs, and theoretically justify that such clusters can reduce the structure and feature heterogeneity among graphs owned by the local systems. Moreover, we observe the gradients of GNNs to be rather fluctuating in GCFL which impedes high-quality clustering, and design a gradient sequence-based clustering mechanism based on dynamic time warping $\mathrm { ( G C F L + ) }$ ). Extensive experimental results and in-depth analysis demonstrate the effectiveness of our proposed frameworks.
|
| 8 |
+
|
| 9 |
+
# 1 Introduction
|
| 10 |
+
|
| 11 |
+
Federated learning (FL) as a distributed learning paradigm that trains centralized models on decentralized data has attracted much attention recently [28, 53, 25, 18, 17]. FL allows local systems to benefit from each other while keeping their own data private. Especially, for local systems with scarce training data or lack of diverse distributions, FL provides them with the potentiality to leverage the power of data from others, in order to facilitate the performance on their own local tasks. One important problem FL concerns is data distribution heterogeneity, since the decentralized data, collected by different institutes using different methods and aiming at different tasks, are highly likely to follow non-identical distributions. Prior works approach this problem from different aspects, including optimization process [25, 18], personalized FL [13, 6, 8], clustered FL [9, 15, 2], etc.
|
| 12 |
+
|
| 13 |
+
As more advanced techniques are developed for learning with graph data, using graphs to model and solve real-world problems becomes more popular. One important scenario of graph learning is graph classification, where models such as graph kernels [44, 34, 36, 45] and graph neural networks [21, 43, 49, 46, 47, 48] are used to predict graph-level labels based on the features and structures of graphs. One real scenario of graph classification is molecular property prediction, which is an important task in cheminformatics and AI medicine. In the area of bioinformatics, graph classification can be used to learn the representation of proteins and classify them into enzymes or non-enzymes. For collaboration networks, sub-networks can be classified regarding the information of research areas, topics, genre, etc. More applicable scenarios include geographic networks, temporal networks, etc.
|
| 14 |
+
|
| 15 |
+
Since the key idea of $\mathrm { F L }$ is the sharing of underlying common information, as $\mathbb { \left[ \left[ 2 3 \right] \right] }$ discusses that real-world graphs preserve many common properties, we become curious about the question, whether real-world graphs from heterogeneous sources (e.g., different datasets or even divergent domains) can provide useful common information among each other? To understand this question, we first conduct preliminary data analysis to explore real-world graph properties, and try to find clues about common patterns shared among graphs across datasets. As shown in Table $\bigstar$ we analyze four typical datasets from different domains, i.e., PTC_MR (molecular structures), ENZYMES (protein structures), IMDB-BINARY (social communities), and MSRC_21 (superpixel networks). We find them to indeed share certain properties that are statistically significant compared to random graphs with the same numbers of nodes and links (generated with the Erdos–Rényi model [ ˝ 7, 10]). Such observations confirm the claim about common patterns underlying real-world graphs, which can largely influence the graph mining models and motivates us to consider the FL of graph classification across datasets and even domains. More details and discussion about Table 1 can be found in Appendix A.
|
| 16 |
+
|
| 17 |
+
Table 1: Data analysis on important graph properties shared among real-world graphs across different domains. For example, large Kurtosis values $\textcircled { 1 3 2 } \textcircled { 1 }$ indicate long-tail distribution of node degrees, which is observed in ENZYMES, IMDB-BINARY, and MSRC_21; similar average shortest path lengths are observed in PTC_MR, ENZYMES, and MSRC_21, although their actual graph sizes are rather different; large CC are observed in ENZYMES, IMDB-BINARY, and MSRC_21 and large LC are observed in almost all graphs.
|
| 18 |
+
|
| 19 |
+
<table><tr><td>Property</td><td colspan="3">kurtosis of degree distribution</td><td colspan="3">avg. shortest path length</td><td colspan="3">largest component size (LC,%)</td><td colspan="3">clustering coefficient (CC)</td></tr><tr><td></td><td>real</td><td>random</td><td>p-value</td><td>real</td><td>random</td><td>p-value</td><td>real</td><td>random</td><td>p-value</td><td>real</td><td>random</td><td>p-value</td></tr><tr><td>PTC_MR (molecules)</td><td>2.1535</td><td>2.4424</td><td>0.9999</td><td>3.36</td><td>2.42</td><td>~0</td><td>100</td><td>82.68</td><td>~0</td><td>0.0095</td><td>0.1201</td><td>~0</td></tr><tr><td>ENZYMES (proteins)</td><td>3.0106</td><td>2.8243</td><td>0.0027</td><td>4.44</td><td>2.56</td><td>~0</td><td>98.24</td><td>97.69</td><td>0.2054</td><td>0.4516</td><td>0.1425</td><td>~0</td></tr><tr><td>IMDB-BINARY (social)</td><td>8.9262</td><td>2.2791</td><td>~0</td><td>1.48</td><td>1.54</td><td>~0</td><td>100</td><td>99.93</td><td>0.0023</td><td>0.9471</td><td>0.5187</td><td>~0</td></tr><tr><td>MSRC_21 (superpixel)</td><td>3.6959</td><td>2.9714</td><td>~0</td><td>4.09</td><td>2.81</td><td>~0</td><td>100</td><td>99.43</td><td>~0</td><td>0.5147</td><td>0.0655</td><td>~0</td></tr></table>
|
| 20 |
+
|
| 21 |
+
Although common patterns exist among graph datasets, we can still observe certain heterogeneity. In fact, the detailed graph structure distributions and node feature distributions can both diverge due to various reasons. To demonstrate this, we design and evaluate a structure heterogeneity measure and a feature heterogeneity measure in different scenarios (c.f. Section $\boxed { 4 . 1 }$ . We refer to the graphs possibly with significant heterogeneity in our cross-dataset FL setting as non-IID graphs, which concerns both structure non-IID and feature non-IID, where naïve FL algorithms like FedAvg $\left. \boldsymbol { \widetilde { 2 8 } } \right.$ can fail and even backfire (c.f. Section $6 . 2 )$ . Moreover, as the heterogeneity varies from case to case, a dynamic FL algorithm is needed to keep track of such heterogeneity of non-IID graphs while conducting collaborative model training.
|
| 22 |
+
|
| 23 |
+
Due to the observations that the graphs in one client can be similar to those in some clients but not the others, we get motivated by $\bar { \mathbb { D } }$ and find it intuitive to consider a clustered FL framework, which assigns local clients to multiple clusters with less data heterogeneity. To this end, we propose a novel graph-level clustered FL framework (termed GCFL) through integrating the powerful graph neural networks (GNNs) such as GIN $\mathbb { \lVert \underline { { 4 3 } } \rVert }$ into clustered FL, where the server can dynamically cluster the clients based on the gradients of GNN without additional prior knowledge, while collaboratively training multiple GNNs as necessary for homogeneous clusters of clients. We theoretically analyze that the model parameters of GNN indeed reflect the structures and features of graphs, and thus using the gradients of GNN for clustering in principle can yield clusters with reduced heterogeneity of both structures and features. In addition, we conduct empirical analysis to support the motivation of clustered FL across heterogeneous graph datasets in Appendix A.
|
| 24 |
+
|
| 25 |
+
Although GCFL can theoretically achieve homogeneous clusters, during its training, we observe that the gradients transmitted at each communication round fluctuate a lot (c.f. Section $\bar { 5 } . 1 )$ , which could be caused by the complicated interactions among clients regarding both structure and feature heterogeneity, making the local gradients towards divergent directions. In the vanilla GCFL framework, the server calculates a matrix for clustering only based on the last transmitted gradients, which ignores the client’s multi-round behaviors. Therefore, we further propose an improved version of GCFL with gradient-series-based clustering (termed ${ \mathrm { G C F L } } +$ ).
|
| 26 |
+
|
| 27 |
+
We conduct extensive experiments with various settings to demonstrate the effectiveness of our frameworks. Moreover, we provide in-depth analysis on the capability of them on reducing both structure and feature heterogeneity of clients through clustering. Lastly, we analyze the convergence of our frameworks. The experimental results show surprisingly positive results brought by our novel setting of cross-dataset/cross-domain FL for graph classification, where our ${ \mathrm { G C F L } } +$ framework can effectively and consistently outperform other straightforward baselines.
|
| 28 |
+
|
| 29 |
+
# 2 Related works
|
| 30 |
+
|
| 31 |
+
Federated Learning Federated learning (FL) has gained increasing attention as a training paradigm under the setting where data are distributed at remote devices and models are collaboratively trained under the coordination of a central server. FedAvg was first proposed by $ { \mathbb { \left[ \left[ 2 7 \right] \right] } }$ which illustrates the general setting of an FL framework. Since the original FedAvg relies on the optimization by SGD, data of non-IID distribution will not guarantee the stochastic gradients to be an unbiased estimation of the full gradients, thus hurting the convergence of FL. In fact, multiple experiments $\pm \Sigma \boxed { 2 5 } \boxed { 1 8 }$ have shown that the convergence will be slow and unstable, and the accuracy will degrade with FedAvg when data at each client are statistically heterogeneous (non-IID). [53, 15, 12] proposed different data sharing strategies to tackle the data heterogeneity problem by sharing the local device data or serverside proxy data, which still requires certain public common data, whereas other studies explored the convergence guarantee under the non-IID setting by assuming bounded gradients $\textcircled { 1 3 9 } , \textcircled { 5 1 }$ or additional noise $\mathbb { \lVert \rVert }$ . There are also works seeking to reduce the variance of the clients $\mathbb { P } \bot \bot \bot \bot \bot \bot $ . Furthermore, multiple works have been proposed to explore the connection between model-agnostic meta-learning (MAML) and personalized federated learning [8, 4]. They aim to learn a generalizable global model and then fine-tune it on local clients, which may still fail when data on local clients are from divergent domains with high heterogeneity. Some personalized FL works $\mathbb { H } \mathbb { L } \mathbb { 4 } \mathbb { I }$ studied the bi-level problem of optimization which decouples the local and global optimization, but having each client maintain its own model can lead to high communication cost among the clients and the server. While personalization in the FL setting can address the client heterogeneity problem to some extent, the clustered FL framework [33] can incorporate personalization at the group level to keep the benefits of personalized FL and reduce the communication cost simultaneously.
|
| 32 |
+
|
| 33 |
+
Federated Learning on Graphs Although FL has been intensively studied with Euclidean data such as images, there exist few studies about FL for graph data. $\lVert 2 2 \rVert$ first introduced FL on graph data, by regarding each client as a node in a graph. [3] studied the cross-domain heterogeneity problem in FL by leveraging Graph Convolutional Networks (GCNs) to model the interaction between domains. $\mathbb { \left. 2 9 \right. }$ studied spatio-temporal data modeling in the FL setting by leveraging a Graph Neural Network (GNN) based model to capture the spatial relationship among clients. [5] proposed a generalized federated knowledge graph embedding framework that can be applied for multiple knowledge graph embedding algorithms. Moreover, there are several works exploring the GNNs under the FL setting: [16, 54, 40] focused on the privacy issue of federated GNNs; $\bar { \big [ } \bar { \big | } 3 7 \big | \big ]$ incorporated model-agnostic metalearning (MAML) into graph FL, which handled non-IID graph data while also preserving the model generalizability; $\pmb { \Vert 5 2 \Vert }$ studied the missing neighbor generation problem in the subgraph FL setting; $ { \bar { \mathbf { \delta } } }$ proposed a computationally efficient way of GCN architecture search with FL; $\bar { \mathbb { m } } ^ { \bar { | } }$ implemented an open FL benchmark system for GNNs. Most existing works consider node classification and link prediction on graphs, which cannot be trivially applied to our graph classification setting.
|
| 34 |
+
|
| 35 |
+
# 3 Preliminaries
|
| 36 |
+
|
| 37 |
+
# 3.1 Graph Neural Networks (GNNs)
|
| 38 |
+
|
| 39 |
+
$\lVert \rVert 2 \rVert$ provides a taxonomy that categorizes Graph Neural Networks (GNNs) into recurrent GNNs, convolutional GNNs, graph autoencoders, and spatial-temporal GNNs. In general, given the structure and feature information of a graph $G = ( V , E , X )$ , where $V$ , $E$ , $X$ denote nodes, links and node features, GNNs target to learn the representations of graphs, such as a node embedding $h _ { v } \in \mathbb { R } ^ { d _ { v } }$ , or a graph embedding $\boldsymbol { h } _ { G } \in \mathbb { R } ^ { d _ { G } }$ . A GNN typically consists of message propagation and neighborhood aggregation, in which each node iteratively gathers the information propagated by its neighbors, and aggregates them with its own information to update its representation. Generally, an $L$ -layer GNN can be formulated as
|
| 40 |
+
|
| 41 |
+
$$
|
| 42 |
+
h _ { v } ^ { ( l + 1 ) } = \sigma ( h _ { v } ^ { ( l ) } , a g g ( \{ h _ { u } ^ { ( l ) } ; u \in \mathcal { N } _ { v } \} ) ) , \forall l \in [ L ] ,
|
| 43 |
+
$$
|
| 44 |
+
|
| 45 |
+
where $h _ { v } ^ { ( l ) }$ is the representation of node $v$ at the $l ^ { t h }$ layer, and $h _ { v } ^ { ( 0 ) } = x _ { v }$ is the node feature. $\mathcal { N } _ { v }$ is neighbors of node $v$ , $a g g ( \cdot )$ is an aggregation function that can vary for different GNN variants, and $\sigma$ represents an activation function.
|
| 46 |
+
|
| 47 |
+
For a graph-level representation $h _ { G }$ , it can be pooled from the representations of all nodes, as
|
| 48 |
+
|
| 49 |
+
$$
|
| 50 |
+
h _ { G } = r e a d o u t ( \{ h _ { v } ; v \in V \} ) ,
|
| 51 |
+
$$
|
| 52 |
+
|
| 53 |
+
where readout $\left( \cdot \right)$ can be implemented as mean pooling, sum pooling, etc, which essentially aggregates the embeddings of all nodes on the graph into a single embedding vector to achieve tasks like graph classification and regression.
|
| 54 |
+
|
| 55 |
+
# 3.2 The FedAvg algorithm
|
| 56 |
+
|
| 57 |
+
McMahan et al. $\left[ \left[ 2 8 \right] \right]$ proposed an SGD-based aggregating algorithm, FedAvg, based on the fact that SGD is widely used and powerful for optimization. FedAvg is the first basic FL algorithm and is commonly used as the starting point for more advance FL framework design.
|
| 58 |
+
|
| 59 |
+
The key idea of FedAvg is to aggregate the updated model parameters transmitted from local clients and then re-distribute the averaged parameters back to each client. Specifically, given $m$ clients in total, at each communication round $t$ , the server first samples a partition of clients $\{ \mathbb { S } _ { i } \} ^ { ( t ) }$ . For each client $\mathbb { S } _ { i }$ in $\{ \mathbb { S } _ { i } \} ^ { ( t ) }$ , it trains the model downloaded from the server locally with its own data distribution $\mathcal { D } _ { i }$ for $E _ { l o c a l }$ epochs. The client $\mathbb { S } _ { i }$ then transmits its updated parameters $w _ { i } ^ { ( t ) }$ to the server, and the server will aggregate these updates by
|
| 60 |
+
|
| 61 |
+
$$
|
| 62 |
+
w ^ { ( t + 1 ) } = \sum _ { i = 1 } ^ { m } \frac { | D _ { i } | } { | D | } w _ { i } ^ { ( t ) } ,
|
| 63 |
+
$$
|
| 64 |
+
|
| 65 |
+
where $| D _ { i } |$ is the size of data samples in client $\mathbb { S } _ { i }$ and $| D |$ is the total size of samples over all clients. After generating the aggregated parameters (the global model updates), the server broadcasts the new parameters $w ^ { ( t + 1 ) }$ to remote clients, and at the $( t + 1 )$ round clients use $w ^ { ( t + 1 ) }$ to start their local training for another $E _ { l o c a l }$ epochs.
|
| 66 |
+
|
| 67 |
+
# 4 The GCFL framework
|
| 68 |
+
|
| 69 |
+
# 4.1 Non-IID structures and features across clients
|
| 70 |
+
|
| 71 |
+
From Table 1 we notice that real-world graphs tend to share certain general properties across different graphs, datasets and even domains, which motivates the graph-level FL framework. However, there still exist differences when the detailed graph structures and node features are being considered. In Table $^ { 2 , }$ we present the average pair-wise structure heterogeneity and feature heterogeneity among graphs in a single dataset, a single domain, and across different domains. Specifically, for structure heterogeneity, we use the Anonymous Walk Embeddings (AWEs) $[ \left| 1 4 \right| ]$ to generate a representation for each graph, and compute the Jensen-Shannon distance between the AWEs of each pair of graphs; for feature heterogeneity, we calculate the empirical distribution of feature similarity between all pairs of linked nodes in each graph, and compute the Jensen-Shannon divergence between the feature similarity distributions of each pair of graphs.
|
| 72 |
+
|
| 73 |
+
As we can observe in Table $\boxed { 2 } ,$ both graph structures and features demonstrate different levels of heterogeneity within a single dataset, a single domain, and across different domains. We refer to graphs with such structure and feature heterogeneity as non-IID graphs. Intuitively, directly applying naïve FL algorithms like FedAvg on clients with non-IID graphs can be ineffective and even backfiring. To be specific, structure heterogeneity makes it difficult for a model to capture the universally important graph structure patterns across different clients, whereas feature heterogeneity makes it hard for a model to learn the universally appropriate message propagation functions across different clients. How can we leverage the shared graph properties among clients while addressing the non-IID structures and features across clients?
|
| 74 |
+
|
| 75 |
+
# 4.2 Problem formulation
|
| 76 |
+
|
| 77 |
+
Motivated by our real graph data analysis in Tables 1 and 2, we propose a novel framework of Graph Clustered Federated Learning (GCFL). The main idea of GCFL is to jointly find clusters of clients with graphs of similar structures and features, and train the graph mining models with FedAvg among clients in the same clusters.
|
| 78 |
+
|
| 79 |
+
Specifically, we are inspired by the Clustered Federated Learning (CFL) framework on Euclidean data $\mathbb { \lVert 3 3 \rVert }$ and consider a clustered FL setting with one central server and a set of $n$ local clients $\{ \mathbb { S } _ { 1 } , \mathbb { S } _ { 2 } , \ldots , \mathbb { S } _ { n } \}$ . Different from the traditional FL setting, the server can dynamically cluster the clients into a set of clusters $\{ \mathbb { C } _ { 1 } , \mathbb { C } _ { 2 } , \ldots \}$ and maintain $m$ cluster-wise models. In our GCFL setting, each local client $\mathbb { S } _ { i }$ owns a set of graphs $\mathcal { \bar { G } } _ { i } = \{ G _ { 1 } , G _ { 2 } , . . . \}$ , where each $G _ { j } = ( V _ { j } , E _ { j } , X _ { j } , y _ { j } ) \in \bar { \mathcal { G } } _ { i }$ is a graph data sample with a set of nodes $V _ { j }$ , a set of edges $E _ { j }$ , node features $X _ { j }$ , and a graph class label $y _ { j }$ . The task on each local client $\mathbb { S } _ { i }$ is graph classification that predicts the class label $\hat { y } _ { j } ~ = ~ h _ { k } ^ { * } ( G _ { j } )$ for each graph $G _ { j } ~ \in ~ \mathcal { G } _ { i }$ , where $h _ { k } ^ { * }$ is the collaboratively learned optimal graph mining model for cluster $\mathbb { C } _ { k }$ to which $\mathbb { S } _ { i }$ belongs. Our goal is to minimize the loss function $F ( \Theta _ { k } ) : = \operatorname { E } _ { \mathbb { S } _ { i } \in \mathbb { C } _ { k } } [ f ( \theta _ { k , i } ; \mathcal { G } _ { i } ) ]$ , for all clusters $\{ \mathbb { C } _ { k } \bar \}$ . The function $f ( \theta _ { k , i } ; \mathcal { G } _ { i } )$ is a local loss function for client $\mathbb { S } _ { i }$ which belongs to cluster $\mathbb { C } _ { k }$ . In the meantime, we also aim to maintain a dynamic cluster assignment $\Gamma ( \mathbb { S } _ { i } ) \to \{ \mathbb { C } _ { k } \}$ based on the $\mathrm { F L }$ process.
|
| 80 |
+
|
| 81 |
+
Table 2: Summary of the average heterogeneity of features and structures for some datasets. In general, the structure heterogeneity increases from the settings of one dataset to across-dataset, and to across-domain. However, the feature heterogeneity is more case-by-case, and the high variances indicate that graphs could have large feature divergence even within the same dataset. Additionally, it is not necessarily true that one dataset itself should be more homogeneous (e.g., IMDB-BINARY).
|
| 82 |
+
|
| 83 |
+
<table><tr><td>dataset</td><td>IMDB-BINARY (social)</td><td>CoX2 (molecules)</td><td>Cox2 (molecules) PTC_MR (molecules)</td><td>Cox2 (molecules) ENZYMES (proteins)</td><td>Cox2 (molecules) IMDB-BINARY (sOCial)</td></tr><tr><td>avg. struc. hetero.</td><td>0.4406 (±0.0397)</td><td>0.3246 (±0.0145)</td><td>0.3689 (±0.0540)</td><td>0.5082 (±0.0399)</td><td>0.6079 (±0.0331)</td></tr><tr><td>avg. feat. hetero.</td><td>0.1785 (±0.1226)</td><td>0.0427 (±0.0314)</td><td>0.1837(±0.1065)</td><td>0.1912 (±0.1000)</td><td>0.1642 (±0.1006)</td></tr></table>
|
| 84 |
+
|
| 85 |
+
# 4.3 Technical design
|
| 86 |
+
|
| 87 |
+
GNNs are demonstrated to be powerful for learning graph representations and have been wildly used in graph mining. More importantly, the model parameters and their gradients of GNNs can reflect the graph structure and feature information (more details in Section $\bar { 4 . 4 ) }$ . Thus, we use GNNs as the graph mining model in our GCFL framework.
|
| 88 |
+
|
| 89 |
+
Specifically, our GCFL framework can dynamically cluster clients by leveraging their transmitted gradients $\{ \Delta \theta _ { i } \} _ { i = 1 } ^ { n }$ , in order to maximize the collaboration among more homogeneous clients and eliminate the harm from heterogeneous clients. According to $\mathbb { B } 3 \mathbb { I }$ , if the data distribution of clients are highly heterogeneous, the general FL that trains the clients together cannot jointly optimize all their local loss functions. In this case, after some rounds of communication, the general FL will be close to the stationary point, and the norm of clients’ transmitted gradients will not all tend towards zero. Therefore, clustering clients is needed as the general FL approaches to the stationary point. Here, we first introduce a hyper-parameter $\varepsilon _ { 1 }$ as a criterion to decide whether to stop the general FL based on whether a stationary point is approached, that is,
|
| 90 |
+
|
| 91 |
+
$$
|
| 92 |
+
\delta _ { m e a n } = \| \sum _ { i \in [ n ] } \frac { | \mathcal { G } _ { i } | } { | \mathcal { G } | } \Delta \theta _ { i } \| < \varepsilon _ { 1 } .
|
| 93 |
+
$$
|
| 94 |
+
|
| 95 |
+
In the meantime, if there exist some clients still with large norms of transmitted gradients, it means that clients in the group are highly heterogeneous, and thus clustering is needed to eliminate the negative influence among them. We then introduce the second criterion with a hyper-parameter $\varepsilon _ { 2 }$ to split the clusters when
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
\delta _ { m a x } = \operatorname* { m a x } ( \| \Delta \theta _ { i } \| ) > \varepsilon _ { 2 } > 0 .
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
The GCFL framework follows a top-down bi-partitioning mechanism. At each communication round $t$ , the server receives $m$ sets of gradients $\{ \{ \hat { \Delta } \theta _ { i _ { 1 } } \} , \{ \tilde { \Delta \theta } _ { i _ { 2 } } \} , \dots , \{ \Delta \theta _ { i _ { m } } \} \}$ from clients in clusters $\{ \mathbb { C } _ { 1 } , \mathbb { C } _ { 2 } , \ldots , \mathbb { C } _ { m } \}$ . For a cluster $\mathbb { C } _ { k }$ , if $\delta _ { m e a n } ^ { k }$ and $\delta _ { m a x } ^ { k }$ satisfy the Eqs. 4 and $\boxed { 5 } ,$ the server will calculate a cluster-wise cosine similarity matrix $\alpha _ { k }$ , and its entries are used as weights for building a full-connected graph with nodes being all clients within the cluster. The Stoer–Wagner minimum cut algorithm $\pmb { \Vert 3 5 \Vert }$ is then applied to the constructed graph, which bi-partitions the graph and divides the cluster $\mathbb { C } _ { k } \to \{ \mathbb { C } _ { k 1 } , \mathbb { C } _ { k 2 } \}$ . The clustering mechanism based on Eqs. $\boxed { 4 }$ and $\textcircled { 5 }$ can automatically and dynamically determine the number of clusters along the FL, while the two hyper-parameters $\varepsilon _ { 1 }$ and $\varepsilon _ { 2 }$ can be easily set through some simple experiments on the validation sets following $\mathbb { \lVert 3 3 \rVert }$ .
|
| 102 |
+
|
| 103 |
+
For a client $\mathbb { S } _ { i }$ in cluster $\mathbb { C } _ { k }$ , it tries to find $\widehat { \theta } _ { k , i }$ that is close to the real solution $\theta _ { k , i } ^ { * } ~ =$ $\mathrm { a r g m i n } _ { \theta _ { i } \in \Theta _ { k } } f ( \theta _ { k , i } ; \mathcal { G } _ { i } )$ . At a communication round $t$ , the client $\mathbb { S } _ { k }$ transmits its gradient to the server
|
| 104 |
+
|
| 105 |
+
$$
|
| 106 |
+
\Delta \theta _ { k , i } ^ { t } = \hat { \theta } _ { k , i } ^ { t } - \theta _ { k , i } ^ { t - 1 } .
|
| 107 |
+
$$
|
| 108 |
+
|
| 109 |
+
Since the server maintains the cluster assignments, it can aggregate the gradients cluster-wise by
|
| 110 |
+
|
| 111 |
+
$$
|
| 112 |
+
\theta _ { k } ^ { t + 1 } = \theta _ { k } ^ { t } + \sum _ { i \in [ n _ { k } ] } \Delta \theta _ { k , i } ^ { t } .
|
| 113 |
+
$$
|
| 114 |
+
|
| 115 |
+
# 4.4 Theoretical analysis
|
| 116 |
+
|
| 117 |
+
We investigate the problem of graph FL with multi-domain data distribution, and use the gradientbased FL paradigm $ { \mathbb { \left[ \left[ 2 7 \right] \right] } }$ to facilitate the model training. We theoretically analyze that the gradientbased FL algorithm on GNNs can in principle reduce the structure and feature heterogeneity in clusters, along with the task difference between data from different domains. We study two general problems in order to prove that the gradients can reflect the feature, structure, and task information.
|
| 118 |
+
|
| 119 |
+
Definition 4.1 Let a function $f : \mathcal { X } \mathcal { Y }$ which maps from the metric space $( \mathcal { X } , d )$ to $( \boldsymbol { \mathcal { V } } , \boldsymbol { d ^ { \prime } } )$ , the function $f$ is considered to have $\delta$ distortion $i f \forall u , v \in \mathcal { X }$ , ${ \textstyle \frac { 1 } { \delta } } d ( u , v ) \leq d ^ { \prime } ( f ( u ) , f ( v ) ) \leq d ( u , \dot { v } )$ .
|
| 120 |
+
|
| 121 |
+
Theorem 4.1 (Bourgain theorem $\pmb { I I I }$ ) Given an $n$ -point metric space $( \mathcal { X } , d )$ and an embedding function $f$ as defined above, $\forall u , v \in \mathcal { X }$ , there exist an embedding mapped from $( \mathcal { X } , d )$ to $\mathbb { R } ^ { k }$ with the distortion of the embedding being $O ( \log n )$ .
|
| 122 |
+
|
| 123 |
+
Problem 1. In GCFL which involves the communication of the gradients between graphs with heterogeneous structures distributed among different clients, the structure and feature difference can be captured by the GNN gradients.
|
| 124 |
+
|
| 125 |
+
For simplicity, we solve Problem 1 with the GNN of Simple Graph Convolutions (SGC) [41], through the following two propositions.
|
| 126 |
+
|
| 127 |
+
Proposition 4.1 Given a graph $G$ with fixed structure represented by the normalized graph Laplacian $\mathcal { L } = \widetilde { D } ^ { - \frac { 1 } { 2 } } \widetilde { A } \widetilde { D } ^ { - \frac { 1 } { 2 } }$ , feature represented with $X$ , and an SGC $f ( \mathcal { L } , X ) = s o f t m a x ( \mathcal { L } ^ { K } X \Theta )$ with weights $\Theta$ trained on graph $G$ . If we have another graph $G ^ { \prime }$ with different structure $\mathcal { L } ^ { \prime }$ , the weight difference $| | \Theta ^ { \prime } - \Theta | | _ { 2 }$ is bounded with the structure difference.
|
| 128 |
+
|
| 129 |
+
Proposition 4.2 Given a graph $G$ with fixed structure represented by the normalized graph Laplacian $\mathcal { L } = \widetilde { D } ^ { - \frac { 1 } { 2 } } \widetilde { A } \widetilde { D } ^ { - \frac { 1 } { 2 } }$ , feature represented with $X$ , and an SGC $f ( \mathcal { L } , X ) = s o f t m a x ( \mathcal { L } ^ { K } X \Theta )$ with weights $\Theta$ trained on graph $G$ . If we have another graph $G ^ { \prime }$ with different feature $\mathcal { X } ^ { \prime }$ , the weight difference $| | \Theta ^ { \prime } - \Theta | | _ { 2 }$ is bounded with the feature difference.
|
| 130 |
+
|
| 131 |
+
We prove proposition 4.1 and $\boxed { 4 . 2 }$ in Appendix B. We use the Bourgain theorem to bound the difference between embeddings generated with different graph structures/features, and prove that the feature and structure information of a graph is incorporated into the model weights (gradients). By proving that the model weights (gradients) are bounded with the structure/feature difference, we show that the gradients will change with the structure and feature. This further justifies that our proposed gradient based clustering framework GCFL is able to capture the structure and feature information. In addition, we also study the following problem, which allows our GCFL framework to be further extended to cross-task graph-level federated learning in the future.
|
| 132 |
+
|
| 133 |
+
Problem 2. The communicated gradients in GCFL can also capture the task heterogeneity.
|
| 134 |
+
|
| 135 |
+
Proposition 4.3 Given a graph $G$ with structure represented by the normalized graph Laplacian $\mathcal { L } = \widetilde { D } ^ { - \frac { 1 } { 2 } } \widetilde { A } \widetilde { D } ^ { - \frac { 1 } { 2 } }$ , and feature represented with $X$ , if trained with different tasks, we will get the Simple SGC with bounded weights.
|
| 136 |
+
|
| 137 |
+
The proof of proposition $4 . 3$ can be found in Appendix B.
|
| 138 |
+
|
| 139 |
+
# 5 $\mathrm { G C F L + : }$ improved GCFL based on observation sequences of gradients
|
| 140 |
+
|
| 141 |
+
# 5.1 Fluctuation of gradient norms
|
| 142 |
+
|
| 143 |
+
When observing the norm of gradients for each communication round in GCFL, as shown in Figure 1, we notice that: 1) the norm of gradients continuously fluctuates; 2) different clients can have divergent scales of gradient norms. The fluctuation of gradient norms and different scales indicate that the updating directions and distances of gradients for clients are diverse, which manifests the structure and feature heterogeneity in our setting again. In our vanilla GCFL framework, the server calculates a cosine similarity matrix based on the last transmitted gradients once the clustering criteria are satisfied. However, with the observation that the norm of gradients fluctuates along the communication round, albeit with the constraints of clustering criteria, GCFL clustering based on gradient-point could omit important client behaviors and be misled by noises. For example, in Figure $^ 1$ (a), GCFL performs clustering at round 119 based on the gradients at that round, which does not effectively find graphs with lower heterogeneity.
|
| 144 |
+
|
| 145 |
+

|
| 146 |
+
Figure 1: Norm of gradients versus communication round with six clients across datasets. Clients with datasets colored the same are split to the same cluster.
|
| 147 |
+
|
| 148 |
+
# 5.2 Technical design
|
| 149 |
+
|
| 150 |
+
Motivated by these observations, we propose an improved version of GCFL, named ${ \mathrm { G C F L } } +$ , which conducts clustering by taking series of gradient norms into consideration. In the ${ \mathrm { G C F L } } +$ framework, the server maintains a multi-variant time-series matrix $Q \in \mathbb { R } ^ { \{ n , d \} }$ , where $n$ is the number of clients and $d$ is the length of a gradient series being tracked. At each communication round $t$ , the server updates $Q$ by adding in the norm of gradients $\| \Delta \theta _ { i } ^ { t } \|$ to $Q ( i , : ) \in \mathbb { R } ^ { d }$ and remove the out-of-date one. ${ \mathrm { G C F L } } +$ uses the same clustering criteria as GCFL (Eqs. 4 and 5). If the clustering criteria are satisfied, the server will calculate a distance matrix $\beta$ in which each cell is the pair-wise distance of two series of gradients. Here, we use a technique called dynamic time warping (DTW) $\textcircled { \scriptsize { 1 3 1 } }$ t o measure the similarity between two data sequences. For a cluster $\mathbb { C } _ { k }$ , the server calculates its distance matrix as
|
| 151 |
+
|
| 152 |
+
$$
|
| 153 |
+
\beta _ { k } ( p , q ) = d i s t ( Q ( p , : ) , Q ( q , : ) ) , p , q \in i d x ( \{ \mathbb { S } _ { i } \} ) ,
|
| 154 |
+
$$
|
| 155 |
+
|
| 156 |
+
where $i d x ( \{ \mathbb { S } _ { i } \} )$ is the indices of all clients $\{ \mathbb { S } _ { i } \}$ in cluster $\mathbb { C } _ { k }$ . With the distance matrix $\beta$ , the server can perform bi-partitioning for clusters who meet the clustering criteria. As a result, in Figure ${ \bf 1 } \left( { \bf b } \right)$ ${ \mathrm { G C F L } } +$ performs clustering at round 118 based on the gradient sequence of length 10, which captures the longer-range behaviors of clients and effectively more homogeneous clusters.
|
| 157 |
+
|
| 158 |
+
# 6 Experiments
|
| 159 |
+
|
| 160 |
+
# 6.1 Experimental settings
|
| 161 |
+
|
| 162 |
+
Datasets We use a total of 13 graph classification datasets $\pmb { \mathbb { B } } 0 \|$ from three domains including seven molecule datasets (MUTAG, BZR, COX2, DHFR, PTC_MR, AIDS, NCI1), three protein datasets (ENZYMES, DD, PROTEINS), and three social network datasets (COLLAB, IMDB-BINARY, IMDBMULTI), each with a set of graphs. Node features are available in some datasets, and graph labels are either binary or multi-class. Details of the datasets are presented in Appendix C.
|
| 163 |
+
|
| 164 |
+
We design two settings that follow different data partitioning mechanisms, and the example real scenarios of the two settings can be found in Appendix $\boxed { \mathrm { A } }$ The first setting (i.e., single-dataset) is to randomly distribute graphs from a single dataset to a number of clients, with each client holding a distinct set of about 100 graphs, among which $10 \%$ are held out for testing. In the second setting (i.e., multi-dataset), we use multiple datasets either from a single domain or multiple domains. Each client holds a graph dataset, among which $10 \%$ are held out for testing. In the first setting, we use NCI1, PROTEINS, and IMDB-BINARY from three domains and distribute them to 30, 10, 10 clients, respectively. In the second setting, we create three data groups including MOLECULES which consists of seven datasets from the molecule domain distributed into seven clients, BIOCHEM where we add three datasets from the protein domain into MOLECULES and distribute them into 10 clients, MIX where we add three datasets from the social domain into BIOCHEM and distribute them into 13 clients.
|
| 165 |
+
|
| 166 |
+
Baselines We use self-train2 as the first baseline to test whether FL can bring improvements to each client through collaborative training. In self-train, each client firstly downloads the same randomly initialized model from the server and then trains locally without any communications. Then we implement two widely used FL baselines FedAvg $[ [ 2 7 ] ]$ and FedProx $\vec { \mathbb { B } } \vec { \mathsf { S } } \vec { \mathbb { I } }$ , the latter of which can deal with data and system heterogeneity in non-graph FL. For the graph classification model, we use the same GIN $\mathbb { \lVert \boldsymbol { 4 3 } \rVert }$ design, which represents the state-of-the-art GNN for graph-level tasks. We fix the GIN architecture and hyper-parameters through all baselines in order to control the experiments across different settings.
|
| 167 |
+
|
| 168 |
+
Parameter settings We use the three-layer GINs with hidden size of 64. We use a batch size of 128, and an Adam $\mathbb { \ m }$ optimizer with learning rate 0.001 and weight decay $5 e ^ { - 4 }$ . The $\mu$ for FedProx is set to 0.01. For all FL methods, the local epoch $E$ is set to 1. The two important hyper-parameters $\varepsilon _ { 1 }$ and $\varepsilon _ { 2 }$ as clustering criteria vary in different groups of data, which are set through offline training for about 50 rounds following $\pmb { \mathbb { B 3 } } \|$ . We run all experiments for five random repetitions on a server with 8 24GB NVIDIA TITAN RTX GPUs.
|
| 169 |
+
|
| 170 |
+
# 6.2 Experimental results
|
| 171 |
+
|
| 172 |
+
Federated graph classification within single datasets Conceptually, clients in this setting are more homogeneous. As can be seen from the results in Table ${ \bar { 3 } } ,$ our framework can obviously improve the performance of graph classification over local clients. For the NCI1 dataset distributed on 30 clients, GCFL and ${ \mathrm { G C F L } } +$ achieve $1 3 . 2 7 \%$ and $1 4 . 7 5 \%$ performance gains over self-train on average, and GCFL and ${ \mathrm { G C F L } } +$ help 10-14 more clients than FedAvg and FedProx who fail to improve about half of clients. For the PROTEINS dataset on the total 10 clients, GCFL and ${ \mathrm { G C F L } } +$ achieve $7 . 2 9 \%$ and $7 . 8 1 \%$ average performance gains compared to self-train. For IMDB-BINARY on 10 clients, FedAvg and FedProx fail to help 5/10 and 4/10 clients respectively, while both GCFL and ${ \mathrm { G C F L } } +$ are able to improve all 10 clients. Overall, FedAvg can only help around half of the clients, which demonstrates that FedAvg can be ineffective even for decenrtalized graphs from a single dataset, because of the graph non-IIDness as shown in Table $2 .$ In addition, in all three datasets, the minimum performance gain of clients over self-train using GCFL or ${ \mathrm { G C F L } } +$ is obviously larger than the minimum performance gain using FedAvg and FedProx. It indicates that even when some clients do not improve from self-train by using GCFL or ${ \mathrm { G C F L } } +$ , they can achieve more comparable performance as self-train than using FedAvg and FedProx. These experimental results demonstrate that our frameworks are effective on the single-dataset multi-client FL setting.
|
| 173 |
+
|
| 174 |
+
Federated graph classification across multiple datasets According to our data analysis in Tables 1 and $2 ,$ clients in such a setting are more heterogeneous. We conduct experiments with multiple datasets in two settings: single domain (using the data group MOLECULES), and across domains (using the data groups BIOCHEM and MIX). As can be seen from the results in Table 4, our frameworks GCFL and ${ \mathrm { G C F L } } +$ can effectively improve the performance of clients with distinct datasets. The results show $1 . 7 \% - 2 . 7 \%$ improvements of our frameworks compared to self-train. In all three data groups, our ${ \mathrm { G C F L } } +$ framework can improve twice as many as clients than FedAvg, and it achieves a ratio of $1 0 0 \%$ in MOLECULES to improve all clients’ performance. The FedAvg failed to improve around $6 0 \%$ clients, which further demonstrates its ineffectiveness facing graph non-IIDness. Additionally, the ${ \mathrm { G C F L } } +$ framework also outperforms GCFL. In MIX, although GCFL can achieve the same ratio of improved clients as ${ \mathrm { G C F L } } +$ , the ${ \mathrm { G C F L } } +$ framework has a much larger minimum gain of clients than GCFL. It indicates that by ${ \mathrm { G C F L } } +$ few clients that cannot benefit from others will not be degraded through the collaborating. These results indicate that graphs across datasets or even across domains are able to help each other through proper FL, which is a surprising and interesting start point for further study.
|
| 175 |
+
|
| 176 |
+
Effects of hyper-parameters $\varepsilon _ { 1 }$ and $\varepsilon _ { 2 }$ The hyper-parameter $\varepsilon _ { 1 }$ is a stopping criterion for checking whether a general FL on the current set of clients is near the stationary point. Theoretically, $\varepsilon _ { 1 }$ should be set as small as possible. The hyper-parameter $\varepsilon _ { 2 }$ is more dependent on the number of clients and the heterogeneity among them. A smaller $\varepsilon _ { 2 }$ will make the clients more likely to be clustered. When $\varepsilon _ { 1 }$ and $\varepsilon _ { 2 }$ are in the feasible ranges, their small variation can have little effect on the performance because the clustering results would largely remain the same. When $\varepsilon _ { 2 }$ is set too large, the performance will be similar as applying a basic FL algorithm directly (i.e. with a single cluster). When $\varepsilon _ { 2 }$ is set too small, more clusters with smaller sizes or even single clients will be generated. We provide additional experimental results regarding the performance of GCFL and ${ \mathrm { G C F L } } +$ w.r.t. varying $\varepsilon _ { 1 }$ and $\varepsilon _ { 2 }$ in Figure $2 .$ As shown in the subfigures, some points that represent varying $\varepsilon _ { 2 }$ overlap for each $\varepsilon _ { 1 }$ , which indicates that varying $\varepsilon _ { 2 }$ in a certain range w.r.t. the fixed $\varepsilon _ { 1 }$ leads to similar performance. Looking at a $\varepsilon _ { 2 }$ , within a certain range of $\varepsilon _ { 1 }$ , we can find the performance often fluctuating within a 0.01 variance. The results show that the performance of GCFL and ${ \mathrm { G C F L } } +$ are not very sensitive to the changes of $\varepsilon _ { 1 }$ and $\varepsilon _ { 2 }$ in reasonable ranges.
|
| 177 |
+
|
| 178 |
+
Table 3: Performance on the single-dataset-multi-client setting. We present the average accuracy and minimum gain over self-train on all clients, as well as the ratio of clients which get improved.
|
| 179 |
+
|
| 180 |
+
<table><tr><td rowspan="2">Dataset (# clients) Accuracy</td><td colspan="3">NCI1 (30)</td><td colspan="3">PROTEINS (10)</td><td colspan="3">IMDB-BINARY (10)</td></tr><tr><td>average</td><td>min gain</td><td>ratio</td><td>average</td><td>min gain</td><td>ratio</td><td>average</td><td>min gain</td><td>ratio</td></tr><tr><td>self-train</td><td>0.6468(±0.053)</td><td></td><td></td><td>0.7213(±0.058)</td><td></td><td></td><td>0.7654(±0.057)</td><td></td><td></td></tr><tr><td>FedAvg</td><td>0.6474(±0.076)</td><td>-0.1333</td><td>14/30</td><td>0.7490(±0.034)</td><td>-0.0615</td><td>6/10</td><td>0.7596(±0.049)</td><td>-0.0800</td><td>5/10</td></tr><tr><td>FedProx</td><td>0.6437(±0.072)</td><td>-0.2400</td><td>16/30</td><td>0.7556(±0.036)</td><td>-0.0923</td><td>7/10</td><td>0.7746(±0.048)</td><td>-0.0600</td><td>6/10</td></tr><tr><td>GCFL</td><td>0.7326(±0.052)</td><td>-0.0462</td><td>26/30</td><td>0.7739(±0.043)</td><td>-0.0545</td><td>8/10</td><td>0.8256(±0.059)</td><td>0.0182</td><td>10/10</td></tr><tr><td>GCFL+</td><td>0.7422(±0.053)</td><td>-0.1143</td><td>28/30</td><td>0.7776(±0.037)</td><td>-0.0154</td><td>9/10</td><td>0.8299(±0.052)</td><td>0.0167</td><td>10/10</td></tr></table>
|
| 181 |
+
|
| 182 |
+
Table 4: Performance on the multi-dataset-multi-client setting. Metrics are the same as Table 3.
|
| 183 |
+
|
| 184 |
+
<table><tr><td rowspan="2">Dataset (# domains) Accuracy</td><td colspan="3">MOLECULES (1)</td><td colspan="3">BIOCHEM (2)</td><td colspan="3">MIX (3)</td></tr><tr><td>average</td><td>min gain</td><td>ratio</td><td>average</td><td>min gain</td><td>ratio</td><td>average</td><td>min gain</td><td>ratio</td></tr><tr><td>self-train</td><td>0.7543(±0.017)</td><td></td><td></td><td>0.7129(±0.016)</td><td></td><td></td><td>0.7001(±0.034)</td><td>一</td><td>一</td></tr><tr><td>FedAvg</td><td>0.7524(±0.026)</td><td>-0.0132</td><td>3/7</td><td>0.6944(±0.027)</td><td>-0.1467</td><td>4/10</td><td>0.6886(±0.023)</td><td>-0.1233</td><td>5/13</td></tr><tr><td>FedProx</td><td>0.7668(±0.032)</td><td>-0.0054</td><td>5/7</td><td>0.7053(±0.026)</td><td>-0.1000</td><td>5/10</td><td>0.6897(±0.026)</td><td>-0.1367</td><td>5/13</td></tr><tr><td>GCFL</td><td>0.7661(±0.016)</td><td>0.0010</td><td>77</td><td>0.7172(±0.019)</td><td>-0.0700</td><td>7/10</td><td>0.7056(±0.019)</td><td>-0.1400</td><td>10/13</td></tr><tr><td>GCFL+</td><td>0.7745(±0.030)</td><td>0.0010</td><td>77</td><td>0.7312(±0.031)</td><td>-0.0300</td><td>8/10</td><td>0.7121(±0.021)</td><td>-0.0233</td><td>10/13</td></tr></table>
|
| 185 |
+
|
| 186 |
+
# 6.3 Structure and feature analysis in clusters
|
| 187 |
+
|
| 188 |
+
We conduct an in-depth analysis to explore the clustering results of GCFL and ${ \mathrm { G C F L } } +$ . As can be seen in Figure $^ { 3 , }$ after being clustered by GCFL and ${ \mathrm { G C F L } } +$ , the overall structure and feature heterogeneity of clients’ graphs within clusters are reduced significantly compared to the original values, especially for the multiple dataset setting (Figure 3c and $3 \mathrm { \check { d } } )$ . For the one dataset setting (Figure 3a and $\textcircled { 3 6 }$ , since features all fall in the same space, pairs of clients tend to have more homogeneous features. Therefore, the feature heterogeneity only gets reduced slightly after clustering. Unlike feature heterogeneity, the structure heterogeneity within clusters decreases significantly. In the setting of multiple datasets, as shown in Figure $3 \mathrm { c }$ and 3d, both structure and feature heterogeneity decrease significantly, which is intuitive since datasets across domains usually tend to have higher heterogeneity, as discussed in 4.1. We also look into the clusters and find that datasets from the same domains are more likely to be clustered together, while datasets from different domains also constantly get clustered together and benefit each other. For example, the clustering of ${ \mathrm { G C F L } } +$ corresponding to Figure 3d groups two social networks COLLAB and IMDB-BINARY together with PROTEINS and also several molecules datasets, and there is also a cluster of NCI1, DD, and IMDB-MULTI which are molecules, proteins and social networks, respectively. These analysis manifests that domains of datasets can verify the sanity of clusters to some extent, but one cannot solely rely on such prior knowledge to determine the optimal clusters, which demonstrates the necessity of our frameworks with the ability of performance-driven dynamic clustering along the process of FL.
|
| 189 |
+
|
| 190 |
+

|
| 191 |
+
Figure 2: Performance of GCFL and ${ \mathrm { G C F L } } +$ on MOLECULES w.r.t varying $\varepsilon _ { 1 }$ and $\varepsilon _ { 2 }$
|
| 192 |
+
|
| 193 |
+

|
| 194 |
+
Figure 3: Structure (blue) and feature (red) heterogeneity within clusters found by GCFL and ${ \mathrm { G C F L } } +$ Dashed lines denote the heterogeneity over all clients before clustering.
|
| 195 |
+
|
| 196 |
+

|
| 197 |
+
Figure 4: Average with standard deviation of the training curves of all clients.
|
| 198 |
+
|
| 199 |
+
# 6.4 Convergence analysis
|
| 200 |
+
|
| 201 |
+
We visualize the testing loss with respect to the communication round to show the convergence of GCFL and ${ \mathrm { G C F L } } +$ compared with the standard federated learning baselines. Figure $\boxed { 4 }$ shows the training curves on two settings, which illustrates that GCFL and ${ \mathrm { G C F L } } +$ achieves similar convergence rate as FedProx, which is the state-of-the-art FL framework dealing with non-IID Euclidean data. We also notice that both GCFL, ${ \mathrm { G C F L } } +$ and FedProx can converge to a lower loss compared with FedAvg, which corroborates our consideration of the non-IID problem in our setting.
|
| 202 |
+
|
| 203 |
+
# 6.5 More results in Appendix
|
| 204 |
+
|
| 205 |
+
In Table 3 and 4, we averaged the accuracy across all clients for presentation simplicity. To understand the detailed performance by clients and clusters, we present different Violin plots in Appendix D. Besides, we also show more results regarding various settings (overlapping clients, real vs. synthetic node features, standardized gradient-sequence matrix in ${ \mathrm { G C F L } } +$ , etc) in Appendix D.
|
| 206 |
+
|
| 207 |
+
# 7 Conclusion
|
| 208 |
+
|
| 209 |
+
In this work, we propose a novel setting of cross-dataset and cross-domain federated graph classification. The techniques (GCFL and $\mathrm { G C F L + }$ ) we develop allow multiple data owners holding structure and feature non-IID graphs to collaboratively train powerful graph classification neural networks without the need of direct data sharing. As the first trial, we focus on the effectiveness of FL in this setting and have not carefully studied other issues such as data privacy, although it is intuitive to preserve the privacy of clients by introducing an encryption mechanism (e.g. applying orthonormal transformations), and to prevent from adversarial scenarios by clustering out the malicious clients. Due to its evident motivations and proofs on the effective FL in a new setting, we believe this work can serve as a stepping stone for many interesting future studies.
|
| 210 |
+
|
| 211 |
+
# Acknowledgments and Disclosure of Funding
|
| 212 |
+
|
| 213 |
+
The work is partially supported by National Science Foundation (NSF) under CNS-2124104, CNS2125530, CNS-1952192, and IIS-1838200, National Institute of Health (NIH) under R01GM118609 and UL1TR002378, and the internal funding and GPU servers provided by the Computer Science Department of Emory University.
|
| 214 |
+
|
| 215 |
+
References
|
| 216 |
+
[1] Jean Bourgain. On lipschitz embedding of finite metric spaces in hilbert space. Israel Journal of Mathematics, 52 (1):46–52, 1985.
|
| 217 |
+
[2] Christopher Briggs, Zhong Fan, and Peter Andras. Federated learning with hierarchical clustering of local updates to improve training on non-iid data. In IJCNN, 2020.
|
| 218 |
+
[3] Debora Caldarola, Massimiliano Mancini, Fabio Galasso, Marco Ciccone, Emanuele Rodolà, and Barbara Caputo. Cluster-driven graph federated learning over multiple domains. In CVPRW, 2021.
|
| 219 |
+
[4] Fei Chen, Mi Luo, Zhenhua Dong, Zhenguo Li, and Xiuqiang He. Federated meta-learning with fast convergence and efficient communication. arXiv preprint arXiv:1802.07876, 2018.
|
| 220 |
+
[5] Mingyang Chen, Wen Zhang, Zonggang Yuan, Yantao Jia, and Huajun Chen. Fede: Embedding knowledge graphs in federated setting. arXiv preprint arXiv:2010.12882, 2020.
|
| 221 |
+
[6] Canh T. Dinh, Nguyen H. Tran, and Tuan Dung Nguyen. Personalized federated learning with moreau envelopes. In NeurIPS, 2021.
|
| 222 |
+
[7] Paul Erdos and Alfréd Rényi. On random graphs. ˝ I. Publicationes Mathematicae., 6:290–297, 1959.
|
| 223 |
+
[8] Alireza Fallah, Aryan Mokhtari, and Asuman Ozdaglar. Personalized federated learning: A meta-learning approach. In NeurIPS, 2020.
|
| 224 |
+
[9] Avishek Ghosh, Jichan Chung, Dong Yin, and Kannan Ramchandran. An efficient framework for clustered federated learning. In NeurIPS, 2020.
|
| 225 |
+
[10] Edgar Gilbert. Random graphs. Annals of Mathematical Statistics., 30 (4):1141–1144, 1959.
|
| 226 |
+
[11] Chaoyang He, Keshav Balasubramanian, Emir Ceyani, Carl Yang, Han Xie, Lichao Sun, Lifang He, Liangwei Yang, Philip S Yu, Yu Rong, Peilin Zhao, Junzhou Huang, Murali Annavaram, and Salman Avestimehr. Fedgraphnn: A federated learning system and benchmark for graph neural networks. arXiv preprint arXiv:2104.07145, 2021.
|
| 227 |
+
[12] Li Huang, Yifeng Yin, Zeng Fu, Shifa Zhang, Hao Deng, and Dianbo Liu. Loadaboost: Lossbased adaboost federated machine learning on medical data. PLoS ONE, 15(4):e0230706, 2020.
|
| 228 |
+
[13] Yutao Huang, Lingyang Chu, Zirui Zhou, Lanjun Wang, Jiangchuan Liu, Jian Pei, and Yong Zhang. Personalized cross-silo federated learning on non-iid data. In AAAI, 2021.
|
| 229 |
+
[14] Sergey Ivanov and Evgeny Burnaev. Anonymous walk embeddings. In ICML, 2018.
|
| 230 |
+
[15] Eunjeong Jeong, Seungeun Oh, Hyesung Kim, Jihong Park, Mehdi Bennis, and Seong-Lyun Kim. Communication-efficient on-device machine learning: Federated distillation and augmentation under non-iid private data. In NIPSW, 2018.
|
| 231 |
+
[16] Meng Jiang, Taeho Jung, Ryan Karl, and Tong Zhao. Federated dynamic gnn with secure aggregation. arXiv preprint arXiv:2009.07351, 2020.
|
| 232 |
+
[17] Peter Kairouz, H Brendan McMahan, Brendan Avent, Aurélien Bellet, Mehdi Bennis, Arjun Nitin Bhagoji, Keith Bonawitz, Zachary Charles, Graham Cormode, Rachel Cummings, et al. Advances and open problems in federated learning. Foundations and Trends in Machine Learning, 14 (1), 2019.
|
| 233 |
+
[18] Sai Praneeth Karimireddy, Satyen Kale, Mehryar Mohri, Sashank J Reddi, Sebastian U Stich, and Ananda Theertha Suresh. Scaffold: Stochastic controlled averaging for federated learning. In ICML, 2019.
|
| 234 |
+
[19] Ahmed Khaled, Konstantin Mishchenko, and Peter Richtárik. Tighter theory for local sgd on identical and heterogeneous data. In AISTATS, 2020.
|
| 235 |
+
[20] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2017.
|
| 236 |
+
[21] Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In ICLR, 2017.
|
| 237 |
+
[22] Anusha Lalitha, Osman Cihan Kilinc, Tara Javidi, and Farinaz Koushanfar. Peer-to-peer federated learning on graphs. arXiv preprint arXiv:1901.11173, 2019.
|
| 238 |
+
[23] Jurij Leskovec, Deepayan Chakrabarti, Jon Kleinberg, and Christos Faloutsos. Realistic, mathematically tractable graph generation and evolution, using kronecker multiplication. In ECML-PKDD, 2005.
|
| 239 |
+
[24] Tian Li, Shengyuan Hu, Ahmad Beirami, and Virginia Smith. Ditto: Fair and robust federated learning through personalization. In ICML, 2021.
|
| 240 |
+
[25] Tian Li, Anit Kumar Sahu, Manzil Zaheer, Maziar Sanjabi, Ameet Talwalkar, and Virginia Smith. Federated optimization in heterogeneous networks. In Proceedings of Machine Learning and Systems, 2020.
|
| 241 |
+
[26] Xianfeng Liang, Shuheng Shen, Jingchang Liu, Zhen Pan, Enhong Chen, and Yifei Cheng. Variance reduced local sgd with lower communication complexity. arXiv preprint arXiv:1912.12844, 2019.
|
| 242 |
+
[27] Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas. Communication-efficient learning of deep networks from decentralized data. In Artificial Intelligence and Statistics, 2017.
|
| 243 |
+
[28] H. Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Agüera y Arcas. Communication-efficient learning of deep networks from decentralized data. In AISTATS, 2017.
|
| 244 |
+
[29] Chuizheng Meng, Sirisha Rambhatla, and Yan Liu. Cross-node federated graph neural network for spatio-temporal data modeling. In KDD, 2021.
|
| 245 |
+
[30] Christopher Morris, Nils M. Kriege, Franka Bause, Kristian Kersting, Petra Mutzel, and Marion Neumann. Tudataset: A collection of benchmark datasets for learning with graphs. In ICMLW, 2020.
|
| 246 |
+
[31] Niels Lundtorp Olsen, Bo Markussen, and Lars Lau Rakêt. Simultaneous inference for misaligned multivariate functional data. Journal of the Royal Statistical Society Series C, 67 (5):1147–1176, 2017.
|
| 247 |
+
[32] Karl Pearson. Das fehlergesetz und seine verallgemeinerungen durch fechner und pearson. a rejoinder [the error law and its generalizations by fechner and pearson. a rejoinder]. Biometrika, 4 (1-2):169–212, 1905.
|
| 248 |
+
[33] Felix Sattler, Klaus-Robert Müller, and Wojciech Samek. Clustered federated learning: Modelagnostic distributed multitask optimization under privacy constraints. TNNLS, pages 1–13, 2020.
|
| 249 |
+
[34] Nino Shervashidze and Karsten M. Borgwardt. Fast subtree kernels on graphs. In NIPS, 2009.
|
| 250 |
+
[35] Mechthild Stoer and Frank Wagner. A simple min-cut algorithm. J. ACM, 44(4), 1997.
|
| 251 |
+
[36] S Vichy N Vishwanathan, Nicol N Schraudolph, Risi Kondor, and Karsten M Borgwardt. Graph kernels. JMLR, 11:1201–1242, 2010.
|
| 252 |
+
[37] Binghui Wang, Ang Li, Hai Li, and Yiran Chen. Graphfl: A federated learning framework for semi-supervised node classification on graphs. arXiv preprint arXiv:2012.04187, 2020.
|
| 253 |
+
[38] Chunnan Wang, Bozhou Chen, Geng Li, and Hongzhi Wang. Fl-agcns: Federated learning framework for automatic graph convolutional network search. In ICML, 2021.
|
| 254 |
+
[39] Shiqiang Wang, Tiffany Tuor, Theodoros Salonidis, Kin K Leung, Christian Makaya, Ting He, and Kevin Chan. Adaptive federated learning in resource constrained edge computing systems. IEEE Journal on Selected Areas in Communications, 37(6):1205–1221, 2019.
|
| 255 |
+
[40] Chuhan Wu, Fangzhao Wu, Yang Cao, Yongfeng Huang, and Xing Xie. Fedgnn: Federated graph neural network for privacy-preserving recommendation. arXiv preprint arXiv:2102.04925, 2021.
|
| 256 |
+
[41] Felix Wu, Tianyi Zhang, Amauri Holanda de Souza Jr, Christopher Fifty, Tao Yu, and Kilian Q Weinberger. Simplifying graph convolutional networks. In ICML, 2019.
|
| 257 |
+
[42] Zonghan Wu, Shirui Pan, Fengwen Chen, Guodong Long, Chengqi Zhang, and Philip S. Yu. A comprehensive survey on graph neural networks. IEEE TNNLS, 32(1):4–24, 2021.
|
| 258 |
+
[43] Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? In ICLR, 2019.
|
| 259 |
+
[44] Pinar Yanardag and S.V.N. Vishwanathan. Deep graph kernels. In KDD, 2015.
|
| 260 |
+
[45] Carl Yang, Mengxiong Liu, Vincent W Zheng, and Jiawei Han. Node, motif and subgraph: Leveraging network functional blocks through structural convolution. In ASONAM, 2018.
|
| 261 |
+
[46] Carl Yang, Yuxin Xiao, Yu Zhang, Yizhou Sun, and Jiawei Han. Heterogeneous network representation learning: A unified framework with survey and benchmark. In TKDE, 2020.
|
| 262 |
+
[47] Carl Yang, Jieyu Zhang, and Jiawei Han. Co-embedding network nodes and hierarchical labels with taxonomy based generative adversarial nets. In ICDM, 2020.
|
| 263 |
+
[48] Carl Yang, Peiye Zhuang, Wenhan Shi, Alan Luu, and Pan Li. Conditional structure generation through graph variational generative adversarial nets. In NIPS, 2019.
|
| 264 |
+
[49] Rex Ying, Jiaxuan You, Christopher Morris, Xiang Ren, William L Hamilton, and Jure Leskovec. Hierarchical graph representation learning with differentiable pooling. In NeurIPS, 2018.
|
| 265 |
+
[50] Jiaxuan You, Rex Ying, and Jure Leskovec. Position-aware graph neural networks. In ICML, pages 7134–7143, 2019.
|
| 266 |
+
[51] Hao Yu, Sen Yang, and Shenghuo Zhu. Parallel restarted sgd with faster convergence and less communication: Demystifying why model averaging works for deep learning. In AAAI, 2019.
|
| 267 |
+
[52] Ke Zhang, Carl Yang, Xiaoxiao Li, Lichao Sun, and Siu Ming Yiu. Subgraph federated learning with missing neighbor generation. In NeurIPS, 2021.
|
| 268 |
+
[53] Yue Zhao, Meng Li, Liangzhen Lai, Naveen Suda, Damon Civin, and Vikas Chandra. Federated learning with non-iid data. arXiv preprint arXiv:1806.00582, 2018.
|
| 269 |
+
[54] Jun Zhou, Chaochao Chen, Longfei Zheng, Huiwen Wu, Jia Wu, Xiaolin Zheng, Bingzhe Wu, Ziqi Liu, and Li Wang. Vertically federated graph neural network for privacy-preserving node classification. arXiv preprint arXiv:2005.11903, 2020.
|
| 270 |
+
|
| 271 |
+
# Checklist
|
| 272 |
+
|
| 273 |
+
1. For all authors...
|
| 274 |
+
|
| 275 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] Mainly see Sections 4-6
|
| 276 |
+
(b) Did you describe the limitations of your work? [Yes] See Section 7
|
| 277 |
+
(c) Did you discuss any potential negative societal impacts of your work? [N/A] See Section 7
|
| 278 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 279 |
+
|
| 280 |
+
2. If you are including theoretical results...
|
| 281 |
+
|
| 282 |
+
(a) Did you state the full set of assumptions of all theoretical results? [Yes] See Section 4.4 (b) Did you include complete proofs of all theoretical results? [Yes] See Appendix
|
| 283 |
+
|
| 284 |
+
3. If you ran experiments...
|
| 285 |
+
|
| 286 |
+
(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 Section 6.1 and the supplemental material
|
| 287 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] See Section 6.1
|
| 288 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] For example see Tables 3 and 4
|
| 289 |
+
(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 Section 6.1
|
| 290 |
+
|
| 291 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 292 |
+
|
| 293 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes] Wherever we mention them for the first time
|
| 294 |
+
(b) Did you mention the license of the assets? [N/A] They are public
|
| 295 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [Yes] We include our models and code in the supplemental material
|
| 296 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
|
| 297 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
|
| 298 |
+
|
| 299 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 300 |
+
|
| 301 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 302 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 303 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|
md/train/zdTW91r2wKO/zdTW91r2wKO.md
ADDED
|
@@ -0,0 +1,308 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Active 3D Shape Reconstruction from Vision and Touch
|
| 2 |
+
|
| 3 |
+
Edward J. Smith1,2∗ David Meger2 Luis Pineda1 Roberto Calandra1
|
| 4 |
+
|
| 5 |
+
Adriana Romero-Soriano1,2,†
|
| 6 |
+
|
| 7 |
+
Michal Drozdzal1,†
|
| 8 |
+
|
| 9 |
+
1 Facebook AI Research 2 McGill University 3 University of California, Berkeley
|
| 10 |
+
|
| 11 |
+
# Abstract
|
| 12 |
+
|
| 13 |
+
Humans build 3D understandings of the world through active object exploration, using jointly their senses of vision and touch. However, in 3D shape reconstruction, most recent progress has relied on static datasets of limited sensory data such as RGB images, depth maps or haptic readings, leaving the active exploration of the shape largely unexplored. In active touch sensing for 3D reconstruction, the goal is to actively select the tactile readings that maximize the improvement in shape reconstruction accuracy. However, the development of deep learning-based active touch models is largely limited by the lack of frameworks for shape exploration. In this paper, we focus on this problem and introduce a system composed of: 1) a haptic simulator leveraging high spatial resolution vision-based tactile sensors for active touching of 3D objects; 2) a mesh-based 3D shape reconstruction model that relies on tactile or visuotactile signals; and 3) a set of data-driven solutions with either tactile or visuotactile priors to guide the shape exploration. Our framework enables the development of the first fully datadriven solutions to active touch on top of learned models for object understanding. Our experiments show the benefits of such solutions in the task of 3D shape understanding where our models consistently outperform natural baselines. We provide our framework as a tool to foster future research in this direction.
|
| 14 |
+
|
| 15 |
+
# 1 Introduction
|
| 16 |
+
|
| 17 |
+
3D shape understanding is an active area of research, whose goal is to build 3D models of objects and environments from limited sensory data. It is commonly tackled by leveraging partial observations such as a single view RGB image [60, 67, 23, 44], multiple view RGB images [16, 25, 30, 31], depth maps [61, 74] or tactile readings [7, 49, 59, 45, 38]. Most of this research focuses on building shape reconstruction models from a fixed set of partial observations. However, this constraint is relaxed in the active sensing scenario, where additional observation can be acquired to improve the quality of the 3D reconstructions. In active vision [4], for instance, the objective can be to iteratively select camera perspectives from an object that result in the highest improvement in quality of the reconstruction [76] and only very recently the research community has started to leverage large scale datasets to learn exploration strategies that generalize to unseen objects [77, 5, 41, 51, 29, 78, 50, 6].
|
| 18 |
+
|
| 19 |
+
Human haptic exploration of objects both with and without the presence of vision has classically been analysed from a psychological perspective, where it was discovered that the developed tactile exploration strategies for object understanding were demonstrated to not only be ubiquitous, but also highly tailored to specific tasks [37, 33]. In spite of this, deep learning-based data-driven approaches to active touch for shape understanding are practically non-existent. Previous haptic exploration works consider objects independently, and build uncertainty estimates over point clouds, produced by densely touching the objects surface with point-based touch sensors [7, 73, 28, 18, 46]. These methods do not make use of learned object priors, and a large number of touches sampled on an object’s surface (over 100) is necessary to produce not only a prediction of the surface but also to drive exploration. However, accurate estimates of object shape have also been successfully produced with orders of magnitude fewer touch signals, by making use of high resolution tactile sensors such as [75], large datasets of static 3D shape data, and deep learning – see e.g. [56, 68]. Note that no prior work exists to learn touch exploration by leveraging large scale datasets. Moreover, no prior work explores active touch in the presence of visual inputs either (e.g. an RGB camera).
|
| 20 |
+
|
| 21 |
+

|
| 22 |
+
Figure 1: An overview of our active touch exploration framework. Given a 3D model, the simulator extracts touch and vision signals that are fed to the reconstruction model. The reconstruction model predicts a 3D shape that is used as an input to a policy model that decides where to touch next. The policies are trained to select grasps which minimize the Chamfer Distance.
|
| 23 |
+
|
| 24 |
+
Combining the recent emergence of both data-driven reconstruction models from vision and touch systems [56, 68], and data-driven active vision approaches, we present a novel formulation for active touch exploration. Our formulation is designed to easily enable the use of vision signals to guide the touch exploration. First, we define a new problem setting over active touch for 3D shape reconstruction where touch exploration strategies can be learned over shape predictions from a learned reconstruction model with strong object priors. Second, we develop a simulator which allows for fast and realistic grasping of objects, and for extracting both vision and touch signals using a robotic hand augmented with high-resolution tactile sensors [75]. Third, we present a 3D reconstruction model from vision and touch which produces mesh-based predictions and achieves impressive performance in the single view image setting, both with and without the presence of touch signals. Fourth, we combine the simulator and reconstruction model to produce a tactile active sensing environment for training and evaluating touch exploration policies. The outline for this environment can be viewed in Figure 1.
|
| 25 |
+
|
| 26 |
+
Over the provided environment, we present a series of datadriven touch exploration models that take as an input a mesh
|
| 27 |
+
|
| 28 |
+
(a) Touch only exploration.
|
| 29 |
+
|
| 30 |
+

|
| 31 |
+
Figure 2: Target objects (top rows) and predicted 3D shapes (bottom rows) after 5 grasps have been selected.
|
| 32 |
+
|
| 33 |
+
<table><tr><td rowspan=1 colspan=1>□</td><td rowspan=1 colspan=1>□</td><td rowspan=1 colspan=1>日</td><td rowspan=1 colspan=1>!</td></tr><tr><td rowspan=1 colspan=1>口</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>9</td><td rowspan=1 colspan=1>1</td></tr></table>
|
| 34 |
+
|
| 35 |
+
(b) Touch exploration with visual prior.
|
| 36 |
+
|
| 37 |
+
based shape reconstruction and decide the position of the next touch. By leveraging a large scale dataset of over $2 5 \mathrm { k }$ CAD models from the ABC dataset [34] together with our environment, the data-driven touch exploration models outperform baseline policies which fail to leverage learned patterns between object shape or the distribution of object shapes and optimal actions. We demonstrate our proposed data-driven solutions perform up to $18 \%$ better than random baselines and lead to impressive object reconstructions relative to their input modality, such as those demonstrated in Figure 2. Our framework, training and evaluation setup, and trained models are publicly available on a GitHub repository to ensure and encourage reproducible experimental comparison 3.
|
| 38 |
+
|
| 39 |
+
# 2 Related Work
|
| 40 |
+
|
| 41 |
+
3D reconstruction. 3D shape reconstruction is a popular and well studied area of research with a multitude of approaches proposed across varying 3D representations [13, 63, 19, 52, 67, 23, 12, 71] and input modalities [27, 53, 69, 57]. While still a niche topic, a number of works have attempted to reconstruct 3D shape from only touch signals [7, 49, 59, 45, 38]. These works all assume point based touch signals which supply at most one point of contact of normal information. A limited number of methods have also been proposed for 3D reconstruction from both vision and touch signals [9, 26, 22, 68, 69, 56]. In contrast to these works which use static datasets, we focus on improving 3D reconstruction through tactile exploration. Shape from interaction methods have also been proposed for object reconstruction through hand interactions [42, 64, 47], though in contrast to our work an image of the interaction provides the additional information rather than touch readings.
|
| 42 |
+
|
| 43 |
+
Active sensing for reconstruction. Active vision aims to manipulate the viewpoint of a camera in order to maximize the information for a particular task [11, 76]. Similar to our setting, active vision can be useful in 3D shape reconstruction [62, 70, 17, 41, 14, 35], but where camera perspectives are planned instead of grasp locations. Only very recently have deep learning active vision approaches been proposed for 3D object reconstruction [77, 5, 41, 51]. Deep learning based active sensing for reconstruction has also recently emerged in the medical imaging domain, where the time spent performing MRI scans has been reduced by learning to select a small number of more informative frequencies over a pre-trained reconstruction model [29, 78, 50, 6].
|
| 44 |
+
|
| 45 |
+
Touch-based active exploration for shape understanding. Initial works tackling active tactile exploration focused on object recognition. [1–3]. While some of these methods do integrate both vision and touch for active shape understanding, they only focus on object recognition, operate over small datasets of already known and observed objects and do not leverage deep learning tools for learning patterns over large datasets of object shapes. Fleer and Moringen et. al. proposed to learn haptic exploration strategies using a reinforcement learning framework over a recurrent attention model, however these strategies were optimized for object classification and only trained over a dataset of 4 objects with a single, floating, depth-based tactile sensor array [20].
|
| 46 |
+
|
| 47 |
+
Several priors works have explored the problem of active acquisition of touch signals specifically for for surface reconstruction. A common theme among most approaches is to predict object shape using Gaussian processes so that uncertainty estimates are naturally available to drive the selection of the next point to touch, which is performed using a single finger [28, 73, 18]. To improve the speed of shape estimation during tactile exploration Matsubara et. al. [40] consider both uncertainty and travel cost when selecting touches using graph-based path planning. Bierbaum et al. [8] instead drove exploration through a dynamic potential field approach made popular in robot navigation to produce point cloud predictions, and extracted touch signals using a comparatively unrealistic 5 finger robotic hand model in simulation. These methods all make use of point based tactile sensors and use deterministic strategies, which are tuned and evaluated over a very small number of objects. . In contrast to these works, our approach is fully data driven, and as such, actions are selected using policies trained and evaluated over tens of thousands of objects. Moreover, predictions are made in mesh space fusing visual information with high resolution tactile signals extracted from objects in simulation using a realistic robot hand.
|
| 48 |
+
|
| 49 |
+
# 3 Active touch exploration
|
| 50 |
+
|
| 51 |
+
In our proposed active touch exploration problem, given a pre-trained shape reconstruction model over touch and optionally vision signals, the objective is to select the sequence of touch inputs which lead to the highest improvement in reconstruction accuracy. To tackle this problem, we define an active touch environment that contains a simulator, a reconstruction model (a pre-trained neural network), and a loss function. The simulator takes as input a 3D object shape $O$ together with parameters describing a grasp, $g$ , and outputs touch readings, $t$ , of the 3D shape at the grasp locations along with an RGB image of the object, $I$ . The reconstruction model is a neural network parametrized by $\phi$ , which takes an input $X$ and produces the current 3D shape estimate $\hat { O }$ as follows: $\hat { O } = f ( X ; \phi )$ . In our setup, we investigate two reconstruction model variants which differ in their inputs: 1) the model only receives a set of touch readings, $t$ , such that $X = t$ , and 2) the model receives both a set of touch readings, $t$ , and an RGB image rendering of the shape, $I$ , such that $X = \{ t , I \}$ . The loss function takes as input the current belief of the object’s shape, $\hat { O }$ , and the ground truth shape, $O$ , and computes the distance between them: $d ( O , { \hat { O } } )$ . Thus, active touch exploration can be formulated as sequentially selecting the optimal set of $K$ grasp parameters $\left\{ g _ { 1 } , g _ { 2 } . . . , g _ { K } \right\}$ that maximize the similarity between the ground truth shape $O$ and the
|
| 52 |
+
|
| 53 |
+

|
| 54 |
+
Figure 3: Steps used in the tactile grasping simulator to produce simulated vision and touch signals. reconstruction output after $K$ grasps $\hat { O } _ { K }$ 4 :
|
| 55 |
+
|
| 56 |
+
$$
|
| 57 |
+
\operatorname * { a r g m i n } _ { g _ { 1 } , g _ { 2 } , \ldots . g _ { K } } d ( O , \hat { O _ { K } } ) ,
|
| 58 |
+
$$
|
| 59 |
+
|
| 60 |
+
where $g _ { k }$ determine the touch readings fed to the reconstruction network producing $\hat { O } _ { k }$ . We use the Chamfer distance (CD) [60] between the predicted and target surface as the distance metric in our active touch formulation. Further details with respect to the CD are provided in the supplemental materials. In the reminder of this section, we provide details about the touch simulator and the reconstruction model.
|
| 61 |
+
|
| 62 |
+
# 3.1 Active touch simulator
|
| 63 |
+
|
| 64 |
+
Conceptually, our simulator can be described in the five steps depicted in Figure 3. First, an object is loaded onto the environment. Second, an action space is defined around the 3D object by uniformly placing 50 points on a sphere centered at the center of the loaded object. Third, to choose a grasp, one of the points is selected and a 4-digit robot hand is placed such that its 3rd digit lies on the point and the hand’s palm lies tangent to the sphere. Fourth, the hand is moved towards the center of the object until it comes in contact with it. Last, the fingers of the hand are closed until they reach the maximum joint angle, or are halted by the contact with the object. As a result, the simulator produces 4 touch readings(one from each finger of the hand) and one RGB image of the object. Note that each action is defined by its position index on the sphere of 50 actions. This parameterization is selected specifically as it does not require any prior knowledge of the object, other than its center, and in simulation it consistently leads to successful interactions between the hand’s touch sensors and the object’s surface.
|
| 65 |
+
|
| 66 |
+
In our simulator, all steps are performed in python across the robotics simulator PyBullet [15], the rendering tool Pyrender [39], and PyTorch [48]. For a given grasp and object, the object is loaded into PyBullet [15], along with a Wonik’s Allegro Hand [54] equipped with vision-based touch sensors [36] on each of its fingers, and then the point in space corresponding to the action to be performed is selected and the grasping procedure is performed using PyBullet’s physics simulator. Pose information from the produced grasps is then extracted and used by Pyrender to render both a depth map of the object from the perspective of each sensor and an RGB image of the object from a fixed perspective. The depth maps are then converted into simulated touch signals using the method described in [56]. All steps in this procedure are performed in parallel or using GPU accelerated computing, and as a result across the 50 grasping options of 100 randomly chosen objects, simulated grasps and touch signals are produced in $\sim 0 . 0 3 1 7$ seconds each on a Tesla V100 GPU with 16 CPU cores. Our simulator supports two modes of tactile exploration grasping and poking. In the grasping scenario, the hand is performing a full grasp of an object using all four fingers. While, in the poking scenario, only the index finger of the hand is used for touch sensing. Further details on this simulated environment are provided the supplemental materials.
|
| 67 |
+
|
| 68 |
+
# 3.2 Shape reconstruction
|
| 69 |
+
|
| 70 |
+
We take a chart-based approach to reconstruction [24], beginning from [56], which used charts to fuse vision and touch signals for shape prediction, and extending it to effectively leverage touch positional information while handling increasing number of touches, and to efficiently predict the object shape from the touch readings In particular, shape is predicted in the mesh representation by repeatedly deforming a collection of independent mesh surface elements – i.e. charts – using a graph convolutional network (GCN). The full pipeline for this reconstruction method is highlighted in Figure 4.
|
| 71 |
+
|
| 72 |
+
Predicting local shape from touch readings. Available touch signals are passed through a touch convolutional neural network (CNN), which takes a set of touch readings as input, and produces a set of mesh surface elements, referred to as touch charts, representing the surface of the touched object where the touches occurred. We train the touch CNN to directly minimize the CD [60] between the predicted touch charts and the local surface at the corresponding touch site. By contrast, [56] predicts local point clouds which are then converted to charts via iterative optimization.
|
| 73 |
+
|
| 74 |
+

|
| 75 |
+
Figure 4: Our pipeline to 3D object reconstruction from vision and touch.
|
| 76 |
+
|
| 77 |
+
Chart-based mesh representation and vertex features. A mesh in the shape of a sphere is initially created from a large collection of mesh surface elements, known as charts, where each vertex is defined by its location. We call these mesh surface elements vision charts in the presence of vision signals, and touch charts in their absence. When leveraging touch signals, the mesh of initial charts is augmented with a set of $N$ additional touch charts, which may be initialized with the previous touch CNN vertex location predictions or uninitialized – i.e. all vertex locations are set to zero – where $N$ denotes the maximum number of touch charts expected in the active exploration process. Unlike [56], we encode the vertex locations by leveraging positional embeddings [43, 55, 66] to capture higher frequency shape information. When required, a mask embedding is appended to each vertex in the mesh to indicate if it originates from an uninitialized touch chart, a predicted touch chart, or a vision chart. With this setup, a variable number of touch charts can be expected by the subsequent deformation network. In addition, if a vision signal is available, the image is passed through a standard CNN and the extracted vision features are projected onto the vertices of the mesh using perceptual feature pooling [67, 58, 56]. Thus, the resulting mesh is composed of touch and eventually vision charts, whose vertex features include the above-described positional vertex embedding, mask embedding when needed, and if available, the corresponding projected visual features. The mesh connectivity enabling communication among vertices and charts is defined following [56].
|
| 78 |
+
|
| 79 |
+
Mesh deformation process. The chart-based mesh representation is fed to a mesh deformation model composed of two GCNs, by contrast [56] used a single GCN to handle the mesh deformation process. Decoupling the iterative GCN of [56] is crucial to ensure the use of vertex positional information by the model. Since the mesh deformation process of any object starts with the same sphere, parameter sharing across iterations results in the model ignoring the positional vertex information in the predictions of the initial shape belief, hindering the use of the added touch charts in subsequent iterations. In our model, the first GCN aims to learn an object prior, which can be learnt either from vision signals (vision prior) or from touch signals (touch prior). Note that the expected input of the first GCN is static w.r.t the position of vision and uninitialized touch charts. The second GCN takes the object belief resulting from the first GCN and refines it through a 2-step deformation process, in which each step recomputes the projection of the image features onto the mesh. Since the input to the second GCN is expected to be different in each case, we can leverage parameter sharing in its 2-step deformation process. Note that touch signals are only included in the second GCN when leveraging vision signals; however, they are included in the first GCN in the touch-only setting when available.
|
| 80 |
+
|
| 81 |
+
Training. The parameters of the whole reconstruction pipeline, including both GCNs and the vision CNN, are jointly optimized to minimize the CD between the predicted and target surface [60, 58]. With this setup, a potential vision signal and a variable number of touch signals can be leveraged to produce a surface prediction in a single model pass. Further details as well as a comparison highlighting the superiority of our shape reconstruction pipeline w.r.t [56] can be found in the supplemental material.
|
| 82 |
+
|
| 83 |
+
# 4 Data-driven policies for touch exploration
|
| 84 |
+
|
| 85 |
+
Our touch exploration framework takes advantage of the reconstruction model introduced in Section 3.2 to predict 3D shapes in the mesh space, and defines policies to select the positions of the next touches to acquire in order to maximize the similarity between predicted and target shape. While useful for graphics applications and efficient for representing surfaces, meshes are difficult to process and computationally heavy to compare. To combat these issues, we propose to use mesh embeddings of reduced dimensionality to facilitate the learning of our policies. The mesh embedding is extracted from the bottleneck of a mesh autoencoder which is trained offline from the shape predictions to produce a learned embedding space.
|
| 86 |
+
|
| 87 |
+
We also use the mesh embeddings to allow for efficient distance metric computation over predicted shapes – i.e. Euclidean distance in the embedding space.
|
| 88 |
+
|
| 89 |
+
Autoencoder for shape embedding. The encoder, $e$ , takes as an input a surface mesh, and produces a mesh embedding. Following our shape reconstruction model, we use positional embeddings [43, 55, 66] to represent the vertices in the mesh. The mesh is then passed through a series Zero-Neighbor GCN layers [58, 32] to update the vertex features, followed by a channel-wise max pooling operation across vertices to produce a latent encoding. The decoder takes the resulting latent encoding and follows the FoldingNet [72] architecture to yield a point cloud with 2,024 points recovering the object shape. The autoencoder is trained by minimizing the CD between the input mesh and the predicted point cloud.
|
| 90 |
+
|
| 91 |
+
In the remainder of this section, we outline the object-specific and dataset-specific policies selected for the purpose of comparison. In object specific policies the current object shape is considered when deciding which action to perform. In dataset-specific policies the full training set of objects is leveraged to determine the optimal fixed trajectory to perform across all test set objects.
|
| 92 |
+
|
| 93 |
+
# 4.1 Object-specific policies
|
| 94 |
+
|
| 95 |
+
Nearest Neighbor (NN). We compute myopic greedy trajectories for all objects in the training set, and save the object reconstruction at each time step along with the action – grasping parameters – leading to its best immediate improvement. Then, when evaluating, we search our record of training reconstructions and their corresponding actions to find the most similar reconstruction to the current object belief and simply copy the grasping parameters from our record.
|
| 96 |
+
|
| 97 |
+
To allow for easy and efficient comparisons, we leverage the learned mesh encoder, $e$ , to perform similarity search with the $\ell _ { 2 }$ distance.
|
| 98 |
+
|
| 99 |
+
Supervised (Sup.). In this model we attempt to learn the improvement each action will provide for a given object using regression. An independent network $h _ { i }$ is trained for each time step $i$ to predict the relative improvement which will result from taking each action. Each network is comprised of set of fully connected layers with ReLU activations and takes as input the set of already performed grasp parameters, and the embedding of the current and initial shape reconstruction produced by the pre-trained autoencoder. The networks are trained sequentially, such that the $i$ -th network learns to predict the relative improvement of each possible $i$ -th action after performing the actions predicted by the networks of the previous time steps. When evaluating the performance of the supervised approach at time step $i$ , $h _ { i }$ is used to determine which action will lead to highest improvement, and this action, $g _ { i }$ , is selected:
|
| 100 |
+
|
| 101 |
+
$$
|
| 102 |
+
g _ { i } = \underset { \mathcal { G } \setminus \{ g _ { 0 } , . . . , g _ { i - 1 } \} } { \arg \operatorname* { m a x } } h _ { i } ( \{ g _ { 0 } , . . . , g _ { i - 1 } \} , e ( \hat { O } _ { 0 } ) , e ( \hat { O } _ { i } ) ) ,
|
| 103 |
+
$$
|
| 104 |
+
|
| 105 |
+
where $\mathcal { G }$ represents the set of all grasps.
|
| 106 |
+
|
| 107 |
+
Double Deep Q-Networks (DDQN). In the last object-specific model we leverage the discrete deep RL method Double Deep Q-Networks (DDQN) [65]. In our case, the value network takes as input the set of actions already performed and the embedded current reconstruction of the object, and predicts a value for every possible action. We propose two value network architectures. In the first, referred to as $\mathrm { D D Q N _ { m } }$ , the value network takes as input the mesh reconstruction of an object, where an embedding of the performed actions is appended to every vertex’s feature vector. The network architecture is identical to that of encoder, $e$ , and produces a small shape embedding, which is then passed through a few fully connected layers to predict a value for every action. In the second, referred to as $\mathrm { D D Q N _ { l } }$ , the current reconstruction is passed through the pre-trained mesh encoder, $e$ , producing a shape embedding which is concatenated with the embedding of the actions performed, and fed through a few fully connected layers to predict a value for every action. Note that the first setup benefits from a complete understanding of the current shape belief, as the mesh is fed to the value network. The second setup benefits from the pre-computed shape embeddings, which already contain the rich information necessary for reasoning over the object and allows for a simplistic network design which has already been demonstrated to perform well in deep reinforcement learning (RL) settings [65, 21]. In both cases, the action selected is the one which the value network $Q$ predicts has the highest value:
|
| 108 |
+
|
| 109 |
+
$$
|
| 110 |
+
g _ { i } = \underset { \mathscr { G } \backslash \{ g _ { 0 } , . . . , g _ { i - 1 } \} } { \arg \operatorname* { m a x } } Q ( \{ g _ { 0 } , . . . , g _ { i - 1 } \} , \hat { O } _ { i } ) .
|
| 111 |
+
$$
|
| 112 |
+
|
| 113 |
+
# 4.2 Dataset-specific policies
|
| 114 |
+
|
| 115 |
+
# Most frequent best action (MFBA).
|
| 116 |
+
|
| 117 |
+
This policy selects the first action by computing the performance of all actions over all objects in the training set, and then chooses the most common best action. For the second action, the performance of performing the first fixed action followed by all remaining actions is computed, and the most common best performing second action is chosen. This is repeated until a full trajectory is obtained. Then, when evaluating, this trajectory is selected every time, regardless of the object reconstruction.
|
| 118 |
+
|
| 119 |
+
Lowest error best action (LEBA). This policy is in effect identical to the MFBA except that the action which leads to the greatest average error improvement is selected and fixed at every time step rather then the most common best action.
|
| 120 |
+
|
| 121 |
+
# 5 Experiments
|
| 122 |
+
|
| 123 |
+
In this section, we validate the reconstruction and autoencoder models. We then compare object-specific and dataset-specific policies to several baselines. Additional experimental details can be found in the supplementary material.
|
| 124 |
+
|
| 125 |
+
# 5.1 Experimental setup
|
| 126 |
+
|
| 127 |
+
# 5.2 Shape reconstruction from static vision and touch signals
|
| 128 |
+
|
| 129 |
+
Dataset of CAD models. The dataset used is made up of 40,000 objects sampled from the ABC dataset [34, 56], a CAD model dataset of approximately one million objects. This dataset poses a much harder generalization challenge than other 3D object datasets, such as [10] due to its highly variable object shapes, and lack of clearly defined classes over which biases can be learned. The geometry of these objects were decimated such that all objects possess approximately 500 vertices. Those objects which could not be reduced to this size due to geometric constraints and those which possessed multiple disconnected parts were automatically removed, leading to set of 26,545 usable object models. This set of objects was split into 5 sets; 3 training sets 5 of size 7,700 object each, a validation set comprised 2,000 objects, and a test set of size 1,000.
|
| 130 |
+
|
| 131 |
+
<table><tr><td>Model</td><td colspan="2">Grasp # 0 1</td></tr><tr><td>TG [56]</td><td>25.586 ±0.069</td><td>9.016 ±0.358</td></tr><tr><td>TG [ours]</td><td>24.864 ±0.266</td><td>8.220 ±0.389</td></tr><tr><td>V&TG [56]</td><td>2.653 ±0.022</td><td>2.637 ±0.042</td></tr><tr><td>V&TG [ours]</td><td>2.538 ±0.098</td><td>2.486 ±0.102</td></tr></table>
|
| 132 |
+
|
| 133 |
+
Table 1: Comparison between our reconstruction model and state-of-art in terms of CD.
|
| 134 |
+
|
| 135 |
+
# Baselines and Oracle.
|
| 136 |
+
|
| 137 |
+
(1) Random baseline. As a naive baseline, a random policy is considered, which selects for every time step and object one of the available actions uniformly at random. This is the standard baseline for any exploration algorithm. (2) Even baseline. As a second naive baseline, we consider a policy which randomly selects an evenly spaced set of 5 actions over the sphere of possible actions. This baseline is chosen as it will result in uniform coverage of the target object, which is intuitively a useful and strong strategy for object understanding in our task (3) Oracle. As a near-optimal target for the performance of our policies a myopic oracle policy is considered. In this policy, for a given object and time step the action which resulted in the best improvement is selected.
|
| 138 |
+
|
| 139 |
+
This policy possesses unfair hindsight, which is not accessible to all others, and so should be seen as an upper-bound point of comparison. The true optimal policy cannot be computed in a reasonable time frame, however due to the diminishing return of rewards from actions in this framework, the provided myopic oracle policy represents a close approximation.
|
| 140 |
+
|
| 141 |
+
Experimental scenarios. We examine the performance of our exploration framework and models across 4 learning settings: (1) poking only, $\mathrm { T _ { P } }$ , where only touch from the third finger of the hand is leveraged; (2) grasping only, $\mathrm { T _ { G } }$ , where only touch signals from all hand sensors are used during shape exploration; (3) poking with vision, $\mathrm { V } \& \mathrm { T } _ { \mathrm { P } }$ , an extension of $\mathrm { T _ { P } }$ that includes a visual input signal; and (4) grasping with vision, V&TG, an extension of $\mathrm { T _ { G } }$ that leverages a visual signal.
|
| 142 |
+
|
| 143 |
+
We evaluate the performance of our proposed reconstruction method in the target domain of 3D reconstruction from vision and touch, and compare it to the current state-of-the-art [56]. While Wang et. al.
|
| 144 |
+
|
| 145 |
+

|
| 146 |
+
Figure 5: Two objects from the test set, along with their four nearest neighbors in the test set measured in the latent space of our trained autoencoder $( \mathrm { V } \& \mathrm { T _ { G } }$ setting).
|
| 147 |
+
|
| 148 |
+
<table><tr><td></td><td></td><td colspan="2">Baselines</td><td colspan="2">Dataset specific</td><td colspan="4">Object-specific</td></tr><tr><td>Input</td><td>Oracle</td><td>Random</td><td>Even</td><td>MFBA</td><td>LEBA</td><td>NN</td><td>DDQNm</td><td>DDQN1</td><td>Sup</td></tr><tr><td>Tp</td><td>19.35</td><td>36.38</td><td>33.25</td><td>32.40</td><td>29.85</td><td>33.46</td><td>32.41</td><td>31.10</td><td>31.21</td></tr><tr><td></td><td>±0.00</td><td>±0.29</td><td>±0.48</td><td>±1.04</td><td>±0.39</td><td>±0.51</td><td>±0.40</td><td>±0.34</td><td>±0.67</td></tr><tr><td>TG</td><td>16.38 ±0.00</td><td>25.83 ±0.14</td><td>24.53 ±0.27</td><td>23.46 ±0.07</td><td>23.04 ±0.09</td><td>24.34 ±0.29</td><td>23.92 ±0.14</td><td>23.84 ±0.23</td><td>23.70 ±0.27</td></tr><tr><td>V&Tp</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>78.95</td><td>94.56</td><td>93.95</td><td>93.59</td><td>92.36</td><td>91.79</td><td>93.75</td><td>92.62</td><td>93.12</td></tr><tr><td></td><td>±0.00</td><td>±0.34</td><td>±0.29</td><td>±0.32</td><td>±0.25</td><td>±0.15</td><td>±0.48</td><td>±0.30</td><td>±0.38</td></tr><tr><td>V&TG</td><td>77.18</td><td>90.65</td><td>90.29</td><td>89.39</td><td>89.31</td><td>88.53</td><td>90.07</td><td>89.32</td><td>89.46</td></tr><tr><td></td><td>±0.00</td><td>±0.34</td><td>±0.32</td><td>±0.11</td><td>±0.25</td><td>±0.25</td><td>±0.51</td><td>±0.17</td><td>±0.23</td></tr></table>
|
| 149 |
+
|
| 150 |
+
Table 2: Comparison of active touch exploration strategies. Numbers represent a ratio between CD after 5 actions and initial CD (lower is better).
|
| 151 |
+
|
| 152 |
+
[68] do consider both vision and touch for 3D reconstruction, touch is not fused directly for prediction but rather used for shape refinement in sim2real transfer. The results of this experiment can be seen in Table 1 where the 4 highest performing models have been selected from the validation set while doing hyper-parameter search, and mean and variance numbers across these 4 models on the test set are shown. From these results it is clear that the proposed method outperforms the baseline comparison in all settings, and validates its model choices in our target multi-modal domain.
|
| 153 |
+
|
| 154 |
+
# 5.3 Shape Autoencoder
|
| 155 |
+
|
| 156 |
+
For each of the four learning settings an autoencoder is trained by leveraging the output of the reconstruction model. We qualitatively validate the shape embedding learnt by our autoencoder by visualizing object shapes and their nearest neighbors in the learnt embedding space. Figure 5 depicts 2 random objects sampled from the test set, along with the 4 other objects closest to their latent encoding in the test set for the $\mathrm { V } \& \mathrm { T _ { G } }$ setting. Moreover, in the supplemental materials we highlight the average CD between the input and output meshes across 5 grasps, in our 4 learning settings, and observe that they are low relative to the error of the corresponding reconstruction models. The visual similarity of objects to their closest neighbors in the latent space along with the relatively low CD achieved demonstrates that the learned latent encodings possess important shape information which may be leveraged in the proposed active exploration policies.
|
| 157 |
+
|
| 158 |
+
# 5.4 Active Touch Exploration Results
|
| 159 |
+
|
| 160 |
+
We examine the performance of all described active touch exploration strategies over 5 grasps and show the results of all policies over the 4 learning settings in Table 2. For the $\mathrm { D D Q N _ { m } }$ , $\mathrm { D D Q N _ { l } }$ , and Supervised policies, the 5 highest performing models have been selected from the validation set while doing hyperparameter search, and mean and variance numbers across these 5 models on the test set are reported. For the Random, and Even results, the strategies are repeated 5 times over the test set. For the MFBA, LEBA, and NN results, 5 random subsets of $40 \%$ of the training data are made to produce different fixed trajectories, or training set latent distributions. Figure 6 highlights the distributions of action selected by each strategy in the $\mathrm { T _ { G } }$ and V&TG settings. Here, the points of all actions on the sphere are transformed into their corresponding UV coordinates in an image, and the intensity value for every pixel corresponding to an action is set to its relative frequency computed over the test set. The visible area of the sphere of actions from the camera’s perspective is highlighted in orange, and non-visible in blue. Figure 2 highlights object predictions after 5 grasps with action selected using the DDQNl model in the $\mathrm { T _ { G } }$ and V&TG settings.
|
| 161 |
+
|
| 162 |
+
From Table 2, we can see the clear, and expected trend of the Oracle strategy being the best performing and the Random baseline being the worst, followed by the Even baseline which is slightly better. In all cases,
|
| 163 |
+
|
| 164 |
+

|
| 165 |
+
Figure 6: Distribution of selected actions (greyscale encoded) for all policies in the $\mathrm { T _ { G } }$ and $\mathrm { V } \& \mathrm { T _ { G } }$ settings, with visible area of the sphere of actions from the camera highlighted in orange.
|
| 166 |
+
|
| 167 |
+

|
| 168 |
+
Figure 7: Action selection for the Oracle, LEBA, NN, and Supervised strategies in the $\mathrm { V } \& \mathrm { T _ { G } }$ setting, where the arrows indicate the direction the hand moves towards the object for each selected action.
|
| 169 |
+
|
| 170 |
+
<table><tr><td rowspan=2 colspan=2>1Vision Signal</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=1 colspan=1>Oracle</td><td rowspan=1 colspan=1>LEBA</td><td rowspan=1 colspan=1>NN</td><td rowspan=1 colspan=1>Sup.</td></tr></table>
|
| 171 |
+
|
| 172 |
+
LEBA performs better than MFBA, most probably due its selection strategy being directly in line with the target objective. In both touch only settings, the LEBA policy performs best. For the learned policies, even after 4 grasps with a full hand of sensors, enough information about the current shape must not be available to properly learn the best action to perform. This is supported by the distributions in top line of Figure 6 where object-specific polices seem to employ close to a fixed strategy. In contrast to LEBA, these polices cannot leverage the full training dataset simultaneously and so their fixed strategy performs worse. From this we can see that even in the absence of meaningful shape information, leveraging the dataset of objects provides significantly better action selections leading to improved reconstruction accuracy.
|
| 173 |
+
|
| 174 |
+
In the vision and touch settings $( \mathrm { V } \& \mathrm { T } _ { \mathrm { P } }$ and $\mathrm { V } \& \mathrm { T _ { G } }$ ), we see a reverse trend, with the NN policies performing best in both grasping settings. From this we can see that in the presence of better shape understanding (due to additional vision input), more successful action selection can be discriminated per object. This is supported in Figure 6 where we see that with vision priors, far more variable actions are performed, meaning that the object shape is now being appropriately considered. Moreover, in row 2 of Figure 6 a trend can be observed where some policies avoid actions where the touched surface is more likely to be visible from the camera. In the $\mathrm { V } \& \mathrm { T _ { G } }$ setting, the NN, $\mathrm { D D Q N _ { M } }$ , and supervised policies select visible actions only $4 0 . 2 0 \%$ , $4 5 . 9 1 \%$ and $4 3 . 9 8 \%$ of the time respectively. Compared to the random policy which selects these actions $4 8 . 2 5 \ \%$ of the time, and the oracle which selects them $4 3 . 8 0 \%$ of the time, this indicates that these policies have learned the intuitive strategy of avoiding sampling areas of the surface which have already been observed. In Figure 7 the different action selection strategies employed by various policies and the Oracle are shown for the $\mathrm { V } \& \mathrm { T _ { G } }$ over 2 randomly sampled objects in the test set. Here the green arrows indicated from which direction the hand moves towards the objects for all 5 action selected. In both cases we see the object specific strategies tend to be fairly uniform around the sides, possibly to correctly identify the unseen dimensions of the objects.
|
| 175 |
+
|
| 176 |
+
# 6 Discussion
|
| 177 |
+
|
| 178 |
+
Limitations. There exist some limitations which should be highlighted. First, the reconstruction method aims to exclusively minimize the CD, which leads to poor visual object quality in the mesh representation [23, 67]. While attractiveness regularizers are available, we opted to focus exclusively on accuracy to make clear distinctions in improvement from information across different touch options. This is at the cost of visual quality. Second, the chosen shape agnostic grasp parameterization, where the hand always moves towards the center of the object leads touch sites biased towards the center of objects which possess dramatically different dimensional scales. An example of this can be seen the the first object of Figure 7, where because the object is long and thin, all touches will lie in the center of the object, as highlighted by the direction of the arrows. Finally, our environment requires full 3D shape supervision for training, which while easily available in simulation, limits its application to real world scenarios.
|
| 179 |
+
|
| 180 |
+
Societal Impact. Our work contributes towards improved understanding of the three dimensional world in which we all live. In particular, we provide new framework to study touch perception in a simulated environments. Thus, we advance the understanding of the importance of haptic information in the task of active 3D understanding, especially when used in tandem with visual signals. We envision our contributions to be relevant for real world robot-object manipulation. However, the improved active 3D object understanding could have positive impact in fields beyond robotics, such as automation and virtual reality. Failures of these models could arise if not enough testing is performed prior to the deployment of the automation tools. To mitigate these risks, we encourage further investigation focusing on active 3D reconstruction system generalization limits both in the simulated and real-world scenarios.
|
| 181 |
+
|
| 182 |
+
Conclusions. In this paper, we explored the problem of data-driven active touch for 3D object reconstruction from vision and touch. We introduced a tactile-grasping simulator which allows for the efficient production of vision and touch signals from selected grasp parameters, and built a new 3D reconstruction method from vision and touch which achieves impressive performance both with and without haptic inputs. Over these elements and a large dataset of simulated objects, we built an active touch exploration environment which allows for the training and testing of active touch policies for 3D shape reconstruction. Finally, we produced an array of data-driven active touch policies which we compared to a set of baselines. The benefit of leveraging data for active touch is then highlighted by the superior reconstruction results of learned policies both in the presence of poor and rich shape information. In the presence of only touch information, the most successful exploration strategies learn a deterministic trajectory over the training data to employ indiscriminately over test objects even in the presence of shape information, indicating that either not enough information is present or that this information cannot be learned over with the current models. In the vision and touch settings the most fruitful strategies learn to select grasps based on the current belief of the objects’ shape, and experiments also indicate that learned models tend to favour grasps which occur on occluded areas of the objects’ surface.
|
| 183 |
+
|
| 184 |
+
References
|
| 185 |
+
[1] Peter Allen. Surface descriptions from vision and touch. In IEEE International Conference on Robotics and Automation (ICRA), volume 1, pages 394–397. IEEE, 1984.
|
| 186 |
+
[2] Peter K Allen. Integrating vision and touch for object recognition tasks. The International Journal of Robotics Research, 7(6):15–33, 1988.
|
| 187 |
+
[3] Peter K Allen and Paul Michelman. Acquisition and interpretation of 3-d sensor data from touch. 1990.
|
| 188 |
+
[4] Y. Aloimonos, I. Weiss, and A. Bandyopadhyay. Active vision. International Journal of Computer Vision, 1:333–356, 1988.
|
| 189 |
+
[5] Kumar Ashutosh, Saurabh Kumar, and Subhasis Chaudhuri. 3d-nvs: A 3d supervision approach for next view selection. arXiv preprint arXiv:2012.01743, 2020.
|
| 190 |
+
[6] Tim Bakker, Herke van Hoof, and Max Welling. Experimental design for mri by greedy policy search. In H. Larochelle, M. Ranzato, R. Hadsell, M. F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, volume 33, pages 18954–18966. Curran Associates, Inc., 2020. URL https://proceedings.neurips.cc/paper/2020/file/ daed210307f1dbc6f1dd9551408d999f-Paper.pdf.
|
| 191 |
+
[7] A. Bierbaum, I. Gubarev, and R. Dillmann. Robust shape recovery for sparse contact location and normal data from haptic exploration. In 2008 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 3200–3205, 2008.
|
| 192 |
+
[8] Alexander Bierbaum, Matthias Rambow, Tamim Asfour, and Rudiger Dillmann. A potential field approach to dexterous tactile exploration of unknown objects. In IEEE-RAS International Conference on Humanoid Robots (Humanoids), pages 360–366. IEEE, 2008.
|
| 193 |
+
[9] Mårten Björkman, Yasemin Bekiroglu, Virgile Högman, and Danica Kragic. Enhancing visual perception of shape through tactile glances. In IEEE International Conference on Intelligent Robots and Systems (IROS), 11 2013. doi: 10.1109/IROS.2013.6696808.
|
| 194 |
+
[10] Angel X Chang, Thomas Funkhouser, Leonidas Guibas, Pat Hanrahan, Qixing Huang, Zimo Li, Silvio Savarese, Manolis Savva, Shuran Song, Hao Su, et al. Shapenet: An information-rich 3d model repository. arXiv preprint arXiv:1512.03012, 2015.
|
| 195 |
+
[11] Shengyong Chen, Youfu Li, and Ngai Ming Kwok. Active vision in robotic systems: A survey of recent developments. The International Journal of Robotics Research, 30(11):1343–1377, 2011.
|
| 196 |
+
[12] Julian Chibane, Thiemo Alldieck, and Gerard Pons-Moll. Implicit functions in feature space for 3d shape reconstruction and completion. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6970–6981, 2020.
|
| 197 |
+
[13] Christopher B Choy, Danfei Xu, JunYoung Gwak, Kevin Chen, and Silvio Savarese. 3d-r2n2: A unified approach for single and multi-view 3d object reconstruction. In Proceedings of the European Conference on Computer Vision (ECCV), pages 628–644. Springer, 2016.
|
| 198 |
+
[14] Cl Connolly. The determination of next best views. In Proceedings. 1985 IEEE international conference on robotics and automation, volume 2, pages 432–435. IEEE, 1985.
|
| 199 |
+
[15] Erwin Coumans and Yunfei Bai. Pybullet, a python module for physics simulation for games, robotics and machine learning. GitHub repository, 2016.
|
| 200 |
+
[16] A. Dame, V. A. Prisacariu, C. Y. Ren, and I. Reid. Dense reconstruction using 3d object shape priors. In 2013 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1288–1295, 2013.
|
| 201 |
+
[17] Jeffrey Delmerico, Stefan Isler, Reza Sabzevari, and Davide Scaramuzza. A comparison of volumetric information gain metrics for active 3d object reconstruction. Autonomous Robots, 42(2):197–208, 2018.
|
| 202 |
+
|
| 203 |
+
[18] Danny Driess, Peter Englert, and Marc Toussaint. Active learning with query paths for tactile object shape exploration. In n IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 2017.
|
| 204 |
+
|
| 205 |
+
[19] Haoqiang Fan, Hao Su, and Leonidas Guibas. A point set generation network for 3d object reconstruction from a single image. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), volume 38, 2017.
|
| 206 |
+
|
| 207 |
+
[20] Sascha Fleer, Alexandra Moringen, Roberta L Klatzky, and Helge Ritter. Learning efficient haptic shape exploration with a rigid tactile sensor array. PloS one, 15(1):e0226880, 2020.
|
| 208 |
+
|
| 209 |
+
[21] Scott Fujimoto, Herke Hoof, and David Meger. Addressing function approximation error in actorcritic methods. In International Conference on Machine Learning, pages 1587–1596. PMLR, 2018.
|
| 210 |
+
|
| 211 |
+
[22] Gabriela Zarzar Gandler, Carl Henrik Ek, Mårten Björkman, Rustam Stolkin, and Yasemin Bekiroglu. Object shape estimation and modeling, based on sparse gaussian process implicit surfaces, combining visual data and tactile exploration. Robotics and Autonomous Systems, 126:103433, 2020. ISSN 0921-8890. doi: https://doi.org/10.1016/j.robot.2020.103433. URL http://www.sciencedirect. com/science/article/pii/S0921889019303495.
|
| 212 |
+
|
| 213 |
+
[23] Georgia Gkioxari, Jitendra Malik, and Justin Johnson. Mesh r-cnn. IEEE International Conference on Computer Vision (ICCV), 2019.
|
| 214 |
+
|
| 215 |
+
[24] Thibault Groueix, Matthew Fisher, Vladimir G Kim, Bryan C Russell, and Mathieu Aubry. A papier-mâché approach to learning 3d surface generation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 216–224, 2018.
|
| 216 |
+
|
| 217 |
+
[25] C. Häne, N. Savinov, and M. Pollefeys. Class specific 3d object shape priors using surface normals. In 2014 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 652–659, 2014.
|
| 218 |
+
|
| 219 |
+
[26] Jarmo Ilonen, Jeannette Bohg, and Ville Kyrki. Three-dimensional object reconstruction of symmetric objects by fusing visual and tactile sensing. The International Journal of Robotics Research, 33 (2):321–341, 2014.
|
| 220 |
+
|
| 221 |
+
[27] Eldar Insafutdinov and Alexey Dosovitskiy. Unsupervised learning of shape and pose with differentiable point clouds. arXiv preprint arXiv:1810.09381, 2018.
|
| 222 |
+
|
| 223 |
+
[28] N. Jamali, C. Ciliberto, L. Rosasco, and L. Natale. Active perception: Building objects’ models using tactile exploration. In IEEE-RAS International Conference on Humanoid Robots (Humanoids), pages 179–185, Nov 2016. doi: 10.1109/HUMANOIDS.2016.7803275.
|
| 224 |
+
|
| 225 |
+
[29] Kyong Hwan Jin, Michael Unser, and Kwang Moo Yi. Self-supervised deep active accelerated mri. arXiv preprint arXiv:1901.04547, 2019.
|
| 226 |
+
|
| 227 |
+
[30] Abhishek Kar, Christian Häne, and Jitendra Malik. Learning a multi-view stereo machine. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, Advances in Neural Information Processing Systems (NeurIPS), pages 365–376. Curran Associates, Inc., 2017. URL http://papers.nips.cc/paper/ 6640-learning-a-multi-view-stereo-machine.pdf.
|
| 228 |
+
|
| 229 |
+
[31] Alex Kendall, Hayk Martirosyan, Saumitro Dasgupta, and Peter Henry. End-to-end learning of geometry and context for deep stereo regression. In IEEE International Conference on Computer Vision (ICCV), pages 66–75. IEEE Computer Society, 2017. doi: 10.1109/ICCV.2017.17. URL https://doi.org/10.1109/ICCV.2017.17.
|
| 230 |
+
|
| 231 |
+
[32] Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In Proceedings of the 5th International Conference on Learning Representations (ICLR), 2017. URL https://openreview.net/forum?id=SJU4ayYgl.
|
| 232 |
+
|
| 233 |
+
[33] Roberta L Klatzky, Susan J Lederman, and Dana E Matula. Haptic exploration in the presence of vision. Journal of Experimental Psychology: Human Perception and Performance, 19(4):726, 1993.
|
| 234 |
+
|
| 235 |
+
[34] Sebastian Koch, Albert Matveev, Zhongshi Jiang, Francis Williams, Alexey Artemov, Evgeny Burnaev, Marc Alexa, Denis Zorin, and Daniele Panozzo. Abc: A big cad model dataset for geometric deep learning. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019.
|
| 236 |
+
|
| 237 |
+
[35] Adarsh Kowdle, Yao-Jen Chang, Andrew Gallagher, and Tsuhan Chen. Active learning for piecewise planar 3d reconstruction. In CVPR 2011, pages 929–936. IEEE, 2011.
|
| 238 |
+
|
| 239 |
+
[36] Mike Lambeta, Po-Wei Chou, Stephen Tian, Brian Yang, Benjamin Maloon, Victoria Rose Most, Dave Stroud, Raymond Santos, Ahmad Byagowi, Gregg Kammerer, Dinesh Jayaraman, and Roberto Calandra. DIGIT: A novel design for a low-cost compact high-resolution tactile sensor with application to in-hand manipulation. IEEE Robotics and Automation Letters (RA-L), 5(3):3838– 3845, 2020. doi: 10.1109/LRA.2020.2977257.
|
| 240 |
+
|
| 241 |
+
[37] Susan J Lederman and Roberta L Klatzky. Extracting object properties through haptic exploration. Acta psychologica, 84(1):29–40, 1993.
|
| 242 |
+
|
| 243 |
+
[38] Shan Luo, Joao Bimbo, Ravinder Dahiya, and Hongbin Liu. Robotic Tactile Perception of Object Properties: A Review. arXiv e-prints, art. arXiv:1711.03810, November 2017.
|
| 244 |
+
|
| 245 |
+
[39] Matthew Matl. Pyrender. https://github.com/mmatl/pyrender, 2019.
|
| 246 |
+
|
| 247 |
+
[40] Takamitsu Matsubara and Kotaro Shibata. Active tactile exploration with uncertainty and travel cost for fast shape estimation of unknown objects. Robotics and Autonomous Systems, 91:314–326, 2017.
|
| 248 |
+
|
| 249 |
+
[41] Miguel Mendoza, J Irving Vasquez-Gomez, Hind Taud, L Enrique Sucar, and Carolina Reta. Supervised learning of the next-best-view for 3d object reconstruction. Pattern Recognition Letters, 133:224–231, 2020.
|
| 250 |
+
|
| 251 |
+
[42] Damien Michel, Xenophon Zabulis, and Antonis A Argyros. Shape from interaction. Machine Vision and Applications, 25(4):1077–1087, 2014.
|
| 252 |
+
|
| 253 |
+
[43] Ben Mildenhall, Pratul P Srinivasan, Matthew Tancik, Jonathan T Barron, Ravi Ramamoorthi, and Ren Ng. Nerf: Representing scenes as neural radiance fields for view synthesis. In European Conference on Computer Vision, pages 405–421. Springer, 2020.
|
| 254 |
+
|
| 255 |
+
[44] J Krishna Murthy, GV Sai Krishna, Falak Chhaya, and K Madhava Krishna. Reconstructing vehicles from a single image: Shape priors for road scene understanding. In 2017 IEEE International Conference on Robotics and Automation (ICRA), pages 724–731. IEEE, 2017.
|
| 256 |
+
|
| 257 |
+
[45] Simon Ottenhaus, Martin Miller, David Schiebener, Nikolaus Vahrenkamp, and Tamim Asfour. Local implicit surface estimation for haptic exploration. In IEEE-RAS International Conference on Humanoid Robots (Humanoids), pages 850–856, 11 2016. doi: 10.1109/HUMANOIDS.2016. 7803372.
|
| 258 |
+
|
| 259 |
+
[46] Simon Ottenhaus, Lukas Kaul, Nikolaus Vahrenkamp, and Tamim Asfour. Active tactile exploration based on cost-aware information gain maximization. International Journal of Humanoid Robotics, 15(01):1850015, 2018.
|
| 260 |
+
|
| 261 |
+
[47] Paschalis Panteleris, Nikolaos Kyriazis, and AA Argyros. Recovering 3d models of manipulated objects through 3d tracking of hand-object interaction. In IEEE International Conference on Computer Vision Workshops (OUI 2015-ICCVW 2015), Santiago, Chile, 2015.
|
| 262 |
+
|
| 263 |
+
[48] Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. Pytorch: An imperative style, high-performance deep learning library. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché- Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32, pages 8024–8035. Curran Associates, Inc., 2019. URL http://papers.neurips.cc/paper/ 9015-pytorch-an-imperative-style-high-performance-deep-learning-library. pdf.
|
| 264 |
+
|
| 265 |
+
[49] Z. Pezzementi, C. Reyda, and G. D. Hager. Object mapping, recognition, and localization from tactile geometry. In 2011 IEEE International Conference on Robotics and Automation, pages 5942–5948, 2011.
|
| 266 |
+
[50] Luis Pineda, Sumana Basu, Adriana Romero, Roberto Calandra, and Michal Drozdzal. Active mr k-space sampling with reinforcement learning. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 23–33. Springer, 2020.
|
| 267 |
+
[51] SG Potapova, AV Artemov, SV Sviridov, DA Musatkina, DN Zorin, and EV Burnaev. Next best view planning via reinforcement learning for scanning of arbitrary 3d shapes. Journal of Communications Technology and Electronics, 65(12):1484–1490, 2020.
|
| 268 |
+
[52] Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 1(2):4, 2017.
|
| 269 |
+
[53] Jason Rock, Tanmay Gupta, Justin Thorsen, JunYoung Gwak, Daeyun Shin, and Derek Hoiem. Completing 3d object shape from one depth image. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2484–2493, 2015.
|
| 270 |
+
[54] SimLab. Allegro hand overview, 2016. URL http://wiki.wonikrobotics.com/ AllegroHandWiki/index.php/Allegro_Hand_Overview. [Online; accessed 25-May-2020].
|
| 271 |
+
[55] Vincent Sitzmann, Julien N.P. Martel, Alexander W. Bergman, David B. Lindell, and Gordon Wetzstein. Implicit neural representations with periodic activation functions. In Proc. NeurIPS, 2020.
|
| 272 |
+
[56] Edward Smith, Roberto Calandra, Adriana Romero, Georgia Gkioxari, David Meger, Jitendra Malik, and Michal Drozdzal. 3d shape reconstruction from vision and touch. In H. Larochelle, M. Ranzato, R. Hadsell, M. F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, volume 33, pages 14193–14206. Curran Associates, Inc., 2020. URL https://proceedings. neurips.cc/paper/2020/file/a3842ed7b3d0fe3ac263bcabd2999790-Paper.pdf.
|
| 273 |
+
[57] Edward J Smith and David Meger. Improved adversarial systems for 3d object generation and reconstruction. In Conference on Robot Learning (CoRL), pages 87–96, 2017.
|
| 274 |
+
[58] Edward J. Smith, Scott Fujimoto, Adriana Romero, and David Meger. Geometrics: Exploiting geometric structure for graph-encoded objects. In Kamalika Chaudhuri and Ruslan Salakhutdinov, editors, Proceedings of the 36th International Conference on Machine Learning, ICML 2019, volume 97 of Proceedings of Machine Learning Research, pages 5866–5876. PMLR, 2019. URL http://proceedings.mlr.press/v97/smith19a.html.
|
| 275 |
+
[59] Nicolas Sommer, Miao Li, and Aude Billard. Bimanual compliant tactile exploration for grasping unknown objects. Proceedings - IEEE International Conference on Robotics and Automation, pages 6400–6407, 09 2014. doi: 10.1109/ICRA.2014.6907804.
|
| 276 |
+
[60] Xingyuan Sun, Jiajun Wu, Xiuming Zhang, Zhoutong Zhang, Chengkai Zhang, Tianfan Xue, Joshua B. Tenenbaum, and William T. Freeman. Pix3d: Dataset and methods for single-image 3d shape modeling. CoRR, abs/1804.04610, 2018. URL http://arxiv.org/abs/1804.04610.
|
| 277 |
+
[61] Julián Tachella, Yoann Altmann, Nicolas Mellado, Aongus McCarthy, Rachael Tobin, Gerald S Buller, Jean-Yves Tourneret, and Stephen McLaughlin. Real-time 3d reconstruction from singlephoton lidar data using plug-and-play point cloud denoisers. Nature communications, 10(1):1–6, 2019.
|
| 278 |
+
[62] Glenn H Tarbox and Susan N Gottschlich. Planning for complete sensor coverage in inspection. Computer Vision and Image Understanding, 61(1):84–111, 1995.
|
| 279 |
+
[63] Shubham Tulsiani, Tinghui Zhou, Alexei A Efros, and Jitendra Malik. Multi-view supervision for single-view reconstruction via differentiable ray consistency. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 209–217. IEEE, 2017.
|
| 280 |
+
[64] Dimitrios Tzionas and Juergen Gall. 3d object reconstruction from hand-object interactions. In Proceedings of the IEEE International Conference on Computer Vision, pages 729–737, 2015.
|
| 281 |
+
|
| 282 |
+
[65] Hado Van Hasselt, Arthur Guez, and David Silver. Deep reinforcement learning with double q-learning. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 30, 2016.
|
| 283 |
+
|
| 284 |
+
[66] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Ł ukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems, volume 30, 2017.
|
| 285 |
+
|
| 286 |
+
[67] Nanyang Wang, Yinda Zhang, Zhuwen Li, Yanwei Fu, Wei Liu, and Yu-Gang Jiang. Pixel2mesh: Generating 3d mesh models from single rgb images. arXiv preprint arXiv:1804.01654, 2018.
|
| 287 |
+
|
| 288 |
+
[68] S. Wang, J. Wu, X. Sun, W. Yuan, W. T. Freeman, J. B. Tenenbaum, and E. H. Adelson. 3d shape perception from monocular vision, touch, and shape priors. In IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 1606–1613, Oct 2018. doi: 10.1109/IROS.2018. 8593430.
|
| 289 |
+
|
| 290 |
+
[69] David Watkins-Valls, Jacob Varley, and Peter Allen. Multi-modal geometric learning for grasping and manipulation. In 2019 International Conference on Robotics and Automation (ICRA), pages 7339–7345. IEEE, 2019.
|
| 291 |
+
|
| 292 |
+
[70] Chenming Wu, Rui Zeng, Jia Pan, Charlie CL Wang, and Yong-Jin Liu. Plant phenotyping by deeplearning-based planner for multi-robots. IEEE Robotics and Automation Letters, 4(4):3113–3120, 2019.
|
| 293 |
+
|
| 294 |
+
[71] Qiangeng Xu, Weiyue Wang, Duygu Ceylan, Radomir Mech, and Ulrich Neumann. Disn: Deep implicit surface network for high-quality single-view 3d reconstruction. In Advances in Neural Information Processing Systems 32, pages 492–502. Curran Associates, Inc., 2019.
|
| 295 |
+
|
| 296 |
+
[72] Yaoqing Yang, Chen Feng, Yiru Shen, and Dong Tian. Foldingnet: Point cloud auto-encoder via deep grid deformation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 206–215, 2018.
|
| 297 |
+
|
| 298 |
+
[73] Zhengkun Yi, Roberto Calandra, Filipe Fernandes Veiga, Herke van Hoof, Tucker Hermans, Yilei Zhang, and Jan Peters. Active tactile object exploration with Gaussian processes. In IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 4925–4930, 2016. doi: 10.1109/IROS.2016.7759723.
|
| 299 |
+
|
| 300 |
+
[74] Wentao Yuan, Tejas Khot, David Held, Christoph Mertz, and Martial Hebert. Pcn: Point completion network. In 2018 International Conference on 3D Vision (3DV), pages 728–737, 2018.
|
| 301 |
+
|
| 302 |
+
[75] Wenzhen Yuan, Siyuan Dong, and Edward Adelson. Gelsight: High-resolution robot tactile sensors for estimating geometry and force. Sensors, 17(12):2762, Nov 2017. ISSN 1424-8220. doi: 10.3390/s17122762. URL http://dx.doi.org/10.3390/s17122762.
|
| 303 |
+
|
| 304 |
+
[76] Rui Zeng, Yuhui Wen, Wang Zhao, and Yong-Jin Liu. View planning in robot active vision: A survey of systems, algorithms, and applications. Computational Visual Media, pages 1–21, 2020.
|
| 305 |
+
|
| 306 |
+
[77] Rui Zeng, Wang Zhao, and Yong-Jin Liu. Pc-nbv: A point cloud based deep network for efficient next best view planning. In 2020 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 7050–7057. IEEE, 2020.
|
| 307 |
+
|
| 308 |
+
[78] Zizhao Zhang, Adriana Romero, Matthew J Muckley, Pascal Vincent, Lin Yang, and Michal Drozdzal. Reducing uncertainty in undersampled mri reconstruction with active acquisition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2049–2058, 2019.
|