ZHANGYUXUAN-zR commited on
Commit
f90dfaa
·
verified ·
1 Parent(s): f24a2b2

Add files using upload-large-folder tool

Browse files
parse/train/0WASBV4xkhy/0WASBV4xkhy.md ADDED
@@ -0,0 +1,361 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Towards a Theoretical Framework of Out-of-Distribution Generalization
2
+
3
+ Chuanlong XieHuawei Noah’s Ark Labxie.chuanlong@huawei.com
4
+
5
+ Haotian Ye
6
+ Peking University
7
+ Pazhou Lab
8
+ haotianye@pku.edu.cn
9
+
10
+ Tianle Cai Peking University caitianle1998@pku.edu.cn
11
+
12
+ # Ruichen Li
13
+
14
+ # Zhenguo Li
15
+
16
+ # Liwei Wang
17
+
18
+ Peking University xk-lrc@pku.edu.cn
19
+
20
+ Huawei Noah’s Ark Lab Li.Zhenguo@huawei.com
21
+
22
+ Key Laboratory of Machine Perception, MOE, School of EECS, Institute for Artificial Intelligence, Peking University wanglw@cis.pku.edu.cn
23
+
24
+ # Abstract
25
+
26
+ Generalization to out-of-distribution (OOD) data is one of the central problems in modern machine learning. Recently, there is a surge of attempts to propose algorithms that mainly build upon the idea of extracting invariant features. Although intuitively reasonable, theoretical understanding of what kind of invariance can guarantee OOD generalization is still limited, and generalization to arbitrary out-of-distribution is clearly impossible. In this work, we take the first step towards rigorous and quantitative definitions of 1) what is OOD; and 2) what does it mean by saying an OOD problem is learnable. We also introduce a new concept of expansion function, which characterizes to what extent the variance is amplified in the test domains over the training domains, and therefore give a quantitative meaning of invariant features. Based on these, we prove OOD generalization error bounds. It turns out that OOD generalization largely depends on the expansion function. As recently pointed out by [21], any OOD learning algorithm without a model selection module is incomplete. Our theory naturally induces a model selection criterion. Extensive experiments on benchmark OOD datasets demonstrate that our model selection criterion has a significant advantage over baselines.
27
+
28
+ # 1 Introduction
29
+
30
+ One of the most fundamental assumptions of classic supervised learning is the “i.i.d. assumption”, which states that the training and the test data are independent and identically distributed. However, this assumption can be easily violated in a reality [8, 10, 11, 17, 38, 48, 56] where the test data usually have a different distribution than the training data. This motivates the research on the out-ofdistribution (OOD) generalization, or domain generalization problem, which assumes access only to data drawn from a set $\mathcal { E } _ { a v a i l }$ of available domains during training, and the goal is to generalize to a larger domain set ${ \mathcal { E } } _ { a l l }$ including unseen domains.
31
+
32
+ To generalize to OOD data, most existing algorithms attempt to learn features that are invariant to a certain extent across training domains in the hope that such invariance also holds in unseen domains. For example, distributional matching-based methods [20, 35, 55] seek to learn features that have the same distribution across different domains; IRM [5] and its variants [1, 32, 33] learn feature representations such that the optimal linear classifier on top of the representation matches across domains.
33
+
34
+ 35th Conference on Neural Information Processing Systems (NeurIPS 2021).
35
+
36
+ Though the idea of learning invariant features is intuitively reasonable, there is only limited theoretical understanding of what kind of invariance can guarantee OOD generalization. Clearly, generalization to an arbitrary out-of-distribution domain is impossible and in practice, the features can hardly be absolutely invariant from $\mathcal { E } _ { a v a i l }$ to ${ \mathcal { E } } _ { a l l }$ unless all the domains are identical. So it is necessary to first formulate what OOD data can be generalized to, or, what is the relation between the available training domain set $\mathcal { E } _ { a v a i l }$ and the entire domain set ${ \mathcal { E } } _ { a l l }$ . Meanwhile, to what extent the invariance of features on $\mathcal { E } _ { a v a i l }$ can be preserved in ${ \mathcal { E } } _ { a l l }$ should be rigorously characterized.
37
+
38
+ In this paper, we take the first step towards a general OOD framework by quantitatively formalizing the relationship between $\mathcal { E } _ { a v a i l }$ and ${ \mathcal { E } } _ { a l l }$ in terms of the distributions of features and provide OOD generalization guarantees based on our quantification of the difficulty of OOD generalization problem. Specifically, we first rigorously formulate the intuition of invariant features used in previous works by introducing the “variation” and “informativeness” (Definition 3.1 and 3.2) of each feature. Our theoretical insight can then be informally stated as: for learnable OOD problems, if a feature is informative for the classification task as well as invariant over $\mathcal { E } _ { a v a i l }$ , then it is still invariant over ${ \mathcal { E } } _ { a l l }$ . In other words, invariance of informative features in $\mathcal { E } _ { a v a i l }$ can be preserved in ${ \mathcal { E } } _ { a l l }$ . We further introduce a class of functions, dubbed expansion function (Definition 3.3), to quantitatively characterize to what extent the variance of features on $\mathcal { E } _ { a v a i l }$ is amplified on ${ \mathcal { E } } _ { a l l }$ .
39
+
40
+ Based on our formulation, we derive theoretical guarantees on the OOD generalization error, i.e., the gap of largest error between the domain in $\mathcal { E } _ { a v a i l }$ and domain in ${ \mathcal { E } } _ { a l l }$ . Specifically, we prove the upper and lower bound of OOD generalization error in terms of the expansion function and the variation of learned features over $\mathcal { E } _ { a v a i l }$ . Our results theoretically confirm that 1) the expansion function can reflect the difficulty of OOD generalization problem, i.e., problems with more rapidly increasing expansion functions are harder and have worse generalization guarantees; 2) the generalization error gap can tend to zero when the variation of learned features tend to zero, so minimizing the variation in $\mathcal { E } _ { a v a i l }$ can reduce the generalization error.
41
+
42
+ As pointed out by Gulrajani and Lopez-Paz [21], any OOD algorithm without a specified model selection criterion is not complete. Since ${ \mathcal { E } } _ { a l l }$ is unseen, hyper-parameters can only be chosen according to $\mathcal { E } _ { a v a i l }$ . Previous selection methods mainly focus on validation accuracy over $\mathcal { E } _ { a v a i l }$ which is only a biased metric of OOD performance. On the contrary, a promising model selection method should instead be predictive of OOD performance. Inspired by our bounds, we propose a model selection method to select models with high validation accuracy and low variation, which corresponds to the upper bound of OOD error. The introduction of a model’s variation relieves the problem of classic selection methods, in which models that overfit $\mathcal { E } _ { a v a i l }$ tend to be selected. Experimental results show that our method can outperform baselines and select models with higher OOD accuracy.
43
+
44
+ Contributions. We summarize our major contributions here:
45
+
46
+ • We introduce a quantitative and rigorous formulation of OOD generalization problem that characterizes the relation of invariance over the training domain set $\mathcal { E } _ { a v a i l }$ and test domain set ${ \mathcal { E } } _ { a l l }$ . The core quantity in our characterization, the expansion function, determines the difficulty of an OOD generalization problem.
47
+
48
+ • We prove novel OOD generalization error bounds based on our formulation. The upper and lower bounds together indicate that the expansion function well characterizes the OOD generalization ability of features with different levels of variation.
49
+
50
+ • We design a model selection criterion that is inspired by our generalization bounds. Our criterion takes both the performance on training domains and the variation of models into consideration and is predictive of OOD performance according to our bounds. Experimental results demonstrate our selection criterion can choose models with higher OOD accuracy.
51
+
52
+ The rest of the paper is organized as follows: Section 2 is our preliminary. In Section 3, we give our theoretical formulation. Section 4 gives our generalization bound. We propose our model selection method in Section 5. In Section 6 we conduct experiments on expansion function and model selection. We review more related works in Section 7 and conclude our work in Section 8.
53
+
54
+ # 2 Preliminary
55
+
56
+ Throughout the paper, we consider a multi-class classification task $\mathcal { X } \to \mathcal { Y } = \{ 1 , . . . , K \}$ .1 Let ${ \mathcal { E } } _ { a l l }$ be the domain set we want to generalize to, and $\mathcal { E } _ { a v a i l } \subseteq \mathcal { E } _ { a l l }$ be the available domain set, i.e., all domains we have during the training procedure. We denote $( X ^ { e } , Y ^ { e } )$ to be the input-label pair drawn from the data distribution of domain $e$ . The OOD generalization goal is to find a classifier $f ^ { * }$ that minimizes the worst-domain loss on ${ \mathcal { E } } _ { a l l }$ :
57
+
58
+ $$
59
+ f ^ { * } = \underset { f \in \mathcal { F } } { \mathrm { a r g m i n } } \mathcal { L } ( \mathcal { E } _ { a l l } , f ) , \mathcal { L } ( \mathcal { E } , f ) \triangleq \underset { e \in \mathcal { E } } { \mathrm { m a x } } \mathbb { E } \big [ \ell \big ( f ( X ^ { e } ) , Y ^ { e } \big ) \big ]
60
+ $$
61
+
62
+ where $\mathcal { F } : \mathcal { X } \xrightarrow { } \mathbb { R } ^ { K }$ is the the hypothetical space and $\ell ( \cdot , \cdot )$ is a loss function. Similar to previous works [5, 16, 27, 33], we assume that $f$ can be decomposed into $g \circ h$ , where $g \in \mathcal { G } : \mathbb { R } ^ { d } \mathbb { R } ^ { K }$ is the top classifier and $h : \mathcal { X } \mathbb { R } ^ { d }$ is a $d$ -dimensional feature extractor, i.e.,
63
+
64
+ $$
65
+ h ( x ) = ( \phi _ { 1 } ( x ) , \phi _ { 2 } ( x ) , \ldots , \phi _ { d } ( x ) ) ^ { \top } , \quad \phi _ { i } \in \Phi .
66
+ $$
67
+
68
+ Here $\Phi$ is the set of scalar feature maps which map $\mathcal { X }$ to $\mathbb { R }$ and $d$ is fixed. We will call each $\phi \in \Phi$ a feature for simplicity. Given a domain $e$ , we denote the $d$ -dimensional random vector $h ( X ^ { e } )$ as $h ^ { e }$ , one-dimensional feature $\phi ( X ^ { e } )$ as $\phi ^ { e }$ , and the conditional distribution of $h ^ { e } , \phi ^ { e }$ given $Y ^ { e } = y$ as $\mathbb { P } ( h ^ { e } | y ) , \mathbb { P } ( \phi ^ { e } | y )$ . For simplicity, we assume the data distribution is balanced in every domain, i.e., $P ( Y ^ { e } = y ) = \frac { 1 } { K } , \forall y \in \mathcal { Y } , e \in \mathcal { E } _ { a l l }$ . Our framework can be easily extended to the case where the balanced assumption is removed, with an additional term corresponding to the imbalance adding to the generalization bounds.
69
+
70
+ # 3 Framework of OOD Generalization Problem
71
+
72
+ The main challenge of formalizing the OOD generalization problem is to mathematically describe the connection between $\mathcal { E } _ { a v a i l }$ and ${ \mathcal { E } } _ { a l l }$ and how generalization depends on this relation. Towards this goal, we introduce several quantities to characterize the relation of feature distributions over different domains and bridge $\mathcal { E } _ { a v a i l }$ and ${ \mathcal { E } } _ { a l l }$ by expansion function (Definition 3.3) over the quantities we have introduced. Our framework is motivated by the understanding that, in an OOD generalization task, certain “property” of “good” features in $\mathcal { E } _ { a v a i l }$ should be “preserved” in ${ \mathcal { E } } _ { a l l }$ (the reason is described in Section 1). In Section 3.1, we will go into details on what we mean by “property” (variation, Definition 3.1), “good” (informativeness, Definition 3.2), and “preserved” (measured by expansion function). In Section 6.2, we further illustrate the key concepts in our framework by a real-world OOD problem.
73
+
74
+ # 3.1 Formalizing OOD Problem by Quantifying Feature Distribution
75
+
76
+ We first introduce the concepts “variation" and “informativeness" of a feature $\phi$ . The first one is what we expect to be preserved in ${ \mathcal { E } } _ { a l l }$ and the second one characterizes what features will be considered. Specifically, let $\rho ( \mathbb { P } , \mathbb { Q } )$ be a symmetric “distance” of two distributions. Note that $\rho$ can have many choices, like $L _ { 2 }$ Distance, Total Variation and symmetric KL-divergence, etc. The variation and informativeness are defined as follows:
77
+
78
+ Definition 3.1 (Variation). The variation of feature $\phi ( \cdot )$ across a domain set $\mathcal { E }$ is
79
+
80
+ $$
81
+ \mathcal { V } _ { \rho } ( \phi , \mathcal { E } ) = \operatorname* { m a x } _ { y \in \mathcal { V } } \operatorname* { s u p } _ { e , e ^ { \prime } \in \mathcal { E } } \rho \big ( \mathbb { P } ( \phi ^ { e } | y ) , \mathbb { P } ( \phi ^ { e ^ { \prime } } | y ) \big ) .
82
+ $$
83
+
84
+ A feature $\phi ( \cdot )$ is $\varepsilon$ -invariant across $\mathcal { E }$ , $i f \varepsilon \geq \mathcal { V } ( \phi , \mathcal { E } )$ (We omit the subscript $\rho$ in case of no ambiguity). Definition 3.2 (Informativeness). The informativeness of feature $\phi ( \cdot )$ across a domain set $\mathcal { E }$ is
85
+
86
+ $$
87
+ \mathcal { T } _ { \rho } ( \phi , \mathcal { E } ) = \frac { 1 } { K ( K - 1 ) } \sum _ { \stackrel { y \neq y ^ { \prime } } { y , y ^ { \prime } \in y } } \operatorname* { m i n } _ { e \in \mathcal { E } } \rho \big ( \mathbb { P } ( \phi ^ { e } | y ) , \mathbb { P } ( \phi ^ { e } | y ^ { \prime } ) \big ) .
88
+ $$
89
+
90
+ A feature $\phi ( \cdot )$ is $\delta$ -informative across $\varepsilon$ , if $\quad \delta \leq { \mathcal { I } } ( \phi , { \mathcal { E } } )$ .
91
+
92
+ The variation $\mathcal { V } ( \phi , \mathcal { E } )$ measures the stability of $\phi ( \cdot )$ over the domains in $\mathcal { E }$ and the informativeness ${ \mathcal { T } } ( \phi , { \mathcal { E } } )$ captures the ability of $\phi ( \cdot )$ to distinguish different labels. We would like to highlight that the variation and informativeness are defined on each one-dimensional feature $\phi ( \cdot )$ . Unlike previous distance between distributions defined in $d$ -dimensional space, our definitions are more reasonable and practical, since it can be easily calculated and analyzed.
93
+
94
+ We are now ready to introduce the core quantity for connecting $\mathcal { E } _ { a v a i l }$ and ${ \mathcal { E } } _ { a l l }$ . Our motivation, as elaborated in the introduction section, is that, if a feature is informative for the classification task and invariant over $\mathcal { E } _ { a v a i l }$ , then to enable OOD generalization from $\mathcal { E } _ { a v a i l }$ to ${ \mathcal { E } } _ { a l l }$ , it should be still invariant over ${ \mathcal { E } } _ { a l l }$ . So the relation between $\mathcal { V } ( \phi , \mathcal { E } _ { a v a i l } )$ and $\mathinner { \gamma \mathopen { \left( \phi , \mathcal { E } _ { a l l } \right) } }$ of an informative feature captures the feasibility and difficulty of OOD generalization. To quantitatively measure this relation, we define the following function class:
95
+
96
+ Definition 3.3 (Expansion Function). We say a function $s : \mathbb { R } ^ { + } \cup \{ 0 \} \mathbb { R } ^ { + } \cup \{ 0 , + \infty \}$ is an expansion function, iff the following properties hold: 1) $s ( \cdot )$ is monotonically increasing and $s ( x ) \geq x , \forall x \geq 0 ; 2 ,$ ) $\begin{array} { r } { \operatorname* { l i m } _ { x 0 ^ { + } } s ( x ) = s ( 0 ) = 0 } \end{array}$ .
97
+
98
+ This function class gives a full characterization of how the variation between $\mathcal { E } _ { a v a i l }$ and ${ \mathcal { E } } _ { a l l }$ is related. Based on this function class, we can introduce our formulation of the learnability of OOD generalization as follows:
99
+
100
+ Definition 3.4 (Learnability). Let $\Phi$ be the feature space and $\rho$ be a distribution distance. We say an OOD generalization problem from $\mathcal { E } _ { a v a i l }$ to ${ \mathcal { E } } _ { a l l }$ is learnable if there exists an expansion function $s ( \cdot )$ and $\delta \geq 0$ , such that: for all $\phi \in \Phi$ satisfying ${ \mathcal { T } } _ { \rho } ( \phi , { \mathcal { E } } _ { a v a i l } ) \geq \delta$ , we have $s ( \mathcal { V } _ { \rho } ( \phi , \mathcal { E } _ { a v a i l } ) ) \geq$ $\mathcal { V } _ { \rho } \big ( \phi , \mathcal { E } _ { a l l } \big )$ . If such $s ( \cdot )$ and $\delta$ exist, we further call this problem $( s ( \cdot ) , \delta )$ -learnable. If an $o o D$ generalization problem is not learnable, we call $i t$ unlearnable.
101
+
102
+ To understand the intuition and rationality of our formulation, several discussions are in order.
103
+
104
+ Properties of the expansion function. In Definition 3.3, we highlight two properties of the expansion function. The first property comes naturally from the monotonicity properties of variation: any $\varepsilon _ { 1 }$ -invariant feature is also $\varepsilon _ { 2 }$ -invariant for $\varepsilon _ { 2 } \geq \varepsilon _ { 1 }$ ; and $\mathcal { V } ( \phi , \mathcal { E } _ { 1 } ) \leq \mathcal { V } ( \phi , \mathcal { E } _ { 2 } )$ for any ${ \mathcal { E } } _ { 1 } \subseteq { \mathcal { E } } _ { 2 }$ . The monotonicity also implies that larger ${ \mathcal { E } } _ { a l l }$ will induce larger $s ( \cdot ) ^ { 2 }$ and it is also harder to be generalized to. From this view, we can see that the scale of $s ( \cdot )$ can reflect the difficulty of OOD generalization. The second property is more crucial since it formulates the intuition that if an informative feature is almost invariant in $\mathcal { E } _ { a v a i l }$ , it should remain invariant in ${ \mathcal { E } } _ { a l l }$ . Without this assumption, OOD generalization can never be guaranteed because we cannot predict whether an invariant and informative feature in $\mathcal { E } _ { a v a i l }$ will vary severely in unseen ${ \mathcal { E } } _ { a l l }$ .
105
+
106
+ Necessity of informativeness. We include a seemingly redundant quantity informativeness in the definition of learnability. However, this term is necessary because only informative features are responsible for the performance of classification. Non-informative but invariant features over $\mathcal { E } _ { a v a i l }$ may only capture some noise that is irrelevant to the classification problem, and we shall not expect the noise to be invariant over ${ \mathcal { E } } _ { a l l }$ . Moreover, we show in Figure 1 that in practice, many invariant but useless features in $\mathcal { E } _ { a v a i l }$ vary a lot in ${ \mathcal { E } } _ { a l l }$ , and adding the constraint of informativeness makes the expansion function reasonable. In addition, there are multiple choices of $( s ( \cdot ) , \delta )$ to make an OOD generalization problem learnable: larger $\delta$ will filter out more features, and so $\dot { s } ( \cdot )$ can be smaller (flatter). This multiplicity will result in a trade-off between $s ( \cdot )$ and $\delta$ , which will be discussed in Section 6.2.
107
+
108
+ Two extreme cases: i.i.d. & unlearnable. To better understand the concept of learnability, we consider two extreme cases. (1) The first example is when all data from different $\textit { e } \in \mathcal { E } _ { a l l }$ are identically distributed, i.e., the classic supervised learning setting. This problem is $( s ( \cdot ) , 0 )$ -learnable with $s ( x ) = x$ , implying no extra difficulty in OOD generalization. (2) As an example of unlearnable, consider the following case (modified from Colored MNIST [5]): For $e \in \mathcal { E } _ { a v a i l }$ , images with label 0 always has a red background while images with label 1 has a blue background. For $e \in \mathcal { E } _ { a l l } \ \backslash \ \mathcal { E } _ { a v a i l }$ , this relationship is entirely inverse. Since data from different $e \in \mathcal { E } _ { a v a i l }$ are identically distributed but different from other $e \in \mathcal { E } _ { a l l }$ , no expansion function can make it learnable, i.e., it is OOD-unlearnable.
109
+
110
+ The unlearnability of this case also coincides with our intuition: Without prior knowledge, it is not clear from merely the training data, whether the task is to distinguish digit 0 from 1, or to distinguish color red from blue. As a result, generalization to ${ \mathcal { E } } _ { a l l }$ cannot be guaranteed.
111
+
112
+ # 4 Generalization Bound
113
+
114
+ In this section, we consider an OOD generalization problem from $\mathcal { E } _ { a v a i l }$ to ${ \mathcal { E } } _ { a l l }$ , and our goal is to analyze the OOD generalization error of classifier $f = g \circ h$ defined by
115
+
116
+ $$
117
+ \mathrm { e r r } ( f ) = \mathcal { L } ( \mathcal { E } _ { a l l } , f ) - \mathcal { L } ( \mathcal { E } _ { a v a i l } , f ) ,
118
+ $$
119
+
120
+ where we assume the loss function $l ( \cdot , \cdot )$ is bounded by $[ 0 , C ]$ . We prove two upper bounds (4.1, 4.2) as well as a lower bound (4.3) for $\operatorname { e r r } ( f )$ based on our formulation. Our bounds together provide a complete characterization of the difficulty of OOD generalization. Since we expect that an invariant classifier can generalize to unseen domains, we hope to bound $\operatorname { e r r } ( f )$ in terms of the certain variation of $f$ . To this end, we define the variation and informativeness of $f$ in terms of its features, i.e.,
121
+
122
+ $$
123
+ \begin{array} { r l r } { \mathcal { V } ^ { \operatorname* { s u p } } ( h , \mathcal { E } _ { a v a i l } ) } & { \triangleq } & { \underset { \beta \in S ^ { d - 1 } } { \operatorname* { s u p } } \mathcal { V } ( \beta ^ { \top } h , \mathcal { E } _ { a v a i l } ) , } \\ { \mathcal { T } ^ { \operatorname* { i n f } } ( h , \mathcal { E } _ { a v a i l } ) } & { \triangleq } & { \underset { \beta \in S ^ { d - 1 } } { \operatorname* { i n f } } \mathcal { T } ( \beta ^ { \top } h , \mathcal { E } _ { a v a i l } ) , } \end{array}
124
+ $$
125
+
126
+ where $( \beta ^ { \top } h ) ( x ) = \beta ^ { \top } h ( x )$ is a feature and $S ^ { d - 1 } = \{ \beta \in \mathbb { R } ^ { d } : \| \beta \| _ { 2 } = 1 \}$ is the unit $( d - 1 )$ -sphere.
127
+
128
+ Necessity of using supremum over linear combination. One seemingly plausible definition of the variation of a classifier $f$ can be the supremum over all $\mathcal { V } ( \phi _ { i } , \mathcal { E } _ { a v a i l } ) , i \in [ d ]$ . However, as is shown in Appendix 1, it is possible that two high-dimensional joint distributions have close marginal distribution in each dimension, while they do not overlap. In other words, there exist cases where $\mathcal { V } ( \phi _ { i } , \mathcal { E } _ { a l l } ) = 0 , \forall i \in [ d ]$ but after applying the top model $g$ over $\phi _ { i }$ ’s, the distribution varies a lot in $\mathcal { E } _ { a v a i l }$ . Our definition comes from the simple idea that the class of top model $\mathcal { G }$ is at least a linear space, so we should at least consider the variation of every (normalized) linear combination of $h ( \cdot )$ With this, we can guarantee the joint distribution distance is still small.
129
+
130
+ Theorem 4.1 (Main Theorem). Suppose we have learned a classifier $f ( x ) = g ( h ( x ) )$ such that $\forall e \in \mathcal { E } _ { a l l }$ and $\forall y \in \mathcal { V } ;$ $, p _ { h ^ { e } | Y ^ { e } } ( h | y ) \in L ^ { 2 } ( \mathbb R ^ { d } )$ . Denote the characteristic function of random variable $h ^ { e } | Y ^ { e }$ as $\hat { p } _ { h ^ { e } | Y ^ { e } } ( t | y ) = \mathbb { E } [ \exp \{ i \langle t , h ^ { e } \rangle \} | Y ^ { e } = y ]$ . Assume the hypothetical space $\mathcal { F }$ satisfies the following regularity conditions that $\exists \alpha , M _ { 1 } , M _ { 2 } > 0 , \forall f \in \mathcal { F } , \forall e \in \mathcal { E } _ { a l l } , y \in \mathcal { V }$ ,
131
+
132
+ $$
133
+ \int _ { h \in \mathbb { R } ^ { d } } p _ { h ^ { e } | Y ^ { e } } ( h | y ) | h | ^ { \alpha } \mathrm { d } h \leq M _ { 1 } \quad a n d \quad \int _ { t \in \mathbb { R } ^ { d } } | \hat { p } _ { h ^ { e } | Y ^ { e } } ( t | y ) | | t | ^ { \alpha } \mathrm { d } t \leq M _ { 2 } .
134
+ $$
135
+
136
+ $I f ( \mathcal { E } _ { a v a i l } , \mathcal { E } _ { a l l } )$ is $\left( s ( \cdot ) , \mathcal { T } ^ { i n f } ( h , \mathcal { E } _ { a v a i l } ) \right)$ -learnable under $\Phi$ with Total Variation $\rho ^ { 3 }$ , then we have
137
+
138
+ $$
139
+ \operatorname { e r r } ( f ) \leq O \left( s \left( \mathcal { V } _ { \rho } ^ { s u p } ( h , \mathcal { E } _ { a v a i l } ) \right) ^ { \frac { \alpha ^ { 2 } } { ( \alpha + d ) ^ { 2 } } } \right) .
140
+ $$
141
+
142
+ Here $\rho$ is total variation distance, and $O ( \cdot )$ depends on $d , C , \alpha , M _ { 1 } , M _ { 2 }$ .
143
+
144
+ The above theorem holds for a general classifier learned by any algorithms. Due to its generality, we need to introduce some technical regularity conditions on the density function. The assumption (4) assume the decay rate of density and its characteristic function, which is common in the literature, e.g. [14]. This theorem demonstrates that, the generalization error can be bounded by a function of the variation of $h$ , and it converges to 0 as the variation approaches to 0. Under some special but typical case where the top model $g$ is linear, we can further show that even without the regularity conditions in Theorem 4.1, we have a much better (linear) convergence rate.
145
+
146
+ Theorem 4.2 (Linear Top Model). Consider any loss satisfying $\begin{array} { r } { \ell ( \hat { y } , y ) = \sum _ { k = 1 } ^ { K } \ell _ { 0 } ( \hat { y } _ { k } , y _ { k } ) } \end{array}$ .4 For any classifier with linear top model $g$ , i.e.,
147
+
148
+ $$
149
+ f ( x ) = A h ( x ) + b w i t h A \in \mathbb { R } ^ { K \times d } , b \in \mathbb { R } ^ { K } ,
150
+ $$
151
+
152
+ $i f ( \mathcal { E } _ { a v a i l } , \mathcal { E } _ { a l l } )$ is $\left( s ( \cdot ) , \mathcal { T } ^ { i n f } ( h , \mathcal { E } _ { a v a i l } ) \right)$ -learnable under $\Phi$ with Total Variation $\rho$ , then we have
153
+
154
+ $$
155
+ \mathrm { e r r } ( f ) \leq O \Bigl ( s \bigl ( \mathcal { V } ^ { s u p } ( h , \mathcal { E } _ { a v a i l } ) \bigr ) \Bigr ) .
156
+ $$
157
+
158
+ Here $O ( \cdot )$ depends only on d and $C$ .
159
+
160
+ Discussion. Theorem 4.1 shows that, for any model, the generalization gap depends largely on the model’s variation captured by $\mathcal { V } ^ { \mathrm { s u p } } ( h , \mathcal { E } _ { a v a i l } )$ . The result is irrelevant to the algorithm and provides a guarantee for the generalization gap from $\mathcal { E } _ { a v a i l }$ to ${ \mathcal { E } } _ { a l l }$ , so long as the learned model $f$ is invariant, i.e. $\mathcal { V } ^ { \mathrm { s u p } } ( h , \mathcal { E } _ { a v a i l } )$ is small. When $s ( \cdot )$ is fixed, a model with smaller $\mathcal { V } ^ { \mathrm { s u p } } ( h , \mathcal { E } _ { a v a i l } )$ results in a smaller gap, which matches our understanding that invariant features in $\mathcal { E } _ { a v a i l }$ are somehow invariant in ${ \mathcal { E } } _ { a l l }$ . When $\mathcal { V } ^ { \mathrm { s u p } } ( h , \mathcal { E } _ { a v a i l } )$ is fixed, more difficult generalization will generate a larger expansion function, which leads to a larger gap. For the Gaussian class with bounded mean and variance, $\alpha \gg d$ and the convergent rate is almost linear.
161
+
162
+ However, without any constraint to $g$ , the convergent rate might be small. Theorem 4.2 then offers a generalization bound with a linear convergent rate under mild assumptions when $g$ is linear, which is common in reality. It relaxes the concentration assumption (Formula 4) and asks only for the integrability of the density. The convergent rate is identical to the convergent rate of the expansion function, showing that $s ( \cdot )$ captures the generalization quite well.
163
+
164
+ Proof Sketch of Theorem 4.1. The proof of the main result, Theorem 4.1, is decomposed into the following steps. First, we transform $\operatorname { e r r } ( f )$ into the Total Variation of joint distributions of features in different domains (Step 1). To bound the Total Variation, it is sufficient to bound the distance of the corresponding Fourier transform, and further, it is equivalent to bound the Radon transform of joint distributions (Step 2). Eventually, we show that $\mathcal { V } ^ { \mathrm { s u p } } ( \beta ^ { \top } h , \mathcal { E } _ { a v a i l } )$ can be used to bound the Radon transform, which finishes the proof (Step 3).
165
+
166
+ Step 1. The OOD generalization error can be bounded as:
167
+
168
+ $$
169
+ \mathrm { e r r } ( f ) \le \operatorname* { s u p } _ { ( e , e ^ { \prime } ) \in ( \mathcal { E } _ { a v a i l } , \mathcal { E } _ { a l l } ) } \frac { C } { K } \sum _ { y \in \mathcal { Y } } \int _ { h \in \mathbb { R } ^ { d } } \big | p _ { h ^ { e } | Y ^ { e } } ( h | y ) - p _ { h ^ { e ^ { \prime } } | Y ^ { e ^ { \prime } } } ( h | y ) ) \big | \mathrm { d } h .
170
+ $$
171
+
172
+ Step 2. According to the assumption (4), the dominant term in (7) is
173
+
174
+ $$
175
+ \int _ { | h | \leq r _ { 1 } } \Big | \int _ { | t | \leq r _ { 2 } } e ^ { - i \langle h , t \rangle } \big ( \hat { p } _ { h ^ { e } | Y ^ { e } } ( t | y ) - \hat { p } _ { h ^ { e ^ { \prime } } | Y ^ { e ^ { \prime } } } ( t | y ) \big ) \big ) \mathrm { d } t \Big | \mathrm { d } t ,
176
+ $$
177
+
178
+ where $r _ { 1 }$ and $r _ { 2 }$ are well-selected scalars that depend on $s \big ( \mathcal { V } _ { \rho } ^ { \mathrm { s u p } } ( h , \mathcal { E } _ { a v a i l } ) \big )$ . By the Projection Theorem [31, 42] and the Fourier Inversion Formula, (8) is bounded above by
179
+
180
+ $$
181
+ O ( r _ { 1 } ^ { d } r _ { 2 } ^ { d } ) \times \int _ { u \in \mathbb { R } } \big | \mathscr { R } _ { e ^ { \prime } } ( \beta , u ) - \mathscr { R } _ { e } ( \beta , u ) \big | \mathrm { d } u ,
182
+ $$
183
+
184
+ where $\mathcal { R } _ { e } ( \beta , u )$ is the Radon transform of $p _ { h ^ { e } | Y ^ { e } } ( t | y )$ .
185
+
186
+ Step 3. The right-hand side of Formula 8 can be bounded by $O \big ( r _ { 1 } ^ { d } r _ { 2 } ^ { d } s \big ( \mathcal { V } _ { \rho } ^ { \mathrm { s u p } } ( h , \mathcal { E } _ { a v a i l } ) \big ) \big )$ . We finish the proof by selecting appropriate $r _ { 1 }$ and $r _ { 2 }$ to balance the rate of the dominant term and other minor terms. For more details, please see Appendix 2 for the complete proofs.
187
+
188
+ Now we turn to the lower bound of $\operatorname { e r r } ( f )$
189
+
190
+ Theorem 4.3 (Lower Bound). Consider 0-1 loss: $\ell ( \hat { y } , y ) = \mathbb { I } ( \hat { y } \neq y )$ . For any $\delta > 0$ and any exps.t. $k x \leq s ( x ) < + \infty , x \in [ 0 , t ]$ $\begin{array} { r } { s _ { + } ^ { \prime } ( 0 ) \triangleq \operatorname* { l i m } _ { x \to 0 ^ { + } } \frac { s ( x ) - s ( 0 ) } { x } \in ( 1 , + \infty ) } \end{array}$ s(x)−s(0) ∈ (1, +∞); 2) exists k > 1, t > 0, $C _ { 0 }$ $O O D$ generaliz $( \mathcal { E } _ { a v a i l } , \mathcal { E } _ { a l l } )$ that is $( s ( \cdot ) , \delta )$ -learnable under linear feature space $\Phi$ w.r.t symmetric $K L$ -divergence $\rho$ , s.t. $\forall \varepsilon \ \in \ [ 0 , \frac { t } { 2 } ] .$ , the optimal classifier $f$ satisfying $\mathcal { V } ^ { s u p } ( h , \mathcal { E } _ { a v a i l } ) = \varepsilon$ will have the OOD generalization error lower bounded by
191
+
192
+ $$
193
+ \mathrm { e r r } ( f ) \geq C _ { 0 } \cdot s ( \mathcal { V } ^ { s u p } ( h , \mathcal { E } _ { a v a i l } ) ) .
194
+ $$
195
+
196
+ Theorem 4.3 shows that $\operatorname { e r r } ( f )$ of optimal classifier $f$ is lower bounded by its variation. Here “optimal” means the classifier that minimize $\mathcal { L } ( f , \mathcal { E } _ { a v a i l } )$ . Altogether, the above three theorems offer a bidirectional control of OOD generalization error, showing that our formulation can offer a fine-grained description of most OOD generalization problem in a theoretical way. To pursue a good OOD performance, OOD algorithm should focus on improving predictive performance on $\mathcal { E } _ { a v a i l }$ and controlling the variation $\mathcal { V } ^ { \mathrm { s u p } } ( h , \mathcal { E } _ { a v a i l } )$ simultaneously. Note that this bound starts from population error, and we call for future works to combine our generalization bound and traditional bound from data samples to population error, giving a more complete characterization of the problem.
197
+
198
+ # 5 Variation as a Factor of Model Selection Criterion
199
+
200
+ As is pointed out in [21], model selection has a significant effect on domain generalization, and any OOD algorithm without a model selection criterion is not complete. [21] trained more than 45,900 models with different algorithms, and results show that when traditional selection methods are applied, none of OOD algorithms can outperform ERM [58] by a significant margin. This result is not strange, since traditional selection methods focus mainly on (validation) accuracy, which is biased in OOD generalization [21, 63]. A very typical example is Colored MNIST [5], where the image is colored according to the label, but the relationship varies across domains. As explained in [5], ERM principle will only capture this spurious feature (color) and performs badly in ${ \mathcal { E } } _ { a l l }$ . Since ERM is exactly minimizing loss in $\mathcal { E } _ { a v a i l }$ , any model selection method using validation accuracy alone is likely to choose ERM rather than any other OOD algorithm [63]. Thus no algorithm will have a significant improvement compared to ERM.
201
+
202
+ A natural question arises: what else can we use, in addition to accuracy? Theorem 4.1 points out that, learning feature with small variation across $\mathcal { E } _ { a v a i l }$ is important for decreasing OOD generalization error. Once a model $f$ achieves a small $\mathcal { V } ^ { \mathrm { s u p } } ( h , \mathcal { E } _ { a v a i l } )$ , then $\operatorname { e r r } ( f )$ will be small. If the validation accuracy is also high, we shall know that the OOD accuracy will remain high. To this end, we propose our heuristic selection criterion (Algorithm 1). Instead of considering validation accuracy alone, we combine it with feature variation and select the model with high validation accuracy as well as low variation.
203
+
204
+ # Algorithm 1: Model Selection
205
+
206
+ Input: available dataset $\mathcal { X } _ { a v a i l } = ( \mathcal { X } _ { t r a i n } , \mathcal { X } _ { v a l } )$ , candidate models set $\mathcal { M }$ , var_acc_rate $r _ { 0 }$ .
207
+ for $f = g \circ h$ in $\mathcal { M }$ do for $i$ in $[ d ]$ do $\hat { \mathcal { V } } _ { i } \gets \operatorname* { m a x } _ { y \in \mathcal { V } , \mathcal { X } ^ { e } \neq \mathcal { X } ^ { e ^ { \prime } } \in \mathcal { X } _ { a v a i l } }$ Total Variation $( \mathbb { P } ( \phi _ { i } ^ { e } | y ) , \mathbb { P } ( \phi _ { i } ^ { e ^ { \prime } } | y ) )$ ; .Use GPU KDE end $\mathcal { V } _ { f } \gets \mathrm { m e a n } _ { i \in [ d ] } \hat { \mathcal { V } } _ { i }$ $\operatorname { A c c } _ { f } $ compute validation accuracy of $f$ using $\mathcal { X } _ { v a l }$
208
+ end
209
+ Retur ${ \mathfrak { n } } \operatorname { a r g m a x } _ { f \in { \mathcal { M } } } ( \operatorname { A c c } _ { f } - r _ { 0 } \mathcal { V } _ { f } )$
210
+
211
+ We briefly explain Algorithm 1 here. For each candidate model, we calculate its variation using the average of each feature’s variation, i.e., $\begin{array} { r } { \frac { 1 } { d } \sum _ { i \in [ d ] } \mathcal { V } ( \phi _ { i } , \mathcal { X } _ { a v a i l } ) } \end{array}$ . When deriving the bounds, we use $\mathcal { V } ^ { \mathrm { s u p } }$ instead of their average because we need to consider the worst case, i.e., the worst top model. In practice, we find out that the average of $\mathcal { V } ( \phi _ { i } , \mathcal { X } _ { a v a i l } )$ is enough to improve selection.
212
+
213
+ Our criterion of model selection is
214
+
215
+ $$
216
+ \operatorname { A c c } _ { f } { - r _ { 0 } \gamma _ { f } } ,
217
+ $$
218
+
219
+ i.e., we select a model with high validation accuracy and low variation simultaneously. Here $r _ { 0 }$ is a hyper-parameter representing the concrete relationship between $\operatorname { e r r } ( f )$ and $\mathcal { V } _ { f }$ . Although we have already used one hyper-parameter to help select multiple hyper-parameter combinations, it is natural to ask whether we can further get rid of the selection of $r _ { 0 }$ . Since $r _ { 0 }$ represents the relationship between variation and accuracy, which is actually determined by the unknown expansion function, explicitly calculating $r _ { 0 }$ is not possible. However, we can empirically estimate $r _ { 0 }$ using $\begin{array} { r } { r _ { 0 } = \frac { \mathrm { S t d } _ { f \in \hat { \mathcal { M } } } \mathrm { A c c } _ { f } } { \mathrm { S t d } _ { f \in \hat { \mathcal { M } } } \mathcal { V } _ { f } } } \end{array}$ where $\hat { \mathcal { M } } \subset \mathcal { M }$ is the model with not bad validation accuracy. We do not use the whole set $\mathcal { M }$ because some OOD algorithms will perform extremely bad when the penalty is huge, and these models will influence our estimation of the ratio. Since high validation means large informativeness in learned features, the use of $\hat { \mathcal { M } }$ is an implicit application of informative assumption.
220
+
221
+ As shown in Section 6.1, our method can select models with higher OOD accuracy in various OOD datasets. We also explain in Appendix 3 why our method can outperform the traditional method in Color MNIST, where the dataset is hand-make and simple enough to calculate the expansion function.
222
+
223
+ # 6 Experiments
224
+
225
+ In this section, we conduct experiments to compare our model selection criterion (Section 5) with the baseline method5 [21]. Since both the variation and informativeness in Definition 3.1 are based on one-dimensional features, we can directly estimate these quantities feature-by-feature and design model selection method based on them. To verify the existence of the expansion function and to see what it’s like in a real-world dataset, we plot nearly 2 million features trained in a common-used OOD dataset and compute their variation and informativeness. We then draw the expansion function for this problem.
226
+
227
+ # 6.1 Experiments on Model Selection
228
+
229
+ In this section, we conduct experiments to compare the performance of models selected by our method and by validation accuracy. We train models on different datasets, different $\mathcal { E } _ { a v a i l }$ , and select models according to a different selection criteria. We then compare the OOD accuracy of selected models.
230
+
231
+ Settings We train our model on three benchmark OOD datasets (PACS [34], OfficeHome [59], VLCS [57]) and consider all possible selections of $( \mathcal { E } _ { a v a i l } , \mathcal { E } _ { a l l } )$ . We choose ResNet–50 as our network architecture. We use ERM [58] and four common-used OOD algorithms (CORAL [55], Inter-domain Mixup [62], Group DRO [51], and IRM [5]). For each environment setup, we train 200 models using different algorithms, penalties, learning rates, and epoch. After training, we employ different selection methods and compare the OOD accuracy of the selected models. As stated in Section 5, we use the standard deviation of $\nu$ and validation accuracy in $\hat { \mathcal { M } }$ to estimate $r _ { 0 }$ , where ${ \hat { \mathcal { M } } } = \{ f \in { \mathcal { M } } : \operatorname { A c c } _ { f } \geq \operatorname* { m a x } _ { \hat { f } } \operatorname { A c c } _ { \hat { f } } - 0 . 1 \}$ . Note that calculating $\mathcal { V } ( \phi _ { i } , \mathcal { X } _ { a v a i l } )$ takes calculus many times, so we design a parallel GPU kernel density estimation to speed up the whole process a hundred times and manage to finish one model in seconds. For more details about the experiments, see Appendix 4.
232
+
233
+ Table 1: Model Selection Result. “Env” denotes the unseen domain during training. “Val” denotes the OOD accuracy of model selected by validation accuracy.
234
+
235
+ <table><tr><td rowspan="3">PACS</td><td>Env</td><td>A</td><td>C</td><td>P</td><td>S</td><td>avg</td><td>acc inc</td></tr><tr><td>Val</td><td>85.20%</td><td>80.42%</td><td>96.17%</td><td>77.86%</td><td>84.91%</td><td>1</td></tr><tr><td>Ours</td><td>88.72%</td><td>81.74%</td><td>96.83%</td><td>79.00%</td><td>86.57%</td><td>1.66%↑</td></tr><tr><td rowspan="3">OfficeHome</td><td>Env</td><td>A</td><td>C</td><td>P</td><td>R</td><td>avg</td><td>acc inc</td></tr><tr><td>Val</td><td>61.85%</td><td>55.56%</td><td>74.72%</td><td>76.25%</td><td>67.09%</td><td>-</td></tr><tr><td>Ours</td><td>65.76%</td><td>55.07%</td><td>75.20%</td><td>76.31%</td><td>68.09%</td><td>1.00%↑</td></tr><tr><td rowspan="3">VLCS</td><td>Env</td><td>C</td><td>L</td><td>S</td><td>V</td><td>avg</td><td>acc inc</td></tr><tr><td>Val</td><td>97.46%</td><td>64.83%</td><td>69.50%6</td><td>70.97%</td><td>75.69%</td><td>1</td></tr><tr><td>Ours</td><td>97.81%</td><td>66.98%</td><td>69.50%</td><td>70.97%</td><td>76.32%</td><td>0.63%↑</td></tr></table>
236
+
237
+ Result We summarize our experimental results in Table 1. For each environment setup, we select the best model according to Algorithm 1 and validation accuracy. The results show that on all datasets, our selection criterion significantly outperforms the validation accuracy in average OOD accuracy. For a more detailed comparison, our method improves the OOD accuracy in most of the 12 setups. Our experiments demonstrate that our criterion can help select models with higher OOD accuracy.
238
+
239
+ ![](images/c514b7d4698237506faccba2638407d1bd68cc2a61ac79a424f03d7abc31b464.jpg)
240
+ Figure 1: The expansion function of the OOD generalization problem on Office-Home. The $\mathbf { X } ^ { } -$ -axis stands for $\mathcal { V } ( \phi , \mathcal { E } _ { a v a i l } )$ and the y-axis for $\mathcal { V } ( \phi , \mathcal { E } _ { a l l } )$ . There are approximately 2 million points in each image, with each point representing a feature, and its color represents its informativeness. The solid red line stands for the expansion function under the corresponding $\delta$ . When $\delta$ increases, the expansion function decreases. When $\delta = 0$ , no expansion function can make it learnable.
241
+
242
+ One may wonder if the expansion function really exists and what it will look like for a real-world OOD generalization task. In this section, we consider the OOD dataset Office-Home [59]. We explicitly plot millions of features’ $\mathcal { V } _ { \rho } \big ( \phi , \mathcal { E } _ { a v a i l } \big )$ and $\mathcal { V } _ { \rho } \big ( \phi , \mathcal { E } _ { a l l } \big )$ with Total Variation $\rho$ to see what the expansion function is like in this task. We take the architecture as ResNet-50 [23], and we trained thousands of models with more than five algorithms, obtaining about 2 million features. The results are in Figure 1.
243
+
244
+ Existence of $s ( \cdot )$ . When $\delta = 0$ , some non-informative features are nearly 0-invariant across $\mathcal { E } _ { a v a i l }$ but are varying across ${ \mathcal { E } } _ { a l l }$ , so no expansion function can make this task learnable, i.e., this task is NOT $( s ( \cdot ) , 0 )$ for any expansion function. But as $\delta$ increases, only informative features are left, and now we can find appropriate $s ( \cdot )$ to make it learnable. We can clearly realize from the figure that $s ( \cdot )$ do exist when $\delta \geq 0 . 1 5$ .
245
+
246
+ Trade-off between $s ( \cdot )$ and $\delta$ . The second phenomenon is that the slope of $s ( \cdot )$ decreases as $\delta$ increases, showing a trade-off between $s ( \cdot )$ and $\delta$ . Although this trade-off comes naturally from the definition of learnability, it has a deep meaning. As is shown in Section 4, $\operatorname { e r r } ( f )$ is bounded by $O ( s ( \varepsilon ) )$ where $\varepsilon$ is the variation of the model. To make the bound tighter, a natural idea is to choose a flatter $s ( \cdot )$ . However, a flatter $s ( \cdot )$ corresponds to a larger $\delta$ . Typically, learning a model to meet this higher informativeness requirement is more difficult, and it is possible that the algorithm achieves this by capturing more domain-specific features, which will therefore increase the variation of the model, $\varepsilon$ . As a result, we are not sure whether $s ( \varepsilon )$ will increase or decrease. We believe this is also the essence of model selection: i.e., to trade-off between the variation and informativeness of a model, which is done in Formula 11.
247
+
248
+ # 7 More Related Works
249
+
250
+ Domain generalization [12, 39], or OOD generalization, has drawn much attention recently [21, 30]. The goal is to learn a model from several training domains and expect good performance on unseen test domains. [60, 64] offer a comprehensive survey. A popular solution is to extract domain-invariant feature representation. [45] and [49] proved that when the model is linear, the invariance under training domains can help discover invariant features on test domains. [5] introduces the invariant prediction into neural networks and proposes a practical objective function. After that, a lot of works arise from the view of causal discovery, distributional robustness and conditional independence [1, 7, 16, 15, 26, 32, 33, 43, 51, 61]. On the other hand, some works point out the weakness of existing methods from the theoretical and experimental perspectives [2, 21, 29, 41, 50].
251
+
252
+ The OOD generalization requires restrictions on how the target domains may differ. A straightforward approach is to define a set of test domains around the training domain using some distribution distance measure [6, 13, 19, 25, 51, 53, 54, 61]. Another feasible route is the causal framework which is robust to the test distributions caused by interventions[44, 46] on variables, e.g., [5, 24, 36, 37, 40, 47, 49, 52]. The principle of these methods is that a causal model is invariant and can achieve the minimal worstcase risk [4, 22, 44, 49]. Since the test distribution is unknown, additional assumptions are required for generalization analysis. [12, 18, 39] assume that the domains are generated from a hyper-distribution and measures the average risk estimation error bound. [3] derives a risk bound for any linear combination of training domains. For more related results in domain adaptation, a closed field where the test domains can be seen but are unlabeled, please see [9, 10, 28].
253
+
254
+ # 8 Conclusion
255
+
256
+ In this paper, we take the first step towards a rigorous theoretical framework of OOD generalization. We propose a mathematical formulation to characterize the learnability of OOD generalization problem. Based on our framework, we prove generalization bounds and give guarantees for OOD generalization error. Inspired by our bound, we design a model selection criterion to check the model’s variation and validation accuracy simultaneously. Experiments show that our metric has a significant advantage over the traditional selection method.
257
+
258
+ # Acknowledgments and Disclosure of Funding
259
+
260
+ Authors are thankful to the anonymous reviewers for their helpful and constructive feedback.
261
+
262
+ # References
263
+
264
+ [1] Kartik Ahuja, Karthikeyan Shanmugam, Kush Varshney, and Amit Dhurandhar. Invariant risk minimization games. arXiv preprint arXiv:2002.04692, 2020.
265
+ [2] Kartik Ahuja, Jun Wang, Amit Dhurandhar, Karthikeyan Shanmugam, and Kush R Varshney. Empirical or invariant risk minimization? a sample complexity perspective. arXiv preprint arXiv:2010.16412, 2020.
266
+ [3] Isabela Albuquerque, João Monteiro, Tiago H Falk, and Ioannis Mitliagkas. Adversarial target-invariant representation learning for domain generalization. arXiv preprint arXiv:1911.00804, 2019.
267
+ [4] John Aldrich. Autonomy. Oxford Economic Papers, 41(1):15–34, 1989.
268
+ [5] Martin Arjovsky, Léon Bottou, Ishaan Gulrajani, and David Lopez-Paz. Invariant risk minimization. arXiv preprint arXiv:1907.02893, 2019.
269
+ [6] J Andrew Bagnell. Robust supervised learning. In Proceedings of the national conference on artificial intelligence, volume 20, page 714. Menlo Park, CA; Cambridge, MA; London; AAAI Press; MIT Press; 1999, 2005.
270
+ [7] Haoyue Bai, Rui Sun, Lanqing Hong, Fengwei Zhou, Nanyang Ye, Han-Jia Ye, S-H Gary Chan, and Zhenguo Li. Decaug: Out-of-distribution generalization via decomposed feature representation and semantic augmentation. arXiv preprint arXiv:2012.09382, 2020.
271
+ [8] Sara Beery, Grant Van Horn, and Pietro Perona. Recognition in terra incognita. In Proceedings of the European Conference on Computer Vision (ECCV), September 2018.
272
+ [9] Shai Ben-David, John Blitzer, Koby Crammer, Fernando Pereira, et al. Analysis of representations for domain adaptation. Advances in neural information processing systems, 19:137, 2007.
273
+ [10] Shai Ben-David, John Blitzer, Koby Crammer, Alex Kulesza, Fernando Pereira, and Jennifer Wortman Vaughan. A theory of learning from different domains. Machine learning, 79(1):151–175, 2010.
274
+ [11] Yoshua Bengio, Tristan Deleu, Nasim Rahaman, Nan Rosemary Ke, Sebastien Lachapelle, Olexa Bilaniuk, Anirudh Goyal, and Christopher Pal. A meta-transfer objective for learning to disentangle causal mechanisms. In International Conference on Learning Representations, 2019.
275
+ [12] Gilles Blanchard, Gyemin Lee, and Clayton Scott. Generalizing from several related classification tasks to a new unlabeled sample. Advances in neural information processing systems, 24:2178–2186, 2011.
276
+ [13] Jose Blanchet, Yang Kang, Karthyek Murthy, and Fan Zhang. Data-driven optimal transport cost selection for distributionally robust optimization. In 2019 Winter Simulation Conference (WSC), pages 3740–3751. IEEE, 2019.
277
+ [14] Laurent Cavalier. Efficient estimation of a density in a problem of tomography. Annals of Statistics, pages 630–647, 2000.
278
+ [15] Shiyu Chang, Yang Zhang, Mo Yu, and Tommi Jaakkola. Invariant rationalization. In International Conference on Machine Learning, pages 1448–1458. PMLR, 2020.
279
+ [16] Elliot Creager, Joern-Henrik Jacobsen, and Richard Zemel. Exchanging lessons between algorithmic fairness and domain generalization, 2021. URL https://openreview.net/forum?id=DC1Im3MkGG.
280
+ [17] Alex J DeGrave, Joseph D Janizek, and Su-In Lee. Ai for radiographic covid-19 detection selects shortcuts over signal. medRxiv, 2020.
281
+ [18] Aniket Anand Deshmukh, Yunwen Lei, Srinagesh Sharma, Urun Dogan, James W Cutler, and Clayton Scott. A generalization error bound for multi-class domain generalization. arXiv preprint arXiv:1905.10392, 2019.
282
+ [19] Peyman Mohajerin Esfahani and Daniel Kuhn. Data-driven distributionally robust optimization using the wasserstein metric: Performance guarantees and tractable reformulations. Mathematical Programming, 171(1-2):115–166, 2018.
283
+ [20] Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, François Laviolette, Mario Marchand, and Victor Lempitsky. Domain-adversarial training of neural networks. The journal of machine learning research, 17(1):2096–2030, 2016.
284
+ [21] Ishaan Gulrajani and David Lopez-Paz. In search of lost domain generalization. arXiv preprint arXiv:2007.01434, 2020.
285
+ [22] Trygve Haavelmo. The probability approach in econometrics. Econometrica: Journal of the Econometric Society, pages iii–115, 1944.
286
+ [23] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016.
287
+ [24] Christina Heinze-Deml and Nicolai Meinshausen. Conditional variance penalties and domain shift robustness. Machine Learning, 110(2):303–348, 2021.
288
+ [25] Zhaolin Hu and L Jeff Hong. Kullback-leibler divergence constrained distributionally robust optimization. Available at Optimization Online, 2013.
289
+ [26] Wengong Jin, Regina Barzilay, and Tommi Jaakkola. Domain extrapolation via regret minimization. arXiv preprint arXiv:2006.03908, 2020.
290
+ [27] Wengong Jin, Regina Barzilay, and Tommi S. Jaakkola. Enforcing predictive invariance across structured biomedical domains, 2021. URL https://openreview.net/forum?id $=$ JywMsiz_NtO.
291
+ [28] Fredrik D Johansson, David Sontag, and Rajesh Ranganath. Support and invertibility in domain-invariant representations. In The 22nd International Conference on Artificial Intelligence and Statistics, pages 527–536. PMLR, 2019.
292
+ [29] Pritish Kamath, Akilesh Tangella, Danica J Sutherland, and Nathan Srebro. Does invariant risk minimization capture invariance? arXiv preprint arXiv:2101.01134, 2021.
293
+ [30] Pang Wei Koh, Shiori Sagawa, Henrik Marklund, Sang Michael Xie, Marvin Zhang, Akshay Balsubramani, Weihua Hu, Michihiro Yasunaga, Richard Lanas Phillips, Sara Beery, et al. Wilds: A benchmark of in-the-wild distribution shifts. arXiv preprint arXiv:2012.07421, 2020.
294
+ [31] Aleksandr Petrovich Korostelev and Alexandre B Tsybakov. Minimax theory of image reconstruction, volume 82. Springer Science & Business Media, 2012.
295
+ [32] Masanori Koyama and Shoichiro Yamaguchi. Out-of-distribution generalization with maximal invariant predictor. arXiv preprint arXiv:2008.01883, 2020.
296
+ [33] David Krueger, Ethan Caballero, Joern-Henrik Jacobsen, Amy Zhang, Jonathan Binas, Remi Le Priol, and Aaron Courville. Out-of-distribution generalization via risk extrapolation (rex). arXiv preprint arXiv:2003.00688, 2020.
297
+ [34] 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.
298
+ [35] Haoliang Li, Sinno Jialin Pan, Shiqi Wang, and Alex C Kot. Domain generalization with adversarial feature learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5400–5409, 2018.
299
+ [36] Sara Magliacane, Thijs van Ommen, Tom Claassen, Stephan Bongers, Philip Versteeg, and Joris M Mooij. Domain adaptation by using causal inference to predict invariant conditional distributions. arXiv preprint arXiv:1707.06422, 2017.
300
+ [37] Nicolai Meinshausen. Causality from a distributional robustness point of view. In 2018 IEEE Data Science Workshop (DSW), pages 6–10. IEEE, 2018.
301
+ [38] Jose G Moreno-Torres, Troy Raeder, Rocío Alaiz-Rodríguez, Nitesh V Chawla, and Francisco Herrera. A unifying view on dataset shift in classification. Pattern recognition, 45(1):521–530, 2012.
302
+ [39] Krikamol Muandet, David Balduzzi, and Bernhard Schölkopf. Domain generalization via invariant feature representation. In International Conference on Machine Learning, pages 10–18, 2013.
303
+ [40] Jens Müller, Robert Schmier, Lynton Ardizzone, Carsten Rother, and Ullrich Köthe. Learning robust models using the principle of independent causal mechanisms. arXiv preprint arXiv:2010.07167, 2020.
304
+ [41] Vaishnavh Nagarajan, Anders Andreassen, and Behnam Neyshabur. Understanding the failure modes of out-of-distribution generalization. arXiv preprint arXiv:2010.15775, 2020.
305
+ [42] Frank Natterer. The mathematics of computerized tomography. SIAM, 2001.
306
+ [43] Giambattista Parascandolo, Alexander Neitz, Antonio Orvieto, Luigi Gresele, and Bernhard Schölkopf. Learning explanations that are hard to vary. arXiv preprint arXiv:2009.00329, 2020.
307
+ [44] Judea Pearl. Causality. Cambridge university press, 2009.
308
+ [45] Jonas Peters, Peter Bühlmann, and Nicolai Meinshausen. Causal inference by using invariant prediction: identification and confidence intervals. Journal of the Royal Statistical Society. Series B (Statistical Methodology), pages 947–1012, 2016.
309
+ [46] Jonas Peters, Dominik Janzing, and Bernhard Schölkopf. Elements of causal inference: foundations and learning algorithms. The MIT Press, 2017.
310
+ [47] Niklas Pfister, Evan G Williams, Jonas Peters, Ruedi Aebersold, and Peter Bühlmann. Stabilizing variable selection and regression. arXiv preprint arXiv:1911.01850, 2019.
311
+ [48] Benjamin Recht, Rebecca Roelofs, Ludwig Schmidt, and Vaishaal Shankar. Do imagenet classifiers generalize to imagenet? In International Conference on Machine Learning, pages 5389–5400. PMLR, 2019.
312
+ [49] Mateo Rojas-Carulla, Bernhard Schölkopf, Richard Turner, and Jonas Peters. Invariant models for causal transfer learning. The Journal of Machine Learning Research, 19(1):1309–1342, 2018.
313
+ [50] Elan Rosenfeld, Pradeep Ravikumar, and Andrej Risteski. The risks of invariant risk minimization. arXiv preprint arXiv:2010.05761, 2020.
314
+ [51] Shiori Sagawa, Pang Wei Koh, Tatsunori B Hashimoto, and Percy Liang. Distributionally robust neural networks. In International Conference on Learning Representations, 2019.
315
+ [52] Bernhard Schölkopf, Dominik Janzing, Jonas Peters, Eleni Sgouritsa, Kun Zhang, and Joris Mooij. On causal and anticausal learning. arXiv preprint arXiv:1206.6471, 2012.
316
+ [53] Soroosh Shafieezadeh Abadeh, Peyman M Mohajerin Esfahani, and Daniel Kuhn. Distributionally robust logistic regression. Advances in Neural Information Processing Systems, 28:1576–1584, 2015.
317
+ [54] Aman Sinha, Hongseok Namkoong, and John Duchi. Certifying some distributional robustness with principled adversarial training. In International Conference on Learning Representations, 2018.
318
+ [55] Baochen Sun and Kate Saenko. Deep coral: Correlation alignment for deep domain adaptation. In European conference on computer vision, pages 443–450. Springer, 2016.
319
+ [56] Rohan Taori, Achal Dave, Vaishaal Shankar, Nicholas Carlini, Benjamin Recht, and Ludwig Schmidt. Measuring robustness to natural distribution shifts in image classification. Advances in Neural Information Processing Systems, 33, 2020.
320
+ [57] Antonio Torralba and Alexei A Efros. Unbiased look at dataset bias. In CVPR 2011, pages 1521–1528. IEEE, 2011.
321
+ [58] Vladimir Vapnik. Principles of risk minimization for learning theory. In Advances in neural information processing systems, pages 831–838, 1992.
322
+ [59] Hemanth Venkateswara, Jose Eusebio, Shayok Chakraborty, and Sethuraman Panchanathan. Deep hashing network for unsupervised domain adaptation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5018–5027, 2017.
323
+ [60] Jindong Wang, Cuiling Lan, Chang Liu, Yidong Ouyang, Wenjun Zeng, and Tao Qin. Generalizing to unseen domains: A survey on domain generalization. arXiv preprint arXiv:2103.03097, 2021.
324
+ [61] Chuanlong Xie, Fei Chen, Yue Liu, and Zhenguo Li. Risk variance penalization. arXiv preprint arXiv:2006.07544, 2020.
325
+ [62] Shen Yan, Huan Song, Nanxiang Li, Lincan Zou, and Liu Ren. Improve unsupervised domain adaptation with mixup training. arXiv preprint arXiv:2001.00677, 2020.
326
+ [63] Haotian Ye, Chuanlong Xie, Yue Liu, and Zhenguo Li. Out-of-distribution generalization analysis via influence function. arXiv preprint arXiv:2101.08521, 2021.
327
+ [64] Kaiyang Zhou, Ziwei Liu, Yu Qiao, Tao Xiang, and Chen Change Loy. Domain generalization: A survey. arXiv preprint arXiv:2103.02503, 2021.
328
+
329
+ # Checklist
330
+
331
+ 1. For all authors...
332
+
333
+ (a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
334
+ (b) Did you describe the limitations of your work? [Yes] See Section 5.
335
+ (c) Did you discuss any potential negative societal impacts of your work? [N/A]
336
+ (d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
337
+
338
+ 2. If you are including theoretical results...
339
+
340
+ (a) Did you state the full set of assumptions of all theoretical results? [Yes] (b) Did you include complete proofs of all theoretical results? [Yes]
341
+
342
+ 3. If you ran experiments...
343
+
344
+ (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]
345
+ (b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] In the appendix.
346
+ (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [N/A]
347
+ (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]
348
+
349
+ 4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
350
+
351
+ (a) If your work uses existing assets, did you cite the creators? [Yes] We use [21] and we cite it in Section 6.
352
+ (b) Did you mention the license of the assets? [N/A]
353
+ (c) Did you include any new assets either in the supplemental material or as a URL? [No]
354
+ (d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [Yes]
355
+ (e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
356
+
357
+ 5. If you used crowdsourcing or conducted research with human subjects...
358
+
359
+ (a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
360
+ (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
361
+ (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
parse/train/0WASBV4xkhy/0WASBV4xkhy_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Bkx0RjA9tX/Bkx0RjA9tX.md ADDED
@@ -0,0 +1,342 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATIVE QUESTION ANSWERING: LEARNING TO ANSWER THE WHOLE QUESTION
2
+
3
+ Mike Lewis & Angela Fan Facebook AI Research {mikelewis,angelafan}@fb.com
4
+
5
+ # ABSTRACT
6
+
7
+ Discriminative question answering models can overfit to superficial biases in datasets, because their loss function saturates when any clue makes the answer likely. We introduce generative models of the joint distribution of questions and answers, which are trained to explain the whole question, not just to answer it. Our question answering (QA) model is implemented by learning a prior over answers, and a conditional language model to generate the question given the answer— allowing scalable and interpretable many-hop reasoning as the question is generated word-by-word. Our model achieves competitive performance with comparable discriminative models on the SQUAD and CLEVR benchmarks, indicating that it is a more general architecture for language understanding and reasoning than previous work. The model greatly improves generalisation both from biased training data and to adversarial testing data, achieving state-of-the-art results on ADVERSARIALSQUAD.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Question answering tasks are widely used for training and testing machine comprehension and reasoning (Rajpurkar et al., 2016; Joshi et al., 2017). However, high performance has been achieved with only superficial understanding, as models exploit simple correlations in the data (Weissenborn et al., 2017; Zhou et al., 2015). For example, in Visual QA (Agrawal et al., 2017), the answer to What colour is the grass? can be memorised as green without considering the image (Figure 1).
12
+
13
+ We argue that this over-fitting to biases is partly caused by discriminative loss functions, which saturate when simple correlations allow the question to be answered confidently, leaving no incentive for further learning on the example.
14
+
15
+ We propose generative QA models, using Bayes’ rule to reparameterise the distribution of answers given questions in terms of the distribution of questions given answers. We learn a prior over answers and a conditional language model for generating the question—reducing question answering to sequence-to-sequence learning (Sutskever et al., 2014), and allowing many-hop reasoning as the model explains the whole question word-by-word.
16
+
17
+ Generative loss functions train the model to explain all question words, even if the answer is obvious. For example, a model cannot assign high probability to generating the question What colour is the grass? without learning a dependency between the image and the word grass. We show that this method allows much improved generalisation from biased training data and to adversarial test data, compared to state-of-the-art discriminative models.
18
+
19
+ Word-by-word generative modelling of questions also supports chains of reasoning, as each subpart of the question is explained in turn. Existing methods use a pre-specified number of reasoning steps (Sukhbaatar et al., 2015; Hudson & Manning, 2018), which may be too many steps on easy cases, and too few on long and complex questions. We instead perform an interpretable reasoning step for each question word, and achieve $9 7 . 7 \%$ accuracy on the CLEVR benchmark (Johnson et al., 2017).
20
+
21
+ Our approach opens a promising new direction for question answering, with strong results in language understanding, reasoning and generalisation.
22
+
23
+ ![](images/4ea3ae44df91abbf802dd70ffd949fe57baa29e2dc6df16e8c5ad6e7813f40b1.jpg)
24
+
25
+ Does the green rubber object have the same shape as the gray thing that is on the right side of the big purple object?
26
+
27
+ Is the purple thing the same shape as the large gray rubber thing?
28
+
29
+ (a) Two CLEVR questions. Both can be answered no using only subsets of the available information. A generative model must learn to perform additional reasoning to assign high likelihood to the complete question-answer pair. Word-by-word question generation allows a reasoning step to explain each word.
30
+
31
+ Whilst filming in Mexico City, speculation in the media claimed that the script had been altered to accommodate the demands of Mexican authorities reportedly influencing details of the scene and characters, casting choices, and modifying the script in order to portray the country in a “positive light” in order to secure tax concessions and financial support worth up to $\$ 20$ million for the film. This was denied by producer Michael G. Wilson.
32
+
33
+ Which Bond producer would not confirm that the film had been changed to accommodate Mexican authorities?
34
+
35
+ (b) A SQUAD question. A discriminative model can identify the only producer, and ignore the rest of the question. To generate the question and answer, our model needs coreference, negation and paraphrasing. These reasoning skills can improve generalisation on test examples with multiple plausible answers.
36
+
37
+ Figure 1: Examples of questions that can be answered using only some question words (underlined).
38
+
39
+ # 2 MODEL
40
+
41
+ # 2.1 OVERVIEW
42
+
43
+ We assume a dataset of examples with a question $q = q _ { 0 . . T }$ , answer $a$ , and context $c$ (in our experiments, $c$ is a document or image, but alternatives such as knowledge graphs could be used).
44
+
45
+ We train models to minimize the negative log likelihood of the joint distribution of questions and answers given the context, $- \log p ( q , a | c )$ , which we decompose using the chain rule as:
46
+
47
+ $$
48
+ \mathcal { L } = - \log p ( a | c ) - \sum _ { t } \log p ( q _ { t } | a , c , q _ { 0 . . t - 1 } )
49
+ $$
50
+
51
+ First $c$ is encoded, using a recurrent model for text $( \ S 2 . 2 )$ and a using a convolutional model for images (§2.3).
52
+
53
+ Then, a prior over answers $p ( a | c )$ is evaluated by scoring all possible answers (2.4).
54
+
55
+ The likelihood of the question $p ( q | a , c )$ is modelled using a conditional language model (§2.5).
56
+
57
+ At test time, the answer maximizing $p ( q , a | c )$ is returned1 (§2.7).
58
+
59
+ Hyperparameters and training details are fully described in Appendix A.
60
+
61
+ # 2.2 DOCUMENT ENCODER
62
+
63
+ Answer-independent Context Representation We use contextualised word representations, similar to ELMo (Peters et al., 2018). We use character-based word embeddings (Kim et al., 2016) and train a 2-layer LSTM language model in the forward and reverse directions, using the WikiText-103 corpus (Merity et al., 2016) for domain-specificity2. These parameters are frozen, and not finetuned. Contextualised word representations are computed as a fully connected layer applied to the concatenation of the word embedding and the hidden states of each layer of the language model. We sum this representation with a trainable vector of size $d$ if the word occurs in the article title, giving the encoder information about the article topic. We follow this with bidirectional LSTMs of size $d / 2$ , concatenating the output in each direction and adding residual connections after each layer.
64
+
65
+ What we now call gravity was not identified as a universal force until the work of Isaac Newton. [...] Galileo was instrumental in describing the characteristics of falling objects [...] this acceleration due to gravity towards the surface of the Earth is usually designated as and has a magnitude of about 9.81 meters per second squared [...], and points toward the center of the Earth. [...] Distractor: Object falls about 5 times faster on Mars.
66
+
67
+ ![](images/11e6c9fa19f967ab01fb9398ccc26793a802ffce483743e59f947b1cb08b413a.jpg)
68
+ Figure 2: Probabilities of generating question words given different answers for a standard and an adversarial SQUAD question, allowing us to interpret which questions words are explained by the answer. In the standard setting, the model places greater probability on the question words that appear near Isaac Newton, such as force compared to Galileo. In the adversarial setting, the question word Earth distinguishes the true answer from the distractor.
69
+
70
+ Answer Encoder We assume answers $a$ are a span $i . . j$ of the document. We represent the answer as a weighted sum of words within the span. For each word representation $\begin{array} { r } { \sum _ { k = i \ldots j } \sigma ( w \cdot \tilde { c } _ { k } ) \tilde { c } _ { k } } \end{array}$ , where $w \in R ^ { d }$ is a trainable vector, and $\tilde { c } _ { k }$ is the kth word in the answer-independent document representation. In contrast to previously proposed span representations (Lee et al., 2016; He et al., 2018), this approach allows the model to select arbitrarily many head words from the span.
71
+
72
+ Answer-dependent Context Representation Generative training makes it feasible to model more complex interactions between the answer and context than discriminative training, because only the correct answer is used. On SQUAD, we compute an answer-dependent document representation.
73
+
74
+ Here, we take the output of the answer-independent representation of each context word, and concatenate it with 32-dimensional embeddings of: a binary feature for whether the word is contained in the answer, its position relative to the answer start, and its position relative to the answer end. We also concatenate the element-wise product of the word representation and the answer encoding. We feed the result into 3 further layers of residual bidirectional LSTMs of size $d / 2$ .
75
+
76
+ # 2.3 IMAGE ENCODER
77
+
78
+ We use a simple image encoder, leaving reasoning to the question decoder.
79
+
80
+ Following Johnson et al. (2017), we take pre-trained features from the conv4 layer ResNet-101 model (He et al., 2016), giving 1024-dimensional features for a $1 4 \mathrm { x } 1 4$ image grid. We apply dropout, and project these representations to size $d$ using a 1x1 convolution, followed by batch normalisation (Ioffe & Szegedy, 2015) and a ReLU activation (Nair & Hinton, 2010). We then use 2 blocks of $3 { \tt X } 3$ convolutions, batch normalisation and ReLUs, and concatenate the final representation with a 32-dimensional positional encoding.
81
+
82
+ # 2.4 ANSWER PRIOR
83
+
84
+ We found modelling $p ( a | c )$ , the distribution over answers given the context, to be straightforward.
85
+
86
+ On SQUAD, we concatenate the start and end representations of the answer-independent context representation, combine them with a single hidden layer of size $2 d$ and ReLU activation, and project this representation down to a score $s ^ { \mathrm { e n d p o i n t s } } ( a , c )$ . We also add an additional score based only on the length of the answer $s ^ { \mathrm { l e n g t h } } ( a )$ . Finally, we calculate: $\begin{array} { r } { p ( a | c ) = \frac { \exp { ( s ^ { \mathrm { e n d p o i n t s } } ( a , c ) + s ^ { \mathrm { l e n g t h } } ( a ) ) } } { \sum _ { a ^ { \prime } } \exp { ( s ^ { \mathrm { e n d p o i n t s } } ( a ^ { \prime } , c ) + s ^ { \mathrm { l e n g t h } } ( a ^ { \prime } ) ) } } } \end{array}$
87
+
88
+ On CLEVR, we simply apply a fully connected layer of size $2 d$ and ReLU activation to the image representation, followed by a projection to the space of all possible answers and a softmax.
89
+
90
+ ![](images/54abe8f1cd06caa9b40dbab56e9c8335e02379b89c46c2e60fc4a281b7e382e3.jpg)
91
+ Figure 3: Architecture of GQA decoder. Multiple inputs to a layer indicates concatenation. Blocks after the first are connected with an additional residual connection, and LSTM cells also receive their state at time $t - 1$ as an input.
92
+
93
+ # 2.5 QUESTION DECODER
94
+
95
+ We generate question words left-to-right with teacher forcing. We first embed words independently of the context (§2.5.1), then use a multi-layer RNN with attention to model interactions between the question and context $( \ S 2 . 5 . 2 )$ , and finally compute the likelihood of the next word (§2.5.3).
96
+
97
+ # 2.5.1 INPUT WORD EMBEDDINGS
98
+
99
+ To represent SQUAD question words independently of the answer and document, we use a pretrained left-to-right language model (which can be viewed as a uni-directional version of ELMo), followed by a trainable LSTM layer of size $d$ . On CLEVR, we simply train embeddings of size $d$ .
100
+
101
+ # 2.5.2 DECODER BLOCKS
102
+
103
+ Decoder blocks are composed of a question self-attention layer (Vaswani et al., 2017) and a questionto-context attention mechanism, which are combined and fed into an LSTM (Figure 3). The context attention query is computed using both the previous layer state and the self-attention value. Blocks after the first are connected with residual connections.
104
+
105
+ Our attention mechanisms are implemented as in Vaswani et al., except that we use a single-headed attention, and a bias term $b _ { j }$ is added to the query-key score for context position $j$ . This bias term (calculated as a dot product of a shared trainable vector and context encoding $c _ { j }$ ) allows the model to easily filter out parts of the context which are irrelevant to the question.
106
+
107
+ A final block again uses self-attention and question-to-document attention, which are then combined with a Gated Linear Unit layer (Dauphin et al., 2017) to output a vector of size $d$ . The GLU layer uses a gating mechanism to select the relevant information for predicting the subsequent word.
108
+
109
+ # 2.5.3 OUTPUT WORD PROBABILITIES
110
+
111
+ Rare words are more challenging for generative than discriminative models, because it is easier to guess the meaning of a rare word from morphological clues than to generate it. SQUAD contains many rare words, because of the specialised vocabulary in Wikipedia. We improve modelling of rare words using a combination of an approximate character-based softmax and copy mechanism.
112
+
113
+ Word Softmax The simplest approach is to learn an embedding per word, replacing infrequent words with an unknown token. This approach cannot discriminate between different rare words. We use this method on CLEVR, which has a small vocabulary.
114
+
115
+ ![](images/57145f9925bdfa9d12c796b1ebbe1a25908c21eec1e131efb7b0370bb907722f.jpg)
116
+ Figure 4: Final layer attention maps and word probabilities during question generation on a CLEVR validation question, when predicting the highlighted word. (1) The model considers all the rubber objects for predicting the next word. (2) Objects to the left of a rubber object are considered. (3) It describes the brown cylinder. (4, 5) Word distributions show the model understands the next words, but interestingly its attention focuses on the set of two objects meeting the constraints. In all cases, the word probability distributions are heavily skewed towards semantically valid choices.
117
+
118
+ Character Softmax While there is an infinite space of possible output words, we approximate it by only normalising over the union of a list of frequent words, and any additional word that appears in any question or any document in the batch. We build a character-based representation for each candidate word using the pre-trained character CNN from $\ S 2 . 2$ , and add a trainable linear projection to size $d$ . We combine character-based and word-based representations by summation.
119
+
120
+ Pointer Mechanism We use a pointer mechanism (Vinyals et al., 2015) to improve the likelihood of the specialised vocabulary present in SQUAD, by copying article words. From the final hidden state $h _ { t }$ , the model first chooses whether to copy using a simple classifier $p ^ { \mathrm { c o p y } } ( h ) = \sigma ( w ^ { \mathrm { c o p y } } \cdot h ) .$ , where $w ^ { \mathrm { c o p y } }$ is a trainable vector of size $d$ . Then, the model interpolates between generating a word with softmax $p ^ { \mathrm { g e n } } ( h )$ and copying context word $c _ { i }$ using the question-to-context attention probability from the final layer $\dot { \alpha } _ { t } ^ { i }$ : $p ( q _ { t } \vert \mathbf { \bar { q } } _ { 0 : t - 1 } , c , a ) = p ^ { \mathrm { c o p y } } ( h _ { t } ) \sum _ { i } \alpha _ { t } ^ { i } \hat { \mathbb { 1 } } _ { c _ { i } = q _ { t } } + ( 1 - p ^ { \mathrm { c o p y } } ( h _ { t } ) ) p ^ { \mathrm { g e n } } \mathbf { \bar { ( } } q _ { t } | h _ { t } )$
121
+
122
+ # 2.6 FINE TUNING
123
+
124
+ Generative training using teacher forcing means that the model is not exposed to negative combinations of questions and answers at training time, so performance on these combinations may be weak when used for inference. For example, the model can overfit as a language model on questions, and ignore dependencies to the answer. Results can be improved by fine-tuning the model to make the question more likely under the gold answer than other plausible answers. Here, we minimize $- \log \frac { p ( q | a , c ) p ( a | \bar { c } ) } { \sum _ { a ^ { \prime } \in A } p ( q | a ^ { \prime } , c ) p ( a ^ { \prime } | c ) }$ , where $A$ is the most likely 100 answer candidates from $p ( a | c )$ . The model performs poorly when trained using only this loss function, suggesting that generative pretraining allows the model to establish complex dependencies between the input and output, which can then be calibrated discriminatively (Table 2).
125
+
126
+ # 2.7 INFERENCE
127
+
128
+ We return the answer $a ^ { * }$ maximizing $a ^ { * } = \mathrm { a r g m a x } _ { a } p ( q | a , c ) p ( a | c )$ , which requires evaluating the likelihood of the given question under each possible answer.
129
+
130
+ To efficiently handle the large number of possible answers in SQUAD, we use beam search. We evaluate $p ( a | c )$ for all possible answer spans up to length 30, take the top 250 candidates, and only evaluate $p ( q | a , c )$ for each of these. A correct answer is contained in the beam for over $9 8 . 5 \%$ o f validation questions, suggesting that approximate inference is not a major cause of errors.
131
+
132
+ Table 1: Exact Match (EM) and F1 on SQUAD, comparing to the best published single models at the time of submission (September 2018).
133
+
134
+ <table><tr><td rowspan="2">Single Model</td><td colspan="2">Development</td><td colspan="2">Test</td></tr><tr><td>EM</td><td>F1</td><td>EM</td><td>F1</td></tr><tr><td>RaSOR (Lee et al., 2016)</td><td>66.4</td><td>74.9</td><td>67.4</td><td>75.5</td></tr><tr><td>BiDAF (Seo et al., 2016)</td><td>67.7</td><td>77.3</td><td>68.0</td><td>77.3</td></tr><tr><td>DrQA (Chen et al., 2017)</td><td>69.5</td><td>78.8</td><td>70.7</td><td>79.3</td></tr><tr><td>R-Net (Wang et al., 2017)</td><td>71.1</td><td>79.5</td><td>72.3</td><td>80.7</td></tr><tr><td>Weaver (Raison et al., 2018)</td><td>74.1</td><td>82.4</td><td>74.4</td><td>82.8</td></tr><tr><td>DCN+ (Xiong et al., 2017)</td><td>74.5</td><td>83.1</td><td>75.1</td><td>83.1</td></tr><tr><td>QANet + data augmentation x3 (Yu et al., 2018)</td><td>75.1</td><td>83.8</td><td>76.2</td><td>84.6</td></tr><tr><td>BiDAF + Self Attention + ELMo (Peters et al., 2018)</td><td>=</td><td>85.6</td><td>78.6</td><td>85.8</td></tr><tr><td>Reinforced Mnemonic Reader (Hu et al., 2018)</td><td>78.9</td><td>86.3</td><td>79.5</td><td>86.6</td></tr><tr><td>GQA</td><td>76.8</td><td>83.7</td><td>77.1</td><td>83.9</td></tr></table>
135
+
136
+ Table 2: Development results on SQUAD for model ablations.
137
+
138
+ <table><tr><td>Single Model</td><td>Exact Match</td><td>F1</td></tr><tr><td>GQA</td><td>76.8</td><td>83.7</td></tr><tr><td>GQA (no fine-tuning)</td><td>72.3</td><td>80.1</td></tr><tr><td>GQA (no generative training)</td><td>64.5</td><td>72.2</td></tr><tr><td>GQA (no character-based softmax)</td><td>74.3</td><td>81.4</td></tr><tr><td>GQA (no pointer mechanism)</td><td>71.9</td><td>79.7</td></tr><tr><td>GQA (no answer-dependent context representation)</td><td>72.2</td><td>79.7</td></tr><tr><td>GQA (answer prior only)</td><td>13.4</td><td>16.1</td></tr></table>
139
+
140
+ # 3 EXPERIMENTS
141
+
142
+ # 3.1 LARGE-SCALE READING COMPREHENSION
143
+
144
+ We evaluate our model (GQA) on the SQUAD dataset to test its robustness to diverse syntactic and lexical inferences. Results are shown in Table 1, and are competitive with comparable discriminative models, despite several years of incremental progress on discriminative architectures for this task. These results show the potential of generative models for such tasks.
145
+
146
+ Higher results have been reported using techniques such as ensembles, data augmentation, reinforcement learning with the end-task metric a reward, and breakthroughs in unsupervised pre-training.
147
+
148
+ Table 2 shows several ablations. It demonstrates the importance of the character-based softmax and pointer mechanism for modelling rare words, the need to model interactions between the answer and context, and a large improvement from fine-tuning the model with negative question-answer pairs.
149
+
150
+ The ablations also highlight that while fine-tuning the model with a discriminative objective substantially improves the results, performance is weak when trained discriminatively from scratch. This result suggests that generative training is learning additional relationships, but can benefit from being calibrated and exposed to negative question-answer pairs during fine tuning.
151
+
152
+ Table 3 shows an ablation study for the number of answer candidates considered in the beam of possible answers at inference time. Considering a larger number of answer candidates improves results, but increases the computational cost as the likelihood of the question must be calculated for each candidate.
153
+
154
+ # 3.2 MULTIHOP REASONING
155
+
156
+ We evaluate the ability of our model to perform multihop reasoning on the CLEVR dataset, which consists of images paired with automatically generated questions involving that test visual reasoning.
157
+
158
+ Table 4 shows that GQA achieves an accuracy of $9 7 . 7 \%$ , compared to $7 6 . 6 \%$ for a standard visual QA model, demonstrating that our generative architecture can perform complex reasoning. Integrat
159
+
160
+ Table 3: Development results on SQUAD, varying the beam size during inference.
161
+
162
+ <table><tr><td>#Answer Candidates</td><td>Exact Match</td><td>F1</td></tr><tr><td>250</td><td>76.8</td><td>83.7</td></tr><tr><td>200</td><td>76.6</td><td>83.4</td></tr><tr><td>100</td><td>76.2</td><td>83.1</td></tr><tr><td>50</td><td>74.6</td><td>81.4</td></tr><tr><td>10</td><td>55.7</td><td>61.4</td></tr></table>
163
+
164
+ Table 4: Test results on CLEVR, demonstrating high accuracy at complex reasoning. GQA is the first approach to achieve high performance on both CLEVR and broad coverage QA tasks.
165
+
166
+ <table><tr><td>Single Model</td><td>Overall</td><td>Count</td><td>Exist</td><td>Compare Numbers</td><td>Query Attribute</td><td>Compare Attribute</td></tr><tr><td>Human</td><td>92.6</td><td>86.7</td><td>96.6</td><td>86.5</td><td>95.0</td><td>96.0</td></tr><tr><td>CNN+LSTM</td><td>52.3</td><td>43.7</td><td>65.2</td><td>67.1</td><td>49.3</td><td>53.0</td></tr><tr><td>CNN+LSTM+SA</td><td>76.6</td><td>64.4</td><td>82.7</td><td>77.4</td><td>82.6</td><td>75.4</td></tr><tr><td>CNN+LSTM+RN</td><td>95.5</td><td>90.1</td><td>97.8</td><td>93.6</td><td>97.9</td><td>97.1</td></tr><tr><td>CNN+GRU+FiLM</td><td>97.6</td><td>94.3</td><td>99.3</td><td>93.4</td><td>99.3</td><td>99.3</td></tr><tr><td>MAC</td><td>98.9</td><td>97.1</td><td>99.5</td><td>99.1</td><td>99.5</td><td>99.5</td></tr><tr><td>GQA</td><td>97.7</td><td>94.9</td><td>98.3</td><td>97.0</td><td>99.2</td><td>99.2</td></tr></table>
167
+
168
+ ing MAC cells (Hudson & Manning, 2018) into our decoder or FiLM layers (Perez et al., 2018) into our encoder would be straightforward, and may improve results, but we avoid these techniques to emphasise that generative decoding alone allows multihop reasoning.
169
+
170
+ Figure 4 shows an example of how the model decomposes the reasoning over the question. It initially pays attention to all shapes, but updates its attention mask after new words are read.
171
+
172
+ # 3.3 LEARNING FROM BIASED DATA
173
+
174
+ Many popular QA datasets are well known to contain biases that models can exploit. Examples include when questions paired with paragraphs that contain a single date. Models can exploit biases by learning simple heuristics such as selecting answers based on the expected answer type (Weissenborn et al., 2017; Rondeau & Hazen, 2018). Recent work has attempted to remove some biases (Goyal et al., 2017; Rajpurkar et al., 2018); we instead attempt to make training robust to bias.
175
+
176
+ We create deliberately biased training subsets of SQUAD based on named entity types: numbers, dates, and people. To construct each training set, we select questions whose answer is one of these types, but that type only appears once in the document (e.g. Figure 1b). The validation set is created from questions whose answers are the named entity type, but there must be multiple occurrences of that type in the document. Each training and validation set contains rougly 1000 questions.
177
+
178
+ We compare our model to two strong discriminative models, BiDAF (Seo et al., 2016) and QANet3 (Yu et al., 2018). We also report three question agnostic baselines: a random answer of the correct type, the first answer of the correct type, and the GQA answer prior distribtion.
179
+
180
+ Results are shown in Table 5, and show that discriminatively trained models perform similarly to question-agnostic baselines. In contrast, our generative model learns to generalise meaningfully even from highly biased data, because it is trained to explain the whole question, not simply to answer it—demonstrating that on some QA tasks, there are clear advantages to generative modelling.
181
+
182
+ # 3.4 ADVERSARIAL EVALUATION
183
+
184
+ We evaluate on an adversarial version of the SQUAD dataset (Jia & Liang, 2017), which was created by adding a distractor sentence to each paragraph that can almost answer the question.
185
+
186
+ Table 5: Exact Match (EM) and F1 on biased subsets of SQUAD. All answers in each subset have the indicated named-entity type; training documents have only one answer with this type, but for testing there are multiple plausible answers. Discriminative models perform comparably to questionagnostic baselines, whereas our generative model learns to generalise.
187
+
188
+ <table><tr><td rowspan="2">Single Model</td><td colspan="2">Numbers</td><td colspan="2">Dates</td><td colspan="2">People</td></tr><tr><td>EM</td><td>F1</td><td>EM</td><td>F1</td><td>EM</td><td>F1</td></tr><tr><td>Random Selection First Occurrence</td><td>19.37 29.36</td><td>26.18 35.11</td><td>19.37 34.64</td><td>26.18</td><td>19.37</td><td>26.18</td></tr><tr><td>BiDAF</td><td>33.02</td><td>42.14</td><td>35.41</td><td>42.08 43.83</td><td>26.38 30.05</td><td>32.26 37.28</td></tr><tr><td>QANet</td><td>31.99</td><td>40.58</td><td>39.98</td><td>47.82</td><td>30.26</td><td>38.56</td></tr><tr><td>GQA (answer prior only)</td><td>37.15</td><td>45.54</td><td>35.55</td><td>43.85</td><td>32.56</td><td>38.79</td></tr><tr><td>GQA</td><td>58.49</td><td>67.56</td><td>64.71</td><td>72.51</td><td>53.09</td><td>61.93</td></tr></table>
189
+
190
+ Table 6: F1 scores on ADVERSARIALSQUAD (from September 2018), which demonstrate that our generative QA model is substantially more robust to this adversary than previous work, likely because the additional adversarial context sentence cannot explain all the question words.
191
+
192
+ <table><tr><td>Single Model</td><td>ADDSENT</td><td>ADDONESENT</td></tr><tr><td>BiDAF (Seo et al.,2016)</td><td>34.3</td><td>45.7</td></tr><tr><td>RaSOR (Lee et al., 2016)</td><td>39.5</td><td>49.5</td></tr><tr><td>MPCM (Wang et al., 2016)</td><td>40.3</td><td>50.0</td></tr><tr><td>ReasoNet (Shen etal., 2017)</td><td>39.4</td><td>50.3</td></tr><tr><td>Reinforced Mnemonic Reader (Hu et al., 2018)</td><td>46.6</td><td>56.0</td></tr><tr><td>QANet (Yu et al., 2018)</td><td>45.2</td><td>55.7</td></tr><tr><td>GQA</td><td>47.3</td><td>57.8</td></tr></table>
193
+
194
+ Table 6 shows that GQA outperforms the best previous work by up to $2 . 1 \ \mathrm { F 1 }$ , making it the most robust model to these adversarial attacks. The improvement may be due to the model’s attempt to explain all question words, some of which may be unlikely under the distractor (Figure 2).
195
+
196
+ # 3.5 LONG CONTEXT QUESTION ANSWERING
197
+
198
+ Finally, we extend our generative model to answering questions in a more challenging, multiparagraph setting. While we train on single paragraphs, our model can be used to answer questions with multi-paragraph context. During training, our model $p ( q \mid a , c )$ depends only on the content of the paragraph $c$ containing the correct answer $a$ . In contrast, discriminative models need to be trained to discriminate against all negative answers from all paragraphs.
199
+
200
+ We use the multi-paragraph SQUAD dataset of Raison et al. (2018), where each question is paired with the entire corresponding Wikipedia article. For each question, we calculate $p ( q \mid a ) s ( a , c )$ for the proposed answer span $a$ produced by the model, where $s ( a , c )$ is the logits from the answer prior classifier. The maximum value across all paragraphs of that article is selected as the answer for that question. Table 7 shows that GQA outperforms previous work on this task by $2 . 5 \ : \mathrm { F 1 }$ . Further, discriminative models such as DrQA and Weaver require training in the multi-paragraph setting to perform well, which is expensive and may not scale to longer contexts. However, our generative approach performs well in the multi-paragraph test setting but only requires single paragraph training.
201
+
202
+ # 4 RELATED WORK
203
+
204
+ Our model is inspired by the classic noisy channel translation models of Brown et al. (1993), more recently explored by Yu et al. (2016), which were motivated by the ease of incorporating a prior over outputs. Generative models have been widely used in other language classification tasks, such as sequence tagging (Brants, 2000) and parsing (Collins, 1997; Dyer et al., 2016). Generative classification models became less popular because of the difficulty of modelling the input (Sutton & McCallum, 2012), a challenge we embrace as an additional learning signal. Recent work has shown the effectiveness of generative pre-training on unlabelled data (Peters et al., 2018; Radford et al., 2018), we show additional gains from training generatively on labelled data.
205
+
206
+ Table 7: F1 scores on full document evaluation for SQUAD, which show our generative QA model is capable of selecting the correct paragraph for question answering even when presented with other similar paragraphs. Baselines are from (Raison et al., 2018).
207
+
208
+ <table><tr><td>Single Model EM F1</td></tr><tr><td>DrQA* trained on paragraph 59.1 67.0 Weaver trained on paragraph 60.6 69.7</td></tr><tr><td>DrQA* trained on documents 64.7 73.2</td></tr><tr><td>Weaver trained on documents 67.0 75.9 GQA trained on paragraph 71.4 78.4</td></tr></table>
209
+
210
+ Several studies have explored the relationship between question answering and question generation. Duan et al. (2017) and Tang et al. (2017) train answering and generation models with separate parameters, but add a regularisation term that encourages the models to be consistent. They focus on answer sentence selection, so performance cannot easily be compared with our work. Tang et al. (2018) use question generation to provide an additional loss to improve question answering systems using GAN-like training. Li et al. (2017) apply similar techniques to visual QA. Our work differs in training a single model for the joint distribution of questions and answers, which can be used to calculate conditional distributions for question generation or answering. Sachan & Xing (2018) improve performance by generating new question-answer pairs for training from unlabelled text, which would be a possible extension to our work. Echihabi & Marcu (2003) describe an earlier method for answering questions in terms of the distribution of questions given answers—one conceptual difference is that their approach does not include a prior over answers.
211
+
212
+ Question generation has also been studied as a task in its own right. Heilman & Smith (2010) use a rule-based system to generate candidate questions, followed by statistical ranking. Du et al. (2017) use a sequence-to-sequence model that encodes paragraph and sentence level information to generate questions. Cardie & Du (2018) propose using a coreference mechanism to incorporate contextual information from multiple sentences. Liu et al. (2017) explore question generation from images, which they refer to as Inverse Visual QA. Yuan et al. (2017) fine-tune a question generation model using reinforcement learning, based on fluency and whether it can be answered. Although we train a question generation model, our focus is on using it to answer questions.
213
+
214
+ # 5 CONCLUSION
215
+
216
+ We introduced a generative model for question answering, which leverages the greater amount of information in questions than answers to achieve high performance in both language comprehension and reasoning. The approach demonstrates better robustness to biased training data and adversarial testing data than state-of-the-art discriminative models. There are numerous interesting directions for future work, such as combining information about an entity from multiple sources to generate questions. Given the rapid progress made on discriminative QA models in recent years, we believe there is significant potential for further improvements in generative question answering.
217
+
218
+ # REFERENCES
219
+
220
+ Aishwarya Agrawal, Jiasen Lu, Stanislaw Antol, Margaret Mitchell, C. Lawrence Zitnick, Devi Parikh, and Dhruv Batra. Vqa: Visual question answering. Int. J. Comput. Vision, 123(1):4–31, May 2017. ISSN 0920-5691. URL https://doi.org/10.1007/ s11263-016-0966-6.
221
+
222
+ Thorsten Brants. TnT: a statistical part-of-speech tagger. In Proceedings of the sixth conference on Applied natural language processing, pp. 224–231. Association for Computational Linguistics, 2000.
223
+
224
+ Peter F. Brown, Stephen Della Pietra, Vincent J. Della Pietra, and Robert L. Mercer. The mathematics of statistical machine translation: Parameter estimation. Computational Linguistics, 19(2): 263–311, 1993.
225
+
226
+ Claire Cardie and Xinya Du. Harvesting paragraph-level question-answer pairs from wikipedia. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, ACL 2018, Melbourne, Australia, July 15-20, 2018, Volume 1: Long Papers, pp. 1907–1917, 2018. URL https://aclanthology.info/papers/P18-1177/p18-1177.
227
+
228
+ Ciprian Chelba, Tomas Mikolov, Mike Schuster, Qi Ge, Thorsten Brants, Phillipp Koehn, and Tony Robinson. One billion word benchmark for measuring progress in statistical language modeling. In INTERSPEECH 2014, 15th Annual Conference of the International Speech Communication Association, Singapore, September 14-18, 2014, pp. 2635–2639, 2014. URL http://www. isca-speech.org/archive/interspeech_2014/i14_2635.html.
229
+
230
+ Danqi Chen, Adam Fisch, Jason Weston, and Antoine Bordes. Reading wikipedia to answer opendomain questions. arXiv preprint arXiv:1704.00051, 2017.
231
+
232
+ Michael Collins. Three generative, lexicalised models for statistical parsing. In 35th Annual Meeting of the Association for Computational Linguistics and 8th Conference of the European Chapter of the Association for Computational Linguistics, Proceedings of the Conference, 7-12 July 1997, Universidad Nacional de Educacion a Distancia (UNED), Madrid, Spain. ´ , pp. 16–23, 1997. URL http://aclweb.org/anthology/P/P97/P97-1003.pdf.
233
+
234
+ Yann N. Dauphin, Angela Fan, Michael Auli, and David Grangier. Language modeling with gated convolutional networks. In Proceedings of the 34th International Conference on Machine Learning, ICML 2017, Sydney, NSW, Australia, 6-11 August 2017, pp. 933–941, 2017. URL http://proceedings.mlr.press/v70/dauphin17a.html.
235
+
236
+ Xinya Du, Junru Shao, and Claire Cardie. Learning to ask: Neural question generation for reading comprehension. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, ACL 2017, Vancouver, Canada, July 30 - August 4, Volume 1: Long Papers, pp. 1342–1352, 2017. URL https://doi.org/10.18653/v1/P17-1123.
237
+
238
+ Nan Duan, Duyu Tang, Peng Chen, and Ming Zhou. Question generation for question answering. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, EMNLP 2017, Copenhagen, Denmark, September 9-11, 2017, pp. 866–874, 2017. URL https: //aclanthology.info/papers/D17-1090/d17-1090.
239
+
240
+ Chris Dyer, Adhiguna Kuncoro, Miguel Ballesteros, and Noah A. Smith. Recurrent neural network grammars. In NAACL HLT 2016, The 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, San Diego California, USA, June 12-17, 2016, pp. 199–209, 2016. URL http://aclweb.org/anthology/N/ N16/N16-1024.pdf.
241
+
242
+ Abdessamad Echihabi and Daniel Marcu. A noisy-channel approach to question answering. In Proceedings of the 41st Annual Meeting of the Association for Computational Linguistics, 7- 12 July 2003, Sapporo Convention Center, Sapporo, Japan., pp. 16–23, 2003. URL http: //aclweb.org/anthology/P/P03/P03-1003.pdf.
243
+
244
+ Yarin Gal and Zoubin Ghahramani. A theoretically grounded application of dropout in recurrent neural networks. In Advances in Neural Information Processing Systems 29: Annual Conference on Neural Information Processing Systems 2016, December 5-10, 2016, Barcelona, Spain, pp. 1019–1027, 2016.
245
+
246
+ Yash Goyal, Tejas Khot, Douglas Summers-Stay, Dhruv Batra, and Devi Parikh. Making the V in VQA matter: Elevating the role of image understanding in visual question answering. In 2017 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017, Honolulu, HI, USA, July 21-26, 2017, pp. 6325–6334, 2017. URL https://doi.org/10.1109/CVPR.2017. 670.
247
+
248
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In 2016 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2016, Las Vegas, NV, USA, June 27-30, 2016, pp. 770–778, 2016. URL https://doi.org/10.1109/ CVPR.2016.90.
249
+
250
+ Luheng He, Kenton Lee, Omer Levy, and Luke Zettlemoyer. Jointly predicting predicates and arguments in neural semantic role labeling. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, ACL 2018, Melbourne, Australia, July 15-20, 2018, Volume 2: Short Papers, pp. 364–369, 2018. URL https://aclanthology.info/papers/ P18-2058/p18-2058.
251
+
252
+ Michael Heilman and Noah A. Smith. Good question! statistical ranking for question generation. In Human Language Technologies: The 2010 Annual Conference of the North American Chapter of the Association for Computational Linguistics, HLT ’10, pp. 609–617. Association for Computational Linguistics, 2010. ISBN 1-932432-65-5. URL http://dl.acm.org/citation. cfm?id=1857999.1858085.
253
+
254
+ Minghao Hu, Yuxing Peng, Zhen Huang, Xipeng Qiu, Furu Wei, and Ming Zhou. Reinforced mnemonic reader for machine reading comprehension. In Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence, IJCAI 2018, July 13-19, 2018, Stockholm, Sweden., pp. 4099–4106, 2018. URL https://doi.org/10.24963/ijcai.2018/570.
255
+
256
+ Drew A. Hudson and Christopher D. Manning. Compositional attention networks for machine reasoning. CoRR, abs/1803.03067, 2018. URL http://arxiv.org/abs/1803.03067.
257
+
258
+ Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Proceedings of the 32nd International Conference on Machine Learning, ICML 2015, Lille, France, 6-11 July 2015, pp. 448–456, 2015. URL http://jmlr. org/proceedings/papers/v37/ioffe15.html.
259
+
260
+ Robin Jia and Percy Liang. Adversarial examples for evaluating reading comprehension systems. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, EMNLP 2017, Copenhagen, Denmark, September 9-11, 2017, pp. 2021–2031, 2017. URL https://aclanthology.info/papers/D17-1215/d17-1215.
261
+
262
+ Justin Johnson, Bharath Hariharan, Laurens van der Maaten, Li Fei-Fei, C. Lawrence Zitnick, and Ross B. Girshick. CLEVR: A diagnostic dataset for compositional language and elementary visual reasoning. In 2017 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017, Honolulu, HI, USA, July 21-26, 2017, pp. 1988–1997, 2017. URL https://doi.org/ 10.1109/CVPR.2017.215.
263
+
264
+ Mandar Joshi, Eunsol Choi, Daniel S. Weld, and Luke Zettlemoyer. Triviaqa: A large scale distantly supervised challenge dataset for reading comprehension. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, ACL 2017, Vancouver, Canada, July 30 - August 4, Volume 1: Long Papers, pp. 1601–1611, 2017. URL https://doi.org/10. 18653/v1/P17-1147.
265
+
266
+ Yoon Kim, Yacine Jernite, David Sontag, and Alexander M. Rush. Character-aware neural language models. In Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence, February 12-17, 2016, Phoenix, Arizona, USA., pp. 2741–2749, 2016. URL http://www.aaai.org/ ocs/index.php/AAAI/AAAI16/paper/view/12489.
267
+
268
+ Kenton Lee, Tom Kwiatkowski, Ankur P. Parikh, and Dipanjan Das. Learning recurrent span representations for extractive question answering. CoRR, abs/1611.01436, 2016. URL http: //arxiv.org/abs/1611.01436.
269
+
270
+ Yikang Li, Nan Duan, Bolei Zhou, Xiao Chu, Wanli Ouyang, and Xiaogang Wang. Visual question generation as dual task of visual question answering. CoRR, abs/1709.07192, 2017. URL http: //arxiv.org/abs/1709.07192.
271
+
272
+ Feng Liu, Tao Xiang, Timothy M. Hospedales, Wankou Yang, and Changyin Sun. ivqa: Inverse visual question answering. CoRR, abs/1710.03370, 2017. URL http://arxiv.org/abs/ 1710.03370.
273
+
274
+ Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models. CoRR, abs/1609.07843, 2016. URL http://arxiv.org/abs/1609.07843.
275
+
276
+ 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), June 21- 24, 2010, Haifa, Israel, pp. 807–814, 2010. URL http://www.icml2010.org/papers/ 432.pdf.
277
+
278
+ Ethan Perez, Florian Strub, Harm de Vries, Vincent Dumoulin, and Aaron C. Courville. Film: Visual reasoning with a general conditioning layer. In Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence, New Orleans, Louisiana, USA, February 2-7, 2018, 2018. URL https://www.aaai.org/ocs/index.php/AAAI/AAAI18/paper/view/16528.
279
+
280
+ Matthew E. Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. Deep contextualized word representations. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2018, New Orleans, Louisiana, USA, June 1-6, 2018, Volume 1 (Long Papers), pp. 2227–2237, 2018. URL https://aclanthology.info/ papers/N18-1202/n18-1202.
281
+
282
+ Alec Radford, Karthik Narasimhan, Tim Salimans, and Ilya Sutskever. Improving language understanding by generative pre-training. 2018. URL http://openai-assets.s3. amazonaws.com/research-covers/language-unsupervised/language_ understanding_paper.pdf.
283
+
284
+ Martin Raison, Pierre-Emmanuel Mazare, Rajarshi Das, and Antoine Bordes. Weaver: Deep co- ´ encoding of questions and documents for machine reading. arXiv preprint arXiv:1804.10490, 2018.
285
+
286
+ Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. Squad: 100, $0 0 0 +$ questions for machine comprehension of text. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, EMNLP 2016, Austin, Texas, USA, November 1-4, 2016, pp. 2383–2392, 2016. URL http://aclweb.org/anthology/D/D16/D16-1264.pdf.
287
+
288
+ Pranav Rajpurkar, Robin Jia, and Percy Liang. Know what you don’t know: Unanswerable questions for squad. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, ACL 2018, Melbourne, Australia, July 15-20, 2018, Volume 2: Short Papers, pp. 784– 789, 2018. URL https://aclanthology.info/papers/P18-2124/p18-2124.
289
+
290
+ Marc-Antoine Rondeau and Timothy J. Hazen. Systematic error analysis of the stanford question answering dataset. In Proceedings of the Workshop on Machine Reading for Question Answering@ACL 2018, Melbourne, Australia, July 19, 2018, pp. 12–20, 2018. URL https: //aclanthology.info/papers/W18-2602/w18-2602.
291
+
292
+ Mrinmaya Sachan and Eric P. Xing. Self-training for jointly learning to ask and answer questions. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2018, New Orleans, Louisiana, USA, June 1-6, 2018, Volume 1 (Long Papers), pp. 629–640, 2018. URL https: //aclanthology.info/papers/N18-1058/n18-1058.
293
+
294
+ Min Joon Seo, Aniruddha Kembhavi, Ali Farhadi, and Hannaneh Hajishirzi. Bidirectional attention flow for machine comprehension. CoRR, abs/1611.01603, 2016. URL http://arxiv.org/ abs/1611.01603.
295
+
296
+ Yelong Shen, Po-Sen Huang, Jianfeng Gao, and Weizhu Chen. Reasonet: Learning to stop reading in machine comprehension. In Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Halifax, NS, Canada, August 13 - 17, 2017, pp. 1047–1055, 2017. URL http://doi.acm.org/10.1145/3097983.3098177.
297
+
298
+ Sainbayar Sukhbaatar, Arthur Szlam, Jason Weston, and Rob Fergus. End-to-end memory networks. In Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada, pp. 2440–2448, 2015. URL http://papers.nips.cc/paper/ 5846-end-to-end-memory-networks.
299
+
300
+ Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. Sequence to sequence learning with neural networks. In Advances in Neural Information Processing Systems 27: Annual Conference on Neural Information Processing Systems 2014, December 8-13 2014, Montreal, Quebec, Canada, pp. 3104–3112, 2014. URL http://papers.nips.cc/paper/ 5346-sequence-to-sequence-learning-with-neural-networks.
301
+
302
+ Charles A. Sutton and Andrew McCallum. An introduction to conditional random fields. Foundations and Trends in Machine Learning, 4(4):267–373, 2012. URL https://doi.org/10. 1561/2200000013.
303
+
304
+ Duyu Tang, Nan Duan, Tao Qin, and Ming Zhou. Question answering and question generation as dual tasks. CoRR, abs/1706.02027, 2017. URL http://arxiv.org/abs/1706.02027.
305
+
306
+ Duyu Tang, Nan Duan, Zhao Yan, Zhirui Zhang, Yibo Sun, Shujie Liu, Yuanhua Lv, and Ming Zhou. Learning to collaborate for question answering and asking. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2018, New Orleans, Louisiana, USA, June 1-6, 2018, Volume 1 (Long Papers), pp. 1564–1574, 2018. URL https://aclanthology.info/papers/ N18-1141/n18-1141.
307
+
308
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, 4-9 December 2017, Long Beach, CA, USA, pp. 6000–6010, 2017. URL http: //papers.nips.cc/paper/7181-attention-is-all-you-need.
309
+
310
+ Oriol Vinyals, Meire Fortunato, and Navdeep Jaitly. Pointer networks. In Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada, pp. 2692–2700, 2015. URL http://papers.nips.cc/paper/5866-pointer-networks.
311
+
312
+ Wenhui Wang, Nan Yang, Furu Wei, Baobao Chang, and Ming Zhou. Gated self-matching networks for reading comprehension and question answering. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, ACL 2017, Vancouver, Canada, July 30 - August 4, Volume 1: Long Papers, pp. 189–198, 2017. URL https://doi.org/10.18653/v1/ P17-1018.
313
+
314
+ Zhiguo Wang, Haitao Mi, Wael Hamza, and Radu Florian. Multi-perspective context matching for machine comprehension. CoRR, abs/1612.04211, 2016. URL http://arxiv.org/abs/ 1612.04211.
315
+
316
+ Dirk Weissenborn, Georg Wiese, and Laura Seiffe. Making neural QA as simple as possible but not simpler. In Proceedings of the 21st Conference on Computational Natural Language Learning (CoNLL 2017), Vancouver, Canada, August 3-4, 2017, pp. 271–280, 2017. URL https:// doi.org/10.18653/v1/K17-1028.
317
+
318
+ Caiming Xiong, Victor Zhong, and Richard Socher. $\mathrm { D C N + }$ : mixed objective and deep residual coattention for question answering. CoRR, abs/1711.00106, 2017. URL http://arxiv. org/abs/1711.00106.
319
+
320
+ Adams Wei Yu, David Dohan, Minh-Thang Luong, Rui Zhao, Kai Chen, Mohammad Norouzi, and Quoc V. Le. Qanet: Combining local convolution with global self-attention for reading comprehension. CoRR, abs/1804.09541, 2018. URL http://arxiv.org/abs/1804.09541.
321
+
322
+ Lei Yu, Phil Blunsom, Chris Dyer, Edward Grefenstette, and Tomas Kocisk ´ y. The neural noisy ´ channel. CoRR, abs/1611.02554, 2016. URL http://arxiv.org/abs/1611.02554.
323
+
324
+ Xingdi Yuan, Tong Wang, C¸ aglar Gulc¸ehre, Alessandro Sordoni, Philip Bachman, Saizheng Zhang, ¨ Sandeep Subramanian, and Adam Trischler. Machine comprehension by text-to-text neural question generation. In Proceedings of the 2nd Workshop on Representation Learning for NLP, Rep4NLP@ACL 2017, Vancouver, Canada, August 3, 2017, pp. 15–25, 2017. URL https: //aclanthology.info/papers/W17-2603/w17-2603.
325
+
326
+ Bolei Zhou, Yuandong Tian, Sainbayar Sukhbaatar, Arthur Szlam, and Rob Fergus. Simple baseline for visual question answering. CoRR, abs/1512.02167, 2015. URL http://arxiv.org/ abs/1512.02167.
327
+
328
+ # A TRAINING DETAILS
329
+
330
+ # A.1 SQUAD MODEL
331
+
332
+ Pre-processing Questions and answers were tokenized with a simple rule-based tokenizer. We ignored training examples whose answers did not correspond to words in our tokenization. We also found it helpful to append the article title as an additional sentence at the end of paragraphs, as frequently question words make use of an entity mentioned in the title that is not in the paragraph. Finally, we replace question words with similar words from the context (based on sharing word stems or low edit distance), which makes it easier for the model to explain rare words and typographical errors in questions by using the pointer mechanism.
333
+
334
+ Architecture The encoder contains 2 answer-independent LSTM layers and 3 answer-dependent LSTM layers, all of hidden size 128. The decoder contains 9 blocks, all with hidden size $d = 2 5 6$ . We apply dropout $( p = 0 . 5 5 )$ to contextualised word representations, after encoder LSTM layers and after each decoder block (before residual connects). We also used word level dropout after contextualised embeddings for each encoder $( p = 0 . 1 )$ ) and decoder word $( p = 0 . 2 5 )$ ), and disallow use of the pointer mechanism with $p = 0 . 2 5$ . All dropout masks are fixed across time-steps (Gal & Ghahramani, 2016).
335
+
336
+ Optimisation We train generatively with batches of 10 documents, using a cosine learning rate schedule with a period of 1 epoch, warming up over the first 5 epochs to a maximum learning rate of $1 0 ^ { - 4 }$ . During fine-tuning, we freeze the answer-independent context encoding and $p ( a | c )$ model, which both reduces memory requirements and makes learning more stable. If the correct answer is not in the beam, we make no update. Fine tuning uses stochastic gradient descent with single question batches, learning rate $5 * \bar { 1 } 0 ^ { - 5 }$ , and momentum 0.97.
337
+
338
+ # A.2 CLEVR MODEL
339
+
340
+ Architecture All hidden layers in the encoder have size 128. We use 3 blocks of convolution, batch normalisation, and ReLU activations. The first block uses a 1x1 convolution to project the pre-trained features to size 128, and the other blocks use 3x3 convolutions. We apply dropout with rate 0.1 to the pre-trained image features. In the decoder we use a dimension $d = 2 5 6$ with 6 decoder blocks, with dropout $\cdot p = 0 . 2 5 ,$ ) before residual connections.
341
+
342
+ Optimisation We optimise with stochastic gradient descent with momentum 0.9, with an initial learning rate of 0.025 which is decayed by a factor of 5 when there is no improvement for 10 epochs. For generative training we use batch size 1024. For fine tuning, we use initial learning rate 0.001 and batch size 32.
parse/train/Bkx0RjA9tX/Bkx0RjA9tX_content_list.json ADDED
@@ -0,0 +1,1872 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "GENERATIVE QUESTION ANSWERING: LEARNING TO ANSWER THE WHOLE QUESTION ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 823,
10
+ 147
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Mike Lewis & Angela Fan Facebook AI Research {mikelewis,angelafan}@fb.com ",
17
+ "bbox": [
18
+ 183,
19
+ 172,
20
+ 457,
21
+ 215
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 252,
32
+ 544,
33
+ 267
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Discriminative question answering models can overfit to superficial biases in datasets, because their loss function saturates when any clue makes the answer likely. We introduce generative models of the joint distribution of questions and answers, which are trained to explain the whole question, not just to answer it. Our question answering (QA) model is implemented by learning a prior over answers, and a conditional language model to generate the question given the answer— allowing scalable and interpretable many-hop reasoning as the question is generated word-by-word. Our model achieves competitive performance with comparable discriminative models on the SQUAD and CLEVR benchmarks, indicating that it is a more general architecture for language understanding and reasoning than previous work. The model greatly improves generalisation both from biased training data and to adversarial testing data, achieving state-of-the-art results on ADVERSARIALSQUAD. ",
40
+ "bbox": [
41
+ 233,
42
+ 287,
43
+ 764,
44
+ 468
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 505,
55
+ 336,
56
+ 520
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Question answering tasks are widely used for training and testing machine comprehension and reasoning (Rajpurkar et al., 2016; Joshi et al., 2017). However, high performance has been achieved with only superficial understanding, as models exploit simple correlations in the data (Weissenborn et al., 2017; Zhou et al., 2015). For example, in Visual QA (Agrawal et al., 2017), the answer to What colour is the grass? can be memorised as green without considering the image (Figure 1). ",
63
+ "bbox": [
64
+ 174,
65
+ 540,
66
+ 823,
67
+ 609
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "We argue that this over-fitting to biases is partly caused by discriminative loss functions, which saturate when simple correlations allow the question to be answered confidently, leaving no incentive for further learning on the example. ",
74
+ "bbox": [
75
+ 176,
76
+ 616,
77
+ 821,
78
+ 657
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "We propose generative QA models, using Bayes’ rule to reparameterise the distribution of answers given questions in terms of the distribution of questions given answers. We learn a prior over answers and a conditional language model for generating the question—reducing question answering to sequence-to-sequence learning (Sutskever et al., 2014), and allowing many-hop reasoning as the model explains the whole question word-by-word. ",
85
+ "bbox": [
86
+ 174,
87
+ 665,
88
+ 823,
89
+ 734
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Generative loss functions train the model to explain all question words, even if the answer is obvious. For example, a model cannot assign high probability to generating the question What colour is the grass? without learning a dependency between the image and the word grass. We show that this method allows much improved generalisation from biased training data and to adversarial test data, compared to state-of-the-art discriminative models. ",
96
+ "bbox": [
97
+ 174,
98
+ 742,
99
+ 825,
100
+ 811
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Word-by-word generative modelling of questions also supports chains of reasoning, as each subpart of the question is explained in turn. Existing methods use a pre-specified number of reasoning steps (Sukhbaatar et al., 2015; Hudson & Manning, 2018), which may be too many steps on easy cases, and too few on long and complex questions. We instead perform an interpretable reasoning step for each question word, and achieve $9 7 . 7 \\%$ accuracy on the CLEVR benchmark (Johnson et al., 2017). ",
107
+ "bbox": [
108
+ 174,
109
+ 819,
110
+ 825,
111
+ 888
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "Our approach opens a promising new direction for question answering, with strong results in language understanding, reasoning and generalisation. ",
118
+ "bbox": [
119
+ 174,
120
+ 895,
121
+ 823,
122
+ 924
123
+ ],
124
+ "page_idx": 0
125
+ },
126
+ {
127
+ "type": "image",
128
+ "img_path": "images/4ea3ae44df91abbf802dd70ffd949fe57baa29e2dc6df16e8c5ad6e7813f40b1.jpg",
129
+ "image_caption": [],
130
+ "image_footnote": [],
131
+ "bbox": [
132
+ 214,
133
+ 103,
134
+ 447,
135
+ 223
136
+ ],
137
+ "page_idx": 1
138
+ },
139
+ {
140
+ "type": "text",
141
+ "text": "Does the green rubber object have the same shape as the gray thing that is on the right side of the big purple object? ",
142
+ "bbox": [
143
+ 174,
144
+ 261,
145
+ 486,
146
+ 303
147
+ ],
148
+ "page_idx": 1
149
+ },
150
+ {
151
+ "type": "text",
152
+ "text": "Is the purple thing the same shape as the large gray rubber thing? ",
153
+ "bbox": [
154
+ 173,
155
+ 233,
156
+ 486,
157
+ 260
158
+ ],
159
+ "page_idx": 1
160
+ },
161
+ {
162
+ "type": "text",
163
+ "text": "(a) Two CLEVR questions. Both can be answered no using only subsets of the available information. A generative model must learn to perform additional reasoning to assign high likelihood to the complete question-answer pair. Word-by-word question generation allows a reasoning step to explain each word. ",
164
+ "bbox": [
165
+ 174,
166
+ 308,
167
+ 486,
168
+ 383
169
+ ],
170
+ "page_idx": 1
171
+ },
172
+ {
173
+ "type": "text",
174
+ "text": "Whilst filming in Mexico City, speculation in the media claimed that the script had been altered to accommodate the demands of Mexican authorities reportedly influencing details of the scene and characters, casting choices, and modifying the script in order to portray the country in a “positive light” in order to secure tax concessions and financial support worth up to $\\$ 20$ million for the film. This was denied by producer Michael G. Wilson. ",
175
+ "bbox": [
176
+ 517,
177
+ 104,
178
+ 834,
179
+ 243
180
+ ],
181
+ "page_idx": 1
182
+ },
183
+ {
184
+ "type": "text",
185
+ "text": "Which Bond producer would not confirm that the film had been changed to accommodate Mexican authorities? ",
186
+ "bbox": [
187
+ 509,
188
+ 251,
189
+ 825,
190
+ 292
191
+ ],
192
+ "page_idx": 1
193
+ },
194
+ {
195
+ "type": "text",
196
+ "text": "(b) A SQUAD question. A discriminative model can identify the only producer, and ignore the rest of the question. To generate the question and answer, our model needs coreference, negation and paraphrasing. These reasoning skills can improve generalisation on test examples with multiple plausible answers. ",
197
+ "bbox": [
198
+ 511,
199
+ 309,
200
+ 825,
201
+ 385
202
+ ],
203
+ "page_idx": 1
204
+ },
205
+ {
206
+ "type": "text",
207
+ "text": "Figure 1: Examples of questions that can be answered using only some question words (underlined). ",
208
+ "bbox": [
209
+ 173,
210
+ 397,
211
+ 821,
212
+ 411
213
+ ],
214
+ "page_idx": 1
215
+ },
216
+ {
217
+ "type": "text",
218
+ "text": "2 MODEL ",
219
+ "text_level": 1,
220
+ "bbox": [
221
+ 176,
222
+ 435,
223
+ 267,
224
+ 452
225
+ ],
226
+ "page_idx": 1
227
+ },
228
+ {
229
+ "type": "text",
230
+ "text": "2.1 OVERVIEW ",
231
+ "text_level": 1,
232
+ "bbox": [
233
+ 174,
234
+ 465,
235
+ 290,
236
+ 481
237
+ ],
238
+ "page_idx": 1
239
+ },
240
+ {
241
+ "type": "text",
242
+ "text": "We assume a dataset of examples with a question $q = q _ { 0 . . T }$ , answer $a$ , and context $c$ (in our experiments, $c$ is a document or image, but alternatives such as knowledge graphs could be used). ",
243
+ "bbox": [
244
+ 173,
245
+ 492,
246
+ 821,
247
+ 521
248
+ ],
249
+ "page_idx": 1
250
+ },
251
+ {
252
+ "type": "text",
253
+ "text": "We train models to minimize the negative log likelihood of the joint distribution of questions and answers given the context, $- \\log p ( q , a | c )$ , which we decompose using the chain rule as: ",
254
+ "bbox": [
255
+ 173,
256
+ 527,
257
+ 821,
258
+ 556
259
+ ],
260
+ "page_idx": 1
261
+ },
262
+ {
263
+ "type": "equation",
264
+ "img_path": "images/6d1ef33dec521c7a938e6febd181770e9f42293b7957ce765effe0ec05f3b656.jpg",
265
+ "text": "$$\n\\mathcal { L } = - \\log p ( a | c ) - \\sum _ { t } \\log p ( q _ { t } | a , c , q _ { 0 . . t - 1 } )\n$$",
266
+ "text_format": "latex",
267
+ "bbox": [
268
+ 348,
269
+ 560,
270
+ 648,
271
+ 593
272
+ ],
273
+ "page_idx": 1
274
+ },
275
+ {
276
+ "type": "text",
277
+ "text": "First $c$ is encoded, using a recurrent model for text $( \\ S 2 . 2 )$ and a using a convolutional model for images (§2.3). ",
278
+ "bbox": [
279
+ 171,
280
+ 604,
281
+ 825,
282
+ 633
283
+ ],
284
+ "page_idx": 1
285
+ },
286
+ {
287
+ "type": "text",
288
+ "text": "Then, a prior over answers $p ( a | c )$ is evaluated by scoring all possible answers (2.4). ",
289
+ "bbox": [
290
+ 179,
291
+ 640,
292
+ 727,
293
+ 655
294
+ ],
295
+ "page_idx": 1
296
+ },
297
+ {
298
+ "type": "text",
299
+ "text": "The likelihood of the question $p ( q | a , c )$ is modelled using a conditional language model (§2.5). ",
300
+ "bbox": [
301
+ 173,
302
+ 661,
303
+ 794,
304
+ 678
305
+ ],
306
+ "page_idx": 1
307
+ },
308
+ {
309
+ "type": "text",
310
+ "text": "At test time, the answer maximizing $p ( q , a | c )$ is returned1 (§2.7). ",
311
+ "bbox": [
312
+ 173,
313
+ 683,
314
+ 601,
315
+ 699
316
+ ],
317
+ "page_idx": 1
318
+ },
319
+ {
320
+ "type": "text",
321
+ "text": "Hyperparameters and training details are fully described in Appendix A. ",
322
+ "bbox": [
323
+ 176,
324
+ 704,
325
+ 647,
326
+ 719
327
+ ],
328
+ "page_idx": 1
329
+ },
330
+ {
331
+ "type": "text",
332
+ "text": "2.2 DOCUMENT ENCODER ",
333
+ "text_level": 1,
334
+ "bbox": [
335
+ 176,
336
+ 734,
337
+ 370,
338
+ 750
339
+ ],
340
+ "page_idx": 1
341
+ },
342
+ {
343
+ "type": "text",
344
+ "text": "Answer-independent Context Representation We use contextualised word representations, similar to ELMo (Peters et al., 2018). We use character-based word embeddings (Kim et al., 2016) and train a 2-layer LSTM language model in the forward and reverse directions, using the WikiText-103 corpus (Merity et al., 2016) for domain-specificity2. These parameters are frozen, and not finetuned. Contextualised word representations are computed as a fully connected layer applied to the concatenation of the word embedding and the hidden states of each layer of the language model. We sum this representation with a trainable vector of size $d$ if the word occurs in the article title, giving the encoder information about the article topic. We follow this with bidirectional LSTMs of size $d / 2$ , concatenating the output in each direction and adding residual connections after each layer. ",
345
+ "bbox": [
346
+ 174,
347
+ 761,
348
+ 825,
349
+ 887
350
+ ],
351
+ "page_idx": 1
352
+ },
353
+ {
354
+ "type": "text",
355
+ "text": "What we now call gravity was not identified as a universal force until the work of Isaac Newton. [...] Galileo was instrumental in describing the characteristics of falling objects [...] this acceleration due to gravity towards the surface of the Earth is usually designated as and has a magnitude of about 9.81 meters per second squared [...], and points toward the center of the Earth. [...] Distractor: Object falls about 5 times faster on Mars. ",
356
+ "bbox": [
357
+ 179,
358
+ 107,
359
+ 485,
360
+ 250
361
+ ],
362
+ "page_idx": 2
363
+ },
364
+ {
365
+ "type": "image",
366
+ "img_path": "images/11e6c9fa19f967ab01fb9398ccc26793a802ffce483743e59f947b1cb08b413a.jpg",
367
+ "image_caption": [
368
+ "Figure 2: Probabilities of generating question words given different answers for a standard and an adversarial SQUAD question, allowing us to interpret which questions words are explained by the answer. In the standard setting, the model places greater probability on the question words that appear near Isaac Newton, such as force compared to Galileo. In the adversarial setting, the question word Earth distinguishes the true answer from the distractor. "
369
+ ],
370
+ "image_footnote": [],
371
+ "bbox": [
372
+ 517,
373
+ 106,
374
+ 813,
375
+ 252
376
+ ],
377
+ "page_idx": 2
378
+ },
379
+ {
380
+ "type": "text",
381
+ "text": "Answer Encoder We assume answers $a$ are a span $i . . j$ of the document. We represent the answer as a weighted sum of words within the span. For each word representation $\\begin{array} { r } { \\sum _ { k = i \\ldots j } \\sigma ( w \\cdot \\tilde { c } _ { k } ) \\tilde { c } _ { k } } \\end{array}$ , where $w \\in R ^ { d }$ is a trainable vector, and $\\tilde { c } _ { k }$ is the kth word in the answer-independent document representation. In contrast to previously proposed span representations (Lee et al., 2016; He et al., 2018), this approach allows the model to select arbitrarily many head words from the span. ",
382
+ "bbox": [
383
+ 173,
384
+ 372,
385
+ 825,
386
+ 445
387
+ ],
388
+ "page_idx": 2
389
+ },
390
+ {
391
+ "type": "text",
392
+ "text": "Answer-dependent Context Representation Generative training makes it feasible to model more complex interactions between the answer and context than discriminative training, because only the correct answer is used. On SQUAD, we compute an answer-dependent document representation. ",
393
+ "bbox": [
394
+ 174,
395
+ 469,
396
+ 825,
397
+ 511
398
+ ],
399
+ "page_idx": 2
400
+ },
401
+ {
402
+ "type": "text",
403
+ "text": "Here, we take the output of the answer-independent representation of each context word, and concatenate it with 32-dimensional embeddings of: a binary feature for whether the word is contained in the answer, its position relative to the answer start, and its position relative to the answer end. We also concatenate the element-wise product of the word representation and the answer encoding. We feed the result into 3 further layers of residual bidirectional LSTMs of size $d / 2$ . ",
404
+ "bbox": [
405
+ 174,
406
+ 518,
407
+ 825,
408
+ 588
409
+ ],
410
+ "page_idx": 2
411
+ },
412
+ {
413
+ "type": "text",
414
+ "text": "2.3 IMAGE ENCODER ",
415
+ "text_level": 1,
416
+ "bbox": [
417
+ 176,
418
+ 613,
419
+ 334,
420
+ 628
421
+ ],
422
+ "page_idx": 2
423
+ },
424
+ {
425
+ "type": "text",
426
+ "text": "We use a simple image encoder, leaving reasoning to the question decoder. ",
427
+ "bbox": [
428
+ 176,
429
+ 643,
430
+ 661,
431
+ 657
432
+ ],
433
+ "page_idx": 2
434
+ },
435
+ {
436
+ "type": "text",
437
+ "text": "Following Johnson et al. (2017), we take pre-trained features from the conv4 layer ResNet-101 model (He et al., 2016), giving 1024-dimensional features for a $1 4 \\mathrm { x } 1 4$ image grid. We apply dropout, and project these representations to size $d$ using a 1x1 convolution, followed by batch normalisation (Ioffe & Szegedy, 2015) and a ReLU activation (Nair & Hinton, 2010). We then use 2 blocks of $3 { \\tt X } 3$ convolutions, batch normalisation and ReLUs, and concatenate the final representation with a 32-dimensional positional encoding. ",
438
+ "bbox": [
439
+ 174,
440
+ 664,
441
+ 825,
442
+ 748
443
+ ],
444
+ "page_idx": 2
445
+ },
446
+ {
447
+ "type": "text",
448
+ "text": "2.4 ANSWER PRIOR ",
449
+ "text_level": 1,
450
+ "bbox": [
451
+ 174,
452
+ 773,
453
+ 325,
454
+ 787
455
+ ],
456
+ "page_idx": 2
457
+ },
458
+ {
459
+ "type": "text",
460
+ "text": "We found modelling $p ( a | c )$ , the distribution over answers given the context, to be straightforward. ",
461
+ "bbox": [
462
+ 171,
463
+ 803,
464
+ 813,
465
+ 818
466
+ ],
467
+ "page_idx": 2
468
+ },
469
+ {
470
+ "type": "text",
471
+ "text": "On SQUAD, we concatenate the start and end representations of the answer-independent context representation, combine them with a single hidden layer of size $2 d$ and ReLU activation, and project this representation down to a score $s ^ { \\mathrm { e n d p o i n t s } } ( a , c )$ . We also add an additional score based only on the length of the answer $s ^ { \\mathrm { l e n g t h } } ( a )$ . Finally, we calculate: $\\begin{array} { r } { p ( a | c ) = \\frac { \\exp { ( s ^ { \\mathrm { e n d p o i n t s } } ( a , c ) + s ^ { \\mathrm { l e n g t h } } ( a ) ) } } { \\sum _ { a ^ { \\prime } } \\exp { ( s ^ { \\mathrm { e n d p o i n t s } } ( a ^ { \\prime } , c ) + s ^ { \\mathrm { l e n g t h } } ( a ^ { \\prime } ) ) } } } \\end{array}$ ",
472
+ "bbox": [
473
+ 174,
474
+ 824,
475
+ 825,
476
+ 890
477
+ ],
478
+ "page_idx": 2
479
+ },
480
+ {
481
+ "type": "text",
482
+ "text": "On CLEVR, we simply apply a fully connected layer of size $2 d$ and ReLU activation to the image representation, followed by a projection to the space of all possible answers and a softmax. ",
483
+ "bbox": [
484
+ 173,
485
+ 895,
486
+ 821,
487
+ 924
488
+ ],
489
+ "page_idx": 2
490
+ },
491
+ {
492
+ "type": "image",
493
+ "img_path": "images/54abe8f1cd06caa9b40dbab56e9c8335e02379b89c46c2e60fc4a281b7e382e3.jpg",
494
+ "image_caption": [
495
+ "Figure 3: Architecture of GQA decoder. Multiple inputs to a layer indicates concatenation. Blocks after the first are connected with an additional residual connection, and LSTM cells also receive their state at time $t - 1$ as an input. "
496
+ ],
497
+ "image_footnote": [],
498
+ "bbox": [
499
+ 245,
500
+ 103,
501
+ 756,
502
+ 290
503
+ ],
504
+ "page_idx": 3
505
+ },
506
+ {
507
+ "type": "text",
508
+ "text": "2.5 QUESTION DECODER ",
509
+ "text_level": 1,
510
+ "bbox": [
511
+ 176,
512
+ 385,
513
+ 361,
514
+ 400
515
+ ],
516
+ "page_idx": 3
517
+ },
518
+ {
519
+ "type": "text",
520
+ "text": "We generate question words left-to-right with teacher forcing. We first embed words independently of the context (§2.5.1), then use a multi-layer RNN with attention to model interactions between the question and context $( \\ S 2 . 5 . 2 )$ , and finally compute the likelihood of the next word (§2.5.3). ",
521
+ "bbox": [
522
+ 174,
523
+ 412,
524
+ 825,
525
+ 455
526
+ ],
527
+ "page_idx": 3
528
+ },
529
+ {
530
+ "type": "text",
531
+ "text": "2.5.1 INPUT WORD EMBEDDINGS ",
532
+ "text_level": 1,
533
+ "bbox": [
534
+ 176,
535
+ 476,
536
+ 421,
537
+ 489
538
+ ],
539
+ "page_idx": 3
540
+ },
541
+ {
542
+ "type": "text",
543
+ "text": "To represent SQUAD question words independently of the answer and document, we use a pretrained left-to-right language model (which can be viewed as a uni-directional version of ELMo), followed by a trainable LSTM layer of size $d$ . On CLEVR, we simply train embeddings of size $d$ . ",
544
+ "bbox": [
545
+ 176,
546
+ 502,
547
+ 823,
548
+ 545
549
+ ],
550
+ "page_idx": 3
551
+ },
552
+ {
553
+ "type": "text",
554
+ "text": "2.5.2 DECODER BLOCKS ",
555
+ "text_level": 1,
556
+ "bbox": [
557
+ 176,
558
+ 564,
559
+ 361,
560
+ 579
561
+ ],
562
+ "page_idx": 3
563
+ },
564
+ {
565
+ "type": "text",
566
+ "text": "Decoder blocks are composed of a question self-attention layer (Vaswani et al., 2017) and a questionto-context attention mechanism, which are combined and fed into an LSTM (Figure 3). The context attention query is computed using both the previous layer state and the self-attention value. Blocks after the first are connected with residual connections. ",
567
+ "bbox": [
568
+ 176,
569
+ 590,
570
+ 825,
571
+ 646
572
+ ],
573
+ "page_idx": 3
574
+ },
575
+ {
576
+ "type": "text",
577
+ "text": "Our attention mechanisms are implemented as in Vaswani et al., except that we use a single-headed attention, and a bias term $b _ { j }$ is added to the query-key score for context position $j$ . This bias term (calculated as a dot product of a shared trainable vector and context encoding $c _ { j }$ ) allows the model to easily filter out parts of the context which are irrelevant to the question. ",
578
+ "bbox": [
579
+ 174,
580
+ 654,
581
+ 823,
582
+ 709
583
+ ],
584
+ "page_idx": 3
585
+ },
586
+ {
587
+ "type": "text",
588
+ "text": "A final block again uses self-attention and question-to-document attention, which are then combined with a Gated Linear Unit layer (Dauphin et al., 2017) to output a vector of size $d$ . The GLU layer uses a gating mechanism to select the relevant information for predicting the subsequent word. ",
589
+ "bbox": [
590
+ 176,
591
+ 717,
592
+ 823,
593
+ 758
594
+ ],
595
+ "page_idx": 3
596
+ },
597
+ {
598
+ "type": "text",
599
+ "text": "2.5.3 OUTPUT WORD PROBABILITIES ",
600
+ "text_level": 1,
601
+ "bbox": [
602
+ 176,
603
+ 779,
604
+ 447,
605
+ 792
606
+ ],
607
+ "page_idx": 3
608
+ },
609
+ {
610
+ "type": "text",
611
+ "text": "Rare words are more challenging for generative than discriminative models, because it is easier to guess the meaning of a rare word from morphological clues than to generate it. SQUAD contains many rare words, because of the specialised vocabulary in Wikipedia. We improve modelling of rare words using a combination of an approximate character-based softmax and copy mechanism. ",
612
+ "bbox": [
613
+ 174,
614
+ 805,
615
+ 825,
616
+ 861
617
+ ],
618
+ "page_idx": 3
619
+ },
620
+ {
621
+ "type": "text",
622
+ "text": "Word Softmax The simplest approach is to learn an embedding per word, replacing infrequent words with an unknown token. This approach cannot discriminate between different rare words. We use this method on CLEVR, which has a small vocabulary. ",
623
+ "bbox": [
624
+ 176,
625
+ 882,
626
+ 823,
627
+ 924
628
+ ],
629
+ "page_idx": 3
630
+ },
631
+ {
632
+ "type": "image",
633
+ "img_path": "images/57145f9925bdfa9d12c796b1ebbe1a25908c21eec1e131efb7b0370bb907722f.jpg",
634
+ "image_caption": [
635
+ "Figure 4: Final layer attention maps and word probabilities during question generation on a CLEVR validation question, when predicting the highlighted word. (1) The model considers all the rubber objects for predicting the next word. (2) Objects to the left of a rubber object are considered. (3) It describes the brown cylinder. (4, 5) Word distributions show the model understands the next words, but interestingly its attention focuses on the set of two objects meeting the constraints. In all cases, the word probability distributions are heavily skewed towards semantically valid choices. "
636
+ ],
637
+ "image_footnote": [],
638
+ "bbox": [
639
+ 174,
640
+ 101,
641
+ 821,
642
+ 292
643
+ ],
644
+ "page_idx": 4
645
+ },
646
+ {
647
+ "type": "text",
648
+ "text": "Character Softmax While there is an infinite space of possible output words, we approximate it by only normalising over the union of a list of frequent words, and any additional word that appears in any question or any document in the batch. We build a character-based representation for each candidate word using the pre-trained character CNN from $\\ S 2 . 2$ , and add a trainable linear projection to size $d$ . We combine character-based and word-based representations by summation. ",
649
+ "bbox": [
650
+ 174,
651
+ 420,
652
+ 825,
653
+ 491
654
+ ],
655
+ "page_idx": 4
656
+ },
657
+ {
658
+ "type": "text",
659
+ "text": "Pointer Mechanism We use a pointer mechanism (Vinyals et al., 2015) to improve the likelihood of the specialised vocabulary present in SQUAD, by copying article words. From the final hidden state $h _ { t }$ , the model first chooses whether to copy using a simple classifier $p ^ { \\mathrm { c o p y } } ( h ) = \\sigma ( w ^ { \\mathrm { c o p y } } \\cdot h ) .$ , where $w ^ { \\mathrm { c o p y } }$ is a trainable vector of size $d$ . Then, the model interpolates between generating a word with softmax $p ^ { \\mathrm { g e n } } ( h )$ and copying context word $c _ { i }$ using the question-to-context attention probability from the final layer $\\dot { \\alpha } _ { t } ^ { i }$ : $p ( q _ { t } \\vert \\mathbf { \\bar { q } } _ { 0 : t - 1 } , c , a ) = p ^ { \\mathrm { c o p y } } ( h _ { t } ) \\sum _ { i } \\alpha _ { t } ^ { i } \\hat { \\mathbb { 1 } } _ { c _ { i } = q _ { t } } + ( 1 - p ^ { \\mathrm { c o p y } } ( h _ { t } ) ) p ^ { \\mathrm { g e n } } \\mathbf { \\bar { ( } } q _ { t } | h _ { t } )$ ",
660
+ "bbox": [
661
+ 174,
662
+ 510,
663
+ 825,
664
+ 595
665
+ ],
666
+ "page_idx": 4
667
+ },
668
+ {
669
+ "type": "text",
670
+ "text": "2.6 FINE TUNING ",
671
+ "text_level": 1,
672
+ "bbox": [
673
+ 174,
674
+ 614,
675
+ 310,
676
+ 628
677
+ ],
678
+ "page_idx": 4
679
+ },
680
+ {
681
+ "type": "text",
682
+ "text": "Generative training using teacher forcing means that the model is not exposed to negative combinations of questions and answers at training time, so performance on these combinations may be weak when used for inference. For example, the model can overfit as a language model on questions, and ignore dependencies to the answer. Results can be improved by fine-tuning the model to make the question more likely under the gold answer than other plausible answers. Here, we minimize $- \\log \\frac { p ( q | a , c ) p ( a | \\bar { c } ) } { \\sum _ { a ^ { \\prime } \\in A } p ( q | a ^ { \\prime } , c ) p ( a ^ { \\prime } | c ) }$ , where $A$ is the most likely 100 answer candidates from $p ( a | c )$ . The model performs poorly when trained using only this loss function, suggesting that generative pretraining allows the model to establish complex dependencies between the input and output, which can then be calibrated discriminatively (Table 2). ",
683
+ "bbox": [
684
+ 173,
685
+ 641,
686
+ 825,
687
+ 785
688
+ ],
689
+ "page_idx": 4
690
+ },
691
+ {
692
+ "type": "text",
693
+ "text": "2.7 INFERENCE ",
694
+ "text_level": 1,
695
+ "bbox": [
696
+ 174,
697
+ 804,
698
+ 295,
699
+ 819
700
+ ],
701
+ "page_idx": 4
702
+ },
703
+ {
704
+ "type": "text",
705
+ "text": "We return the answer $a ^ { * }$ maximizing $a ^ { * } = \\mathrm { a r g m a x } _ { a } p ( q | a , c ) p ( a | c )$ , which requires evaluating the likelihood of the given question under each possible answer. ",
706
+ "bbox": [
707
+ 174,
708
+ 832,
709
+ 821,
710
+ 861
711
+ ],
712
+ "page_idx": 4
713
+ },
714
+ {
715
+ "type": "text",
716
+ "text": "To efficiently handle the large number of possible answers in SQUAD, we use beam search. We evaluate $p ( a | c )$ for all possible answer spans up to length 30, take the top 250 candidates, and only evaluate $p ( q | a , c )$ for each of these. A correct answer is contained in the beam for over $9 8 . 5 \\%$ o f validation questions, suggesting that approximate inference is not a major cause of errors. ",
717
+ "bbox": [
718
+ 174,
719
+ 867,
720
+ 825,
721
+ 924
722
+ ],
723
+ "page_idx": 4
724
+ },
725
+ {
726
+ "type": "table",
727
+ "img_path": "images/03b4c01c34f047187994357641629b5f2b6ef7de102ee20139983ffe8106acfe.jpg",
728
+ "table_caption": [
729
+ "Table 1: Exact Match (EM) and F1 on SQUAD, comparing to the best published single models at the time of submission (September 2018). "
730
+ ],
731
+ "table_footnote": [],
732
+ "table_body": "<table><tr><td rowspan=\"2\">Single Model</td><td colspan=\"2\">Development</td><td colspan=\"2\">Test</td></tr><tr><td>EM</td><td>F1</td><td>EM</td><td>F1</td></tr><tr><td>RaSOR (Lee et al., 2016)</td><td>66.4</td><td>74.9</td><td>67.4</td><td>75.5</td></tr><tr><td>BiDAF (Seo et al., 2016)</td><td>67.7</td><td>77.3</td><td>68.0</td><td>77.3</td></tr><tr><td>DrQA (Chen et al., 2017)</td><td>69.5</td><td>78.8</td><td>70.7</td><td>79.3</td></tr><tr><td>R-Net (Wang et al., 2017)</td><td>71.1</td><td>79.5</td><td>72.3</td><td>80.7</td></tr><tr><td>Weaver (Raison et al., 2018)</td><td>74.1</td><td>82.4</td><td>74.4</td><td>82.8</td></tr><tr><td>DCN+ (Xiong et al., 2017)</td><td>74.5</td><td>83.1</td><td>75.1</td><td>83.1</td></tr><tr><td>QANet + data augmentation x3 (Yu et al., 2018)</td><td>75.1</td><td>83.8</td><td>76.2</td><td>84.6</td></tr><tr><td>BiDAF + Self Attention + ELMo (Peters et al., 2018)</td><td>=</td><td>85.6</td><td>78.6</td><td>85.8</td></tr><tr><td>Reinforced Mnemonic Reader (Hu et al., 2018)</td><td>78.9</td><td>86.3</td><td>79.5</td><td>86.6</td></tr><tr><td>GQA</td><td>76.8</td><td>83.7</td><td>77.1</td><td>83.9</td></tr></table>",
733
+ "bbox": [
734
+ 210,
735
+ 98,
736
+ 789,
737
+ 270
738
+ ],
739
+ "page_idx": 5
740
+ },
741
+ {
742
+ "type": "table",
743
+ "img_path": "images/87d7ce27af23d0cb69a1b10615a69cf978d8e29584e304b5b6a0f0f0ae64f097.jpg",
744
+ "table_caption": [
745
+ "Table 2: Development results on SQUAD for model ablations. "
746
+ ],
747
+ "table_footnote": [],
748
+ "table_body": "<table><tr><td>Single Model</td><td>Exact Match</td><td>F1</td></tr><tr><td>GQA</td><td>76.8</td><td>83.7</td></tr><tr><td>GQA (no fine-tuning)</td><td>72.3</td><td>80.1</td></tr><tr><td>GQA (no generative training)</td><td>64.5</td><td>72.2</td></tr><tr><td>GQA (no character-based softmax)</td><td>74.3</td><td>81.4</td></tr><tr><td>GQA (no pointer mechanism)</td><td>71.9</td><td>79.7</td></tr><tr><td>GQA (no answer-dependent context representation)</td><td>72.2</td><td>79.7</td></tr><tr><td>GQA (answer prior only)</td><td>13.4</td><td>16.1</td></tr></table>",
749
+ "bbox": [
750
+ 236,
751
+ 329,
752
+ 759,
753
+ 454
754
+ ],
755
+ "page_idx": 5
756
+ },
757
+ {
758
+ "type": "text",
759
+ "text": "3 EXPERIMENTS ",
760
+ "text_level": 1,
761
+ "bbox": [
762
+ 174,
763
+ 491,
764
+ 328,
765
+ 508
766
+ ],
767
+ "page_idx": 5
768
+ },
769
+ {
770
+ "type": "text",
771
+ "text": "3.1 LARGE-SCALE READING COMPREHENSION ",
772
+ "text_level": 1,
773
+ "bbox": [
774
+ 174,
775
+ 523,
776
+ 514,
777
+ 539
778
+ ],
779
+ "page_idx": 5
780
+ },
781
+ {
782
+ "type": "text",
783
+ "text": "We evaluate our model (GQA) on the SQUAD dataset to test its robustness to diverse syntactic and lexical inferences. Results are shown in Table 1, and are competitive with comparable discriminative models, despite several years of incremental progress on discriminative architectures for this task. These results show the potential of generative models for such tasks. ",
784
+ "bbox": [
785
+ 174,
786
+ 550,
787
+ 825,
788
+ 606
789
+ ],
790
+ "page_idx": 5
791
+ },
792
+ {
793
+ "type": "text",
794
+ "text": "Higher results have been reported using techniques such as ensembles, data augmentation, reinforcement learning with the end-task metric a reward, and breakthroughs in unsupervised pre-training. ",
795
+ "bbox": [
796
+ 171,
797
+ 613,
798
+ 823,
799
+ 641
800
+ ],
801
+ "page_idx": 5
802
+ },
803
+ {
804
+ "type": "text",
805
+ "text": "Table 2 shows several ablations. It demonstrates the importance of the character-based softmax and pointer mechanism for modelling rare words, the need to model interactions between the answer and context, and a large improvement from fine-tuning the model with negative question-answer pairs. ",
806
+ "bbox": [
807
+ 174,
808
+ 647,
809
+ 825,
810
+ 690
811
+ ],
812
+ "page_idx": 5
813
+ },
814
+ {
815
+ "type": "text",
816
+ "text": "The ablations also highlight that while fine-tuning the model with a discriminative objective substantially improves the results, performance is weak when trained discriminatively from scratch. This result suggests that generative training is learning additional relationships, but can benefit from being calibrated and exposed to negative question-answer pairs during fine tuning. ",
817
+ "bbox": [
818
+ 174,
819
+ 696,
820
+ 825,
821
+ 753
822
+ ],
823
+ "page_idx": 5
824
+ },
825
+ {
826
+ "type": "text",
827
+ "text": "Table 3 shows an ablation study for the number of answer candidates considered in the beam of possible answers at inference time. Considering a larger number of answer candidates improves results, but increases the computational cost as the likelihood of the question must be calculated for each candidate. ",
828
+ "bbox": [
829
+ 174,
830
+ 761,
831
+ 825,
832
+ 815
833
+ ],
834
+ "page_idx": 5
835
+ },
836
+ {
837
+ "type": "text",
838
+ "text": "3.2 MULTIHOP REASONING ",
839
+ "text_level": 1,
840
+ "bbox": [
841
+ 176,
842
+ 833,
843
+ 379,
844
+ 848
845
+ ],
846
+ "page_idx": 5
847
+ },
848
+ {
849
+ "type": "text",
850
+ "text": "We evaluate the ability of our model to perform multihop reasoning on the CLEVR dataset, which consists of images paired with automatically generated questions involving that test visual reasoning. ",
851
+ "bbox": [
852
+ 174,
853
+ 859,
854
+ 821,
855
+ 888
856
+ ],
857
+ "page_idx": 5
858
+ },
859
+ {
860
+ "type": "text",
861
+ "text": "Table 4 shows that GQA achieves an accuracy of $9 7 . 7 \\%$ , compared to $7 6 . 6 \\%$ for a standard visual QA model, demonstrating that our generative architecture can perform complex reasoning. Integrat",
862
+ "bbox": [
863
+ 174,
864
+ 895,
865
+ 820,
866
+ 924
867
+ ],
868
+ "page_idx": 5
869
+ },
870
+ {
871
+ "type": "table",
872
+ "img_path": "images/5c2c364a705f82ecbe53a093dc03726e7b93221ce987b9ba5f6858119ebe032c.jpg",
873
+ "table_caption": [
874
+ "Table 3: Development results on SQUAD, varying the beam size during inference. "
875
+ ],
876
+ "table_footnote": [],
877
+ "table_body": "<table><tr><td>#Answer Candidates</td><td>Exact Match</td><td>F1</td></tr><tr><td>250</td><td>76.8</td><td>83.7</td></tr><tr><td>200</td><td>76.6</td><td>83.4</td></tr><tr><td>100</td><td>76.2</td><td>83.1</td></tr><tr><td>50</td><td>74.6</td><td>81.4</td></tr><tr><td>10</td><td>55.7</td><td>61.4</td></tr></table>",
878
+ "bbox": [
879
+ 336,
880
+ 99,
881
+ 663,
882
+ 186
883
+ ],
884
+ "page_idx": 6
885
+ },
886
+ {
887
+ "type": "table",
888
+ "img_path": "images/8e67686d367a8502f70fe6a56c7c14908732d07857f130c478cd89b25b824970.jpg",
889
+ "table_caption": [
890
+ "Table 4: Test results on CLEVR, demonstrating high accuracy at complex reasoning. GQA is the first approach to achieve high performance on both CLEVR and broad coverage QA tasks. "
891
+ ],
892
+ "table_footnote": [],
893
+ "table_body": "<table><tr><td>Single Model</td><td>Overall</td><td>Count</td><td>Exist</td><td>Compare Numbers</td><td>Query Attribute</td><td>Compare Attribute</td></tr><tr><td>Human</td><td>92.6</td><td>86.7</td><td>96.6</td><td>86.5</td><td>95.0</td><td>96.0</td></tr><tr><td>CNN+LSTM</td><td>52.3</td><td>43.7</td><td>65.2</td><td>67.1</td><td>49.3</td><td>53.0</td></tr><tr><td>CNN+LSTM+SA</td><td>76.6</td><td>64.4</td><td>82.7</td><td>77.4</td><td>82.6</td><td>75.4</td></tr><tr><td>CNN+LSTM+RN</td><td>95.5</td><td>90.1</td><td>97.8</td><td>93.6</td><td>97.9</td><td>97.1</td></tr><tr><td>CNN+GRU+FiLM</td><td>97.6</td><td>94.3</td><td>99.3</td><td>93.4</td><td>99.3</td><td>99.3</td></tr><tr><td>MAC</td><td>98.9</td><td>97.1</td><td>99.5</td><td>99.1</td><td>99.5</td><td>99.5</td></tr><tr><td>GQA</td><td>97.7</td><td>94.9</td><td>98.3</td><td>97.0</td><td>99.2</td><td>99.2</td></tr></table>",
894
+ "bbox": [
895
+ 200,
896
+ 233,
897
+ 795,
898
+ 363
899
+ ],
900
+ "page_idx": 6
901
+ },
902
+ {
903
+ "type": "text",
904
+ "text": "ing MAC cells (Hudson & Manning, 2018) into our decoder or FiLM layers (Perez et al., 2018) into our encoder would be straightforward, and may improve results, but we avoid these techniques to emphasise that generative decoding alone allows multihop reasoning. ",
905
+ "bbox": [
906
+ 174,
907
+ 438,
908
+ 825,
909
+ 479
910
+ ],
911
+ "page_idx": 6
912
+ },
913
+ {
914
+ "type": "text",
915
+ "text": "Figure 4 shows an example of how the model decomposes the reasoning over the question. It initially pays attention to all shapes, but updates its attention mask after new words are read. ",
916
+ "bbox": [
917
+ 174,
918
+ 487,
919
+ 821,
920
+ 515
921
+ ],
922
+ "page_idx": 6
923
+ },
924
+ {
925
+ "type": "text",
926
+ "text": "3.3 LEARNING FROM BIASED DATA ",
927
+ "text_level": 1,
928
+ "bbox": [
929
+ 176,
930
+ 535,
931
+ 434,
932
+ 549
933
+ ],
934
+ "page_idx": 6
935
+ },
936
+ {
937
+ "type": "text",
938
+ "text": "Many popular QA datasets are well known to contain biases that models can exploit. Examples include when questions paired with paragraphs that contain a single date. Models can exploit biases by learning simple heuristics such as selecting answers based on the expected answer type (Weissenborn et al., 2017; Rondeau & Hazen, 2018). Recent work has attempted to remove some biases (Goyal et al., 2017; Rajpurkar et al., 2018); we instead attempt to make training robust to bias. ",
939
+ "bbox": [
940
+ 174,
941
+ 563,
942
+ 823,
943
+ 632
944
+ ],
945
+ "page_idx": 6
946
+ },
947
+ {
948
+ "type": "text",
949
+ "text": "We create deliberately biased training subsets of SQUAD based on named entity types: numbers, dates, and people. To construct each training set, we select questions whose answer is one of these types, but that type only appears once in the document (e.g. Figure 1b). The validation set is created from questions whose answers are the named entity type, but there must be multiple occurrences of that type in the document. Each training and validation set contains rougly 1000 questions. ",
950
+ "bbox": [
951
+ 174,
952
+ 638,
953
+ 825,
954
+ 708
955
+ ],
956
+ "page_idx": 6
957
+ },
958
+ {
959
+ "type": "text",
960
+ "text": "We compare our model to two strong discriminative models, BiDAF (Seo et al., 2016) and QANet3 (Yu et al., 2018). We also report three question agnostic baselines: a random answer of the correct type, the first answer of the correct type, and the GQA answer prior distribtion. ",
961
+ "bbox": [
962
+ 176,
963
+ 715,
964
+ 823,
965
+ 757
966
+ ],
967
+ "page_idx": 6
968
+ },
969
+ {
970
+ "type": "text",
971
+ "text": "Results are shown in Table 5, and show that discriminatively trained models perform similarly to question-agnostic baselines. In contrast, our generative model learns to generalise meaningfully even from highly biased data, because it is trained to explain the whole question, not simply to answer it—demonstrating that on some QA tasks, there are clear advantages to generative modelling. ",
972
+ "bbox": [
973
+ 174,
974
+ 763,
975
+ 825,
976
+ 820
977
+ ],
978
+ "page_idx": 6
979
+ },
980
+ {
981
+ "type": "text",
982
+ "text": "3.4 ADVERSARIAL EVALUATION ",
983
+ "text_level": 1,
984
+ "bbox": [
985
+ 176,
986
+ 840,
987
+ 411,
988
+ 854
989
+ ],
990
+ "page_idx": 6
991
+ },
992
+ {
993
+ "type": "text",
994
+ "text": "We evaluate on an adversarial version of the SQUAD dataset (Jia & Liang, 2017), which was created by adding a distractor sentence to each paragraph that can almost answer the question. ",
995
+ "bbox": [
996
+ 176,
997
+ 867,
998
+ 823,
999
+ 896
1000
+ ],
1001
+ "page_idx": 6
1002
+ },
1003
+ {
1004
+ "type": "table",
1005
+ "img_path": "images/8fe1d1eaeed4e69ea8a66ddb72ab1dc6ee239ae468c884935c0c9302b24803d0.jpg",
1006
+ "table_caption": [
1007
+ "Table 5: Exact Match (EM) and F1 on biased subsets of SQUAD. All answers in each subset have the indicated named-entity type; training documents have only one answer with this type, but for testing there are multiple plausible answers. Discriminative models perform comparably to questionagnostic baselines, whereas our generative model learns to generalise. "
1008
+ ],
1009
+ "table_footnote": [],
1010
+ "table_body": "<table><tr><td rowspan=\"2\">Single Model</td><td colspan=\"2\">Numbers</td><td colspan=\"2\">Dates</td><td colspan=\"2\">People</td></tr><tr><td>EM</td><td>F1</td><td>EM</td><td>F1</td><td>EM</td><td>F1</td></tr><tr><td>Random Selection First Occurrence</td><td>19.37 29.36</td><td>26.18 35.11</td><td>19.37 34.64</td><td>26.18</td><td>19.37</td><td>26.18</td></tr><tr><td>BiDAF</td><td>33.02</td><td>42.14</td><td>35.41</td><td>42.08 43.83</td><td>26.38 30.05</td><td>32.26 37.28</td></tr><tr><td>QANet</td><td>31.99</td><td>40.58</td><td>39.98</td><td>47.82</td><td>30.26</td><td>38.56</td></tr><tr><td>GQA (answer prior only)</td><td>37.15</td><td>45.54</td><td>35.55</td><td>43.85</td><td>32.56</td><td>38.79</td></tr><tr><td>GQA</td><td>58.49</td><td>67.56</td><td>64.71</td><td>72.51</td><td>53.09</td><td>61.93</td></tr></table>",
1011
+ "bbox": [
1012
+ 235,
1013
+ 99,
1014
+ 764,
1015
+ 220
1016
+ ],
1017
+ "page_idx": 7
1018
+ },
1019
+ {
1020
+ "type": "table",
1021
+ "img_path": "images/7798f5ba176cc5d87f4ada851cbcb3a8f32627d53e9b44efffeaa28f0c52d508.jpg",
1022
+ "table_caption": [
1023
+ "Table 6: F1 scores on ADVERSARIALSQUAD (from September 2018), which demonstrate that our generative QA model is substantially more robust to this adversary than previous work, likely because the additional adversarial context sentence cannot explain all the question words. "
1024
+ ],
1025
+ "table_footnote": [],
1026
+ "table_body": "<table><tr><td>Single Model</td><td>ADDSENT</td><td>ADDONESENT</td></tr><tr><td>BiDAF (Seo et al.,2016)</td><td>34.3</td><td>45.7</td></tr><tr><td>RaSOR (Lee et al., 2016)</td><td>39.5</td><td>49.5</td></tr><tr><td>MPCM (Wang et al., 2016)</td><td>40.3</td><td>50.0</td></tr><tr><td>ReasoNet (Shen etal., 2017)</td><td>39.4</td><td>50.3</td></tr><tr><td>Reinforced Mnemonic Reader (Hu et al., 2018)</td><td>46.6</td><td>56.0</td></tr><tr><td>QANet (Yu et al., 2018)</td><td>45.2</td><td>55.7</td></tr><tr><td>GQA</td><td>47.3</td><td>57.8</td></tr></table>",
1027
+ "bbox": [
1028
+ 223,
1029
+ 292,
1030
+ 772,
1031
+ 409
1032
+ ],
1033
+ "page_idx": 7
1034
+ },
1035
+ {
1036
+ "type": "text",
1037
+ "text": "Table 6 shows that GQA outperforms the best previous work by up to $2 . 1 \\ \\mathrm { F 1 }$ , making it the most robust model to these adversarial attacks. The improvement may be due to the model’s attempt to explain all question words, some of which may be unlikely under the distractor (Figure 2). ",
1038
+ "bbox": [
1039
+ 174,
1040
+ 500,
1041
+ 825,
1042
+ 541
1043
+ ],
1044
+ "page_idx": 7
1045
+ },
1046
+ {
1047
+ "type": "text",
1048
+ "text": "3.5 LONG CONTEXT QUESTION ANSWERING ",
1049
+ "text_level": 1,
1050
+ "bbox": [
1051
+ 178,
1052
+ 564,
1053
+ 498,
1054
+ 579
1055
+ ],
1056
+ "page_idx": 7
1057
+ },
1058
+ {
1059
+ "type": "text",
1060
+ "text": "Finally, we extend our generative model to answering questions in a more challenging, multiparagraph setting. While we train on single paragraphs, our model can be used to answer questions with multi-paragraph context. During training, our model $p ( q \\mid a , c )$ depends only on the content of the paragraph $c$ containing the correct answer $a$ . In contrast, discriminative models need to be trained to discriminate against all negative answers from all paragraphs. ",
1061
+ "bbox": [
1062
+ 174,
1063
+ 592,
1064
+ 825,
1065
+ 661
1066
+ ],
1067
+ "page_idx": 7
1068
+ },
1069
+ {
1070
+ "type": "text",
1071
+ "text": "We use the multi-paragraph SQUAD dataset of Raison et al. (2018), where each question is paired with the entire corresponding Wikipedia article. For each question, we calculate $p ( q \\mid a ) s ( a , c )$ for the proposed answer span $a$ produced by the model, where $s ( a , c )$ is the logits from the answer prior classifier. The maximum value across all paragraphs of that article is selected as the answer for that question. Table 7 shows that GQA outperforms previous work on this task by $2 . 5 \\ : \\mathrm { F 1 }$ . Further, discriminative models such as DrQA and Weaver require training in the multi-paragraph setting to perform well, which is expensive and may not scale to longer contexts. However, our generative approach performs well in the multi-paragraph test setting but only requires single paragraph training. ",
1072
+ "bbox": [
1073
+ 174,
1074
+ 667,
1075
+ 825,
1076
+ 780
1077
+ ],
1078
+ "page_idx": 7
1079
+ },
1080
+ {
1081
+ "type": "text",
1082
+ "text": "4 RELATED WORK ",
1083
+ "text_level": 1,
1084
+ "bbox": [
1085
+ 176,
1086
+ 805,
1087
+ 344,
1088
+ 821
1089
+ ],
1090
+ "page_idx": 7
1091
+ },
1092
+ {
1093
+ "type": "text",
1094
+ "text": "Our model is inspired by the classic noisy channel translation models of Brown et al. (1993), more recently explored by Yu et al. (2016), which were motivated by the ease of incorporating a prior over outputs. Generative models have been widely used in other language classification tasks, such as sequence tagging (Brants, 2000) and parsing (Collins, 1997; Dyer et al., 2016). Generative classification models became less popular because of the difficulty of modelling the input (Sutton & McCallum, 2012), a challenge we embrace as an additional learning signal. Recent work has shown the effectiveness of generative pre-training on unlabelled data (Peters et al., 2018; Radford et al., 2018), we show additional gains from training generatively on labelled data. ",
1095
+ "bbox": [
1096
+ 174,
1097
+ 840,
1098
+ 825,
1099
+ 924
1100
+ ],
1101
+ "page_idx": 7
1102
+ },
1103
+ {
1104
+ "type": "table",
1105
+ "img_path": "images/5786ce4c6622a7133f2b86a39ff8c54ef1b5fea48bdc330ad58bf46c705b771e.jpg",
1106
+ "table_caption": [
1107
+ "Table 7: F1 scores on full document evaluation for SQUAD, which show our generative QA model is capable of selecting the correct paragraph for question answering even when presented with other similar paragraphs. Baselines are from (Raison et al., 2018). "
1108
+ ],
1109
+ "table_footnote": [],
1110
+ "table_body": "<table><tr><td>Single Model EM F1</td></tr><tr><td>DrQA* trained on paragraph 59.1 67.0 Weaver trained on paragraph 60.6 69.7</td></tr><tr><td>DrQA* trained on documents 64.7 73.2</td></tr><tr><td>Weaver trained on documents 67.0 75.9 GQA trained on paragraph 71.4 78.4</td></tr></table>",
1111
+ "bbox": [
1112
+ 341,
1113
+ 99,
1114
+ 656,
1115
+ 188
1116
+ ],
1117
+ "page_idx": 8
1118
+ },
1119
+ {
1120
+ "type": "text",
1121
+ "text": "",
1122
+ "bbox": [
1123
+ 173,
1124
+ 279,
1125
+ 821,
1126
+ 308
1127
+ ],
1128
+ "page_idx": 8
1129
+ },
1130
+ {
1131
+ "type": "text",
1132
+ "text": "Several studies have explored the relationship between question answering and question generation. Duan et al. (2017) and Tang et al. (2017) train answering and generation models with separate parameters, but add a regularisation term that encourages the models to be consistent. They focus on answer sentence selection, so performance cannot easily be compared with our work. Tang et al. (2018) use question generation to provide an additional loss to improve question answering systems using GAN-like training. Li et al. (2017) apply similar techniques to visual QA. Our work differs in training a single model for the joint distribution of questions and answers, which can be used to calculate conditional distributions for question generation or answering. Sachan & Xing (2018) improve performance by generating new question-answer pairs for training from unlabelled text, which would be a possible extension to our work. Echihabi & Marcu (2003) describe an earlier method for answering questions in terms of the distribution of questions given answers—one conceptual difference is that their approach does not include a prior over answers. ",
1133
+ "bbox": [
1134
+ 174,
1135
+ 314,
1136
+ 825,
1137
+ 481
1138
+ ],
1139
+ "page_idx": 8
1140
+ },
1141
+ {
1142
+ "type": "text",
1143
+ "text": "Question generation has also been studied as a task in its own right. Heilman & Smith (2010) use a rule-based system to generate candidate questions, followed by statistical ranking. Du et al. (2017) use a sequence-to-sequence model that encodes paragraph and sentence level information to generate questions. Cardie & Du (2018) propose using a coreference mechanism to incorporate contextual information from multiple sentences. Liu et al. (2017) explore question generation from images, which they refer to as Inverse Visual QA. Yuan et al. (2017) fine-tune a question generation model using reinforcement learning, based on fluency and whether it can be answered. Although we train a question generation model, our focus is on using it to answer questions. ",
1144
+ "bbox": [
1145
+ 174,
1146
+ 488,
1147
+ 825,
1148
+ 599
1149
+ ],
1150
+ "page_idx": 8
1151
+ },
1152
+ {
1153
+ "type": "text",
1154
+ "text": "5 CONCLUSION ",
1155
+ "text_level": 1,
1156
+ "bbox": [
1157
+ 176,
1158
+ 625,
1159
+ 318,
1160
+ 640
1161
+ ],
1162
+ "page_idx": 8
1163
+ },
1164
+ {
1165
+ "type": "text",
1166
+ "text": "We introduced a generative model for question answering, which leverages the greater amount of information in questions than answers to achieve high performance in both language comprehension and reasoning. The approach demonstrates better robustness to biased training data and adversarial testing data than state-of-the-art discriminative models. There are numerous interesting directions for future work, such as combining information about an entity from multiple sources to generate questions. Given the rapid progress made on discriminative QA models in recent years, we believe there is significant potential for further improvements in generative question answering. ",
1167
+ "bbox": [
1168
+ 174,
1169
+ 659,
1170
+ 825,
1171
+ 756
1172
+ ],
1173
+ "page_idx": 8
1174
+ },
1175
+ {
1176
+ "type": "text",
1177
+ "text": "REFERENCES ",
1178
+ "text_level": 1,
1179
+ "bbox": [
1180
+ 174,
1181
+ 781,
1182
+ 285,
1183
+ 796
1184
+ ],
1185
+ "page_idx": 8
1186
+ },
1187
+ {
1188
+ "type": "text",
1189
+ "text": "Aishwarya Agrawal, Jiasen Lu, Stanislaw Antol, Margaret Mitchell, C. Lawrence Zitnick, Devi Parikh, and Dhruv Batra. Vqa: Visual question answering. Int. J. Comput. Vision, 123(1):4–31, May 2017. ISSN 0920-5691. URL https://doi.org/10.1007/ s11263-016-0966-6. ",
1190
+ "bbox": [
1191
+ 176,
1192
+ 808,
1193
+ 825,
1194
+ 863
1195
+ ],
1196
+ "page_idx": 8
1197
+ },
1198
+ {
1199
+ "type": "text",
1200
+ "text": "Thorsten Brants. TnT: a statistical part-of-speech tagger. In Proceedings of the sixth conference on Applied natural language processing, pp. 224–231. Association for Computational Linguistics, 2000. ",
1201
+ "bbox": [
1202
+ 176,
1203
+ 882,
1204
+ 823,
1205
+ 922
1206
+ ],
1207
+ "page_idx": 8
1208
+ },
1209
+ {
1210
+ "type": "text",
1211
+ "text": "Peter F. Brown, Stephen Della Pietra, Vincent J. Della Pietra, and Robert L. Mercer. The mathematics of statistical machine translation: Parameter estimation. Computational Linguistics, 19(2): 263–311, 1993. ",
1212
+ "bbox": [
1213
+ 173,
1214
+ 103,
1215
+ 821,
1216
+ 145
1217
+ ],
1218
+ "page_idx": 9
1219
+ },
1220
+ {
1221
+ "type": "text",
1222
+ "text": "Claire Cardie and Xinya Du. Harvesting paragraph-level question-answer pairs from wikipedia. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, ACL 2018, Melbourne, Australia, July 15-20, 2018, Volume 1: Long Papers, pp. 1907–1917, 2018. URL https://aclanthology.info/papers/P18-1177/p18-1177. ",
1223
+ "bbox": [
1224
+ 173,
1225
+ 157,
1226
+ 825,
1227
+ 214
1228
+ ],
1229
+ "page_idx": 9
1230
+ },
1231
+ {
1232
+ "type": "text",
1233
+ "text": "Ciprian Chelba, Tomas Mikolov, Mike Schuster, Qi Ge, Thorsten Brants, Phillipp Koehn, and Tony Robinson. One billion word benchmark for measuring progress in statistical language modeling. In INTERSPEECH 2014, 15th Annual Conference of the International Speech Communication Association, Singapore, September 14-18, 2014, pp. 2635–2639, 2014. URL http://www. isca-speech.org/archive/interspeech_2014/i14_2635.html. ",
1234
+ "bbox": [
1235
+ 173,
1236
+ 226,
1237
+ 825,
1238
+ 296
1239
+ ],
1240
+ "page_idx": 9
1241
+ },
1242
+ {
1243
+ "type": "text",
1244
+ "text": "Danqi Chen, Adam Fisch, Jason Weston, and Antoine Bordes. Reading wikipedia to answer opendomain questions. arXiv preprint arXiv:1704.00051, 2017. ",
1245
+ "bbox": [
1246
+ 173,
1247
+ 308,
1248
+ 820,
1249
+ 337
1250
+ ],
1251
+ "page_idx": 9
1252
+ },
1253
+ {
1254
+ "type": "text",
1255
+ "text": "Michael Collins. Three generative, lexicalised models for statistical parsing. In 35th Annual Meeting of the Association for Computational Linguistics and 8th Conference of the European Chapter of the Association for Computational Linguistics, Proceedings of the Conference, 7-12 July 1997, Universidad Nacional de Educacion a Distancia (UNED), Madrid, Spain. ´ , pp. 16–23, 1997. URL http://aclweb.org/anthology/P/P97/P97-1003.pdf. ",
1256
+ "bbox": [
1257
+ 173,
1258
+ 348,
1259
+ 826,
1260
+ 419
1261
+ ],
1262
+ "page_idx": 9
1263
+ },
1264
+ {
1265
+ "type": "text",
1266
+ "text": "Yann N. Dauphin, Angela Fan, Michael Auli, and David Grangier. Language modeling with gated convolutional networks. In Proceedings of the 34th International Conference on Machine Learning, ICML 2017, Sydney, NSW, Australia, 6-11 August 2017, pp. 933–941, 2017. URL http://proceedings.mlr.press/v70/dauphin17a.html. ",
1267
+ "bbox": [
1268
+ 174,
1269
+ 430,
1270
+ 825,
1271
+ 487
1272
+ ],
1273
+ "page_idx": 9
1274
+ },
1275
+ {
1276
+ "type": "text",
1277
+ "text": "Xinya Du, Junru Shao, and Claire Cardie. Learning to ask: Neural question generation for reading comprehension. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, ACL 2017, Vancouver, Canada, July 30 - August 4, Volume 1: Long Papers, pp. 1342–1352, 2017. URL https://doi.org/10.18653/v1/P17-1123. ",
1278
+ "bbox": [
1279
+ 173,
1280
+ 498,
1281
+ 825,
1282
+ 555
1283
+ ],
1284
+ "page_idx": 9
1285
+ },
1286
+ {
1287
+ "type": "text",
1288
+ "text": "Nan Duan, Duyu Tang, Peng Chen, and Ming Zhou. Question generation for question answering. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, EMNLP 2017, Copenhagen, Denmark, September 9-11, 2017, pp. 866–874, 2017. URL https: //aclanthology.info/papers/D17-1090/d17-1090. ",
1289
+ "bbox": [
1290
+ 173,
1291
+ 566,
1292
+ 825,
1293
+ 623
1294
+ ],
1295
+ "page_idx": 9
1296
+ },
1297
+ {
1298
+ "type": "text",
1299
+ "text": "Chris Dyer, Adhiguna Kuncoro, Miguel Ballesteros, and Noah A. Smith. Recurrent neural network grammars. In NAACL HLT 2016, The 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, San Diego California, USA, June 12-17, 2016, pp. 199–209, 2016. URL http://aclweb.org/anthology/N/ N16/N16-1024.pdf. ",
1300
+ "bbox": [
1301
+ 173,
1302
+ 635,
1303
+ 825,
1304
+ 705
1305
+ ],
1306
+ "page_idx": 9
1307
+ },
1308
+ {
1309
+ "type": "text",
1310
+ "text": "Abdessamad Echihabi and Daniel Marcu. A noisy-channel approach to question answering. In Proceedings of the 41st Annual Meeting of the Association for Computational Linguistics, 7- 12 July 2003, Sapporo Convention Center, Sapporo, Japan., pp. 16–23, 2003. URL http: //aclweb.org/anthology/P/P03/P03-1003.pdf. ",
1311
+ "bbox": [
1312
+ 174,
1313
+ 717,
1314
+ 825,
1315
+ 773
1316
+ ],
1317
+ "page_idx": 9
1318
+ },
1319
+ {
1320
+ "type": "text",
1321
+ "text": "Yarin Gal and Zoubin Ghahramani. A theoretically grounded application of dropout in recurrent neural networks. In Advances in Neural Information Processing Systems 29: Annual Conference on Neural Information Processing Systems 2016, December 5-10, 2016, Barcelona, Spain, pp. 1019–1027, 2016. ",
1322
+ "bbox": [
1323
+ 174,
1324
+ 785,
1325
+ 825,
1326
+ 842
1327
+ ],
1328
+ "page_idx": 9
1329
+ },
1330
+ {
1331
+ "type": "text",
1332
+ "text": "Yash Goyal, Tejas Khot, Douglas Summers-Stay, Dhruv Batra, and Devi Parikh. Making the V in VQA matter: Elevating the role of image understanding in visual question answering. In 2017 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017, Honolulu, HI, USA, July 21-26, 2017, pp. 6325–6334, 2017. URL https://doi.org/10.1109/CVPR.2017. 670. ",
1333
+ "bbox": [
1334
+ 176,
1335
+ 853,
1336
+ 825,
1337
+ 922
1338
+ ],
1339
+ "page_idx": 9
1340
+ },
1341
+ {
1342
+ "type": "text",
1343
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In 2016 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2016, Las Vegas, NV, USA, June 27-30, 2016, pp. 770–778, 2016. URL https://doi.org/10.1109/ CVPR.2016.90. ",
1344
+ "bbox": [
1345
+ 174,
1346
+ 103,
1347
+ 825,
1348
+ 159
1349
+ ],
1350
+ "page_idx": 10
1351
+ },
1352
+ {
1353
+ "type": "text",
1354
+ "text": "Luheng He, Kenton Lee, Omer Levy, and Luke Zettlemoyer. Jointly predicting predicates and arguments in neural semantic role labeling. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, ACL 2018, Melbourne, Australia, July 15-20, 2018, Volume 2: Short Papers, pp. 364–369, 2018. URL https://aclanthology.info/papers/ P18-2058/p18-2058. ",
1355
+ "bbox": [
1356
+ 173,
1357
+ 167,
1358
+ 825,
1359
+ 238
1360
+ ],
1361
+ "page_idx": 10
1362
+ },
1363
+ {
1364
+ "type": "text",
1365
+ "text": "Michael Heilman and Noah A. Smith. Good question! statistical ranking for question generation. In Human Language Technologies: The 2010 Annual Conference of the North American Chapter of the Association for Computational Linguistics, HLT ’10, pp. 609–617. Association for Computational Linguistics, 2010. ISBN 1-932432-65-5. URL http://dl.acm.org/citation. cfm?id=1857999.1858085. ",
1366
+ "bbox": [
1367
+ 173,
1368
+ 247,
1369
+ 826,
1370
+ 316
1371
+ ],
1372
+ "page_idx": 10
1373
+ },
1374
+ {
1375
+ "type": "text",
1376
+ "text": "Minghao Hu, Yuxing Peng, Zhen Huang, Xipeng Qiu, Furu Wei, and Ming Zhou. Reinforced mnemonic reader for machine reading comprehension. In Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence, IJCAI 2018, July 13-19, 2018, Stockholm, Sweden., pp. 4099–4106, 2018. URL https://doi.org/10.24963/ijcai.2018/570. ",
1377
+ "bbox": [
1378
+ 173,
1379
+ 325,
1380
+ 825,
1381
+ 382
1382
+ ],
1383
+ "page_idx": 10
1384
+ },
1385
+ {
1386
+ "type": "text",
1387
+ "text": "Drew A. Hudson and Christopher D. Manning. Compositional attention networks for machine reasoning. CoRR, abs/1803.03067, 2018. URL http://arxiv.org/abs/1803.03067. ",
1388
+ "bbox": [
1389
+ 171,
1390
+ 390,
1391
+ 823,
1392
+ 420
1393
+ ],
1394
+ "page_idx": 10
1395
+ },
1396
+ {
1397
+ "type": "text",
1398
+ "text": "Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Proceedings of the 32nd International Conference on Machine Learning, ICML 2015, Lille, France, 6-11 July 2015, pp. 448–456, 2015. URL http://jmlr. org/proceedings/papers/v37/ioffe15.html. ",
1399
+ "bbox": [
1400
+ 173,
1401
+ 428,
1402
+ 825,
1403
+ 484
1404
+ ],
1405
+ "page_idx": 10
1406
+ },
1407
+ {
1408
+ "type": "text",
1409
+ "text": "Robin Jia and Percy Liang. Adversarial examples for evaluating reading comprehension systems. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, EMNLP 2017, Copenhagen, Denmark, September 9-11, 2017, pp. 2021–2031, 2017. URL https://aclanthology.info/papers/D17-1215/d17-1215. ",
1410
+ "bbox": [
1411
+ 173,
1412
+ 492,
1413
+ 825,
1414
+ 549
1415
+ ],
1416
+ "page_idx": 10
1417
+ },
1418
+ {
1419
+ "type": "text",
1420
+ "text": "Justin Johnson, Bharath Hariharan, Laurens van der Maaten, Li Fei-Fei, C. Lawrence Zitnick, and Ross B. Girshick. CLEVR: A diagnostic dataset for compositional language and elementary visual reasoning. In 2017 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017, Honolulu, HI, USA, July 21-26, 2017, pp. 1988–1997, 2017. URL https://doi.org/ 10.1109/CVPR.2017.215. ",
1421
+ "bbox": [
1422
+ 173,
1423
+ 556,
1424
+ 825,
1425
+ 627
1426
+ ],
1427
+ "page_idx": 10
1428
+ },
1429
+ {
1430
+ "type": "text",
1431
+ "text": "Mandar Joshi, Eunsol Choi, Daniel S. Weld, and Luke Zettlemoyer. Triviaqa: A large scale distantly supervised challenge dataset for reading comprehension. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, ACL 2017, Vancouver, Canada, July 30 - August 4, Volume 1: Long Papers, pp. 1601–1611, 2017. URL https://doi.org/10. 18653/v1/P17-1147. ",
1432
+ "bbox": [
1433
+ 173,
1434
+ 635,
1435
+ 825,
1436
+ 705
1437
+ ],
1438
+ "page_idx": 10
1439
+ },
1440
+ {
1441
+ "type": "text",
1442
+ "text": "Yoon Kim, Yacine Jernite, David Sontag, and Alexander M. Rush. Character-aware neural language models. In Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence, February 12-17, 2016, Phoenix, Arizona, USA., pp. 2741–2749, 2016. URL http://www.aaai.org/ ocs/index.php/AAAI/AAAI16/paper/view/12489. ",
1443
+ "bbox": [
1444
+ 173,
1445
+ 714,
1446
+ 825,
1447
+ 771
1448
+ ],
1449
+ "page_idx": 10
1450
+ },
1451
+ {
1452
+ "type": "text",
1453
+ "text": "Kenton Lee, Tom Kwiatkowski, Ankur P. Parikh, and Dipanjan Das. Learning recurrent span representations for extractive question answering. CoRR, abs/1611.01436, 2016. URL http: //arxiv.org/abs/1611.01436. ",
1454
+ "bbox": [
1455
+ 173,
1456
+ 779,
1457
+ 823,
1458
+ 821
1459
+ ],
1460
+ "page_idx": 10
1461
+ },
1462
+ {
1463
+ "type": "text",
1464
+ "text": "Yikang Li, Nan Duan, Bolei Zhou, Xiao Chu, Wanli Ouyang, and Xiaogang Wang. Visual question generation as dual task of visual question answering. CoRR, abs/1709.07192, 2017. URL http: //arxiv.org/abs/1709.07192. ",
1465
+ "bbox": [
1466
+ 173,
1467
+ 830,
1468
+ 823,
1469
+ 872
1470
+ ],
1471
+ "page_idx": 10
1472
+ },
1473
+ {
1474
+ "type": "text",
1475
+ "text": "Feng Liu, Tao Xiang, Timothy M. Hospedales, Wankou Yang, and Changyin Sun. ivqa: Inverse visual question answering. CoRR, abs/1710.03370, 2017. URL http://arxiv.org/abs/ 1710.03370. ",
1476
+ "bbox": [
1477
+ 174,
1478
+ 882,
1479
+ 825,
1480
+ 924
1481
+ ],
1482
+ "page_idx": 10
1483
+ },
1484
+ {
1485
+ "type": "text",
1486
+ "text": "Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models. CoRR, abs/1609.07843, 2016. URL http://arxiv.org/abs/1609.07843. ",
1487
+ "bbox": [
1488
+ 171,
1489
+ 103,
1490
+ 825,
1491
+ 132
1492
+ ],
1493
+ "page_idx": 11
1494
+ },
1495
+ {
1496
+ "type": "text",
1497
+ "text": "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), June 21- 24, 2010, Haifa, Israel, pp. 807–814, 2010. URL http://www.icml2010.org/papers/ 432.pdf. ",
1498
+ "bbox": [
1499
+ 174,
1500
+ 138,
1501
+ 825,
1502
+ 195
1503
+ ],
1504
+ "page_idx": 11
1505
+ },
1506
+ {
1507
+ "type": "text",
1508
+ "text": "Ethan Perez, Florian Strub, Harm de Vries, Vincent Dumoulin, and Aaron C. Courville. Film: Visual reasoning with a general conditioning layer. In Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence, New Orleans, Louisiana, USA, February 2-7, 2018, 2018. URL https://www.aaai.org/ocs/index.php/AAAI/AAAI18/paper/view/16528. ",
1509
+ "bbox": [
1510
+ 174,
1511
+ 203,
1512
+ 825,
1513
+ 260
1514
+ ],
1515
+ "page_idx": 11
1516
+ },
1517
+ {
1518
+ "type": "text",
1519
+ "text": "Matthew E. Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. Deep contextualized word representations. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2018, New Orleans, Louisiana, USA, June 1-6, 2018, Volume 1 (Long Papers), pp. 2227–2237, 2018. URL https://aclanthology.info/ papers/N18-1202/n18-1202. ",
1520
+ "bbox": [
1521
+ 173,
1522
+ 266,
1523
+ 825,
1524
+ 351
1525
+ ],
1526
+ "page_idx": 11
1527
+ },
1528
+ {
1529
+ "type": "text",
1530
+ "text": "Alec Radford, Karthik Narasimhan, Tim Salimans, and Ilya Sutskever. Improving language understanding by generative pre-training. 2018. URL http://openai-assets.s3. amazonaws.com/research-covers/language-unsupervised/language_ understanding_paper.pdf. ",
1531
+ "bbox": [
1532
+ 174,
1533
+ 358,
1534
+ 825,
1535
+ 415
1536
+ ],
1537
+ "page_idx": 11
1538
+ },
1539
+ {
1540
+ "type": "text",
1541
+ "text": "Martin Raison, Pierre-Emmanuel Mazare, Rajarshi Das, and Antoine Bordes. Weaver: Deep co- ´ encoding of questions and documents for machine reading. arXiv preprint arXiv:1804.10490, 2018. ",
1542
+ "bbox": [
1543
+ 173,
1544
+ 421,
1545
+ 825,
1546
+ 463
1547
+ ],
1548
+ "page_idx": 11
1549
+ },
1550
+ {
1551
+ "type": "text",
1552
+ "text": "Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. Squad: 100, $0 0 0 +$ questions for machine comprehension of text. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, EMNLP 2016, Austin, Texas, USA, November 1-4, 2016, pp. 2383–2392, 2016. URL http://aclweb.org/anthology/D/D16/D16-1264.pdf. ",
1553
+ "bbox": [
1554
+ 173,
1555
+ 472,
1556
+ 825,
1557
+ 529
1558
+ ],
1559
+ "page_idx": 11
1560
+ },
1561
+ {
1562
+ "type": "text",
1563
+ "text": "Pranav Rajpurkar, Robin Jia, and Percy Liang. Know what you don’t know: Unanswerable questions for squad. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, ACL 2018, Melbourne, Australia, July 15-20, 2018, Volume 2: Short Papers, pp. 784– 789, 2018. URL https://aclanthology.info/papers/P18-2124/p18-2124. ",
1564
+ "bbox": [
1565
+ 173,
1566
+ 535,
1567
+ 825,
1568
+ 593
1569
+ ],
1570
+ "page_idx": 11
1571
+ },
1572
+ {
1573
+ "type": "text",
1574
+ "text": "Marc-Antoine Rondeau and Timothy J. Hazen. Systematic error analysis of the stanford question answering dataset. In Proceedings of the Workshop on Machine Reading for Question Answering@ACL 2018, Melbourne, Australia, July 19, 2018, pp. 12–20, 2018. URL https: //aclanthology.info/papers/W18-2602/w18-2602. ",
1575
+ "bbox": [
1576
+ 173,
1577
+ 598,
1578
+ 825,
1579
+ 656
1580
+ ],
1581
+ "page_idx": 11
1582
+ },
1583
+ {
1584
+ "type": "text",
1585
+ "text": "Mrinmaya Sachan and Eric P. Xing. Self-training for jointly learning to ask and answer questions. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2018, New Orleans, Louisiana, USA, June 1-6, 2018, Volume 1 (Long Papers), pp. 629–640, 2018. URL https: //aclanthology.info/papers/N18-1058/n18-1058. ",
1586
+ "bbox": [
1587
+ 173,
1588
+ 662,
1589
+ 825,
1590
+ 733
1591
+ ],
1592
+ "page_idx": 11
1593
+ },
1594
+ {
1595
+ "type": "text",
1596
+ "text": "Min Joon Seo, Aniruddha Kembhavi, Ali Farhadi, and Hannaneh Hajishirzi. Bidirectional attention flow for machine comprehension. CoRR, abs/1611.01603, 2016. URL http://arxiv.org/ abs/1611.01603. ",
1597
+ "bbox": [
1598
+ 171,
1599
+ 739,
1600
+ 823,
1601
+ 782
1602
+ ],
1603
+ "page_idx": 11
1604
+ },
1605
+ {
1606
+ "type": "text",
1607
+ "text": "Yelong Shen, Po-Sen Huang, Jianfeng Gao, and Weizhu Chen. Reasonet: Learning to stop reading in machine comprehension. In Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Halifax, NS, Canada, August 13 - 17, 2017, pp. 1047–1055, 2017. URL http://doi.acm.org/10.1145/3097983.3098177. ",
1608
+ "bbox": [
1609
+ 174,
1610
+ 790,
1611
+ 825,
1612
+ 847
1613
+ ],
1614
+ "page_idx": 11
1615
+ },
1616
+ {
1617
+ "type": "text",
1618
+ "text": "Sainbayar Sukhbaatar, Arthur Szlam, Jason Weston, and Rob Fergus. End-to-end memory networks. In Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada, pp. 2440–2448, 2015. URL http://papers.nips.cc/paper/ 5846-end-to-end-memory-networks. ",
1619
+ "bbox": [
1620
+ 174,
1621
+ 854,
1622
+ 823,
1623
+ 924
1624
+ ],
1625
+ "page_idx": 11
1626
+ },
1627
+ {
1628
+ "type": "text",
1629
+ "text": "Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. Sequence to sequence learning with neural networks. In Advances in Neural Information Processing Systems 27: Annual Conference on Neural Information Processing Systems 2014, December 8-13 2014, Montreal, Quebec, Canada, pp. 3104–3112, 2014. URL http://papers.nips.cc/paper/ 5346-sequence-to-sequence-learning-with-neural-networks. ",
1630
+ "bbox": [
1631
+ 174,
1632
+ 103,
1633
+ 825,
1634
+ 174
1635
+ ],
1636
+ "page_idx": 12
1637
+ },
1638
+ {
1639
+ "type": "text",
1640
+ "text": "Charles A. Sutton and Andrew McCallum. An introduction to conditional random fields. Foundations and Trends in Machine Learning, 4(4):267–373, 2012. URL https://doi.org/10. 1561/2200000013. ",
1641
+ "bbox": [
1642
+ 173,
1643
+ 184,
1644
+ 825,
1645
+ 226
1646
+ ],
1647
+ "page_idx": 12
1648
+ },
1649
+ {
1650
+ "type": "text",
1651
+ "text": "Duyu Tang, Nan Duan, Tao Qin, and Ming Zhou. Question answering and question generation as dual tasks. CoRR, abs/1706.02027, 2017. URL http://arxiv.org/abs/1706.02027. ",
1652
+ "bbox": [
1653
+ 173,
1654
+ 234,
1655
+ 823,
1656
+ 265
1657
+ ],
1658
+ "page_idx": 12
1659
+ },
1660
+ {
1661
+ "type": "text",
1662
+ "text": "Duyu Tang, Nan Duan, Zhao Yan, Zhirui Zhang, Yibo Sun, Shujie Liu, Yuanhua Lv, and Ming Zhou. Learning to collaborate for question answering and asking. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2018, New Orleans, Louisiana, USA, June 1-6, 2018, Volume 1 (Long Papers), pp. 1564–1574, 2018. URL https://aclanthology.info/papers/ N18-1141/n18-1141. ",
1663
+ "bbox": [
1664
+ 173,
1665
+ 273,
1666
+ 825,
1667
+ 358
1668
+ ],
1669
+ "page_idx": 12
1670
+ },
1671
+ {
1672
+ "type": "text",
1673
+ "text": "Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, 4-9 December 2017, Long Beach, CA, USA, pp. 6000–6010, 2017. URL http: //papers.nips.cc/paper/7181-attention-is-all-you-need. ",
1674
+ "bbox": [
1675
+ 174,
1676
+ 367,
1677
+ 825,
1678
+ 438
1679
+ ],
1680
+ "page_idx": 12
1681
+ },
1682
+ {
1683
+ "type": "text",
1684
+ "text": "Oriol Vinyals, Meire Fortunato, and Navdeep Jaitly. Pointer networks. In Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada, pp. 2692–2700, 2015. URL http://papers.nips.cc/paper/5866-pointer-networks. ",
1685
+ "bbox": [
1686
+ 173,
1687
+ 446,
1688
+ 825,
1689
+ 505
1690
+ ],
1691
+ "page_idx": 12
1692
+ },
1693
+ {
1694
+ "type": "text",
1695
+ "text": "Wenhui Wang, Nan Yang, Furu Wei, Baobao Chang, and Ming Zhou. Gated self-matching networks for reading comprehension and question answering. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, ACL 2017, Vancouver, Canada, July 30 - August 4, Volume 1: Long Papers, pp. 189–198, 2017. URL https://doi.org/10.18653/v1/ P17-1018. ",
1696
+ "bbox": [
1697
+ 174,
1698
+ 512,
1699
+ 825,
1700
+ 583
1701
+ ],
1702
+ "page_idx": 12
1703
+ },
1704
+ {
1705
+ "type": "text",
1706
+ "text": "Zhiguo Wang, Haitao Mi, Wael Hamza, and Radu Florian. Multi-perspective context matching for machine comprehension. CoRR, abs/1612.04211, 2016. URL http://arxiv.org/abs/ 1612.04211. ",
1707
+ "bbox": [
1708
+ 171,
1709
+ 593,
1710
+ 825,
1711
+ 636
1712
+ ],
1713
+ "page_idx": 12
1714
+ },
1715
+ {
1716
+ "type": "text",
1717
+ "text": "Dirk Weissenborn, Georg Wiese, and Laura Seiffe. Making neural QA as simple as possible but not simpler. In Proceedings of the 21st Conference on Computational Natural Language Learning (CoNLL 2017), Vancouver, Canada, August 3-4, 2017, pp. 271–280, 2017. URL https:// doi.org/10.18653/v1/K17-1028. ",
1718
+ "bbox": [
1719
+ 173,
1720
+ 645,
1721
+ 825,
1722
+ 702
1723
+ ],
1724
+ "page_idx": 12
1725
+ },
1726
+ {
1727
+ "type": "text",
1728
+ "text": "Caiming Xiong, Victor Zhong, and Richard Socher. $\\mathrm { D C N + }$ : mixed objective and deep residual coattention for question answering. CoRR, abs/1711.00106, 2017. URL http://arxiv. org/abs/1711.00106. ",
1729
+ "bbox": [
1730
+ 173,
1731
+ 710,
1732
+ 825,
1733
+ 753
1734
+ ],
1735
+ "page_idx": 12
1736
+ },
1737
+ {
1738
+ "type": "text",
1739
+ "text": "Adams Wei Yu, David Dohan, Minh-Thang Luong, Rui Zhao, Kai Chen, Mohammad Norouzi, and Quoc V. Le. Qanet: Combining local convolution with global self-attention for reading comprehension. CoRR, abs/1804.09541, 2018. URL http://arxiv.org/abs/1804.09541. ",
1740
+ "bbox": [
1741
+ 174,
1742
+ 763,
1743
+ 823,
1744
+ 806
1745
+ ],
1746
+ "page_idx": 12
1747
+ },
1748
+ {
1749
+ "type": "text",
1750
+ "text": "Lei Yu, Phil Blunsom, Chris Dyer, Edward Grefenstette, and Tomas Kocisk ´ y. The neural noisy ´ channel. CoRR, abs/1611.02554, 2016. URL http://arxiv.org/abs/1611.02554. ",
1751
+ "bbox": [
1752
+ 169,
1753
+ 815,
1754
+ 823,
1755
+ 844
1756
+ ],
1757
+ "page_idx": 12
1758
+ },
1759
+ {
1760
+ "type": "text",
1761
+ "text": "Xingdi Yuan, Tong Wang, C¸ aglar Gulc¸ehre, Alessandro Sordoni, Philip Bachman, Saizheng Zhang, ¨ Sandeep Subramanian, and Adam Trischler. Machine comprehension by text-to-text neural question generation. In Proceedings of the 2nd Workshop on Representation Learning for NLP, Rep4NLP@ACL 2017, Vancouver, Canada, August 3, 2017, pp. 15–25, 2017. URL https: //aclanthology.info/papers/W17-2603/w17-2603. ",
1762
+ "bbox": [
1763
+ 174,
1764
+ 854,
1765
+ 825,
1766
+ 924
1767
+ ],
1768
+ "page_idx": 12
1769
+ },
1770
+ {
1771
+ "type": "text",
1772
+ "text": "Bolei Zhou, Yuandong Tian, Sainbayar Sukhbaatar, Arthur Szlam, and Rob Fergus. Simple baseline for visual question answering. CoRR, abs/1512.02167, 2015. URL http://arxiv.org/ abs/1512.02167. ",
1773
+ "bbox": [
1774
+ 174,
1775
+ 103,
1776
+ 823,
1777
+ 145
1778
+ ],
1779
+ "page_idx": 13
1780
+ },
1781
+ {
1782
+ "type": "text",
1783
+ "text": "A TRAINING DETAILS ",
1784
+ "text_level": 1,
1785
+ "bbox": [
1786
+ 176,
1787
+ 172,
1788
+ 375,
1789
+ 189
1790
+ ],
1791
+ "page_idx": 13
1792
+ },
1793
+ {
1794
+ "type": "text",
1795
+ "text": "A.1 SQUAD MODEL ",
1796
+ "text_level": 1,
1797
+ "bbox": [
1798
+ 176,
1799
+ 203,
1800
+ 331,
1801
+ 218
1802
+ ],
1803
+ "page_idx": 13
1804
+ },
1805
+ {
1806
+ "type": "text",
1807
+ "text": "Pre-processing Questions and answers were tokenized with a simple rule-based tokenizer. We ignored training examples whose answers did not correspond to words in our tokenization. We also found it helpful to append the article title as an additional sentence at the end of paragraphs, as frequently question words make use of an entity mentioned in the title that is not in the paragraph. Finally, we replace question words with similar words from the context (based on sharing word stems or low edit distance), which makes it easier for the model to explain rare words and typographical errors in questions by using the pointer mechanism. ",
1808
+ "bbox": [
1809
+ 173,
1810
+ 229,
1811
+ 825,
1812
+ 327
1813
+ ],
1814
+ "page_idx": 13
1815
+ },
1816
+ {
1817
+ "type": "text",
1818
+ "text": "Architecture The encoder contains 2 answer-independent LSTM layers and 3 answer-dependent LSTM layers, all of hidden size 128. The decoder contains 9 blocks, all with hidden size $d = 2 5 6$ . We apply dropout $( p = 0 . 5 5 )$ to contextualised word representations, after encoder LSTM layers and after each decoder block (before residual connects). We also used word level dropout after contextualised embeddings for each encoder $( p = 0 . 1 )$ ) and decoder word $( p = 0 . 2 5 )$ ), and disallow use of the pointer mechanism with $p = 0 . 2 5$ . All dropout masks are fixed across time-steps (Gal & Ghahramani, 2016). ",
1819
+ "bbox": [
1820
+ 174,
1821
+ 343,
1822
+ 825,
1823
+ 440
1824
+ ],
1825
+ "page_idx": 13
1826
+ },
1827
+ {
1828
+ "type": "text",
1829
+ "text": "Optimisation We train generatively with batches of 10 documents, using a cosine learning rate schedule with a period of 1 epoch, warming up over the first 5 epochs to a maximum learning rate of $1 0 ^ { - 4 }$ . During fine-tuning, we freeze the answer-independent context encoding and $p ( a | c )$ model, which both reduces memory requirements and makes learning more stable. If the correct answer is not in the beam, we make no update. Fine tuning uses stochastic gradient descent with single question batches, learning rate $5 * \\bar { 1 } 0 ^ { - 5 }$ , and momentum 0.97. ",
1830
+ "bbox": [
1831
+ 174,
1832
+ 455,
1833
+ 825,
1834
+ 540
1835
+ ],
1836
+ "page_idx": 13
1837
+ },
1838
+ {
1839
+ "type": "text",
1840
+ "text": "A.2 CLEVR MODEL ",
1841
+ "text_level": 1,
1842
+ "bbox": [
1843
+ 176,
1844
+ 556,
1845
+ 333,
1846
+ 570
1847
+ ],
1848
+ "page_idx": 13
1849
+ },
1850
+ {
1851
+ "type": "text",
1852
+ "text": "Architecture All hidden layers in the encoder have size 128. We use 3 blocks of convolution, batch normalisation, and ReLU activations. The first block uses a 1x1 convolution to project the pre-trained features to size 128, and the other blocks use 3x3 convolutions. We apply dropout with rate 0.1 to the pre-trained image features. In the decoder we use a dimension $d = 2 5 6$ with 6 decoder blocks, with dropout $\\cdot p = 0 . 2 5 ,$ ) before residual connections. ",
1853
+ "bbox": [
1854
+ 174,
1855
+ 582,
1856
+ 825,
1857
+ 651
1858
+ ],
1859
+ "page_idx": 13
1860
+ },
1861
+ {
1862
+ "type": "text",
1863
+ "text": "Optimisation We optimise with stochastic gradient descent with momentum 0.9, with an initial learning rate of 0.025 which is decayed by a factor of 5 when there is no improvement for 10 epochs. For generative training we use batch size 1024. For fine tuning, we use initial learning rate 0.001 and batch size 32. ",
1864
+ "bbox": [
1865
+ 174,
1866
+ 667,
1867
+ 823,
1868
+ 723
1869
+ ],
1870
+ "page_idx": 13
1871
+ }
1872
+ ]
parse/train/Bkx0RjA9tX/Bkx0RjA9tX_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Bkx0RjA9tX/Bkx0RjA9tX_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ByMHvs0cFQ/ByMHvs0cFQ_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ByMHvs0cFQ/ByMHvs0cFQ_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/H1lS8oA5YQ/H1lS8oA5YQ.md ADDED
@@ -0,0 +1,393 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # FEATURE ATTRIBUTION AS FEATURE SELECTION
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ Feature attribution methods identify “relevant” features as an explanation of a complex machine learning model. Several feature attribution methods have been proposed; however, only a few studies have attempted to define the “relevance” of each feature mathematically. In this study, we formalize the feature attribution problem as a feature selection problem. In our proposed formalization, there arise two possible definitions of relevance. We name the feature attribution problems based on these two relevances as Exclusive Feature Selection (EFS) and Inclusive Feature Selection (IFS). We show that several existing feature attribution methods can be interpreted as approximation algorithms for EFS and IFS. Moreover, through exhaustive experiments, we show that IFS is better suited as the formalization for the feature attribution problem than EFS.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Feature attribution methods (Simonyan et al., 2013; Springenberg et al., 2014), or saliency maps, are one of the most popular approaches for explaining the decisions of complex machine learning models such as deep neural networks. In feature attribution, for each given instance, the feature attribution methods score how strongly each feature is relevant to the model’s decision. An informal definition of the feature attribution problem can be described as follows. We note that this definition is incomplete because the “relevance” of each feature is not defined.
12
+
13
+ Feature Attribution Problem Given the model $f$ and the target input $x \in \mathbb { R } ^ { d }$ to be explained, score $s _ { i } \in \mathbb { R }$ to each feature $x _ { i }$ $( i = 1 , 2 , \ldots , d )$ so that $s _ { i } \geq s _ { j }$ if the feature $x _ { i }$ is more relevant to the model’s decision than the feature $x _ { j }$ .
14
+
15
+ With feature attribution methods, the relevant features can be obtained as explanations why the models made certain decisions. For example, in image recognition, feature attribution methods highlight pixels which the models have focused on, by scoring the relevance of each pixel (Simonyan et al., 2013; Springenberg et al., 2014; Bach et al., 2015; Smilkov et al., 2017), and in text classification, they detect the set of words or sentences relevant to the model’s decision by scoring each word or sentence (Ding et al., 2017; Chen et al., 2018).
16
+
17
+ The major approaches for feature attribution are based on gradient and its modifications (Simonyan et al., 2013; Springenberg et al., 2014; Bach et al., 2015; Smilkov et al., 2017; Shrikumar et al., 2017) and feature occlusions (Zeiler & Fergus, 2014; Zhou et al., 2014).
18
+
19
+ Most of the studies proposed computational algorithms without defining the “relevance” mathematically (except for some axiomatic approaches (Sundararajan et al., 2017; Lundberg & Lee, 2017)). This means that it is not clear what these algorithm outputs, and we cannot compare these outputs rigorously. To clarify the situation and to establish solid feature attribution methods, we pose the following research questions: (Q1) how can we define relevance? (Q2) is there a general framework for the relevance that induces existing feature attribution methods? and (Q3) what is an appropriate definition of relevance?
20
+
21
+ In this study, we formalize the feature attribution problem as feature selection problem, and thereby answer questions (Q1)–(Q3). In our proposed formalization, there arise two possible definitions of relevance. We name the feature attribution problems based on these two relevances as Exclusive Feature Selection (EFS) and Inclusive Feature Selection (IFS).
22
+
23
+ Below, we summarize our contributions.
24
+
25
+ ![](images/c0fa6b6e8aa8cfcd9d6cca7958837340fe672352ebe8995d2ec037d82fc1c8a8.jpg)
26
+ Figure 1: Reorganizing feature attribution methods as Exclusive Feature Selection (EFS) and Inclusive Feature Selection (IFS). See the references for the details of each method: Grad (Simonyan et al., 2013), Grad $. \times$ Input (Shrikumar et al., 2016), IntGrad (Sundararajan et al., 2017), SmoothGrad (Smilkov et al., 2017; Hooker et al., 2018), LIME (Ribeiro et al., 2016), SHAP (Lundberg & Lee, 2017), GuidedBP (Springenberg et al., 2014), ExciteBP (Zhang et al., 2016), LRP (Bach et al., 2015), DeepTaylor (Montavon et al., 2017), DeepLIFT (Shrikumar et al., 2017), Occlusion (Zeiler & Fergus, 2014), Detector (Zhou et al., 2014), Anchor (Ribeiro et al., 2018), Meaningful Perturbation (Fong & Vedaldi, 2017), and PertMap (Hara et al., 2018; Ikeno & Hara, 2018)
27
+
28
+ Answer to Q1: We introduce two formalizations, namely EFS and IFS (Section 2). We formalize the feature attribution problem as feature selection problem, because the goal of feature attribution is to identify the relevant features to the model’s decision. Here, we point out that there are two possible approaches for characterizing the relevance of the features. In the first approach, EFS, we exclude some features from the model, and if the model’s decision changes by the exclusion, we infer the excluded features are relevant since they have certain impacts to the decision. In the second approach, IFS, we include some features to the model, and if the model’s decision remains unchanged after the inclusion, we infer the included features are relevant since they are essential to the decision.
29
+
30
+ Answer to Q2: The existing methods are based on the relevances of EFS and IFS (Section 3). We show that several existing feature attribution methods can be interpreted as approximation algorithms for EFS or IFS, as summarized in Figure 1. For example, the gradient-based methods are one-step gradient descent for the continuous relaxation of EFS and IFS.
31
+
32
+ Answer to Q3: The relevance based on IFS is better suited for the feature attribution problem (Section 5). We observe that IFS is better suited as the formalization for the feature attribution problem than EFS. Through exhaustive experiments, we found two crucial properties of EFS. First, the optimal solution to EFS is very similar to adversarial example (Szegedy et al., 2013). As adversarial examples generally provide seemingly meaningless attributions, they are not appropriate for the purpose of explanation. Second, we empirically observe that even a random attribution can perform comparably well with some of the existing feature attribution methods under the evaluation based on EFS. This observation indicates that there are only subtle differences between good attributions and random attributions under EFS. In contrast, unlike EFS, IFS has no trivial drawbacks, and we argue that IFS would be an appropriate formalization for the feature attribution problem.
33
+
34
+ In this paper, we use the following notation, and consider the problem setting as follows.
35
+
36
+ Notation For any positive integer $d , \ [ d ]$ denotes the set $[ d ] ~ = ~ \{ 1 , 2 , \ldots , d \}$ . We denote $d$ - dimensional vectors with all zeros as $0 _ { d }$ . For a proposition $a$ , $\mathbb { I } ( a )$ denotes the indicator of $a$ , i.e., $\mathbb { I } ( a ) = 1$ if $a$ is true, and $\mathbb { I } ( a ) = 0$ if $a$ is false.
37
+
38
+ Settings In this paper, we consider the classification model $f$ for $C$ categories that return an output $y \in \breve { \mathbb { R } } ^ { C }$ for a given data $\boldsymbol { x } ~ \in ~ \mathbb { R } ^ { d }$ , i.e., $y \ = \ f ( x )$ . The classification result is determined by $c = \operatorname { a r g m a x } _ { j } y _ { j }$ where $y _ { j } = f _ { j } ( x )$ is the $j$ -th element of the output. We assume that the model $f$ is differentiable with respect to the input $x$ : the target models therefore include linear models, kernel models with differentiable kernels, and deep neural networks. We assume that the model $f$ and the target input $x$ to be explained are given and fixed.
39
+
40
+ # 2 FEATURE ATTRIBUTION AS FEATURE SELECTION
41
+
42
+ (Q1) How can we define the relevance?
43
+
44
+ As an answer to this question, we formalize the feature attribution problem as feature selection problem, and introduce two definitions of relevance.
45
+
46
+ Before formalizing the problem, we introduce the idea of data corruption (Samek et al., 2017; Fong & Vedaldi, 2017), which plays an important role in this study. Here, we consider corrupting the input data $x$ by overlaying partial features with a noise $r \in \mathbb { R } ^ { d }$ , as follows.
47
+
48
+ Definition 2.1 (Data Corruption). For a vector $x \in \mathbb { R } ^ { d }$ , the corruption of $x$ with the set $S \subseteq [ d ]$ and the vector $r \in { \mathbb { R } ^ { d } }$ is given by $x _ { S , r }$ , which is defined below.
49
+
50
+ $$
51
+ ( x _ { S , r } ) _ { i } = \left\{ { r _ { i } \mathrm { \quad ~ i f ~ } i \in S } , \right.
52
+ $$
53
+
54
+ We refer to the set $S$ as corrupted features.
55
+
56
+ Here, we assume that the noise $r$ follows a distribution $p ( r )$ . In Section 5, we introduce two types of noises $r$ for the images; we overlay the image to be explained with random noises and random real images.
57
+
58
+ We now consider the problem formalization. Recall that the objective of feature attribution is to provide high scores to relevant features to the model’s decision and low scores to irrelevant features. Our idea is to define the relevance and irrelevance using data corruption. Specifically, in this study, we consider two types of feature selection problems based on data corruption. We name those two problems as Exclusive Feature Selection (EFS) and Inclusive Feature Selection (IFS).
59
+
60
+ # 2.1 EXCLUSIVE FEATURE SELECTION (EFS)
61
+
62
+ One way of measuring the relevance of features is to corrupt some of the features by overlaying with uninformative values and observe how the model’s decision changes. If the corruption of certain features leads to a decision change, such features can be considered as “relevant”. We note that corrupting many features easily leads to a decision change. Therefore, our focus is mainly on a small number of crucial features that can change the decision. We formalize this idea as Exclusive Feature Selection (EFS). In EFS, we aim at changing the decision of the model $f$ to a class different from $c$ by corrupting only a small number of features. See Figure 2 for the idea of EFS. The idea of EFS was originally proposed for measuring the performance of feature attribution methods (Samek et al., 2017). Here, we define EFS as follows.
63
+
64
+ Definition 2.2 (Exclusive Feature Selection (EFS)). Find the feature corruption $S \subseteq [ d ]$ such that (i) the number of corrupted features $| S |$ is small, and (ii) the corrupted data $x _ { S , r }$ has small intensity at class $c$ , i.e. $f _ { c } ( x _ { S , r } )$ is small, so that the corrupted data is classified into a different class.
65
+
66
+ $$
67
+ \begin{array} { r } { S _ { \mathrm { E F S } } : = \mathrm { a r g m i n } _ { S \subseteq [ d ] } | S | + \lambda \mathbb { E } _ { r } [ f _ { c } ( x _ { S , r } ) ] , } \end{array}
68
+ $$
69
+
70
+ where $\mathbb { E } _ { r }$ denotes the expectation over the noise $r$ , and $\lambda > 0$ is a weight parameter determined by the user.
71
+
72
+ In this definition, we consider the expected intensity $\mathbb { E } _ { r } [ f _ { c } ( x _ { S , r } ) ]$ over the noise $r$ so to avoid the corruption to overfit a specific realization of the noise $r$ .
73
+
74
+ By using the solution of EFS, we can define relevance as a binary score as follows. That is, in EFS, the relevant features are the ones when excluded from the data lead to the model’s decision change.
75
+
76
+ Definition 2.3 (EFS-Relevance). The relevance of each feature $x _ { i }$ is defined by $s _ { i } : = \mathbb { I } ( i \in S _ { \mathrm { E F S } } )$
77
+
78
+ ![](images/c1abffe631b4af9e961d14fb33f1ae5d1263a08639de15355d9f2b915d6321f6.jpg)
79
+ Figure 2: The idea of EFS: Within the trade-off between intensity $\mathbb { E } _ { r } [ f _ { c } ( x _ { S , r } ) ]$ and the number of corrupted features $| S |$ , find $S$ that minimizes the intensity and its size. The red pixels indicate the corrupted features $S$ . The corrupted features $S$ in the second image is optimal in this curve.
80
+
81
+ ![](images/acb2c47a5e2b29a0481ba61d33e14871d810f97cb4f67d1088a918362c2639a4.jpg)
82
+ Figure 3: The idea of IFS: Within the trade-off between intensity $\mathbb { E } _ { r } [ f _ { c } ( x _ { S , r } ) ]$ and the number of corrupted features $| S |$ , find $S$ that maximizes the intensity and its size. The red pixels indicate the corrupted features $S$ . The corrupted features $S$ in the fourth image is optimal in this curve.
83
+
84
+ # 2.2 INCLUSIVE FEATURE SELECTION (IFS)
85
+
86
+ Data corruption can be used for measuring the relevance of features in a way different from that of EFS. If the corruption of certain features does not change the model’s decision, such features can be considered as “irrelevant”. We note that zero corruption trivially keeps the decision unchanged. Therefore, our focus is mainly on a small number of crucial features that have to be kept to maintain the decision. Therefore, in Inclusive Feature Selection, we aim at maintaining the decision of the model $f$ in the class $c$ while corrupting as many features as possible. See Figure 3 for the idea of IFS. Here, we formally define IFS as follows.
87
+
88
+ Definition 2.4 (Inclusive Feature Selection (IFS)). Find the feature corruption $S \subseteq [ d ]$ such that (i) the number of corrupted features $| S |$ is large, and (ii) the corrupted data $x _ { S , r }$ has high intensity at class $c$ , i.e. $f _ { c } ( x _ { S , r } )$ is large, so that the corrupted data is classified to the class $c$ .
89
+
90
+ $$
91
+ \begin{array} { r } { S _ { \mathrm { I F S } } : = \mathrm { a r g m a x } _ { S \subseteq [ d ] } | S | + \lambda \mathbb { E } _ { r } [ f _ { c } ( x _ { S , r } ) ] . } \end{array}
92
+ $$
93
+
94
+ By using the solution of IFS, we can define relevance as follows. In IFS, the relevant features are the ones that when included in the data keep the model’s decision unchanged.
95
+
96
+ Definition 2.5 (IFS-Relevance). The relevance of each feature $x _ { i }$ is defined by $s _ { i } : = \mathbb { I } ( i \notin S _ { \mathrm { I F S } } )$ .
97
+
98
+ # 3 FEATURE ATTRIBUTION METHODS AS EFS AND IFS
99
+
100
+ (Q2) Is there a general framework for the relevance that induces existing feature attribution methods?
101
+
102
+ As an answer to this question, we show that the existing feature attribution methods can be interpreted as approximation algorithms for EFS or IFS. Thus, the relevances considered in the existing methods are approximated versions of EFS-Relevance and IFS-Relevance. To show this, we classify the existing methods into three types of approaches for solving EFS and IFS: occlusion-based, optimization-based, and gradient-based. See Figure 1 for the overview.
103
+
104
+ # 3.1 OCCLUSION-BASED APPROACHES
105
+
106
+ Occlusion-based feature attribution methods (Zeiler & Fergus, 2014; Zhou et al., 2014; Ribeiro et al., 2018) measure the relevance by partially masking features. In those methods, the features are masked by sliding windows or patches, and the change of the output $f _ { c }$ is computed. This can be interpreted as an approximation algorithm for solving the problems (2.2) and (2.3). Instead of searching over exponentially large solution candidates $S \subseteq [ d ]$ , those methods search only over the subset of the solution candidates. For example, one prepares a set of feature subsets $\{ S _ { m } : S _ { m } \subseteq$ $[ d ] \} _ { m = 1 } ^ { M }$ , and searches for an optimal combination of the subsets by using a greedy algorithm (Zhou14) or by a bandit algorithm (Ribeiro et al., 2018).
107
+
108
+ # 3.2 OPTIMIZATION-BASED APPROACHES
109
+
110
+ In order to introduce the optimization-based feature attribution methods, we consider the continuous relaxation of EFS and IFS, as follows.
111
+
112
+ Definition 3.1 (Continuous Corruption). For a vector $x \in \mathbb { R } ^ { d }$ , the continuous corruption of $x$ with the vector $w \in [ 0 , 1 ] ^ { d }$ and the vector $r \in \mathbb { R } ^ { d }$ is given by $\bar { x } _ { w , r }$ , which is defined below.
113
+
114
+ $$
115
+ ( \bar { x } _ { w , r } ) _ { i } = ( 1 - w _ { i } ) x _ { i } + w _ { i } r _ { i } .
116
+ $$
117
+
118
+ Here, the vector $w$ can be interpreted as the continuous relaxation of the indicator of the set $S$ .
119
+
120
+ Definition 3.2 (Continuous EFS (C-EFS)). Find the vector $w \in [ 0 , 1 ] ^ { d }$ such that (i) the amount of corruption $\textstyle \sum _ { i = 1 } ^ { d } w _ { i }$ is small, and (ii) the corrupted data $\bar { x } _ { w , r }$ has small intensity at class $c$ :
121
+
122
+ $$
123
+ \begin{array} { r } { w _ { \mathrm { E F S } } : = \operatorname * { a r g m i n } _ { w \in [ 0 , 1 ] ^ { d } } \sum _ { i = 1 } ^ { d } w _ { i } + \lambda \mathbb { E } _ { r } [ f _ { c } ( \bar { x } _ { w , r } ) ] . } \end{array}
124
+ $$
125
+
126
+ Definition 3.3 (Continuous IFS (C-IFS)). Find the vector $w \in [ 0 , 1 ] ^ { d }$ such that (i) the amount of corruption $\textstyle \sum _ { i = 1 } ^ { d } w _ { i }$ is large, and (ii) the corrupted data $\bar { x } _ { w , r }$ has large intensity at class $c$ :
127
+
128
+ $$
129
+ \begin{array} { r } { w _ { \mathrm { I F S } } : = \operatorname * { a r g m a x } _ { w \in [ 0 , 1 ] ^ { d } } \sum _ { i = 1 } ^ { d } w _ { i } + \lambda \mathbb { E } _ { r } [ f _ { c } ( \bar { x } _ { w , r } ) ] . } \end{array}
130
+ $$
131
+
132
+ For C-EFS and C-IFS, the feature attribution scores can be defined as $s _ { i } = w _ { \mathrm { E F S } , i }$ and $s _ { i } = 1 -$ $w _ { \mathrm { I F S } , i }$ , respectively. We note that, for a differentiable model $f$ , the objective functions of C-EFS (3.2) and C-IFS (3.3) are differentiable. Therefore, these problems can be solved using gradientbased optimization methods such as SGD and Adam (Kingma & Ba, 2014).
133
+
134
+ Fong & Vedaldi (2017) first introduced the formulation of C-EFS, and they proposed Meaningful Perturbation by adding a smoothness penalty term to C-EFS. PertMap (Hara et al., 2018; Ikeno & Hara, 2018), another optimization-based method, can be interpreted as a variant of C-IFS. PertMap is equivalent to C-IFS with the term $\mathbb { E } _ { r } [ f _ { c } ( \bar { x } _ { w , r } ) ]$ replaced with the hinge penalty term $\begin{array} { r } { \sum _ { j \neq c } \bar { \mathbb { E } } _ { r } [ \operatorname* { m i n } ( 0 , f _ { c } ( \bar { x } _ { w , r } ) - f _ { j } ( \bar { x } _ { w , r } ) ) ] } \end{array}$ that penalizes $w$ only when the corrupted data is classified into other classes. See Appendix A for the detail.
135
+
136
+ # 3.3 GRADIENT-BASED APPROACHES
137
+
138
+ Many feature attribution methods are based on the gradient of the model’s output ∂fc(x) . ∂xi Here, we point out that those gradient-based feature attribution methods can be interpreted as one-step gradient descent/ascent approximations for C-EFS and C-IFS. If we consider solving the problems (3.2) and (3.3) using gradient descent/ascent with the initial $w$ set to zeros, i.e. $w = 0 _ { d }$ , then, the first step of the optimization can be expressed as $\begin{array} { r } { w _ { i } 0 \pm \eta \{ \mathbb { E } _ { r } [ \frac { \partial f _ { c } ( \bar { x } _ { w , r } ) } { \partial w _ { i } } \Big | _ { w = 0 _ { d } } ] + \lambda \} \propto } \end{array}$ $\begin{array} { r } { \frac { \partial f _ { c } ( x ) } { \partial x _ { i } } ( \mu _ { i } - x _ { i } ) + \lambda } \end{array}$ , where $\eta > 0$ is the step size and $\mu _ { i } : = \mathbb { E } _ { r } [ r _ { i } ]$ . Here, because the penalty $\lambda$ and the step size $\eta$ are common across all the features, ${ \frac { \partial f _ { c } ( x ) } { \partial x _ { i } } } ( \mu _ { i } - x _ { i } )$ is the essential term that determines the size of $w _ { i }$ . This finding naturally connects EFS/IFS and the gradient-based feature attribution methods. See Appendix $\mathbf { B }$ for the details.
139
+
140
+ # 4 EFS AND IFS AS EVALUATION METRIC
141
+
142
+ The ideas of EFS and IFS can be used as metrics for evaluating the performance of feature attribution methods. Suppose that the feature attribution score $s \in \mathbb { R } ^ { d }$ is given.
143
+
144
+ EFS-based Metric The principle of EFS is that “crucial attribution should change the model’s decision by corrupting only a small number of relevant features”. For $q \in [ 0 , 1 ]$ , let the set of the top- $100 q \%$ relevant features be $S _ { q } : = \{ i : s _ { i } \geq t _ { q } \}$ , where $t _ { q }$ is the $1 0 0 q$ -th largest percentile in $s$ so that $| S _ { q } | = q d$ . Then, we can draw a curve showing the trade-off between the ratio of corrupted relevant features and the degree of the output change (Samek et al., 2017). For example, as the degree of the output changes, we can use the expected difference in intensity: $g _ { c } ^ { \mathrm { i n t e n s i t y } } ( \bar { S _ { q } } ) : = \mathbb { E } _ { r } [ f _ { c } ( \bar { x } ) -$ $f _ { c } ( x _ { S _ { q } , r } ) ]$ , and the probability of label mismatch: $g _ { c } ^ { \mathrm { l a b e l } } ( S _ { q } ) : = \mathbb { E } _ { r } [ \mathbb { I } ( c \neq \operatorname { a r g m a x } _ { j } f _ { j } ( x _ { S _ { q } , r } ) ) ]$ . The trade-off curve usually shows an increasing trend, and the area under the curve can be used as a measure of how quickly the output changes with an increase in the ratio of corrupted features (see Figure 4). In this paper, we refer to this area as Area Under the EFS-Curve (AUEC).
145
+
146
+ IFS-based Metric The principle of IFS is that “crucial attribution should maintain the model’s output even if many irrelevant features are corrupted”. Similar to EFS, we can construct an IFSbased metric based on this principle. Let $S _ { q } : = \{ i : s _ { i } \geq t _ { q } \}$ be the top- $100 q \%$ relevant features, as defined above. We then corrupt irrelevant features other than $S _ { q }$ , i.e. $\bar { S } _ { q } : = [ d ] \setminus S _ { q }$ . We can then draw a curve showing the trade-off between the ratio of corrupted irrelevant features and the degree of the output change such as $g _ { c } ^ { \mathrm { i n t e n s i t y } } \left( \bar { S } _ { q } \right)$ and $g _ { c } ^ { \mathrm { l a b e l } } ( \bar { S } _ { q } )$ . The trade-off curve usually shows an increasing trend with an increase in the ratio of corrupted features (see Figure 4). Therefore, the area over the curve can be used as a measure of how resistant the model’s decision is against the feature corruption. In this paper, we refer to this area as Area Over the IFS-Curve (AOIC).
147
+
148
+ # 5 EFS VS. IFS
149
+
150
+ # (Q3) What is an appropriate definition of relevance?
151
+
152
+ To answer this question, we compare EFS and IFS through exhaustive experiments. Our results indicate that EFS has several drawbacks, and we therefore argue that IFS-Relevance is better suited for the feature attribution problem.
153
+
154
+ # 5.1 EXPERIMENTAL SETUP
155
+
156
+ Models and Data As the target model $f$ to be explained, we adopted three pre-trained models, namely VGG16 (Simonyan & Zisserman, 2014), ResNet V2 with depth 152 (He et al., 2016), and Inception V3 (Szegedy et al., 2016), which were distributed at the Tensorflow repository1. As the target data $x$ to be explained, we selected 200 images from the validation set at ILSVRC2014 (Russakovsky et al., 2014) which were correctly classified by the three models.
157
+
158
+ Feature Attribution Methods In the experiments, we adopted several feature attribution methods for comparison: Grad (Simonyan et al., 2013), Grad $\times$ Input (Shrikumar et al., 2016), GuidedBP (Springenberg et al., 2014), SmoothGrad (Smilkov et al., 2017; Hooker et al., 2018), IntGrad (Sundararajan et al., 2017), LRP (Bach et al., 2015), DeepLIFT (Shrikumar et al., 2017), Occlusion (Zeiler & Fergus, 2014), and PertMap (Hara et al., 2018; Ikeno & Hara, 2018). Grad,
159
+
160
+ Grad $\times$ Input, GuidedBP, SmoothGrad, and IntGrad were implemented using saliency2 with default settings, and LRP, DeepLIFT, and Occlusion were implemented using DeepExplain3, where we set the mask size for Occlusion as $6 4 \times 6 4$ with the stride set to 16. We implemented PertMap based on the sample code4. We also adopted random attribution as the baseline where the score for each feature was generated uniformly random over $[ 0 , 1 ]$ .
161
+
162
+ In addition to the existing feature attribution methods, we implemented the following EFS-based and IFS-based methods: Greedy-EFS, which solves the problem (2.2) using a greedy algorithm; GradEFS, which solves the problem (3.2) using gradient descent; Greedy-IFS, which solves the problem (2.3) using a greedy algorithm; and Grad-IFS, which solves the problem (3.3) using gradient ascent. The details of these methods can be found in Appendix C.
163
+
164
+ Evaluation For evaluating AUEC and AOIC, we prepared two noise distributions $p ( r )$ . The first distribution is a uniform distribution: each $r$ is independently sampled from the uniform distribution over $[ 0 , 1 ] ^ { d }$ . The second distribution is a distribution over real images. We selected 100 images from the validation set at ILSVRC2014, with no overlap with the 200 images to be explained. Then, from those 100 images, we randomly selected an image as the noise $r$ . To compute AUEC and AOIC, we varied the percentile $q$ from zero to one, and for each $q$ , we computed the difference scores $g _ { c } ^ { \mathrm { l a b e l } } ( S _ { q } )$ and ${ \dot { g } } _ { c } ^ { \mathrm { l a b e l } } ( { \bar { S } } _ { q } )$ using empirical averages under those two noise distributions.
165
+
166
+ # 5.2 RESULTS
167
+
168
+ For each model, we computed the attribution scores for all 200 images using each of the 14 feature attribution methods. We then computed AUEC and AOIC under the two noise distributions.
169
+
170
+ Our main result is summarized in Table 1. Table 1 shows the AUEC and AOIC for VGG16 for the 200 images under uniform noise. We moved the results for the other models and the corruption with real images to Appendix D, as those results are similar. Here, we point out that there are three important observations in the table.
171
+
172
+ EFS found adversarial example. Grad-EFS attained the highest AUEC. This indicates that GradEFS is nearly optimal under the principle of EFS: Grad-EFS can change the model’s decision by corrupting only a small number of relevant features. Indeed, as shown in Figure 4, Grad-EFS has a sharp increase in the EFS-Curve 5. Specifically, it shows that Grad-EFS successfully changed the model’s decision for more than $80 \%$ of the data by corrupting only a few percent of the pixels. Similar tendencies were also observed for ResNet V2 and Inception V3 (see Appendix D).
173
+
174
+ An important observation is that the heatmap of Grad-EFS is just a shot noise, as shown in Figure 5. This is because EFS is very similar to adversarial example (Szegedy et al., 2013). In adversarial example, one seeks the minimum data perturbation that changes the model’s output. In EFS (2.2), instead of the data perturbation, one searches for a small number of corrupted features that reduces the class intensity. Similarly, C-EFS (3.2) searches for a continuous corruption with the minimum $\ell _ { 1 }$ norm.
175
+
176
+ Random attribution performed comparably well with existing methods. The random attribution attained AUEC similar to that of methods such as Grad $\times$ Input, IntGrad, LRP, and Occlusion, especially for VGG16. Indeed, as shown in Figure 4, the EFS-Curve of random attribution is close to those methods. It is a bit surprising to observe that we can attain a good trade-off in EFS just by randomly scoring each feature without looking at the images. This observation indicates that there are only subtle differences between good attributions and random attributions under EFS, especially for VGG16.
177
+
178
+ Grad-IFS significantly outperformed the other methods. On AOIC, Grad-IFS significantly outperformed the other methods, and PertMap attained the second best result. As shown in Figure 4, Grad-IFS is very resistant against the corruption of irrelevant features. Indeed, even if $80 \%$ of the pixels are corrupted, the model’s decision is kept unchanged for more than $80 \%$ of the images. This means that Grad-IFS is capable of identifying irrelevant features better than any other methods. Another interesting point that can be seen in Figure 4 is that, the IFS-Curves vary significantly across different methods. More importantly, unlike EFS, the IFS-Curve can distinguish random attributions and other attributions well.
179
+
180
+ Table 1: Average AUEC and AOIC under the uniform noise. The top-three scores are highlighted as ${ 1 } \mathrm { s t } ^ { * }$ , $2 \mathrm { n d } ^ { \ast \ast }$ , and $3 \mathrm { r d } ^ { * * * }$ .
181
+
182
+ <table><tr><td colspan="2">VGG16</td></tr><tr><td></td><td>AUEC AOIC 0.366</td></tr><tr><td>Greedy-EFS</td><td>0.844 0.946*</td></tr><tr><td>Grad-EFS</td><td>0.195</td></tr><tr><td>Greedy-IFS</td><td>0.746 0.622***</td></tr><tr><td>Grad-IFS</td><td>0.873 0.876*</td></tr><tr><td>Grad</td><td>0.867 0.341</td></tr><tr><td>Grad×Input</td><td>0.823 0.318</td></tr><tr><td>SmoothGrad</td><td>0.882 0.593</td></tr><tr><td>GuidedBP</td><td>0.918** 0.455</td></tr><tr><td>IntGrad</td><td>0.837 0.346</td></tr><tr><td>LRP</td><td>0.823 0.318</td></tr><tr><td>DeepLIFT</td><td>0.862 0.435</td></tr><tr><td>Occlusion</td><td>0.811 0.559</td></tr><tr><td>PertMap</td><td>0.886*** 0.780**</td></tr><tr><td>Random</td><td>0.839 0.160</td></tr></table>
183
+
184
+ ![](images/9c67eb5a490e7f726ebac40720720b6c0c1e23f12434bacb94afaaaa89859e07.jpg)
185
+ Figure 4: Average EFS-Curve and IFS-Curve.
186
+
187
+ ![](images/98ee7dd402f94319a422b6ee772a5dcad6000134361a86730d979af8ef291839.jpg)
188
+ Figure 5: Attributions on VGG16: The red colored pixels are found to be strongly relevant with each method.
189
+
190
+ Figure 5 shows the examples of the attributions obtained by each method. It is important to note that the top-three AOIC methods, namely Grad-IFS, PertMap, and SmoothGrad, have highlighted only the dog face. The high AOICs on these methods indicate that the model has made the decision based on the dog face. In contrast, the other methods tend to generate noisy attributions over the entire body of the dog, which are false explanations from the perspective of IFS because their AOICs are far smaller than that of Grad-IFS: the noisy attributions failed to capture essential pixels in the image.
191
+
192
+ # 6 CONCLUSION
193
+
194
+ In this study, we formalized the feature attribution problem as two types of feature selection problems, which we named as EFS and IFS. Based on EFS and IFS, we clarified that the existing feature attribution methods can be interpreted as approximation algorithms for EFS and IFS. Then, through exhaustive experiments, we clarified that IFS is better suited as the formalization for the feature attribution problem; we observed that EFS has several unfavorable properties and concluded that EFS is not an appropriate formalization.
195
+
196
+ # REFERENCES
197
+
198
+ Sebastian Bach, Alexander Binder, Gregoire Montavon, Frederick Klauschen, Klaus-Robert M ´ uller, ¨ and Wojciech Samek. On pixel-wise explanations for non-linear classifier decisions by layer-wise relevance propagation. PloS ONE, 10(7):e0130140, 2015.
199
+
200
+ Jianbo Chen, Le Song, Martin Wainwright, and Michael Jordan. Learning to explain: An information-theoretic perspective on model interpretation. In Proceedings of the 35th International Conference on Machine Learning, pp. 882–891, 2018.
201
+
202
+ Yanzhuo Ding, Yang Liu, Huanbo Luan, and Maosong Sun. Visualizing and understanding neural machine translation. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, pp. 1150–1159, 2017.
203
+
204
+ Ruth C Fong and Andrea Vedaldi. Interpretable explanations of black boxes by meaningful perturbation. In Proceeding of the IEEE International Conference on Computer Vision, pp. 3449 – 3457, 2017.
205
+
206
+ Satoshi Hara, Kouichi Ikeno, Tasuku Soma, and Takanori Maehara. Maximally invariant data perturbation as explanation. arXiv:1806.07004, 2018.
207
+
208
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In European conference on computer vision, pp. 630–645. Springer, 2016.
209
+
210
+ Sara Hooker, Dumitru Erhan, Pieter-Jan Kindermans, and Been Kim. Evaluating feature importance estimates. arXiv:1806.10758, 2018.
211
+
212
+ Kouichi Ikeno and Satoshi Hara. Maximizing invariant data perturbation with stochastic optimization. arXiv:1807.05077, 2018.
213
+
214
+ Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv:1412.6980, 2014.
215
+
216
+ Scott M Lundberg and Su-In Lee. A unified approach to interpreting model predictions. In Proceedings of Advances in Neural Information Processing Systems, pp. 4765–4774, 2017.
217
+
218
+ Gregoire Montavon, Sebastian Lapuschkin, Alexander Binder, Wojciech Samek, and Klaus-Robert ´ Muller. Explaining nonlinear classification decisions with deep taylor decomposition. ¨ Pattern Recognition, 65:211–222, 2017.
219
+
220
+ Marco Tulio Ribeiro, Sameer Singh, and Carlos Guestrin. Why should i trust you?: Explaining the predictions of any classifier. In Proceedings of the 22nd ACM SIGKDD international conference on knowledge discovery and data mining, pp. 1135–1144. ACM, 2016.
221
+
222
+ Marco Tulio Ribeiro, Sameer Singh, and Carlos Guestrin. Anchors: High-precision model-agnostic explanations. In Proceedings of the 32nd AAAI Conference on Artificial Intelligence, pp. 1527– 1535, 2018.
223
+
224
+ Olga Russakovsky, Sanjeev Satheesh, Jia Deng, Sean Ma, Hao Su, Zhiheng Huang, Jonathan Krause, Andrej Karpathy, Alexander C Berg, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. Technical report, 2014.
225
+
226
+ Wojciech Samek, Alexander Binder, Gregoire Montavon, Sebastian Lapuschkin, and Klaus-Robert ´ Muller. Evaluating the visualization of what a deep neural network has learned. ¨ IEEE transactions on neural networks and learning systems, 28(11):2660–2673, 2017.
227
+
228
+ Avanti Shrikumar, Peyton Greenside, Anna Shcherbina, and Anshul Kundaje. Not just a black box: Learning important features through propagating activation differences. arXiv:1605.1713, 2016.
229
+
230
+ Avanti Shrikumar, Peyton Greenside, and Anshul Kundaje. Learning important features through propagating activation differences. In Proceedings of International Conference on Machine Learning, pp. 3145–3153, 2017.
231
+
232
+ Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv:1409.1556, 2014.
233
+
234
+ Karen Simonyan, Andrea Vedaldi, and Andrew Zisserman. Deep inside convolutional networks: Visualising image classification models and saliency maps. arXiv:1312.6034, 2013.
235
+ Daniel Smilkov, Nikhil Thorat, Been Kim, Fernanda Viegas, and Martin Wattenberg. Smoothgrad: ´ removing noise by adding noise. arXiv:1706.03825, 2017.
236
+ Jost Tobias Springenberg, Alexey Dosovitskiy, Thomas Brox, and Martin Riedmiller. Striving for simplicity: The all convolutional net. arXiv:1412.6806, 2014.
237
+ Mukund Sundararajan, Ankur Taly, and Qiqi Yan. Axiomatic attribution for deep networks. arXiv:1703.01365, 2017.
238
+ Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. arXiv:1312.6199, 2013.
239
+ Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 2818–2826, 2016.
240
+ Matthew D Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In Proceedings of European Conference on Computer Vision, pp. 818–833. Springer, 2014.
241
+ Jianming Zhang, Zhe Lin, Jonathan Brandt, Xiaohui Shen, and Stan Sclaroff. Top-down neural attention by excitation backprop. In Proceedings of European Conference on Computer Vision, pp. 543–559. Springer, 2016.
242
+ Bolei Zhou, Aditya Khosla, Agata Lapedriza, Aude Oliva, and Antonio Torralba. Object detectors emerge in deep scene cnns. arXiv:1412.6856, 2014.
243
+
244
+ # SUPPLEMENTARY MATERIAL FOR “FEATURE ATTRIBUTION AS FEATURE SELECTION”
245
+
246
+ Preliminaries We define the data-dependent noise by $r _ { x }$ as follows:
247
+
248
+ $$
249
+ r _ { x } : = x + u ,
250
+ $$
251
+
252
+ where we assume that the perturbation $u$ follows a distribution $p ( u )$ with $\mathbb { E } _ { u } [ u ] = 0$ . The continuous corruption with the noise $r _ { x }$ is then expressed as
253
+
254
+ $$
255
+ ( \bar { x } _ { w , r _ { x } } ) _ { i } = ( 1 - w _ { i } ) x _ { i } + w _ { i } r _ { x , i } = x _ { i } + w _ { i } u _ { i } .
256
+ $$
257
+
258
+ That is, the continuous corruption $\hat { x } _ { w , r _ { x } }$ is centered at the data $x$ . Moreover, $\hat { x } _ { w , r _ { x } }$ distributes around $x$ with the magnitude $w$ . The data-dependent noise and this continuous corruption plays an important role when interpreting some of the existing feature attribution methods as EFS and IFS.
259
+
260
+ # A OPTIMIZATION-BASED FEATURE ATTRIBUTION METHODS AS EFS/IFS
261
+
262
+ Meaningful Perturbation (Fong & Vedaldi, 2017) is a variant of C-EFS defined below:
263
+
264
+ $$
265
+ \operatorname* { m i n } _ { w \in [ 0 , 1 ] ^ { d } } \sum _ { i = 1 } ^ { d } w _ { i } + \lambda f _ { c } ( \bar { x } _ { w , r } ) + \phi _ { \mathrm { s m o o t h } } ( w ) .
266
+ $$
267
+
268
+ The differences from C-EFS (3.2) are (i) it uses a fixed noise $r$ instead of the expectation, and (ii) the additional penalty term $\phi _ { \mathrm { s m o o t h } } ( w )$ is added so that $w$ to be smooth. Here, the smoothness penalty is essential for Meaningful Perturbation. Fong $\&$ Vedaldi (2017) have reported that the solution to the problem (A.1) without the smoothness penalty tends to be seemingly meaningless attributions. This is because C-EFS is very similar to the $\ell _ { 1 }$ penalized adversarial example, as we have discussed in Section 5. Therefore, we need to design an appropriate penalty term $\phi _ { \mathrm { s m o o t h } }$ to obtain reasonable attributions using Meaningful Perturbation.
269
+
270
+ PertMap (Hara et al., 2018; Ikeno & Hara, 2018) can be interpreted as a variant of C-IFS. PertMap finds irrelevant features by maximizing the data perturbation. Let $\hat { x } _ { w , r _ { x } }$ be the continuous corruption of the data $x$ with a data-dependent noise $r _ { x }$ , where the parameter $w$ determine the magnitude of the data perturbation. In PertMap, one seeks for the maximum data perturbation that maintains the classification result unchanged from the original class $c$ . The optimization problem of $w$ is defined as follows (Ikeno & Hara, 2018):
271
+
272
+ $$
273
+ \operatorname* { m a x } _ { w \in [ 0 , 1 ] ^ { d } } \sum _ { i = 1 } ^ { d } w _ { i } + \lambda \sum _ { j \neq c } \mathbb { E } _ { r } [ \operatorname* { m i n } ( 0 , f _ { c } ( \bar { x } _ { w , r } ) - f _ { j } ( \bar { x } _ { w , r } ) ) ] .
274
+ $$
275
+
276
+ This problem is equivalent to C-EFS except for the term $\mathbb { E } _ { r } [ f _ { c } ( \bar { x } _ { w , r } ) ]$ replaced with the hinge penalty term $\begin{array} { r } { \sum _ { j \neq c } \tilde { \mathbb { E } } _ { r } [ \operatorname* { m i n } ( 0 , f _ { c } ( \bar { x } _ { w , r } ) - f _ { j } ( \bar { x } _ { w , r } ) ) ] } \end{array}$ that penalizes $w$ only when the corrupted data is classified into other classes.
277
+
278
+ # B GRADIENT-BASED FEATURE ATTRIBUTION METHODS AS EFS/IFS
279
+
280
+ Many feature attribution methods are based on the gradient of the model’s output ∂fc(x) . Here, we show that those gradient-based feature attribution methods can be interpreted as one-step gradient descent/ascent approximations to C-EFS and C-IFS. If we consider solving the problems (3.2) and (3.3) using gradient descent/ascent with the initial $w$ set to zeros, i.e. $w = 0 _ { d }$ , then, the first step of the optimization can be expressed as
281
+
282
+ $$
283
+ w _ { i } 0 \pm \eta \{ \mathbb { E } _ { r } [ \frac { \partial f _ { c } ( \bar { x } _ { w , r } ) } { \partial w _ { i } } | _ { w = 0 _ { d } } ] + \lambda \} \propto \frac { \partial f _ { c } ( \boldsymbol { x } ) } { \partial x _ { i } } ( \mu _ { i } - x _ { i } ) + \lambda ,
284
+ $$
285
+
286
+ where $\eta > 0$ is the step size and $\mu _ { i } : = \mathbb { E } _ { r } [ r _ { i } ]$ . Here, because the penalty $\lambda$ and the step size $\eta$ are common across all the features, $\frac { \partial f _ { c } ( x ) } { \partial x _ { i } } ( \mu _ { i } - x _ { i } )$ is the essential term that determines the size of $w _ { i }$ . We therefore ignore the terms $\lambda$ and $\eta$ for simplicity. Then, the relationship between EFS/IFS and the gradient-based feature attribution methods can be summarized as follows.
287
+
288
+ Grad (Simonyan et al., 2013) Assuming $\mu _ { i } - x _ { i }$ to be constant across the features, $w _ { i }$ is equivalent to $\frac { \partial f _ { c } ( x ) } { \partial x _ { i } }$ up to the scaling factor $\mu _ { i } - x _ { i }$ .
289
+
290
+ Grad $\times$ Input (Shrikumar et al., 2016) Assuming $\mu _ { i }$ to be sufficiently small $( \mu _ { i } \to 0 )$ ), $w _ { i }$ is equivalent to $\frac { \partial f _ { c } ( x ) } { \partial x _ { i } } x _ { i }$
291
+
292
+ Linear Approximation (Bach et al., 2015; Sundararajan et al., 2017; Shrikumar et al., 2017; Montavon et al., 2017; Ribeiro et al., 2016; Lundberg $\pmb { \& }$ Lee, 2017) Several methods consider the linear approximation of the model $f$ in the neighborhood of the input $x$ . Specifically, they consider the linear model
293
+
294
+ $$
295
+ f _ { c } ( r ) = f _ { c } ( x ) + \langle w , r - x \rangle ,
296
+ $$
297
+
298
+ and uses the coefficient $w$ as the attribution score. Here, let us assume that the noise $r$ belongs to the $\epsilon$ -ball around $x$ , i.e. $r \in R ( x ; \epsilon ) : = \{ r : \| r - x \| \le \epsilon \}$ . For differentiable models, we can consider the first-order Taylor expansion within $R ( x ; \epsilon )$ :
299
+
300
+ $$
301
+ f _ { c } ( r ) = f _ { c } ( \boldsymbol { x } ) + \langle \nabla f _ { c } ( \boldsymbol { x } ) , r - \boldsymbol { x } \rangle + O ( \epsilon ^ { 2 } ) .
302
+ $$
303
+
304
+ Thus, in a rough sense, by ignoring the $O ( \epsilon ^ { 2 } )$ term, the coefficient $w _ { i }$ computed by those linear approximation methods is essentially equivalent to the gradient ∂fc(x) . Technically, those linear approximation methods consider further improvements over the pure gradient, so that the linear approximation to be valid not only in the infinitesimally small neighborhood of $x$ , but in a finite range from $x$ . Thus, the computed coefficient $w _ { i }$ can slightly differ from the gradient, nevertheless, those methods can be still classified as approximations of the gradient.
305
+
306
+ SmoothGrad (Smilkov et al., 2017; Hooker et al., 2018) In SmoothGrad, the attribution score is defined as the expectation of the squared gradient over perturbed inputs. Recall that the perturbed data can be expressed as $\hat { x } _ { w , r _ { x } }$ using the data-dependent noise $r _ { x }$ . Given the perturbation magnitude $w _ { 0 } > 0$ , the attribution score is defined as follows (Smilkov et al., 2017; Hooker et al., 2018):
307
+
308
+ $$
309
+ \mathrm { s c o r e s g } : = \mathbb { E } _ { r } \left[ \left( \frac { \partial f _ { c } ( \bar { x } _ { w _ { 0 } , r _ { x } } ) } { \partial ( \bar { x } _ { w _ { 0 } , r _ { x } } ) _ { i } } \right) ^ { 2 } \right]
310
+ $$
311
+
312
+ Here, we show that this score can be also interpreted as one-step gradient descent/ascent approximation to C-EFS and C-IFS. If we set the initial $w$ as $w _ { i } = w _ { 0 }$ , the first step of the optimization can be expressed as
313
+
314
+ $$
315
+ \begin{array} { r l } & { w _ { i } \gets w _ { 0 } \pm \eta \left\{ \mathbb { E } _ { r } \left[ \left. \frac { \partial f _ { c } ( \bar { x } _ { w , r _ { x } } ) } { \partial w _ { i } } \right| _ { w = w _ { 0 } } \right] + \lambda \right\} } \\ & { \quad = \pm \eta \mathbb { E } _ { r } \left[ \left. \frac { \partial f _ { c } ( \bar { x } _ { w , r _ { x } } ) } { \partial w _ { i } } \right| _ { w = w _ { 0 } } \right] + ( w _ { 0 } \pm \eta \lambda ) } \\ & { \quad = \pm \eta \mathbb { E } _ { u } \left[ \left. \frac { \partial f _ { c } ( \bar { x } _ { w , x + u } ) } { \partial ( \bar { x } _ { w , x + u } ) _ { i } } \right| _ { w = w _ { 0 } } u _ { i } \right] + ( w _ { 0 } \pm \eta \lambda ) , } \end{array}
316
+ $$
317
+
318
+ where we used the definition $r _ { x } = x + u$ in the last equality. Because $w _ { 0 } , \eta$ , and $\lambda$ are constants, the first term determines $w _ { i }$ . Moreover, by applying the Cauchy-Schwartz inequality, we obtain
319
+
320
+ $$
321
+ \left( \mathbb E _ { u } \left[ \left. \frac { \partial f _ { c } ( \bar { x } _ { w _ { 0 } , x + u } ) } { \partial ( \bar { x } _ { w _ { 0 } , x + u } ) _ { i } } \right| _ { w = w _ { 0 } } u _ { i } \right] \right) ^ { 2 } \leq \mathbb E _ { r } \left[ \left( \frac { \partial f _ { c } ( \bar { x } _ { w _ { 0 } , r _ { x } } ) } { \partial ( \bar { x } _ { w _ { 0 } , r _ { x } } ) _ { i } } \right) ^ { 2 } \right] \mathbb E _ { u } [ u _ { i } ^ { 2 } ] .
322
+ $$
323
+
324
+ If we selected the perturbation $u$ to have a common variance across the features, i.e. $\mathbb { E } _ { u } [ u _ { i } ^ { 2 } ] = \sigma ^ { 2 }$ for all $i \in [ d ]$ , we can conclude that $\mathbb { E } _ { r } \left[ \left( \frac { \partial f _ { c } ( \bar { x } _ { w _ { 0 } , r _ { x } } ) } { \partial ( \bar { x } _ { w _ { 0 } , r _ { x } } ) _ { i } } \right) ^ { 2 } \right]$ is the essential term determining $w$ , which is equivalent to (B.4).
325
+
326
+ Here, we note out our analysis can explain the success of SmoothGrad. Some studies (Smilkov et al., 2017; Hooker et al., 2018) have reported that SmoothGrad performs better than other gradient-based feature attribution methods in practice. As one-step gradient descent/ascent approximation to C-EFS and C-IFS, SmoothGrad starts the optimization from the non-zero point $w = w _ { 0 }$ while the other methods starts the optimization from zero $w = 0 _ { d }$ . If the initial point $w _ { 0 }$ is carefully chosen, it is apparent that one-step gradient descent/ascent from $w _ { 0 }$ can get closer to the solution than starting the optimization from zero.
327
+
328
+ # C IMPLEMENTATIONS OF EFS/IFS-BASED METHODS
329
+
330
+ In Section 5, we adopted the EFS-based and IFS-based methods: Greedy-EFS, which solves the problem (2.2) using a greedy algorithm; Grad-EFS, which solves the problem (3.2) using gradient descent; Greedy-IFS, which solves the problem (2.3) using a greedy algorithm; and Grad- $I F S$ , which solves the problem (3.3) using gradient ascent. Each method is implemented as follows.
331
+
332
+ Greedy-EFS In Greedy-EFS, we first prepared the feature subsets $S : = \{ S _ { m } \subseteq [ d ] \} _ { m = 1 } ^ { M }$ , where each subset $S _ { m }$ is constructed by sliding the window over the image. In our implementation, we set the window size as $6 4 \times 6 4$ and the stride set to 16. We started the greedy algorithm from $S = \emptyset$ , and iterated the following steps.
333
+
334
+ We repeated those steps ten times, and obtained $S$ as an approximation of $S _ { \mathrm { E F S } }$ . We used a gray background as the noise $r$ , i.e. $p ( r ) = \delta ( r = \mathrm { g r a y } )$ .
335
+
336
+ Greedy-IFS In Greedy-IFS, we prepared the feature subsets $S : = \{ S _ { m } \subseteq [ d ] \} _ { m = 1 } ^ { M }$ in the same way as Greedy-EFS. We started the greedy algorithm from $S = [ d ]$ , and iterated the following steps.
337
+
338
+ We repeated those steps ten times, and obtained $S$ as an approximation of $S _ { \mathrm { I F S } }$ . We used a gray background as the noise $r$ , i.e. $p ( r ) = \delta ( r = \mathrm { g r a y } )$ . We note that Greedy-IFS is essentially the same as the greedy method proposed by Zhou et al. (2014).
339
+
340
+ Grad-EFS In Grad-EFS, we used the data-dependent noise $r _ { x }$ , where we set the distribution $p ( u )$ to be uniform over $[ - 1 , 1 ] ^ { d }$ . In each step of the gradient descent, we approximated the gradient of C-EFS (3.2) using a batch of random realizations of $r _ { x }$ . In our implementation, we set the penalty weight $\lambda = 1 0 d$ and the batch size in each gradient approximation to be 32. As the optimization algorithm, we used Adam (Kingma & Ba, 2014) with the step size set to 0.5 and the remaining parameters set to default values. We run Adam for 200 steps, and obtained $w$ . We note that GradEFS is essentially the same as Meaningful Perturbation (Fong & Vedaldi, 2017) except that the smoothness penalty term is removed.
341
+
342
+ Grad-IFS In Grad-IFS, we used the data-dependent noise $r _ { x }$ , where we set the distribution $p ( u )$ to be uniform over $[ - 1 , 1 ] ^ { d }$ . In each step of the gradient ascent, we approximated the gradient of C-IFS (3.3) using a batch of random realizations of $r _ { x }$ . In our implementation, we set the penalty weight $\lambda = d$ and the batch size in each gradient approximation to be 32. As the optimization algorithm, we used Adam (Kingma & Ba, 2014) with the step size set to 0.03 and the remaining parameters set to default values. We run Adam for 1000 steps. In Grad-IFS, we used the averaged parameter over 1000 steps 11000 P t=1 $\textstyle { \frac { 1 } { 1 0 0 0 } } \sum _ { t = 1 } ^ { 1 0 0 0 } w ^ { ( t ) }$ as $w$ . This is a common technique to improve the quality of the solution obtained from stochastic optimization algorithms with convex objective functions. We found that this technique is helpful also for Grad-IFS. We also applied the same averaging technique to PertMap (Ikeno & Hara, 2018).
343
+
344
+ # D EXPERIMENTAL RESULTS
345
+
346
+ Here, we present all the results that are omitted from Section 5 due to the space limitation.
347
+
348
+ # D.1 AUEC AND AOIC
349
+
350
+ Table 2 and Table 3 show average AUEC and AOIC evaluated with uniform noises and random images, respectively. There are three important observations in these tables.
351
+
352
+ First, Grad-EFS attained the highest AUEC for VGG16 and Inception V3, and the second highest AUEC for ResNet V2. This indicates that Grad-EFS is nearly optimal under the principle of EFS: Grad-EFS can change the model’s decision by corrupting only a small number of relevant features. Indeed, as shown in Figure 6 and Figure 7, Grad-EFS has a sharp increase in the EFS-Curves. This is a natural consequence from the fact that EFS is very similar to adversarial example, as we discussed in Section 5.
353
+
354
+ Second, especially for VGG16, the random attribution attained AUEC similar to some of the methods such as Grad $\times$ Input, IntGrad, LRP, and Occlusion. Indeed, as in Figure 6 and Figure 7, the EFS-Curves of the random attribution are close to those methods. It is a bit surprising to observe that we can attain a good trade-off in EFS just by randomly scoring each feature without looking at the images. This observation indicates that there are only subtle differences between good attributions and random attributions under EFS, especially for VGG16.
355
+
356
+ Third, on AOIC, Grad-IFS consistently outperformed the other methods, and PertMap attained the second best result. As shown in Figure 6 and Figure 7, Grad-IFS is very resistant against the corruption of irrelevant features. This means that Grad-IFS is capable of identifying irrelevant features better than any other methods. Another important point that can be seen in Figure 6 and Figure 7 is that, the IFS-Curves vary significantly across different methods. More importantly, unlike EFS, the IFS-Curve can distinguish random attributions and other attributions well.
357
+
358
+ Table 2: Average AUEC and AOIC under the uniform noise. The top-three scores are highlighted as ${ 1 } \mathrm { s t } ^ { * }$ , 2nd∗∗, and $3 \mathrm { r d } ^ { * * * }$ .
359
+
360
+ <table><tr><td rowspan="2"></td><td colspan="2">VGG16</td><td colspan="2">ResNet V2</td><td colspan="2">Inception V3</td></tr><tr><td>AUEC</td><td>AOIC</td><td>AUEC</td><td>AOIC</td><td>AUEC</td><td>AOIC</td></tr><tr><td>Greedy-EFS</td><td>0.844</td><td>0.366</td><td>0.858**</td><td>0.391</td><td>0.837***</td><td>0.445</td></tr><tr><td>Grad-EFS</td><td>0.946*</td><td>0.195</td><td>0.858**</td><td>0.369</td><td>0.927*</td><td>0.394</td></tr><tr><td>Greedy-IFS</td><td>0.746</td><td>0.622</td><td>0.745</td><td>0.709***</td><td>0.715</td><td>0.685</td></tr><tr><td>Grad-IFS</td><td>0.873</td><td>0.876*</td><td>0.814</td><td>0.829*</td><td>0.817</td><td>0.868*</td></tr><tr><td>Grad</td><td>0.867</td><td>0.341</td><td>0.797</td><td>0.416</td><td>0.799</td><td>0.475</td></tr><tr><td>Grad×Input</td><td>0.823</td><td>0.318</td><td>0.750</td><td>0.404</td><td>0.748</td><td>0.441</td></tr><tr><td>SmoothGrad</td><td>0.882</td><td>0.593***</td><td>0.840</td><td>0.707</td><td>0.829</td><td>0.744***</td></tr><tr><td>GuidedBP</td><td>0.918**</td><td>0.455</td><td>0.874*</td><td>0.595</td><td>0.826</td><td>0.555</td></tr><tr><td>IntGrad</td><td>0.837</td><td>0.346</td><td>0.781</td><td>0.438</td><td>0.775</td><td>0.482</td></tr><tr><td>LRP</td><td>0.823</td><td>0.318</td><td>0.750</td><td>0.404</td><td>0.748</td><td>0.441</td></tr><tr><td>DeepLIFT</td><td>0.862</td><td>0.435</td><td>0.811</td><td>0.518</td><td>0.788</td><td>0.539</td></tr><tr><td>Occlusion</td><td>0.811</td><td>0.559</td><td>0.767</td><td>0.595</td><td>0.709</td><td>0.664</td></tr><tr><td>PertMap</td><td>0.886***</td><td>0.780**</td><td>0.828</td><td>0.765**</td><td>0.846**</td><td>0.817**</td></tr><tr><td>Random</td><td>0.839</td><td>0.160</td><td>0.691</td><td>0.308</td><td>0.714</td><td>0.290</td></tr></table>
361
+
362
+ Table 3: Average AUEC and AOIC under random images. The top-three scores are highlighted as ${ 1 } \mathrm { s t } ^ { * }$ , $2 \mathrm { n d } ^ { \ast \ast }$ , and $3 \mathrm { r d } ^ { * * * }$ .
363
+
364
+ <table><tr><td rowspan="2"></td><td colspan="2">VGG16</td><td colspan="2">ResNet V2</td><td colspan="2">Inception V3</td></tr><tr><td>AUEC</td><td>AOIC</td><td>AUEC</td><td>AOIC</td><td>AUEC</td><td>AOIC</td></tr><tr><td>Greedy-EFS</td><td>0.842</td><td>0.319</td><td>0.857***</td><td>0.388</td><td>0.857***</td><td>0.397</td></tr><tr><td>Grad-EFS</td><td>0.926*</td><td>0.179</td><td>0.861**</td><td>0.275</td><td>0.893*</td><td>0.293</td></tr><tr><td>Greedy-IFS</td><td>0.766</td><td>0.524***</td><td>0.763</td><td>0.589</td><td>0.760</td><td>0.521</td></tr><tr><td>Grad-IFS</td><td>0.858</td><td>0.630*</td><td>0.826</td><td>0.688*</td><td>0.844</td><td>0.705*</td></tr><tr><td>Grad</td><td>0.865</td><td>0.290</td><td>0.800</td><td>0.375</td><td>0.826</td><td>0.393</td></tr><tr><td>Grad×Input</td><td>0.835</td><td>0.296</td><td>0.775</td><td>0.384</td><td>0.789</td><td>0.396</td></tr><tr><td>SmoothGrad</td><td>0.880</td><td>0.486</td><td>0.846</td><td>0.647***</td><td>0.860</td><td>0.650***</td></tr><tr><td>GuidedBP</td><td>0.905**</td><td>0.416</td><td>0.876*</td><td>0.568</td><td>0.839</td><td>0.502</td></tr><tr><td>IntGrad</td><td>0.847</td><td>0.318</td><td>0.807</td><td>0.418</td><td>0.815</td><td>0.435</td></tr><tr><td>LRP</td><td>0.835</td><td>0.296</td><td>0.775</td><td>0.384</td><td>0.789</td><td>0.397</td></tr><tr><td>DeepLIFT</td><td>0.868</td><td>0.378</td><td>0.836</td><td>0.480</td><td>0.826</td><td>0.471</td></tr><tr><td>Occlusion</td><td>0.840</td><td>0.487</td><td>0.787</td><td>0.544</td><td>0.769</td><td>0.553</td></tr><tr><td>PertMap</td><td>0.876***</td><td>0.553**</td><td>0.833</td><td>0.660**</td><td>0.861**</td><td>0.661**</td></tr><tr><td>Random</td><td>0.842</td><td>0.160</td><td>0.760</td><td>0.237</td><td>0.767</td><td>0.234</td></tr></table>
365
+
366
+ ![](images/85289b637c9833e58128f0e3e4b13cbcdbabf9c272b057142fa30d8566b56de4.jpg)
367
+ Figure 6: Average EFS-Curve and IFS-Curve evaluated with uniform noises.
368
+
369
+ ![](images/37c5d3e7f7f1426a077c45b0c754b4df37697c35f8960d6c7aa487a6466e843c.jpg)
370
+ Figure 7: Average EFS-Curve and IFS-Curve evaluated with random images.
371
+
372
+ # D.2 EXAMPLE HEATMAPS
373
+
374
+ Figures 8–12 show examples of the heatmaps obtained by several feature attribution methods. There are two important observations in the figures.
375
+
376
+ First, the heatmaps of Grad-EFS are mostly shot noises, which are visibly meaningless. These are natural consequences from the fact that EFS is very similar to adversarial example, as we have discussed in Section 5.
377
+
378
+ Second, the high AOIC methods in Table 2 and Table 3, namely Grad-IFS, PertMap, and SmoothGrad, have highlighted mostly the faces of the animals. The high AOICs on these methods indicate that the model has made the decision based mostly on the animal face. In contrast, the other methods tend to generate noisy attributions over the entire body of the animals, which are false explanations from the perspective of IFS because their AOICs are far smaller than that of Grad-IFS: the noisy attributions failed to capture essential pixels in the images.
379
+
380
+ ![](images/f0204f3d368fa1f513cbb6f1223930bb97f72c19918239e169a26a09882d0778.jpg)
381
+ Figure 8: Example Heatmaps: The red colored pixels are found to be strongly relevant with each method.
382
+
383
+ ![](images/4bd97ee0173318dd58a7ca2ff3b9df712f81e38e710a27cf44c8ca6e5abcb44b.jpg)
384
+ Figure 9: Example Heatmaps: The red colored pixels are found to be strongly relevant with each method.
385
+
386
+ ![](images/669ab9802155c73b66086f0d8efd1853511915a70e60957fcd3b50ecc2bee48e.jpg)
387
+ Figure 10: Example Heatmaps: The red colored pixels are found to be strongly relevant with each method.
388
+
389
+ ![](images/c25b4d134f7f18eec8fd96de087192a5e8f3db1a29a2bc880bd1e8a40d646c68.jpg)
390
+ Figure 11: Example Heatmaps: The red colored pixels are found to be strongly relevant with each method.
391
+
392
+ ![](images/ecc62006eadb15c9b38b3e31be026719ec355ea1072a942ef311996aa1102ce8.jpg)
393
+ Figure 12: Example Heatmaps: The red colored pixels are found to be strongly relevant with each method.
parse/train/H1lS8oA5YQ/H1lS8oA5YQ_content_list.json ADDED
@@ -0,0 +1,2002 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "FEATURE ATTRIBUTION AS FEATURE SELECTION ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 173,
8
+ 98,
9
+ 767,
10
+ 121
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 183,
19
+ 145,
20
+ 398,
21
+ 172
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 210,
32
+ 544,
33
+ 226
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Feature attribution methods identify “relevant” features as an explanation of a complex machine learning model. Several feature attribution methods have been proposed; however, only a few studies have attempted to define the “relevance” of each feature mathematically. In this study, we formalize the feature attribution problem as a feature selection problem. In our proposed formalization, there arise two possible definitions of relevance. We name the feature attribution problems based on these two relevances as Exclusive Feature Selection (EFS) and Inclusive Feature Selection (IFS). We show that several existing feature attribution methods can be interpreted as approximation algorithms for EFS and IFS. Moreover, through exhaustive experiments, we show that IFS is better suited as the formalization for the feature attribution problem than EFS. ",
40
+ "bbox": [
41
+ 233,
42
+ 243,
43
+ 764,
44
+ 396
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 429,
55
+ 336,
56
+ 445
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Feature attribution methods (Simonyan et al., 2013; Springenberg et al., 2014), or saliency maps, are one of the most popular approaches for explaining the decisions of complex machine learning models such as deep neural networks. In feature attribution, for each given instance, the feature attribution methods score how strongly each feature is relevant to the model’s decision. An informal definition of the feature attribution problem can be described as follows. We note that this definition is incomplete because the “relevance” of each feature is not defined. ",
63
+ "bbox": [
64
+ 174,
65
+ 462,
66
+ 825,
67
+ 546
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Feature Attribution Problem Given the model $f$ and the target input $x \\in \\mathbb { R } ^ { d }$ to be explained, score $s _ { i } \\in \\mathbb { R }$ to each feature $x _ { i }$ $( i = 1 , 2 , \\ldots , d )$ so that $s _ { i } \\geq s _ { j }$ if the feature $x _ { i }$ is more relevant to the model’s decision than the feature $x _ { j }$ . ",
74
+ "bbox": [
75
+ 176,
76
+ 553,
77
+ 820,
78
+ 597
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "With feature attribution methods, the relevant features can be obtained as explanations why the models made certain decisions. For example, in image recognition, feature attribution methods highlight pixels which the models have focused on, by scoring the relevance of each pixel (Simonyan et al., 2013; Springenberg et al., 2014; Bach et al., 2015; Smilkov et al., 2017), and in text classification, they detect the set of words or sentences relevant to the model’s decision by scoring each word or sentence (Ding et al., 2017; Chen et al., 2018). ",
85
+ "bbox": [
86
+ 174,
87
+ 602,
88
+ 825,
89
+ 686
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "The major approaches for feature attribution are based on gradient and its modifications (Simonyan et al., 2013; Springenberg et al., 2014; Bach et al., 2015; Smilkov et al., 2017; Shrikumar et al., 2017) and feature occlusions (Zeiler & Fergus, 2014; Zhou et al., 2014). ",
96
+ "bbox": [
97
+ 178,
98
+ 693,
99
+ 821,
100
+ 734
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Most of the studies proposed computational algorithms without defining the “relevance” mathematically (except for some axiomatic approaches (Sundararajan et al., 2017; Lundberg & Lee, 2017)). This means that it is not clear what these algorithm outputs, and we cannot compare these outputs rigorously. To clarify the situation and to establish solid feature attribution methods, we pose the following research questions: (Q1) how can we define relevance? (Q2) is there a general framework for the relevance that induces existing feature attribution methods? and (Q3) what is an appropriate definition of relevance? ",
107
+ "bbox": [
108
+ 174,
109
+ 742,
110
+ 825,
111
+ 839
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "In this study, we formalize the feature attribution problem as feature selection problem, and thereby answer questions (Q1)–(Q3). In our proposed formalization, there arise two possible definitions of relevance. We name the feature attribution problems based on these two relevances as Exclusive Feature Selection (EFS) and Inclusive Feature Selection (IFS). ",
118
+ "bbox": [
119
+ 176,
120
+ 847,
121
+ 823,
122
+ 902
123
+ ],
124
+ "page_idx": 0
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "Below, we summarize our contributions. ",
129
+ "bbox": [
130
+ 176,
131
+ 910,
132
+ 437,
133
+ 922
134
+ ],
135
+ "page_idx": 0
136
+ },
137
+ {
138
+ "type": "image",
139
+ "img_path": "images/c0fa6b6e8aa8cfcd9d6cca7958837340fe672352ebe8995d2ec037d82fc1c8a8.jpg",
140
+ "image_caption": [
141
+ "Figure 1: Reorganizing feature attribution methods as Exclusive Feature Selection (EFS) and Inclusive Feature Selection (IFS). See the references for the details of each method: Grad (Simonyan et al., 2013), Grad $. \\times$ Input (Shrikumar et al., 2016), IntGrad (Sundararajan et al., 2017), SmoothGrad (Smilkov et al., 2017; Hooker et al., 2018), LIME (Ribeiro et al., 2016), SHAP (Lundberg & Lee, 2017), GuidedBP (Springenberg et al., 2014), ExciteBP (Zhang et al., 2016), LRP (Bach et al., 2015), DeepTaylor (Montavon et al., 2017), DeepLIFT (Shrikumar et al., 2017), Occlusion (Zeiler & Fergus, 2014), Detector (Zhou et al., 2014), Anchor (Ribeiro et al., 2018), Meaningful Perturbation (Fong & Vedaldi, 2017), and PertMap (Hara et al., 2018; Ikeno & Hara, 2018) "
142
+ ],
143
+ "image_footnote": [],
144
+ "bbox": [
145
+ 223,
146
+ 99,
147
+ 771,
148
+ 342
149
+ ],
150
+ "page_idx": 1
151
+ },
152
+ {
153
+ "type": "text",
154
+ "text": "Answer to Q1: We introduce two formalizations, namely EFS and IFS (Section 2). We formalize the feature attribution problem as feature selection problem, because the goal of feature attribution is to identify the relevant features to the model’s decision. Here, we point out that there are two possible approaches for characterizing the relevance of the features. In the first approach, EFS, we exclude some features from the model, and if the model’s decision changes by the exclusion, we infer the excluded features are relevant since they have certain impacts to the decision. In the second approach, IFS, we include some features to the model, and if the model’s decision remains unchanged after the inclusion, we infer the included features are relevant since they are essential to the decision. ",
155
+ "bbox": [
156
+ 174,
157
+ 518,
158
+ 825,
159
+ 643
160
+ ],
161
+ "page_idx": 1
162
+ },
163
+ {
164
+ "type": "text",
165
+ "text": "Answer to Q2: The existing methods are based on the relevances of EFS and IFS (Section 3). We show that several existing feature attribution methods can be interpreted as approximation algorithms for EFS or IFS, as summarized in Figure 1. For example, the gradient-based methods are one-step gradient descent for the continuous relaxation of EFS and IFS. ",
166
+ "bbox": [
167
+ 174,
168
+ 651,
169
+ 825,
170
+ 707
171
+ ],
172
+ "page_idx": 1
173
+ },
174
+ {
175
+ "type": "text",
176
+ "text": "Answer to Q3: The relevance based on IFS is better suited for the feature attribution problem (Section 5). We observe that IFS is better suited as the formalization for the feature attribution problem than EFS. Through exhaustive experiments, we found two crucial properties of EFS. First, the optimal solution to EFS is very similar to adversarial example (Szegedy et al., 2013). As adversarial examples generally provide seemingly meaningless attributions, they are not appropriate for the purpose of explanation. Second, we empirically observe that even a random attribution can perform comparably well with some of the existing feature attribution methods under the evaluation based on EFS. This observation indicates that there are only subtle differences between good attributions and random attributions under EFS. In contrast, unlike EFS, IFS has no trivial drawbacks, and we argue that IFS would be an appropriate formalization for the feature attribution problem. ",
177
+ "bbox": [
178
+ 173,
179
+ 714,
180
+ 825,
181
+ 853
182
+ ],
183
+ "page_idx": 1
184
+ },
185
+ {
186
+ "type": "text",
187
+ "text": "In this paper, we use the following notation, and consider the problem setting as follows. ",
188
+ "bbox": [
189
+ 173,
190
+ 859,
191
+ 753,
192
+ 875
193
+ ],
194
+ "page_idx": 1
195
+ },
196
+ {
197
+ "type": "text",
198
+ "text": "Notation For any positive integer $d , \\ [ d ]$ denotes the set $[ d ] ~ = ~ \\{ 1 , 2 , \\ldots , d \\}$ . We denote $d$ - dimensional vectors with all zeros as $0 _ { d }$ . For a proposition $a$ , $\\mathbb { I } ( a )$ denotes the indicator of $a$ , i.e., $\\mathbb { I } ( a ) = 1$ if $a$ is true, and $\\mathbb { I } ( a ) = 0$ if $a$ is false. ",
199
+ "bbox": [
200
+ 174,
201
+ 881,
202
+ 823,
203
+ 924
204
+ ],
205
+ "page_idx": 1
206
+ },
207
+ {
208
+ "type": "text",
209
+ "text": "Settings In this paper, we consider the classification model $f$ for $C$ categories that return an output $y \\in \\breve { \\mathbb { R } } ^ { C }$ for a given data $\\boldsymbol { x } ~ \\in ~ \\mathbb { R } ^ { d }$ , i.e., $y \\ = \\ f ( x )$ . The classification result is determined by $c = \\operatorname { a r g m a x } _ { j } y _ { j }$ where $y _ { j } = f _ { j } ( x )$ is the $j$ -th element of the output. We assume that the model $f$ is differentiable with respect to the input $x$ : the target models therefore include linear models, kernel models with differentiable kernels, and deep neural networks. We assume that the model $f$ and the target input $x$ to be explained are given and fixed. ",
210
+ "bbox": [
211
+ 173,
212
+ 103,
213
+ 825,
214
+ 188
215
+ ],
216
+ "page_idx": 2
217
+ },
218
+ {
219
+ "type": "text",
220
+ "text": "2 FEATURE ATTRIBUTION AS FEATURE SELECTION ",
221
+ "text_level": 1,
222
+ "bbox": [
223
+ 174,
224
+ 207,
225
+ 616,
226
+ 223
227
+ ],
228
+ "page_idx": 2
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "(Q1) How can we define the relevance? ",
233
+ "bbox": [
234
+ 176,
235
+ 238,
236
+ 433,
237
+ 252
238
+ ],
239
+ "page_idx": 2
240
+ },
241
+ {
242
+ "type": "text",
243
+ "text": "As an answer to this question, we formalize the feature attribution problem as feature selection problem, and introduce two definitions of relevance. ",
244
+ "bbox": [
245
+ 174,
246
+ 258,
247
+ 823,
248
+ 287
249
+ ],
250
+ "page_idx": 2
251
+ },
252
+ {
253
+ "type": "text",
254
+ "text": "Before formalizing the problem, we introduce the idea of data corruption (Samek et al., 2017; Fong & Vedaldi, 2017), which plays an important role in this study. Here, we consider corrupting the input data $x$ by overlaying partial features with a noise $r \\in \\mathbb { R } ^ { d }$ , as follows. ",
255
+ "bbox": [
256
+ 174,
257
+ 294,
258
+ 825,
259
+ 337
260
+ ],
261
+ "page_idx": 2
262
+ },
263
+ {
264
+ "type": "text",
265
+ "text": "Definition 2.1 (Data Corruption). For a vector $x \\in \\mathbb { R } ^ { d }$ , the corruption of $x$ with the set $S \\subseteq [ d ]$ and the vector $r \\in { \\mathbb { R } ^ { d } }$ is given by $x _ { S , r }$ , which is defined below. ",
266
+ "bbox": [
267
+ 171,
268
+ 339,
269
+ 823,
270
+ 368
271
+ ],
272
+ "page_idx": 2
273
+ },
274
+ {
275
+ "type": "equation",
276
+ "img_path": "images/e6fb1084bacb48e229879d96efede58b68418f78f082519657de056a77b3ccc8.jpg",
277
+ "text": "$$\n( x _ { S , r } ) _ { i } = \\left\\{ { r _ { i } \\mathrm { \\quad ~ i f ~ } i \\in S } , \\right.\n$$",
278
+ "text_format": "latex",
279
+ "bbox": [
280
+ 403,
281
+ 375,
282
+ 591,
283
+ 409
284
+ ],
285
+ "page_idx": 2
286
+ },
287
+ {
288
+ "type": "text",
289
+ "text": "We refer to the set $S$ as corrupted features. ",
290
+ "bbox": [
291
+ 176,
292
+ 412,
293
+ 455,
294
+ 428
295
+ ],
296
+ "page_idx": 2
297
+ },
298
+ {
299
+ "type": "text",
300
+ "text": "Here, we assume that the noise $r$ follows a distribution $p ( r )$ . In Section 5, we introduce two types of noises $r$ for the images; we overlay the image to be explained with random noises and random real images. ",
301
+ "bbox": [
302
+ 174,
303
+ 438,
304
+ 825,
305
+ 481
306
+ ],
307
+ "page_idx": 2
308
+ },
309
+ {
310
+ "type": "text",
311
+ "text": "We now consider the problem formalization. Recall that the objective of feature attribution is to provide high scores to relevant features to the model’s decision and low scores to irrelevant features. Our idea is to define the relevance and irrelevance using data corruption. Specifically, in this study, we consider two types of feature selection problems based on data corruption. We name those two problems as Exclusive Feature Selection (EFS) and Inclusive Feature Selection (IFS). ",
312
+ "bbox": [
313
+ 174,
314
+ 487,
315
+ 825,
316
+ 558
317
+ ],
318
+ "page_idx": 2
319
+ },
320
+ {
321
+ "type": "text",
322
+ "text": "2.1 EXCLUSIVE FEATURE SELECTION (EFS) ",
323
+ "text_level": 1,
324
+ "bbox": [
325
+ 174,
326
+ 573,
327
+ 496,
328
+ 588
329
+ ],
330
+ "page_idx": 2
331
+ },
332
+ {
333
+ "type": "text",
334
+ "text": "One way of measuring the relevance of features is to corrupt some of the features by overlaying with uninformative values and observe how the model’s decision changes. If the corruption of certain features leads to a decision change, such features can be considered as “relevant”. We note that corrupting many features easily leads to a decision change. Therefore, our focus is mainly on a small number of crucial features that can change the decision. We formalize this idea as Exclusive Feature Selection (EFS). In EFS, we aim at changing the decision of the model $f$ to a class different from $c$ by corrupting only a small number of features. See Figure 2 for the idea of EFS. The idea of EFS was originally proposed for measuring the performance of feature attribution methods (Samek et al., 2017). Here, we define EFS as follows. ",
335
+ "bbox": [
336
+ 173,
337
+ 599,
338
+ 825,
339
+ 724
340
+ ],
341
+ "page_idx": 2
342
+ },
343
+ {
344
+ "type": "text",
345
+ "text": "Definition 2.2 (Exclusive Feature Selection (EFS)). Find the feature corruption $S \\subseteq [ d ]$ such that (i) the number of corrupted features $| S |$ is small, and (ii) the corrupted data $x _ { S , r }$ has small intensity at class $c$ , i.e. $f _ { c } ( x _ { S , r } )$ is small, so that the corrupted data is classified into a different class. ",
346
+ "bbox": [
347
+ 171,
348
+ 728,
349
+ 823,
350
+ 771
351
+ ],
352
+ "page_idx": 2
353
+ },
354
+ {
355
+ "type": "equation",
356
+ "img_path": "images/fef6e134e3a2e89cdd1254e65d0923a31bd21e55eb844fcd1b372c91657c76d1.jpg",
357
+ "text": "$$\n\\begin{array} { r } { S _ { \\mathrm { E F S } } : = \\mathrm { a r g m i n } _ { S \\subseteq [ d ] } | S | + \\lambda \\mathbb { E } _ { r } [ f _ { c } ( x _ { S , r } ) ] , } \\end{array}\n$$",
358
+ "text_format": "latex",
359
+ "bbox": [
360
+ 354,
361
+ 773,
362
+ 642,
363
+ 794
364
+ ],
365
+ "page_idx": 2
366
+ },
367
+ {
368
+ "type": "text",
369
+ "text": "where $\\mathbb { E } _ { r }$ denotes the expectation over the noise $r$ , and $\\lambda > 0$ is a weight parameter determined by the user. ",
370
+ "bbox": [
371
+ 174,
372
+ 796,
373
+ 825,
374
+ 825
375
+ ],
376
+ "page_idx": 2
377
+ },
378
+ {
379
+ "type": "text",
380
+ "text": "In this definition, we consider the expected intensity $\\mathbb { E } _ { r } [ f _ { c } ( x _ { S , r } ) ]$ over the noise $r$ so to avoid the corruption to overfit a specific realization of the noise $r$ . ",
381
+ "bbox": [
382
+ 174,
383
+ 834,
384
+ 823,
385
+ 864
386
+ ],
387
+ "page_idx": 2
388
+ },
389
+ {
390
+ "type": "text",
391
+ "text": "By using the solution of EFS, we can define relevance as a binary score as follows. That is, in EFS, the relevant features are the ones when excluded from the data lead to the model’s decision change. ",
392
+ "bbox": [
393
+ 173,
394
+ 871,
395
+ 821,
396
+ 898
397
+ ],
398
+ "page_idx": 2
399
+ },
400
+ {
401
+ "type": "text",
402
+ "text": "Definition 2.3 (EFS-Relevance). The relevance of each feature $x _ { i }$ is defined by $s _ { i } : = \\mathbb { I } ( i \\in S _ { \\mathrm { E F S } } )$ ",
403
+ "bbox": [
404
+ 174,
405
+ 902,
406
+ 820,
407
+ 917
408
+ ],
409
+ "page_idx": 2
410
+ },
411
+ {
412
+ "type": "image",
413
+ "img_path": "images/c1abffe631b4af9e961d14fb33f1ae5d1263a08639de15355d9f2b915d6321f6.jpg",
414
+ "image_caption": [
415
+ "Figure 2: The idea of EFS: Within the trade-off between intensity $\\mathbb { E } _ { r } [ f _ { c } ( x _ { S , r } ) ]$ and the number of corrupted features $| S |$ , find $S$ that minimizes the intensity and its size. The red pixels indicate the corrupted features $S$ . The corrupted features $S$ in the second image is optimal in this curve. "
416
+ ],
417
+ "image_footnote": [],
418
+ "bbox": [
419
+ 197,
420
+ 106,
421
+ 799,
422
+ 275
423
+ ],
424
+ "page_idx": 3
425
+ },
426
+ {
427
+ "type": "image",
428
+ "img_path": "images/acb2c47a5e2b29a0481ba61d33e14871d810f97cb4f67d1088a918362c2639a4.jpg",
429
+ "image_caption": [
430
+ "Figure 3: The idea of IFS: Within the trade-off between intensity $\\mathbb { E } _ { r } [ f _ { c } ( x _ { S , r } ) ]$ and the number of corrupted features $| S |$ , find $S$ that maximizes the intensity and its size. The red pixels indicate the corrupted features $S$ . The corrupted features $S$ in the fourth image is optimal in this curve. "
431
+ ],
432
+ "image_footnote": [],
433
+ "bbox": [
434
+ 196,
435
+ 364,
436
+ 799,
437
+ 537
438
+ ],
439
+ "page_idx": 3
440
+ },
441
+ {
442
+ "type": "text",
443
+ "text": "2.2 INCLUSIVE FEATURE SELECTION (IFS) ",
444
+ "text_level": 1,
445
+ "bbox": [
446
+ 176,
447
+ 636,
448
+ 488,
449
+ 651
450
+ ],
451
+ "page_idx": 3
452
+ },
453
+ {
454
+ "type": "text",
455
+ "text": "Data corruption can be used for measuring the relevance of features in a way different from that of EFS. If the corruption of certain features does not change the model’s decision, such features can be considered as “irrelevant”. We note that zero corruption trivially keeps the decision unchanged. Therefore, our focus is mainly on a small number of crucial features that have to be kept to maintain the decision. Therefore, in Inclusive Feature Selection, we aim at maintaining the decision of the model $f$ in the class $c$ while corrupting as many features as possible. See Figure 3 for the idea of IFS. Here, we formally define IFS as follows. ",
456
+ "bbox": [
457
+ 173,
458
+ 665,
459
+ 825,
460
+ 763
461
+ ],
462
+ "page_idx": 3
463
+ },
464
+ {
465
+ "type": "text",
466
+ "text": "Definition 2.4 (Inclusive Feature Selection (IFS)). Find the feature corruption $S \\subseteq [ d ]$ such that (i) the number of corrupted features $| S |$ is large, and (ii) the corrupted data $x _ { S , r }$ has high intensity at class $c$ , i.e. $f _ { c } ( x _ { S , r } )$ is large, so that the corrupted data is classified to the class $c$ . ",
467
+ "bbox": [
468
+ 174,
469
+ 770,
470
+ 825,
471
+ 813
472
+ ],
473
+ "page_idx": 3
474
+ },
475
+ {
476
+ "type": "equation",
477
+ "img_path": "images/ce6b5ac9910f2bf14811e40dc9aec2145a69262f56b50eed16815f82938fd689.jpg",
478
+ "text": "$$\n\\begin{array} { r } { S _ { \\mathrm { I F S } } : = \\mathrm { a r g m a x } _ { S \\subseteq [ d ] } | S | + \\lambda \\mathbb { E } _ { r } [ f _ { c } ( x _ { S , r } ) ] . } \\end{array}\n$$",
479
+ "text_format": "latex",
480
+ "bbox": [
481
+ 354,
482
+ 824,
483
+ 643,
484
+ 844
485
+ ],
486
+ "page_idx": 3
487
+ },
488
+ {
489
+ "type": "text",
490
+ "text": "By using the solution of IFS, we can define relevance as follows. In IFS, the relevant features are the ones that when included in the data keep the model’s decision unchanged. ",
491
+ "bbox": [
492
+ 173,
493
+ 862,
494
+ 823,
495
+ 892
496
+ ],
497
+ "page_idx": 3
498
+ },
499
+ {
500
+ "type": "text",
501
+ "text": "Definition 2.5 (IFS-Relevance). The relevance of each feature $x _ { i }$ is defined by $s _ { i } : = \\mathbb { I } ( i \\notin S _ { \\mathrm { I F S } } )$ . ",
502
+ "bbox": [
503
+ 169,
504
+ 897,
505
+ 812,
506
+ 914
507
+ ],
508
+ "page_idx": 3
509
+ },
510
+ {
511
+ "type": "text",
512
+ "text": "3 FEATURE ATTRIBUTION METHODS AS EFS AND IFS ",
513
+ "text_level": 1,
514
+ "bbox": [
515
+ 174,
516
+ 102,
517
+ 642,
518
+ 118
519
+ ],
520
+ "page_idx": 4
521
+ },
522
+ {
523
+ "type": "text",
524
+ "text": "(Q2) Is there a general framework for the relevance that induces existing feature attribution methods? ",
525
+ "bbox": [
526
+ 174,
527
+ 133,
528
+ 820,
529
+ 161
530
+ ],
531
+ "page_idx": 4
532
+ },
533
+ {
534
+ "type": "text",
535
+ "text": "As an answer to this question, we show that the existing feature attribution methods can be interpreted as approximation algorithms for EFS or IFS. Thus, the relevances considered in the existing methods are approximated versions of EFS-Relevance and IFS-Relevance. To show this, we classify the existing methods into three types of approaches for solving EFS and IFS: occlusion-based, optimization-based, and gradient-based. See Figure 1 for the overview. ",
536
+ "bbox": [
537
+ 174,
538
+ 169,
539
+ 825,
540
+ 238
541
+ ],
542
+ "page_idx": 4
543
+ },
544
+ {
545
+ "type": "text",
546
+ "text": "3.1 OCCLUSION-BASED APPROACHES",
547
+ "text_level": 1,
548
+ "bbox": [
549
+ 178,
550
+ 256,
551
+ 447,
552
+ 270
553
+ ],
554
+ "page_idx": 4
555
+ },
556
+ {
557
+ "type": "text",
558
+ "text": "Occlusion-based feature attribution methods (Zeiler & Fergus, 2014; Zhou et al., 2014; Ribeiro et al., 2018) measure the relevance by partially masking features. In those methods, the features are masked by sliding windows or patches, and the change of the output $f _ { c }$ is computed. This can be interpreted as an approximation algorithm for solving the problems (2.2) and (2.3). Instead of searching over exponentially large solution candidates $S \\subseteq [ d ]$ , those methods search only over the subset of the solution candidates. For example, one prepares a set of feature subsets $\\{ S _ { m } : S _ { m } \\subseteq$ $[ d ] \\} _ { m = 1 } ^ { M }$ , and searches for an optimal combination of the subsets by using a greedy algorithm (Zhou14) or by a bandit algorithm (Ribeiro et al., 2018). ",
559
+ "bbox": [
560
+ 174,
561
+ 281,
562
+ 825,
563
+ 393
564
+ ],
565
+ "page_idx": 4
566
+ },
567
+ {
568
+ "type": "text",
569
+ "text": "3.2 OPTIMIZATION-BASED APPROACHES",
570
+ "text_level": 1,
571
+ "bbox": [
572
+ 176,
573
+ 410,
574
+ 468,
575
+ 424
576
+ ],
577
+ "page_idx": 4
578
+ },
579
+ {
580
+ "type": "text",
581
+ "text": "In order to introduce the optimization-based feature attribution methods, we consider the continuous relaxation of EFS and IFS, as follows. ",
582
+ "bbox": [
583
+ 174,
584
+ 435,
585
+ 823,
586
+ 463
587
+ ],
588
+ "page_idx": 4
589
+ },
590
+ {
591
+ "type": "text",
592
+ "text": "Definition 3.1 (Continuous Corruption). For a vector $x \\in \\mathbb { R } ^ { d }$ , the continuous corruption of $x$ with the vector $w \\in [ 0 , 1 ] ^ { d }$ and the vector $r \\in \\mathbb { R } ^ { d }$ is given by $\\bar { x } _ { w , r }$ , which is defined below. ",
593
+ "bbox": [
594
+ 171,
595
+ 468,
596
+ 823,
597
+ 497
598
+ ],
599
+ "page_idx": 4
600
+ },
601
+ {
602
+ "type": "equation",
603
+ "img_path": "images/73179b273990ad2d9d5eb39f2e4ecd9c26ce2c52539b1fd39a62e9c12a5ee75b.jpg",
604
+ "text": "$$\n( \\bar { x } _ { w , r } ) _ { i } = ( 1 - w _ { i } ) x _ { i } + w _ { i } r _ { i } .\n$$",
605
+ "text_format": "latex",
606
+ "bbox": [
607
+ 398,
608
+ 503,
609
+ 599,
610
+ 521
611
+ ],
612
+ "page_idx": 4
613
+ },
614
+ {
615
+ "type": "text",
616
+ "text": "Here, the vector $w$ can be interpreted as the continuous relaxation of the indicator of the set $S$ . ",
617
+ "bbox": [
618
+ 178,
619
+ 526,
620
+ 790,
621
+ 541
622
+ ],
623
+ "page_idx": 4
624
+ },
625
+ {
626
+ "type": "text",
627
+ "text": "Definition 3.2 (Continuous EFS (C-EFS)). Find the vector $w \\in [ 0 , 1 ] ^ { d }$ such that (i) the amount of corruption $\\textstyle \\sum _ { i = 1 } ^ { d } w _ { i }$ is small, and (ii) the corrupted data $\\bar { x } _ { w , r }$ has small intensity at class $c$ : ",
628
+ "bbox": [
629
+ 174,
630
+ 545,
631
+ 831,
632
+ 578
633
+ ],
634
+ "page_idx": 4
635
+ },
636
+ {
637
+ "type": "equation",
638
+ "img_path": "images/fdc820e1b96356fbb6f9f841acf977021b2d180d5a3b8f84fbff1a5d62cce531.jpg",
639
+ "text": "$$\n\\begin{array} { r } { w _ { \\mathrm { E F S } } : = \\operatorname * { a r g m i n } _ { w \\in [ 0 , 1 ] ^ { d } } \\sum _ { i = 1 } ^ { d } w _ { i } + \\lambda \\mathbb { E } _ { r } [ f _ { c } ( \\bar { x } _ { w , r } ) ] . } \\end{array}\n$$",
640
+ "text_format": "latex",
641
+ "bbox": [
642
+ 325,
643
+ 584,
644
+ 673,
645
+ 607
646
+ ],
647
+ "page_idx": 4
648
+ },
649
+ {
650
+ "type": "text",
651
+ "text": "Definition 3.3 (Continuous IFS (C-IFS)). Find the vector $w \\in [ 0 , 1 ] ^ { d }$ such that (i) the amount of corruption $\\textstyle \\sum _ { i = 1 } ^ { d } w _ { i }$ is large, and (ii) the corrupted data $\\bar { x } _ { w , r }$ has large intensity at class $c$ : ",
652
+ "bbox": [
653
+ 171,
654
+ 613,
655
+ 823,
656
+ 647
657
+ ],
658
+ "page_idx": 4
659
+ },
660
+ {
661
+ "type": "equation",
662
+ "img_path": "images/95b9f2cbdf1d69fe79919ab5529d71cef67c9559fa753982a21f5191e44b4af3.jpg",
663
+ "text": "$$\n\\begin{array} { r } { w _ { \\mathrm { I F S } } : = \\operatorname * { a r g m a x } _ { w \\in [ 0 , 1 ] ^ { d } } \\sum _ { i = 1 } ^ { d } w _ { i } + \\lambda \\mathbb { E } _ { r } [ f _ { c } ( \\bar { x } _ { w , r } ) ] . } \\end{array}\n$$",
664
+ "text_format": "latex",
665
+ "bbox": [
666
+ 325,
667
+ 654,
668
+ 673,
669
+ 676
670
+ ],
671
+ "page_idx": 4
672
+ },
673
+ {
674
+ "type": "text",
675
+ "text": "For C-EFS and C-IFS, the feature attribution scores can be defined as $s _ { i } = w _ { \\mathrm { E F S } , i }$ and $s _ { i } = 1 -$ $w _ { \\mathrm { I F S } , i }$ , respectively. We note that, for a differentiable model $f$ , the objective functions of C-EFS (3.2) and C-IFS (3.3) are differentiable. Therefore, these problems can be solved using gradientbased optimization methods such as SGD and Adam (Kingma & Ba, 2014). ",
676
+ "bbox": [
677
+ 173,
678
+ 689,
679
+ 825,
680
+ 744
681
+ ],
682
+ "page_idx": 4
683
+ },
684
+ {
685
+ "type": "text",
686
+ "text": "Fong & Vedaldi (2017) first introduced the formulation of C-EFS, and they proposed Meaningful Perturbation by adding a smoothness penalty term to C-EFS. PertMap (Hara et al., 2018; Ikeno & Hara, 2018), another optimization-based method, can be interpreted as a variant of C-IFS. PertMap is equivalent to C-IFS with the term $\\mathbb { E } _ { r } [ f _ { c } ( \\bar { x } _ { w , r } ) ]$ replaced with the hinge penalty term $\\begin{array} { r } { \\sum _ { j \\neq c } \\bar { \\mathbb { E } } _ { r } [ \\operatorname* { m i n } ( 0 , f _ { c } ( \\bar { x } _ { w , r } ) - f _ { j } ( \\bar { x } _ { w , r } ) ) ] } \\end{array}$ that penalizes $w$ only when the corrupted data is classified into other classes. See Appendix A for the detail. ",
687
+ "bbox": [
688
+ 174,
689
+ 751,
690
+ 825,
691
+ 837
692
+ ],
693
+ "page_idx": 4
694
+ },
695
+ {
696
+ "type": "text",
697
+ "text": "3.3 GRADIENT-BASED APPROACHES",
698
+ "text_level": 1,
699
+ "bbox": [
700
+ 176,
701
+ 854,
702
+ 437,
703
+ 868
704
+ ],
705
+ "page_idx": 4
706
+ },
707
+ {
708
+ "type": "text",
709
+ "text": "Many feature attribution methods are based on the gradient of the model’s output ∂fc(x) . ∂xi Here, we point out that those gradient-based feature attribution methods can be interpreted as one-step gradient descent/ascent approximations for C-EFS and C-IFS. If we consider solving the problems (3.2) and (3.3) using gradient descent/ascent with the initial $w$ set to zeros, i.e. $w = 0 _ { d }$ , then, the first step of the optimization can be expressed as $\\begin{array} { r } { w _ { i } 0 \\pm \\eta \\{ \\mathbb { E } _ { r } [ \\frac { \\partial f _ { c } ( \\bar { x } _ { w , r } ) } { \\partial w _ { i } } \\Big | _ { w = 0 _ { d } } ] + \\lambda \\} \\propto } \\end{array}$ $\\begin{array} { r } { \\frac { \\partial f _ { c } ( x ) } { \\partial x _ { i } } ( \\mu _ { i } - x _ { i } ) + \\lambda } \\end{array}$ , where $\\eta > 0$ is the step size and $\\mu _ { i } : = \\mathbb { E } _ { r } [ r _ { i } ]$ . Here, because the penalty $\\lambda$ and the step size $\\eta$ are common across all the features, ${ \\frac { \\partial f _ { c } ( x ) } { \\partial x _ { i } } } ( \\mu _ { i } - x _ { i } )$ is the essential term that determines the size of $w _ { i }$ . This finding naturally connects EFS/IFS and the gradient-based feature attribution methods. See Appendix $\\mathbf { B }$ for the details. ",
710
+ "bbox": [
711
+ 174,
712
+ 875,
713
+ 825,
714
+ 924
715
+ ],
716
+ "page_idx": 4
717
+ },
718
+ {
719
+ "type": "text",
720
+ "text": "",
721
+ "bbox": [
722
+ 173,
723
+ 103,
724
+ 825,
725
+ 215
726
+ ],
727
+ "page_idx": 5
728
+ },
729
+ {
730
+ "type": "text",
731
+ "text": "4 EFS AND IFS AS EVALUATION METRIC ",
732
+ "text_level": 1,
733
+ "bbox": [
734
+ 176,
735
+ 238,
736
+ 534,
737
+ 255
738
+ ],
739
+ "page_idx": 5
740
+ },
741
+ {
742
+ "type": "text",
743
+ "text": "The ideas of EFS and IFS can be used as metrics for evaluating the performance of feature attribution methods. Suppose that the feature attribution score $s \\in \\mathbb { R } ^ { d }$ is given. ",
744
+ "bbox": [
745
+ 174,
746
+ 271,
747
+ 823,
748
+ 299
749
+ ],
750
+ "page_idx": 5
751
+ },
752
+ {
753
+ "type": "text",
754
+ "text": "EFS-based Metric The principle of EFS is that “crucial attribution should change the model’s decision by corrupting only a small number of relevant features”. For $q \\in [ 0 , 1 ]$ , let the set of the top- $100 q \\%$ relevant features be $S _ { q } : = \\{ i : s _ { i } \\geq t _ { q } \\}$ , where $t _ { q }$ is the $1 0 0 q$ -th largest percentile in $s$ so that $| S _ { q } | = q d$ . Then, we can draw a curve showing the trade-off between the ratio of corrupted relevant features and the degree of the output change (Samek et al., 2017). For example, as the degree of the output changes, we can use the expected difference in intensity: $g _ { c } ^ { \\mathrm { i n t e n s i t y } } ( \\bar { S _ { q } } ) : = \\mathbb { E } _ { r } [ f _ { c } ( \\bar { x } ) -$ $f _ { c } ( x _ { S _ { q } , r } ) ]$ , and the probability of label mismatch: $g _ { c } ^ { \\mathrm { l a b e l } } ( S _ { q } ) : = \\mathbb { E } _ { r } [ \\mathbb { I } ( c \\neq \\operatorname { a r g m a x } _ { j } f _ { j } ( x _ { S _ { q } , r } ) ) ]$ . The trade-off curve usually shows an increasing trend, and the area under the curve can be used as a measure of how quickly the output changes with an increase in the ratio of corrupted features (see Figure 4). In this paper, we refer to this area as Area Under the EFS-Curve (AUEC). ",
755
+ "bbox": [
756
+ 173,
757
+ 306,
758
+ 825,
759
+ 448
760
+ ],
761
+ "page_idx": 5
762
+ },
763
+ {
764
+ "type": "text",
765
+ "text": "IFS-based Metric The principle of IFS is that “crucial attribution should maintain the model’s output even if many irrelevant features are corrupted”. Similar to EFS, we can construct an IFSbased metric based on this principle. Let $S _ { q } : = \\{ i : s _ { i } \\geq t _ { q } \\}$ be the top- $100 q \\%$ relevant features, as defined above. We then corrupt irrelevant features other than $S _ { q }$ , i.e. $\\bar { S } _ { q } : = [ d ] \\setminus S _ { q }$ . We can then draw a curve showing the trade-off between the ratio of corrupted irrelevant features and the degree of the output change such as $g _ { c } ^ { \\mathrm { i n t e n s i t y } } \\left( \\bar { S } _ { q } \\right)$ and $g _ { c } ^ { \\mathrm { l a b e l } } ( \\bar { S } _ { q } )$ . The trade-off curve usually shows an increasing trend with an increase in the ratio of corrupted features (see Figure 4). Therefore, the area over the curve can be used as a measure of how resistant the model’s decision is against the feature corruption. In this paper, we refer to this area as Area Over the IFS-Curve (AOIC). ",
766
+ "bbox": [
767
+ 173,
768
+ 454,
769
+ 825,
770
+ 580
771
+ ],
772
+ "page_idx": 5
773
+ },
774
+ {
775
+ "type": "text",
776
+ "text": "5 EFS VS. IFS ",
777
+ "text_level": 1,
778
+ "bbox": [
779
+ 176,
780
+ 603,
781
+ 312,
782
+ 619
783
+ ],
784
+ "page_idx": 5
785
+ },
786
+ {
787
+ "type": "text",
788
+ "text": "(Q3) What is an appropriate definition of relevance? ",
789
+ "text_level": 1,
790
+ "bbox": [
791
+ 174,
792
+ 637,
793
+ 519,
794
+ 651
795
+ ],
796
+ "page_idx": 5
797
+ },
798
+ {
799
+ "type": "text",
800
+ "text": "To answer this question, we compare EFS and IFS through exhaustive experiments. Our results indicate that EFS has several drawbacks, and we therefore argue that IFS-Relevance is better suited for the feature attribution problem. ",
801
+ "bbox": [
802
+ 176,
803
+ 659,
804
+ 825,
805
+ 700
806
+ ],
807
+ "page_idx": 5
808
+ },
809
+ {
810
+ "type": "text",
811
+ "text": "5.1 EXPERIMENTAL SETUP ",
812
+ "text_level": 1,
813
+ "bbox": [
814
+ 176,
815
+ 720,
816
+ 375,
817
+ 734
818
+ ],
819
+ "page_idx": 5
820
+ },
821
+ {
822
+ "type": "text",
823
+ "text": "Models and Data As the target model $f$ to be explained, we adopted three pre-trained models, namely VGG16 (Simonyan & Zisserman, 2014), ResNet V2 with depth 152 (He et al., 2016), and Inception V3 (Szegedy et al., 2016), which were distributed at the Tensorflow repository1. As the target data $x$ to be explained, we selected 200 images from the validation set at ILSVRC2014 (Russakovsky et al., 2014) which were correctly classified by the three models. ",
824
+ "bbox": [
825
+ 174,
826
+ 747,
827
+ 825,
828
+ 818
829
+ ],
830
+ "page_idx": 5
831
+ },
832
+ {
833
+ "type": "text",
834
+ "text": "Feature Attribution Methods In the experiments, we adopted several feature attribution methods for comparison: Grad (Simonyan et al., 2013), Grad $\\times$ Input (Shrikumar et al., 2016), GuidedBP (Springenberg et al., 2014), SmoothGrad (Smilkov et al., 2017; Hooker et al., 2018), IntGrad (Sundararajan et al., 2017), LRP (Bach et al., 2015), DeepLIFT (Shrikumar et al., 2017), Occlusion (Zeiler & Fergus, 2014), and PertMap (Hara et al., 2018; Ikeno & Hara, 2018). Grad, ",
835
+ "bbox": [
836
+ 173,
837
+ 825,
838
+ 825,
839
+ 895
840
+ ],
841
+ "page_idx": 5
842
+ },
843
+ {
844
+ "type": "text",
845
+ "text": "Grad $\\times$ Input, GuidedBP, SmoothGrad, and IntGrad were implemented using saliency2 with default settings, and LRP, DeepLIFT, and Occlusion were implemented using DeepExplain3, where we set the mask size for Occlusion as $6 4 \\times 6 4$ with the stride set to 16. We implemented PertMap based on the sample code4. We also adopted random attribution as the baseline where the score for each feature was generated uniformly random over $[ 0 , 1 ]$ . ",
846
+ "bbox": [
847
+ 174,
848
+ 103,
849
+ 825,
850
+ 174
851
+ ],
852
+ "page_idx": 6
853
+ },
854
+ {
855
+ "type": "text",
856
+ "text": "In addition to the existing feature attribution methods, we implemented the following EFS-based and IFS-based methods: Greedy-EFS, which solves the problem (2.2) using a greedy algorithm; GradEFS, which solves the problem (3.2) using gradient descent; Greedy-IFS, which solves the problem (2.3) using a greedy algorithm; and Grad-IFS, which solves the problem (3.3) using gradient ascent. The details of these methods can be found in Appendix C. ",
857
+ "bbox": [
858
+ 174,
859
+ 180,
860
+ 825,
861
+ 250
862
+ ],
863
+ "page_idx": 6
864
+ },
865
+ {
866
+ "type": "text",
867
+ "text": "Evaluation For evaluating AUEC and AOIC, we prepared two noise distributions $p ( r )$ . The first distribution is a uniform distribution: each $r$ is independently sampled from the uniform distribution over $[ 0 , 1 ] ^ { d }$ . The second distribution is a distribution over real images. We selected 100 images from the validation set at ILSVRC2014, with no overlap with the 200 images to be explained. Then, from those 100 images, we randomly selected an image as the noise $r$ . To compute AUEC and AOIC, we varied the percentile $q$ from zero to one, and for each $q$ , we computed the difference scores $g _ { c } ^ { \\mathrm { l a b e l } } ( S _ { q } )$ and ${ \\dot { g } } _ { c } ^ { \\mathrm { l a b e l } } ( { \\bar { S } } _ { q } )$ using empirical averages under those two noise distributions. ",
868
+ "bbox": [
869
+ 173,
870
+ 257,
871
+ 825,
872
+ 354
873
+ ],
874
+ "page_idx": 6
875
+ },
876
+ {
877
+ "type": "text",
878
+ "text": "5.2 RESULTS ",
879
+ "text_level": 1,
880
+ "bbox": [
881
+ 174,
882
+ 373,
883
+ 277,
884
+ 388
885
+ ],
886
+ "page_idx": 6
887
+ },
888
+ {
889
+ "type": "text",
890
+ "text": "For each model, we computed the attribution scores for all 200 images using each of the 14 feature attribution methods. We then computed AUEC and AOIC under the two noise distributions. ",
891
+ "bbox": [
892
+ 176,
893
+ 401,
894
+ 823,
895
+ 429
896
+ ],
897
+ "page_idx": 6
898
+ },
899
+ {
900
+ "type": "text",
901
+ "text": "Our main result is summarized in Table 1. Table 1 shows the AUEC and AOIC for VGG16 for the 200 images under uniform noise. We moved the results for the other models and the corruption with real images to Appendix D, as those results are similar. Here, we point out that there are three important observations in the table. ",
902
+ "bbox": [
903
+ 174,
904
+ 435,
905
+ 825,
906
+ 491
907
+ ],
908
+ "page_idx": 6
909
+ },
910
+ {
911
+ "type": "text",
912
+ "text": "EFS found adversarial example. Grad-EFS attained the highest AUEC. This indicates that GradEFS is nearly optimal under the principle of EFS: Grad-EFS can change the model’s decision by corrupting only a small number of relevant features. Indeed, as shown in Figure 4, Grad-EFS has a sharp increase in the EFS-Curve 5. Specifically, it shows that Grad-EFS successfully changed the model’s decision for more than $80 \\%$ of the data by corrupting only a few percent of the pixels. Similar tendencies were also observed for ResNet V2 and Inception V3 (see Appendix D). ",
913
+ "bbox": [
914
+ 173,
915
+ 500,
916
+ 823,
917
+ 583
918
+ ],
919
+ "page_idx": 6
920
+ },
921
+ {
922
+ "type": "text",
923
+ "text": "An important observation is that the heatmap of Grad-EFS is just a shot noise, as shown in Figure 5. This is because EFS is very similar to adversarial example (Szegedy et al., 2013). In adversarial example, one seeks the minimum data perturbation that changes the model’s output. In EFS (2.2), instead of the data perturbation, one searches for a small number of corrupted features that reduces the class intensity. Similarly, C-EFS (3.2) searches for a continuous corruption with the minimum $\\ell _ { 1 }$ norm. ",
924
+ "bbox": [
925
+ 174,
926
+ 589,
927
+ 825,
928
+ 672
929
+ ],
930
+ "page_idx": 6
931
+ },
932
+ {
933
+ "type": "text",
934
+ "text": "Random attribution performed comparably well with existing methods. The random attribution attained AUEC similar to that of methods such as Grad $\\times$ Input, IntGrad, LRP, and Occlusion, especially for VGG16. Indeed, as shown in Figure 4, the EFS-Curve of random attribution is close to those methods. It is a bit surprising to observe that we can attain a good trade-off in EFS just by randomly scoring each feature without looking at the images. This observation indicates that there are only subtle differences between good attributions and random attributions under EFS, especially for VGG16. ",
935
+ "bbox": [
936
+ 173,
937
+ 680,
938
+ 825,
939
+ 777
940
+ ],
941
+ "page_idx": 6
942
+ },
943
+ {
944
+ "type": "text",
945
+ "text": "Grad-IFS significantly outperformed the other methods. On AOIC, Grad-IFS significantly outperformed the other methods, and PertMap attained the second best result. As shown in Figure 4, Grad-IFS is very resistant against the corruption of irrelevant features. Indeed, even if $80 \\%$ of the pixels are corrupted, the model’s decision is kept unchanged for more than $80 \\%$ of the images. This means that Grad-IFS is capable of identifying irrelevant features better than any other methods. Another interesting point that can be seen in Figure 4 is that, the IFS-Curves vary significantly across different methods. More importantly, unlike EFS, the IFS-Curve can distinguish random attributions and other attributions well. ",
946
+ "bbox": [
947
+ 174,
948
+ 785,
949
+ 823,
950
+ 854
951
+ ],
952
+ "page_idx": 6
953
+ },
954
+ {
955
+ "type": "table",
956
+ "img_path": "images/2fbed8540cc5fb95974ba78508452a9dc879c1c726c4202a6173f8627fc1b4e1.jpg",
957
+ "table_caption": [
958
+ "Table 1: Average AUEC and AOIC under the uniform noise. The top-three scores are highlighted as ${ 1 } \\mathrm { s t } ^ { * }$ , $2 \\mathrm { n d } ^ { \\ast \\ast }$ , and $3 \\mathrm { r d } ^ { * * * }$ . "
959
+ ],
960
+ "table_footnote": [],
961
+ "table_body": "<table><tr><td colspan=\"2\">VGG16</td></tr><tr><td></td><td>AUEC AOIC 0.366</td></tr><tr><td>Greedy-EFS</td><td>0.844 0.946*</td></tr><tr><td>Grad-EFS</td><td>0.195</td></tr><tr><td>Greedy-IFS</td><td>0.746 0.622***</td></tr><tr><td>Grad-IFS</td><td>0.873 0.876*</td></tr><tr><td>Grad</td><td>0.867 0.341</td></tr><tr><td>Grad×Input</td><td>0.823 0.318</td></tr><tr><td>SmoothGrad</td><td>0.882 0.593</td></tr><tr><td>GuidedBP</td><td>0.918** 0.455</td></tr><tr><td>IntGrad</td><td>0.837 0.346</td></tr><tr><td>LRP</td><td>0.823 0.318</td></tr><tr><td>DeepLIFT</td><td>0.862 0.435</td></tr><tr><td>Occlusion</td><td>0.811 0.559</td></tr><tr><td>PertMap</td><td>0.886*** 0.780**</td></tr><tr><td>Random</td><td>0.839 0.160</td></tr></table>",
962
+ "bbox": [
963
+ 176,
964
+ 202,
965
+ 434,
966
+ 425
967
+ ],
968
+ "page_idx": 7
969
+ },
970
+ {
971
+ "type": "image",
972
+ "img_path": "images/9c67eb5a490e7f726ebac40720720b6c0c1e23f12434bacb94afaaaa89859e07.jpg",
973
+ "image_caption": [
974
+ "Figure 4: Average EFS-Curve and IFS-Curve. "
975
+ ],
976
+ "image_footnote": [],
977
+ "bbox": [
978
+ 468,
979
+ 103,
980
+ 795,
981
+ 428
982
+ ],
983
+ "page_idx": 7
984
+ },
985
+ {
986
+ "type": "image",
987
+ "img_path": "images/98ee7dd402f94319a422b6ee772a5dcad6000134361a86730d979af8ef291839.jpg",
988
+ "image_caption": [
989
+ "Figure 5: Attributions on VGG16: The red colored pixels are found to be strongly relevant with each method. "
990
+ ],
991
+ "image_footnote": [],
992
+ "bbox": [
993
+ 189,
994
+ 469,
995
+ 815,
996
+ 535
997
+ ],
998
+ "page_idx": 7
999
+ },
1000
+ {
1001
+ "type": "text",
1002
+ "text": "",
1003
+ "bbox": [
1004
+ 178,
1005
+ 614,
1006
+ 823,
1007
+ 657
1008
+ ],
1009
+ "page_idx": 7
1010
+ },
1011
+ {
1012
+ "type": "text",
1013
+ "text": "Figure 5 shows the examples of the attributions obtained by each method. It is important to note that the top-three AOIC methods, namely Grad-IFS, PertMap, and SmoothGrad, have highlighted only the dog face. The high AOICs on these methods indicate that the model has made the decision based on the dog face. In contrast, the other methods tend to generate noisy attributions over the entire body of the dog, which are false explanations from the perspective of IFS because their AOICs are far smaller than that of Grad-IFS: the noisy attributions failed to capture essential pixels in the image. ",
1014
+ "bbox": [
1015
+ 173,
1016
+ 665,
1017
+ 825,
1018
+ 762
1019
+ ],
1020
+ "page_idx": 7
1021
+ },
1022
+ {
1023
+ "type": "text",
1024
+ "text": "6 CONCLUSION ",
1025
+ "text_level": 1,
1026
+ "bbox": [
1027
+ 174,
1028
+ 799,
1029
+ 318,
1030
+ 814
1031
+ ],
1032
+ "page_idx": 7
1033
+ },
1034
+ {
1035
+ "type": "text",
1036
+ "text": "In this study, we formalized the feature attribution problem as two types of feature selection problems, which we named as EFS and IFS. Based on EFS and IFS, we clarified that the existing feature attribution methods can be interpreted as approximation algorithms for EFS and IFS. Then, through exhaustive experiments, we clarified that IFS is better suited as the formalization for the feature attribution problem; we observed that EFS has several unfavorable properties and concluded that EFS is not an appropriate formalization. ",
1037
+ "bbox": [
1038
+ 174,
1039
+ 839,
1040
+ 825,
1041
+ 924
1042
+ ],
1043
+ "page_idx": 7
1044
+ },
1045
+ {
1046
+ "type": "text",
1047
+ "text": "REFERENCES ",
1048
+ "text_level": 1,
1049
+ "bbox": [
1050
+ 176,
1051
+ 103,
1052
+ 287,
1053
+ 117
1054
+ ],
1055
+ "page_idx": 8
1056
+ },
1057
+ {
1058
+ "type": "text",
1059
+ "text": "Sebastian Bach, Alexander Binder, Gregoire Montavon, Frederick Klauschen, Klaus-Robert M ´ uller, ¨ and Wojciech Samek. On pixel-wise explanations for non-linear classifier decisions by layer-wise relevance propagation. PloS ONE, 10(7):e0130140, 2015. ",
1060
+ "bbox": [
1061
+ 174,
1062
+ 126,
1063
+ 823,
1064
+ 167
1065
+ ],
1066
+ "page_idx": 8
1067
+ },
1068
+ {
1069
+ "type": "text",
1070
+ "text": "Jianbo Chen, Le Song, Martin Wainwright, and Michael Jordan. Learning to explain: An information-theoretic perspective on model interpretation. In Proceedings of the 35th International Conference on Machine Learning, pp. 882–891, 2018. ",
1071
+ "bbox": [
1072
+ 173,
1073
+ 176,
1074
+ 823,
1075
+ 219
1076
+ ],
1077
+ "page_idx": 8
1078
+ },
1079
+ {
1080
+ "type": "text",
1081
+ "text": "Yanzhuo Ding, Yang Liu, Huanbo Luan, and Maosong Sun. Visualizing and understanding neural machine translation. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, pp. 1150–1159, 2017. ",
1082
+ "bbox": [
1083
+ 176,
1084
+ 227,
1085
+ 823,
1086
+ 270
1087
+ ],
1088
+ "page_idx": 8
1089
+ },
1090
+ {
1091
+ "type": "text",
1092
+ "text": "Ruth C Fong and Andrea Vedaldi. Interpretable explanations of black boxes by meaningful perturbation. In Proceeding of the IEEE International Conference on Computer Vision, pp. 3449 – 3457, 2017. ",
1093
+ "bbox": [
1094
+ 174,
1095
+ 279,
1096
+ 823,
1097
+ 320
1098
+ ],
1099
+ "page_idx": 8
1100
+ },
1101
+ {
1102
+ "type": "text",
1103
+ "text": "Satoshi Hara, Kouichi Ikeno, Tasuku Soma, and Takanori Maehara. Maximally invariant data perturbation as explanation. arXiv:1806.07004, 2018. ",
1104
+ "bbox": [
1105
+ 173,
1106
+ 329,
1107
+ 823,
1108
+ 358
1109
+ ],
1110
+ "page_idx": 8
1111
+ },
1112
+ {
1113
+ "type": "text",
1114
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In European conference on computer vision, pp. 630–645. Springer, 2016. ",
1115
+ "bbox": [
1116
+ 173,
1117
+ 366,
1118
+ 823,
1119
+ 396
1120
+ ],
1121
+ "page_idx": 8
1122
+ },
1123
+ {
1124
+ "type": "text",
1125
+ "text": "Sara Hooker, Dumitru Erhan, Pieter-Jan Kindermans, and Been Kim. Evaluating feature importance estimates. arXiv:1806.10758, 2018. ",
1126
+ "bbox": [
1127
+ 174,
1128
+ 404,
1129
+ 823,
1130
+ 433
1131
+ ],
1132
+ "page_idx": 8
1133
+ },
1134
+ {
1135
+ "type": "text",
1136
+ "text": "Kouichi Ikeno and Satoshi Hara. Maximizing invariant data perturbation with stochastic optimization. arXiv:1807.05077, 2018. ",
1137
+ "bbox": [
1138
+ 171,
1139
+ 440,
1140
+ 823,
1141
+ 469
1142
+ ],
1143
+ "page_idx": 8
1144
+ },
1145
+ {
1146
+ "type": "text",
1147
+ "text": "Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv:1412.6980, 2014. ",
1148
+ "bbox": [
1149
+ 173,
1150
+ 477,
1151
+ 823,
1152
+ 507
1153
+ ],
1154
+ "page_idx": 8
1155
+ },
1156
+ {
1157
+ "type": "text",
1158
+ "text": "Scott M Lundberg and Su-In Lee. A unified approach to interpreting model predictions. In Proceedings of Advances in Neural Information Processing Systems, pp. 4765–4774, 2017. ",
1159
+ "bbox": [
1160
+ 171,
1161
+ 515,
1162
+ 823,
1163
+ 545
1164
+ ],
1165
+ "page_idx": 8
1166
+ },
1167
+ {
1168
+ "type": "text",
1169
+ "text": "Gregoire Montavon, Sebastian Lapuschkin, Alexander Binder, Wojciech Samek, and Klaus-Robert ´ Muller. Explaining nonlinear classification decisions with deep taylor decomposition. ¨ Pattern Recognition, 65:211–222, 2017. ",
1170
+ "bbox": [
1171
+ 176,
1172
+ 551,
1173
+ 823,
1174
+ 594
1175
+ ],
1176
+ "page_idx": 8
1177
+ },
1178
+ {
1179
+ "type": "text",
1180
+ "text": "Marco Tulio Ribeiro, Sameer Singh, and Carlos Guestrin. Why should i trust you?: Explaining the predictions of any classifier. In Proceedings of the 22nd ACM SIGKDD international conference on knowledge discovery and data mining, pp. 1135–1144. ACM, 2016. ",
1181
+ "bbox": [
1182
+ 174,
1183
+ 603,
1184
+ 823,
1185
+ 646
1186
+ ],
1187
+ "page_idx": 8
1188
+ },
1189
+ {
1190
+ "type": "text",
1191
+ "text": "Marco Tulio Ribeiro, Sameer Singh, and Carlos Guestrin. Anchors: High-precision model-agnostic explanations. In Proceedings of the 32nd AAAI Conference on Artificial Intelligence, pp. 1527– 1535, 2018. ",
1192
+ "bbox": [
1193
+ 173,
1194
+ 654,
1195
+ 823,
1196
+ 696
1197
+ ],
1198
+ "page_idx": 8
1199
+ },
1200
+ {
1201
+ "type": "text",
1202
+ "text": "Olga Russakovsky, Sanjeev Satheesh, Jia Deng, Sean Ma, Hao Su, Zhiheng Huang, Jonathan Krause, Andrej Karpathy, Alexander C Berg, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. Technical report, 2014. ",
1203
+ "bbox": [
1204
+ 176,
1205
+ 704,
1206
+ 823,
1207
+ 748
1208
+ ],
1209
+ "page_idx": 8
1210
+ },
1211
+ {
1212
+ "type": "text",
1213
+ "text": "Wojciech Samek, Alexander Binder, Gregoire Montavon, Sebastian Lapuschkin, and Klaus-Robert ´ Muller. Evaluating the visualization of what a deep neural network has learned. ¨ IEEE transactions on neural networks and learning systems, 28(11):2660–2673, 2017. ",
1214
+ "bbox": [
1215
+ 174,
1216
+ 756,
1217
+ 825,
1218
+ 799
1219
+ ],
1220
+ "page_idx": 8
1221
+ },
1222
+ {
1223
+ "type": "text",
1224
+ "text": "Avanti Shrikumar, Peyton Greenside, Anna Shcherbina, and Anshul Kundaje. Not just a black box: Learning important features through propagating activation differences. arXiv:1605.1713, 2016. ",
1225
+ "bbox": [
1226
+ 176,
1227
+ 806,
1228
+ 821,
1229
+ 837
1230
+ ],
1231
+ "page_idx": 8
1232
+ },
1233
+ {
1234
+ "type": "text",
1235
+ "text": "Avanti Shrikumar, Peyton Greenside, and Anshul Kundaje. Learning important features through propagating activation differences. In Proceedings of International Conference on Machine Learning, pp. 3145–3153, 2017. ",
1236
+ "bbox": [
1237
+ 174,
1238
+ 844,
1239
+ 823,
1240
+ 887
1241
+ ],
1242
+ "page_idx": 8
1243
+ },
1244
+ {
1245
+ "type": "text",
1246
+ "text": "Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv:1409.1556, 2014. ",
1247
+ "bbox": [
1248
+ 173,
1249
+ 895,
1250
+ 821,
1251
+ 924
1252
+ ],
1253
+ "page_idx": 8
1254
+ },
1255
+ {
1256
+ "type": "text",
1257
+ "text": "Karen Simonyan, Andrea Vedaldi, and Andrew Zisserman. Deep inside convolutional networks: Visualising image classification models and saliency maps. arXiv:1312.6034, 2013. \nDaniel Smilkov, Nikhil Thorat, Been Kim, Fernanda Viegas, and Martin Wattenberg. Smoothgrad: ´ removing noise by adding noise. arXiv:1706.03825, 2017. \nJost Tobias Springenberg, Alexey Dosovitskiy, Thomas Brox, and Martin Riedmiller. Striving for simplicity: The all convolutional net. arXiv:1412.6806, 2014. \nMukund Sundararajan, Ankur Taly, and Qiqi Yan. Axiomatic attribution for deep networks. arXiv:1703.01365, 2017. \nChristian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. arXiv:1312.6199, 2013. \nChristian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 2818–2826, 2016. \nMatthew D Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In Proceedings of European Conference on Computer Vision, pp. 818–833. Springer, 2014. \nJianming Zhang, Zhe Lin, Jonathan Brandt, Xiaohui Shen, and Stan Sclaroff. Top-down neural attention by excitation backprop. In Proceedings of European Conference on Computer Vision, pp. 543–559. Springer, 2016. \nBolei Zhou, Aditya Khosla, Agata Lapedriza, Aude Oliva, and Antonio Torralba. Object detectors emerge in deep scene cnns. arXiv:1412.6856, 2014. ",
1258
+ "bbox": [
1259
+ 171,
1260
+ 103,
1261
+ 826,
1262
+ 467
1263
+ ],
1264
+ "page_idx": 9
1265
+ },
1266
+ {
1267
+ "type": "text",
1268
+ "text": "SUPPLEMENTARY MATERIAL FOR “FEATURE ATTRIBUTION AS FEATURE SELECTION” ",
1269
+ "text_level": 1,
1270
+ "bbox": [
1271
+ 176,
1272
+ 98,
1273
+ 823,
1274
+ 137
1275
+ ],
1276
+ "page_idx": 10
1277
+ },
1278
+ {
1279
+ "type": "text",
1280
+ "text": "Preliminaries We define the data-dependent noise by $r _ { x }$ as follows: ",
1281
+ "bbox": [
1282
+ 174,
1283
+ 184,
1284
+ 632,
1285
+ 199
1286
+ ],
1287
+ "page_idx": 10
1288
+ },
1289
+ {
1290
+ "type": "equation",
1291
+ "img_path": "images/bcb01817e29bf08e9b4f0bc1ba9c30eadd155ff06974912c12c4fb39b13ae095.jpg",
1292
+ "text": "$$\nr _ { x } : = x + u ,\n$$",
1293
+ "text_format": "latex",
1294
+ "bbox": [
1295
+ 454,
1296
+ 202,
1297
+ 542,
1298
+ 217
1299
+ ],
1300
+ "page_idx": 10
1301
+ },
1302
+ {
1303
+ "type": "text",
1304
+ "text": "where we assume that the perturbation $u$ follows a distribution $p ( u )$ with $\\mathbb { E } _ { u } [ u ] = 0$ . The continuous corruption with the noise $r _ { x }$ is then expressed as ",
1305
+ "bbox": [
1306
+ 173,
1307
+ 218,
1308
+ 823,
1309
+ 247
1310
+ ],
1311
+ "page_idx": 10
1312
+ },
1313
+ {
1314
+ "type": "equation",
1315
+ "img_path": "images/9d75227fbde5245d9b438fc53db827f15e22867722d49fe15e1a85d5b6091ef3.jpg",
1316
+ "text": "$$\n( \\bar { x } _ { w , r _ { x } } ) _ { i } = ( 1 - w _ { i } ) x _ { i } + w _ { i } r _ { x , i } = x _ { i } + w _ { i } u _ { i } .\n$$",
1317
+ "text_format": "latex",
1318
+ "bbox": [
1319
+ 344,
1320
+ 250,
1321
+ 650,
1322
+ 266
1323
+ ],
1324
+ "page_idx": 10
1325
+ },
1326
+ {
1327
+ "type": "text",
1328
+ "text": "That is, the continuous corruption $\\hat { x } _ { w , r _ { x } }$ is centered at the data $x$ . Moreover, $\\hat { x } _ { w , r _ { x } }$ distributes around $x$ with the magnitude $w$ . The data-dependent noise and this continuous corruption plays an important role when interpreting some of the existing feature attribution methods as EFS and IFS. ",
1329
+ "bbox": [
1330
+ 174,
1331
+ 267,
1332
+ 825,
1333
+ 310
1334
+ ],
1335
+ "page_idx": 10
1336
+ },
1337
+ {
1338
+ "type": "text",
1339
+ "text": "A OPTIMIZATION-BASED FEATURE ATTRIBUTION METHODS AS EFS/IFS ",
1340
+ "text_level": 1,
1341
+ "bbox": [
1342
+ 171,
1343
+ 327,
1344
+ 800,
1345
+ 345
1346
+ ],
1347
+ "page_idx": 10
1348
+ },
1349
+ {
1350
+ "type": "text",
1351
+ "text": "Meaningful Perturbation (Fong & Vedaldi, 2017) is a variant of C-EFS defined below: ",
1352
+ "bbox": [
1353
+ 174,
1354
+ 358,
1355
+ 736,
1356
+ 373
1357
+ ],
1358
+ "page_idx": 10
1359
+ },
1360
+ {
1361
+ "type": "equation",
1362
+ "img_path": "images/600635d873b35ee4944443015e9284ad7fd11c102919cec8ae67b573375b780d.jpg",
1363
+ "text": "$$\n\\operatorname* { m i n } _ { w \\in [ 0 , 1 ] ^ { d } } \\sum _ { i = 1 } ^ { d } w _ { i } + \\lambda f _ { c } ( \\bar { x } _ { w , r } ) + \\phi _ { \\mathrm { s m o o t h } } ( w ) .\n$$",
1364
+ "text_format": "latex",
1365
+ "bbox": [
1366
+ 354,
1367
+ 375,
1368
+ 643,
1369
+ 417
1370
+ ],
1371
+ "page_idx": 10
1372
+ },
1373
+ {
1374
+ "type": "text",
1375
+ "text": "The differences from C-EFS (3.2) are (i) it uses a fixed noise $r$ instead of the expectation, and (ii) the additional penalty term $\\phi _ { \\mathrm { s m o o t h } } ( w )$ is added so that $w$ to be smooth. Here, the smoothness penalty is essential for Meaningful Perturbation. Fong $\\&$ Vedaldi (2017) have reported that the solution to the problem (A.1) without the smoothness penalty tends to be seemingly meaningless attributions. This is because C-EFS is very similar to the $\\ell _ { 1 }$ penalized adversarial example, as we have discussed in Section 5. Therefore, we need to design an appropriate penalty term $\\phi _ { \\mathrm { s m o o t h } }$ to obtain reasonable attributions using Meaningful Perturbation. ",
1376
+ "bbox": [
1377
+ 173,
1378
+ 417,
1379
+ 825,
1380
+ 516
1381
+ ],
1382
+ "page_idx": 10
1383
+ },
1384
+ {
1385
+ "type": "text",
1386
+ "text": "PertMap (Hara et al., 2018; Ikeno & Hara, 2018) can be interpreted as a variant of C-IFS. PertMap finds irrelevant features by maximizing the data perturbation. Let $\\hat { x } _ { w , r _ { x } }$ be the continuous corruption of the data $x$ with a data-dependent noise $r _ { x }$ , where the parameter $w$ determine the magnitude of the data perturbation. In PertMap, one seeks for the maximum data perturbation that maintains the classification result unchanged from the original class $c$ . The optimization problem of $w$ is defined as follows (Ikeno & Hara, 2018): ",
1387
+ "bbox": [
1388
+ 173,
1389
+ 522,
1390
+ 825,
1391
+ 606
1392
+ ],
1393
+ "page_idx": 10
1394
+ },
1395
+ {
1396
+ "type": "equation",
1397
+ "img_path": "images/990b6b0c2451855e4ad1b255693440d8446d19ea422ed1cfcf524c2231ec0fc6.jpg",
1398
+ "text": "$$\n\\operatorname* { m a x } _ { w \\in [ 0 , 1 ] ^ { d } } \\sum _ { i = 1 } ^ { d } w _ { i } + \\lambda \\sum _ { j \\neq c } \\mathbb { E } _ { r } [ \\operatorname* { m i n } ( 0 , f _ { c } ( \\bar { x } _ { w , r } ) - f _ { j } ( \\bar { x } _ { w , r } ) ) ] .\n$$",
1399
+ "text_format": "latex",
1400
+ "bbox": [
1401
+ 308,
1402
+ 607,
1403
+ 689,
1404
+ 652
1405
+ ],
1406
+ "page_idx": 10
1407
+ },
1408
+ {
1409
+ "type": "text",
1410
+ "text": "This problem is equivalent to C-EFS except for the term $\\mathbb { E } _ { r } [ f _ { c } ( \\bar { x } _ { w , r } ) ]$ replaced with the hinge penalty term $\\begin{array} { r } { \\sum _ { j \\neq c } \\tilde { \\mathbb { E } } _ { r } [ \\operatorname* { m i n } ( 0 , f _ { c } ( \\bar { x } _ { w , r } ) - f _ { j } ( \\bar { x } _ { w , r } ) ) ] } \\end{array}$ that penalizes $w$ only when the corrupted data is classified into other classes. ",
1411
+ "bbox": [
1412
+ 174,
1413
+ 654,
1414
+ 825,
1415
+ 698
1416
+ ],
1417
+ "page_idx": 10
1418
+ },
1419
+ {
1420
+ "type": "text",
1421
+ "text": "B GRADIENT-BASED FEATURE ATTRIBUTION METHODS AS EFS/IFS ",
1422
+ "text_level": 1,
1423
+ "bbox": [
1424
+ 173,
1425
+ 715,
1426
+ 761,
1427
+ 733
1428
+ ],
1429
+ "page_idx": 10
1430
+ },
1431
+ {
1432
+ "type": "text",
1433
+ "text": "Many feature attribution methods are based on the gradient of the model’s output ∂fc(x) . Here, we show that those gradient-based feature attribution methods can be interpreted as one-step gradient descent/ascent approximations to C-EFS and C-IFS. If we consider solving the problems (3.2) and (3.3) using gradient descent/ascent with the initial $w$ set to zeros, i.e. $w = 0 _ { d }$ , then, the first step of the optimization can be expressed as ",
1434
+ "bbox": [
1435
+ 173,
1436
+ 744,
1437
+ 826,
1438
+ 818
1439
+ ],
1440
+ "page_idx": 10
1441
+ },
1442
+ {
1443
+ "type": "equation",
1444
+ "img_path": "images/20530a6a610f187c87d11f380ad5c9c8290721b72ef091d4fd0bc5cbd8f19db4.jpg",
1445
+ "text": "$$\nw _ { i } 0 \\pm \\eta \\{ \\mathbb { E } _ { r } [ \\frac { \\partial f _ { c } ( \\bar { x } _ { w , r } ) } { \\partial w _ { i } } | _ { w = 0 _ { d } } ] + \\lambda \\} \\propto \\frac { \\partial f _ { c } ( \\boldsymbol { x } ) } { \\partial x _ { i } } ( \\mu _ { i } - x _ { i } ) + \\lambda ,\n$$",
1446
+ "text_format": "latex",
1447
+ "bbox": [
1448
+ 267,
1449
+ 819,
1450
+ 728,
1451
+ 862
1452
+ ],
1453
+ "page_idx": 10
1454
+ },
1455
+ {
1456
+ "type": "text",
1457
+ "text": "where $\\eta > 0$ is the step size and $\\mu _ { i } : = \\mathbb { E } _ { r } [ r _ { i } ]$ . Here, because the penalty $\\lambda$ and the step size $\\eta$ are common across all the features, $\\frac { \\partial f _ { c } ( x ) } { \\partial x _ { i } } ( \\mu _ { i } - x _ { i } )$ is the essential term that determines the size of $w _ { i }$ . We therefore ignore the terms $\\lambda$ and $\\eta$ for simplicity. Then, the relationship between EFS/IFS and the gradient-based feature attribution methods can be summarized as follows. ",
1458
+ "bbox": [
1459
+ 174,
1460
+ 863,
1461
+ 825,
1462
+ 924
1463
+ ],
1464
+ "page_idx": 10
1465
+ },
1466
+ {
1467
+ "type": "text",
1468
+ "text": "Grad (Simonyan et al., 2013) Assuming $\\mu _ { i } - x _ { i }$ to be constant across the features, $w _ { i }$ is equivalent to $\\frac { \\partial f _ { c } ( x ) } { \\partial x _ { i } }$ up to the scaling factor $\\mu _ { i } - x _ { i }$ . ",
1469
+ "bbox": [
1470
+ 173,
1471
+ 103,
1472
+ 825,
1473
+ 136
1474
+ ],
1475
+ "page_idx": 11
1476
+ },
1477
+ {
1478
+ "type": "text",
1479
+ "text": "Grad $\\times$ Input (Shrikumar et al., 2016) Assuming $\\mu _ { i }$ to be sufficiently small $( \\mu _ { i } \\to 0 )$ ), $w _ { i }$ is equivalent to $\\frac { \\partial f _ { c } ( x ) } { \\partial x _ { i } } x _ { i }$ ",
1480
+ "bbox": [
1481
+ 174,
1482
+ 151,
1483
+ 823,
1484
+ 185
1485
+ ],
1486
+ "page_idx": 11
1487
+ },
1488
+ {
1489
+ "type": "text",
1490
+ "text": "Linear Approximation (Bach et al., 2015; Sundararajan et al., 2017; Shrikumar et al., 2017; Montavon et al., 2017; Ribeiro et al., 2016; Lundberg $\\pmb { \\& }$ Lee, 2017) Several methods consider the linear approximation of the model $f$ in the neighborhood of the input $x$ . Specifically, they consider the linear model ",
1491
+ "bbox": [
1492
+ 173,
1493
+ 198,
1494
+ 825,
1495
+ 256
1496
+ ],
1497
+ "page_idx": 11
1498
+ },
1499
+ {
1500
+ "type": "equation",
1501
+ "img_path": "images/b535f24364f015bc50959414d8738b716aa087367a1eb76d9f5e73d0775305e5.jpg",
1502
+ "text": "$$\nf _ { c } ( r ) = f _ { c } ( x ) + \\langle w , r - x \\rangle ,\n$$",
1503
+ "text_format": "latex",
1504
+ "bbox": [
1505
+ 403,
1506
+ 261,
1507
+ 593,
1508
+ 279
1509
+ ],
1510
+ "page_idx": 11
1511
+ },
1512
+ {
1513
+ "type": "text",
1514
+ "text": "and uses the coefficient $w$ as the attribution score. Here, let us assume that the noise $r$ belongs to the $\\epsilon$ -ball around $x$ , i.e. $r \\in R ( x ; \\epsilon ) : = \\{ r : \\| r - x \\| \\le \\epsilon \\}$ . For differentiable models, we can consider the first-order Taylor expansion within $R ( x ; \\epsilon )$ : ",
1515
+ "bbox": [
1516
+ 173,
1517
+ 282,
1518
+ 825,
1519
+ 327
1520
+ ],
1521
+ "page_idx": 11
1522
+ },
1523
+ {
1524
+ "type": "equation",
1525
+ "img_path": "images/9cbfb6169ef02a2a1a3290c61354f2e03cb98da1cf4d33b809f20f92a7062399.jpg",
1526
+ "text": "$$\nf _ { c } ( r ) = f _ { c } ( \\boldsymbol { x } ) + \\langle \\nabla f _ { c } ( \\boldsymbol { x } ) , r - \\boldsymbol { x } \\rangle + O ( \\epsilon ^ { 2 } ) .\n$$",
1527
+ "text_format": "latex",
1528
+ "bbox": [
1529
+ 354,
1530
+ 330,
1531
+ 643,
1532
+ 349
1533
+ ],
1534
+ "page_idx": 11
1535
+ },
1536
+ {
1537
+ "type": "text",
1538
+ "text": "Thus, in a rough sense, by ignoring the $O ( \\epsilon ^ { 2 } )$ term, the coefficient $w _ { i }$ computed by those linear approximation methods is essentially equivalent to the gradient ∂fc(x) . Technically, those linear approximation methods consider further improvements over the pure gradient, so that the linear approximation to be valid not only in the infinitesimally small neighborhood of $x$ , but in a finite range from $x$ . Thus, the computed coefficient $w _ { i }$ can slightly differ from the gradient, nevertheless, those methods can be still classified as approximations of the gradient. ",
1539
+ "bbox": [
1540
+ 173,
1541
+ 354,
1542
+ 825,
1543
+ 445
1544
+ ],
1545
+ "page_idx": 11
1546
+ },
1547
+ {
1548
+ "type": "text",
1549
+ "text": "SmoothGrad (Smilkov et al., 2017; Hooker et al., 2018) In SmoothGrad, the attribution score is defined as the expectation of the squared gradient over perturbed inputs. Recall that the perturbed data can be expressed as $\\hat { x } _ { w , r _ { x } }$ using the data-dependent noise $r _ { x }$ . Given the perturbation magnitude $w _ { 0 } > 0$ , the attribution score is defined as follows (Smilkov et al., 2017; Hooker et al., 2018): ",
1550
+ "bbox": [
1551
+ 173,
1552
+ 458,
1553
+ 825,
1554
+ 515
1555
+ ],
1556
+ "page_idx": 11
1557
+ },
1558
+ {
1559
+ "type": "equation",
1560
+ "img_path": "images/c8499c647d6a47834ed43920ac66b84488ca0d9c6a305a14eb804fc683787d8f.jpg",
1561
+ "text": "$$\n\\mathrm { s c o r e s g } : = \\mathbb { E } _ { r } \\left[ \\left( \\frac { \\partial f _ { c } ( \\bar { x } _ { w _ { 0 } , r _ { x } } ) } { \\partial ( \\bar { x } _ { w _ { 0 } , r _ { x } } ) _ { i } } \\right) ^ { 2 } \\right]\n$$",
1562
+ "text_format": "latex",
1563
+ "bbox": [
1564
+ 379,
1565
+ 520,
1566
+ 617,
1567
+ 563
1568
+ ],
1569
+ "page_idx": 11
1570
+ },
1571
+ {
1572
+ "type": "text",
1573
+ "text": "Here, we show that this score can be also interpreted as one-step gradient descent/ascent approximation to C-EFS and C-IFS. If we set the initial $w$ as $w _ { i } = w _ { 0 }$ , the first step of the optimization can be expressed as ",
1574
+ "bbox": [
1575
+ 173,
1576
+ 566,
1577
+ 825,
1578
+ 608
1579
+ ],
1580
+ "page_idx": 11
1581
+ },
1582
+ {
1583
+ "type": "equation",
1584
+ "img_path": "images/c248da325534b182779851450701a6d53b55b4e2f35af6a62e87e503078e174f.jpg",
1585
+ "text": "$$\n\\begin{array} { r l } & { w _ { i } \\gets w _ { 0 } \\pm \\eta \\left\\{ \\mathbb { E } _ { r } \\left[ \\left. \\frac { \\partial f _ { c } ( \\bar { x } _ { w , r _ { x } } ) } { \\partial w _ { i } } \\right| _ { w = w _ { 0 } } \\right] + \\lambda \\right\\} } \\\\ & { \\quad = \\pm \\eta \\mathbb { E } _ { r } \\left[ \\left. \\frac { \\partial f _ { c } ( \\bar { x } _ { w , r _ { x } } ) } { \\partial w _ { i } } \\right| _ { w = w _ { 0 } } \\right] + ( w _ { 0 } \\pm \\eta \\lambda ) } \\\\ & { \\quad = \\pm \\eta \\mathbb { E } _ { u } \\left[ \\left. \\frac { \\partial f _ { c } ( \\bar { x } _ { w , x + u } ) } { \\partial ( \\bar { x } _ { w , x + u } ) _ { i } } \\right| _ { w = w _ { 0 } } u _ { i } \\right] + ( w _ { 0 } \\pm \\eta \\lambda ) , } \\end{array}\n$$",
1586
+ "text_format": "latex",
1587
+ "bbox": [
1588
+ 323,
1589
+ 613,
1590
+ 674,
1591
+ 742
1592
+ ],
1593
+ "page_idx": 11
1594
+ },
1595
+ {
1596
+ "type": "text",
1597
+ "text": "where we used the definition $r _ { x } = x + u$ in the last equality. Because $w _ { 0 } , \\eta$ , and $\\lambda$ are constants, the first term determines $w _ { i }$ . Moreover, by applying the Cauchy-Schwartz inequality, we obtain ",
1598
+ "bbox": [
1599
+ 173,
1600
+ 746,
1601
+ 826,
1602
+ 775
1603
+ ],
1604
+ "page_idx": 11
1605
+ },
1606
+ {
1607
+ "type": "equation",
1608
+ "img_path": "images/477acc5c82186219f841c8eae7861fcbb97fc3996fbc48242ab9bc2de61501be.jpg",
1609
+ "text": "$$\n\\left( \\mathbb E _ { u } \\left[ \\left. \\frac { \\partial f _ { c } ( \\bar { x } _ { w _ { 0 } , x + u } ) } { \\partial ( \\bar { x } _ { w _ { 0 } , x + u } ) _ { i } } \\right| _ { w = w _ { 0 } } u _ { i } \\right] \\right) ^ { 2 } \\leq \\mathbb E _ { r } \\left[ \\left( \\frac { \\partial f _ { c } ( \\bar { x } _ { w _ { 0 } , r _ { x } } ) } { \\partial ( \\bar { x } _ { w _ { 0 } , r _ { x } } ) _ { i } } \\right) ^ { 2 } \\right] \\mathbb E _ { u } [ u _ { i } ^ { 2 } ] .\n$$",
1610
+ "text_format": "latex",
1611
+ "bbox": [
1612
+ 266,
1613
+ 779,
1614
+ 732,
1615
+ 824
1616
+ ],
1617
+ "page_idx": 11
1618
+ },
1619
+ {
1620
+ "type": "text",
1621
+ "text": "If we selected the perturbation $u$ to have a common variance across the features, i.e. $\\mathbb { E } _ { u } [ u _ { i } ^ { 2 } ] = \\sigma ^ { 2 }$ for all $i \\in [ d ]$ , we can conclude that $\\mathbb { E } _ { r } \\left[ \\left( \\frac { \\partial f _ { c } ( \\bar { x } _ { w _ { 0 } , r _ { x } } ) } { \\partial ( \\bar { x } _ { w _ { 0 } , r _ { x } } ) _ { i } } \\right) ^ { 2 } \\right]$ is the essential term determining $w$ , which is equivalent to (B.4). ",
1622
+ "bbox": [
1623
+ 173,
1624
+ 829,
1625
+ 826,
1626
+ 888
1627
+ ],
1628
+ "page_idx": 11
1629
+ },
1630
+ {
1631
+ "type": "text",
1632
+ "text": "Here, we note out our analysis can explain the success of SmoothGrad. Some studies (Smilkov et al., 2017; Hooker et al., 2018) have reported that SmoothGrad performs better than other gradient-based feature attribution methods in practice. As one-step gradient descent/ascent approximation to C-EFS and C-IFS, SmoothGrad starts the optimization from the non-zero point $w = w _ { 0 }$ while the other methods starts the optimization from zero $w = 0 _ { d }$ . If the initial point $w _ { 0 }$ is carefully chosen, it is apparent that one-step gradient descent/ascent from $w _ { 0 }$ can get closer to the solution than starting the optimization from zero. ",
1633
+ "bbox": [
1634
+ 173,
1635
+ 895,
1636
+ 823,
1637
+ 924
1638
+ ],
1639
+ "page_idx": 11
1640
+ },
1641
+ {
1642
+ "type": "text",
1643
+ "text": "",
1644
+ "bbox": [
1645
+ 174,
1646
+ 103,
1647
+ 825,
1648
+ 172
1649
+ ],
1650
+ "page_idx": 12
1651
+ },
1652
+ {
1653
+ "type": "text",
1654
+ "text": "C IMPLEMENTATIONS OF EFS/IFS-BASED METHODS ",
1655
+ "text_level": 1,
1656
+ "bbox": [
1657
+ 174,
1658
+ 193,
1659
+ 630,
1660
+ 209
1661
+ ],
1662
+ "page_idx": 12
1663
+ },
1664
+ {
1665
+ "type": "text",
1666
+ "text": "In Section 5, we adopted the EFS-based and IFS-based methods: Greedy-EFS, which solves the problem (2.2) using a greedy algorithm; Grad-EFS, which solves the problem (3.2) using gradient descent; Greedy-IFS, which solves the problem (2.3) using a greedy algorithm; and Grad- $I F S$ , which solves the problem (3.3) using gradient ascent. Each method is implemented as follows. ",
1667
+ "bbox": [
1668
+ 173,
1669
+ 222,
1670
+ 825,
1671
+ 280
1672
+ ],
1673
+ "page_idx": 12
1674
+ },
1675
+ {
1676
+ "type": "text",
1677
+ "text": "Greedy-EFS In Greedy-EFS, we first prepared the feature subsets $S : = \\{ S _ { m } \\subseteq [ d ] \\} _ { m = 1 } ^ { M }$ , where each subset $S _ { m }$ is constructed by sliding the window over the image. In our implementation, we set the window size as $6 4 \\times 6 4$ and the stride set to 16. We started the greedy algorithm from $S = \\emptyset$ , and iterated the following steps. ",
1678
+ "bbox": [
1679
+ 173,
1680
+ 292,
1681
+ 825,
1682
+ 351
1683
+ ],
1684
+ "page_idx": 12
1685
+ },
1686
+ {
1687
+ "type": "text",
1688
+ "text": "We repeated those steps ten times, and obtained $S$ as an approximation of $S _ { \\mathrm { E F S } }$ . We used a gray background as the noise $r$ , i.e. $p ( r ) = \\delta ( r = \\mathrm { g r a y } )$ . ",
1689
+ "bbox": [
1690
+ 173,
1691
+ 406,
1692
+ 821,
1693
+ 436
1694
+ ],
1695
+ "page_idx": 12
1696
+ },
1697
+ {
1698
+ "type": "text",
1699
+ "text": "Greedy-IFS In Greedy-IFS, we prepared the feature subsets $S : = \\{ S _ { m } \\subseteq [ d ] \\} _ { m = 1 } ^ { M }$ in the same way as Greedy-EFS. We started the greedy algorithm from $S = [ d ]$ , and iterated the following steps. ",
1700
+ "bbox": [
1701
+ 173,
1702
+ 449,
1703
+ 823,
1704
+ 478
1705
+ ],
1706
+ "page_idx": 12
1707
+ },
1708
+ {
1709
+ "type": "text",
1710
+ "text": "We repeated those steps ten times, and obtained $S$ as an approximation of $S _ { \\mathrm { I F S } }$ . We used a gray background as the noise $r$ , i.e. $p ( r ) = \\delta ( r = \\mathrm { g r a y } )$ . We note that Greedy-IFS is essentially the same as the greedy method proposed by Zhou et al. (2014). ",
1711
+ "bbox": [
1712
+ 174,
1713
+ 535,
1714
+ 825,
1715
+ 579
1716
+ ],
1717
+ "page_idx": 12
1718
+ },
1719
+ {
1720
+ "type": "text",
1721
+ "text": "Grad-EFS In Grad-EFS, we used the data-dependent noise $r _ { x }$ , where we set the distribution $p ( u )$ to be uniform over $[ - 1 , 1 ] ^ { d }$ . In each step of the gradient descent, we approximated the gradient of C-EFS (3.2) using a batch of random realizations of $r _ { x }$ . In our implementation, we set the penalty weight $\\lambda = 1 0 d$ and the batch size in each gradient approximation to be 32. As the optimization algorithm, we used Adam (Kingma & Ba, 2014) with the step size set to 0.5 and the remaining parameters set to default values. We run Adam for 200 steps, and obtained $w$ . We note that GradEFS is essentially the same as Meaningful Perturbation (Fong & Vedaldi, 2017) except that the smoothness penalty term is removed. ",
1722
+ "bbox": [
1723
+ 173,
1724
+ 592,
1725
+ 825,
1726
+ 704
1727
+ ],
1728
+ "page_idx": 12
1729
+ },
1730
+ {
1731
+ "type": "text",
1732
+ "text": "Grad-IFS In Grad-IFS, we used the data-dependent noise $r _ { x }$ , where we set the distribution $p ( u )$ to be uniform over $[ - 1 , 1 ] ^ { d }$ . In each step of the gradient ascent, we approximated the gradient of C-IFS (3.3) using a batch of random realizations of $r _ { x }$ . In our implementation, we set the penalty weight $\\lambda = d$ and the batch size in each gradient approximation to be 32. As the optimization algorithm, we used Adam (Kingma & Ba, 2014) with the step size set to 0.03 and the remaining parameters set to default values. We run Adam for 1000 steps. In Grad-IFS, we used the averaged parameter over 1000 steps 11000 P t=1 $\\textstyle { \\frac { 1 } { 1 0 0 0 } } \\sum _ { t = 1 } ^ { 1 0 0 0 } w ^ { ( t ) }$ as $w$ . This is a common technique to improve the quality of the solution obtained from stochastic optimization algorithms with convex objective functions. We found that this technique is helpful also for Grad-IFS. We also applied the same averaging technique to PertMap (Ikeno & Hara, 2018). ",
1733
+ "bbox": [
1734
+ 173,
1735
+ 718,
1736
+ 825,
1737
+ 859
1738
+ ],
1739
+ "page_idx": 12
1740
+ },
1741
+ {
1742
+ "type": "text",
1743
+ "text": "D EXPERIMENTAL RESULTS ",
1744
+ "text_level": 1,
1745
+ "bbox": [
1746
+ 176,
1747
+ 878,
1748
+ 423,
1749
+ 895
1750
+ ],
1751
+ "page_idx": 12
1752
+ },
1753
+ {
1754
+ "type": "text",
1755
+ "text": "Here, we present all the results that are omitted from Section 5 due to the space limitation. ",
1756
+ "bbox": [
1757
+ 169,
1758
+ 909,
1759
+ 764,
1760
+ 924
1761
+ ],
1762
+ "page_idx": 12
1763
+ },
1764
+ {
1765
+ "type": "text",
1766
+ "text": "D.1 AUEC AND AOIC ",
1767
+ "text_level": 1,
1768
+ "bbox": [
1769
+ 176,
1770
+ 103,
1771
+ 346,
1772
+ 117
1773
+ ],
1774
+ "page_idx": 13
1775
+ },
1776
+ {
1777
+ "type": "text",
1778
+ "text": "Table 2 and Table 3 show average AUEC and AOIC evaluated with uniform noises and random images, respectively. There are three important observations in these tables. ",
1779
+ "bbox": [
1780
+ 173,
1781
+ 128,
1782
+ 823,
1783
+ 157
1784
+ ],
1785
+ "page_idx": 13
1786
+ },
1787
+ {
1788
+ "type": "text",
1789
+ "text": "First, Grad-EFS attained the highest AUEC for VGG16 and Inception V3, and the second highest AUEC for ResNet V2. This indicates that Grad-EFS is nearly optimal under the principle of EFS: Grad-EFS can change the model’s decision by corrupting only a small number of relevant features. Indeed, as shown in Figure 6 and Figure 7, Grad-EFS has a sharp increase in the EFS-Curves. This is a natural consequence from the fact that EFS is very similar to adversarial example, as we discussed in Section 5. ",
1790
+ "bbox": [
1791
+ 174,
1792
+ 165,
1793
+ 825,
1794
+ 247
1795
+ ],
1796
+ "page_idx": 13
1797
+ },
1798
+ {
1799
+ "type": "text",
1800
+ "text": "Second, especially for VGG16, the random attribution attained AUEC similar to some of the methods such as Grad $\\times$ Input, IntGrad, LRP, and Occlusion. Indeed, as in Figure 6 and Figure 7, the EFS-Curves of the random attribution are close to those methods. It is a bit surprising to observe that we can attain a good trade-off in EFS just by randomly scoring each feature without looking at the images. This observation indicates that there are only subtle differences between good attributions and random attributions under EFS, especially for VGG16. ",
1801
+ "bbox": [
1802
+ 174,
1803
+ 255,
1804
+ 825,
1805
+ 339
1806
+ ],
1807
+ "page_idx": 13
1808
+ },
1809
+ {
1810
+ "type": "text",
1811
+ "text": "Third, on AOIC, Grad-IFS consistently outperformed the other methods, and PertMap attained the second best result. As shown in Figure 6 and Figure 7, Grad-IFS is very resistant against the corruption of irrelevant features. This means that Grad-IFS is capable of identifying irrelevant features better than any other methods. Another important point that can be seen in Figure 6 and Figure 7 is that, the IFS-Curves vary significantly across different methods. More importantly, unlike EFS, the IFS-Curve can distinguish random attributions and other attributions well. ",
1812
+ "bbox": [
1813
+ 174,
1814
+ 345,
1815
+ 825,
1816
+ 429
1817
+ ],
1818
+ "page_idx": 13
1819
+ },
1820
+ {
1821
+ "type": "table",
1822
+ "img_path": "images/bd365d3f254ae406b769e8553cb603d7922085fdea3134ba988cb2b9dd585e90.jpg",
1823
+ "table_caption": [
1824
+ "Table 2: Average AUEC and AOIC under the uniform noise. The top-three scores are highlighted as ${ 1 } \\mathrm { s t } ^ { * }$ , 2nd∗∗, and $3 \\mathrm { r d } ^ { * * * }$ . "
1825
+ ],
1826
+ "table_footnote": [],
1827
+ "table_body": "<table><tr><td rowspan=\"2\"></td><td colspan=\"2\">VGG16</td><td colspan=\"2\">ResNet V2</td><td colspan=\"2\">Inception V3</td></tr><tr><td>AUEC</td><td>AOIC</td><td>AUEC</td><td>AOIC</td><td>AUEC</td><td>AOIC</td></tr><tr><td>Greedy-EFS</td><td>0.844</td><td>0.366</td><td>0.858**</td><td>0.391</td><td>0.837***</td><td>0.445</td></tr><tr><td>Grad-EFS</td><td>0.946*</td><td>0.195</td><td>0.858**</td><td>0.369</td><td>0.927*</td><td>0.394</td></tr><tr><td>Greedy-IFS</td><td>0.746</td><td>0.622</td><td>0.745</td><td>0.709***</td><td>0.715</td><td>0.685</td></tr><tr><td>Grad-IFS</td><td>0.873</td><td>0.876*</td><td>0.814</td><td>0.829*</td><td>0.817</td><td>0.868*</td></tr><tr><td>Grad</td><td>0.867</td><td>0.341</td><td>0.797</td><td>0.416</td><td>0.799</td><td>0.475</td></tr><tr><td>Grad×Input</td><td>0.823</td><td>0.318</td><td>0.750</td><td>0.404</td><td>0.748</td><td>0.441</td></tr><tr><td>SmoothGrad</td><td>0.882</td><td>0.593***</td><td>0.840</td><td>0.707</td><td>0.829</td><td>0.744***</td></tr><tr><td>GuidedBP</td><td>0.918**</td><td>0.455</td><td>0.874*</td><td>0.595</td><td>0.826</td><td>0.555</td></tr><tr><td>IntGrad</td><td>0.837</td><td>0.346</td><td>0.781</td><td>0.438</td><td>0.775</td><td>0.482</td></tr><tr><td>LRP</td><td>0.823</td><td>0.318</td><td>0.750</td><td>0.404</td><td>0.748</td><td>0.441</td></tr><tr><td>DeepLIFT</td><td>0.862</td><td>0.435</td><td>0.811</td><td>0.518</td><td>0.788</td><td>0.539</td></tr><tr><td>Occlusion</td><td>0.811</td><td>0.559</td><td>0.767</td><td>0.595</td><td>0.709</td><td>0.664</td></tr><tr><td>PertMap</td><td>0.886***</td><td>0.780**</td><td>0.828</td><td>0.765**</td><td>0.846**</td><td>0.817**</td></tr><tr><td>Random</td><td>0.839</td><td>0.160</td><td>0.691</td><td>0.308</td><td>0.714</td><td>0.290</td></tr></table>",
1828
+ "bbox": [
1829
+ 217,
1830
+ 210,
1831
+ 779,
1832
+ 435
1833
+ ],
1834
+ "page_idx": 14
1835
+ },
1836
+ {
1837
+ "type": "table",
1838
+ "img_path": "images/8dc2e8d64bb51e061d51e853656d5a3a7d434433a28cd9d6e74e6be4f8ebcea3.jpg",
1839
+ "table_caption": [
1840
+ "Table 3: Average AUEC and AOIC under random images. The top-three scores are highlighted as ${ 1 } \\mathrm { s t } ^ { * }$ , $2 \\mathrm { n d } ^ { \\ast \\ast }$ , and $3 \\mathrm { r d } ^ { * * * }$ . "
1841
+ ],
1842
+ "table_footnote": [],
1843
+ "table_body": "<table><tr><td rowspan=\"2\"></td><td colspan=\"2\">VGG16</td><td colspan=\"2\">ResNet V2</td><td colspan=\"2\">Inception V3</td></tr><tr><td>AUEC</td><td>AOIC</td><td>AUEC</td><td>AOIC</td><td>AUEC</td><td>AOIC</td></tr><tr><td>Greedy-EFS</td><td>0.842</td><td>0.319</td><td>0.857***</td><td>0.388</td><td>0.857***</td><td>0.397</td></tr><tr><td>Grad-EFS</td><td>0.926*</td><td>0.179</td><td>0.861**</td><td>0.275</td><td>0.893*</td><td>0.293</td></tr><tr><td>Greedy-IFS</td><td>0.766</td><td>0.524***</td><td>0.763</td><td>0.589</td><td>0.760</td><td>0.521</td></tr><tr><td>Grad-IFS</td><td>0.858</td><td>0.630*</td><td>0.826</td><td>0.688*</td><td>0.844</td><td>0.705*</td></tr><tr><td>Grad</td><td>0.865</td><td>0.290</td><td>0.800</td><td>0.375</td><td>0.826</td><td>0.393</td></tr><tr><td>Grad×Input</td><td>0.835</td><td>0.296</td><td>0.775</td><td>0.384</td><td>0.789</td><td>0.396</td></tr><tr><td>SmoothGrad</td><td>0.880</td><td>0.486</td><td>0.846</td><td>0.647***</td><td>0.860</td><td>0.650***</td></tr><tr><td>GuidedBP</td><td>0.905**</td><td>0.416</td><td>0.876*</td><td>0.568</td><td>0.839</td><td>0.502</td></tr><tr><td>IntGrad</td><td>0.847</td><td>0.318</td><td>0.807</td><td>0.418</td><td>0.815</td><td>0.435</td></tr><tr><td>LRP</td><td>0.835</td><td>0.296</td><td>0.775</td><td>0.384</td><td>0.789</td><td>0.397</td></tr><tr><td>DeepLIFT</td><td>0.868</td><td>0.378</td><td>0.836</td><td>0.480</td><td>0.826</td><td>0.471</td></tr><tr><td>Occlusion</td><td>0.840</td><td>0.487</td><td>0.787</td><td>0.544</td><td>0.769</td><td>0.553</td></tr><tr><td>PertMap</td><td>0.876***</td><td>0.553**</td><td>0.833</td><td>0.660**</td><td>0.861**</td><td>0.661**</td></tr><tr><td>Random</td><td>0.842</td><td>0.160</td><td>0.760</td><td>0.237</td><td>0.767</td><td>0.234</td></tr></table>",
1844
+ "bbox": [
1845
+ 215,
1846
+ 625,
1847
+ 781,
1848
+ 849
1849
+ ],
1850
+ "page_idx": 14
1851
+ },
1852
+ {
1853
+ "type": "image",
1854
+ "img_path": "images/85289b637c9833e58128f0e3e4b13cbcdbabf9c272b057142fa30d8566b56de4.jpg",
1855
+ "image_caption": [
1856
+ "Figure 6: Average EFS-Curve and IFS-Curve evaluated with uniform noises. "
1857
+ ],
1858
+ "image_footnote": [],
1859
+ "bbox": [
1860
+ 178,
1861
+ 114,
1862
+ 823,
1863
+ 885
1864
+ ],
1865
+ "page_idx": 15
1866
+ },
1867
+ {
1868
+ "type": "image",
1869
+ "img_path": "images/37c5d3e7f7f1426a077c45b0c754b4df37697c35f8960d6c7aa487a6466e843c.jpg",
1870
+ "image_caption": [
1871
+ "Figure 7: Average EFS-Curve and IFS-Curve evaluated with random images. "
1872
+ ],
1873
+ "image_footnote": [],
1874
+ "bbox": [
1875
+ 176,
1876
+ 116,
1877
+ 823,
1878
+ 885
1879
+ ],
1880
+ "page_idx": 16
1881
+ },
1882
+ {
1883
+ "type": "text",
1884
+ "text": "D.2 EXAMPLE HEATMAPS ",
1885
+ "text_level": 1,
1886
+ "bbox": [
1887
+ 176,
1888
+ 103,
1889
+ 369,
1890
+ 117
1891
+ ],
1892
+ "page_idx": 17
1893
+ },
1894
+ {
1895
+ "type": "text",
1896
+ "text": "Figures 8–12 show examples of the heatmaps obtained by several feature attribution methods. There are two important observations in the figures. ",
1897
+ "bbox": [
1898
+ 171,
1899
+ 130,
1900
+ 823,
1901
+ 159
1902
+ ],
1903
+ "page_idx": 17
1904
+ },
1905
+ {
1906
+ "type": "text",
1907
+ "text": "First, the heatmaps of Grad-EFS are mostly shot noises, which are visibly meaningless. These are natural consequences from the fact that EFS is very similar to adversarial example, as we have discussed in Section 5. ",
1908
+ "bbox": [
1909
+ 174,
1910
+ 165,
1911
+ 821,
1912
+ 205
1913
+ ],
1914
+ "page_idx": 17
1915
+ },
1916
+ {
1917
+ "type": "text",
1918
+ "text": "Second, the high AOIC methods in Table 2 and Table 3, namely Grad-IFS, PertMap, and SmoothGrad, have highlighted mostly the faces of the animals. The high AOICs on these methods indicate that the model has made the decision based mostly on the animal face. In contrast, the other methods tend to generate noisy attributions over the entire body of the animals, which are false explanations from the perspective of IFS because their AOICs are far smaller than that of Grad-IFS: the noisy attributions failed to capture essential pixels in the images. ",
1919
+ "bbox": [
1920
+ 173,
1921
+ 213,
1922
+ 825,
1923
+ 297
1924
+ ],
1925
+ "page_idx": 17
1926
+ },
1927
+ {
1928
+ "type": "image",
1929
+ "img_path": "images/f0204f3d368fa1f513cbb6f1223930bb97f72c19918239e169a26a09882d0778.jpg",
1930
+ "image_caption": [
1931
+ "Figure 8: Example Heatmaps: The red colored pixels are found to be strongly relevant with each method. "
1932
+ ],
1933
+ "image_footnote": [],
1934
+ "bbox": [
1935
+ 181,
1936
+ 194,
1937
+ 813,
1938
+ 791
1939
+ ],
1940
+ "page_idx": 18
1941
+ },
1942
+ {
1943
+ "type": "image",
1944
+ "img_path": "images/4bd97ee0173318dd58a7ca2ff3b9df712f81e38e710a27cf44c8ca6e5abcb44b.jpg",
1945
+ "image_caption": [
1946
+ "Figure 9: Example Heatmaps: The red colored pixels are found to be strongly relevant with each method. "
1947
+ ],
1948
+ "image_footnote": [],
1949
+ "bbox": [
1950
+ 181,
1951
+ 194,
1952
+ 813,
1953
+ 791
1954
+ ],
1955
+ "page_idx": 19
1956
+ },
1957
+ {
1958
+ "type": "image",
1959
+ "img_path": "images/669ab9802155c73b66086f0d8efd1853511915a70e60957fcd3b50ecc2bee48e.jpg",
1960
+ "image_caption": [
1961
+ "Figure 10: Example Heatmaps: The red colored pixels are found to be strongly relevant with each method. "
1962
+ ],
1963
+ "image_footnote": [],
1964
+ "bbox": [
1965
+ 181,
1966
+ 194,
1967
+ 813,
1968
+ 791
1969
+ ],
1970
+ "page_idx": 20
1971
+ },
1972
+ {
1973
+ "type": "image",
1974
+ "img_path": "images/c25b4d134f7f18eec8fd96de087192a5e8f3db1a29a2bc880bd1e8a40d646c68.jpg",
1975
+ "image_caption": [
1976
+ "Figure 11: Example Heatmaps: The red colored pixels are found to be strongly relevant with each method. "
1977
+ ],
1978
+ "image_footnote": [],
1979
+ "bbox": [
1980
+ 181,
1981
+ 190,
1982
+ 813,
1983
+ 796
1984
+ ],
1985
+ "page_idx": 21
1986
+ },
1987
+ {
1988
+ "type": "image",
1989
+ "img_path": "images/ecc62006eadb15c9b38b3e31be026719ec355ea1072a942ef311996aa1102ce8.jpg",
1990
+ "image_caption": [
1991
+ "Figure 12: Example Heatmaps: The red colored pixels are found to be strongly relevant with each method. "
1992
+ ],
1993
+ "image_footnote": [],
1994
+ "bbox": [
1995
+ 181,
1996
+ 190,
1997
+ 813,
1998
+ 797
1999
+ ],
2000
+ "page_idx": 22
2001
+ }
2002
+ ]
parse/train/H1lS8oA5YQ/H1lS8oA5YQ_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/H1lS8oA5YQ/H1lS8oA5YQ_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Sy4tzwqxe/Sy4tzwqxe.md ADDED
@@ -0,0 +1,314 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # TWO METHODS FOR WILD VARIATIONAL INFERENCE
2
+
3
+ Qiang Liu Yihao Feng
4
+ Computer Science, Dartmouth College
5
+ Hanover, NH, 03755
6
+ {qiang.liu, yihao.feng.gr}@dartmouth.edu
7
+
8
+ # ABSTRACT
9
+
10
+ Variational inference provides a powerful tool for approximate probabilistic inference on complex, structured models. Typical variational inference methods, however, require to use inference networks with computationally tractable probability density functions. This largely limits the design and implementation of variational inference methods. We consider wild variational inference methods that do not require tractable density functions on the inference networks, and hence can be applied in more challenging cases. As an example of application, we treat stochastic gradient Langevin dynamics (SGLD) as an inference network, and use our methods to automatically adjust the step sizes of SGLD, yielding significant improvement over the hand-designed step size schemes.
11
+
12
+ # 1 INTRODUCTION
13
+
14
+ Probabilistic modeling provides a principled approach for reasoning under uncertainty, and has been increasingly dominant in modern machine learning where highly complex, structured probabilistic models are often the essential components for solving complex problems with increasingly larger datasets. A key challenge, however, is to develop computationally efficient Bayesian inference methods to approximate, or draw samples from the posterior distributions. Variational inference (VI) provides a powerful tool for scaling Bayesian inference to complex models and big data. The basic idea of VI is to approximate the true distribution with a simpler distribution by minimizing the KL divergence, transforming the inference problem into an optimization problem, which is often then solved efficiently using stochastic optimization techniques (e.g., Hoffman et al., 2013; Kingma & Welling, 2013). However, the practical design and application of VI are still largely restricted by the requirement of using simple approximation families, as we explain in the sequel.
15
+
16
+ Let $p ( z )$ be a distribution of interest, such as the posterior distribution in Bayesian inference. VI approximates $p ( z )$ with a simpler distribution $q ^ { * } ( z )$ found in a set $\mathcal { Q } = \{ q _ { \eta } ( z ) \}$ of distributions indexed by parameter $\eta$ by minimizing the KL divergence objective:
17
+
18
+ $$
19
+ \operatorname* { m i n } _ { \eta } \big \{ \mathrm { K L } ( q _ { \eta } | | p ) \equiv \mathbb { E } _ { z \sim q _ { \eta } } [ \log ( q _ { \eta } ( z ) / p ( z ) ) ] \big \} ,
20
+ $$
21
+
22
+ where we can get exact result $\boldsymbol { p } = \boldsymbol { q } ^ { * }$ if $\mathcal { Q }$ is chosen to be broad enough to actually include $p$ . In practice, however, $\mathcal { Q }$ should be chosen carefully to make the optimization in (1) computationally tractable; this casts two constraints on $\mathcal { Q }$ :
23
+
24
+ 1. A minimum requirement is that we should be able to sample from $q _ { \eta }$ efficiently, which allows us to make estimates and predictions based on $q _ { \eta }$ in placement of the more intractable $p$ . The samples from $q _ { \eta }$ can also be used to approximate the expectation $\mathbb { E } _ { q } [ \cdot ]$ in (1) during optimization. This means that there should exist some computable function $f ( \eta ; \xi )$ , called the inference network, which takes a random seed $\xi$ , whose distribution is denoted by $q _ { 0 }$ , and outputs a random variable $z = f ( \eta ; \xi )$ whose distribution is $q _ { \eta }$ .
25
+
26
+ 2. We should also be able to calculate the density $q _ { \eta } ( z )$ or it is derivative in order to optimize the KL divergence in (1). This, however, casts a much more restrictive condition, since it requires us to use only simple inference network $f ( \eta ; \xi )$ and input distributions $q _ { 0 }$ to ensure a tractable form for the density $q _ { \eta }$ of the output $z = f ( \eta ; \xi )$ .
27
+
28
+ In fact, it is this requirement of calculating $q _ { \eta } ( z )$ that has been the major constraint for the design of state-of-the-art variational inference methods. The traditional $\mathrm { V I }$ methods are often limited to using simple mean field, or Gaussian-based distributions as $q _ { \eta }$ and do not perform well for approximating complex target distributions. There is a line of recent work on variational inference with rich approximation families (e.g., Rezende & Mohamed, 2015b; Tran et al., 2015; Ranganath et al., 2015, to name only a few), all based on handcrafting special inference networks to ensure the computational tractability of $q _ { \eta } ( z )$ while simultaneously obtaining high approximation accuracy. These approaches require substantial mathematical insights and research effects, and can be difficult to understand or use for practitioners without a strong research background in VI. Methods that allow us to use arbitrary inference networks without substantial constraints can significantly simplify the design and applications of VI methods, allowing practical users to focus more on choosing proposals that work best with their specific tasks.
29
+
30
+ ![](images/492f43da16371fc8172240c5ae93883a2e505491b54eb7915f5010a97f8cb46b.jpg)
31
+ Figure 1: Wild variational inference allows us to train general stochastic neural inference networks to learn to draw (approximate) samples from the target distributions, without restriction on the computational tractability of the density function of the neural inference networks.
32
+
33
+ We use the term wild variational inference to refer to variants of variational methods working with general inference networks $f ( \eta , \xi )$ without tractability constraints on its output density $q _ { \eta } ( z )$ ; this should be distinguished with the black-box variational inference (Ranganath et al., 2014) which refers to methods that work for generic target distributions $p ( z )$ without significant model-by-model consideration (but still require to calculate the proposal density $q _ { \eta } ( z ) _ { , }$ ). Essentially, wild variational inference makes it possible to “learn to draw samples”, constructing black-box neural samplers for given distributions. This enables more adaptive and automatic design of efficient Bayesian inference procedures, replacing the hand-designed inference algorithms with more efficient ones that can improve their efficiency adaptively over time based on past tasks they performed.
34
+
35
+ In this work, we discuss two methods for wild variational inference, both based on recent works that combine kernel techniques with Stein’s method (e.g., Liu & Wang, 2016; Liu et al., 2016). The first method, also discussed in Wang & Liu (2016), is based on iteratively adjusting parameter $\eta$ to make the random output $z = f ( \eta ; \xi )$ mimic a Stein variational gradient direction (SVGD) (Liu & Wang, 2016) that optimally decreases its KL divergence with the target distribution. The second method is based on minimizing a kernelized Stein discrepancy, which, unlike KL divergence, does not require to calculate density $q _ { \eta } ( z )$ for the optimization thanks to its special form.
36
+
37
+ Another critical problem is to design good network architectures well suited for Bayesian inference. Ideally, the network design should leverage the information of the target distribution $p ( z )$ in a convenient way. One useful perspective is that we can view the existing MC/MCMC methods as (hand-designed) stochastic neural networks which can be used to construct native inference networks for given target distributions. On the other hand, using existing MC/MCMC methods as inference networks also allow us to adaptively adjust the hyper-parameters of these algorithms; this enables amortized inference which leverages the experience on past tasks to accelerate the Bayesian computation, providing a powerful approach for designing efficient algorithms in settings when a large number of similar tasks are needed.
38
+
39
+ As an example, we leverage stochastic gradient Langevin dynamics (SGLD) (Welling & Teh, 2011) as the inference network, which can be treated as a special deep residential network (He et al., 2016), in which important gradient information $\nabla _ { z } \log { p ( z ) }$ is fed into each layer to allow efficient approximation for the target distribution $p ( z )$ . In our case, the network parameter $\eta$ are the step sizes of SGLD, and our method provides a way to adaptively improve the step sizes, providing speed-up on future tasks with similar structures. We show that the adaptively estimated step sizes significantly outperform the hand-designed schemes such as Adagrad.
40
+
41
+ Related Works The idea of amortized inference (Gershman & Goodman, 2014) has been recently applied in various domains of probabilistic reasoning, including both amortized variational inference (e.g., Kingma & Welling, 2013; Rezende & Mohamed, 2015a) and date-driven designs of Monte Carlo based methods (e.g., Paige & Wood, 2016), to name only a few. Most of these methods, however, require to explicitly calculate $q _ { \eta } ( z )$ (or its gradient).
42
+
43
+ One well exception is a very recent work (Ranganath et al., 2016) that also avoids calculating $q _ { \eta } ( z )$ and hence works for general inference networks; their method is based on a similar idea related to Stein discrepancy (Liu et al., 2016; Oates et al., 2017; Chwialkowski et al., 2016; Gorham & Mackey, 2015), for which we provide a more detailed discussion in Section 3.2.
44
+
45
+ The auxiliary variational inference methods (e.g., Agakov & Barber, 2004) provide an alternative way when the variational distribution $q _ { \eta } ( z )$ can be represented as a hidden variable model. In particular, Salimans et al. (2015) used the auxiliary variational approach to leverage MCMC as a variational approximation. These approaches, however, still require to write down the likelihood function on the augmented spaces, and need to introduce an additional inference network related to the auxiliary variables.
46
+
47
+ There is a large literature on traditional adaptive MCMC methods (e.g., Andrieu & Thoms, 2008; Roberts & Rosenthal, 2009) which can be used to adaptively adjust the proposal distribution of MCMC by exploiting the special theoretical properties of MCMC (e.g., by minimizing the autocorrelation). Our method is simpler, more generic, and works efficiently in practice thanks to the use of gradient-based back-propagation. Finally, connections between stochastic gradient descent and variational inference have been discussed and exploited in Mandt et al. (2016); Maclaurin et al. (2015).
48
+
49
+ Outline Section 2 introduces background on Stein discrepancy and Stein variational gradient descent. Section 3 discusses two methods for wild variational inference. Section 4 discuss using stochastic gradient Langevin dynamics (SGLD) as the inference network. Empirical results are shown in Section 5.
50
+
51
+ # 2 STEIN’S IDENTITY, STEIN DISCREPANCY, STEIN VARIATIONAL GRADIENT
52
+
53
+ Stein’s identity Stein’s identity plays a fundamental role in our framework. Let $p ( z )$ be a positive differentiable density on $\mathbb { R } ^ { d }$ , and $\dot { \phi ( z ) } = [ \phi _ { 1 } ( z ) , \cdot \cdot \cdot , \phi _ { d } ( z ) ] ^ { \top }$ is a differentiable vector-valued function. Define $\begin{array} { r } { \nabla _ { z } \cdot \phi = \sum _ { i } \partial _ { z _ { i } } \phi } \end{array}$ . Stein’s identity is
54
+
55
+ $$
56
+ \mathbb { E } _ { z \sim p } [ \langle \nabla _ { z } \log p ( z ) , \phi ( z ) \rangle + \nabla _ { z } \cdot \phi ( z ) ] = \int _ { \mathcal { X } } \nabla _ { z } \cdot ( p ( z ) \phi ( z ) ) d x = 0 ,
57
+ $$
58
+
59
+ which holds once $p ( z ) \phi ( z )$ vanishes on the boundary of $\mathcal { X }$ by integration by parts or Stokes’ theorem; It is useful to rewrite Stein’s identity in a more compact way:
60
+
61
+ $$
62
+ \begin{array} { r } { \mathbb { E } _ { z \sim p } [ \mathcal { T } _ { p } \phi ( z ) ] = 0 , \quad \mathrm { ~ w i t h ~ } \quad \mathcal { T } _ { p } \phi \overset { d e f } { = } \langle \nabla _ { z } \log p , \phi \rangle + \nabla _ { z } \cdot \phi , } \end{array}
63
+ $$
64
+
65
+ where $\mathcal { T } _ { p }$ is called a Stein operator, which acts on function $\phi$ and returns a zero-mean function $\mathcal { T } _ { p } \phi ( z )$ under $z \sim p$ . A key computational advantage of Stein’s identity and Stein operator is that they depend on $p$ only through the derivative of the log-density $\nabla _ { z } \log { p ( z ) }$ , which does not depend on the cumbersome normalization constant of $p$ , that is, when $p ( z ) = \bar { p } ( z ) / Z$ , we have $\nabla _ { z } \log { p ( z ) } = \nabla _ { z } \log { \bar { p } ( z ) }$ , independent of the normalization constant $Z$ . This property makes Stein’s identity a powerful practical tool for handling unnormalized distributions widely appeared in machine learning and statistics.
66
+
67
+ Stein Discrepancy Although Stein’s identity ensures that $\mathcal { T } _ { p } \phi$ has zero expectation under $p$ , its expectation is generally non-zero under a different distribution $q$ . Instead, for $p \neq q$ , there must exist a $\phi$ which distinguishes $p$ and $q$ in the sense that $\mathbb { E } _ { z \sim q } [ \mathcal { T } _ { p } \phi ( z ) ] \neq 0$ . Stein discrepancy leverages this fact to measure the difference between $p$ and $q$ by considering the “maximum violation of Stein’s identity” for $\phi$ in certain function set $\mathcal { F }$ :
68
+
69
+ $$
70
+ \mathbb { D } ( q | | p ) = \operatorname* { m a x } _ { \phi \in \mathcal { F } } \big \{ \mathbb { E } _ { z \sim q } [ \mathcal { T } _ { p } \phi ( z ) ] \big \} ,
71
+ $$
72
+
73
+ where $\mathcal { F }$ is the set of functions $\phi$ that we optimize over, and decides both the discriminative power and computational tractability of Stein discrepancy. Kernelized Stein discrepancy (KSD) is a special
74
+
75
+ Stein discrepancy that takes $\mathcal { F }$ to be the unit ball of vector-valued reproducing kernel Hilbert spaces (RKHS), that is,
76
+
77
+ $$
78
+ \mathcal { F } = \{ \phi \in \mathcal { H } ^ { d } : | | \phi | | _ { \mathcal { H } ^ { d } } \leq 1 \} ,
79
+ $$
80
+
81
+ where $\mathcal { H }$ is a real-valued RKHS with kernel $k ( z , z ^ { \prime } )$ . This choice of $\mathcal { F }$ makes it possible to get a closed form solution for the optimization in (4) (Liu et al., 2016; Chwialkowski et al., 2016; Oates et al., 2017):
82
+
83
+ $$
84
+ \begin{array} { r l } { \mathbb { D } ( q | | p ) = \underset { \phi \in \mathcal { H } ^ { d } } { \operatorname* { m a x } } \big \lbrace \mathbb { E } _ { z \sim q } [ T _ { p } \phi ( z ) ] , } & { \quad s . t . \quad | | \phi | | _ { \mathcal { H } ^ { d } } \leq 1 \big \rbrace , } \\ { = \sqrt { \mathbb { E } _ { z , z ^ { \prime } \sim q } [ \kappa _ { p } ( z , z ^ { \prime } ) ] } , } \end{array}
85
+ $$
86
+
87
+ where $\kappa _ { p } \big ( z , z ^ { \prime } \big )$ is a positive definite kernel obtained by applying Stein operator on $k ( z , z ^ { \prime } )$ twice:
88
+
89
+ $$
90
+ \begin{array} { r l } & { \kappa _ { p } ( z , z ^ { \prime } ) = { \mathcal { T } } _ { p } ^ { z ^ { \prime } } ( { \mathcal { T } } _ { p } ^ { z } \otimes k ( z , z ^ { \prime } ) ) , } \\ & { \qquad = s _ { p } ( z ) s _ { p } ( z ^ { \prime } ) k ( z , z ^ { \prime } ) + s _ { p } ( z ) { \nabla _ { z ^ { \prime } } k ( z , z ^ { \prime } ) } + s _ { p } ( z ^ { \prime } ) { \nabla _ { z } k ( z , z ^ { \prime } ) } + { \nabla _ { z } } \cdot ( { \nabla _ { z ^ { \prime } } k ( z , z ^ { \prime } ) } ) , } \end{array}
91
+ $$
92
+
93
+ where $\pmb { \mathscr { s } } _ { p } ( z ) = \nabla _ { z } \log p ( z )$ and $\mathcal { T } _ { p } ^ { z }$ and $\mathcal { T } _ { p } ^ { z }$ denote the Stein operator when treating $k ( z , z ^ { \prime } )$ as a function of $z$ and $z ^ { \prime }$ , respectively; here we defined $\begin{array} { r } { T _ { p } ^ { z } \otimes k ( z , z ^ { \prime } ) = \nabla _ { x } \log p ( x ) k ( z , z ^ { \prime } ) + \nabla _ { x } k ( z , z ^ { \prime } ) } \end{array}$ which returns a $d \times 1$ vector-valued function. It can be shown that $\mathbb { D } ( q | | p ) = 0$ if and only if $q = p$ when $k ( z , z ^ { \prime } )$ is strictly positive definite in a proper sense (Liu et al., 2016; Chwialkowski et al., 2016). $\mathbb { D } ( q \mid \mid p )$ can treated as a variant of maximum mean discrepancy equipped with kernel $\kappa _ { p } \big ( z , z ^ { \prime } \big )$ which depends on $p$ (which makes $\mathbb { D } ( q | | p )$ asymmetric on $q$ and $p$ ).
94
+
95
+ The form of KSD in (6) allows us to estimate the discrepancy between a set of sample $\left\{ z _ { i } \right\}$ (e.g., drawn from $q$ ) and a distribution $p$ specified by $\nabla _ { z } \log { p ( z ) }$ ,
96
+
97
+ $$
98
+ \widehat { \mathbb { D } } _ { u } ^ { 2 } ( \{ z _ { i } \} \mid | p ) = \frac { 1 } { n ( n - 1 ) } \sum _ { i \neq j } [ \kappa _ { p } ( z _ { i } , z _ { j } ) ] , \qquad \widehat { \mathbb { D } } _ { v } ^ { 2 } ( \{ z _ { i } \} \mid | p ) = \frac { 1 } { n ^ { 2 } } \sum _ { i , j } [ \kappa _ { p } ( z _ { i } , z _ { j } ) ] ,
99
+ $$
100
+
101
+ where $\hat { \mathbb { D } } _ { u } ^ { 2 } ( q | | \operatorname { \varepsilon } p )$ provides an unbiased estimator (hence called a $U$ -statistic) for $\mathbb { D } ^ { 2 } ( q \mid | \ p )$ , and $\hat { \mathbb { D } } _ { v } ^ { 2 } ( q \mid | \ p )$ , called $V$ -statistic, provides a biased estimator but is guaranteed to be always nonnegative: $\hat { \mathbb { D } } _ { v } ^ { 2 } \big ( \{ z _ { i } \} \mid \mid p \big ) \ge 0$ .
102
+
103
+ Stein Variational Gradient Descent (SVGD) Stein operator and Stein discrepancy have a close connection with KL divergence, which is exploited in Liu $\&$ Wang (2016) to provide a general purpose deterministic approximate sampling method. Assume that $\{ z _ { i } \} _ { i = 1 } ^ { n }$ is a sample (or a set of particles) drawn from $q$ , and we want to update $\{ z _ { i } \} _ { i = 1 } ^ { n }$ to make it “move closer” to the target distribution $p$ to improve the approximation quality. We consider updates of form
104
+
105
+ $$
106
+ z _ { i } \gets z _ { i } + \epsilon \phi ^ { * } ( z _ { i } ) , \quad \forall i = 1 , \dots , n ,
107
+ $$
108
+
109
+ where $\phi ^ { * }$ is a perturbation direction, or velocity field, chosen to maximumly decrease the KL divergence between the distribution of updated particles and the target distribution, in the sense that
110
+
111
+ $$
112
+ \phi ^ { * } = \underset { \phi \in \mathcal { F } } { \arg \operatorname* { m a x } } \bigg \{ - \frac { d } { d \epsilon } \mathrm { K L } ( q _ { [ \epsilon \phi ] } \left| \right| p ) \big | _ { \epsilon = 0 } \bigg \} ,
113
+ $$
114
+
115
+ where $q _ { [ \epsilon \phi ] }$ denotes the density of the updated particle $z ^ { \prime } = z + \epsilon \phi ( z )$ when the density of the original particle $z$ is $q$ , and $\mathcal { F }$ is the set of perturbation directions that we optimize over. A key observation (Liu & Wang, 2016) is that the optimization in (11) is in fact equivalent to the optimization for KSD in (4); we have
116
+
117
+ $$
118
+ - \frac { d } { d \epsilon } \mathrm { K L } ( q _ { [ \epsilon \phi ] } \left| \right| p ) \big | _ { \epsilon = 0 } = \mathbb { E } _ { z \sim q } [ \mathcal { T } _ { p } \phi ( z ) ] ,
119
+ $$
120
+
121
+ that is, the Stein operator transforms the perturbation $\phi$ on the random variable (the particles) to the change of the KL divergence. Taking $\mathcal { F }$ to be unit ball of $\mathcal { H } ^ { d }$ as in (5), the optimal solution $\phi ^ { * }$ of (11) equals that of (6), which is shown to be (e.g., Liu et al., 2016)
122
+
123
+ $$
124
+ \phi ^ { * } ( z ^ { \prime } ) \propto \mathbb { E } _ { z \sim q } [ \mathcal { T } _ { p } ^ { z } k ( z , z ^ { \prime } ) ] = \mathbb { E } _ { z \sim q } [ \nabla _ { z } \log p ( z ) k ( z , z ^ { \prime } ) + \nabla _ { z } k ( z , z ^ { \prime } ) ] .
125
+ $$
126
+
127
+ # Algorithm 1 Amortized SVGD and KSD Minimization for Wild Variational Inference
128
+
129
+ for iteration t do
130
+
131
+ 1. Draw random $\{ \xi _ { i } \} _ { i = 1 } ^ { n }$ , calculate $z _ { i } = f ( \eta ; \xi _ { i } )$ , and the Stein variational gradient $\Delta z _ { i }$ in (13). 2. Update parameter $\eta$ using (14) or (15) for amortized SVGD, or (17) for KSD minimization. end for
132
+
133
+ By approximating the expectation under $q$ with the empirical mean of the current particles $\{ z _ { i } \} _ { i = 1 } ^ { n }$ , SVGD admits a simple form of update that iteratively moves the particles towards the target distribution,
134
+
135
+ $$
136
+ \begin{array} { r l } & { \qquad z _ { i } \gets z _ { i } + \epsilon \Delta z _ { i } , \quad \forall i = 1 , \ldots , n , } \\ & { \qquad \Delta z _ { i } = \hat { \mathbb { E } } _ { z \in \{ z _ { i } \} _ { i = 1 } ^ { n } } [ \nabla _ { z } \log p ( z ) k ( z , z _ { i } ) + \nabla _ { z } k ( z , z _ { i } ) ] , } \end{array}
137
+ $$
138
+
139
+ where $\begin{array} { r } { \hat { \mathbb { E } } _ { z \sim \{ z _ { i } \} _ { i = 1 } ^ { n } } [ f ( z ) ] = \sum _ { i } f ( z _ { i } ) / n } \end{array}$ . The two terms in $\Delta z _ { i }$ play two different roles: the term with the gradient $\nabla _ { z } \log { p ( z ) }$ drives the particles towards the high probability regions of $p ( z )$ , while the term with $\nabla _ { z } k ( z , z _ { i } )$ serves as a repulsive force to encourage diversity; to see this, consider a stationary kernel $k ( z , z ^ { \prime } ) = k ( z - z ^ { \prime } )$ , then the second term reduces to $\hat { \mathbb { E } } _ { z } \nabla _ { z } k ( z , z _ { i } ) =$ $- \hat { \mathbb { E } } _ { z } \nabla _ { z _ { i } } k ( z , z _ { i } )$ , which can be treated as the negative gradient for minimizing the average similarity $\hat { \mathbb { E } } _ { z } k ( z , z _ { i } )$ in terms of $z _ { i }$ .
140
+
141
+ It is easy to see from (13) that $\Delta z _ { i }$ reduces to the typical gradient $\nabla _ { z } \log { p ( z _ { i } ) }$ when there is only a single particle $( n = 1$ ) and $\nabla _ { z } k ( z , z _ { i } )$ when $z = z _ { i }$ , in which case SVGD reduces to the standard gradient ascent for maximizing $\log p ( z )$ (i.e., maximum a posteriori (MAP)).
142
+
143
+ # 3 TWO METHODS FOR WILD VARIATIONAL INFERENCE
144
+
145
+ Since the direct parametric optimization of the KL divergence (1) requires calculating $q _ { \eta } ( z )$ , there are two essential ways to avoid calculating $q _ { \eta } ( z )$ : either using alternative (approximate) optimization approaches, or using different divergence objective functions. We discuss two possible approaches in this work: one based on “amortizing SVGD” (Wang & Liu, 2016) which trains the inference network $f ( \eta , \xi )$ so that its output mimic the SVGD dynamics in order to decrease the KL divergence; another based on minimizing the KSD objective (9) which does not require to evaluate $q ( z )$ thanks to its special form.
146
+
147
+ # 3.1 AMORTIZED SVGD
148
+
149
+ SVGD provides an optimal updating direction to iteratively move a set of particles $\left\{ z _ { i } \right\}$ towards the target distribution $p ( z )$ . We can leverage it to train an inference network $f ( \eta ; \xi )$ by iteratively adjusting $\eta$ so that the output of $f ( \eta ; \xi )$ changes along the Stein variational gradient direction in order to maximumly decrease its KL divergence with the target distribution. By doing this, we “amortize” SVGD into a neural network, which allows us to leverage the past experience to adaptively improve the computational efficiency and generalize to new tasks with similar structures. Amortized SVGD is also presented in Wang $\&$ Liu (2016); here we present some additional discussion.
150
+
151
+ To be specific, assume $\{ \xi _ { i } \}$ are drawn from $q _ { 0 }$ and $z _ { i } = f ( \eta ; \xi _ { i } )$ the corresponding random output based on the current estimation of $\eta$ . We want to adjust $\eta$ so that $z _ { i }$ changes along the Stein variational gradient direction $\Delta z _ { i }$ in (13) so as to maximumly decrease the KL divergence with target distribution. This can be done by updating $\eta$ via
152
+
153
+ $$
154
+ \eta \gets \underset { \eta } { \arg \operatorname* { m i n } } \sum _ { i = 1 } ^ { n } | | f ( \eta ; \xi _ { i } ) - z _ { i } - \epsilon \Delta z _ { i } | | _ { 2 } ^ { 2 } .
155
+ $$
156
+
157
+ Essentially, this projects the non-parametric perturbation direction $\Delta z _ { i }$ to the change of the finite dimensional network parameter $\eta$ . If we take the step size $\epsilon$ to be small, then the updated $\eta$ by (14) should be very close to the old value, and a single step of gradient descent of (14) can provide a
158
+
159
+ good approximation for (14). This gives a simpler update rule:
160
+
161
+ $$
162
+ \eta \eta + \epsilon \sum _ { i } \partial _ { \eta } f ( \eta ; \xi _ { i } ) \Delta z _ { i } ,
163
+ $$
164
+
165
+ which can be intuitively interpreted as a form of chain rule that back-propagates the SVGD gradient to the network parameter $\eta$ . In fact, when we have only one particle, (15) reduces to the standard gradient ascent for $\operatorname* { m a x } _ { \eta } \log p ( f ( \eta ; ~ \xi ) )$ , in which $f _ { \eta }$ is trained to “learn to optimize” (e.g., Andrychowicz et al., 2016), instead of “learn to sample” $\dot { p ( z ) }$ . Importantly, as we have more than one particles, the repulsive term $\nabla _ { z } k ( z , z _ { i } )$ in $\Delta z _ { i }$ becomes active, and enforces an amount of diversity on the network output that is consistent with the variation in $p ( z )$ . The full algorithm is summarized in Algorithm 1.
166
+
167
+ Amortized SVGD can be treated as minimizing the KL divergence using a rather special algorithm: it leverages the non-parametric SVGD which can be treated as approximately solving the infinite dimensional optimization ${ \mathrm { m i n } } _ { q } \operatorname { K L } ( q | | p )$ without explicitly assuming a parametric form on $q$ , and iteratively projecting the non-parametric update back to the finite dimensional parameter space of $\eta$ . It is an interesting direction to extend this idea to “amortize” other MC/MCMC-based inference algorithms. For example, given a MCMC with transition probability $T ( z ^ { \prime } | z )$ whose stationary distribution is $p ( z )$ , we may adjust $\eta$ to make the network output move towards the updated values $z ^ { \prime }$ drawn from the transition probability $T ( z ^ { \prime } | z )$ . The advantage of using SVGD is that it provides a deterministic gradient direction which we can back-propagate conveniently and is particle efficient in that it reduces to “learning to optimize” with a single particle. We have been using the simple $L ^ { 2 }$ loss in (14) mainly for convenience; it is possible to use other two-sample discrepancy measures such as maximum mean discrepancy.
168
+
169
+ # 3.2 KSD VARIATIONAL INFERENCE
170
+
171
+ Amortized SVGD attends to minimize the KL divergence objective, but can not be interpreted as a typical finite dimensional optimization on parameter $\eta$ . Here we provide an alternative method based on directly minimizing the kernelized Stein discrepancy (KSD) objective, for which, thanks to its special form, the typical gradient-based optimization can be performed without needing to estimate $q ( z )$ explicitly.
172
+
173
+ To be specific, take $q _ { \eta }$ to be the density of the random output $z = f ( \eta ; \xi )$ when $\xi \sim q _ { 0 }$ , and we want to find $\eta$ to minimize $\mathbb { D } ( q _ { \eta } \parallel p )$ . Assuming $\{ \xi _ { i } \}$ is i.i.d. drawn from $q _ { 0 }$ , we can approximate $\mathbb { D } ^ { 2 } ( q _ { \eta } | | p )$ unbiasedly with a U-statistics:
174
+
175
+ $$
176
+ \mathbb { D } ^ { 2 } ( q _ { \eta } | | p ) \approx \frac { 1 } { n ( n - 1 ) } \sum _ { i \neq j } \kappa _ { p } ( f ( \eta ; \xi _ { i } ) , f ( \eta ; \xi _ { j } ) ) ,
177
+ $$
178
+
179
+ for which a standard gradient descent can be derived for optimizing $\eta$ :
180
+
181
+ $$
182
+ \eta \eta - \epsilon \frac { 2 } { n ( n - 1 ) } \sum _ { i \neq j } \partial _ { \eta } f ( \eta ; \xi _ { i } ) \nabla _ { z _ { i } } \kappa _ { p } ( z _ { i } , z _ { j } ) , \quad \mathrm { ~ w h e r e ~ } \quad z _ { i } = f ( \eta ; \xi _ { i } ) .
183
+ $$
184
+
185
+ This enables a wild variational inference method based on directly minimizing $\eta$ with standard (stochastic) gradient descent. See Algorithm 1. Note that (17) is similar to (15) in form, but replaces ∆zi with a ∆˜ zi ∝ − Pj : i6=j $\begin{array} { r } { \tilde { \Delta } z _ { i } \propto - \sum _ { j : i \neq j } \nabla _ { z _ { i } } \bar { \kappa } _ { p } ( z _ { i } , z _ { j } ) } \end{array}$ . It is also possible to use the $V$ -statistic in (9), but we find that the $U$ -statistic performs much better in practice, possibly because of its unbiasedness property.
186
+
187
+ Minimizing KSD can be viewed as minimizing a constrastive divergence objective function. To see this, recall that $q _ { [ \epsilon \phi ] }$ denotes the density of $z ^ { \prime } = z + \epsilon \phi ( z )$ when $z \sim q$ . Combining (11) and (6), we can show that
188
+
189
+ $$
190
+ \mathbb { D } ^ { 2 } ( q | | p ) \approx \frac { 1 } { \epsilon } ( \mathrm { K L } ( q | | p ) - \mathrm { K L } ( q _ { [ \epsilon \phi ] } | | p ) ) .
191
+ $$
192
+
193
+ That is, KSD measures the amount of decrease of $\mathrm { K L }$ divergence when we update the particles along the optimal SVGD perturbation direction $\phi$ given by (11). If $q = p$ , then the decrease of KL
194
+
195
+ divergence equals zero and $\mathbb { D } ^ { 2 } ( q | | p )$ equals zero. In fact, as shown in Liu & Wang (2016) KSD can be explicitly represented as the magnitude of a functional gradient of KL divergence:
196
+
197
+ $$
198
+ \mathbb { D } ( q \parallel p ) = \biggl \| \frac { d } { d \phi } \mathrm { K L } ( q _ { [ \phi ] } \parallel p ) \bigr | _ { \phi = 0 } \biggl | \biggl | _ { \mathcal { H } ^ { d } } ,
199
+ $$
200
+
201
+ where $q _ { [ \phi ] }$ is the density of $z = z + \phi ( z )$ when $z \sim q$ , and $\textstyle { \frac { d } { d \phi } } F ( \phi )$ denotes the functional gradient of functional $F ( \phi )$ w.r.t. $\phi$ defined in RKHS $\mathcal { H } ^ { d }$ , and $\begin{array} { r } { \frac { d } { d \phi } F ( { \dot { \phi } } ) } \end{array}$ is also an element in $\mathcal { H } ^ { d }$ . Therefore, KSD variational inference can be treated as explicitly minimizing the magnitude of the gradient of KL divergence, in contract with amortized SVGD which attends to minimize the KL divergence objective itself.
202
+
203
+ This idea is also similar to the contrastive divergence used for learning restricted Boltzmann machine (RBM) (Hinton, 2002) (which, however, optimizes $p$ with fixed $q$ ). It is possible to extend this approach by replacing $z ^ { \prime } = z + \epsilon \phi ( z )$ with other transforms, such as these given by a transition probability of a Markov chain whose stationary distribution is $p$ . In fact, according the so called generator method for constructing Stein operator (Barbour, 1988), any generator of a Markov process defines a Stein operator that can be used to define a corresponding Stein discrepancy.
204
+
205
+ This idea is related to a very recent work by Ranganath et al. (2016), which is based on directly minimizing the variational form of Stein discrepancy in (4); Ranganath et al. (2016) assumes $\mathcal { F }$ consists of a neural network $\phi _ { \tau } ( z )$ parametrized by $\tau$ , and find $\eta$ by solving the following min-max problem:
206
+
207
+ $$
208
+ \operatorname* { m i n } _ { \eta } \operatorname* { m a x } _ { \tau } \mathbb { E } _ { z \sim q } [ \mathcal { T } _ { p } \phi _ { \tau } ( z ) ] .
209
+ $$
210
+
211
+ In contrast, our method leverages the closed form solution by taking $\mathcal { F }$ to be an RKHS and hence obtains an explicit optimization problem, instead of a min-max problem that can be computationally more expensive, or have difficulty in achieving convergence.
212
+
213
+ Because $\kappa _ { p } ( \boldsymbol { x } , \boldsymbol { x } ^ { \prime } )$ (defined in (8)) depends on the derivative $\nabla _ { x } \log p ( x )$ of the target distribution, the gradient in (17) depends on the Hessian matrix $\nabla _ { x } ^ { 2 } \log p ( x )$ and is hence less convenient to implement compared with amortized SVGD (the method by Ranganath et al. (2016) also has the same problem). However, this problem can be alleviated using automatic differentiation tools, which be used to directly take the derivative of the objective in (16) without manually deriving its derivatives.
214
+
215
+ # 4 LANGEVIN INFERENCE NETWORK
216
+
217
+ With wild variational inference, we can choose more complex inference network structures to obtain better approximation accuracy. Ideally, the best network structure should leverage the special properties of the target distribution $p ( z )$ in a convenient way. One way to achieve this by viewing existing MC/MCMC methods as inference networks with hand-designed (and hence potentially suboptimal) parameters, but good architectures that take the information of the target distribution $p ( z )$ into account. By applying wild variational inference on networks constructed based on existing MCMC methods, we effectively provide an hyper-parameter optimization for these existing methods. This allows us to fully optimize the potential of existing Bayesian inference methods, significantly improving the result with less computation cost, and decreasing the need for hyper-parameter tuning by human experts. This is particularly useful when we need to solve a large number of similar tasks, where the computation cost spent on optimizing the hyper-parameters can significantly improve the performance on the future tasks.
218
+
219
+ Stochastic Gradient Langevin Dynamics We first take the original stochastic gradient Langevin dynamics (SGLD) algorithm (Welling & Teh, 2011) as an example. SGLD starts with a random initialization $z _ { \mathrm { 0 } }$ , and perform iterative update of form
220
+
221
+ $$
222
+ z ^ { t + 1 } \gets z ^ { t } + \eta ^ { t } \odot \nabla _ { z } \log \hat { p } ( z ^ { t } ; \mathbb { M } ^ { t } ) + \sqrt { 2 \eta ^ { t } } \odot \xi ^ { t } , \quad \forall t = 1 , \cdot \cdot \cdot T ,
223
+ $$
224
+
225
+ where $\log \hat { p } ( z ^ { t } ; \ \mathbb { M } ^ { t } )$ denotes an approximation of $\log p ( z ^ { t } )$ based on, e.g., a random mini-batch $\mathbb { M } ^ { t }$ of observed data at $t$ -th iteration, and $\xi ^ { t }$ is a standard Gaussian random vector of the same size as $z$ , and $\eta ^ { t }$ denotes a (vector) step-size at $t$ -th iteration; here “ $\odot$ ” denotes element-wise product. When running SGLD for $T$ iterations, we can treat $z ^ { T }$ as the output of a $T$ -layer neural network parametrized by the collection of step sizes $\eta = \{ \eta ^ { t } \} _ { t = 1 } ^ { T }$ , whose random inputs include the random initialization $z _ { \mathrm { 0 } }$ , the mini-batch $\mathbb { M } ^ { t }$ and Gaussian noise $\xi ^ { t }$ at each iteration $t$ . We can see that this defines a rather complex network structure with several different types of random inputs $( z ^ { 0 } , \mathbb { M } ^ { t }$ and $\boldsymbol { \xi } ^ { t }$ ). This makes it intractable to explicitly calculate the density of $z ^ { T }$ and traditional variational inference methods can not be applied directly. But wild variational inference can still allow us to adaptively improve the optimal step-size $\eta$ in this case.
226
+
227
+ ![](images/d01a7e1c35323e43b5217ad65d7e281f4bd1b1cefac515f6b3a5b589310d9d9a.jpg)
228
+ Figure 2: Results on a 1D Gaussian mixture when training the step sizes of SGLD with $T = 2 0$ iterations. The target distribution $p ( x )$ is shown by the red dashed line. (a) The distribution of the initialization $z _ { 0 }$ of SGLD (the green line), visualized by kernel density estimator. (b)-(d) The distribution of the final output $z ^ { T }$ (green line) given by different types of step sizes, visualized by kernel density estimator.
229
+
230
+ General Langevin Networks Based on the original formula of SGLD, we proposed a more general langevin network structure, and each layer of the network has a form
231
+
232
+ $$
233
+ \begin{array} { r l r } & { z ^ { t + 1 } \gets A ^ { t } z ^ { t } + h ( B ^ { t } B ^ { t } ^ { \top } \nabla _ { z } \log \hat { p } ( z ^ { t } ; \mathbb { M } ^ { t } ) + B ^ { t } \xi ^ { t } + D ^ { t } ) , \quad } & { \forall t = 1 , \cdots T , } \end{array}
234
+ $$
235
+
236
+ where $A ^ { t } , B ^ { t }$ and $D ^ { t }$ are network parameters at $t$ -th iteration(whose size is $d \times d$ , and $d$ is the size of $z ^ { t }$ ), and $h ( \cdot )$ denotes a smooth element-wise non-linearity function; here $\xi ^ { t }$ is still a standard gaussian random vector with the same size as $z$ . With this more complex network, we can use fewer layers to construct more powerful back-box samplers.
237
+
238
+ # 5 EMPIRICAL RESULTS
239
+
240
+ # 5.1 SGLD INFERENCE NETWORK
241
+
242
+ We first test our algorithm with SGLD inference network with (18) formula on both a toy Gaussian mixture model and a Bayesian logistic regression example. We find that we can adaptively learn step sizes that significantly outperform the existing hand-designed step size schemes, and hence save computational cost in the testing phase. In particular, we compare with the following step size schemes, for all of which we report the best results (testing accuracy in Figure 3(a); testing likelihood in Figure 3(b)) among a range of hyper-parameters:
243
+
244
+ 1. Constant Step Size. We select a best constant step size in $\{ 1 , 2 , 2 ^ { 3 } , \dots , 2 ^ { 2 9 } \} \times 1 0 ^ { - 6 }$ .
245
+
246
+ 2. Power Decay Step Size. We consider $\epsilon ^ { t } ~ = ~ 1 0 ^ { a } ~ \times ~ ( b + t ) ^ { - \gamma }$ where $\gamma \ = \ 0 . 5 5$ , $a \in$ $\{ - 6 , - 5 , \ldots , 1 , 2 \}$ , $b \in \{ 0 , 1 , \ldots , 9 \}$ .
247
+
248
+ 3. Adagrad, Rmsprop, Adadelta, all with the master step size selected in $\{ 1 , 2 , 2 ^ { 3 } , \dots , 2 ^ { 2 9 } \} \times 1 0 ^ { - 6 }$ , with the other parameters chosen by default values.
249
+
250
+ Gaussian Mixture We start with a simple 1D Gaussian mixture example shown in Figure 2 where the target distribution $p ( z )$ is shown by the red dashed curve. We use amortized SVGD and KSD to optimize the step size parameter of the Langevin inference network in (18) with $T = 2 0$ layers (i.e., SGLD with $T = 2 0$ iterations), with an initial $z _ { \mathrm { 0 } }$ drawn from a $q _ { 0 }$ far away from the target distribution (see the green curve in Figure 2(a)); this makes it critical to choose a proper step size to achieve close approximation within $T = 2 0$ iterations. We find that amortized SVGD and KSD allow us to achieve good performance with 20 steps of SGLD updates (Figure 2(b)-(c)), while the result of the best constant step size and power decay step-size are much worse (Figure 2(d)-(e)).
251
+
252
+ ![](images/858102adb7f3c954e9a9dd7b03a65ea02c4fcccf9767ec7a02edd22091c97062.jpg)
253
+ Figure 3: The testing accuracy (a) and testing likelihood (b) when training Langevin inference network with $T \in \{ 1 0 , \bar { 5 } 0 , 1 0 0 \}$ layers, respectively. The results reported here are the performance of the final result $z ^ { T }$ outputted by the last layer of the network. We find that both amortized SVGD and KSD minimization (with $\mathrm { U }$ -statistics) outperform all the hand-designed learning rates. Results averaged on 100 random trails.
254
+
255
+ Bayesian Logistic Regression We consider Bayesian logistic regression for binary classification using the same setting as Gershman et al. (2012), which assigns the regression weights $w$ with a Gaussian prior $p _ { 0 } ( w | \bar { \alpha } ) = \mathcal { N } ( w , \alpha ^ { - 1 } )$ and $p _ { 0 } ( \alpha ) = G a m m a ( \alpha , 1 , 0 . 0 1 )$ . The inference is applied on the posterior of $z = [ w , \log \alpha ]$ . We test this model on the binary Covertype dataset1 with 581,012 data points and 54 features.
256
+
257
+ To demonstrate that our estimated learning rate can work well on new datasets never seen by the algorithm. We partition the dataset into mini-datasets of size 50, 000, and use $8 0 \%$ of them for training and $2 0 \%$ for testing. We adapt our amortized SVGD/KSD to train on the whole population of the training mini-datasets by randomly selecting a mini-dataset at each iteration of Algorithm 1, and evaluate the performance of the estimated step sizes on the remaining $2 0 \%$ testing mini-datasets.
258
+
259
+ Figure 3 reports the testing accuracy and likelihood on the $2 0 \%$ testing mini-datasets when we train the Langevin network with $T = 1 0 , 5 0 , 1 0 0$ layers, respectively. We find that our methods outperform all the hand-designed learning rates, and allow us to get performance closer to the fully converged SGLD and SVGD with a small number $T$ of iterations.
260
+
261
+ Figure 4 shows the testing accuracy and testing likelihood of all the intermediate results when training Langevin network with $T = 1 0 0$ layers. It is interesting to observe that amortized SVGD and KSD learn rather different behavior: KSD tends to increase the performance quickly at the first few iterations but saturate quickly, while amortized SVGD tends to increase slowly in the beginning and boost the performance quickly in the last few iterations. Note that both algorithms are set up to optimize the performance of the last layers, while need to decide how to make progress on the intermediate layers to achieve the best final performance.
262
+
263
+ # 5.2 GENERAL LANGEVIN INFERENCE NETWORK
264
+
265
+ We further test our algorithm with general Langevin inference network. We firstly construct one single layer general Langevin network to approach the posterior of Bayesian logistic regression parameters and we can achieve $7 4 . 5 8 \%$ average accuracy and $- 0 . 5 2 1 6$ average testing log-likelihood in 100 repeat experiments. This result proves the proposed general Langevin Inference Network is quite competitive and worth to explore. Moreover, we use it as a black-box sampler to approach more complicate Gaussian Mixture distributions.
266
+
267
+ Gaussian Mixture We consider 10 components Gaussian Mixture Models with mean and covariance matrix of each component randomly drawed from a uniform distribution, and we test our methods on different dimensions models.
268
+
269
+ We construct 6 layers of general Langevin networks as a black-box sampler, and our proposed two methods to train the black-box sampler to approximate the target distribution. Figure 5 shows our results on 50 dimension Gaussian Mixture case and figure 6 shows results of different dimensions of Gaussian Mixture. From the figures we can know that our proposed sampling structure is quite competive comparing with NUT sampler(Hoffman & Gelman, 2014), and these two variational inference methods can both train a good black-box sampler.
270
+
271
+ ![](images/b51f406093bed295d5f6b9f4bff9d74ab2e413a98fae5aae64a7c4df31ea9c26.jpg)
272
+ Figure 4: The testing accuracy (a) and testing likelihood (b) of the outputs of the intermediate layers when training the Langevin network with $\bar { T } = 1 0 0$ layers. Note that both amortized SVGD and KSD minimization target to optimize the performance of the last layer, but need to optimize the progress of the intermediate steps in order to achieve the best final results.
273
+
274
+ ![](images/11ffb85315b5278fdeac6e9921e4cc43945ee3da66dcc44852474a305675e7ab.jpg)
275
+ Figure 5: Comparation between our methods and NUTS on 50 dimension Gaussian Mixture. (a)-(c) show the mean square errors when using different number particles to estimate expectation $\mathbb { E } ( h ( x ) )$ for $h ( x ) = x$ , $\bar { x ^ { 2 } }$ , and $c o s ( x + b )$ ; for $\cos ( \omega x + b )$ , we random draw $\omega \sim \mathcal { N } ( 0 , 1 )$ and $b \sim$ Uniform $( [ 0 , 2 \pi ] )$ and report the average MSE over 10 random draws of and b.
276
+
277
+ ![](images/08bb781eebe5730a7ad456b1b4ed41bb9785a9a7f86452204c07c4983560432e.jpg)
278
+ Figure 6: Comparation between our methods and NUTS For different dimension Gaussian Mixture. (a)-(c) show the mean square errors when using different number particles to estimate expectation $\mathbb { E } ( h ( x ) )$ for $h ( x ) = x ,$ , $\overline { { x ^ { 2 } } }$ , and $c o s ( x + b )$ ; for $c o s ( \omega x + b )$ , we random draw $\omega \sim \mathcal { N } ( 0 , 1 )$ and $\boldsymbol { b } \sim \operatorname { U n i f o r m } ( [ 0 , 2 \pi ] )$ and report the average MSE over 10 random draws of and b.
279
+
280
+ # 6 CONCLUSION
281
+
282
+ We consider two methods for wild variational inference that allows us to train general inference networks with intractable density functions, and apply it to adaptively estimate step sizes of stochastic gradient Langevin dynamics. More studies are needed to develop better methods, more applications and theoretical understandings for wild variational inference, and we hope that the two methods we discussed in the paper can motivate more ideas and studies in the field.
283
+
284
+ # REFERENCES
285
+
286
+ Agakov, Felix V and Barber, David. An auxiliary variational method. In International Conference on Neural Information Processing, pp. 561–566. Springer, 2004.
287
+ Andrieu, Christophe and Thoms, Johannes. A tutorial on adaptive mcmc. Statistics and Computing, 18(4): 343–373, 2008.
288
+ Andrychowicz, Marcin, Denil, Misha, Gomez, Sergio, Hoffman, Matthew W, Pfau, David, Schaul, Tom, and de Freitas, Nando. Learning to learn by gradient descent by gradient descent. arXiv preprint arXiv:1606.04474, 2016.
289
+ Barbour, Andrew D. Stein’s method and poisson process convergence. Journal of Applied Probability, pp. 175–184, 1988.
290
+ Chwialkowski, Kacper, Strathmann, Heiko, and Gretton, Arthur. A kernel test of goodness of fit. In Proceedings of the International Conference on Machine Learning (ICML), 2016.
291
+ Gershman, Samuel, Hoffman, Matt, and Blei, David. Nonparametric variational inference. In Proceedings of the International Conference on Machine Learning (ICML), 2012.
292
+ Gershman, Samuel J and Goodman, Noah D. Amortized inference in probabilistic reasoning. In Proceedings of the 36th Annual Conference of the Cognitive Science Society, 2014.
293
+ Gorham, Jack and Mackey, Lester. Measuring sample quality with Stein’s method. In Advances in Neural Information Processing Systems (NIPS), pp. 226–234, 2015.
294
+ He, Kaiming, Zhang, Xiangyu, Ren, Shaoqing, and Sun, Jian. Deep residual learning for image recognition. In CVPR, 2016.
295
+ Hinton, Geoffrey E. Training products of experts by minimizing contrastive divergence. Neural computation, 14(8):1771–1800, 2002.
296
+ Hoffman, Matthew D and Gelman, Andrew. The no-u-turn sampler: adaptively setting path lengths in hamiltonian monte carlo. Journal of Machine Learning Research, 15(1):1593–1623, 2014.
297
+ Hoffman, Matthew D, Blei, David M, Wang, Chong, and Paisley, John. Stochastic variational inference. JMLR, 2013.
298
+ Kingma, Diederik P and Welling, Max. Auto-encoding variational Bayes. In Proceedings of the International Conference on Learning Representations (ICLR), 2013.
299
+ Liu, Qiang and Wang, Dilin. Stein variational gradient descent: A general purpose bayesian inference algorithm. arXiv preprint arXiv:1608.04471, 2016.
300
+ Liu, Qiang, Lee, Jason D, and Jordan, Michael I. A kernelized Stein discrepancy for goodness-of-fit tests. In Proceedings of the International Conference on Machine Learning (ICML), 2016.
301
+ Maclaurin, Dougal, Duvenaud, David, and Adams, Ryan P. Early stopping is nonparametric variational inference. arXiv preprint arXiv:1504.01344, 2015.
302
+ Mandt, Stephan, Hoffman, Matthew D, and Blei, David M. A variational analysis of stochastic gradient algorithms. arXiv preprint arXiv:1602.02666, 2016.
303
+ Oates, Chris J, Girolami, Mark, and Chopin, Nicolas. Control functionals for Monte Carlo integration. Journal of the Royal Statistical Society, Series B, 2017.
304
+ Paige, Brooks and Wood, Frank. Inference networks for sequential monte carlo in graphical models. arXiv preprint arXiv:1602.06701, 2016.
305
+ Ranganath, R., Altosaar, J., Tran, D., and Blei, D.M. Operator variational inference. 2016.
306
+ Ranganath, Rajesh, Gerrish, Sean, and Blei, David M. Black box variational inference. In Proceedings of the International Conference on Artificial Intelligence and Statistics (AISTATS), 2014.
307
+ Ranganath, Rajesh, Tran, Dustin, and Blei, David M. Hierarchical variational models. arXiv preprint arXiv:1511.02386, 2015.
308
+ Rezende, Danilo Jimenez and Mohamed, Shakir. Variational inference with normalizing flows. In Proceedings of the International Conference on Machine Learning (ICML), 2015a.
309
+ Rezende, Danilo Jimenez and Mohamed, Shakir. Variational inference with normalizing flows. arXiv preprint arXiv:1505.05770, 2015b.
310
+ Roberts, Gareth O and Rosenthal, Jeffrey S. Examples of adaptive mcmc. Journal of Computational and Graphical Statistics, 18(2):349–367, 2009.
311
+ Salimans, Tim et al. Markov chain monte carlo and variational inference: Bridging the gap. In International Conference on Machine Learning, 2015.
312
+ Tran, Dustin, Ranganath, Rajesh, and Blei, David M. Variational gaussian process. arXiv preprint arXiv:1511.06499, 2015.
313
+ Wang, Dilin and Liu, Qiang. Learning to draw samples: With application to amortized mle for generative adversarial learning. Submitted to ICLR 2017, 2016.
314
+ Welling, Max and Teh, Yee W. Bayesian learning via stochastic gradient Langevin dynamics. In Proceedings of the International Conference on Machine Learning (ICML), 2011.
parse/train/Sy4tzwqxe/Sy4tzwqxe_content_list.json ADDED
@@ -0,0 +1,1426 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "TWO METHODS FOR WILD VARIATIONAL INFERENCE ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 173,
8
+ 98,
9
+ 816,
10
+ 121
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Qiang Liu Yihao Feng \nComputer Science, Dartmouth College \nHanover, NH, 03755 \n{qiang.liu, yihao.feng.gr}@dartmouth.edu ",
17
+ "bbox": [
18
+ 184,
19
+ 145,
20
+ 573,
21
+ 202
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 237,
32
+ 544,
33
+ 252
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Variational inference provides a powerful tool for approximate probabilistic inference on complex, structured models. Typical variational inference methods, however, require to use inference networks with computationally tractable probability density functions. This largely limits the design and implementation of variational inference methods. We consider wild variational inference methods that do not require tractable density functions on the inference networks, and hence can be applied in more challenging cases. As an example of application, we treat stochastic gradient Langevin dynamics (SGLD) as an inference network, and use our methods to automatically adjust the step sizes of SGLD, yielding significant improvement over the hand-designed step size schemes. ",
40
+ "bbox": [
41
+ 233,
42
+ 267,
43
+ 764,
44
+ 406
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 430,
55
+ 336,
56
+ 445
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Probabilistic modeling provides a principled approach for reasoning under uncertainty, and has been increasingly dominant in modern machine learning where highly complex, structured probabilistic models are often the essential components for solving complex problems with increasingly larger datasets. A key challenge, however, is to develop computationally efficient Bayesian inference methods to approximate, or draw samples from the posterior distributions. Variational inference (VI) provides a powerful tool for scaling Bayesian inference to complex models and big data. The basic idea of VI is to approximate the true distribution with a simpler distribution by minimizing the KL divergence, transforming the inference problem into an optimization problem, which is often then solved efficiently using stochastic optimization techniques (e.g., Hoffman et al., 2013; Kingma & Welling, 2013). However, the practical design and application of VI are still largely restricted by the requirement of using simple approximation families, as we explain in the sequel. ",
63
+ "bbox": [
64
+ 173,
65
+ 460,
66
+ 825,
67
+ 614
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Let $p ( z )$ be a distribution of interest, such as the posterior distribution in Bayesian inference. VI approximates $p ( z )$ with a simpler distribution $q ^ { * } ( z )$ found in a set $\\mathcal { Q } = \\{ q _ { \\eta } ( z ) \\}$ of distributions indexed by parameter $\\eta$ by minimizing the KL divergence objective: ",
74
+ "bbox": [
75
+ 173,
76
+ 621,
77
+ 825,
78
+ 662
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "equation",
84
+ "img_path": "images/579214cd81dc0f07f6a777e7772a6b8184d838c13132d28269d05841c7b081fc.jpg",
85
+ "text": "$$\n\\operatorname* { m i n } _ { \\eta } \\big \\{ \\mathrm { K L } ( q _ { \\eta } | | p ) \\equiv \\mathbb { E } _ { z \\sim q _ { \\eta } } [ \\log ( q _ { \\eta } ( z ) / p ( z ) ) ] \\big \\} ,\n$$",
86
+ "text_format": "latex",
87
+ "bbox": [
88
+ 339,
89
+ 665,
90
+ 653,
91
+ 690
92
+ ],
93
+ "page_idx": 0
94
+ },
95
+ {
96
+ "type": "text",
97
+ "text": "where we can get exact result $\\boldsymbol { p } = \\boldsymbol { q } ^ { * }$ if $\\mathcal { Q }$ is chosen to be broad enough to actually include $p$ . In practice, however, $\\mathcal { Q }$ should be chosen carefully to make the optimization in (1) computationally tractable; this casts two constraints on $\\mathcal { Q }$ : ",
98
+ "bbox": [
99
+ 174,
100
+ 693,
101
+ 825,
102
+ 734
103
+ ],
104
+ "page_idx": 0
105
+ },
106
+ {
107
+ "type": "text",
108
+ "text": "1. A minimum requirement is that we should be able to sample from $q _ { \\eta }$ efficiently, which allows us to make estimates and predictions based on $q _ { \\eta }$ in placement of the more intractable $p$ . The samples from $q _ { \\eta }$ can also be used to approximate the expectation $\\mathbb { E } _ { q } [ \\cdot ]$ in (1) during optimization. This means that there should exist some computable function $f ( \\eta ; \\xi )$ , called the inference network, which takes a random seed $\\xi$ , whose distribution is denoted by $q _ { 0 }$ , and outputs a random variable $z = f ( \\eta ; \\xi )$ whose distribution is $q _ { \\eta }$ . ",
109
+ "bbox": [
110
+ 173,
111
+ 741,
112
+ 825,
113
+ 827
114
+ ],
115
+ "page_idx": 0
116
+ },
117
+ {
118
+ "type": "text",
119
+ "text": "2. We should also be able to calculate the density $q _ { \\eta } ( z )$ or it is derivative in order to optimize the KL divergence in (1). This, however, casts a much more restrictive condition, since it requires us to use only simple inference network $f ( \\eta ; \\xi )$ and input distributions $q _ { 0 }$ to ensure a tractable form for the density $q _ { \\eta }$ of the output $z = f ( \\eta ; \\xi )$ . ",
120
+ "bbox": [
121
+ 174,
122
+ 832,
123
+ 823,
124
+ 890
125
+ ],
126
+ "page_idx": 0
127
+ },
128
+ {
129
+ "type": "text",
130
+ "text": "In fact, it is this requirement of calculating $q _ { \\eta } ( z )$ that has been the major constraint for the design of state-of-the-art variational inference methods. The traditional $\\mathrm { V I }$ methods are often limited to using simple mean field, or Gaussian-based distributions as $q _ { \\eta }$ and do not perform well for approximating complex target distributions. There is a line of recent work on variational inference with rich approximation families (e.g., Rezende & Mohamed, 2015b; Tran et al., 2015; Ranganath et al., 2015, to name only a few), all based on handcrafting special inference networks to ensure the computational tractability of $q _ { \\eta } ( z )$ while simultaneously obtaining high approximation accuracy. These approaches require substantial mathematical insights and research effects, and can be difficult to understand or use for practitioners without a strong research background in VI. Methods that allow us to use arbitrary inference networks without substantial constraints can significantly simplify the design and applications of VI methods, allowing practical users to focus more on choosing proposals that work best with their specific tasks. ",
131
+ "bbox": [
132
+ 173,
133
+ 895,
134
+ 823,
135
+ 924
136
+ ],
137
+ "page_idx": 0
138
+ },
139
+ {
140
+ "type": "image",
141
+ "img_path": "images/492f43da16371fc8172240c5ae93883a2e505491b54eb7915f5010a97f8cb46b.jpg",
142
+ "image_caption": [
143
+ "Figure 1: Wild variational inference allows us to train general stochastic neural inference networks to learn to draw (approximate) samples from the target distributions, without restriction on the computational tractability of the density function of the neural inference networks. "
144
+ ],
145
+ "image_footnote": [],
146
+ "bbox": [
147
+ 289,
148
+ 101,
149
+ 694,
150
+ 185
151
+ ],
152
+ "page_idx": 1
153
+ },
154
+ {
155
+ "type": "text",
156
+ "text": "",
157
+ "bbox": [
158
+ 173,
159
+ 261,
160
+ 825,
161
+ 400
162
+ ],
163
+ "page_idx": 1
164
+ },
165
+ {
166
+ "type": "text",
167
+ "text": "We use the term wild variational inference to refer to variants of variational methods working with general inference networks $f ( \\eta , \\xi )$ without tractability constraints on its output density $q _ { \\eta } ( z )$ ; this should be distinguished with the black-box variational inference (Ranganath et al., 2014) which refers to methods that work for generic target distributions $p ( z )$ without significant model-by-model consideration (but still require to calculate the proposal density $q _ { \\eta } ( z ) _ { , }$ ). Essentially, wild variational inference makes it possible to “learn to draw samples”, constructing black-box neural samplers for given distributions. This enables more adaptive and automatic design of efficient Bayesian inference procedures, replacing the hand-designed inference algorithms with more efficient ones that can improve their efficiency adaptively over time based on past tasks they performed. ",
168
+ "bbox": [
169
+ 174,
170
+ 407,
171
+ 825,
172
+ 534
173
+ ],
174
+ "page_idx": 1
175
+ },
176
+ {
177
+ "type": "text",
178
+ "text": "In this work, we discuss two methods for wild variational inference, both based on recent works that combine kernel techniques with Stein’s method (e.g., Liu & Wang, 2016; Liu et al., 2016). The first method, also discussed in Wang & Liu (2016), is based on iteratively adjusting parameter $\\eta$ to make the random output $z = f ( \\eta ; \\xi )$ mimic a Stein variational gradient direction (SVGD) (Liu & Wang, 2016) that optimally decreases its KL divergence with the target distribution. The second method is based on minimizing a kernelized Stein discrepancy, which, unlike KL divergence, does not require to calculate density $q _ { \\eta } ( z )$ for the optimization thanks to its special form. ",
179
+ "bbox": [
180
+ 174,
181
+ 540,
182
+ 825,
183
+ 637
184
+ ],
185
+ "page_idx": 1
186
+ },
187
+ {
188
+ "type": "text",
189
+ "text": "Another critical problem is to design good network architectures well suited for Bayesian inference. Ideally, the network design should leverage the information of the target distribution $p ( z )$ in a convenient way. One useful perspective is that we can view the existing MC/MCMC methods as (hand-designed) stochastic neural networks which can be used to construct native inference networks for given target distributions. On the other hand, using existing MC/MCMC methods as inference networks also allow us to adaptively adjust the hyper-parameters of these algorithms; this enables amortized inference which leverages the experience on past tasks to accelerate the Bayesian computation, providing a powerful approach for designing efficient algorithms in settings when a large number of similar tasks are needed. ",
190
+ "bbox": [
191
+ 173,
192
+ 643,
193
+ 825,
194
+ 768
195
+ ],
196
+ "page_idx": 1
197
+ },
198
+ {
199
+ "type": "text",
200
+ "text": "As an example, we leverage stochastic gradient Langevin dynamics (SGLD) (Welling & Teh, 2011) as the inference network, which can be treated as a special deep residential network (He et al., 2016), in which important gradient information $\\nabla _ { z } \\log { p ( z ) }$ is fed into each layer to allow efficient approximation for the target distribution $p ( z )$ . In our case, the network parameter $\\eta$ are the step sizes of SGLD, and our method provides a way to adaptively improve the step sizes, providing speed-up on future tasks with similar structures. We show that the adaptively estimated step sizes significantly outperform the hand-designed schemes such as Adagrad. ",
201
+ "bbox": [
202
+ 173,
203
+ 775,
204
+ 825,
205
+ 873
206
+ ],
207
+ "page_idx": 1
208
+ },
209
+ {
210
+ "type": "text",
211
+ "text": "Related Works The idea of amortized inference (Gershman & Goodman, 2014) has been recently applied in various domains of probabilistic reasoning, including both amortized variational inference (e.g., Kingma & Welling, 2013; Rezende & Mohamed, 2015a) and date-driven designs of Monte Carlo based methods (e.g., Paige & Wood, 2016), to name only a few. Most of these methods, however, require to explicitly calculate $q _ { \\eta } ( z )$ (or its gradient). ",
212
+ "bbox": [
213
+ 173,
214
+ 895,
215
+ 821,
216
+ 924
217
+ ],
218
+ "page_idx": 1
219
+ },
220
+ {
221
+ "type": "text",
222
+ "text": "",
223
+ "bbox": [
224
+ 174,
225
+ 103,
226
+ 823,
227
+ 146
228
+ ],
229
+ "page_idx": 2
230
+ },
231
+ {
232
+ "type": "text",
233
+ "text": "One well exception is a very recent work (Ranganath et al., 2016) that also avoids calculating $q _ { \\eta } ( z )$ and hence works for general inference networks; their method is based on a similar idea related to Stein discrepancy (Liu et al., 2016; Oates et al., 2017; Chwialkowski et al., 2016; Gorham & Mackey, 2015), for which we provide a more detailed discussion in Section 3.2. ",
234
+ "bbox": [
235
+ 174,
236
+ 152,
237
+ 825,
238
+ 208
239
+ ],
240
+ "page_idx": 2
241
+ },
242
+ {
243
+ "type": "text",
244
+ "text": "The auxiliary variational inference methods (e.g., Agakov & Barber, 2004) provide an alternative way when the variational distribution $q _ { \\eta } ( z )$ can be represented as a hidden variable model. In particular, Salimans et al. (2015) used the auxiliary variational approach to leverage MCMC as a variational approximation. These approaches, however, still require to write down the likelihood function on the augmented spaces, and need to introduce an additional inference network related to the auxiliary variables. ",
245
+ "bbox": [
246
+ 173,
247
+ 215,
248
+ 825,
249
+ 299
250
+ ],
251
+ "page_idx": 2
252
+ },
253
+ {
254
+ "type": "text",
255
+ "text": "There is a large literature on traditional adaptive MCMC methods (e.g., Andrieu & Thoms, 2008; Roberts & Rosenthal, 2009) which can be used to adaptively adjust the proposal distribution of MCMC by exploiting the special theoretical properties of MCMC (e.g., by minimizing the autocorrelation). Our method is simpler, more generic, and works efficiently in practice thanks to the use of gradient-based back-propagation. Finally, connections between stochastic gradient descent and variational inference have been discussed and exploited in Mandt et al. (2016); Maclaurin et al. (2015). ",
256
+ "bbox": [
257
+ 173,
258
+ 306,
259
+ 825,
260
+ 404
261
+ ],
262
+ "page_idx": 2
263
+ },
264
+ {
265
+ "type": "text",
266
+ "text": "Outline Section 2 introduces background on Stein discrepancy and Stein variational gradient descent. Section 3 discusses two methods for wild variational inference. Section 4 discuss using stochastic gradient Langevin dynamics (SGLD) as the inference network. Empirical results are shown in Section 5. ",
267
+ "bbox": [
268
+ 173,
269
+ 419,
270
+ 825,
271
+ 474
272
+ ],
273
+ "page_idx": 2
274
+ },
275
+ {
276
+ "type": "text",
277
+ "text": "2 STEIN’S IDENTITY, STEIN DISCREPANCY, STEIN VARIATIONAL GRADIENT ",
278
+ "text_level": 1,
279
+ "bbox": [
280
+ 173,
281
+ 494,
282
+ 821,
283
+ 512
284
+ ],
285
+ "page_idx": 2
286
+ },
287
+ {
288
+ "type": "text",
289
+ "text": "Stein’s identity Stein’s identity plays a fundamental role in our framework. Let $p ( z )$ be a positive differentiable density on $\\mathbb { R } ^ { d }$ , and $\\dot { \\phi ( z ) } = [ \\phi _ { 1 } ( z ) , \\cdot \\cdot \\cdot , \\phi _ { d } ( z ) ] ^ { \\top }$ is a differentiable vector-valued function. Define $\\begin{array} { r } { \\nabla _ { z } \\cdot \\phi = \\sum _ { i } \\partial _ { z _ { i } } \\phi } \\end{array}$ . Stein’s identity is ",
290
+ "bbox": [
291
+ 174,
292
+ 526,
293
+ 825,
294
+ 569
295
+ ],
296
+ "page_idx": 2
297
+ },
298
+ {
299
+ "type": "equation",
300
+ "img_path": "images/f95e352caa4ff76618f15b985f808e5ba7bd5188b403c4e804f4d4dab80425a1.jpg",
301
+ "text": "$$\n\\mathbb { E } _ { z \\sim p } [ \\langle \\nabla _ { z } \\log p ( z ) , \\phi ( z ) \\rangle + \\nabla _ { z } \\cdot \\phi ( z ) ] = \\int _ { \\mathcal { X } } \\nabla _ { z } \\cdot ( p ( z ) \\phi ( z ) ) d x = 0 ,\n$$",
302
+ "text_format": "latex",
303
+ "bbox": [
304
+ 261,
305
+ 575,
306
+ 735,
307
+ 608
308
+ ],
309
+ "page_idx": 2
310
+ },
311
+ {
312
+ "type": "text",
313
+ "text": "which holds once $p ( z ) \\phi ( z )$ vanishes on the boundary of $\\mathcal { X }$ by integration by parts or Stokes’ theorem; It is useful to rewrite Stein’s identity in a more compact way: ",
314
+ "bbox": [
315
+ 173,
316
+ 613,
317
+ 821,
318
+ 643
319
+ ],
320
+ "page_idx": 2
321
+ },
322
+ {
323
+ "type": "equation",
324
+ "img_path": "images/93aa870542ac84ea7f5de104a82238eef79cad76abf31408be332eff5af081ca.jpg",
325
+ "text": "$$\n\\begin{array} { r } { \\mathbb { E } _ { z \\sim p } [ \\mathcal { T } _ { p } \\phi ( z ) ] = 0 , \\quad \\mathrm { ~ w i t h ~ } \\quad \\mathcal { T } _ { p } \\phi \\overset { d e f } { = } \\langle \\nabla _ { z } \\log p , \\phi \\rangle + \\nabla _ { z } \\cdot \\phi , } \\end{array}\n$$",
326
+ "text_format": "latex",
327
+ "bbox": [
328
+ 284,
329
+ 648,
330
+ 712,
331
+ 671
332
+ ],
333
+ "page_idx": 2
334
+ },
335
+ {
336
+ "type": "text",
337
+ "text": "where $\\mathcal { T } _ { p }$ is called a Stein operator, which acts on function $\\phi$ and returns a zero-mean function $\\mathcal { T } _ { p } \\phi ( z )$ under $z \\sim p$ . A key computational advantage of Stein’s identity and Stein operator is that they depend on $p$ only through the derivative of the log-density $\\nabla _ { z } \\log { p ( z ) }$ , which does not depend on the cumbersome normalization constant of $p$ , that is, when $p ( z ) = \\bar { p } ( z ) / Z$ , we have $\\nabla _ { z } \\log { p ( z ) } = \\nabla _ { z } \\log { \\bar { p } ( z ) }$ , independent of the normalization constant $Z$ . This property makes Stein’s identity a powerful practical tool for handling unnormalized distributions widely appeared in machine learning and statistics. ",
338
+ "bbox": [
339
+ 173,
340
+ 676,
341
+ 825,
342
+ 775
343
+ ],
344
+ "page_idx": 2
345
+ },
346
+ {
347
+ "type": "text",
348
+ "text": "Stein Discrepancy Although Stein’s identity ensures that $\\mathcal { T } _ { p } \\phi$ has zero expectation under $p$ , its expectation is generally non-zero under a different distribution $q$ . Instead, for $p \\neq q$ , there must exist a $\\phi$ which distinguishes $p$ and $q$ in the sense that $\\mathbb { E } _ { z \\sim q } [ \\mathcal { T } _ { p } \\phi ( z ) ] \\neq 0$ . Stein discrepancy leverages this fact to measure the difference between $p$ and $q$ by considering the “maximum violation of Stein’s identity” for $\\phi$ in certain function set $\\mathcal { F }$ : ",
349
+ "bbox": [
350
+ 173,
351
+ 789,
352
+ 825,
353
+ 859
354
+ ],
355
+ "page_idx": 2
356
+ },
357
+ {
358
+ "type": "equation",
359
+ "img_path": "images/976fb877407295b45d151f5a9f4a3c7b9f28a620f592067ee95749cb0b0188c8.jpg",
360
+ "text": "$$\n\\mathbb { D } ( q | | p ) = \\operatorname* { m a x } _ { \\phi \\in \\mathcal { F } } \\big \\{ \\mathbb { E } _ { z \\sim q } [ \\mathcal { T } _ { p } \\phi ( z ) ] \\big \\} ,\n$$",
361
+ "text_format": "latex",
362
+ "bbox": [
363
+ 382,
364
+ 864,
365
+ 614,
366
+ 890
367
+ ],
368
+ "page_idx": 2
369
+ },
370
+ {
371
+ "type": "text",
372
+ "text": "where $\\mathcal { F }$ is the set of functions $\\phi$ that we optimize over, and decides both the discriminative power and computational tractability of Stein discrepancy. Kernelized Stein discrepancy (KSD) is a special ",
373
+ "bbox": [
374
+ 174,
375
+ 895,
376
+ 823,
377
+ 924
378
+ ],
379
+ "page_idx": 2
380
+ },
381
+ {
382
+ "type": "text",
383
+ "text": "Stein discrepancy that takes $\\mathcal { F }$ to be the unit ball of vector-valued reproducing kernel Hilbert spaces (RKHS), that is, ",
384
+ "bbox": [
385
+ 173,
386
+ 103,
387
+ 825,
388
+ 132
389
+ ],
390
+ "page_idx": 3
391
+ },
392
+ {
393
+ "type": "equation",
394
+ "img_path": "images/a51d63acb9fd6b8c26c1f12c01be76710b4e579253cfff8c74619ec59b81850f.jpg",
395
+ "text": "$$\n\\mathcal { F } = \\{ \\phi \\in \\mathcal { H } ^ { d } : | | \\phi | | _ { \\mathcal { H } ^ { d } } \\leq 1 \\} ,\n$$",
396
+ "text_format": "latex",
397
+ "bbox": [
398
+ 397,
399
+ 136,
400
+ 599,
401
+ 155
402
+ ],
403
+ "page_idx": 3
404
+ },
405
+ {
406
+ "type": "text",
407
+ "text": "where $\\mathcal { H }$ is a real-valued RKHS with kernel $k ( z , z ^ { \\prime } )$ . This choice of $\\mathcal { F }$ makes it possible to get a closed form solution for the optimization in (4) (Liu et al., 2016; Chwialkowski et al., 2016; Oates et al., 2017): ",
408
+ "bbox": [
409
+ 176,
410
+ 160,
411
+ 823,
412
+ 203
413
+ ],
414
+ "page_idx": 3
415
+ },
416
+ {
417
+ "type": "equation",
418
+ "img_path": "images/d6a653e08ed091d6af2f044d1a2752cddbd27ee4adc027b785638267ca9d61a5.jpg",
419
+ "text": "$$\n\\begin{array} { r l } { \\mathbb { D } ( q | | p ) = \\underset { \\phi \\in \\mathcal { H } ^ { d } } { \\operatorname* { m a x } } \\big \\lbrace \\mathbb { E } _ { z \\sim q } [ T _ { p } \\phi ( z ) ] , } & { \\quad s . t . \\quad | | \\phi | | _ { \\mathcal { H } ^ { d } } \\leq 1 \\big \\rbrace , } \\\\ { = \\sqrt { \\mathbb { E } _ { z , z ^ { \\prime } \\sim q } [ \\kappa _ { p } ( z , z ^ { \\prime } ) ] } , } \\end{array}\n$$",
420
+ "text_format": "latex",
421
+ "bbox": [
422
+ 299,
423
+ 205,
424
+ 696,
425
+ 265
426
+ ],
427
+ "page_idx": 3
428
+ },
429
+ {
430
+ "type": "text",
431
+ "text": "where $\\kappa _ { p } \\big ( z , z ^ { \\prime } \\big )$ is a positive definite kernel obtained by applying Stein operator on $k ( z , z ^ { \\prime } )$ twice: ",
432
+ "bbox": [
433
+ 173,
434
+ 268,
435
+ 812,
436
+ 284
437
+ ],
438
+ "page_idx": 3
439
+ },
440
+ {
441
+ "type": "equation",
442
+ "img_path": "images/829bd1a6ceccc539fee194b7a83b31bf2cdb301b7f9800ea90e3e9a88e0b5860.jpg",
443
+ "text": "$$\n\\begin{array} { r l } & { \\kappa _ { p } ( z , z ^ { \\prime } ) = { \\mathcal { T } } _ { p } ^ { z ^ { \\prime } } ( { \\mathcal { T } } _ { p } ^ { z } \\otimes k ( z , z ^ { \\prime } ) ) , } \\\\ & { \\qquad = s _ { p } ( z ) s _ { p } ( z ^ { \\prime } ) k ( z , z ^ { \\prime } ) + s _ { p } ( z ) { \\nabla _ { z ^ { \\prime } } k ( z , z ^ { \\prime } ) } + s _ { p } ( z ^ { \\prime } ) { \\nabla _ { z } k ( z , z ^ { \\prime } ) } + { \\nabla _ { z } } \\cdot ( { \\nabla _ { z ^ { \\prime } } k ( z , z ^ { \\prime } ) } ) , } \\end{array}\n$$",
444
+ "text_format": "latex",
445
+ "bbox": [
446
+ 186,
447
+ 289,
448
+ 808,
449
+ 332
450
+ ],
451
+ "page_idx": 3
452
+ },
453
+ {
454
+ "type": "text",
455
+ "text": "where $\\pmb { \\mathscr { s } } _ { p } ( z ) = \\nabla _ { z } \\log p ( z )$ and $\\mathcal { T } _ { p } ^ { z }$ and $\\mathcal { T } _ { p } ^ { z }$ denote the Stein operator when treating $k ( z , z ^ { \\prime } )$ as a function of $z$ and $z ^ { \\prime }$ , respectively; here we defined $\\begin{array} { r } { T _ { p } ^ { z } \\otimes k ( z , z ^ { \\prime } ) = \\nabla _ { x } \\log p ( x ) k ( z , z ^ { \\prime } ) + \\nabla _ { x } k ( z , z ^ { \\prime } ) } \\end{array}$ which returns a $d \\times 1$ vector-valued function. It can be shown that $\\mathbb { D } ( q | | p ) = 0$ if and only if $q = p$ when $k ( z , z ^ { \\prime } )$ is strictly positive definite in a proper sense (Liu et al., 2016; Chwialkowski et al., 2016). $\\mathbb { D } ( q \\mid \\mid p )$ can treated as a variant of maximum mean discrepancy equipped with kernel $\\kappa _ { p } \\big ( z , z ^ { \\prime } \\big )$ which depends on $p$ (which makes $\\mathbb { D } ( q | | p )$ asymmetric on $q$ and $p$ ). ",
456
+ "bbox": [
457
+ 173,
458
+ 348,
459
+ 825,
460
+ 439
461
+ ],
462
+ "page_idx": 3
463
+ },
464
+ {
465
+ "type": "text",
466
+ "text": "The form of KSD in (6) allows us to estimate the discrepancy between a set of sample $\\left\\{ z _ { i } \\right\\}$ (e.g., drawn from $q$ ) and a distribution $p$ specified by $\\nabla _ { z } \\log { p ( z ) }$ , ",
467
+ "bbox": [
468
+ 173,
469
+ 444,
470
+ 823,
471
+ 473
472
+ ],
473
+ "page_idx": 3
474
+ },
475
+ {
476
+ "type": "equation",
477
+ "img_path": "images/30d9a74b33f4d5815bf8d37efbbec89bb26bb509c0c627d941433d412498d626.jpg",
478
+ "text": "$$\n\\widehat { \\mathbb { D } } _ { u } ^ { 2 } ( \\{ z _ { i } \\} \\mid | p ) = \\frac { 1 } { n ( n - 1 ) } \\sum _ { i \\neq j } [ \\kappa _ { p } ( z _ { i } , z _ { j } ) ] , \\qquad \\widehat { \\mathbb { D } } _ { v } ^ { 2 } ( \\{ z _ { i } \\} \\mid | p ) = \\frac { 1 } { n ^ { 2 } } \\sum _ { i , j } [ \\kappa _ { p } ( z _ { i } , z _ { j } ) ] ,\n$$",
479
+ "text_format": "latex",
480
+ "bbox": [
481
+ 215,
482
+ 478,
483
+ 779,
484
+ 517
485
+ ],
486
+ "page_idx": 3
487
+ },
488
+ {
489
+ "type": "text",
490
+ "text": "where $\\hat { \\mathbb { D } } _ { u } ^ { 2 } ( q | | \\operatorname { \\varepsilon } p )$ provides an unbiased estimator (hence called a $U$ -statistic) for $\\mathbb { D } ^ { 2 } ( q \\mid | \\ p )$ , and $\\hat { \\mathbb { D } } _ { v } ^ { 2 } ( q \\mid | \\ p )$ , called $V$ -statistic, provides a biased estimator but is guaranteed to be always nonnegative: $\\hat { \\mathbb { D } } _ { v } ^ { 2 } \\big ( \\{ z _ { i } \\} \\mid \\mid p \\big ) \\ge 0$ . ",
491
+ "bbox": [
492
+ 173,
493
+ 523,
494
+ 825,
495
+ 574
496
+ ],
497
+ "page_idx": 3
498
+ },
499
+ {
500
+ "type": "text",
501
+ "text": "Stein Variational Gradient Descent (SVGD) Stein operator and Stein discrepancy have a close connection with KL divergence, which is exploited in Liu $\\&$ Wang (2016) to provide a general purpose deterministic approximate sampling method. Assume that $\\{ z _ { i } \\} _ { i = 1 } ^ { n }$ is a sample (or a set of particles) drawn from $q$ , and we want to update $\\{ z _ { i } \\} _ { i = 1 } ^ { n }$ to make it “move closer” to the target distribution $p$ to improve the approximation quality. We consider updates of form ",
502
+ "bbox": [
503
+ 173,
504
+ 587,
505
+ 825,
506
+ 659
507
+ ],
508
+ "page_idx": 3
509
+ },
510
+ {
511
+ "type": "equation",
512
+ "img_path": "images/4abc5cdf14f24600855acad18449ee27c3009ddb71398a79da21779f156a5f9f.jpg",
513
+ "text": "$$\nz _ { i } \\gets z _ { i } + \\epsilon \\phi ^ { * } ( z _ { i } ) , \\quad \\forall i = 1 , \\dots , n ,\n$$",
514
+ "text_format": "latex",
515
+ "bbox": [
516
+ 375,
517
+ 662,
518
+ 620,
519
+ 681
520
+ ],
521
+ "page_idx": 3
522
+ },
523
+ {
524
+ "type": "text",
525
+ "text": "where $\\phi ^ { * }$ is a perturbation direction, or velocity field, chosen to maximumly decrease the KL divergence between the distribution of updated particles and the target distribution, in the sense that ",
526
+ "bbox": [
527
+ 174,
528
+ 688,
529
+ 828,
530
+ 717
531
+ ],
532
+ "page_idx": 3
533
+ },
534
+ {
535
+ "type": "equation",
536
+ "img_path": "images/c72f02705fb85bfe5f31de1d9a990c3865c6e891cb2d99cac8e432f8e53366da.jpg",
537
+ "text": "$$\n\\phi ^ { * } = \\underset { \\phi \\in \\mathcal { F } } { \\arg \\operatorname* { m a x } } \\bigg \\{ - \\frac { d } { d \\epsilon } \\mathrm { K L } ( q _ { [ \\epsilon \\phi ] } \\left| \\right| p ) \\big | _ { \\epsilon = 0 } \\bigg \\} ,\n$$",
538
+ "text_format": "latex",
539
+ "bbox": [
540
+ 354,
541
+ 722,
542
+ 642,
543
+ 757
544
+ ],
545
+ "page_idx": 3
546
+ },
547
+ {
548
+ "type": "text",
549
+ "text": "where $q _ { [ \\epsilon \\phi ] }$ denotes the density of the updated particle $z ^ { \\prime } = z + \\epsilon \\phi ( z )$ when the density of the original particle $z$ is $q$ , and $\\mathcal { F }$ is the set of perturbation directions that we optimize over. A key observation (Liu & Wang, 2016) is that the optimization in (11) is in fact equivalent to the optimization for KSD in (4); we have ",
550
+ "bbox": [
551
+ 173,
552
+ 763,
553
+ 825,
554
+ 819
555
+ ],
556
+ "page_idx": 3
557
+ },
558
+ {
559
+ "type": "equation",
560
+ "img_path": "images/91940743f46d75453800bfd73be8b1b8449acad656c02e92682473b159dde87e.jpg",
561
+ "text": "$$\n- \\frac { d } { d \\epsilon } \\mathrm { K L } ( q _ { [ \\epsilon \\phi ] } \\left| \\right| p ) \\big | _ { \\epsilon = 0 } = \\mathbb { E } _ { z \\sim q } [ \\mathcal { T } _ { p } \\phi ( z ) ] ,\n$$",
562
+ "text_format": "latex",
563
+ "bbox": [
564
+ 359,
565
+ 824,
566
+ 635,
567
+ 856
568
+ ],
569
+ "page_idx": 3
570
+ },
571
+ {
572
+ "type": "text",
573
+ "text": "that is, the Stein operator transforms the perturbation $\\phi$ on the random variable (the particles) to the change of the KL divergence. Taking $\\mathcal { F }$ to be unit ball of $\\mathcal { H } ^ { d }$ as in (5), the optimal solution $\\phi ^ { * }$ of (11) equals that of (6), which is shown to be (e.g., Liu et al., 2016) ",
574
+ "bbox": [
575
+ 173,
576
+ 859,
577
+ 825,
578
+ 902
579
+ ],
580
+ "page_idx": 3
581
+ },
582
+ {
583
+ "type": "equation",
584
+ "img_path": "images/d62fa7a894c31bffebc199b4bf3afe924c1826f8cadb8f34e223031d4da21040.jpg",
585
+ "text": "$$\n\\phi ^ { * } ( z ^ { \\prime } ) \\propto \\mathbb { E } _ { z \\sim q } [ \\mathcal { T } _ { p } ^ { z } k ( z , z ^ { \\prime } ) ] = \\mathbb { E } _ { z \\sim q } [ \\nabla _ { z } \\log p ( z ) k ( z , z ^ { \\prime } ) + \\nabla _ { z } k ( z , z ^ { \\prime } ) ] .\n$$",
586
+ "text_format": "latex",
587
+ "bbox": [
588
+ 263,
589
+ 907,
590
+ 735,
591
+ 926
592
+ ],
593
+ "page_idx": 3
594
+ },
595
+ {
596
+ "type": "text",
597
+ "text": "Algorithm 1 Amortized SVGD and KSD Minimization for Wild Variational Inference ",
598
+ "text_level": 1,
599
+ "bbox": [
600
+ 176,
601
+ 103,
602
+ 738,
603
+ 117
604
+ ],
605
+ "page_idx": 4
606
+ },
607
+ {
608
+ "type": "text",
609
+ "text": "for iteration t do ",
610
+ "bbox": [
611
+ 189,
612
+ 121,
613
+ 303,
614
+ 133
615
+ ],
616
+ "page_idx": 4
617
+ },
618
+ {
619
+ "type": "text",
620
+ "text": "1. Draw random $\\{ \\xi _ { i } \\} _ { i = 1 } ^ { n }$ , calculate $z _ { i } = f ( \\eta ; \\xi _ { i } )$ , and the Stein variational gradient $\\Delta z _ { i }$ in (13). 2. Update parameter $\\eta$ using (14) or (15) for amortized SVGD, or (17) for KSD minimization. end for ",
621
+ "bbox": [
622
+ 189,
623
+ 136,
624
+ 825,
625
+ 202
626
+ ],
627
+ "page_idx": 4
628
+ },
629
+ {
630
+ "type": "text",
631
+ "text": "By approximating the expectation under $q$ with the empirical mean of the current particles $\\{ z _ { i } \\} _ { i = 1 } ^ { n }$ , SVGD admits a simple form of update that iteratively moves the particles towards the target distribution, ",
632
+ "bbox": [
633
+ 174,
634
+ 232,
635
+ 823,
636
+ 275
637
+ ],
638
+ "page_idx": 4
639
+ },
640
+ {
641
+ "type": "equation",
642
+ "img_path": "images/bd7c0a0cacaa1805565a866c9622cf4ecb8f0dc7fc1292413d56569301211fda.jpg",
643
+ "text": "$$\n\\begin{array} { r l } & { \\qquad z _ { i } \\gets z _ { i } + \\epsilon \\Delta z _ { i } , \\quad \\forall i = 1 , \\ldots , n , } \\\\ & { \\qquad \\Delta z _ { i } = \\hat { \\mathbb { E } } _ { z \\in \\{ z _ { i } \\} _ { i = 1 } ^ { n } } [ \\nabla _ { z } \\log p ( z ) k ( z , z _ { i } ) + \\nabla _ { z } k ( z , z _ { i } ) ] , } \\end{array}\n$$",
644
+ "text_format": "latex",
645
+ "bbox": [
646
+ 323,
647
+ 281,
648
+ 678,
649
+ 324
650
+ ],
651
+ "page_idx": 4
652
+ },
653
+ {
654
+ "type": "text",
655
+ "text": "where $\\begin{array} { r } { \\hat { \\mathbb { E } } _ { z \\sim \\{ z _ { i } \\} _ { i = 1 } ^ { n } } [ f ( z ) ] = \\sum _ { i } f ( z _ { i } ) / n } \\end{array}$ . The two terms in $\\Delta z _ { i }$ play two different roles: the term with the gradient $\\nabla _ { z } \\log { p ( z ) }$ drives the particles towards the high probability regions of $p ( z )$ , while the term with $\\nabla _ { z } k ( z , z _ { i } )$ serves as a repulsive force to encourage diversity; to see this, consider a stationary kernel $k ( z , z ^ { \\prime } ) = k ( z - z ^ { \\prime } )$ , then the second term reduces to $\\hat { \\mathbb { E } } _ { z } \\nabla _ { z } k ( z , z _ { i } ) =$ $- \\hat { \\mathbb { E } } _ { z } \\nabla _ { z _ { i } } k ( z , z _ { i } )$ , which can be treated as the negative gradient for minimizing the average similarity $\\hat { \\mathbb { E } } _ { z } k ( z , z _ { i } )$ in terms of $z _ { i }$ . ",
656
+ "bbox": [
657
+ 173,
658
+ 330,
659
+ 825,
660
+ 425
661
+ ],
662
+ "page_idx": 4
663
+ },
664
+ {
665
+ "type": "text",
666
+ "text": "It is easy to see from (13) that $\\Delta z _ { i }$ reduces to the typical gradient $\\nabla _ { z } \\log { p ( z _ { i } ) }$ when there is only a single particle $( n = 1$ ) and $\\nabla _ { z } k ( z , z _ { i } )$ when $z = z _ { i }$ , in which case SVGD reduces to the standard gradient ascent for maximizing $\\log p ( z )$ (i.e., maximum a posteriori (MAP)). ",
667
+ "bbox": [
668
+ 174,
669
+ 431,
670
+ 825,
671
+ 474
672
+ ],
673
+ "page_idx": 4
674
+ },
675
+ {
676
+ "type": "text",
677
+ "text": "3 TWO METHODS FOR WILD VARIATIONAL INFERENCE ",
678
+ "text_level": 1,
679
+ "bbox": [
680
+ 176,
681
+ 494,
682
+ 651,
683
+ 511
684
+ ],
685
+ "page_idx": 4
686
+ },
687
+ {
688
+ "type": "text",
689
+ "text": "Since the direct parametric optimization of the KL divergence (1) requires calculating $q _ { \\eta } ( z )$ , there are two essential ways to avoid calculating $q _ { \\eta } ( z )$ : either using alternative (approximate) optimization approaches, or using different divergence objective functions. We discuss two possible approaches in this work: one based on “amortizing SVGD” (Wang & Liu, 2016) which trains the inference network $f ( \\eta , \\xi )$ so that its output mimic the SVGD dynamics in order to decrease the KL divergence; another based on minimizing the KSD objective (9) which does not require to evaluate $q ( z )$ thanks to its special form. ",
690
+ "bbox": [
691
+ 173,
692
+ 525,
693
+ 825,
694
+ 625
695
+ ],
696
+ "page_idx": 4
697
+ },
698
+ {
699
+ "type": "text",
700
+ "text": "3.1 AMORTIZED SVGD ",
701
+ "text_level": 1,
702
+ "bbox": [
703
+ 176,
704
+ 640,
705
+ 352,
706
+ 655
707
+ ],
708
+ "page_idx": 4
709
+ },
710
+ {
711
+ "type": "text",
712
+ "text": "SVGD provides an optimal updating direction to iteratively move a set of particles $\\left\\{ z _ { i } \\right\\}$ towards the target distribution $p ( z )$ . We can leverage it to train an inference network $f ( \\eta ; \\xi )$ by iteratively adjusting $\\eta$ so that the output of $f ( \\eta ; \\xi )$ changes along the Stein variational gradient direction in order to maximumly decrease its KL divergence with the target distribution. By doing this, we “amortize” SVGD into a neural network, which allows us to leverage the past experience to adaptively improve the computational efficiency and generalize to new tasks with similar structures. Amortized SVGD is also presented in Wang $\\&$ Liu (2016); here we present some additional discussion. ",
713
+ "bbox": [
714
+ 173,
715
+ 666,
716
+ 825,
717
+ 765
718
+ ],
719
+ "page_idx": 4
720
+ },
721
+ {
722
+ "type": "text",
723
+ "text": "To be specific, assume $\\{ \\xi _ { i } \\}$ are drawn from $q _ { 0 }$ and $z _ { i } = f ( \\eta ; \\xi _ { i } )$ the corresponding random output based on the current estimation of $\\eta$ . We want to adjust $\\eta$ so that $z _ { i }$ changes along the Stein variational gradient direction $\\Delta z _ { i }$ in (13) so as to maximumly decrease the KL divergence with target distribution. This can be done by updating $\\eta$ via ",
724
+ "bbox": [
725
+ 173,
726
+ 771,
727
+ 825,
728
+ 828
729
+ ],
730
+ "page_idx": 4
731
+ },
732
+ {
733
+ "type": "equation",
734
+ "img_path": "images/9e4095a2250329d1009ddb1acb1e1c277b237b19b3ad4cc5ce1381ad7c2c5126.jpg",
735
+ "text": "$$\n\\eta \\gets \\underset { \\eta } { \\arg \\operatorname* { m i n } } \\sum _ { i = 1 } ^ { n } | | f ( \\eta ; \\xi _ { i } ) - z _ { i } - \\epsilon \\Delta z _ { i } | | _ { 2 } ^ { 2 } .\n$$",
736
+ "text_format": "latex",
737
+ "bbox": [
738
+ 354,
739
+ 834,
740
+ 645,
741
+ 876
742
+ ],
743
+ "page_idx": 4
744
+ },
745
+ {
746
+ "type": "text",
747
+ "text": "Essentially, this projects the non-parametric perturbation direction $\\Delta z _ { i }$ to the change of the finite dimensional network parameter $\\eta$ . If we take the step size $\\epsilon$ to be small, then the updated $\\eta$ by (14) should be very close to the old value, and a single step of gradient descent of (14) can provide a ",
748
+ "bbox": [
749
+ 174,
750
+ 881,
751
+ 825,
752
+ 924
753
+ ],
754
+ "page_idx": 4
755
+ },
756
+ {
757
+ "type": "text",
758
+ "text": "good approximation for (14). This gives a simpler update rule: ",
759
+ "bbox": [
760
+ 173,
761
+ 103,
762
+ 583,
763
+ 118
764
+ ],
765
+ "page_idx": 5
766
+ },
767
+ {
768
+ "type": "equation",
769
+ "img_path": "images/400a004e19b866678ad66b3bf75f9d6c01edfc5a7cedc3bf2e8e3f7acc95ebbd.jpg",
770
+ "text": "$$\n\\eta \\eta + \\epsilon \\sum _ { i } \\partial _ { \\eta } f ( \\eta ; \\xi _ { i } ) \\Delta z _ { i } ,\n$$",
771
+ "text_format": "latex",
772
+ "bbox": [
773
+ 397,
774
+ 126,
775
+ 599,
776
+ 160
777
+ ],
778
+ "page_idx": 5
779
+ },
780
+ {
781
+ "type": "text",
782
+ "text": "which can be intuitively interpreted as a form of chain rule that back-propagates the SVGD gradient to the network parameter $\\eta$ . In fact, when we have only one particle, (15) reduces to the standard gradient ascent for $\\operatorname* { m a x } _ { \\eta } \\log p ( f ( \\eta ; ~ \\xi ) )$ , in which $f _ { \\eta }$ is trained to “learn to optimize” (e.g., Andrychowicz et al., 2016), instead of “learn to sample” $\\dot { p ( z ) }$ . Importantly, as we have more than one particles, the repulsive term $\\nabla _ { z } k ( z , z _ { i } )$ in $\\Delta z _ { i }$ becomes active, and enforces an amount of diversity on the network output that is consistent with the variation in $p ( z )$ . The full algorithm is summarized in Algorithm 1. ",
783
+ "bbox": [
784
+ 173,
785
+ 166,
786
+ 825,
787
+ 266
788
+ ],
789
+ "page_idx": 5
790
+ },
791
+ {
792
+ "type": "text",
793
+ "text": "Amortized SVGD can be treated as minimizing the KL divergence using a rather special algorithm: it leverages the non-parametric SVGD which can be treated as approximately solving the infinite dimensional optimization ${ \\mathrm { m i n } } _ { q } \\operatorname { K L } ( q | | p )$ without explicitly assuming a parametric form on $q$ , and iteratively projecting the non-parametric update back to the finite dimensional parameter space of $\\eta$ . It is an interesting direction to extend this idea to “amortize” other MC/MCMC-based inference algorithms. For example, given a MCMC with transition probability $T ( z ^ { \\prime } | z )$ whose stationary distribution is $p ( z )$ , we may adjust $\\eta$ to make the network output move towards the updated values $z ^ { \\prime }$ drawn from the transition probability $T ( z ^ { \\prime } | z )$ . The advantage of using SVGD is that it provides a deterministic gradient direction which we can back-propagate conveniently and is particle efficient in that it reduces to “learning to optimize” with a single particle. We have been using the simple $L ^ { 2 }$ loss in (14) mainly for convenience; it is possible to use other two-sample discrepancy measures such as maximum mean discrepancy. ",
794
+ "bbox": [
795
+ 173,
796
+ 271,
797
+ 825,
798
+ 439
799
+ ],
800
+ "page_idx": 5
801
+ },
802
+ {
803
+ "type": "text",
804
+ "text": "3.2 KSD VARIATIONAL INFERENCE ",
805
+ "text_level": 1,
806
+ "bbox": [
807
+ 176,
808
+ 457,
809
+ 434,
810
+ 472
811
+ ],
812
+ "page_idx": 5
813
+ },
814
+ {
815
+ "type": "text",
816
+ "text": "Amortized SVGD attends to minimize the KL divergence objective, but can not be interpreted as a typical finite dimensional optimization on parameter $\\eta$ . Here we provide an alternative method based on directly minimizing the kernelized Stein discrepancy (KSD) objective, for which, thanks to its special form, the typical gradient-based optimization can be performed without needing to estimate $q ( z )$ explicitly. ",
817
+ "bbox": [
818
+ 174,
819
+ 483,
820
+ 825,
821
+ 555
822
+ ],
823
+ "page_idx": 5
824
+ },
825
+ {
826
+ "type": "text",
827
+ "text": "To be specific, take $q _ { \\eta }$ to be the density of the random output $z = f ( \\eta ; \\xi )$ when $\\xi \\sim q _ { 0 }$ , and we want to find $\\eta$ to minimize $\\mathbb { D } ( q _ { \\eta } \\parallel p )$ . Assuming $\\{ \\xi _ { i } \\}$ is i.i.d. drawn from $q _ { 0 }$ , we can approximate $\\mathbb { D } ^ { 2 } ( q _ { \\eta } | | p )$ unbiasedly with a U-statistics: ",
828
+ "bbox": [
829
+ 174,
830
+ 560,
831
+ 825,
832
+ 606
833
+ ],
834
+ "page_idx": 5
835
+ },
836
+ {
837
+ "type": "equation",
838
+ "img_path": "images/4cfab198ac0e12bd90ad06506fe92ab82423436555ec19c2ac63a071a279d7a6.jpg",
839
+ "text": "$$\n\\mathbb { D } ^ { 2 } ( q _ { \\eta } | | p ) \\approx \\frac { 1 } { n ( n - 1 ) } \\sum _ { i \\neq j } \\kappa _ { p } ( f ( \\eta ; \\xi _ { i } ) , f ( \\eta ; \\xi _ { j } ) ) ,\n$$",
840
+ "text_format": "latex",
841
+ "bbox": [
842
+ 323,
843
+ 613,
844
+ 673,
845
+ 654
846
+ ],
847
+ "page_idx": 5
848
+ },
849
+ {
850
+ "type": "text",
851
+ "text": "for which a standard gradient descent can be derived for optimizing $\\eta$ : ",
852
+ "bbox": [
853
+ 173,
854
+ 660,
855
+ 633,
856
+ 676
857
+ ],
858
+ "page_idx": 5
859
+ },
860
+ {
861
+ "type": "equation",
862
+ "img_path": "images/a614daf519267837fc074b409839106d9a28865e7214b739704500dcd7881c14.jpg",
863
+ "text": "$$\n\\eta \\eta - \\epsilon \\frac { 2 } { n ( n - 1 ) } \\sum _ { i \\neq j } \\partial _ { \\eta } f ( \\eta ; \\xi _ { i } ) \\nabla _ { z _ { i } } \\kappa _ { p } ( z _ { i } , z _ { j } ) , \\quad \\mathrm { ~ w h e r e ~ } \\quad z _ { i } = f ( \\eta ; \\xi _ { i } ) .\n$$",
864
+ "text_format": "latex",
865
+ "bbox": [
866
+ 243,
867
+ 683,
868
+ 754,
869
+ 723
870
+ ],
871
+ "page_idx": 5
872
+ },
873
+ {
874
+ "type": "text",
875
+ "text": "This enables a wild variational inference method based on directly minimizing $\\eta$ with standard (stochastic) gradient descent. See Algorithm 1. Note that (17) is similar to (15) in form, but replaces ∆zi with a ∆˜ zi ∝ − Pj : i6=j $\\begin{array} { r } { \\tilde { \\Delta } z _ { i } \\propto - \\sum _ { j : i \\neq j } \\nabla _ { z _ { i } } \\bar { \\kappa } _ { p } ( z _ { i } , z _ { j } ) } \\end{array}$ . It is also possible to use the $V$ -statistic in (9), but we find that the $U$ -statistic performs much better in practice, possibly because of its unbiasedness property. ",
876
+ "bbox": [
877
+ 173,
878
+ 729,
879
+ 825,
880
+ 804
881
+ ],
882
+ "page_idx": 5
883
+ },
884
+ {
885
+ "type": "text",
886
+ "text": "Minimizing KSD can be viewed as minimizing a constrastive divergence objective function. To see this, recall that $q _ { [ \\epsilon \\phi ] }$ denotes the density of $z ^ { \\prime } = z + \\epsilon \\phi ( z )$ when $z \\sim q$ . Combining (11) and (6), we can show that ",
887
+ "bbox": [
888
+ 174,
889
+ 809,
890
+ 825,
891
+ 852
892
+ ],
893
+ "page_idx": 5
894
+ },
895
+ {
896
+ "type": "equation",
897
+ "img_path": "images/e696a5ec03701a7f33bc84e25685c9d249fd78b208eb7f895ca7950fea927802.jpg",
898
+ "text": "$$\n\\mathbb { D } ^ { 2 } ( q | | p ) \\approx \\frac { 1 } { \\epsilon } ( \\mathrm { K L } ( q | | p ) - \\mathrm { K L } ( q _ { [ \\epsilon \\phi ] } | | p ) ) .\n$$",
899
+ "text_format": "latex",
900
+ "bbox": [
901
+ 348,
902
+ 858,
903
+ 648,
904
+ 887
905
+ ],
906
+ "page_idx": 5
907
+ },
908
+ {
909
+ "type": "text",
910
+ "text": "That is, KSD measures the amount of decrease of $\\mathrm { K L }$ divergence when we update the particles along the optimal SVGD perturbation direction $\\phi$ given by (11). If $q = p$ , then the decrease of KL ",
911
+ "bbox": [
912
+ 173,
913
+ 895,
914
+ 823,
915
+ 924
916
+ ],
917
+ "page_idx": 5
918
+ },
919
+ {
920
+ "type": "text",
921
+ "text": "divergence equals zero and $\\mathbb { D } ^ { 2 } ( q | | p )$ equals zero. In fact, as shown in Liu & Wang (2016) KSD can be explicitly represented as the magnitude of a functional gradient of KL divergence: ",
922
+ "bbox": [
923
+ 171,
924
+ 102,
925
+ 823,
926
+ 132
927
+ ],
928
+ "page_idx": 6
929
+ },
930
+ {
931
+ "type": "equation",
932
+ "img_path": "images/4dfcaed5ab64a2f2ffe64807019a6c5c94c588b14f6c1898ad043c36f7b7566a.jpg",
933
+ "text": "$$\n\\mathbb { D } ( q \\parallel p ) = \\biggl \\| \\frac { d } { d \\phi } \\mathrm { K L } ( q _ { [ \\phi ] } \\parallel p ) \\bigr | _ { \\phi = 0 } \\biggl | \\biggl | _ { \\mathcal { H } ^ { d } } ,\n$$",
934
+ "text_format": "latex",
935
+ "bbox": [
936
+ 362,
937
+ 138,
938
+ 632,
939
+ 171
940
+ ],
941
+ "page_idx": 6
942
+ },
943
+ {
944
+ "type": "text",
945
+ "text": "where $q _ { [ \\phi ] }$ is the density of $z = z + \\phi ( z )$ when $z \\sim q$ , and $\\textstyle { \\frac { d } { d \\phi } } F ( \\phi )$ denotes the functional gradient of functional $F ( \\phi )$ w.r.t. $\\phi$ defined in RKHS $\\mathcal { H } ^ { d }$ , and $\\begin{array} { r } { \\frac { d } { d \\phi } F ( { \\dot { \\phi } } ) } \\end{array}$ is also an element in $\\mathcal { H } ^ { d }$ . Therefore, KSD variational inference can be treated as explicitly minimizing the magnitude of the gradient of KL divergence, in contract with amortized SVGD which attends to minimize the KL divergence objective itself. ",
946
+ "bbox": [
947
+ 173,
948
+ 179,
949
+ 825,
950
+ 257
951
+ ],
952
+ "page_idx": 6
953
+ },
954
+ {
955
+ "type": "text",
956
+ "text": "This idea is also similar to the contrastive divergence used for learning restricted Boltzmann machine (RBM) (Hinton, 2002) (which, however, optimizes $p$ with fixed $q$ ). It is possible to extend this approach by replacing $z ^ { \\prime } = z + \\epsilon \\phi ( z )$ with other transforms, such as these given by a transition probability of a Markov chain whose stationary distribution is $p$ . In fact, according the so called generator method for constructing Stein operator (Barbour, 1988), any generator of a Markov process defines a Stein operator that can be used to define a corresponding Stein discrepancy. ",
957
+ "bbox": [
958
+ 173,
959
+ 263,
960
+ 825,
961
+ 348
962
+ ],
963
+ "page_idx": 6
964
+ },
965
+ {
966
+ "type": "text",
967
+ "text": "This idea is related to a very recent work by Ranganath et al. (2016), which is based on directly minimizing the variational form of Stein discrepancy in (4); Ranganath et al. (2016) assumes $\\mathcal { F }$ consists of a neural network $\\phi _ { \\tau } ( z )$ parametrized by $\\tau$ , and find $\\eta$ by solving the following min-max problem: ",
968
+ "bbox": [
969
+ 174,
970
+ 353,
971
+ 825,
972
+ 410
973
+ ],
974
+ "page_idx": 6
975
+ },
976
+ {
977
+ "type": "equation",
978
+ "img_path": "images/3ee506e1a179eba9bde4397b20dd1e575ec0d1faa7fbe9921400e24933f80eeb.jpg",
979
+ "text": "$$\n\\operatorname* { m i n } _ { \\eta } \\operatorname* { m a x } _ { \\tau } \\mathbb { E } _ { z \\sim q } [ \\mathcal { T } _ { p } \\phi _ { \\tau } ( z ) ] .\n$$",
980
+ "text_format": "latex",
981
+ "bbox": [
982
+ 411,
983
+ 409,
984
+ 584,
985
+ 433
986
+ ],
987
+ "page_idx": 6
988
+ },
989
+ {
990
+ "type": "text",
991
+ "text": "In contrast, our method leverages the closed form solution by taking $\\mathcal { F }$ to be an RKHS and hence obtains an explicit optimization problem, instead of a min-max problem that can be computationally more expensive, or have difficulty in achieving convergence. ",
992
+ "bbox": [
993
+ 174,
994
+ 435,
995
+ 825,
996
+ 478
997
+ ],
998
+ "page_idx": 6
999
+ },
1000
+ {
1001
+ "type": "text",
1002
+ "text": "Because $\\kappa _ { p } ( \\boldsymbol { x } , \\boldsymbol { x } ^ { \\prime } )$ (defined in (8)) depends on the derivative $\\nabla _ { x } \\log p ( x )$ of the target distribution, the gradient in (17) depends on the Hessian matrix $\\nabla _ { x } ^ { 2 } \\log p ( x )$ and is hence less convenient to implement compared with amortized SVGD (the method by Ranganath et al. (2016) also has the same problem). However, this problem can be alleviated using automatic differentiation tools, which be used to directly take the derivative of the objective in (16) without manually deriving its derivatives. ",
1003
+ "bbox": [
1004
+ 174,
1005
+ 484,
1006
+ 825,
1007
+ 556
1008
+ ],
1009
+ "page_idx": 6
1010
+ },
1011
+ {
1012
+ "type": "text",
1013
+ "text": "4 LANGEVIN INFERENCE NETWORK ",
1014
+ "text_level": 1,
1015
+ "bbox": [
1016
+ 174,
1017
+ 575,
1018
+ 490,
1019
+ 592
1020
+ ],
1021
+ "page_idx": 6
1022
+ },
1023
+ {
1024
+ "type": "text",
1025
+ "text": "With wild variational inference, we can choose more complex inference network structures to obtain better approximation accuracy. Ideally, the best network structure should leverage the special properties of the target distribution $p ( z )$ in a convenient way. One way to achieve this by viewing existing MC/MCMC methods as inference networks with hand-designed (and hence potentially suboptimal) parameters, but good architectures that take the information of the target distribution $p ( z )$ into account. By applying wild variational inference on networks constructed based on existing MCMC methods, we effectively provide an hyper-parameter optimization for these existing methods. This allows us to fully optimize the potential of existing Bayesian inference methods, significantly improving the result with less computation cost, and decreasing the need for hyper-parameter tuning by human experts. This is particularly useful when we need to solve a large number of similar tasks, where the computation cost spent on optimizing the hyper-parameters can significantly improve the performance on the future tasks. ",
1026
+ "bbox": [
1027
+ 173,
1028
+ 607,
1029
+ 825,
1030
+ 775
1031
+ ],
1032
+ "page_idx": 6
1033
+ },
1034
+ {
1035
+ "type": "text",
1036
+ "text": "Stochastic Gradient Langevin Dynamics We first take the original stochastic gradient Langevin dynamics (SGLD) algorithm (Welling & Teh, 2011) as an example. SGLD starts with a random initialization $z _ { \\mathrm { 0 } }$ , and perform iterative update of form ",
1037
+ "bbox": [
1038
+ 174,
1039
+ 790,
1040
+ 823,
1041
+ 833
1042
+ ],
1043
+ "page_idx": 6
1044
+ },
1045
+ {
1046
+ "type": "equation",
1047
+ "img_path": "images/4019152a5363819c6e7ede3ee2b8ecafdf5ccebabf94e085f51b421c7395dc2f.jpg",
1048
+ "text": "$$\nz ^ { t + 1 } \\gets z ^ { t } + \\eta ^ { t } \\odot \\nabla _ { z } \\log \\hat { p } ( z ^ { t } ; \\mathbb { M } ^ { t } ) + \\sqrt { 2 \\eta ^ { t } } \\odot \\xi ^ { t } , \\quad \\forall t = 1 , \\cdot \\cdot \\cdot T ,\n$$",
1049
+ "text_format": "latex",
1050
+ "bbox": [
1051
+ 272,
1052
+ 839,
1053
+ 723,
1054
+ 859
1055
+ ],
1056
+ "page_idx": 6
1057
+ },
1058
+ {
1059
+ "type": "text",
1060
+ "text": "where $\\log \\hat { p } ( z ^ { t } ; \\ \\mathbb { M } ^ { t } )$ denotes an approximation of $\\log p ( z ^ { t } )$ based on, e.g., a random mini-batch $\\mathbb { M } ^ { t }$ of observed data at $t$ -th iteration, and $\\xi ^ { t }$ is a standard Gaussian random vector of the same size as $z$ , and $\\eta ^ { t }$ denotes a (vector) step-size at $t$ -th iteration; here “ $\\odot$ ” denotes element-wise product. When running SGLD for $T$ iterations, we can treat $z ^ { T }$ as the output of a $T$ -layer neural network parametrized by the collection of step sizes $\\eta = \\{ \\eta ^ { t } \\} _ { t = 1 } ^ { T }$ , whose random inputs include the random initialization $z _ { \\mathrm { 0 } }$ , the mini-batch $\\mathbb { M } ^ { t }$ and Gaussian noise $\\xi ^ { t }$ at each iteration $t$ . We can see that this defines a rather complex network structure with several different types of random inputs $( z ^ { 0 } , \\mathbb { M } ^ { t }$ and $\\boldsymbol { \\xi } ^ { t }$ ). This makes it intractable to explicitly calculate the density of $z ^ { T }$ and traditional variational inference methods can not be applied directly. But wild variational inference can still allow us to adaptively improve the optimal step-size $\\eta$ in this case. ",
1061
+ "bbox": [
1062
+ 174,
1063
+ 867,
1064
+ 825,
1065
+ 924
1066
+ ],
1067
+ "page_idx": 6
1068
+ },
1069
+ {
1070
+ "type": "image",
1071
+ "img_path": "images/d01a7e1c35323e43b5217ad65d7e281f4bd1b1cefac515f6b3a5b589310d9d9a.jpg",
1072
+ "image_caption": [
1073
+ "Figure 2: Results on a 1D Gaussian mixture when training the step sizes of SGLD with $T = 2 0$ iterations. The target distribution $p ( x )$ is shown by the red dashed line. (a) The distribution of the initialization $z _ { 0 }$ of SGLD (the green line), visualized by kernel density estimator. (b)-(d) The distribution of the final output $z ^ { T }$ (green line) given by different types of step sizes, visualized by kernel density estimator. "
1074
+ ],
1075
+ "image_footnote": [],
1076
+ "bbox": [
1077
+ 189,
1078
+ 101,
1079
+ 818,
1080
+ 205
1081
+ ],
1082
+ "page_idx": 7
1083
+ },
1084
+ {
1085
+ "type": "text",
1086
+ "text": "",
1087
+ "bbox": [
1088
+ 173,
1089
+ 318,
1090
+ 825,
1091
+ 402
1092
+ ],
1093
+ "page_idx": 7
1094
+ },
1095
+ {
1096
+ "type": "text",
1097
+ "text": "General Langevin Networks Based on the original formula of SGLD, we proposed a more general langevin network structure, and each layer of the network has a form ",
1098
+ "bbox": [
1099
+ 169,
1100
+ 417,
1101
+ 823,
1102
+ 446
1103
+ ],
1104
+ "page_idx": 7
1105
+ },
1106
+ {
1107
+ "type": "equation",
1108
+ "img_path": "images/caa89fa497f6509bef2922859a9004c659f38e17c7cf78b36dcfc485c018dc41.jpg",
1109
+ "text": "$$\n\\begin{array} { r l r } & { z ^ { t + 1 } \\gets A ^ { t } z ^ { t } + h ( B ^ { t } B ^ { t } ^ { \\top } \\nabla _ { z } \\log \\hat { p } ( z ^ { t } ; \\mathbb { M } ^ { t } ) + B ^ { t } \\xi ^ { t } + D ^ { t } ) , \\quad } & { \\forall t = 1 , \\cdots T , } \\end{array}\n$$",
1110
+ "text_format": "latex",
1111
+ "bbox": [
1112
+ 236,
1113
+ 454,
1114
+ 759,
1115
+ 476
1116
+ ],
1117
+ "page_idx": 7
1118
+ },
1119
+ {
1120
+ "type": "text",
1121
+ "text": "where $A ^ { t } , B ^ { t }$ and $D ^ { t }$ are network parameters at $t$ -th iteration(whose size is $d \\times d$ , and $d$ is the size of $z ^ { t }$ ), and $h ( \\cdot )$ denotes a smooth element-wise non-linearity function; here $\\xi ^ { t }$ is still a standard gaussian random vector with the same size as $z$ . With this more complex network, we can use fewer layers to construct more powerful back-box samplers. ",
1122
+ "bbox": [
1123
+ 173,
1124
+ 484,
1125
+ 825,
1126
+ 541
1127
+ ],
1128
+ "page_idx": 7
1129
+ },
1130
+ {
1131
+ "type": "text",
1132
+ "text": "5 EMPIRICAL RESULTS ",
1133
+ "text_level": 1,
1134
+ "bbox": [
1135
+ 176,
1136
+ 561,
1137
+ 382,
1138
+ 578
1139
+ ],
1140
+ "page_idx": 7
1141
+ },
1142
+ {
1143
+ "type": "text",
1144
+ "text": "5.1 SGLD INFERENCE NETWORK ",
1145
+ "text_level": 1,
1146
+ "bbox": [
1147
+ 176,
1148
+ 593,
1149
+ 421,
1150
+ 608
1151
+ ],
1152
+ "page_idx": 7
1153
+ },
1154
+ {
1155
+ "type": "text",
1156
+ "text": "We first test our algorithm with SGLD inference network with (18) formula on both a toy Gaussian mixture model and a Bayesian logistic regression example. We find that we can adaptively learn step sizes that significantly outperform the existing hand-designed step size schemes, and hence save computational cost in the testing phase. In particular, we compare with the following step size schemes, for all of which we report the best results (testing accuracy in Figure 3(a); testing likelihood in Figure 3(b)) among a range of hyper-parameters: ",
1157
+ "bbox": [
1158
+ 173,
1159
+ 619,
1160
+ 825,
1161
+ 704
1162
+ ],
1163
+ "page_idx": 7
1164
+ },
1165
+ {
1166
+ "type": "text",
1167
+ "text": "1. Constant Step Size. We select a best constant step size in $\\{ 1 , 2 , 2 ^ { 3 } , \\dots , 2 ^ { 2 9 } \\} \\times 1 0 ^ { - 6 }$ . ",
1168
+ "bbox": [
1169
+ 173,
1170
+ 709,
1171
+ 746,
1172
+ 727
1173
+ ],
1174
+ "page_idx": 7
1175
+ },
1176
+ {
1177
+ "type": "text",
1178
+ "text": "2. Power Decay Step Size. We consider $\\epsilon ^ { t } ~ = ~ 1 0 ^ { a } ~ \\times ~ ( b + t ) ^ { - \\gamma }$ where $\\gamma \\ = \\ 0 . 5 5$ , $a \\in$ $\\{ - 6 , - 5 , \\ldots , 1 , 2 \\}$ , $b \\in \\{ 0 , 1 , \\ldots , 9 \\}$ . ",
1179
+ "bbox": [
1180
+ 173,
1181
+ 731,
1182
+ 820,
1183
+ 762
1184
+ ],
1185
+ "page_idx": 7
1186
+ },
1187
+ {
1188
+ "type": "text",
1189
+ "text": "3. Adagrad, Rmsprop, Adadelta, all with the master step size selected in $\\{ 1 , 2 , 2 ^ { 3 } , \\dots , 2 ^ { 2 9 } \\} \\times 1 0 ^ { - 6 }$ , with the other parameters chosen by default values. ",
1190
+ "bbox": [
1191
+ 173,
1192
+ 767,
1193
+ 823,
1194
+ 796
1195
+ ],
1196
+ "page_idx": 7
1197
+ },
1198
+ {
1199
+ "type": "text",
1200
+ "text": "Gaussian Mixture We start with a simple 1D Gaussian mixture example shown in Figure 2 where the target distribution $p ( z )$ is shown by the red dashed curve. We use amortized SVGD and KSD to optimize the step size parameter of the Langevin inference network in (18) with $T = 2 0$ layers (i.e., SGLD with $T = 2 0$ iterations), with an initial $z _ { \\mathrm { 0 } }$ drawn from a $q _ { 0 }$ far away from the target distribution (see the green curve in Figure 2(a)); this makes it critical to choose a proper step size to achieve close approximation within $T = 2 0$ iterations. We find that amortized SVGD and KSD allow us to achieve good performance with 20 steps of SGLD updates (Figure 2(b)-(c)), while the result of the best constant step size and power decay step-size are much worse (Figure 2(d)-(e)). ",
1201
+ "bbox": [
1202
+ 173,
1203
+ 811,
1204
+ 825,
1205
+ 924
1206
+ ],
1207
+ "page_idx": 7
1208
+ },
1209
+ {
1210
+ "type": "image",
1211
+ "img_path": "images/858102adb7f3c954e9a9dd7b03a65ea02c4fcccf9767ec7a02edd22091c97062.jpg",
1212
+ "image_caption": [
1213
+ "Figure 3: The testing accuracy (a) and testing likelihood (b) when training Langevin inference network with $T \\in \\{ 1 0 , \\bar { 5 } 0 , 1 0 0 \\}$ layers, respectively. The results reported here are the performance of the final result $z ^ { T }$ outputted by the last layer of the network. We find that both amortized SVGD and KSD minimization (with $\\mathrm { U }$ -statistics) outperform all the hand-designed learning rates. Results averaged on 100 random trails. "
1214
+ ],
1215
+ "image_footnote": [],
1216
+ "bbox": [
1217
+ 210,
1218
+ 99,
1219
+ 779,
1220
+ 250
1221
+ ],
1222
+ "page_idx": 8
1223
+ },
1224
+ {
1225
+ "type": "text",
1226
+ "text": "Bayesian Logistic Regression We consider Bayesian logistic regression for binary classification using the same setting as Gershman et al. (2012), which assigns the regression weights $w$ with a Gaussian prior $p _ { 0 } ( w | \\bar { \\alpha } ) = \\mathcal { N } ( w , \\alpha ^ { - 1 } )$ and $p _ { 0 } ( \\alpha ) = G a m m a ( \\alpha , 1 , 0 . 0 1 )$ . The inference is applied on the posterior of $z = [ w , \\log \\alpha ]$ . We test this model on the binary Covertype dataset1 with 581,012 data points and 54 features. ",
1227
+ "bbox": [
1228
+ 174,
1229
+ 358,
1230
+ 823,
1231
+ 428
1232
+ ],
1233
+ "page_idx": 8
1234
+ },
1235
+ {
1236
+ "type": "text",
1237
+ "text": "To demonstrate that our estimated learning rate can work well on new datasets never seen by the algorithm. We partition the dataset into mini-datasets of size 50, 000, and use $8 0 \\%$ of them for training and $2 0 \\%$ for testing. We adapt our amortized SVGD/KSD to train on the whole population of the training mini-datasets by randomly selecting a mini-dataset at each iteration of Algorithm 1, and evaluate the performance of the estimated step sizes on the remaining $2 0 \\%$ testing mini-datasets. ",
1238
+ "bbox": [
1239
+ 174,
1240
+ 435,
1241
+ 825,
1242
+ 505
1243
+ ],
1244
+ "page_idx": 8
1245
+ },
1246
+ {
1247
+ "type": "text",
1248
+ "text": "Figure 3 reports the testing accuracy and likelihood on the $2 0 \\%$ testing mini-datasets when we train the Langevin network with $T = 1 0 , 5 0 , 1 0 0$ layers, respectively. We find that our methods outperform all the hand-designed learning rates, and allow us to get performance closer to the fully converged SGLD and SVGD with a small number $T$ of iterations. ",
1249
+ "bbox": [
1250
+ 174,
1251
+ 512,
1252
+ 825,
1253
+ 568
1254
+ ],
1255
+ "page_idx": 8
1256
+ },
1257
+ {
1258
+ "type": "text",
1259
+ "text": "Figure 4 shows the testing accuracy and testing likelihood of all the intermediate results when training Langevin network with $T = 1 0 0$ layers. It is interesting to observe that amortized SVGD and KSD learn rather different behavior: KSD tends to increase the performance quickly at the first few iterations but saturate quickly, while amortized SVGD tends to increase slowly in the beginning and boost the performance quickly in the last few iterations. Note that both algorithms are set up to optimize the performance of the last layers, while need to decide how to make progress on the intermediate layers to achieve the best final performance. ",
1260
+ "bbox": [
1261
+ 173,
1262
+ 574,
1263
+ 825,
1264
+ 672
1265
+ ],
1266
+ "page_idx": 8
1267
+ },
1268
+ {
1269
+ "type": "text",
1270
+ "text": "5.2 GENERAL LANGEVIN INFERENCE NETWORK ",
1271
+ "text_level": 1,
1272
+ "bbox": [
1273
+ 178,
1274
+ 690,
1275
+ 524,
1276
+ 705
1277
+ ],
1278
+ "page_idx": 8
1279
+ },
1280
+ {
1281
+ "type": "text",
1282
+ "text": "We further test our algorithm with general Langevin inference network. We firstly construct one single layer general Langevin network to approach the posterior of Bayesian logistic regression parameters and we can achieve $7 4 . 5 8 \\%$ average accuracy and $- 0 . 5 2 1 6$ average testing log-likelihood in 100 repeat experiments. This result proves the proposed general Langevin Inference Network is quite competitive and worth to explore. Moreover, we use it as a black-box sampler to approach more complicate Gaussian Mixture distributions. ",
1283
+ "bbox": [
1284
+ 174,
1285
+ 717,
1286
+ 825,
1287
+ 801
1288
+ ],
1289
+ "page_idx": 8
1290
+ },
1291
+ {
1292
+ "type": "text",
1293
+ "text": "Gaussian Mixture We consider 10 components Gaussian Mixture Models with mean and covariance matrix of each component randomly drawed from a uniform distribution, and we test our methods on different dimensions models. ",
1294
+ "bbox": [
1295
+ 174,
1296
+ 819,
1297
+ 825,
1298
+ 861
1299
+ ],
1300
+ "page_idx": 8
1301
+ },
1302
+ {
1303
+ "type": "text",
1304
+ "text": "We construct 6 layers of general Langevin networks as a black-box sampler, and our proposed two methods to train the black-box sampler to approximate the target distribution. Figure 5 shows our results on 50 dimension Gaussian Mixture case and figure 6 shows results of different dimensions of Gaussian Mixture. From the figures we can know that our proposed sampling structure is quite competive comparing with NUT sampler(Hoffman & Gelman, 2014), and these two variational inference methods can both train a good black-box sampler. ",
1305
+ "bbox": [
1306
+ 176,
1307
+ 868,
1308
+ 823,
1309
+ 897
1310
+ ],
1311
+ "page_idx": 8
1312
+ },
1313
+ {
1314
+ "type": "image",
1315
+ "img_path": "images/b51f406093bed295d5f6b9f4bff9d74ab2e413a98fae5aae64a7c4df31ea9c26.jpg",
1316
+ "image_caption": [
1317
+ "Figure 4: The testing accuracy (a) and testing likelihood (b) of the outputs of the intermediate layers when training the Langevin network with $\\bar { T } = 1 0 0$ layers. Note that both amortized SVGD and KSD minimization target to optimize the performance of the last layer, but need to optimize the progress of the intermediate steps in order to achieve the best final results. "
1318
+ ],
1319
+ "image_footnote": [],
1320
+ "bbox": [
1321
+ 196,
1322
+ 98,
1323
+ 794,
1324
+ 256
1325
+ ],
1326
+ "page_idx": 9
1327
+ },
1328
+ {
1329
+ "type": "text",
1330
+ "text": "",
1331
+ "bbox": [
1332
+ 174,
1333
+ 358,
1334
+ 825,
1335
+ 415
1336
+ ],
1337
+ "page_idx": 9
1338
+ },
1339
+ {
1340
+ "type": "image",
1341
+ "img_path": "images/11ffb85315b5278fdeac6e9921e4cc43945ee3da66dcc44852474a305675e7ab.jpg",
1342
+ "image_caption": [
1343
+ "Figure 5: Comparation between our methods and NUTS on 50 dimension Gaussian Mixture. (a)-(c) show the mean square errors when using different number particles to estimate expectation $\\mathbb { E } ( h ( x ) )$ for $h ( x ) = x$ , $\\bar { x ^ { 2 } }$ , and $c o s ( x + b )$ ; for $\\cos ( \\omega x + b )$ , we random draw $\\omega \\sim \\mathcal { N } ( 0 , 1 )$ and $b \\sim$ Uniform $( [ 0 , 2 \\pi ] )$ and report the average MSE over 10 random draws of and b. "
1344
+ ],
1345
+ "image_footnote": [],
1346
+ "bbox": [
1347
+ 181,
1348
+ 436,
1349
+ 828,
1350
+ 585
1351
+ ],
1352
+ "page_idx": 9
1353
+ },
1354
+ {
1355
+ "type": "image",
1356
+ "img_path": "images/08bb781eebe5730a7ad456b1b4ed41bb9785a9a7f86452204c07c4983560432e.jpg",
1357
+ "image_caption": [
1358
+ "Figure 6: Comparation between our methods and NUTS For different dimension Gaussian Mixture. (a)-(c) show the mean square errors when using different number particles to estimate expectation $\\mathbb { E } ( h ( x ) )$ for $h ( x ) = x ,$ , $\\overline { { x ^ { 2 } } }$ , and $c o s ( x + b )$ ; for $c o s ( \\omega x + b )$ , we random draw $\\omega \\sim \\mathcal { N } ( 0 , 1 )$ and $\\boldsymbol { b } \\sim \\operatorname { U n i f o r m } ( [ 0 , 2 \\pi ] )$ and report the average MSE over 10 random draws of and b. "
1359
+ ],
1360
+ "image_footnote": [],
1361
+ "bbox": [
1362
+ 179,
1363
+ 691,
1364
+ 828,
1365
+ 833
1366
+ ],
1367
+ "page_idx": 9
1368
+ },
1369
+ {
1370
+ "type": "text",
1371
+ "text": "6 CONCLUSION ",
1372
+ "text_level": 1,
1373
+ "bbox": [
1374
+ 174,
1375
+ 102,
1376
+ 318,
1377
+ 118
1378
+ ],
1379
+ "page_idx": 10
1380
+ },
1381
+ {
1382
+ "type": "text",
1383
+ "text": "We consider two methods for wild variational inference that allows us to train general inference networks with intractable density functions, and apply it to adaptively estimate step sizes of stochastic gradient Langevin dynamics. More studies are needed to develop better methods, more applications and theoretical understandings for wild variational inference, and we hope that the two methods we discussed in the paper can motivate more ideas and studies in the field. ",
1384
+ "bbox": [
1385
+ 174,
1386
+ 133,
1387
+ 825,
1388
+ 204
1389
+ ],
1390
+ "page_idx": 10
1391
+ },
1392
+ {
1393
+ "type": "text",
1394
+ "text": "REFERENCES ",
1395
+ "text_level": 1,
1396
+ "bbox": [
1397
+ 174,
1398
+ 223,
1399
+ 285,
1400
+ 238
1401
+ ],
1402
+ "page_idx": 10
1403
+ },
1404
+ {
1405
+ "type": "text",
1406
+ "text": "Agakov, Felix V and Barber, David. An auxiliary variational method. In International Conference on Neural Information Processing, pp. 561–566. Springer, 2004. \nAndrieu, Christophe and Thoms, Johannes. A tutorial on adaptive mcmc. Statistics and Computing, 18(4): 343–373, 2008. \nAndrychowicz, Marcin, Denil, Misha, Gomez, Sergio, Hoffman, Matthew W, Pfau, David, Schaul, Tom, and de Freitas, Nando. Learning to learn by gradient descent by gradient descent. arXiv preprint arXiv:1606.04474, 2016. \nBarbour, Andrew D. Stein’s method and poisson process convergence. Journal of Applied Probability, pp. 175–184, 1988. \nChwialkowski, Kacper, Strathmann, Heiko, and Gretton, Arthur. A kernel test of goodness of fit. In Proceedings of the International Conference on Machine Learning (ICML), 2016. \nGershman, Samuel, Hoffman, Matt, and Blei, David. Nonparametric variational inference. In Proceedings of the International Conference on Machine Learning (ICML), 2012. \nGershman, Samuel J and Goodman, Noah D. Amortized inference in probabilistic reasoning. In Proceedings of the 36th Annual Conference of the Cognitive Science Society, 2014. \nGorham, Jack and Mackey, Lester. Measuring sample quality with Stein’s method. In Advances in Neural Information Processing Systems (NIPS), pp. 226–234, 2015. \nHe, Kaiming, Zhang, Xiangyu, Ren, Shaoqing, and Sun, Jian. Deep residual learning for image recognition. In CVPR, 2016. \nHinton, Geoffrey E. Training products of experts by minimizing contrastive divergence. Neural computation, 14(8):1771–1800, 2002. \nHoffman, Matthew D and Gelman, Andrew. The no-u-turn sampler: adaptively setting path lengths in hamiltonian monte carlo. Journal of Machine Learning Research, 15(1):1593–1623, 2014. \nHoffman, Matthew D, Blei, David M, Wang, Chong, and Paisley, John. Stochastic variational inference. JMLR, 2013. \nKingma, Diederik P and Welling, Max. Auto-encoding variational Bayes. In Proceedings of the International Conference on Learning Representations (ICLR), 2013. \nLiu, Qiang and Wang, Dilin. Stein variational gradient descent: A general purpose bayesian inference algorithm. arXiv preprint arXiv:1608.04471, 2016. \nLiu, Qiang, Lee, Jason D, and Jordan, Michael I. A kernelized Stein discrepancy for goodness-of-fit tests. In Proceedings of the International Conference on Machine Learning (ICML), 2016. \nMaclaurin, Dougal, Duvenaud, David, and Adams, Ryan P. Early stopping is nonparametric variational inference. arXiv preprint arXiv:1504.01344, 2015. \nMandt, Stephan, Hoffman, Matthew D, and Blei, David M. A variational analysis of stochastic gradient algorithms. arXiv preprint arXiv:1602.02666, 2016. \nOates, Chris J, Girolami, Mark, and Chopin, Nicolas. Control functionals for Monte Carlo integration. Journal of the Royal Statistical Society, Series B, 2017. \nPaige, Brooks and Wood, Frank. Inference networks for sequential monte carlo in graphical models. arXiv preprint arXiv:1602.06701, 2016. \nRanganath, R., Altosaar, J., Tran, D., and Blei, D.M. Operator variational inference. 2016. \nRanganath, Rajesh, Gerrish, Sean, and Blei, David M. Black box variational inference. In Proceedings of the International Conference on Artificial Intelligence and Statistics (AISTATS), 2014. \nRanganath, Rajesh, Tran, Dustin, and Blei, David M. Hierarchical variational models. arXiv preprint arXiv:1511.02386, 2015. \nRezende, Danilo Jimenez and Mohamed, Shakir. Variational inference with normalizing flows. In Proceedings of the International Conference on Machine Learning (ICML), 2015a. \nRezende, Danilo Jimenez and Mohamed, Shakir. Variational inference with normalizing flows. arXiv preprint arXiv:1505.05770, 2015b. \nRoberts, Gareth O and Rosenthal, Jeffrey S. Examples of adaptive mcmc. Journal of Computational and Graphical Statistics, 18(2):349–367, 2009. \nSalimans, Tim et al. Markov chain monte carlo and variational inference: Bridging the gap. In International Conference on Machine Learning, 2015. \nTran, Dustin, Ranganath, Rajesh, and Blei, David M. Variational gaussian process. arXiv preprint arXiv:1511.06499, 2015. \nWang, Dilin and Liu, Qiang. Learning to draw samples: With application to amortized mle for generative adversarial learning. Submitted to ICLR 2017, 2016. \nWelling, Max and Teh, Yee W. Bayesian learning via stochastic gradient Langevin dynamics. In Proceedings of the International Conference on Machine Learning (ICML), 2011. ",
1407
+ "bbox": [
1408
+ 171,
1409
+ 242,
1410
+ 828,
1411
+ 922
1412
+ ],
1413
+ "page_idx": 10
1414
+ },
1415
+ {
1416
+ "type": "text",
1417
+ "text": "",
1418
+ "bbox": [
1419
+ 171,
1420
+ 101,
1421
+ 828,
1422
+ 438
1423
+ ],
1424
+ "page_idx": 11
1425
+ }
1426
+ ]
parse/train/Sy4tzwqxe/Sy4tzwqxe_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Sy4tzwqxe/Sy4tzwqxe_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ryG6xZ-RZ/ryG6xZ-RZ.md ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DLVM: A MODERN COMPILER INFRASTRUCTURE FOR DEEP LEARNING SYSTEMS
2
+
3
+ Richard Wei
4
+ Departments of Computer Science & Linguistics
5
+ University of Illinois at Urbana-Champaign
6
+ Urbana, IL 61801
7
+ xwei12@illinois.edu
8
+ Lane Schwartz
9
+ Department of Linguistics
10
+ University of Illinois at Urbana-Champaign
11
+ Urbana, IL 61801
12
+ lanes@illinois.edu
13
+
14
+ # Vikram Adve
15
+
16
+ Department of Computer Science
17
+ University of Illinois at Urbana-Champaign
18
+ Urbana, IL 61801
19
+ vadve@illinois.edu
20
+
21
+ # ABSTRACT
22
+
23
+ Deep learning software demands reliability and performance. However, many of the existing deep learning frameworks are software libraries that act as an unsafe DSL in Python and a computation graph interpreter. We present DLVM, a design and implementation of a compiler infrastructure with a linear algebra intermediate representation, algorithmic differentiation by adjoint code generation, domainspecific optimizations and a code generator targeting GPU via LLVM. Designed as a modern compiler infrastructure inspired by LLVM, DLVM is more modular and more generic than existing deep learning compiler frameworks, and supports tensor DSLs with high expressivity. With our prototypical staged DSL embedded in Swift, we argue that the DLVM system enables a form of modular, safe and performant frameworks for deep learning.
24
+
25
+ # 1 INTRODUCTION
26
+
27
+ Within the deep learning community, most current approaches to neural networks make use of high-level frameworks with a tensor domain-specific language (DSL) such as Torch (Collobert et al., 2011), TensorFlow (Abadi et al., 2016), PyTorch (PyTorch Development Team, 2016), and MXNet (Chen et al., 2015). Traditionally, developers would build a computation graph (or dynamically generate graph nodes) using a DSL and let the framework interpret the computation graph on parallel architectures such as NVIDIA GPUs. While using hand-tuned GPU subroutines usually yields the best performance for complex operators, advanced compiler techniques can be applied to simplify computation, merge high-level operators based on shaping conditions, and fuse compatible elementwise operators to a single kernel to minimize the latency between kernel launches. Recent projects, the TensorFlow XLA compiler (Leary & Wang, 2017) and the NNVM compiler (NNVM, 2017) including TVM (Chen et al., 2017), have begun to apply compiler techniques to deep learning systems, targeting LLVM (Lattner & Adve, 2004) and various back-ends to achieve good performance. However, their design and implementation have not entirely followed established best practices in widely-used compiler frameworks in the industry.
28
+
29
+ Moreover, some frameworks use operator-overloading algorithmic differentiation (AD) to compute gradients, leaving the gradient computation unoptimizable. The other approach to AD, source code transformation, can produce more efficient code. While frameworks such as TensorFlow already perform AD as a graph transformation and apply various optimizations, their AD transformation is not designed as a transformation pass in the pipeline of their compiler framework, but as part of the DSL library. Making AD part of the compiler framework would greatly simplify the development of DSLs, achieving separation of concerns.
30
+
31
+ ![](images/849b709b69e101ea7ef26d6864d1b1e0eafec6758703952e4749d0cbe5bb8354.jpg)
32
+ Figure 1: Software stack of the DLVM infrastructure. Blue components are the compiler framework.
33
+
34
+ We introduce DLVM, a new compiler infrastructure for deep learning systems that addresses shortcomings of existing deep learning frameworks. Our solution includes (1) a domain-specific intermediate representation specifically designed for tensor computation, (2) principled use of modern compiler optimization techniques to substantially simplify neural network computation, including algebra simplification, AD checkpointing, compute kernel fusion, and various traditional compiler optimizations, (3) code generation through a mature compiler infrastructure that allows for transparent targeting of various hardware, and (4) an embedded DSL that supports static analysis, type safety, and natural expression of tensor computation, and has a just-in-time (JIT) compiler targeting DLVM for AD, optimizations, and code generation.
35
+
36
+ # 2 RELATED WORK
37
+
38
+ Numerous existing projects provide specialized systems for machine learning but are not closely related to our work. These include Apache SystemML (Ghoting et al., 2011), a high-level language and framework for writing and executing machine learning problems targeting Apache Spark, and TACO (Kjolstad et al., 2017), a $\mathrm { C } { + } { + }$ library for compiling and optimizing kernels that is more similar to Halide (Ragan-Kelley et al., 2013) than to our work. Our work treats the creation of neural networks as a compilers problem to be addressed using mature compiler techniques. SystemML does not consider this issue at all; TACO does use compiler optimization, but only at a very low level to generate individual kernels.
39
+
40
+ Two projects closely related to this work are the TensorFlow XLA compiler and the NNVM compiler. The code representation in these frameworks is a “sea of nodes” representation, embedding control flow nodes and composite nodes in a data flow graph. To apply algorithmic differentiation on this IR requires non-standard processing. In contrast, our approach is designed from the start around the idea that a neural network (and its associated tensor computations) is itself a program, which is best optimized through robust application of mature techniques in a principled compilation pipeline. We represent tensor computation in static single assignment (SSA) form with control flow graph, and perform algorithmic differentiation, domain-specific optimizations, general-purpose optimizations, low-level optimizations, and code generation.
41
+
42
+ XLA takes a similar approach to ours, transforming TensorFlow sub-graphs to XLA’s HLO graph and performing optimizations. Our intermediate representation is much more expressive than XLA’s by including modular IR components and general-purpose instructions; this enables our approach to support full-fledged DSLs including standalone compiled DSLs and perform more extensive optimizations such as inlining and interprocedual optimizations. Our approach also differs from XLA by representing composite functions such as min and max directly through primitive instructions such as compare and select, which enables us to apply generic AD, and by using SSA form with control flow graph, which allows for reusing battle-tested SSA optimization algorithms in the LLVM community. Importantly, our entire infrastructure was designed from the start around a robust compile-time framework for tensor DSLs, whereas XLA has been adapted around the existing TensorFlow infrastructure with a particular focus on hardware support for Google’s Tensor Processing Units (Jouppi et al., 2017).
43
+
44
+ ![](images/3c33c1e1b4e49d79cea6b0b96005ddd908e5cf9752dd02376466dc1917156439.jpg)
45
+ Figure 2: Compilation stages in the DLVM compilation pipeline.
46
+
47
+ Where TVM and NNVM are built as a DSL and a graph library in Python with a $\mathrm { C } { + } { + }$ implementation, DLVM’s architecture is closer to LLVM and the Swift Intermediate Language (Groff & Lattner, 2015), having an IR file format and a full-fledged command line toolchain. More specifically, our work differs from NNVM and XLA in the design and presence of an IR that has a textual parsable format, a module/function/basic block hierarchy, custom type declarations and memory semantics. The textual IR enables robust unit testing via FileCheck, which is used extensively in LLVM and most LLVM-based compilers. Moreover, DLVM and its associated DSLs are implemented entirely in Swift, a safe systems programming language, and thus have an elegantly compact codebase and type-safe APIs.
48
+
49
+ # 3 DLVM
50
+
51
+ Deep Learning Virtual Machine (DLVM) is a compiler infrastructure designed for modern deep learning systems.1 DLVM is designed to apply a multi-stage compiler optimization strategy to both high-level linear algebra and low-level parallelism, perform domain-specific transformations, relieve the overhead in front-end languages, and serve as the host for research and development of DSLs for deep learning. The complete DLVM software stack, including sample front-end deep learning DSLs, is shown in Figure 1 on the preceding page.
52
+
53
+ Figure 2 illustrates the major stages in the DLVM compilation pipeline. The DLVM compilation stages address algorithmic differentiation, domain-specific optimizations, general-purpose optimizations, and static code generation targeting a variety of compute architectures. The raw and optimizable stages allow constructs for high-level tensor operations and various high-level optimizations. The compute and schedule stages allow constructs for low-level array operations lowered from tensor operations in high-level stages, borrowing the design from Halide (Ragan-Kelley et al., 2013).
54
+
55
+ The DLVM Intermediate Representation (IR) is the core language of the system. It uses static single assignment (SSA) form, control flow graphs, high-level types including a first-class tensor type, and a set of linear algebra operators combined with a general-purpose instruction set (see Table 1). The system enables a wide variety of domain-specific analyses and transformations, such as reverse-mode AD, AD checkpointing, algebra simplification and linear algebra fusion.
56
+
57
+ To demonstrate how DLVM helps the development of domain-specific languages (DSLs), in Section 3.4 we present one prototypical staged DSL: NNKit. NNKit features safe and natural expression of tensor computation alongside the host program, and targets DLVM for differentiation, optimizations and static code generation.
58
+
59
+ Table 1: This table illustrates a selection of the instructions in the DLVM virtual instruction set. The instruction set includes linear algebra operations such as tanh and dot in addition to control flow instructions such as branch.
60
+
61
+ <table><tr><td rowspan=1 colspan=1>Kind</td><td rowspan=1 colspan=2>Example</td></tr><tr><td rowspan=2 colspan=1>Element-wise unaryElement-wise binaryDot</td><td></td><td></td></tr><tr><td rowspan=1 colspan=1> dot %a:<10 x</td><td></td></tr><tr><td rowspan=2 colspan=1>ReduceTransposeSliceCompareData type cast</td><td></td><td></td></tr><tr><td rowspan=1 colspan=1>slice %a:</td><td></td></tr><tr><td rowspan=2 colspan=1>Function applicationBranchConditional branchShape cast</td><td rowspan=2 colspan=1>arpl</td><td rowspan=1 colspan=1>ly%</td></tr><tr><td rowspan=1 colspan=1>bran</td><td rowspan=1 colspan=1>nch</td></tr></table>
62
+
63
+ # 3.1 DLVM CORE
64
+
65
+ DLVM Core contains essential components for an optimizing compiler: IR, pass manager, and passes (see Figure 1 on page 2). The DLVM IR consists of a virtual instruction set, control flow graph and data flow representation. Passes are functions that traverse the intermediate representation of a program, either producing useful results as analyses of the program (analysis passes), or mutating the program for differentiation and optimizations (transform passes).
66
+
67
+ # 3.1.1 A DOMAIN-SPECIFIC COMPILER INTERMEDIATE REPRESENTATION FOR DLVM
68
+
69
+ Inspired by the LLVM IR (Lattner & Adve, 2004) and the Swift Intermediate Language (Groff & Lattner, 2015), DLVM IR is a graph-based, modular code representation, with both an in-memory format and a textual format. The code representation has a hierarchy of abstractions: module, function, basic block, and instruction. An instruction is the minimal unit of code that operates on values, which can be globals, function arguments or temporary virtual registers produced by instructions. Each module contains a collection of type definitions, global values and functions. Each function has a control flow graph formed by basic blocks and control flow edges. Each basic block contains an ordered list of instructions with data dependencies forming a directed acyclic graph.
70
+
71
+ The DLVM IR has a high-level type system with tensor as a first-class type. The DLVM virtual instruction set includes domain-specific primitive math operators, as well as general-purpose instructions for memory management, control flow and function application. Domain-specific instructions include element-wise unary operators, such as tanh and negate, element-wise binary operators, such as add and power, and complex operators such as dot, transpose, and convolve. All element-wise binary operators support broadcasting. A sample of DLVM IR code is shown in Figure 3 on the next page.
72
+
73
+ The DLVM instruction set does not include composite math functions such as softmax, sigmoid, min or max. All of these functions can be composed of primitive math instructions and control flow constructs. This design allows for the standard AD algorithm to be applied to any differentiable program, with no need for special handling of composite cases.
74
+
75
+ # 3.1.2 DOMAIN-SPECIFIC COMPILER PASSES FOR DLVM
76
+
77
+ DLVM has a full-fledged pass infrastructure, performing various analyses and two kinds of transformations: differentiation and optimization. Differentiation constructs function definitions from gradient declarations using adjoint code generation (see Section 3.1.3 below). Optimization is then performed on the resulting IR, maximizing the code performance. Optimizations include domainspecific optimizations, such as algebra simplification, linear algebra fusion, matrix multiplication reordering, and AD checkpointing, and traditional compiler optimizations.
78
+
79
+ ![](images/d717d7aa13932d973e32e917d093ebca23c6520956de73c54d87b779344714ea.jpg)
80
+ Figure 3: Example code in DLVM intermediate representation. Note that some functions are annotated as defining the gradient of another function with respect some or all arguments. The body of these gradient functions will be automatically generated.
81
+
82
+ Since DLVM IR is aware of mathematical operators such as tanh and power, the algebra simplification pass can find and simplify certain mathematical operations that are expensive or redundant. For example, $x ^ { 2 }$ can be simplified to $x \odot x$ $\odot$ stands for element-wise multiplication), and $x ^ { 0 }$ can be simplified to constant 1. Matrix multiplication reordering is another classic optimization that minimizes the number of sub-operations in a chain of matrix multiplications with different dimensionality, based on matrix multiplication’s associativity.
83
+
84
+ Since the DLVM optimizer is aware of linear algebra operations with static dimensionality, maximizing the performance by fusing verbose linear operations into a single matrix multiplication is beneficial as well. For example, it is very common to encounter expressions of the form $\mathbf { W } \mathbf { X } + \mathbf { b }$ When unoptimized, the matrix multiplication and the addition will be parallelized separately. Since launching compute kernels separately can be expensive, DLVM performs linear algebra fusion, which transforms subexpressions involving both matrix multiplication and element-wise operations into a single matrix multiplication instruction on padded tensors. Besides the simple pattern like an addition of matrix multiplication and a vector, we can apply the same approach to a polynomial of multiple matrix multiplications, turning the polynomial into a single matrix multiplication. For example, in a simple recurrent neural network (RNN), each cell of the recurrence is a feed forward neural network that takes two inputs: $\mathbf { x } _ { t }$ , the input local to the current timestep, and $\mathbf { h } _ { t }$ , the hidden state carried along the recurrence. The linear algebra fusion pass can simplify operations in $\mathbf { h } _ { t } = f ( \mathbf { W } \mathbf { x } _ { t - 1 } + \mathbf { U } \mathbf { h } _ { t - 1 } + \mathbf { b } )$ from two matrix multiplications and two additions into a single matrix multiplication. A more aggressive, interprocedural version of linear algebra fusion can optimize parameter passing and memory allocation, so that the entire concatenated matrix can be created and passed around in the first place without reallocation.
85
+
86
+ # 3.1.3 ALGORITHMIC DIFFERENTIATION THROUGH ADJOINT CODE GENERATION
87
+
88
+ Algorithmic differentiation (AD), also known as automatic differentiation, encompasses a family of a well-known techniques for algorithmically obtaining the derivatives of a function $f : \mathbf { x } \in \mathbb { R } ^ { n } $ $\mathbf { y } \in \mathbb { R } ^ { m }$ (Naumann, 2011). The function $f$ can be represented as a directed acyclic computation graph representing the composition of elementary computational operations for which the respective derivatives are well known. The partial derivative $\frac { \partial y _ { j } } { \partial x _ { i } }$ can be computed through recursive applications of the chain rule, either in the forward direction (corresponding to a bottom-up traversal of the computation graph) or in the backward direction (corresponding to a top-down traversal of the computation graph). The former approach, called forward-mode or tangent-mode AD, is used in some research communities, most commonly when $m \gg n$ (Goodfellow et al., 2016). The latter approach, which includes the back-propagation algorithm (Rumelhart et al., 1986) as a special case, is called reverse-mode or adjoint-mode AD, and encompasses the techniques most commonly used for training the weights in neural networks.
89
+
90
+ In DLVM, the differentiation pass is responsible for performing reverse-mode AD. This pass is responsible for generating DLVM IR code that calculates the derivative of a differentiable function. A function is marked as being automatically differentiable via gradient declarations. A gradient declaration is a function in a module that is declared with its mathematical relation with another function in the module and no function body. The function $\mathsf { \Omega } \mathsf { \Omega } \mathsf { \Omega } \mathsf { \Omega } \mathsf { \Omega } \mathsf { \Omega } \mathsf { f o o \mathrm { - \mathsf { \Omega } \mathsf { { g r a d } } \Omega } }$ in Figure 3 is an example of such a function. Gradient declarations are configurable, e.g. specifying arguments to differentiate with respect to, keeping original outputs, and toggling seedability to accept back-propagated gradients. The differentiation pass, when applied, canonicalizes every gradient declaration in the module to a normal function definition with basic blocks and instructions. The canonicalization process first copies basic blocks and instructions from the original function to the new function body, and then applies adjoint code generation to the function. Unlike many of the existing deep learning frameworks, AD in DLVM is a source code transformation, not interpretation (operator overloading) over the same program. This makes the compiler able to perform optimizations on the gradient computation separately and enables higher order differentiation.
91
+
92
+ Given a differentiable function $f ( \mathbf { x } _ { 1 } , \mathbf { x } _ { 2 } , \ldots , \mathbf { x } _ { n } )$ , this pass creates a new function that computes the Jacobian $\mathbf { J } _ { f }$ . This approach to AD has several advantages with respect to AD performed by operator overloading $/$ graph interpretation. Unlike operator overloading, the gradient function produced by AD is a standalone function that sits uniformly alongside other functions in an IR module, representationally unrelated to the original function. The generated function takes original inputs and produces a tuple of partial derivatives with respect to the inputs. In AD, not all values in the forward evaluation will necessarily be used to compute derivatives. In DLVM, unused operations can be easily eliminated by the aggressive dead code elimination pass in the compilation pipeline (see Section 3.1.4). In addition, an AD-specific optimization technique called checkpointing can further reduce memory consumption during gradient computation.
93
+
94
+ AD in DLVM is configurable. The front-end can choose to differentiate a function with respect to selected arguments, to keep some of the outputs of the original function, to apply differentiation to a specific output when there are multiple return values, or to enable the function to accept backpropagated gradients (seeds) through function composition, all by gradient declarations. If the function returns multiple values in a tuple, the gradient declaration can also specify which tuple element to differentiate. Our approach to AD is implemented as a transformation from one function to another function. This approach also makes higher-order differentiation possible; this can be accomplished by declaring a higher-order gradient function that differentiates the original gradient function.
95
+
96
+ # 3.1.4 GENERAL-PURPOSE OPTIMIZATIONS FOR DLVM
97
+
98
+ General-purpose optimizations refer to traditional compiler optimizations applied to DLVM IR. These optimizations are important at the DLVM stage in the compilation pipeline, since linear algebra computation can be highly optimized or eliminated before they get lowered to LLVM IR which contain parallel execution and low-level information that prevent LLVM optimizations from identifying high-level patterns. Some of these optimizations are aggressive dead code elimination, common subexpression elimination, and sparse conditional constant propagation. Applying such optimizations on gradient computation is not feasible in other approaches to AD that use graph interpretation (operator overloading), because the forward pass and the backward pass are tied together in a single graph; mutating either evaluation pass will alter the semantics of the other.
99
+
100
+ # 3.2 CODE GENERATION
101
+
102
+ Two major design goals of DLVM are the ability to target multiple heterogenous parallel architectures from the same front-end DSL code (and corresponding DLVM IR), and the ability to perform aggressive optimizations on lowered programs. In order to attain these goals, DLVM code generation transforms DLVM IR into LLVM IR. LLVM is a robust and mature compiler infrastructure with multiple back-ends, including NVIDIA GPUs. Many high-level DLVM IR linear algebra instructions over tensors abstract lower-level operations. The DLVM compiler transforms the high-level DLVM IR into lower-level stages and ultimately into calls to BLAS and compute kernels in LLVM IR. Existing LLVM utilities are used to compile the generated LLVM IR to the final binary.
103
+
104
+ In order to take full advantage of a variety of emerging heterogeneous parallel architectures, we plan for future versions of DLVM to target the IR of HPVM (Srivastava et al., 2016), a higherlevel heterogeneous compiler extension to LLVM IR that allows for transparent targeting of diverse architectures from a data flow graph.
105
+
106
+ # 3.3 DLVM COMMAND LINE TOOLCHAIN
107
+
108
+ The front-end software associated with each DSL (see Section 3.4) is responsible for generating a DLVM IR for a given source language program to be compiled. The DLVM compiler infrastructure itself is a compiler from DLVM IR to LLVM IR, therefore having a command line toolchain is necessary for verifying, transforming and compiling batches of DLVM IR files $( \star _ { } . \mathrm { d l } )$ . Unlike XLA and NNVM/TVM, which only provide a Python $/ \mathrm { C } { + + }$ interface to their users, DLVM provides a command line interface like any industry-standard compiler.
109
+
110
+ The DLVM optimizer utility, dlopt, accepts $\star$ .dl IR files and applies user-specified optimization passes on them. The DLVM compiler driver, dlc, accepts $\star$ .dl IR files and performs user-specified tasks, such as verification, differentiation, optimization passes, stage lowering passes, and code generation; the driver invokes the DLVM core library to achieve these tasks. Because of having a textual format of the IR, the DLVM framework can easily make use of the LLVM Integrated Tester (lit) and FileCheck to perform robust unit testing. In future development, we plan to introduce a DLVM bitcode format for compact storage and high-throughput processing of DLVM code.
111
+
112
+ # 3.4 NEURAL NETWORK DSLS
113
+
114
+ Most of existing deep learning DSLs are embedded in a dynamically typed scripting language such as Python and Lua. While these scripting languages provide flexibility and a large number of libraries for scientific computing, they can act as a barrier between lightweight prototyping code and systematic production code. This barrier significantly reduces the reliability of ML software, resulting in suboptimal programming experience and unnecessarily effortful development cycles.
115
+
116
+ In software engineering, a proven approach to tackle this problem is language and compiler technologies, starting from a language that is amenable to static analysis. A well-designed deep learning DSL should support the needs of deep learning software developers by providing a safe environment for rapid prototyping, while simultaneously generating highly efficient code for training and inference. DSLs in a scripting language can easily achieve rapid prototyping, but they are generally incapable of providing a safe environment with optimal performance. We believe that the best solution is DSLs embedded in a type-safe, type-inferring programming language that is both fast and easy to learn. In our initial release of DLVM, we provide one such DSL, both as a proof-of-concept and as a reference implementation that showcases the capabilities of DLVM as a platform for deep learning DSL development.
117
+
118
+ NNKit is a staged DSL embedded in Swift, featuring natural expression of tensor computation alongside the host program without losing static analyses and optimizations on the tensor program. Inspired by Lightweight Modular Staging (Rompf & Odersky, 2010), NNKit leverages the static type system of Swift to guarantee type safety of the DSL. Tensor types are wrapped in $\mathrm { R e p } { < } \mathrm { T } >$ , meaning the representation of some computation that produces data of type T. Tensor operators overloaded for Rep are essentially AST builders for delayed evaluation. Instead of generating computation nodes at runtime and performing operator-overloading AD like PyTorch or TensorFlow Eager (Google Brain Team, 2017), NNKit tensor computations are staged once during the lifetime of the host program. At invocation time of staged functions, NNKit emits shape-specialized DLVM IR and leverages DLVM to perform AD, optimizations, and low-level code generation. A sample of Swift code using NNKit is shown in Figure 4.
119
+
120
+ ![](images/0d26f4d3b2eee12db38e5fe6c1e74f9f289abe5662e934db33064114cc501489.jpg)
121
+ Figure 4: Example code in Swift using NNKit, a staged DSL targeting DLVM.
122
+
123
+ The NNKit just-in-time compiler has four important phases: The first phase, expression staging, produces an unshaped graph IR of the tensor computation. The second phase, shape specialization, prepares to generate statically shaped DLVM IR for staged functions when they are applied to shaped tensors. The third phase, lowering, generates DLVM IR and passes it through DLVM, producing a dynamic library containing a function symbol. The final phase, function reification, loads the binary and wraps the low-level function to a Swift function.
124
+
125
+ We anticipate other existing deep learning frameworks, such as TensorFlow, could be adapted to use DLVM as a back-end to their tensor math DSLs.
126
+
127
+ # 4 CONCLUSION
128
+
129
+ The deep learning research community has a rich variety of available frameworks. While two existing projects have attempted a compilers approach to deep learning frameworks, and have respectively achieved good integration with existing systems (TensorFlow XLA) and good performance (NNVM $+ \mathrm { T V M } )$ , their design philosophies have not entirely followed established best practices in optimizing compiler design. While well intentioned, the remaining vast majority of other frameworks have failed to observe that the problem of front-end DSLs, algorithmic differentiation, and converting a neural network into efficient executable code is, at its core, a compilers problem. As a result, important issues of extensibility and optimization have been addressed in less than optimal fashion in such frameworks. Nevertheless, several such frameworks have achieved wide adoption. We believe that the principled application of optimizing compiler techniques will lead to substantial improvements in the tools available to deep learning researchers. DLVM and its associated front-end DSLs have a major role to play in this future. Our existing implementation supports reverse-mode AD in the core language, and utilizes LLVM to target NVIDIA GPUs. In our ongoing work, we plan to substantially increase the number of supported hardware architectures by utilizing HPVM as an additional back-end, and explore more advanced AD techniques such as mixing forward and reverse modes.
130
+
131
+ # REFERENCES
132
+
133
+ Martín Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Gregory S. Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Ian J. Goodfellow, Andrew Harp, Geoffrey Irving, Michael Isard, Yangqing Jia, Rafal Józefowicz, Lukasz Kaiser, Manjunath Kudlur, Josh Levenberg, Dan Mané, Rajat Monga, Sherry Moore, Derek Gordon Murray, Chris Olah, Mike Schuster, Jonathon Shlens, Benoit Steiner, Ilya Sutskever, Kunal Talwar, Paul A. Tucker, Vincent Vanhoucke, Vijay Vasudevan, Fernanda B. Viégas, Oriol Vinyals, Pete Warden, Martin Wattenberg, Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. TensorFlow: Large-scale machine learning on heterogeneous distributed systems. CoRR, abs/1603.04467, 2016. URL http://arxiv.org/abs/1603.04467.
134
+
135
+ Tianqi Chen, Mu Li, Yutian Li, Min Lin, Naiyan Wang, Minjie Wang, Tianjun Xiao, Bing Xu, Chiyuan Zhang, and Zheng Zhang. Mxnet: A flexible and efficient machine learning library for heterogeneous distributed systems. CoRR, abs/1512.01274, 2015. URL http://arxiv.org/ abs/1512.01274.
136
+
137
+ Tianqi Chen, Thierry Moreau, Ziheng Jiang, and Haichen Shen. TVM: An end to end IR stack for deploying deep learning workloads on hardware platforms. http://tvmlang.org/2017/ 08/17/tvm-release-announcement.html, 2017.
138
+
139
+ Ronan Collobert, Koray Kavukcuoglu, and Clément Farabet. Torch7: A Matlab-like environment for machine learning. In NIPS Big Learning Workshop: Algorithms, Systems, and Tools for Learning at Scale, December 2011.
140
+
141
+ Amol Ghoting, Rajasekar Krishnamurthy, Edwin Pednault, Berthold Reinwald, Vikas Sindhwani, Shirish Tatikonda, Yuanyuan Tian, and Shivakumar Vaithyanathan. Systemml: Declarative machine learning on MapReduce. In Proceedings of the 2011 IEEE 27th International Conference on Data Engineering, ICDE ’11, pp. 231–242, Washington, DC, USA, 2011. IEEE Computer Society. ISBN 978-1-4244-8959-6. doi: 10.1109/ICDE.2011.5767930. URL http://dx.doi.org/ 10.1109/ICDE.2011.5767930.
142
+
143
+ Ian Goodfellow, Yoshua Bengio, and Aaron Courville. Deep Learning. MIT Press, 2016. http: //www.deeplearningbook.org.
144
+
145
+ Google Brain Team. Eager Execution: An imperative, define-by-run interface to TensorFlow. 2017. URL https://research.googleblog.com/2017/10/ eager-execution-imperative-define-by.html.
146
+
147
+ Joe Groff and Chris Lattner. Swift’s High-Level IR: A Case Study of Complementing LLVM IR with Language-Specific Optimization. 2015 LLVM Developers’ Meeting, 2015. URL http: //llvm.org/devmtg/2015-10/slides/GroffLattner-SILHighLevelIR.pdf.
148
+
149
+ Norman P. Jouppi, Cliff Young, Nishant Patil, David Patterson, Gaurav Agrawal, Raminder Bajwa, Sarah Bates, Suresh Bhatia, Nan Boden, Al Borchers, Rick Boyle, Pierre-luc Cantin, Clifford Chao, Chris Clark, Jeremy Coriell, Mike Daley, Matt Dau, Jeffrey Dean, Ben Gelb, Tara Vazir Ghaemmaghami, Rajendra Gottipati, William Gulland, Robert Hagmann, Richard C. Ho, Doug Hogberg, John Hu, Robert Hundt, Dan Hurt, Julian Ibarz, Aaron Jaffey, Alek Jaworski, Alexander Kaplan, Harshit Khaitan, Andy Koch, Naveen Kumar, Steve Lacy, James Laudon, James Law, Diemthu Le, Chris Leary, Zhuyuan Liu, Kyle Lucke, Alan Lundin, Gordon MacKean, Adriana Maggiore, Maire Mahony, Kieran Miller, Rahul Nagarajan, Ravi Narayanaswami, Ray Ni, Kathy Nix, Thomas Norrie, Mark Omernick, Narayana Penukonda, Andy Phelps, Jonathan Ross, Amir Salek, Emad Samadiani, Chris Severn, Gregory Sizikov, Matthew Snelham, Jed Souter, Dan Steinberg, Andy Swing, Mercedes Tan, Gregory Thorson, Bo Tian, Horia Toma, Erick Tuttle, Vijay Vasudevan, Richard Walter, Walter Wang, Eric Wilcox, and Doe Hyun Yoon. In-datacenter performance analysis of a tensor processing unit. CoRR, abs/1704.04760, 2017. URL http: //arxiv.org/abs/1704.04760.
150
+
151
+ Fredrik Kjolstad, Shoaib Kamil, Stephen Chou, David Lugato, and Saman Amarasinghe. The tensor algebra compiler. Proc. ACM Program. Lang., 1(OOPSLA):77:1–77:29, October 2017. ISSN 2475-1421. doi: 10.1145/3133901. URL http://doi.acm.org/10.1145/3133901.
152
+
153
+ Chris Lattner and Vikram Adve. LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation. In Proceedings of the 2004 International Symposium on Code Generation and Optimization (CGO’04), Palo Alto, California, Mar 2004.
154
+
155
+ Chris Leary and Todd Wang. XLA: TensorFlow, compiled! TensorFlow Dev Summit 2017, February 2017.
156
+
157
+ Uwe Naumann. The Art of Differentiating Computer Programs. Society for Industrial and Applied Mathematics, 2011. doi: 10.1137/1.9781611972078. URL http://epubs.siam.org/doi/ abs/10.1137/1.9781611972078.
158
+
159
+ NNVM. NNVM compiler: Open compiler for AI frameworks. http://tvmlang.org/2017/ 10/06/nnvm-compiler-announcement.html, 2017.
160
+
161
+ PyTorch Development Team. Tensors and Dynamic neural networks in Python with strong GPU acceleration. 2016. URL http://pytorch.org.
162
+
163
+ Jonathan Ragan-Kelley, Connelly Barnes, Andrew Adams, Sylvain Paris, Frédo Durand, and Saman Amarasinghe. Halide: A language and compiler for optimizing parallelism, locality, and recomputation in image processing pipelines. In Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’13, pp. 519–530, New York, NY, USA, 2013. ACM. ISBN 978-1-4503-2014-6. doi: 10.1145/2491956.2462176. URL http://doi.acm.org/10.1145/2491956.2462176.
164
+
165
+ Tiark Rompf and Martin Odersky. Lightweight modular staging: A pragmatic approach to runtime code generation and compiled dsls. In Proceedings of the Ninth International Conference on Generative Programming and Component Engineering, GPCE ’10, pp. 127–136, New York, NY, USA, 2010. ACM. ISBN 978-1-4503-0154-1. doi: 10.1145/1868294.1868314. URL http://doi.acm.org/10.1145/1868294.1868314.
166
+
167
+ David E. Rumelhart, James L. McClelland, and CORPORATE PDP Research Group (eds.). Parallel Distributed Processing: Explorations in the Microstructure of Cognition, Vol. 1: Foundations. MIT Press, Cambridge, MA, USA, 1986. ISBN 0-262-68053-X.
168
+
169
+ Prakalp Srivastava, Maria Kotsifakou, and Vikram S. Adve. HPVM: A portable virtual instruction set for heterogeneous parallel systems. CoRR, abs/1611.00860, 2016. URL http://arxiv.org/ abs/1611.00860.
parse/train/ryG6xZ-RZ/ryG6xZ-RZ_content_list.json ADDED
@@ -0,0 +1,919 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "DLVM: A MODERN COMPILER INFRASTRUCTURE FOR DEEP LEARNING SYSTEMS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 99,
9
+ 823,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Richard Wei \nDepartments of Computer Science & Linguistics \nUniversity of Illinois at Urbana-Champaign \nUrbana, IL 61801 \nxwei12@illinois.edu \nLane Schwartz \nDepartment of Linguistics \nUniversity of Illinois at Urbana-Champaign \nUrbana, IL 61801 \nlanes@illinois.edu ",
17
+ "bbox": [
18
+ 183,
19
+ 169,
20
+ 503,
21
+ 239
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "",
28
+ "bbox": [
29
+ 526,
30
+ 170,
31
+ 813,
32
+ 239
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Vikram Adve ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 184,
42
+ 261,
43
+ 279,
44
+ 275
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "Department of Computer Science \nUniversity of Illinois at Urbana-Champaign \nUrbana, IL 61801 \nvadve@illinois.edu ",
51
+ "bbox": [
52
+ 184,
53
+ 276,
54
+ 470,
55
+ 330
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "ABSTRACT ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 454,
65
+ 367,
66
+ 544,
67
+ 382
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Deep learning software demands reliability and performance. However, many of the existing deep learning frameworks are software libraries that act as an unsafe DSL in Python and a computation graph interpreter. We present DLVM, a design and implementation of a compiler infrastructure with a linear algebra intermediate representation, algorithmic differentiation by adjoint code generation, domainspecific optimizations and a code generator targeting GPU via LLVM. Designed as a modern compiler infrastructure inspired by LLVM, DLVM is more modular and more generic than existing deep learning compiler frameworks, and supports tensor DSLs with high expressivity. With our prototypical staged DSL embedded in Swift, we argue that the DLVM system enables a form of modular, safe and performant frameworks for deep learning. ",
74
+ "bbox": [
75
+ 233,
76
+ 401,
77
+ 766,
78
+ 555
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "1 INTRODUCTION ",
85
+ "text_level": 1,
86
+ "bbox": [
87
+ 176,
88
+ 590,
89
+ 336,
90
+ 606
91
+ ],
92
+ "page_idx": 0
93
+ },
94
+ {
95
+ "type": "text",
96
+ "text": "Within the deep learning community, most current approaches to neural networks make use of high-level frameworks with a tensor domain-specific language (DSL) such as Torch (Collobert et al., 2011), TensorFlow (Abadi et al., 2016), PyTorch (PyTorch Development Team, 2016), and MXNet (Chen et al., 2015). Traditionally, developers would build a computation graph (or dynamically generate graph nodes) using a DSL and let the framework interpret the computation graph on parallel architectures such as NVIDIA GPUs. While using hand-tuned GPU subroutines usually yields the best performance for complex operators, advanced compiler techniques can be applied to simplify computation, merge high-level operators based on shaping conditions, and fuse compatible elementwise operators to a single kernel to minimize the latency between kernel launches. Recent projects, the TensorFlow XLA compiler (Leary & Wang, 2017) and the NNVM compiler (NNVM, 2017) including TVM (Chen et al., 2017), have begun to apply compiler techniques to deep learning systems, targeting LLVM (Lattner & Adve, 2004) and various back-ends to achieve good performance. However, their design and implementation have not entirely followed established best practices in widely-used compiler frameworks in the industry. ",
97
+ "bbox": [
98
+ 174,
99
+ 625,
100
+ 825,
101
+ 819
102
+ ],
103
+ "page_idx": 0
104
+ },
105
+ {
106
+ "type": "text",
107
+ "text": "Moreover, some frameworks use operator-overloading algorithmic differentiation (AD) to compute gradients, leaving the gradient computation unoptimizable. The other approach to AD, source code transformation, can produce more efficient code. While frameworks such as TensorFlow already perform AD as a graph transformation and apply various optimizations, their AD transformation is not designed as a transformation pass in the pipeline of their compiler framework, but as part of the DSL library. Making AD part of the compiler framework would greatly simplify the development of DSLs, achieving separation of concerns. ",
108
+ "bbox": [
109
+ 174,
110
+ 827,
111
+ 825,
112
+ 922
113
+ ],
114
+ "page_idx": 0
115
+ },
116
+ {
117
+ "type": "image",
118
+ "img_path": "images/849b709b69e101ea7ef26d6864d1b1e0eafec6758703952e4749d0cbe5bb8354.jpg",
119
+ "image_caption": [
120
+ "Figure 1: Software stack of the DLVM infrastructure. Blue components are the compiler framework. "
121
+ ],
122
+ "image_footnote": [],
123
+ "bbox": [
124
+ 174,
125
+ 99,
126
+ 818,
127
+ 354
128
+ ],
129
+ "page_idx": 1
130
+ },
131
+ {
132
+ "type": "text",
133
+ "text": "We introduce DLVM, a new compiler infrastructure for deep learning systems that addresses shortcomings of existing deep learning frameworks. Our solution includes (1) a domain-specific intermediate representation specifically designed for tensor computation, (2) principled use of modern compiler optimization techniques to substantially simplify neural network computation, including algebra simplification, AD checkpointing, compute kernel fusion, and various traditional compiler optimizations, (3) code generation through a mature compiler infrastructure that allows for transparent targeting of various hardware, and (4) an embedded DSL that supports static analysis, type safety, and natural expression of tensor computation, and has a just-in-time (JIT) compiler targeting DLVM for AD, optimizations, and code generation. ",
134
+ "bbox": [
135
+ 174,
136
+ 410,
137
+ 826,
138
+ 535
139
+ ],
140
+ "page_idx": 1
141
+ },
142
+ {
143
+ "type": "text",
144
+ "text": "2 RELATED WORK ",
145
+ "text_level": 1,
146
+ "bbox": [
147
+ 176,
148
+ 556,
149
+ 344,
150
+ 573
151
+ ],
152
+ "page_idx": 1
153
+ },
154
+ {
155
+ "type": "text",
156
+ "text": "Numerous existing projects provide specialized systems for machine learning but are not closely related to our work. These include Apache SystemML (Ghoting et al., 2011), a high-level language and framework for writing and executing machine learning problems targeting Apache Spark, and TACO (Kjolstad et al., 2017), a $\\mathrm { C } { + } { + }$ library for compiling and optimizing kernels that is more similar to Halide (Ragan-Kelley et al., 2013) than to our work. Our work treats the creation of neural networks as a compilers problem to be addressed using mature compiler techniques. SystemML does not consider this issue at all; TACO does use compiler optimization, but only at a very low level to generate individual kernels. ",
157
+ "bbox": [
158
+ 174,
159
+ 589,
160
+ 825,
161
+ 700
162
+ ],
163
+ "page_idx": 1
164
+ },
165
+ {
166
+ "type": "text",
167
+ "text": "Two projects closely related to this work are the TensorFlow XLA compiler and the NNVM compiler. The code representation in these frameworks is a “sea of nodes” representation, embedding control flow nodes and composite nodes in a data flow graph. To apply algorithmic differentiation on this IR requires non-standard processing. In contrast, our approach is designed from the start around the idea that a neural network (and its associated tensor computations) is itself a program, which is best optimized through robust application of mature techniques in a principled compilation pipeline. We represent tensor computation in static single assignment (SSA) form with control flow graph, and perform algorithmic differentiation, domain-specific optimizations, general-purpose optimizations, low-level optimizations, and code generation. ",
168
+ "bbox": [
169
+ 174,
170
+ 708,
171
+ 825,
172
+ 833
173
+ ],
174
+ "page_idx": 1
175
+ },
176
+ {
177
+ "type": "text",
178
+ "text": "XLA takes a similar approach to ours, transforming TensorFlow sub-graphs to XLA’s HLO graph and performing optimizations. Our intermediate representation is much more expressive than XLA’s by including modular IR components and general-purpose instructions; this enables our approach to support full-fledged DSLs including standalone compiled DSLs and perform more extensive optimizations such as inlining and interprocedual optimizations. Our approach also differs from XLA by representing composite functions such as min and max directly through primitive instructions such as compare and select, which enables us to apply generic AD, and by using SSA form with control flow graph, which allows for reusing battle-tested SSA optimization algorithms in the LLVM community. Importantly, our entire infrastructure was designed from the start around a robust compile-time framework for tensor DSLs, whereas XLA has been adapted around the existing TensorFlow infrastructure with a particular focus on hardware support for Google’s Tensor Processing Units (Jouppi et al., 2017). ",
179
+ "bbox": [
180
+ 174,
181
+ 840,
182
+ 825,
183
+ 924
184
+ ],
185
+ "page_idx": 1
186
+ },
187
+ {
188
+ "type": "image",
189
+ "img_path": "images/3c33c1e1b4e49d79cea6b0b96005ddd908e5cf9752dd02376466dc1917156439.jpg",
190
+ "image_caption": [
191
+ "Figure 2: Compilation stages in the DLVM compilation pipeline. "
192
+ ],
193
+ "image_footnote": [],
194
+ "bbox": [
195
+ 171,
196
+ 98,
197
+ 831,
198
+ 256
199
+ ],
200
+ "page_idx": 2
201
+ },
202
+ {
203
+ "type": "text",
204
+ "text": "",
205
+ "bbox": [
206
+ 174,
207
+ 310,
208
+ 825,
209
+ 395
210
+ ],
211
+ "page_idx": 2
212
+ },
213
+ {
214
+ "type": "text",
215
+ "text": "Where TVM and NNVM are built as a DSL and a graph library in Python with a $\\mathrm { C } { + } { + }$ implementation, DLVM’s architecture is closer to LLVM and the Swift Intermediate Language (Groff & Lattner, 2015), having an IR file format and a full-fledged command line toolchain. More specifically, our work differs from NNVM and XLA in the design and presence of an IR that has a textual parsable format, a module/function/basic block hierarchy, custom type declarations and memory semantics. The textual IR enables robust unit testing via FileCheck, which is used extensively in LLVM and most LLVM-based compilers. Moreover, DLVM and its associated DSLs are implemented entirely in Swift, a safe systems programming language, and thus have an elegantly compact codebase and type-safe APIs. ",
216
+ "bbox": [
217
+ 173,
218
+ 401,
219
+ 825,
220
+ 526
221
+ ],
222
+ "page_idx": 2
223
+ },
224
+ {
225
+ "type": "text",
226
+ "text": "3 DLVM ",
227
+ "text_level": 1,
228
+ "bbox": [
229
+ 176,
230
+ 547,
231
+ 266,
232
+ 564
233
+ ],
234
+ "page_idx": 2
235
+ },
236
+ {
237
+ "type": "text",
238
+ "text": "Deep Learning Virtual Machine (DLVM) is a compiler infrastructure designed for modern deep learning systems.1 DLVM is designed to apply a multi-stage compiler optimization strategy to both high-level linear algebra and low-level parallelism, perform domain-specific transformations, relieve the overhead in front-end languages, and serve as the host for research and development of DSLs for deep learning. The complete DLVM software stack, including sample front-end deep learning DSLs, is shown in Figure 1 on the preceding page. ",
239
+ "bbox": [
240
+ 174,
241
+ 582,
242
+ 825,
243
+ 665
244
+ ],
245
+ "page_idx": 2
246
+ },
247
+ {
248
+ "type": "text",
249
+ "text": "Figure 2 illustrates the major stages in the DLVM compilation pipeline. The DLVM compilation stages address algorithmic differentiation, domain-specific optimizations, general-purpose optimizations, and static code generation targeting a variety of compute architectures. The raw and optimizable stages allow constructs for high-level tensor operations and various high-level optimizations. The compute and schedule stages allow constructs for low-level array operations lowered from tensor operations in high-level stages, borrowing the design from Halide (Ragan-Kelley et al., 2013). ",
250
+ "bbox": [
251
+ 174,
252
+ 671,
253
+ 825,
254
+ 756
255
+ ],
256
+ "page_idx": 2
257
+ },
258
+ {
259
+ "type": "text",
260
+ "text": "The DLVM Intermediate Representation (IR) is the core language of the system. It uses static single assignment (SSA) form, control flow graphs, high-level types including a first-class tensor type, and a set of linear algebra operators combined with a general-purpose instruction set (see Table 1). The system enables a wide variety of domain-specific analyses and transformations, such as reverse-mode AD, AD checkpointing, algebra simplification and linear algebra fusion. ",
261
+ "bbox": [
262
+ 174,
263
+ 762,
264
+ 825,
265
+ 833
266
+ ],
267
+ "page_idx": 2
268
+ },
269
+ {
270
+ "type": "text",
271
+ "text": "To demonstrate how DLVM helps the development of domain-specific languages (DSLs), in Section 3.4 we present one prototypical staged DSL: NNKit. NNKit features safe and natural expression of tensor computation alongside the host program, and targets DLVM for differentiation, optimizations and static code generation. ",
272
+ "bbox": [
273
+ 174,
274
+ 839,
275
+ 823,
276
+ 895
277
+ ],
278
+ "page_idx": 2
279
+ },
280
+ {
281
+ "type": "table",
282
+ "img_path": "images/20d98aab7a123e6c09753bfb3cc8dfb7035594771e0bb772d661ba37e0d7df18.jpg",
283
+ "table_caption": [
284
+ "Table 1: This table illustrates a selection of the instructions in the DLVM virtual instruction set. The instruction set includes linear algebra operations such as tanh and dot in addition to control flow instructions such as branch. "
285
+ ],
286
+ "table_footnote": [],
287
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Kind</td><td rowspan=1 colspan=2>Example</td></tr><tr><td rowspan=2 colspan=1>Element-wise unaryElement-wise binaryDot</td><td></td><td></td></tr><tr><td rowspan=1 colspan=1> dot %a:<10 x</td><td></td></tr><tr><td rowspan=2 colspan=1>ReduceTransposeSliceCompareData type cast</td><td></td><td></td></tr><tr><td rowspan=1 colspan=1>slice %a:</td><td></td></tr><tr><td rowspan=2 colspan=1>Function applicationBranchConditional branchShape cast</td><td rowspan=2 colspan=1>arpl</td><td rowspan=1 colspan=1>ly%</td></tr><tr><td rowspan=1 colspan=1>bran</td><td rowspan=1 colspan=1>nch</td></tr></table>",
288
+ "bbox": [
289
+ 173,
290
+ 102,
291
+ 828,
292
+ 286
293
+ ],
294
+ "page_idx": 3
295
+ },
296
+ {
297
+ "type": "text",
298
+ "text": "3.1 DLVM CORE ",
299
+ "text_level": 1,
300
+ "bbox": [
301
+ 174,
302
+ 376,
303
+ 308,
304
+ 391
305
+ ],
306
+ "page_idx": 3
307
+ },
308
+ {
309
+ "type": "text",
310
+ "text": "DLVM Core contains essential components for an optimizing compiler: IR, pass manager, and passes (see Figure 1 on page 2). The DLVM IR consists of a virtual instruction set, control flow graph and data flow representation. Passes are functions that traverse the intermediate representation of a program, either producing useful results as analyses of the program (analysis passes), or mutating the program for differentiation and optimizations (transform passes). ",
311
+ "bbox": [
312
+ 174,
313
+ 404,
314
+ 825,
315
+ 473
316
+ ],
317
+ "page_idx": 3
318
+ },
319
+ {
320
+ "type": "text",
321
+ "text": "3.1.1 A DOMAIN-SPECIFIC COMPILER INTERMEDIATE REPRESENTATION FOR DLVM",
322
+ "text_level": 1,
323
+ "bbox": [
324
+ 174,
325
+ 491,
326
+ 774,
327
+ 506
328
+ ],
329
+ "page_idx": 3
330
+ },
331
+ {
332
+ "type": "text",
333
+ "text": "Inspired by the LLVM IR (Lattner & Adve, 2004) and the Swift Intermediate Language (Groff & Lattner, 2015), DLVM IR is a graph-based, modular code representation, with both an in-memory format and a textual format. The code representation has a hierarchy of abstractions: module, function, basic block, and instruction. An instruction is the minimal unit of code that operates on values, which can be globals, function arguments or temporary virtual registers produced by instructions. Each module contains a collection of type definitions, global values and functions. Each function has a control flow graph formed by basic blocks and control flow edges. Each basic block contains an ordered list of instructions with data dependencies forming a directed acyclic graph. ",
334
+ "bbox": [
335
+ 174,
336
+ 516,
337
+ 825,
338
+ 628
339
+ ],
340
+ "page_idx": 3
341
+ },
342
+ {
343
+ "type": "text",
344
+ "text": "The DLVM IR has a high-level type system with tensor as a first-class type. The DLVM virtual instruction set includes domain-specific primitive math operators, as well as general-purpose instructions for memory management, control flow and function application. Domain-specific instructions include element-wise unary operators, such as tanh and negate, element-wise binary operators, such as add and power, and complex operators such as dot, transpose, and convolve. All element-wise binary operators support broadcasting. A sample of DLVM IR code is shown in Figure 3 on the next page. ",
345
+ "bbox": [
346
+ 174,
347
+ 636,
348
+ 825,
349
+ 733
350
+ ],
351
+ "page_idx": 3
352
+ },
353
+ {
354
+ "type": "text",
355
+ "text": "The DLVM instruction set does not include composite math functions such as softmax, sigmoid, min or max. All of these functions can be composed of primitive math instructions and control flow constructs. This design allows for the standard AD algorithm to be applied to any differentiable program, with no need for special handling of composite cases. ",
356
+ "bbox": [
357
+ 174,
358
+ 739,
359
+ 825,
360
+ 796
361
+ ],
362
+ "page_idx": 3
363
+ },
364
+ {
365
+ "type": "text",
366
+ "text": "3.1.2 DOMAIN-SPECIFIC COMPILER PASSES FOR DLVM ",
367
+ "text_level": 1,
368
+ "bbox": [
369
+ 173,
370
+ 814,
371
+ 576,
372
+ 829
373
+ ],
374
+ "page_idx": 3
375
+ },
376
+ {
377
+ "type": "text",
378
+ "text": "DLVM has a full-fledged pass infrastructure, performing various analyses and two kinds of transformations: differentiation and optimization. Differentiation constructs function definitions from gradient declarations using adjoint code generation (see Section 3.1.3 below). Optimization is then performed on the resulting IR, maximizing the code performance. Optimizations include domainspecific optimizations, such as algebra simplification, linear algebra fusion, matrix multiplication reordering, and AD checkpointing, and traditional compiler optimizations. ",
379
+ "bbox": [
380
+ 174,
381
+ 840,
382
+ 825,
383
+ 924
384
+ ],
385
+ "page_idx": 3
386
+ },
387
+ {
388
+ "type": "image",
389
+ "img_path": "images/d717d7aa13932d973e32e917d093ebca23c6520956de73c54d87b779344714ea.jpg",
390
+ "image_caption": [
391
+ "Figure 3: Example code in DLVM intermediate representation. Note that some functions are annotated as defining the gradient of another function with respect some or all arguments. The body of these gradient functions will be automatically generated. "
392
+ ],
393
+ "image_footnote": [],
394
+ "bbox": [
395
+ 176,
396
+ 102,
397
+ 818,
398
+ 412
399
+ ],
400
+ "page_idx": 4
401
+ },
402
+ {
403
+ "type": "text",
404
+ "text": "Since DLVM IR is aware of mathematical operators such as tanh and power, the algebra simplification pass can find and simplify certain mathematical operations that are expensive or redundant. For example, $x ^ { 2 }$ can be simplified to $x \\odot x$ $\\odot$ stands for element-wise multiplication), and $x ^ { 0 }$ can be simplified to constant 1. Matrix multiplication reordering is another classic optimization that minimizes the number of sub-operations in a chain of matrix multiplications with different dimensionality, based on matrix multiplication’s associativity. ",
405
+ "bbox": [
406
+ 174,
407
+ 507,
408
+ 825,
409
+ 590
410
+ ],
411
+ "page_idx": 4
412
+ },
413
+ {
414
+ "type": "text",
415
+ "text": "Since the DLVM optimizer is aware of linear algebra operations with static dimensionality, maximizing the performance by fusing verbose linear operations into a single matrix multiplication is beneficial as well. For example, it is very common to encounter expressions of the form $\\mathbf { W } \\mathbf { X } + \\mathbf { b }$ When unoptimized, the matrix multiplication and the addition will be parallelized separately. Since launching compute kernels separately can be expensive, DLVM performs linear algebra fusion, which transforms subexpressions involving both matrix multiplication and element-wise operations into a single matrix multiplication instruction on padded tensors. Besides the simple pattern like an addition of matrix multiplication and a vector, we can apply the same approach to a polynomial of multiple matrix multiplications, turning the polynomial into a single matrix multiplication. For example, in a simple recurrent neural network (RNN), each cell of the recurrence is a feed forward neural network that takes two inputs: $\\mathbf { x } _ { t }$ , the input local to the current timestep, and $\\mathbf { h } _ { t }$ , the hidden state carried along the recurrence. The linear algebra fusion pass can simplify operations in $\\mathbf { h } _ { t } = f ( \\mathbf { W } \\mathbf { x } _ { t - 1 } + \\mathbf { U } \\mathbf { h } _ { t - 1 } + \\mathbf { b } )$ from two matrix multiplications and two additions into a single matrix multiplication. A more aggressive, interprocedural version of linear algebra fusion can optimize parameter passing and memory allocation, so that the entire concatenated matrix can be created and passed around in the first place without reallocation. ",
416
+ "bbox": [
417
+ 173,
418
+ 598,
419
+ 825,
420
+ 819
421
+ ],
422
+ "page_idx": 4
423
+ },
424
+ {
425
+ "type": "text",
426
+ "text": "3.1.3 ALGORITHMIC DIFFERENTIATION THROUGH ADJOINT CODE GENERATION ",
427
+ "text_level": 1,
428
+ "bbox": [
429
+ 176,
430
+ 840,
431
+ 743,
432
+ 856
433
+ ],
434
+ "page_idx": 4
435
+ },
436
+ {
437
+ "type": "text",
438
+ "text": "Algorithmic differentiation (AD), also known as automatic differentiation, encompasses a family of a well-known techniques for algorithmically obtaining the derivatives of a function $f : \\mathbf { x } \\in \\mathbb { R } ^ { n } $ $\\mathbf { y } \\in \\mathbb { R } ^ { m }$ (Naumann, 2011). The function $f$ can be represented as a directed acyclic computation graph representing the composition of elementary computational operations for which the respective derivatives are well known. The partial derivative $\\frac { \\partial y _ { j } } { \\partial x _ { i } }$ can be computed through recursive applications of the chain rule, either in the forward direction (corresponding to a bottom-up traversal of the computation graph) or in the backward direction (corresponding to a top-down traversal of the computation graph). The former approach, called forward-mode or tangent-mode AD, is used in some research communities, most commonly when $m \\gg n$ (Goodfellow et al., 2016). The latter approach, which includes the back-propagation algorithm (Rumelhart et al., 1986) as a special case, is called reverse-mode or adjoint-mode AD, and encompasses the techniques most commonly used for training the weights in neural networks. ",
439
+ "bbox": [
440
+ 174,
441
+ 867,
442
+ 823,
443
+ 924
444
+ ],
445
+ "page_idx": 4
446
+ },
447
+ {
448
+ "type": "text",
449
+ "text": "",
450
+ "bbox": [
451
+ 174,
452
+ 101,
453
+ 825,
454
+ 217
455
+ ],
456
+ "page_idx": 5
457
+ },
458
+ {
459
+ "type": "text",
460
+ "text": "In DLVM, the differentiation pass is responsible for performing reverse-mode AD. This pass is responsible for generating DLVM IR code that calculates the derivative of a differentiable function. A function is marked as being automatically differentiable via gradient declarations. A gradient declaration is a function in a module that is declared with its mathematical relation with another function in the module and no function body. The function $\\mathsf { \\Omega } \\mathsf { \\Omega } \\mathsf { \\Omega } \\mathsf { \\Omega } \\mathsf { \\Omega } \\mathsf { \\Omega } \\mathsf { f o o \\mathrm { - \\mathsf { \\Omega } \\mathsf { { g r a d } } \\Omega } }$ in Figure 3 is an example of such a function. Gradient declarations are configurable, e.g. specifying arguments to differentiate with respect to, keeping original outputs, and toggling seedability to accept back-propagated gradients. The differentiation pass, when applied, canonicalizes every gradient declaration in the module to a normal function definition with basic blocks and instructions. The canonicalization process first copies basic blocks and instructions from the original function to the new function body, and then applies adjoint code generation to the function. Unlike many of the existing deep learning frameworks, AD in DLVM is a source code transformation, not interpretation (operator overloading) over the same program. This makes the compiler able to perform optimizations on the gradient computation separately and enables higher order differentiation. ",
461
+ "bbox": [
462
+ 173,
463
+ 223,
464
+ 825,
465
+ 417
466
+ ],
467
+ "page_idx": 5
468
+ },
469
+ {
470
+ "type": "text",
471
+ "text": "Given a differentiable function $f ( \\mathbf { x } _ { 1 } , \\mathbf { x } _ { 2 } , \\ldots , \\mathbf { x } _ { n } )$ , this pass creates a new function that computes the Jacobian $\\mathbf { J } _ { f }$ . This approach to AD has several advantages with respect to AD performed by operator overloading $/$ graph interpretation. Unlike operator overloading, the gradient function produced by AD is a standalone function that sits uniformly alongside other functions in an IR module, representationally unrelated to the original function. The generated function takes original inputs and produces a tuple of partial derivatives with respect to the inputs. In AD, not all values in the forward evaluation will necessarily be used to compute derivatives. In DLVM, unused operations can be easily eliminated by the aggressive dead code elimination pass in the compilation pipeline (see Section 3.1.4). In addition, an AD-specific optimization technique called checkpointing can further reduce memory consumption during gradient computation. ",
472
+ "bbox": [
473
+ 174,
474
+ 424,
475
+ 825,
476
+ 564
477
+ ],
478
+ "page_idx": 5
479
+ },
480
+ {
481
+ "type": "text",
482
+ "text": "AD in DLVM is configurable. The front-end can choose to differentiate a function with respect to selected arguments, to keep some of the outputs of the original function, to apply differentiation to a specific output when there are multiple return values, or to enable the function to accept backpropagated gradients (seeds) through function composition, all by gradient declarations. If the function returns multiple values in a tuple, the gradient declaration can also specify which tuple element to differentiate. Our approach to AD is implemented as a transformation from one function to another function. This approach also makes higher-order differentiation possible; this can be accomplished by declaring a higher-order gradient function that differentiates the original gradient function. ",
483
+ "bbox": [
484
+ 174,
485
+ 570,
486
+ 825,
487
+ 695
488
+ ],
489
+ "page_idx": 5
490
+ },
491
+ {
492
+ "type": "text",
493
+ "text": "3.1.4 GENERAL-PURPOSE OPTIMIZATIONS FOR DLVM ",
494
+ "text_level": 1,
495
+ "bbox": [
496
+ 173,
497
+ 756,
498
+ 568,
499
+ 770
500
+ ],
501
+ "page_idx": 5
502
+ },
503
+ {
504
+ "type": "text",
505
+ "text": "General-purpose optimizations refer to traditional compiler optimizations applied to DLVM IR. These optimizations are important at the DLVM stage in the compilation pipeline, since linear algebra computation can be highly optimized or eliminated before they get lowered to LLVM IR which contain parallel execution and low-level information that prevent LLVM optimizations from identifying high-level patterns. Some of these optimizations are aggressive dead code elimination, common subexpression elimination, and sparse conditional constant propagation. Applying such optimizations on gradient computation is not feasible in other approaches to AD that use graph interpretation (operator overloading), because the forward pass and the backward pass are tied together in a single graph; mutating either evaluation pass will alter the semantics of the other. ",
506
+ "bbox": [
507
+ 173,
508
+ 797,
509
+ 825,
510
+ 924
511
+ ],
512
+ "page_idx": 5
513
+ },
514
+ {
515
+ "type": "text",
516
+ "text": "3.2 CODE GENERATION ",
517
+ "text_level": 1,
518
+ "bbox": [
519
+ 176,
520
+ 103,
521
+ 349,
522
+ 117
523
+ ],
524
+ "page_idx": 6
525
+ },
526
+ {
527
+ "type": "text",
528
+ "text": "Two major design goals of DLVM are the ability to target multiple heterogenous parallel architectures from the same front-end DSL code (and corresponding DLVM IR), and the ability to perform aggressive optimizations on lowered programs. In order to attain these goals, DLVM code generation transforms DLVM IR into LLVM IR. LLVM is a robust and mature compiler infrastructure with multiple back-ends, including NVIDIA GPUs. Many high-level DLVM IR linear algebra instructions over tensors abstract lower-level operations. The DLVM compiler transforms the high-level DLVM IR into lower-level stages and ultimately into calls to BLAS and compute kernels in LLVM IR. Existing LLVM utilities are used to compile the generated LLVM IR to the final binary. ",
529
+ "bbox": [
530
+ 174,
531
+ 128,
532
+ 825,
533
+ 241
534
+ ],
535
+ "page_idx": 6
536
+ },
537
+ {
538
+ "type": "text",
539
+ "text": "In order to take full advantage of a variety of emerging heterogeneous parallel architectures, we plan for future versions of DLVM to target the IR of HPVM (Srivastava et al., 2016), a higherlevel heterogeneous compiler extension to LLVM IR that allows for transparent targeting of diverse architectures from a data flow graph. ",
540
+ "bbox": [
541
+ 174,
542
+ 247,
543
+ 825,
544
+ 304
545
+ ],
546
+ "page_idx": 6
547
+ },
548
+ {
549
+ "type": "text",
550
+ "text": "3.3 DLVM COMMAND LINE TOOLCHAIN ",
551
+ "text_level": 1,
552
+ "bbox": [
553
+ 178,
554
+ 320,
555
+ 467,
556
+ 333
557
+ ],
558
+ "page_idx": 6
559
+ },
560
+ {
561
+ "type": "text",
562
+ "text": "The front-end software associated with each DSL (see Section 3.4) is responsible for generating a DLVM IR for a given source language program to be compiled. The DLVM compiler infrastructure itself is a compiler from DLVM IR to LLVM IR, therefore having a command line toolchain is necessary for verifying, transforming and compiling batches of DLVM IR files $( \\star _ { } . \\mathrm { d l } )$ . Unlike XLA and NNVM/TVM, which only provide a Python $/ \\mathrm { C } { + + }$ interface to their users, DLVM provides a command line interface like any industry-standard compiler. ",
563
+ "bbox": [
564
+ 174,
565
+ 345,
566
+ 825,
567
+ 429
568
+ ],
569
+ "page_idx": 6
570
+ },
571
+ {
572
+ "type": "text",
573
+ "text": "The DLVM optimizer utility, dlopt, accepts $\\star$ .dl IR files and applies user-specified optimization passes on them. The DLVM compiler driver, dlc, accepts $\\star$ .dl IR files and performs user-specified tasks, such as verification, differentiation, optimization passes, stage lowering passes, and code generation; the driver invokes the DLVM core library to achieve these tasks. Because of having a textual format of the IR, the DLVM framework can easily make use of the LLVM Integrated Tester (lit) and FileCheck to perform robust unit testing. In future development, we plan to introduce a DLVM bitcode format for compact storage and high-throughput processing of DLVM code. ",
574
+ "bbox": [
575
+ 174,
576
+ 436,
577
+ 825,
578
+ 534
579
+ ],
580
+ "page_idx": 6
581
+ },
582
+ {
583
+ "type": "text",
584
+ "text": "3.4 NEURAL NETWORK DSLS ",
585
+ "text_level": 1,
586
+ "bbox": [
587
+ 176,
588
+ 549,
589
+ 393,
590
+ 564
591
+ ],
592
+ "page_idx": 6
593
+ },
594
+ {
595
+ "type": "text",
596
+ "text": "Most of existing deep learning DSLs are embedded in a dynamically typed scripting language such as Python and Lua. While these scripting languages provide flexibility and a large number of libraries for scientific computing, they can act as a barrier between lightweight prototyping code and systematic production code. This barrier significantly reduces the reliability of ML software, resulting in suboptimal programming experience and unnecessarily effortful development cycles. ",
597
+ "bbox": [
598
+ 174,
599
+ 575,
600
+ 825,
601
+ 646
602
+ ],
603
+ "page_idx": 6
604
+ },
605
+ {
606
+ "type": "text",
607
+ "text": "In software engineering, a proven approach to tackle this problem is language and compiler technologies, starting from a language that is amenable to static analysis. A well-designed deep learning DSL should support the needs of deep learning software developers by providing a safe environment for rapid prototyping, while simultaneously generating highly efficient code for training and inference. DSLs in a scripting language can easily achieve rapid prototyping, but they are generally incapable of providing a safe environment with optimal performance. We believe that the best solution is DSLs embedded in a type-safe, type-inferring programming language that is both fast and easy to learn. In our initial release of DLVM, we provide one such DSL, both as a proof-of-concept and as a reference implementation that showcases the capabilities of DLVM as a platform for deep learning DSL development. ",
608
+ "bbox": [
609
+ 174,
610
+ 652,
611
+ 825,
612
+ 791
613
+ ],
614
+ "page_idx": 6
615
+ },
616
+ {
617
+ "type": "text",
618
+ "text": "NNKit is a staged DSL embedded in Swift, featuring natural expression of tensor computation alongside the host program without losing static analyses and optimizations on the tensor program. Inspired by Lightweight Modular Staging (Rompf & Odersky, 2010), NNKit leverages the static type system of Swift to guarantee type safety of the DSL. Tensor types are wrapped in $\\mathrm { R e p } { < } \\mathrm { T } >$ , meaning the representation of some computation that produces data of type T. Tensor operators overloaded for Rep are essentially AST builders for delayed evaluation. Instead of generating computation nodes at runtime and performing operator-overloading AD like PyTorch or TensorFlow Eager (Google Brain Team, 2017), NNKit tensor computations are staged once during the lifetime of the host program. At invocation time of staged functions, NNKit emits shape-specialized DLVM IR and leverages DLVM to perform AD, optimizations, and low-level code generation. A sample of Swift code using NNKit is shown in Figure 4. ",
619
+ "bbox": [
620
+ 174,
621
+ 797,
622
+ 825,
623
+ 924
624
+ ],
625
+ "page_idx": 6
626
+ },
627
+ {
628
+ "type": "image",
629
+ "img_path": "images/0d26f4d3b2eee12db38e5fe6c1e74f9f289abe5662e934db33064114cc501489.jpg",
630
+ "image_caption": [
631
+ "Figure 4: Example code in Swift using NNKit, a staged DSL targeting DLVM. "
632
+ ],
633
+ "image_footnote": [],
634
+ "bbox": [
635
+ 174,
636
+ 103,
637
+ 821,
638
+ 438
639
+ ],
640
+ "page_idx": 7
641
+ },
642
+ {
643
+ "type": "text",
644
+ "text": "",
645
+ "bbox": [
646
+ 171,
647
+ 502,
648
+ 825,
649
+ 531
650
+ ],
651
+ "page_idx": 7
652
+ },
653
+ {
654
+ "type": "text",
655
+ "text": "The NNKit just-in-time compiler has four important phases: The first phase, expression staging, produces an unshaped graph IR of the tensor computation. The second phase, shape specialization, prepares to generate statically shaped DLVM IR for staged functions when they are applied to shaped tensors. The third phase, lowering, generates DLVM IR and passes it through DLVM, producing a dynamic library containing a function symbol. The final phase, function reification, loads the binary and wraps the low-level function to a Swift function. ",
656
+ "bbox": [
657
+ 174,
658
+ 539,
659
+ 825,
660
+ 622
661
+ ],
662
+ "page_idx": 7
663
+ },
664
+ {
665
+ "type": "text",
666
+ "text": "We anticipate other existing deep learning frameworks, such as TensorFlow, could be adapted to use DLVM as a back-end to their tensor math DSLs. ",
667
+ "bbox": [
668
+ 173,
669
+ 628,
670
+ 823,
671
+ 657
672
+ ],
673
+ "page_idx": 7
674
+ },
675
+ {
676
+ "type": "text",
677
+ "text": "4 CONCLUSION ",
678
+ "text_level": 1,
679
+ "bbox": [
680
+ 176,
681
+ 681,
682
+ 318,
683
+ 696
684
+ ],
685
+ "page_idx": 7
686
+ },
687
+ {
688
+ "type": "text",
689
+ "text": "The deep learning research community has a rich variety of available frameworks. While two existing projects have attempted a compilers approach to deep learning frameworks, and have respectively achieved good integration with existing systems (TensorFlow XLA) and good performance (NNVM $+ \\mathrm { T V M } )$ , their design philosophies have not entirely followed established best practices in optimizing compiler design. While well intentioned, the remaining vast majority of other frameworks have failed to observe that the problem of front-end DSLs, algorithmic differentiation, and converting a neural network into efficient executable code is, at its core, a compilers problem. As a result, important issues of extensibility and optimization have been addressed in less than optimal fashion in such frameworks. Nevertheless, several such frameworks have achieved wide adoption. We believe that the principled application of optimizing compiler techniques will lead to substantial improvements in the tools available to deep learning researchers. DLVM and its associated front-end DSLs have a major role to play in this future. Our existing implementation supports reverse-mode AD in the core language, and utilizes LLVM to target NVIDIA GPUs. In our ongoing work, we plan to substantially increase the number of supported hardware architectures by utilizing HPVM as an additional back-end, and explore more advanced AD techniques such as mixing forward and reverse modes. ",
690
+ "bbox": [
691
+ 173,
692
+ 715,
693
+ 825,
694
+ 924
695
+ ],
696
+ "page_idx": 7
697
+ },
698
+ {
699
+ "type": "text",
700
+ "text": "REFERENCES ",
701
+ "text_level": 1,
702
+ "bbox": [
703
+ 176,
704
+ 103,
705
+ 285,
706
+ 117
707
+ ],
708
+ "page_idx": 8
709
+ },
710
+ {
711
+ "type": "text",
712
+ "text": "Martín Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Gregory S. Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Ian J. Goodfellow, Andrew Harp, Geoffrey Irving, Michael Isard, Yangqing Jia, Rafal Józefowicz, Lukasz Kaiser, Manjunath Kudlur, Josh Levenberg, Dan Mané, Rajat Monga, Sherry Moore, Derek Gordon Murray, Chris Olah, Mike Schuster, Jonathon Shlens, Benoit Steiner, Ilya Sutskever, Kunal Talwar, Paul A. Tucker, Vincent Vanhoucke, Vijay Vasudevan, Fernanda B. Viégas, Oriol Vinyals, Pete Warden, Martin Wattenberg, Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. TensorFlow: Large-scale machine learning on heterogeneous distributed systems. CoRR, abs/1603.04467, 2016. URL http://arxiv.org/abs/1603.04467. ",
713
+ "bbox": [
714
+ 176,
715
+ 126,
716
+ 826,
717
+ 252
718
+ ],
719
+ "page_idx": 8
720
+ },
721
+ {
722
+ "type": "text",
723
+ "text": "Tianqi Chen, Mu Li, Yutian Li, Min Lin, Naiyan Wang, Minjie Wang, Tianjun Xiao, Bing Xu, Chiyuan Zhang, and Zheng Zhang. Mxnet: A flexible and efficient machine learning library for heterogeneous distributed systems. CoRR, abs/1512.01274, 2015. URL http://arxiv.org/ abs/1512.01274. ",
724
+ "bbox": [
725
+ 174,
726
+ 262,
727
+ 826,
728
+ 318
729
+ ],
730
+ "page_idx": 8
731
+ },
732
+ {
733
+ "type": "text",
734
+ "text": "Tianqi Chen, Thierry Moreau, Ziheng Jiang, and Haichen Shen. TVM: An end to end IR stack for deploying deep learning workloads on hardware platforms. http://tvmlang.org/2017/ 08/17/tvm-release-announcement.html, 2017. ",
735
+ "bbox": [
736
+ 176,
737
+ 329,
738
+ 825,
739
+ 372
740
+ ],
741
+ "page_idx": 8
742
+ },
743
+ {
744
+ "type": "text",
745
+ "text": "Ronan Collobert, Koray Kavukcuoglu, and Clément Farabet. Torch7: A Matlab-like environment for machine learning. In NIPS Big Learning Workshop: Algorithms, Systems, and Tools for Learning at Scale, December 2011. ",
746
+ "bbox": [
747
+ 173,
748
+ 382,
749
+ 825,
750
+ 425
751
+ ],
752
+ "page_idx": 8
753
+ },
754
+ {
755
+ "type": "text",
756
+ "text": "Amol Ghoting, Rajasekar Krishnamurthy, Edwin Pednault, Berthold Reinwald, Vikas Sindhwani, Shirish Tatikonda, Yuanyuan Tian, and Shivakumar Vaithyanathan. Systemml: Declarative machine learning on MapReduce. In Proceedings of the 2011 IEEE 27th International Conference on Data Engineering, ICDE ’11, pp. 231–242, Washington, DC, USA, 2011. IEEE Computer Society. ISBN 978-1-4244-8959-6. doi: 10.1109/ICDE.2011.5767930. URL http://dx.doi.org/ 10.1109/ICDE.2011.5767930. ",
757
+ "bbox": [
758
+ 174,
759
+ 435,
760
+ 826,
761
+ 520
762
+ ],
763
+ "page_idx": 8
764
+ },
765
+ {
766
+ "type": "text",
767
+ "text": "Ian Goodfellow, Yoshua Bengio, and Aaron Courville. Deep Learning. MIT Press, 2016. http: //www.deeplearningbook.org. ",
768
+ "bbox": [
769
+ 171,
770
+ 530,
771
+ 825,
772
+ 559
773
+ ],
774
+ "page_idx": 8
775
+ },
776
+ {
777
+ "type": "text",
778
+ "text": "Google Brain Team. Eager Execution: An imperative, define-by-run interface to TensorFlow. 2017. URL https://research.googleblog.com/2017/10/ eager-execution-imperative-define-by.html. ",
779
+ "bbox": [
780
+ 174,
781
+ 569,
782
+ 826,
783
+ 613
784
+ ],
785
+ "page_idx": 8
786
+ },
787
+ {
788
+ "type": "text",
789
+ "text": "Joe Groff and Chris Lattner. Swift’s High-Level IR: A Case Study of Complementing LLVM IR with Language-Specific Optimization. 2015 LLVM Developers’ Meeting, 2015. URL http: //llvm.org/devmtg/2015-10/slides/GroffLattner-SILHighLevelIR.pdf. ",
790
+ "bbox": [
791
+ 174,
792
+ 622,
793
+ 826,
794
+ 665
795
+ ],
796
+ "page_idx": 8
797
+ },
798
+ {
799
+ "type": "text",
800
+ "text": "Norman P. Jouppi, Cliff Young, Nishant Patil, David Patterson, Gaurav Agrawal, Raminder Bajwa, Sarah Bates, Suresh Bhatia, Nan Boden, Al Borchers, Rick Boyle, Pierre-luc Cantin, Clifford Chao, Chris Clark, Jeremy Coriell, Mike Daley, Matt Dau, Jeffrey Dean, Ben Gelb, Tara Vazir Ghaemmaghami, Rajendra Gottipati, William Gulland, Robert Hagmann, Richard C. Ho, Doug Hogberg, John Hu, Robert Hundt, Dan Hurt, Julian Ibarz, Aaron Jaffey, Alek Jaworski, Alexander Kaplan, Harshit Khaitan, Andy Koch, Naveen Kumar, Steve Lacy, James Laudon, James Law, Diemthu Le, Chris Leary, Zhuyuan Liu, Kyle Lucke, Alan Lundin, Gordon MacKean, Adriana Maggiore, Maire Mahony, Kieran Miller, Rahul Nagarajan, Ravi Narayanaswami, Ray Ni, Kathy Nix, Thomas Norrie, Mark Omernick, Narayana Penukonda, Andy Phelps, Jonathan Ross, Amir Salek, Emad Samadiani, Chris Severn, Gregory Sizikov, Matthew Snelham, Jed Souter, Dan Steinberg, Andy Swing, Mercedes Tan, Gregory Thorson, Bo Tian, Horia Toma, Erick Tuttle, Vijay Vasudevan, Richard Walter, Walter Wang, Eric Wilcox, and Doe Hyun Yoon. In-datacenter performance analysis of a tensor processing unit. CoRR, abs/1704.04760, 2017. URL http: //arxiv.org/abs/1704.04760. ",
801
+ "bbox": [
802
+ 178,
803
+ 676,
804
+ 826,
805
+ 869
806
+ ],
807
+ "page_idx": 8
808
+ },
809
+ {
810
+ "type": "text",
811
+ "text": "Fredrik Kjolstad, Shoaib Kamil, Stephen Chou, David Lugato, and Saman Amarasinghe. The tensor algebra compiler. Proc. ACM Program. Lang., 1(OOPSLA):77:1–77:29, October 2017. ISSN 2475-1421. doi: 10.1145/3133901. URL http://doi.acm.org/10.1145/3133901. ",
812
+ "bbox": [
813
+ 176,
814
+ 882,
815
+ 825,
816
+ 924
817
+ ],
818
+ "page_idx": 8
819
+ },
820
+ {
821
+ "type": "text",
822
+ "text": "Chris Lattner and Vikram Adve. LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation. In Proceedings of the 2004 International Symposium on Code Generation and Optimization (CGO’04), Palo Alto, California, Mar 2004. ",
823
+ "bbox": [
824
+ 178,
825
+ 103,
826
+ 823,
827
+ 146
828
+ ],
829
+ "page_idx": 9
830
+ },
831
+ {
832
+ "type": "text",
833
+ "text": "Chris Leary and Todd Wang. XLA: TensorFlow, compiled! TensorFlow Dev Summit 2017, February 2017. ",
834
+ "bbox": [
835
+ 173,
836
+ 155,
837
+ 823,
838
+ 184
839
+ ],
840
+ "page_idx": 9
841
+ },
842
+ {
843
+ "type": "text",
844
+ "text": "Uwe Naumann. The Art of Differentiating Computer Programs. Society for Industrial and Applied Mathematics, 2011. doi: 10.1137/1.9781611972078. URL http://epubs.siam.org/doi/ abs/10.1137/1.9781611972078. ",
845
+ "bbox": [
846
+ 174,
847
+ 193,
848
+ 823,
849
+ 234
850
+ ],
851
+ "page_idx": 9
852
+ },
853
+ {
854
+ "type": "text",
855
+ "text": "NNVM. NNVM compiler: Open compiler for AI frameworks. http://tvmlang.org/2017/ 10/06/nnvm-compiler-announcement.html, 2017. ",
856
+ "bbox": [
857
+ 174,
858
+ 244,
859
+ 821,
860
+ 273
861
+ ],
862
+ "page_idx": 9
863
+ },
864
+ {
865
+ "type": "text",
866
+ "text": "PyTorch Development Team. Tensors and Dynamic neural networks in Python with strong GPU acceleration. 2016. URL http://pytorch.org. ",
867
+ "bbox": [
868
+ 176,
869
+ 281,
870
+ 821,
871
+ 311
872
+ ],
873
+ "page_idx": 9
874
+ },
875
+ {
876
+ "type": "text",
877
+ "text": "Jonathan Ragan-Kelley, Connelly Barnes, Andrew Adams, Sylvain Paris, Frédo Durand, and Saman Amarasinghe. Halide: A language and compiler for optimizing parallelism, locality, and recomputation in image processing pipelines. In Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’13, pp. 519–530, New York, NY, USA, 2013. ACM. ISBN 978-1-4503-2014-6. doi: 10.1145/2491956.2462176. URL http://doi.acm.org/10.1145/2491956.2462176. ",
878
+ "bbox": [
879
+ 173,
880
+ 319,
881
+ 826,
882
+ 404
883
+ ],
884
+ "page_idx": 9
885
+ },
886
+ {
887
+ "type": "text",
888
+ "text": "Tiark Rompf and Martin Odersky. Lightweight modular staging: A pragmatic approach to runtime code generation and compiled dsls. In Proceedings of the Ninth International Conference on Generative Programming and Component Engineering, GPCE ’10, pp. 127–136, New York, NY, USA, 2010. ACM. ISBN 978-1-4503-0154-1. doi: 10.1145/1868294.1868314. URL http://doi.acm.org/10.1145/1868294.1868314. ",
889
+ "bbox": [
890
+ 174,
891
+ 412,
892
+ 825,
893
+ 483
894
+ ],
895
+ "page_idx": 9
896
+ },
897
+ {
898
+ "type": "text",
899
+ "text": "David E. Rumelhart, James L. McClelland, and CORPORATE PDP Research Group (eds.). Parallel Distributed Processing: Explorations in the Microstructure of Cognition, Vol. 1: Foundations. MIT Press, Cambridge, MA, USA, 1986. ISBN 0-262-68053-X. ",
900
+ "bbox": [
901
+ 176,
902
+ 491,
903
+ 825,
904
+ 535
905
+ ],
906
+ "page_idx": 9
907
+ },
908
+ {
909
+ "type": "text",
910
+ "text": "Prakalp Srivastava, Maria Kotsifakou, and Vikram S. Adve. HPVM: A portable virtual instruction set for heterogeneous parallel systems. CoRR, abs/1611.00860, 2016. URL http://arxiv.org/ abs/1611.00860. ",
911
+ "bbox": [
912
+ 174,
913
+ 544,
914
+ 826,
915
+ 587
916
+ ],
917
+ "page_idx": 9
918
+ }
919
+ ]
parse/train/ryG6xZ-RZ/ryG6xZ-RZ_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ryG6xZ-RZ/ryG6xZ-RZ_model.json ADDED
The diff for this file is too large to render. See raw diff