ZHANGYUXUAN-zR commited on
Commit
f9b2f70
·
verified ·
1 Parent(s): 4658260

Add files using upload-large-folder tool

Browse files
parse/train/BkxRRkSKwr/BkxRRkSKwr.md ADDED
@@ -0,0 +1,315 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # TOWARDS HIERARCHICAL IMPORTANCE ATTRIBUTION: EXPLAINING COMPOSITIONAL SEMANTICS FOR NEURAL SEQUENCE MODELS
2
+
3
+ Xisen $\mathbf { J i n } \ S$ , Zhongyu Wei†, Junyi $\mathbf { D } \mathbf { u } ^ { \ S }$ , Xiangyang Xue†, Xiang Ren§
4
+
5
+ §University of Southern California
6
+ †Fudan University
7
+ {xisenjin, junyidu, xiangren}@usc.edu
8
+ {zywei, xyxue}@fudan.edu.cn
9
+
10
+ # ABSTRACT
11
+
12
+ The impressive performance of neural networks on natural language processing tasks attributes to their ability to model complicated word and phrase compositions. To explain how the model handles semantic compositions, we study hierarchical explanation of neural network predictions. We identify non-additivity and context independent importance attributions within hierarchies as two desirable properties for highlighting word and phrase compositions. We show some prior efforts on hierarchical explanations, e.g. contextual decomposition, do not satisfy the desired properties mathematically, leading to inconsistent explanation quality in different models. In this paper, we start by proposing a formal and general way to quantify the importance of each word and phrase. Following the formulation, we propose Sampling and Contextual Decomposition (SCD) algorithm and Sampling and Occlusion (SOC) algorithm. Human and metrics evaluation on both LSTM models and BERT Transformer models on multiple datasets show that our algorithms outperform prior hierarchical explanation algorithms. Our algorithms help to visualize semantic composition captured by models, extract classification rules and improve human trust of models1.
13
+
14
+ # 1 INTRODUCTION
15
+
16
+ Recent advances in deep neural networks have led to impressive results on a range of natural language processing (NLP) tasks, by learning latent, compositional vector representations of text data (Peters et al., 2018; Devlin et al., 2018; Liu et al., 2019b). However, interpretability of the predictions given by these complex, “black box” models has always been a limiting factor for use cases that require explanations of the features involved in modeling (e.g., words and phrases) (Guidotti et al., 2018; Ribeiro et al., 2016). Prior efforts on enhancing model interpretability have focused on either constructing models with intrinsically interpretable structures (Bahdanau et al., 2015; Liu et al., 2019a), or developing post-hoc explanation algorithms which can explain model predictions without elucidating the mechanisms by which model works (Mohseni et al., 2018; Guidotti et al., 2018). Among these work, post-hoc explanation has come to the fore as they can operate over a variety of trained models while not affecting predictive performance of models. Towards post-hoc explanation, a major line of work, additive feature attribution methods (Lundberg & Lee, 2017; Ribeiro et al., 2016; Binder et al., 2016; Shrikumar et al., 2017), explain a model prediction by assigning importance scores to individual input variables. However, these methods are not ideal for explaining phrase-level importance, as phrase importance is often a non-linear combination of the importance of the words in the phrase. Contextual decomposition (CD) (Murdoch et al., 2018) and its hierarchical extension (Singh et al., 2019) go beyond the additive assumption and compute the contribution solely made by a word/phrase to the model prediction (i.e., individual contribution), by decomposing the output variables of the neural network at each layer. Using the individual contribution scores so derived, these algorithms generate hierarchical explanation on how the model captures compositional semantics (e.g., stress or negation) in making predictions (see Figure 1 for example).
17
+
18
+ ![](images/36a475e153d4db2743b2868470a67332f7aec2ae745d0c95462048eb95cf32a5.jpg)
19
+ Figure 1: Different score attribution algorithms. (a) Input occlusion assigns a negative score for the word “interesting”, as the sentiment of the phrase becomes less negative after removing “interesting” from the original sentence. (b) Additive attributions assign importance scores for words “not” and “interesting” by linearly distributing contribution score of “not interesting“, exemplified with Shapley Values (Shapley, 1953). Intuitively, only (c) Hierarchical explanations highlight the negative compositional effect between the words “not” and “interesting”.
20
+
21
+ However, despite contextual decomposition methods have achieved good results in practice, what reveals extra importance that emerge from combining two phrases has not been well studied. As a result, prior lines of work on contextual decomposition have focused on exploring model-specific decompositions based on their performance on visualizations. We identify the extra importance from combining two phrases can be quantified by studying how the importance of the combined phrase differs from the sum of the importance of the two component phrases on its own. Similar strategies have been studied in game theory for quantifying the surplus from combining two groups of players (Fujimoto et al., 2006). Following the definition above, the key challenge is to formulate the importance of a phrase on it own, i.e., context independent importance of a phrase. However, we show contextual decomposition do not satisfy this context independence property mathematically.
22
+
23
+ To this end, we propose a formal way to quantify the importance of each individual word/phrase, and develop effective algorithms for generating hierarchical explanations based on the new formulation. To mathematically formalize and efficiently approximate context independent importance, we formulate $N$ -context independent importance of a phrase, defined as the difference of model output after masking out the phrase, marginalized over all possible $N$ words surrounding the phrase in the sentence. We propose two explanation algorithms according to our formulation, namely the Sampling and Contextual Decomposition algorithm (SCD), which overcomes the weakness of contextual decomposition algorithms, and the Sampling and OCclusion algorithm (SOC), which is simple, model-agnostic, and performs competitively against prior lines of algorithms. We experiment with both LSTM and fine-tuned Transformer models to evaluate the proposed methods. Quantitative studies involving automatic metrics and human evaluation on sentiment analysis and relation extraction tasks show that our algorithms consistently outperform competitors in the quality of explanations. Our algorithms manage to provide hierarchical visualization of compositional semantics captured by models, extract classification rules from models, and help users to trust neural networks predictions.
24
+
25
+ In summary, our work makes the following contributions: (1) we identify the key challenges in generating post-hoc hierarchical explanations and propose a mathematically sound way to quantify context independent importance of words and phrases for generating hierarchical explanations; (2) we extend previous post-hoc explanation algorithm based on the new formulation of $N$ -context independent importance and develop two effective hierarchical explanation algorithms; and (3) experiments demonstrate that the proposed explanation algorithms consistently outperform the compared methods (with both LSTM and Transformer as base models) over several datasets and models.
26
+
27
+ # 2 PRELIMINARIES
28
+
29
+ # 2.1 POST-HOC EXPLANATIONS OF NEURAL SEQUENCE MODELS
30
+
31
+ We consider a sequence of low-dimensional word embeddings $\mathbf { x } _ { 1 : T } : = ( \mathbf { x } _ { 1 } , \mathbf { x } _ { 2 } , . . . , \mathbf { x } _ { T } )$ , or denoted as $\mathbf { x }$ for brevity, as the input to a neural sequence model, such as standard RNNs, LSTM (Hochreiter & Schmidhuber, 1997) and Transformers (Vaswani et al., 2017). These neural models extract hidden representations $\mathbf { h } _ { 1 : T }$ from the input sequence $\mathbf { x }$ , and feed these hidden representations to a prediction layer to generate prediction scores in the label space (e.g., sentiment polarity of a sentence). For LSTM, we use the last hidden state $\mathbf { h } _ { T }$ to give unnormalized prediction scores $s ( \mathbf { x } ) \in \mathbb { R } ^ { d _ { c } }$ over $d _ { c }$ label classes as follows.
32
+
33
+ $$
34
+ s ( \mathbf { x } ) = { \cal W } _ { l } \mathbf { h } _ { T } ,
35
+ $$
36
+
37
+ where $W _ { l } \in \mathbb { R } ^ { d _ { c } \times d _ { h } }$ is a trainable weight matrix. For Transformers, the representation corresponding to the [CLS] token at the final layer is fed to the prediction layer to generate scores $s ( \mathbf { x } )$ .
38
+
39
+ Towards post-hoc explanation of $s ( \mathbf { x } )$ , a notable line of work, additive feature attribution methods (Ribeiro et al., 2016; Shrikumar et al., 2017; Sundararajan et al., 2017; Lundberg & Lee, 2017), measure word-level importance to the model prediction $s ( \mathbf { x } )$ by attributing an importance score $\phi ( \mathbf { x } _ { i } , \mathbf { x } )$ to each word in the input sequence $\mathbf { x } _ { i } \in \mathbf { x }$ . However, the additive assumption hinders these methods from explaining the complex interactions between words and compositional semantics in a sentence (e.g., modeling negation, transition, and emphasis in sentiment classification), as shown in Figure 1.
40
+
41
+ # 2.2 HIERARCHICAL EXPLANATIONS VIA CONTEXTUAL DECOMPOSITION
42
+
43
+ To caputure non-linear compositional semantics, the line of work on contextual decomposition (CD) (Murdoch et al., 2018) designs non-additive measures of importance from individual words/phrases to the model predictions, and further extend to agglomerative contextual decomposition (ACD) algorithm (Singh et al., 2019) for generating hierarchical explanations.
44
+
45
+ Given a phrase $\mathbf { p } = \mathbf { x } _ { i : j }$ in the input sequence $\mathbf { x }$ , contextual decomposition (CD) attributes a score $\phi ( \mathbf { p } , \mathbf { x } )$ as the contribution solely from $\mathbf { p }$ to the model’s prediction $s ( \mathbf { x } )$ . Note that $\phi ( \mathbf { p } , \mathbf { x } )$ does not equal to the sum of the scores of each word in the phrase, i.e., $\begin{array} { r } { \phi ( \mathbf { p } , \mathbf { x } ) \neq \sum _ { \mathbf { x } _ { i } \in \mathbf { p } } \phi ( \mathbf { x } _ { i } , \mathbf { x } ) } \end{array}$ . Starting from the input layer, CD iteratively decomposes each hidden state $\mathbf { h }$ of the model into the contribution solely made by $\mathbf { p }$ , denoted as $\beta$ , and the contributions involving the words outside the phrase $\mathbf { p }$ , denoted as $\gamma$ , with the relation $\mathbf { h } = \beta { + } \gamma$ holds. The algorithm also keeps the contribution from the bias term, denoted as $\zeta$ , temporally before element-wise multiplication.
46
+
47
+ For a linear layer $\mathbf { h } = \mathbf { { W } } _ { i } \mathbf { { x } } _ { t } + \mathbf { { \mathbf { b } } } _ { i }$ with input $\mathbf { x } _ { t }$ , when $\mathbf { x } _ { t }$ lies in the given phrase p, the contribution solely from $\mathbf { x } _ { t }$ to $\mathbf { h }$ is defined as $\beta = W _ { i } \mathbf { x } _ { t }$ when $\mathbf { x } _ { t }$ is part of the phrase (i.e., $\mathbf { x } _ { t } \in \mathbf { p } ,$ ), and the contribution involving other words in the sentences (denoted as $\mathbf { x } \backslash \mathbf { p } )$ is defined as $\gamma = 0$ . The contribution of the bias term $\zeta$ is thus $\mathbf { b } _ { i }$ . When $\mathbf { x } _ { t }$ lies outside of the phrase, $\gamma$ is quantified as $W _ { i } \mathbf { x } _ { t }$ and $\beta$ is 0. In the cases when CD encounters element-wise multiplication operations $\mathbf { h } = \mathbf { h } _ { a } \odot \mathbf { h } _ { b }$ (e.g., in LSTMs), it eliminates the multiplicative interaction terms which involve the information outside of the phrase p. Specifically, suppose that $\mathbf { h } _ { a }$ and $\mathbf { h } _ { b }$ have been decomposed as $\mathbf { h } _ { a } \ = \ \beta ^ { a } + \gamma ^ { a } + \zeta ^ { a }$ and $\mathbf { h } _ { b } \mathbf { \bar { \phi } } = \mathbf { \bar { \beta } } ^ { b } + \gamma ^ { b } + \zeta ^ { b }$ , CD computes the $\beta$ term for ${ \mathbf { h } } _ { a } \odot { \mathbf { h } } _ { b }$ as $\beta = \beta ^ { a } \odot \beta ^ { b } + \beta ^ { a } \odot \zeta ^ { b } + \zeta ^ { a } \odot \beta ^ { b }$ .
48
+
49
+ When dealing with non-linear activation $\mathbf { h } ^ { \prime } = \sigma ( \mathbf { h } )$ , CD computes the contribution solely from the phrase $\mathbf { p }$ as the average activation differences caused $\beta$ supposing $\gamma$ is present or absent,
50
+
51
+ $$
52
+ \beta ^ { \prime } = \frac { 1 } { 2 } [ \sigma ( \beta + \gamma + \zeta ) - \sigma ( \gamma + \zeta ) ] + \frac { 1 } { 2 } [ \sigma ( \beta + \zeta ) - \sigma ( \zeta ) ] .
53
+ $$
54
+
55
+ Following the strategies introduced above, CD decomposes all the intermediate outputs starting from the input layer, until reaching the final output of the model ${ \bf h } _ { T } = \beta + \boldsymbol { \gamma }$ . The logit score $W _ { l } \beta$ is treated as the contribution of the given phrase $\mathbf { p }$ to the final prediction $s ( \mathbf { x } )$ .
56
+
57
+ As a follow-up study, Singh et al. (2019) extends CD algorithm to other families of neural network architectures, and proposes agglomerative contextual decomposition algorithm (ACD). The decomposition of activation functions is modified as $\beta ^ { \prime } = \sigma ( \beta )$ . For a linear layer $\mathbf { h } ^ { \prime } = \mathbf { W } \mathbf { h } + \mathbf { b }$ with its decomposition $\mathbf { h } = \beta + \boldsymbol \gamma$ , the bias term $^ { b }$ is decomposed proportionally and merged into the $\beta ^ { \prime }$ term of $\mathbf { h } ^ { \bar { \prime } }$ , based on $\beta ^ { \prime } = W \beta + | W \beta | / ( | W \beta | + | \bar { W } \gamma | ) \cdot \bar { b }$ .
58
+
59
+ ![](images/314bba920726d1f96e471e2d391823db9da9993c154544adf7c77b7335e3af5b.jpg)
60
+ Figure 2: (Left) Illustration of the CD and SCD at calculating the decomposition for $\mathbf { h } = \sigma ( \beta + \gamma )$ , following Eq. 2. Red lines indicate computation that make CD explanations dependent on the words outside the give phrase. (Right) Illustration of the sampling step $\bar { \dot { \mathbf { x } } _ { \delta } } \sim p ( \hat { \mathbf { x } } _ { \delta } \vert \mathbf { x } _ { - \delta } )$ for calculating the importance of the word very in SOC and SCD, with size of context $N = 1$ . The padding operation is for SOC.
61
+
62
+ # 3 METHODOLOGY
63
+
64
+ In this section, we start by identifying desired properties of phrase-level importance score attribution for hierarchical explanations. We propose a measure of context-independent importance of a phrase and introduce two explanation algorithms instantiated from the proposed formulation.
65
+
66
+ 3.1 PROPERTIES OF IMPORTANCE ATTRIBUTION FOR HIERARCHICAL EXPLANATION
67
+
68
+ Despite the empirical success of CD and ACD, no prior works analyze what common properties a score attribution mechanism should satisfy to generate hierarchical explanations that reveal compositional semantics formed between phrases. Here we identify two properties that an attribution method should satisfy to generate informative hierarchical explanations.
69
+
70
+ Non-additivity. Importance of a phrase $\phi ( \mathbf { p } , \mathbf { x } )$ should not be a sum over the importance scores of all the component words $\mathbf { x } _ { i } \in \mathbf { p }$ , i.e., $\begin{array} { r } { \phi ( \mathbf { p } , \mathbf { x } ) \neq \sum _ { \mathbf { x } _ { i } \in \mathbf { p } } \phi ( \mathbf { x } _ { i } , \mathbf { x } ) } \end{array}$ , in contrast to the family of additive feature attribution methods. The property is also suggested by Murdoch et al. (2018).
71
+
72
+ Context Independence. For deep neural networks, when two phrases combine, their importance to predicting a class may greatly change. The surplus by combining two phrases can be quantified by the difference between the importance of the combined phrase and the sum of the importance of two phrases on its own. It follows the definition of marginal interactions (Fujimoto et al., 2006) in game theory. According to the definition, the importance of two component phrases should be at least evaluated independently to each other. Formally, if we are only interested in how combining two phrases $\mathbf { p } _ { 1 }$ and $\mathbf { p } _ { 2 }$ contribute to a specific prediction for an input $\mathbf { x }$ , we expect for input sentences x˜ where only $\mathbf { p } _ { 2 }$ is replaced to another phrase, the importance attribution for $\mathbf { p } _ { 1 }$ remains the same, i.e., $\phi ( { \bf p } _ { 1 } , { \bf x } ) = \phi ( { \bf p } _ { 1 } , \tilde { { \bf x } } )$ . In our bottom-up hierarchical explanation setting, we are interested in how combining a phrase and any other contextual words or phrases in the input $\mathbf { x }$ contribute. Therefore, we expect $\phi ( \mathbf { \bar { p } } , \mathbf { x } ) = \phi ( \mathbf { p } , \mathbf { \tilde { x } } )$ given the phrase $\mathbf { p }$ in two different contexts $\mathbf { x }$ and $\tilde { \bf x }$ .
73
+
74
+ Limitations of CD and ACD. Unfortunately, while CD and ACD try to construct decomposition so that $\beta$ terms represent the contributions solely from a given a phrase, the assigned importance scores by these algorithms do not satisfy the context independence property mathematically. For CD, we see the computation of $\beta$ involves the $\gamma$ term of a specific input sentence in Eq. 2 (see Figure 2(a) for visualization). Similarly, for ACD, the decomposition of the bias term involves the $\gamma$ terms of a specific input sentence. As a result, the $\beta$ terms computed by both algorithms depend on the context of the phrase $\mathbf { p }$ .
75
+
76
+ Given the limitation of prior works, we start by formulating a importance measure of phrases that satisfies both non-additivity and context independence property.
77
+
78
+ # 3.2 CONTEXT-INDEPENDENT IMPORTANCE
79
+
80
+ Given a phrase $\mathbf { p } : = \mathbf { x } _ { i : j }$ appearing in a specific input $\mathbf { x } _ { 1 : T }$ , we first relax our setting and define the importance of a phrase independent of contexts of length $N$ adjacent to it. The $N _ { ☉ }$ -context independent importance is defined as the output difference after masking out the phrase $\mathbf { p }$ , marginalized over all the possible contexts of length $N$ , denoted as $\hat { \mathbf { x } } _ { \delta }$ , around $\mathbf { p }$ in the input $\mathbf { x }$ . For an intuitive example, to evaluate the context independent importance up to one word of very in the sentence The film is very interesting in a sentiment analysis model, we sample some possible adjacent words before and after the word very, and average the prediction difference after some practice of masking the word very. Figure 2 illustrates an example for the sampling and masking steps. The $N$ -context independent importance is formally written as,
81
+
82
+ $$
83
+ \phi ( \mathbf { p } , \hat { \mathbf { x } } ) = \mathbb { E } _ { \mathbf { x } _ { \delta } } [ s ( \mathbf { x } _ { - \delta } ; \hat { \mathbf { x } } _ { \delta } ) - s ( \mathbf { x } _ { - \delta } \backslash \mathbf { p } ; \hat { \mathbf { x } } _ { \delta } ) ] ,
84
+ $$
85
+
86
+ where $\mathbf { x } _ { - \delta }$ denotes the resulting sequence after masking out a context of length $N$ surrounding the phrase $\mathbf { p }$ from the input $\mathbf { x }$ . Here, $\hat { \mathbf { x } } _ { \delta }$ is a sequence of length $N$ sampled from a distribution $p ( \hat { \mathbf { x } } _ { \delta } | \mathbf { x } _ { - \delta } )$ , which is conditioned on the phrase $\mathbf { p }$ as well as other words in the sentence $\mathbf { x }$ . Accordingly, we use $s \big ( \mathbf { x } _ { - \delta } ; \hat { \mathbf { x } } _ { \delta } \big )$ to denote the model prediction score after replacing the masked-out context $\mathbf { x } _ { - \delta }$ with a sampled context $\hat { \mathbf { x } } _ { \delta }$ . We use $\mathbf { x } \backslash \mathbf { p }$ to denote the operation of masking out the phrase $\mathbf { p }$ from the input sentence $\mathbf { x }$ . The specific implementation of this masking out operation varies across different explanation algorithms.
87
+
88
+ Following the notion of $N$ -context independent importance, we define context-independent importance of a phrase $\mathbf { p }$ by increasing the size of the context $N$ to sufficiently large (e.g., length of the sentence). The context independent importance can be equivalently written as follows.
89
+
90
+ $$
91
+ \phi ^ { g } ( \mathbf { p } ) = \mathbb { E } _ { \mathbf { x } } [ s ( \mathbf { x } ) - s ( \mathbf { x } \backslash \mathbf { p } ) | \mathbf { p } \subseteq \mathbf { x } ] .
92
+ $$
93
+
94
+ While it is possible to compute the expectations in Eqs. 3 and 4 by sampling from the training set, it is common that a phrase occurs sparsely in the corpus. Therefore, we approximate the $N$ -context independent importance by sampling from a language model pretrained on the training corpus. The language model helps model a smoothed distribution of $p ( \hat { \mathbf { x } } _ { \delta } | \mathbf { x } _ { - \delta } )$ . In practice, all our explanation algorithms make use of $N$ -context independent importance following Eq. 3, where the size of the neighborhood $N$ is a parameter to be specified to approximate the context independent importance.
95
+
96
+ # 3.3 SAMPLING AND CONTEXTUAL DECOMPOSITION ALGORITHM
97
+
98
+ In CD, the desirable context independence property is compromised when computing decomposition of activation functions, as discussed in Section 3.1. Following the new formulation of contextindependent importance introduced in Section 3.2, we present a simple modification of the contextual decomposition algorithm, and develop a new sampling and contextual decomposition (SCD) algorithm for effective generation of hierarchical explanations.
99
+
100
+ SCD is a layer-wise application of our formulation. The algorithm only modifies the way to decompose activation functions in CD. Specifically, given the output $\mathbf { h } = s ^ { ( l ) } ( \mathbf { x } )$ at an intermediate layer $l$ with the decomposition $\mathbf { h } = \beta + \boldsymbol \gamma$ , we decompose the activation value $\sigma ( \mathbf { h } )$ into $\beta ^ { \prime } + \gamma ^ { \prime }$ , with the following definition:
101
+
102
+ $$
103
+ \beta ^ { \prime } = \mathbb { E } _ { \gamma \sim p ( \gamma | \mathbf { x } _ { - \delta } ) } [ \sigma ( \beta + \gamma ) - \sigma ( \gamma ) ] = \mathbb { E } _ { \mathbf { h } \sim p ( \mathbf { h } | \mathbf { x } _ { - \delta } ) } [ \sigma ( \mathbf { h } ) - \sigma ( \mathbf { h } - \beta ) ] ,
104
+ $$
105
+
106
+ i.e., $\beta ^ { \prime }$ is defined as the expected difference between the activation values when the $\beta$ term is present or absent. $\mathbf { h }$ is computed for different input sequences $\mathbf { x }$ with the contexts of the phrase $\mathbf { p }$ sampled from the distribution $p ( \hat { \mathbf { x } } _ { \delta } | \mathbf { x } _ { - \delta } )$ . Eq. 5 is a layer wise application of Eq. 4, where the masking operation is implemented with calculating $\sigma ( { \bf h } - \beta )$ . Figure 2(b) provides a visualization for the decomposition.
107
+
108
+ Algorithmic Details. To perform sampling, we first pretrain a LSTM language model from two directions on the training data. During sampling, we mask the words that are not conditioned in $p ( \hat { \mathbf { x } } _ { \delta } | \mathbf { x } _ { - \delta } )$ . Some other sampling options include performing Gibbs sampling from a masked language model (Wang et al., 2019). The algorithm then obtain a set of samples $s$ by sampled from the language model. For each sample in $s$ , the algorithm records the input of the $i$ -th non-linear activation function to obtain a sample set $S _ { \mathbf { h } } ^ { ( i ) }$ . During the explanation, the $\beta$ term of the $i$ -th non-linear
109
+
110
+ activation function is calculated as,
111
+
112
+ $$
113
+ \beta ^ { \prime } = \frac { 1 } { | S _ { \mathbf { h } } ^ { ( i ) } | } \sum _ { \mathbf { h } \in S _ { \mathbf { h } } ^ { ( i ) } } [ \sigma ( \mathbf { h } ) - \sigma ( \mathbf { h } - \beta ) ] .
114
+ $$
115
+
116
+ Some neural models such as Transformers involve operations that normalize over different dimensions of a vectors, e.g. layer normalization operations. We observe improved performance by not decomposing the normalizer of these terms when the phrase $\mathbf { p }$ is shorter than a threshold, assuming that the impact of $\mathbf { p }$ to the normalizer can be ignored. Besides, for element-wise multiplication in LSTM models, we treat them in the same way as other non-linear operations and decompose them as Eq. 5, where the decomposition of $\mathbf { h } _ { 1 } { \odot } \mathbf { h } _ { 2 }$ is written as $\beta ^ { \prime } = \mathbb { E } _ { \gamma _ { 1 } , \gamma _ { 2 } } [ ( \beta _ { 1 } + \gamma _ { 1 } ) \odot ( \beta _ { 2 } + \gamma _ { 2 } ) - \gamma _ { 1 } \odot \gamma _ { 2 } ]$ . We avoid decomposing softmax functions.
117
+
118
+ # 3.4 SAMPLING AND OCCLUSION ALGORITHM
119
+
120
+ We show it is possible to fit input occlusion (Li et al., 2016) algorithm into our formulation. Input occlusion algorithm calculate the importance of $\mathbf { p }$ specific to an input sentence $\mathbf { x }$ by observing the prediction difference caused by replacing the phrase $\mathbf { p }$ with padding tokens, noted as $\mathbf { 0 _ { p } }$ ,
121
+
122
+ $$
123
+ \phi ( \mathbf { p } , \mathbf { x } ) = s ( \mathbf { x } ) - s ( \mathbf { x _ { - p } } ; \mathbf { 0 _ { p } } )
124
+ $$
125
+
126
+ It is obvious that the importance score obtained by the input occlusion algorithm is dependent on the all the context words of $\mathbf { p }$ in $\mathbf { x }$ . To eliminate the dependence, we sample the context around the phrase $\mathbf { p }$ . This leads to the Sampling and Occlusion (SOC) algorithm, where the importance of phrases is defined as the expected prediction difference after masking the phrase for each replacement of contexts.
127
+
128
+ Algorithmic Details. Similar to SCD, SOC samples neighboring words $\hat { \mathbf { x } } _ { \delta }$ from a trained language model $p ( \hat { \mathbf { x } } _ { \delta } | \mathbf { x } _ { - \delta } )$ and obtain a set of neighboring word replacement $s$ . For each replacement $\hat { \mathbf { x } } _ { \delta } \in S$ , the algorithm computes the model prediction differences after replacing the phrase $\mathbf { p }$ with padding tokens. The importance $\phi ( \mathbf { p } , \mathbf { x } )$ is then calculated as the average prediction differences. Formally, the algorithm calculates,
129
+
130
+ $$
131
+ \phi ( \mathbf { p } , \mathbf { x } ) = \frac { 1 } { | \mathcal { S } | } \sum _ { \hat { \mathbf { x } } _ { \delta } \in \mathcal { S } } [ s ( \mathbf { x } _ { - \delta } ; \hat { \mathbf { x } } _ { \delta } ) - s ( \mathbf { x } _ { - \{ \delta , \mathbf { p } \} } ; \hat { \mathbf { x } } _ { \delta } ; \mathbf { 0 } _ { \mathbf { p } } ) ] .
132
+ $$
133
+
134
+ Sampling and Occlusion is advantageous in that it is model-agnostic and easy to implement. The input occlusion algorithm inside Eq. 8 can also be replaced with other measure of phrase importance, such as Shapley values (Shapley, 1953), with the phrase $\mathbf { p }$ and other input words considered as players. We expect it is helpful for longer sequences when there are multiple evidences outside the context region saturating the prediction.
135
+
136
+ # 4 EXPERIMENTS
137
+
138
+ We evaluate explanation algorithms on both shallow LSTM models and deep fine-tuned BERT Transformer (Devlin et al., 2018) models. We use two sentiment analysis datasets, namely the Stanford Sentiment Treebank-2 (SST-2) dataset (Socher et al., 2013) and the Yelp Sentiment Polarity dataset (Zhang et al., 2015), as well as TACRED relation extraction dataset (Zhang et al., 2017) for experiments. The two tasks are modeled as binary and multi-class classification tasks respectively. For the SST-2 dataset, while it provides sentiment polarity scores for all the phrases on the nodes of the constituency parsing trees, we do not train our model on these phrases, and use these scores as the evaluation for the phrase level explanations. Our Transformer model is fine-tuned from pretrained BERT (Devlin et al., 2018) model. See Appendix A for other implementation details.
139
+
140
+ Compared Methods. We compare our explanation algorithm with following baselines: Input occlusion (Li et al., 2016) and Integrated Gradient+SHAP (GradSHAP) (Lundberg & Lee, 2017); two algorithms applied for hierarchical explanations, namely Contextual Decomposition (CD) (Murdoch et al., 2018), and Agglomerative Contextual Decomposition (ACD) (Singh et al., 2019). We
141
+
142
+ <table><tr><td>Dataset</td><td colspan="3">SST-2</td><td colspan="2">Yelp Polarity</td><td colspan="2">TACRED</td></tr><tr><td>Model</td><td colspan="2">BERT</td><td colspan="2">LSTM</td><td>BERT LSTM</td><td>BERT</td><td>LSTM</td></tr><tr><td>Metric</td><td>word p</td><td>phrase p word p</td><td>phrase p</td><td>word p</td><td>word p</td><td>word p</td><td>word p</td></tr><tr><td>Input Occlusion</td><td>0.2229</td><td>0.4081 0.6489</td><td>0.4899</td><td>0.3781</td><td>0.6935</td><td>0.7646</td><td>0.5756</td></tr><tr><td>Direct Feed</td><td>0.2005</td><td>0.4889 0.6798</td><td>0.5588</td><td>0.3875</td><td>0.7905</td><td>0.1986</td><td>0.5771</td></tr><tr><td>GradSHAP</td><td>0.5073</td><td>0.5991</td><td>0.7024 0.5402</td><td>0.5791</td><td>0.7388</td><td>0.2965</td><td>0.6651</td></tr><tr><td>CD</td><td>0.2334</td><td>0.3068</td><td>0.6231 0.4727</td><td>0.2645</td><td>0.7451</td><td>0.0052</td><td>0.6508</td></tr><tr><td>ACD</td><td>0.3053</td><td>0.3698</td><td>0.2495 0.1856</td><td>0.3010</td><td>0.5024</td><td>0.2027</td><td>0.0291</td></tr><tr><td>Statistic</td><td>0.5223</td><td>0.4741</td><td>0.7271 0.4959</td><td>0.7294</td><td>0.9094</td><td>0.5324</td><td>0.7662</td></tr><tr><td>SCD</td><td>0.5481</td><td>0.6015</td><td>0.7151 0.5664</td><td>0.7180</td><td>0.7793</td><td>0.7980</td><td>0.6823</td></tr><tr><td>sOC</td><td>0.6265</td><td>0.6628</td><td>0.7226 0.5649</td><td>0.6971</td><td>0.7683</td><td>0.7982</td><td>0.7354</td></tr></table>
143
+
144
+ Table 1: Correlation between word & phrase importance attribution and linear model coefficients & SST-2 human annotations, achieved by baselines and our explanation algorithms.
145
+
146
+ ![](images/9a177001f004c56a380bde08aecef3e1f99667c15a45fe37c0ab41b1af22f9f4.jpg)
147
+ Figure 3: Hierarchical Explanation of a prediction by the BERT Transformer model on SST-2. We generate explanations for all the phrases on the truncated constituency parsing tree, with positive sentiments shown in red and negative sentiments shown in blue. We see our method identify positive segments in the overall negative sentence, such as “a breath of fresh air”
148
+
149
+ also compare with a naive however neglected baseline in prior literature, which directly feed the given phrase to the model and take the prediction score as the importance of the phrase, noted as Direct Feed. In BERT models, Direct Feed is implemented by turning off the attention mask of words except the [CLS] token and the phrase to be explained. For our algorithms, we list the performance of corpus statistic based approach (Statistic) for approximating context independent importance in Eq. 3, Sampling and Contextual Decomposition (SCD), and Sampling and Occlusion (SOC) algorithm. In section 4.4, we also consider padding instead of sampling the context words in SCD and SOC.
150
+
151
+ # 4.1 HIERARCHICAL VISUALIZATION OF IMPORTANT WORDS AND PHRASES
152
+
153
+ We verify the performance of our algorithms in identifying important words and phrases captured by models. We follow the quantitative evaluation protocol proposed in CD algorithm (Murdoch et al., 2018) for evaluating word-level explanations, which computes Pearson correlation between the coefficients learned by a linear bag-of-words model and the importance scores attributed by explanation methods, also noted as the word $\rho$ . When the linear model is accurate, its coefficients could stand for general importance of words. For evaluating phrase level explanations, we notice the SST-2 dataset provides human annotated real-valued sentiment polarity for each phrase on constituency parsing trees. We generate explanations for each phrase on the parsing tree and evaluate the Pearson correlation between the ground truth scores and the importance scores assigned for phrases, also noted as the phrase $\rho$ . We draw $K = 2 0$ samples for $N = 1 0$ words adjacent to the phrase to be explained at the sampling step in our SOC and SCD algorithms. The parameter setting is trade-off between the efficiency and performance. See Section 4.4 for detailed parameter analysis.
154
+
155
+ Table 1 shows word $\rho$ and phrase $\rho$ achieved by our algorithms and competitors. Generally, explanation algorithms that follow our formulations achieve highest word $\rho$ and phrase $\rho$ for all the datasets and models. SOC and SCD perform robustly on the deep Transformer model, achieving higher word $\rho$ and phrase $\rho$ than input occlusion and contextual decomposition algorithms by a large margin. We see the simple Direct Feed method provide promising results on shallow LSTM networks, but fail in deeper Transformer models. The statistic based approximation of the context independent importance, which do not employ a trained sampler, yields competitive words $\rho$ but low phrase $\rho$ . Our analysis show that it is common that a long phrase does not exist in previously seen examples. In this case, phrase $\rho$ achieved by statistic based approximation is pushed towards that of the input occlusion algorithm.
156
+
157
+ ![](images/3bc16530c3a8b2ee687641f1b9bf78f2fe68e95e598a91dbf0d47fe12ca29295.jpg)
158
+ Figure 4: Extracting phrase-level classification patterns from LSTM relation extraction model with SCD. Red indicate evidence for predicting the class, and blue indicate distractor for predicting the class. By applying the agglomerative clustering algorithm and defining a threshold score, we effecively extract “a sister, O-Person” as a classification rule for the relation per:siblings. However, we see CD fails in this example.
159
+
160
+ Qualitative study also shows that our explanation visualize complicated compositional semantics captured by models, such as positive segments in the negative example, and adversative conjunctions connected with “but”. We present an example explanation provided by SOC algorithm in Figure 3 and Appendix.
161
+
162
+ # 4.2 EXPLANATION AS CLASSIFICATION PATTERN EXTRACTION FROM MODELS
163
+
164
+ We show our explanation algorithm is a nature fit for extracting phrase level classification rules from neural classifiers. With the agglomerative clustering algorithm in Singh et al. (2019), our explanation effectively identify phrase-level classification patterns without evaluating all possible phrases in the sentence even when a predefined hierarchy does not exist. Figure 4 show an example of automatically constructed hierarchy and extracted classification rules in an example in the TACRED dataset.
165
+
166
+ # 4.3 ENHANCING HUMAN TRUST OF MODELS
167
+
168
+ We follow the human evaluation protocol in Singh et al. (2019) and study whether our explanations help subjects to better trust model predictions. We ask subjects to rank the provided visualizations based on how they would like to trust the model. For the SST-2 dataset, we show subjects the predictions of the fine-tuned BERT model, and the explanations generated by SOC, SCD, ACD and GradSHAP algorithms for phrases. The phrase polarities are visualized in a hierarchy with the provided parsing tree of each sentence in the dataset. For the TACRED dataset, we show the explanations provided by SOC, SCD, CD and Direct Feed algorithms on the LSTM model. We binarilize the importance of a phrase by calculating the difference between its importance to the predicted class and the its top importance to other classes, and the hierarchies are constructed automatically with agglomerative clustering (Singh et al., 2019). Figure 5 shows average ranking score of explanations, where 4 for the best, and 1 for the worst. On the SST-2 dataset, SOC achieves significantly higher ranking score than ACD and GradSHAP, showing a $p$ -value less than 0.05 and 0.001 respectively. On the TACRED dataset, SCD achieve the best ranking score, showing significantly better ranking score than CD and Direct Feed with a $p$ -value less than $1 0 ^ { - 6 }$ .
169
+
170
+ ![](images/775be1ede204bf81cc10912bbf2f8706604b06944e5de78b00d7c65c1bc287b4.jpg)
171
+ Figure 5: Results for human evaluation on the Transformer model trained on SST-2 sentiment analysis dataset (between SOC, SCD, ACD, GradSHAP) and the LSTM model trained on TACRED relation extraction dataset (between SOC, SCD, CD, DirectFeed).
172
+
173
+ ![](images/d4b0eaf040bf9369102c4d3e9a3a0d410b422bd8b1571dd47f7cba8c7141c19d.jpg)
174
+ Figure 6: Word $\rho$ and phrase $\rho$ curves as the size of the context region $N$ and the number of samples $K$ change on the BERT model trained on the SST-2 dataset. Dash line notes for the performance of padding the context words instead of sampling.
175
+
176
+ # 4.4 PARAMETER ANALYSIS
177
+
178
+ Both SOC and SCD algorithms require specifying the size of the context region $N$ and the number of samples $K$ . In Figure 6 (also Figure 7 in Appendix) we show the impact of these parameters. We also plot the performance curves when we pad the contexts instead of sampling. We see sampling the context achieves much better performance than padding the context given a fixed size of the context region $N$ . We also see word $\rho$ and phrase $\rho$ increase as the number of samples $K$ increases. The overall performance also increases as the size of the context region $N$ increases at the early stage, and saturates when $N$ grows large, which is consistent with our hypothesis that words or phrases usually do not interact with the words that are far away them in the input.
179
+
180
+ # 5 RELATED WORKS
181
+
182
+ Interpretability of neural networks has been studied with vairous techniques, including probing learned features with auxiliary tasks (Tenney et al., 2019), or designing models with inherent interpretability (Bahdanau et al., 2015; Lei et al., 2016). A major line of work, local explanation algorithms, explains predictions by assigning importance scores for input features. This line of work include input occlusion (Kad´ ar et al., 2017), gradient based algorithms (Simonyan et al., ´ 2013; Hechtlinger, 2016; Ancona et al., 2017), additive feature attribution methods (Ribeiro et al., 2016; Shrikumar et al., 2017; Sundararajan et al., 2017), among which Shapley value based approaches (Lundberg & Lee, 2017) have been studied intensively because of its good mathematical properties. In the context of input occlusion explanations, researchers also study how to efficiently marginalize over input features to be explained (Zintgraf et al., 2017; Chang et al., 2019), while our research show extra focus could be placed on marginalizing over contexts. Regarding explanations of models with structured inputs, Chen et al. (2019) propose L-Shapley and C-Shapley for efficient approximation of Shapley values, with a similar hypothesis with us that the importance of a word is usually only strongly dependent on its neighboring contexts. Chen et al. (2018) propose a feature selection based approach for explanation in an information theoretic perspective.
183
+
184
+ On the other hand, global explanation algorithms (Guidotti et al., 2018) have also been studied for identifying generally important features, such as Feature Importance Ranking Measure (Zien et al., 2009), Accumulated Local Effects (Apley, 2016), while usually restricted in the domain of tabular data. We note that the context independence property in our proposed methods implies we study hierarchical explanation as a global explanation problem (Guidotti et al., 2018). Compared with local explanation algorithms, global explanation algorithms are less studied for explaining individual predictions (Poerner et al., 2018), because they reveal the average behavior of models. However, with a hierarchical organization, we show global explanations are also powerful at explaining individual predictions, achieving better human evaluation scores and could explain compositional semantics where local explanation algorithms such as additive feature attribution algorithms totally fail. Moreover, we note that the use of explanation algorithms is not exclusive; we may apply explanation algorithms of different categories to make a more holistic explanation of model predictions.
185
+
186
+ Another closely related field is statistical feature interaction detection (Hooker, 2004; Sorokina et al., 2008; Tsang et al., 2017) from learned models, which usually focus on tabular data only. An exception is (Tsang et al., 2018), which also studies word interactions in neural sequence model predictions, but does not study interactions in a phrase level.
187
+
188
+ # 6 CONCLUSION
189
+
190
+ In this work, we identify two desirable properties for informative hierarchical explanations of predictions, namely the non-additivity and context-independence. We propose a formulation to quantify context independent importance of words and phrases that satisfies the properties above. We revisit the prior line of works on contextual decomposition algorithms, and propose Sampling and Contextual Decomposition (SCD) algorithm and Sampling and Occlusion algorithm (SOC). Experiments on multiple datasets and models show that our explanation algorithms generate informative hierarchical explanations, help to extract classification rules from models, and enhance human trust of models.
191
+
192
+ # ACKNOWLEDGEMENTS
193
+
194
+ This research is based upon work supported in part by NSF SMA 18-29268 and JP Morgan AI Research Award. We would like to thank all the collaborators in USC INK research lab for their constructive feedback on the work.
195
+
196
+ # REFERENCES
197
+
198
+ Marco Ancona, Enea Ceolini, Cengiz Oztireli, and Markus Gross. Towards better understanding of ¨ gradient-based attribution methods for deep neural networks. arXiv preprint arXiv:1711.06104, 2017.
199
+
200
+ Daniel W Apley. Visualizing the effects of predictor variables in black box supervised learning models. arXiv preprint arXiv:1612.08468, 2016.
201
+
202
+ Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings, 2015. URL http://arxiv.org/abs/1409.0473.
203
+
204
+ Alexander Binder, Gregoire Montavon, Sebastian Lapuschkin, Klaus-Robert M ´ uller, and Wojciech ¨ Samek. Layer-wise relevance propagation for neural networks with local renormalization layers. In International Conference on Artificial Neural Networks, pp. 63–71. Springer, 2016.
205
+
206
+ Chun-Hao Chang, Elliot Creager, Anna Goldenberg, and David Duvenaud. Explaining image classifiers by counterfactual generation. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id=B1MXz20cYQ.
207
+
208
+ Jianbo Chen, Le Song, Martin J. Wainwright, and Michael I. Jordan. Learning to explain: An information-theoretic perspective on model interpretation. In ICML, 2018.
209
+
210
+ Jianbo Chen, Le Song, Martin J. Wainwright, and Michael I. Jordan. L-shapley and c-shapley: Efficient model interpretation for structured data. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ S1E3Ko09F7.
211
+
212
+ Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018.
213
+
214
+ Katsushige Fujimoto, Ivan Kojadinovic, and Jean-Luc Marichal. Axiomatic characterizations of probabilistic and cardinal-probabilistic interaction indices. Games and Economic Behavior, 55 (1):72–99, 2006.
215
+
216
+ Riccardo Guidotti, Anna Monreale, Salvatore Ruggieri, Franco Turini, Fosca Giannotti, and Dino Pedreschi. A survey of methods for explaining black box models. ACM computing surveys (CSUR), 51(5):93, 2018.
217
+
218
+ Yotam Hechtlinger. Interpretation of prediction models using the input gradient. arXiv preprint arXiv:1611.07634, 2016.
219
+
220
+ Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997.
221
+
222
+ Giles Hooker. Discovering additive structure in black box functions. In Proceedings of the tenth ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 575–580, 2004.
223
+
224
+ Akos Kad´ ar, Grzegorz Chrupała, and Afra Alishahi. Representation of linguistic form and function´ in recurrent neural networks. Computational Linguistics, 43(4):761–780, 2017.
225
+
226
+ Tao Lei, Regina Barzilay, and Tommi S. Jaakkola. Rationalizing neural predictions. In EMNLP, 2016.
227
+
228
+ Jiwei Li, Will Monroe, and Dan Jurafsky. Understanding neural networks through representation erasure. arXiv preprint arXiv:1612.08220, 2016.
229
+
230
+ Hui Liu, Qingyu Yin, and William Yang Wang. Towards explainable NLP: A generative explanation framework for text classification. In Proceedings of the 57th Conference of the Association for Computational Linguistics, pp. 5570–5581, Florence, Italy, July 2019a. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/P19-1560.
231
+
232
+ Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692, 2019b.
233
+
234
+ Scott M Lundberg and Su-In Lee. A unified approach to interpreting model predictions. In Advances in Neural Information Processing Systems, pp. 4765–4774, 2017.
235
+
236
+ Sina Mohseni, Niloofar Zarei, and Eric D Ragan. A survey of evaluation methods and measures for interpretable machine learning. arXiv preprint arXiv:1811.11839, 2018.
237
+
238
+ W James Murdoch, Peter J Liu, and Bin Yu. Beyond word importance: Contextual decomposition to extract interactions from lstms. In ICLR, 2018.
239
+
240
+ Jeffrey Pennington, Richard Socher, and Christopher Manning. Glove: Global vectors for word representation. In Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP), pp. 1532–1543, 2014.
241
+
242
+ Matthew E Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. Deep contextualized word representations. arXiv preprint arXiv:1802.05365, 2018.
243
+
244
+ Nina Poerner, Hinrich Schutze, and Benjamin Roth. Evaluating neural network explanation methods ¨ using hybrid documents and morphological agreement. arXiv preprint arXiv:1801.06422, 2018.
245
+
246
+ 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, San Francisco, CA, USA, August 13-17, 2016, pp. 1135–1144, 2016.
247
+
248
+ Lloyd S Shapley. A value for n-person games. Contributions to the Theory of Games, 2(28):307– 317, 1953.
249
+
250
+ Avanti Shrikumar, Peyton Greenside, and Anshul Kundaje. Learning important features through propagating activation differences. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 3145–3153. JMLR. org, 2017.
251
+
252
+ Karen Simonyan, Andrea Vedaldi, and Andrew Zisserman. Deep inside convolutional networks: Visualising image classification models and saliency maps. arXiv preprint arXiv:1312.6034, 2013.
253
+
254
+ Chandan Singh, W James Murdoch, and Bin Yu. Hierarchical interpretations for neural network predictions. In ICLR, 2019.
255
+
256
+ Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew $\mathrm { N g }$ , and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 conference on empirical methods in natural language processing, pp. 1631–1642, 2013.
257
+
258
+ Daria Sorokina, Rich Caruana, Mirek Riedewald, and Daniel Fink. Detecting statistical interactions with additive groves of trees. In Proceedings of the 25th international conference on Machine learning, pp. 1000–1007. ACM, 2008.
259
+
260
+ Mukund Sundararajan, Ankur Taly, and Qiqi Yan. Axiomatic attribution for deep networks. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 3319– 3328. JMLR. org, 2017.
261
+
262
+ Ian Tenney, Dipanjan Das, and Ellie Pavlick. Bert rediscovers the classical nlp pipeline. In Association for Computational Linguistics, 2019. URL https://arxiv.org/abs/1905.05950.
263
+
264
+ Michael Tsang, Dehua Cheng, and Yan Liu. Detecting statistical interactions from neural network weights. arXiv preprint arXiv:1705.04977, 2017.
265
+
266
+ Michael Tsang, Youbang Sun, Dongxu Ren, and Yan Liu. Can i trust you more? model-agnostic hierarchical explanations. ArXiv, abs/1812.04801, 2018.
267
+
268
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pp. 5998–6008, 2017.
269
+
270
+ Alex Wang, Kyunghyun Cho, and CIFAR Azrieli Global Scholar. Bert has a mouth, and it must speak: Bert as a markov random field language model. NAACL HLT 2019, pp. 30, 2019.
271
+
272
+ Xiang Zhang, Junbo Zhao, and Yann LeCun. Character-level convolutional networks for text classification. In Advances in neural information processing systems, pp. 649–657, 2015.
273
+
274
+ Yuhao Zhang, Victor Zhong, Danqi Chen, Gabor Angeli, and Christopher D. Manning. Positionaware attention and supervised data improve slot filling. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing (EMNLP 2017), pp. 35–45, 2017. URL https://nlp.stanford.edu/pubs/zhang2017tacred.pdf.
275
+
276
+ Alexander Zien, Nicole Kramer, S ¨ oren Sonnenburg, and Gunnar R ¨ atsch. The feature importance ¨ ranking measure. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pp. 694–709. Springer, 2009.
277
+
278
+ Luisa M Zintgraf, Taco S Cohen, Tameem Adel, and Max Welling. Visualizing deep neural network decisions: Prediction difference analysis. In ICLR, 2017.
279
+
280
+ ![](images/600bae4ad06a059a70d2ecd50fa6120a3fd524391412564b805e3dd1e7115958.jpg)
281
+ Figure 7: Word $\rho$ and phrase $\rho$ curve as the size of the context region $N$ and the number of samples $K$ change on LSTM trained on the SST-2 dataset. Dash line notes for the performance of padding the context words instead of sampling.
282
+
283
+ # A IMPLEMENTATION DETAILS
284
+
285
+ Our LSTM classifiers use 1 layer unidirectional LSTM and the number of hidden units is set to 128, 500, and 300 for SST-2, Yelp, and TACRED dataset respectively. For all models, we load the pretrained 300-dimensional Glove word vectors (Pennington et al., 2014). The language model sampler is also built on LSTM and have the same parameter settings as the classifiers. Our Transformer models are fine-tuned from pretrained BERT models (Devlin et al., 2018), which have 12 layers and 768 hidden units of per representation. On three datasets, LSTM models achieve $82 \%$ accuracy, $9 5 \%$ accuracy, and 0.64 F1 score on average. The fine-tuned BERT models achieve $92 \%$ accuracy, $96 \%$ accuracy, and 0.68 F1 score on average. We use the same parameter settings between LSTM classifiers and language models on three datasets. Following Murdoch et al. (2018), we randomly sample a subset (set to 500 instances) of sentences of length at most 40 words for explanation on Yelp dataset, and also for TACRED dataset. On TACRED dataset, we generate explanations only for correctly predicted instances with a label other than no relation.
286
+
287
+ # B PERFORMANCE ON ADVERSARIAL MODELS
288
+
289
+ For computing context independent importance of a phrase, an intuitive and simple alternative approach, which is nevertheless neglected in prior literature, is to only feed the input to the model and treat the prediction score as the explanation. In Table 1, while the score of the Direct Feed is lower than that of the best performing algorithms, the score is rather competitive.
290
+
291
+ The potential risk of this explanation is that it assumes model performs reasonably on incomplete sentence fragments that are significantly out of the data distribution. As a result, the explanation of short phrases can be misleading. To simulate the situation, we train a LSTM model on inversed labels on isolate words, in addition to the original training instances. The model could achieve the same accuracy as the original LSTM model. However, the word $\rho$ and the phrase $\rho$ of Direct Feed drop by a large margin, showing a word $\rho$ of -0.38 and 0.09. SOC and SCD are still robust on the adverse LSTM model, both showing a word $\rho$ and phrase $\rho$ of more than 0.60 and 0.55.
292
+
293
+ The masking operation could also cause performance drop because the masked sentence can be out of data distribution when explaining long phrases. For SOC, the risk can be resolved by implementing the masking operation of the phrase $\mathbf { p }$ by another round of sampling from a language model conditioned on its context $\mathbf { x } _ { - \mathbf { p } }$ , but we do not find empirical evidence showing that it improves performance.
294
+
295
+ C EXPLANATION HEATMAPS
296
+
297
+ Table 2: Correlation between averaged word & phrase importance attribution and linear model coefficients and human annotations over all 2210 test instances in SST-2 dataset. The relative performance is similar to the case without score averaging as shown in Table 1.
298
+
299
+ <table><tr><td>Model</td><td colspan="2">BERT</td><td colspan="2">LSTM</td></tr><tr><td>Metric</td><td>word pavg</td><td>phrase pavg</td><td>word pavg</td><td>phrase pavg</td></tr><tr><td>Input Occlusion</td><td>0.2947</td><td>0.4365</td><td>0.7150</td><td>0.4968</td></tr><tr><td>GradSHAP</td><td>0.5444</td><td>0.6078</td><td>0.7360</td><td>0.5449</td></tr><tr><td>CD</td><td>0.3642</td><td>0.3755</td><td>0.6962</td><td>0.4777</td></tr><tr><td>ACD</td><td>0.3023</td><td>0.3913</td><td>0.3210</td><td>0.2110</td></tr><tr><td>SCD</td><td>0.5601</td><td>0.6072</td><td>0.7348</td><td>0.5685</td></tr><tr><td>SOC</td><td>0.6282</td><td>0.6706</td><td>0.7430</td><td>0.5675</td></tr></table>
300
+
301
+ ![](images/e8b4f32408df2f1b030936982ece21d34f16bbbc518325d9ecd5d5daad1e7f74.jpg)
302
+ Figure 8: More examples about rule extraction from LSTM models trained on TACRED relation extraction dataset with SOC. Red indicate evidence for predicting the class, and blue indicate distractor for predicting the class. By applying the agglomerative clustering algorithm and defining a threshold score, we effectively extract classification rules from LSTM models. The ground truth label noted on the top
303
+
304
+ Table 3: Phrase-level classification patterns extracted from models. We show the results of SCD and SOC respectively for the SST-2 and the TACRED dataset.
305
+
306
+ <table><tr><td rowspan=1 colspan=1>Dataset</td><td rowspan=1 colspan=1>Label</td><td rowspan=1 colspan=1>Pattern</td></tr><tr><td rowspan=1 colspan=1>SST-2</td><td rowspan=1 colspan=1>PositiveNegative</td><td rowspan=1 colspan=1>frighteningly evocative; insight and honestyneither funny nor provocative; kill the suspense</td></tr><tr><td rowspan=1 colspan=1>TACRED</td><td rowspan=1 colspan=1>person:ageorganization:top-memberperson:origin</td><td rowspan=1 colspan=1>[PERSON],[NUMBER], was; a [NUMBER] manchief engineer of the [ORGANIZATION][Nationality] citizen; tribal member from [COUNTRY]</td></tr></table>
307
+
308
+ ![](images/ebbb122c87e8fe4ddab4b2afc711ab36a4142275691f31d787b01508f00073ed.jpg)
309
+
310
+ ![](images/5b87050b839727ad8d24a7779bc8f4d652fd4bb997b56e0cbaf723eafb9f9090.jpg)
311
+
312
+ ![](images/953c5224ded7e8b4e45151ba2414ae85141a4010e926886359f1659336d7bd0f.jpg)
313
+
314
+ ![](images/15ec0991ea99fa3d3c5c11c725104d79f4758cfb788eef1b8accc4628de5bc9d.jpg)
315
+ Figure 9: Explanation heatmaps generated by SOC, SCD, CD, and GradSHAP on a negatively predicted sentence by BERT Transformer model in SST-2 dataset. Only SOC and SCD captures adversarial conjunction connected by “but”.
parse/train/BkxRRkSKwr/BkxRRkSKwr_content_list.json ADDED
@@ -0,0 +1,1689 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "TOWARDS HIERARCHICAL IMPORTANCE ATTRIBUTION: EXPLAINING COMPOSITIONAL SEMANTICS FOR NEURAL SEQUENCE MODELS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 98,
9
+ 823,
10
+ 172
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Xisen $\\mathbf { J i n } \\ S$ , Zhongyu Wei†, Junyi $\\mathbf { D } \\mathbf { u } ^ { \\ S }$ , Xiangyang Xue†, Xiang Ren§ ",
17
+ "bbox": [
18
+ 186,
19
+ 194,
20
+ 656,
21
+ 213
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "§University of Southern California \n†Fudan University \n{xisenjin, junyidu, xiangren}@usc.edu \n{zywei, xyxue}@fudan.edu.cn ",
28
+ "bbox": [
29
+ 184,
30
+ 226,
31
+ 544,
32
+ 282
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "ABSTRACT ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 454,
42
+ 319,
43
+ 544,
44
+ 333
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "The impressive performance of neural networks on natural language processing tasks attributes to their ability to model complicated word and phrase compositions. To explain how the model handles semantic compositions, we study hierarchical explanation of neural network predictions. We identify non-additivity and context independent importance attributions within hierarchies as two desirable properties for highlighting word and phrase compositions. We show some prior efforts on hierarchical explanations, e.g. contextual decomposition, do not satisfy the desired properties mathematically, leading to inconsistent explanation quality in different models. In this paper, we start by proposing a formal and general way to quantify the importance of each word and phrase. Following the formulation, we propose Sampling and Contextual Decomposition (SCD) algorithm and Sampling and Occlusion (SOC) algorithm. Human and metrics evaluation on both LSTM models and BERT Transformer models on multiple datasets show that our algorithms outperform prior hierarchical explanation algorithms. Our algorithms help to visualize semantic composition captured by models, extract classification rules and improve human trust of models1. ",
51
+ "bbox": [
52
+ 233,
53
+ 352,
54
+ 764,
55
+ 573
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 INTRODUCTION ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 178,
65
+ 602,
66
+ 336,
67
+ 617
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Recent advances in deep neural networks have led to impressive results on a range of natural language processing (NLP) tasks, by learning latent, compositional vector representations of text data (Peters et al., 2018; Devlin et al., 2018; Liu et al., 2019b). However, interpretability of the predictions given by these complex, “black box” models has always been a limiting factor for use cases that require explanations of the features involved in modeling (e.g., words and phrases) (Guidotti et al., 2018; Ribeiro et al., 2016). Prior efforts on enhancing model interpretability have focused on either constructing models with intrinsically interpretable structures (Bahdanau et al., 2015; Liu et al., 2019a), or developing post-hoc explanation algorithms which can explain model predictions without elucidating the mechanisms by which model works (Mohseni et al., 2018; Guidotti et al., 2018). Among these work, post-hoc explanation has come to the fore as they can operate over a variety of trained models while not affecting predictive performance of models. Towards post-hoc explanation, a major line of work, additive feature attribution methods (Lundberg & Lee, 2017; Ribeiro et al., 2016; Binder et al., 2016; Shrikumar et al., 2017), explain a model prediction by assigning importance scores to individual input variables. However, these methods are not ideal for explaining phrase-level importance, as phrase importance is often a non-linear combination of the importance of the words in the phrase. Contextual decomposition (CD) (Murdoch et al., 2018) and its hierarchical extension (Singh et al., 2019) go beyond the additive assumption and compute the contribution solely made by a word/phrase to the model prediction (i.e., individual contribution), by decomposing the output variables of the neural network at each layer. Using the individual contribution scores so derived, these algorithms generate hierarchical explanation on how the model captures compositional semantics (e.g., stress or negation) in making predictions (see Figure 1 for example). ",
74
+ "bbox": [
75
+ 174,
76
+ 633,
77
+ 825,
78
+ 897
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "image",
84
+ "img_path": "images/36a475e153d4db2743b2868470a67332f7aec2ae745d0c95462048eb95cf32a5.jpg",
85
+ "image_caption": [
86
+ "Figure 1: Different score attribution algorithms. (a) Input occlusion assigns a negative score for the word “interesting”, as the sentiment of the phrase becomes less negative after removing “interesting” from the original sentence. (b) Additive attributions assign importance scores for words “not” and “interesting” by linearly distributing contribution score of “not interesting“, exemplified with Shapley Values (Shapley, 1953). Intuitively, only (c) Hierarchical explanations highlight the negative compositional effect between the words “not” and “interesting”. "
87
+ ],
88
+ "image_footnote": [],
89
+ "bbox": [
90
+ 214,
91
+ 117,
92
+ 776,
93
+ 190
94
+ ],
95
+ "page_idx": 1
96
+ },
97
+ {
98
+ "type": "text",
99
+ "text": "",
100
+ "bbox": [
101
+ 174,
102
+ 319,
103
+ 821,
104
+ 348
105
+ ],
106
+ "page_idx": 1
107
+ },
108
+ {
109
+ "type": "text",
110
+ "text": "However, despite contextual decomposition methods have achieved good results in practice, what reveals extra importance that emerge from combining two phrases has not been well studied. As a result, prior lines of work on contextual decomposition have focused on exploring model-specific decompositions based on their performance on visualizations. We identify the extra importance from combining two phrases can be quantified by studying how the importance of the combined phrase differs from the sum of the importance of the two component phrases on its own. Similar strategies have been studied in game theory for quantifying the surplus from combining two groups of players (Fujimoto et al., 2006). Following the definition above, the key challenge is to formulate the importance of a phrase on it own, i.e., context independent importance of a phrase. However, we show contextual decomposition do not satisfy this context independence property mathematically. ",
111
+ "bbox": [
112
+ 174,
113
+ 354,
114
+ 825,
115
+ 494
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "To this end, we propose a formal way to quantify the importance of each individual word/phrase, and develop effective algorithms for generating hierarchical explanations based on the new formulation. To mathematically formalize and efficiently approximate context independent importance, we formulate $N$ -context independent importance of a phrase, defined as the difference of model output after masking out the phrase, marginalized over all possible $N$ words surrounding the phrase in the sentence. We propose two explanation algorithms according to our formulation, namely the Sampling and Contextual Decomposition algorithm (SCD), which overcomes the weakness of contextual decomposition algorithms, and the Sampling and OCclusion algorithm (SOC), which is simple, model-agnostic, and performs competitively against prior lines of algorithms. We experiment with both LSTM and fine-tuned Transformer models to evaluate the proposed methods. Quantitative studies involving automatic metrics and human evaluation on sentiment analysis and relation extraction tasks show that our algorithms consistently outperform competitors in the quality of explanations. Our algorithms manage to provide hierarchical visualization of compositional semantics captured by models, extract classification rules from models, and help users to trust neural networks predictions. ",
122
+ "bbox": [
123
+ 174,
124
+ 501,
125
+ 825,
126
+ 708
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "In summary, our work makes the following contributions: (1) we identify the key challenges in generating post-hoc hierarchical explanations and propose a mathematically sound way to quantify context independent importance of words and phrases for generating hierarchical explanations; (2) we extend previous post-hoc explanation algorithm based on the new formulation of $N$ -context independent importance and develop two effective hierarchical explanation algorithms; and (3) experiments demonstrate that the proposed explanation algorithms consistently outperform the compared methods (with both LSTM and Transformer as base models) over several datasets and models. ",
133
+ "bbox": [
134
+ 174,
135
+ 717,
136
+ 825,
137
+ 814
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "2 PRELIMINARIES ",
144
+ "text_level": 1,
145
+ "bbox": [
146
+ 176,
147
+ 835,
148
+ 339,
149
+ 852
150
+ ],
151
+ "page_idx": 1
152
+ },
153
+ {
154
+ "type": "text",
155
+ "text": "2.1 POST-HOC EXPLANATIONS OF NEURAL SEQUENCE MODELS ",
156
+ "text_level": 1,
157
+ "bbox": [
158
+ 174,
159
+ 868,
160
+ 632,
161
+ 883
162
+ ],
163
+ "page_idx": 1
164
+ },
165
+ {
166
+ "type": "text",
167
+ "text": "We consider a sequence of low-dimensional word embeddings $\\mathbf { x } _ { 1 : T } : = ( \\mathbf { x } _ { 1 } , \\mathbf { x } _ { 2 } , . . . , \\mathbf { x } _ { T } )$ , or denoted as $\\mathbf { x }$ for brevity, as the input to a neural sequence model, such as standard RNNs, LSTM (Hochreiter & Schmidhuber, 1997) and Transformers (Vaswani et al., 2017). These neural models extract hidden representations $\\mathbf { h } _ { 1 : T }$ from the input sequence $\\mathbf { x }$ , and feed these hidden representations to a prediction layer to generate prediction scores in the label space (e.g., sentiment polarity of a sentence). For LSTM, we use the last hidden state $\\mathbf { h } _ { T }$ to give unnormalized prediction scores $s ( \\mathbf { x } ) \\in \\mathbb { R } ^ { d _ { c } }$ over $d _ { c }$ label classes as follows. ",
168
+ "bbox": [
169
+ 174,
170
+ 895,
171
+ 820,
172
+ 924
173
+ ],
174
+ "page_idx": 1
175
+ },
176
+ {
177
+ "type": "text",
178
+ "text": "",
179
+ "bbox": [
180
+ 173,
181
+ 103,
182
+ 825,
183
+ 172
184
+ ],
185
+ "page_idx": 2
186
+ },
187
+ {
188
+ "type": "equation",
189
+ "img_path": "images/b7c07f2bc0bca3c36a45ff4c6cb470c8ae3490eb1c9b38ac51dc794a00129dfa.jpg",
190
+ "text": "$$\ns ( \\mathbf { x } ) = { \\cal W } _ { l } \\mathbf { h } _ { T } ,\n$$",
191
+ "text_format": "latex",
192
+ "bbox": [
193
+ 446,
194
+ 186,
195
+ 550,
196
+ 204
197
+ ],
198
+ "page_idx": 2
199
+ },
200
+ {
201
+ "type": "text",
202
+ "text": "where $W _ { l } \\in \\mathbb { R } ^ { d _ { c } \\times d _ { h } }$ is a trainable weight matrix. For Transformers, the representation corresponding to the [CLS] token at the final layer is fed to the prediction layer to generate scores $s ( \\mathbf { x } )$ . ",
203
+ "bbox": [
204
+ 173,
205
+ 220,
206
+ 825,
207
+ 251
208
+ ],
209
+ "page_idx": 2
210
+ },
211
+ {
212
+ "type": "text",
213
+ "text": "Towards post-hoc explanation of $s ( \\mathbf { x } )$ , a notable line of work, additive feature attribution methods (Ribeiro et al., 2016; Shrikumar et al., 2017; Sundararajan et al., 2017; Lundberg & Lee, 2017), measure word-level importance to the model prediction $s ( \\mathbf { x } )$ by attributing an importance score $\\phi ( \\mathbf { x } _ { i } , \\mathbf { x } )$ to each word in the input sequence $\\mathbf { x } _ { i } \\in \\mathbf { x }$ . However, the additive assumption hinders these methods from explaining the complex interactions between words and compositional semantics in a sentence (e.g., modeling negation, transition, and emphasis in sentiment classification), as shown in Figure 1. ",
214
+ "bbox": [
215
+ 173,
216
+ 256,
217
+ 825,
218
+ 354
219
+ ],
220
+ "page_idx": 2
221
+ },
222
+ {
223
+ "type": "text",
224
+ "text": "2.2 HIERARCHICAL EXPLANATIONS VIA CONTEXTUAL DECOMPOSITION ",
225
+ "text_level": 1,
226
+ "bbox": [
227
+ 176,
228
+ 382,
229
+ 689,
230
+ 397
231
+ ],
232
+ "page_idx": 2
233
+ },
234
+ {
235
+ "type": "text",
236
+ "text": "To caputure non-linear compositional semantics, the line of work on contextual decomposition (CD) (Murdoch et al., 2018) designs non-additive measures of importance from individual words/phrases to the model predictions, and further extend to agglomerative contextual decomposition (ACD) algorithm (Singh et al., 2019) for generating hierarchical explanations. ",
237
+ "bbox": [
238
+ 174,
239
+ 412,
240
+ 825,
241
+ 469
242
+ ],
243
+ "page_idx": 2
244
+ },
245
+ {
246
+ "type": "text",
247
+ "text": "Given a phrase $\\mathbf { p } = \\mathbf { x } _ { i : j }$ in the input sequence $\\mathbf { x }$ , contextual decomposition (CD) attributes a score $\\phi ( \\mathbf { p } , \\mathbf { x } )$ as the contribution solely from $\\mathbf { p }$ to the model’s prediction $s ( \\mathbf { x } )$ . Note that $\\phi ( \\mathbf { p } , \\mathbf { x } )$ does not equal to the sum of the scores of each word in the phrase, i.e., $\\begin{array} { r } { \\phi ( \\mathbf { p } , \\mathbf { x } ) \\neq \\sum _ { \\mathbf { x } _ { i } \\in \\mathbf { p } } \\phi ( \\mathbf { x } _ { i } , \\mathbf { x } ) } \\end{array}$ . Starting from the input layer, CD iteratively decomposes each hidden state $\\mathbf { h }$ of the model into the contribution solely made by $\\mathbf { p }$ , denoted as $\\beta$ , and the contributions involving the words outside the phrase $\\mathbf { p }$ , denoted as $\\gamma$ , with the relation $\\mathbf { h } = \\beta { + } \\gamma$ holds. The algorithm also keeps the contribution from the bias term, denoted as $\\zeta$ , temporally before element-wise multiplication. ",
248
+ "bbox": [
249
+ 173,
250
+ 476,
251
+ 825,
252
+ 575
253
+ ],
254
+ "page_idx": 2
255
+ },
256
+ {
257
+ "type": "text",
258
+ "text": "For a linear layer $\\mathbf { h } = \\mathbf { { W } } _ { i } \\mathbf { { x } } _ { t } + \\mathbf { { \\mathbf { b } } } _ { i }$ with input $\\mathbf { x } _ { t }$ , when $\\mathbf { x } _ { t }$ lies in the given phrase p, the contribution solely from $\\mathbf { x } _ { t }$ to $\\mathbf { h }$ is defined as $\\beta = W _ { i } \\mathbf { x } _ { t }$ when $\\mathbf { x } _ { t }$ is part of the phrase (i.e., $\\mathbf { x } _ { t } \\in \\mathbf { p } ,$ ), and the contribution involving other words in the sentences (denoted as $\\mathbf { x } \\backslash \\mathbf { p } )$ is defined as $\\gamma = 0$ . The contribution of the bias term $\\zeta$ is thus $\\mathbf { b } _ { i }$ . When $\\mathbf { x } _ { t }$ lies outside of the phrase, $\\gamma$ is quantified as $W _ { i } \\mathbf { x } _ { t }$ and $\\beta$ is 0. In the cases when CD encounters element-wise multiplication operations $\\mathbf { h } = \\mathbf { h } _ { a } \\odot \\mathbf { h } _ { b }$ (e.g., in LSTMs), it eliminates the multiplicative interaction terms which involve the information outside of the phrase p. Specifically, suppose that $\\mathbf { h } _ { a }$ and $\\mathbf { h } _ { b }$ have been decomposed as $\\mathbf { h } _ { a } \\ = \\ \\beta ^ { a } + \\gamma ^ { a } + \\zeta ^ { a }$ and $\\mathbf { h } _ { b } \\mathbf { \\bar { \\phi } } = \\mathbf { \\bar { \\beta } } ^ { b } + \\gamma ^ { b } + \\zeta ^ { b }$ , CD computes the $\\beta$ term for ${ \\mathbf { h } } _ { a } \\odot { \\mathbf { h } } _ { b }$ as $\\beta = \\beta ^ { a } \\odot \\beta ^ { b } + \\beta ^ { a } \\odot \\zeta ^ { b } + \\zeta ^ { a } \\odot \\beta ^ { b }$ . ",
259
+ "bbox": [
260
+ 173,
261
+ 582,
262
+ 825,
263
+ 708
264
+ ],
265
+ "page_idx": 2
266
+ },
267
+ {
268
+ "type": "text",
269
+ "text": "When dealing with non-linear activation $\\mathbf { h } ^ { \\prime } = \\sigma ( \\mathbf { h } )$ , CD computes the contribution solely from the phrase $\\mathbf { p }$ as the average activation differences caused $\\beta$ supposing $\\gamma$ is present or absent, ",
270
+ "bbox": [
271
+ 171,
272
+ 713,
273
+ 823,
274
+ 743
275
+ ],
276
+ "page_idx": 2
277
+ },
278
+ {
279
+ "type": "equation",
280
+ "img_path": "images/e6e5e8ad1bd601be03d2cde89f4328e64dd481fe6499ee1ca44c777e9b0160fa.jpg",
281
+ "text": "$$\n\\beta ^ { \\prime } = \\frac { 1 } { 2 } [ \\sigma ( \\beta + \\gamma + \\zeta ) - \\sigma ( \\gamma + \\zeta ) ] + \\frac { 1 } { 2 } [ \\sigma ( \\beta + \\zeta ) - \\sigma ( \\zeta ) ] .\n$$",
282
+ "text_format": "latex",
283
+ "bbox": [
284
+ 297,
285
+ 758,
286
+ 699,
287
+ 790
288
+ ],
289
+ "page_idx": 2
290
+ },
291
+ {
292
+ "type": "text",
293
+ "text": "Following the strategies introduced above, CD decomposes all the intermediate outputs starting from the input layer, until reaching the final output of the model ${ \\bf h } _ { T } = \\beta + \\boldsymbol { \\gamma }$ . The logit score $W _ { l } \\beta$ is treated as the contribution of the given phrase $\\mathbf { p }$ to the final prediction $s ( \\mathbf { x } )$ . ",
294
+ "bbox": [
295
+ 174,
296
+ 804,
297
+ 825,
298
+ 848
299
+ ],
300
+ "page_idx": 2
301
+ },
302
+ {
303
+ "type": "text",
304
+ "text": "As a follow-up study, Singh et al. (2019) extends CD algorithm to other families of neural network architectures, and proposes agglomerative contextual decomposition algorithm (ACD). The decomposition of activation functions is modified as $\\beta ^ { \\prime } = \\sigma ( \\beta )$ . For a linear layer $\\mathbf { h } ^ { \\prime } = \\mathbf { W } \\mathbf { h } + \\mathbf { b }$ with its decomposition $\\mathbf { h } = \\beta + \\boldsymbol \\gamma$ , the bias term $^ { b }$ is decomposed proportionally and merged into the $\\beta ^ { \\prime }$ term of $\\mathbf { h } ^ { \\bar { \\prime } }$ , based on $\\beta ^ { \\prime } = W \\beta + | W \\beta | / ( | W \\beta | + | \\bar { W } \\gamma | ) \\cdot \\bar { b }$ . ",
305
+ "bbox": [
306
+ 174,
307
+ 853,
308
+ 823,
309
+ 925
310
+ ],
311
+ "page_idx": 2
312
+ },
313
+ {
314
+ "type": "image",
315
+ "img_path": "images/314bba920726d1f96e471e2d391823db9da9993c154544adf7c77b7335e3af5b.jpg",
316
+ "image_caption": [
317
+ "Figure 2: (Left) Illustration of the CD and SCD at calculating the decomposition for $\\mathbf { h } = \\sigma ( \\beta + \\gamma )$ , following Eq. 2. Red lines indicate computation that make CD explanations dependent on the words outside the give phrase. (Right) Illustration of the sampling step $\\bar { \\dot { \\mathbf { x } } _ { \\delta } } \\sim p ( \\hat { \\mathbf { x } } _ { \\delta } \\vert \\mathbf { x } _ { - \\delta } )$ for calculating the importance of the word very in SOC and SCD, with size of context $N = 1$ . The padding operation is for SOC. "
318
+ ],
319
+ "image_footnote": [],
320
+ "bbox": [
321
+ 197,
322
+ 93,
323
+ 794,
324
+ 246
325
+ ],
326
+ "page_idx": 3
327
+ },
328
+ {
329
+ "type": "text",
330
+ "text": "3 METHODOLOGY ",
331
+ "text_level": 1,
332
+ "bbox": [
333
+ 176,
334
+ 361,
335
+ 341,
336
+ 377
337
+ ],
338
+ "page_idx": 3
339
+ },
340
+ {
341
+ "type": "text",
342
+ "text": "In this section, we start by identifying desired properties of phrase-level importance score attribution for hierarchical explanations. We propose a measure of context-independent importance of a phrase and introduce two explanation algorithms instantiated from the proposed formulation. ",
343
+ "bbox": [
344
+ 176,
345
+ 405,
346
+ 825,
347
+ 446
348
+ ],
349
+ "page_idx": 3
350
+ },
351
+ {
352
+ "type": "text",
353
+ "text": "3.1 PROPERTIES OF IMPORTANCE ATTRIBUTION FOR HIERARCHICAL EXPLANATION",
354
+ "bbox": [
355
+ 173,
356
+ 483,
357
+ 767,
358
+ 498
359
+ ],
360
+ "page_idx": 3
361
+ },
362
+ {
363
+ "type": "text",
364
+ "text": "Despite the empirical success of CD and ACD, no prior works analyze what common properties a score attribution mechanism should satisfy to generate hierarchical explanations that reveal compositional semantics formed between phrases. Here we identify two properties that an attribution method should satisfy to generate informative hierarchical explanations. ",
365
+ "bbox": [
366
+ 174,
367
+ 517,
368
+ 825,
369
+ 574
370
+ ],
371
+ "page_idx": 3
372
+ },
373
+ {
374
+ "type": "text",
375
+ "text": "Non-additivity. Importance of a phrase $\\phi ( \\mathbf { p } , \\mathbf { x } )$ should not be a sum over the importance scores of all the component words $\\mathbf { x } _ { i } \\in \\mathbf { p }$ , i.e., $\\begin{array} { r } { \\phi ( \\mathbf { p } , \\mathbf { x } ) \\neq \\sum _ { \\mathbf { x } _ { i } \\in \\mathbf { p } } \\phi ( \\mathbf { x } _ { i } , \\mathbf { x } ) } \\end{array}$ , in contrast to the family of additive feature attribution methods. The property is also suggested by Murdoch et al. (2018). ",
376
+ "bbox": [
377
+ 174,
378
+ 580,
379
+ 825,
380
+ 625
381
+ ],
382
+ "page_idx": 3
383
+ },
384
+ {
385
+ "type": "text",
386
+ "text": "Context Independence. For deep neural networks, when two phrases combine, their importance to predicting a class may greatly change. The surplus by combining two phrases can be quantified by the difference between the importance of the combined phrase and the sum of the importance of two phrases on its own. It follows the definition of marginal interactions (Fujimoto et al., 2006) in game theory. According to the definition, the importance of two component phrases should be at least evaluated independently to each other. Formally, if we are only interested in how combining two phrases $\\mathbf { p } _ { 1 }$ and $\\mathbf { p } _ { 2 }$ contribute to a specific prediction for an input $\\mathbf { x }$ , we expect for input sentences x˜ where only $\\mathbf { p } _ { 2 }$ is replaced to another phrase, the importance attribution for $\\mathbf { p } _ { 1 }$ remains the same, i.e., $\\phi ( { \\bf p } _ { 1 } , { \\bf x } ) = \\phi ( { \\bf p } _ { 1 } , \\tilde { { \\bf x } } )$ . In our bottom-up hierarchical explanation setting, we are interested in how combining a phrase and any other contextual words or phrases in the input $\\mathbf { x }$ contribute. Therefore, we expect $\\phi ( \\mathbf { \\bar { p } } , \\mathbf { x } ) = \\phi ( \\mathbf { p } , \\mathbf { \\tilde { x } } )$ given the phrase $\\mathbf { p }$ in two different contexts $\\mathbf { x }$ and $\\tilde { \\bf x }$ . ",
387
+ "bbox": [
388
+ 174,
389
+ 631,
390
+ 825,
391
+ 785
392
+ ],
393
+ "page_idx": 3
394
+ },
395
+ {
396
+ "type": "text",
397
+ "text": "Limitations of CD and ACD. Unfortunately, while CD and ACD try to construct decomposition so that $\\beta$ terms represent the contributions solely from a given a phrase, the assigned importance scores by these algorithms do not satisfy the context independence property mathematically. For CD, we see the computation of $\\beta$ involves the $\\gamma$ term of a specific input sentence in Eq. 2 (see Figure 2(a) for visualization). Similarly, for ACD, the decomposition of the bias term involves the $\\gamma$ terms of a specific input sentence. As a result, the $\\beta$ terms computed by both algorithms depend on the context of the phrase $\\mathbf { p }$ . ",
398
+ "bbox": [
399
+ 174,
400
+ 791,
401
+ 825,
402
+ 888
403
+ ],
404
+ "page_idx": 3
405
+ },
406
+ {
407
+ "type": "text",
408
+ "text": "Given the limitation of prior works, we start by formulating a importance measure of phrases that satisfies both non-additivity and context independence property. ",
409
+ "bbox": [
410
+ 174,
411
+ 895,
412
+ 821,
413
+ 924
414
+ ],
415
+ "page_idx": 3
416
+ },
417
+ {
418
+ "type": "text",
419
+ "text": "3.2 CONTEXT-INDEPENDENT IMPORTANCE ",
420
+ "text_level": 1,
421
+ "bbox": [
422
+ 176,
423
+ 103,
424
+ 485,
425
+ 117
426
+ ],
427
+ "page_idx": 4
428
+ },
429
+ {
430
+ "type": "text",
431
+ "text": "Given a phrase $\\mathbf { p } : = \\mathbf { x } _ { i : j }$ appearing in a specific input $\\mathbf { x } _ { 1 : T }$ , we first relax our setting and define the importance of a phrase independent of contexts of length $N$ adjacent to it. The $N _ { ☉ }$ -context independent importance is defined as the output difference after masking out the phrase $\\mathbf { p }$ , marginalized over all the possible contexts of length $N$ , denoted as $\\hat { \\mathbf { x } } _ { \\delta }$ , around $\\mathbf { p }$ in the input $\\mathbf { x }$ . For an intuitive example, to evaluate the context independent importance up to one word of very in the sentence The film is very interesting in a sentiment analysis model, we sample some possible adjacent words before and after the word very, and average the prediction difference after some practice of masking the word very. Figure 2 illustrates an example for the sampling and masking steps. The $N$ -context independent importance is formally written as, ",
432
+ "bbox": [
433
+ 173,
434
+ 128,
435
+ 825,
436
+ 255
437
+ ],
438
+ "page_idx": 4
439
+ },
440
+ {
441
+ "type": "equation",
442
+ "img_path": "images/3ef5a3476ee27cdc5ee702a984ff04c115a94e1bd6af7cfdb0994505ac2d591a.jpg",
443
+ "text": "$$\n\\phi ( \\mathbf { p } , \\hat { \\mathbf { x } } ) = \\mathbb { E } _ { \\mathbf { x } _ { \\delta } } [ s ( \\mathbf { x } _ { - \\delta } ; \\hat { \\mathbf { x } } _ { \\delta } ) - s ( \\mathbf { x } _ { - \\delta } \\backslash \\mathbf { p } ; \\hat { \\mathbf { x } } _ { \\delta } ) ] ,\n$$",
444
+ "text_format": "latex",
445
+ "bbox": [
446
+ 349,
447
+ 261,
448
+ 647,
449
+ 279
450
+ ],
451
+ "page_idx": 4
452
+ },
453
+ {
454
+ "type": "text",
455
+ "text": "where $\\mathbf { x } _ { - \\delta }$ denotes the resulting sequence after masking out a context of length $N$ surrounding the phrase $\\mathbf { p }$ from the input $\\mathbf { x }$ . Here, $\\hat { \\mathbf { x } } _ { \\delta }$ is a sequence of length $N$ sampled from a distribution $p ( \\hat { \\mathbf { x } } _ { \\delta } | \\mathbf { x } _ { - \\delta } )$ , which is conditioned on the phrase $\\mathbf { p }$ as well as other words in the sentence $\\mathbf { x }$ . Accordingly, we use $s \\big ( \\mathbf { x } _ { - \\delta } ; \\hat { \\mathbf { x } } _ { \\delta } \\big )$ to denote the model prediction score after replacing the masked-out context $\\mathbf { x } _ { - \\delta }$ with a sampled context $\\hat { \\mathbf { x } } _ { \\delta }$ . We use $\\mathbf { x } \\backslash \\mathbf { p }$ to denote the operation of masking out the phrase $\\mathbf { p }$ from the input sentence $\\mathbf { x }$ . The specific implementation of this masking out operation varies across different explanation algorithms. ",
456
+ "bbox": [
457
+ 173,
458
+ 284,
459
+ 825,
460
+ 382
461
+ ],
462
+ "page_idx": 4
463
+ },
464
+ {
465
+ "type": "text",
466
+ "text": "Following the notion of $N$ -context independent importance, we define context-independent importance of a phrase $\\mathbf { p }$ by increasing the size of the context $N$ to sufficiently large (e.g., length of the sentence). The context independent importance can be equivalently written as follows. ",
467
+ "bbox": [
468
+ 174,
469
+ 387,
470
+ 825,
471
+ 430
472
+ ],
473
+ "page_idx": 4
474
+ },
475
+ {
476
+ "type": "equation",
477
+ "img_path": "images/f02849493580f2c27cc95f59a0b5bca60c387def13b907662f7accc57c3206c8.jpg",
478
+ "text": "$$\n\\phi ^ { g } ( \\mathbf { p } ) = \\mathbb { E } _ { \\mathbf { x } } [ s ( \\mathbf { x } ) - s ( \\mathbf { x } \\backslash \\mathbf { p } ) | \\mathbf { p } \\subseteq \\mathbf { x } ] .\n$$",
479
+ "text_format": "latex",
480
+ "bbox": [
481
+ 377,
482
+ 436,
483
+ 620,
484
+ 454
485
+ ],
486
+ "page_idx": 4
487
+ },
488
+ {
489
+ "type": "text",
490
+ "text": "While it is possible to compute the expectations in Eqs. 3 and 4 by sampling from the training set, it is common that a phrase occurs sparsely in the corpus. Therefore, we approximate the $N$ -context independent importance by sampling from a language model pretrained on the training corpus. The language model helps model a smoothed distribution of $p ( \\hat { \\mathbf { x } } _ { \\delta } | \\mathbf { x } _ { - \\delta } )$ . In practice, all our explanation algorithms make use of $N$ -context independent importance following Eq. 3, where the size of the neighborhood $N$ is a parameter to be specified to approximate the context independent importance. ",
491
+ "bbox": [
492
+ 173,
493
+ 465,
494
+ 825,
495
+ 551
496
+ ],
497
+ "page_idx": 4
498
+ },
499
+ {
500
+ "type": "text",
501
+ "text": "3.3 SAMPLING AND CONTEXTUAL DECOMPOSITION ALGORITHM ",
502
+ "text_level": 1,
503
+ "bbox": [
504
+ 174,
505
+ 566,
506
+ 642,
507
+ 582
508
+ ],
509
+ "page_idx": 4
510
+ },
511
+ {
512
+ "type": "text",
513
+ "text": "In CD, the desirable context independence property is compromised when computing decomposition of activation functions, as discussed in Section 3.1. Following the new formulation of contextindependent importance introduced in Section 3.2, we present a simple modification of the contextual decomposition algorithm, and develop a new sampling and contextual decomposition (SCD) algorithm for effective generation of hierarchical explanations. ",
514
+ "bbox": [
515
+ 174,
516
+ 593,
517
+ 823,
518
+ 664
519
+ ],
520
+ "page_idx": 4
521
+ },
522
+ {
523
+ "type": "text",
524
+ "text": "SCD is a layer-wise application of our formulation. The algorithm only modifies the way to decompose activation functions in CD. Specifically, given the output $\\mathbf { h } = s ^ { ( l ) } ( \\mathbf { x } )$ at an intermediate layer $l$ with the decomposition $\\mathbf { h } = \\beta + \\boldsymbol \\gamma$ , we decompose the activation value $\\sigma ( \\mathbf { h } )$ into $\\beta ^ { \\prime } + \\gamma ^ { \\prime }$ , with the following definition: ",
525
+ "bbox": [
526
+ 173,
527
+ 670,
528
+ 825,
529
+ 728
530
+ ],
531
+ "page_idx": 4
532
+ },
533
+ {
534
+ "type": "equation",
535
+ "img_path": "images/0f237b453c4460bb3c94f097edca5cc8c9f28549c04239d248067187fbaacf9d.jpg",
536
+ "text": "$$\n\\beta ^ { \\prime } = \\mathbb { E } _ { \\gamma \\sim p ( \\gamma | \\mathbf { x } _ { - \\delta } ) } [ \\sigma ( \\beta + \\gamma ) - \\sigma ( \\gamma ) ] = \\mathbb { E } _ { \\mathbf { h } \\sim p ( \\mathbf { h } | \\mathbf { x } _ { - \\delta } ) } [ \\sigma ( \\mathbf { h } ) - \\sigma ( \\mathbf { h } - \\beta ) ] ,\n$$",
537
+ "text_format": "latex",
538
+ "bbox": [
539
+ 254,
540
+ 734,
541
+ 740,
542
+ 753
543
+ ],
544
+ "page_idx": 4
545
+ },
546
+ {
547
+ "type": "text",
548
+ "text": "i.e., $\\beta ^ { \\prime }$ is defined as the expected difference between the activation values when the $\\beta$ term is present or absent. $\\mathbf { h }$ is computed for different input sequences $\\mathbf { x }$ with the contexts of the phrase $\\mathbf { p }$ sampled from the distribution $p ( \\hat { \\mathbf { x } } _ { \\delta } | \\mathbf { x } _ { - \\delta } )$ . Eq. 5 is a layer wise application of Eq. 4, where the masking operation is implemented with calculating $\\sigma ( { \\bf h } - \\beta )$ . Figure 2(b) provides a visualization for the decomposition. ",
549
+ "bbox": [
550
+ 173,
551
+ 760,
552
+ 825,
553
+ 830
554
+ ],
555
+ "page_idx": 4
556
+ },
557
+ {
558
+ "type": "text",
559
+ "text": "Algorithmic Details. To perform sampling, we first pretrain a LSTM language model from two directions on the training data. During sampling, we mask the words that are not conditioned in $p ( \\hat { \\mathbf { x } } _ { \\delta } | \\mathbf { x } _ { - \\delta } )$ . Some other sampling options include performing Gibbs sampling from a masked language model (Wang et al., 2019). The algorithm then obtain a set of samples $s$ by sampled from the language model. For each sample in $s$ , the algorithm records the input of the $i$ -th non-linear activation function to obtain a sample set $S _ { \\mathbf { h } } ^ { ( i ) }$ . During the explanation, the $\\beta$ term of the $i$ -th non-linear ",
560
+ "bbox": [
561
+ 173,
562
+ 837,
563
+ 825,
564
+ 925
565
+ ],
566
+ "page_idx": 4
567
+ },
568
+ {
569
+ "type": "text",
570
+ "text": "activation function is calculated as, ",
571
+ "bbox": [
572
+ 174,
573
+ 103,
574
+ 405,
575
+ 117
576
+ ],
577
+ "page_idx": 5
578
+ },
579
+ {
580
+ "type": "equation",
581
+ "img_path": "images/c04fe305cd2e273cd15bc398e5dc4c9b72c940f96374d462bd5b0d0c9b8ddc3b.jpg",
582
+ "text": "$$\n\\beta ^ { \\prime } = \\frac { 1 } { | S _ { \\mathbf { h } } ^ { ( i ) } | } \\sum _ { \\mathbf { h } \\in S _ { \\mathbf { h } } ^ { ( i ) } } [ \\sigma ( \\mathbf { h } ) - \\sigma ( \\mathbf { h } - \\beta ) ] .\n$$",
583
+ "text_format": "latex",
584
+ "bbox": [
585
+ 370,
586
+ 123,
587
+ 627,
588
+ 167
589
+ ],
590
+ "page_idx": 5
591
+ },
592
+ {
593
+ "type": "text",
594
+ "text": "Some neural models such as Transformers involve operations that normalize over different dimensions of a vectors, e.g. layer normalization operations. We observe improved performance by not decomposing the normalizer of these terms when the phrase $\\mathbf { p }$ is shorter than a threshold, assuming that the impact of $\\mathbf { p }$ to the normalizer can be ignored. Besides, for element-wise multiplication in LSTM models, we treat them in the same way as other non-linear operations and decompose them as Eq. 5, where the decomposition of $\\mathbf { h } _ { 1 } { \\odot } \\mathbf { h } _ { 2 }$ is written as $\\beta ^ { \\prime } = \\mathbb { E } _ { \\gamma _ { 1 } , \\gamma _ { 2 } } [ ( \\beta _ { 1 } + \\gamma _ { 1 } ) \\odot ( \\beta _ { 2 } + \\gamma _ { 2 } ) - \\gamma _ { 1 } \\odot \\gamma _ { 2 } ]$ . We avoid decomposing softmax functions. ",
595
+ "bbox": [
596
+ 173,
597
+ 181,
598
+ 825,
599
+ 280
600
+ ],
601
+ "page_idx": 5
602
+ },
603
+ {
604
+ "type": "text",
605
+ "text": "3.4 SAMPLING AND OCCLUSION ALGORITHM ",
606
+ "text_level": 1,
607
+ "bbox": [
608
+ 174,
609
+ 296,
610
+ 504,
611
+ 311
612
+ ],
613
+ "page_idx": 5
614
+ },
615
+ {
616
+ "type": "text",
617
+ "text": "We show it is possible to fit input occlusion (Li et al., 2016) algorithm into our formulation. Input occlusion algorithm calculate the importance of $\\mathbf { p }$ specific to an input sentence $\\mathbf { x }$ by observing the prediction difference caused by replacing the phrase $\\mathbf { p }$ with padding tokens, noted as $\\mathbf { 0 _ { p } }$ , ",
618
+ "bbox": [
619
+ 174,
620
+ 321,
621
+ 825,
622
+ 366
623
+ ],
624
+ "page_idx": 5
625
+ },
626
+ {
627
+ "type": "equation",
628
+ "img_path": "images/702edce5256e70c0c218c8a5322f519b14ce4ecde71bf6a57c95ae57376542a1.jpg",
629
+ "text": "$$\n\\phi ( \\mathbf { p } , \\mathbf { x } ) = s ( \\mathbf { x } ) - s ( \\mathbf { x _ { - p } } ; \\mathbf { 0 _ { p } } )\n$$",
630
+ "text_format": "latex",
631
+ "bbox": [
632
+ 398,
633
+ 386,
634
+ 599,
635
+ 404
636
+ ],
637
+ "page_idx": 5
638
+ },
639
+ {
640
+ "type": "text",
641
+ "text": "It is obvious that the importance score obtained by the input occlusion algorithm is dependent on the all the context words of $\\mathbf { p }$ in $\\mathbf { x }$ . To eliminate the dependence, we sample the context around the phrase $\\mathbf { p }$ . This leads to the Sampling and Occlusion (SOC) algorithm, where the importance of phrases is defined as the expected prediction difference after masking the phrase for each replacement of contexts. ",
642
+ "bbox": [
643
+ 173,
644
+ 414,
645
+ 825,
646
+ 483
647
+ ],
648
+ "page_idx": 5
649
+ },
650
+ {
651
+ "type": "text",
652
+ "text": "Algorithmic Details. Similar to SCD, SOC samples neighboring words $\\hat { \\mathbf { x } } _ { \\delta }$ from a trained language model $p ( \\hat { \\mathbf { x } } _ { \\delta } | \\mathbf { x } _ { - \\delta } )$ and obtain a set of neighboring word replacement $s$ . For each replacement $\\hat { \\mathbf { x } } _ { \\delta } \\in S$ , the algorithm computes the model prediction differences after replacing the phrase $\\mathbf { p }$ with padding tokens. The importance $\\phi ( \\mathbf { p } , \\mathbf { x } )$ is then calculated as the average prediction differences. Formally, the algorithm calculates, ",
653
+ "bbox": [
654
+ 173,
655
+ 489,
656
+ 825,
657
+ 560
658
+ ],
659
+ "page_idx": 5
660
+ },
661
+ {
662
+ "type": "equation",
663
+ "img_path": "images/9710f0426c793a7ad0d7cee4c5701a77162bfddb2e62f3c1dc70243146a16d7c.jpg",
664
+ "text": "$$\n\\phi ( \\mathbf { p } , \\mathbf { x } ) = \\frac { 1 } { | \\mathcal { S } | } \\sum _ { \\hat { \\mathbf { x } } _ { \\delta } \\in \\mathcal { S } } [ s ( \\mathbf { x } _ { - \\delta } ; \\hat { \\mathbf { x } } _ { \\delta } ) - s ( \\mathbf { x } _ { - \\{ \\delta , \\mathbf { p } \\} } ; \\hat { \\mathbf { x } } _ { \\delta } ; \\mathbf { 0 } _ { \\mathbf { p } } ) ] .\n$$",
665
+ "text_format": "latex",
666
+ "bbox": [
667
+ 318,
668
+ 568,
669
+ 679,
670
+ 606
671
+ ],
672
+ "page_idx": 5
673
+ },
674
+ {
675
+ "type": "text",
676
+ "text": "Sampling and Occlusion is advantageous in that it is model-agnostic and easy to implement. The input occlusion algorithm inside Eq. 8 can also be replaced with other measure of phrase importance, such as Shapley values (Shapley, 1953), with the phrase $\\mathbf { p }$ and other input words considered as players. We expect it is helpful for longer sequences when there are multiple evidences outside the context region saturating the prediction. ",
677
+ "bbox": [
678
+ 174,
679
+ 613,
680
+ 825,
681
+ 683
682
+ ],
683
+ "page_idx": 5
684
+ },
685
+ {
686
+ "type": "text",
687
+ "text": "4 EXPERIMENTS ",
688
+ "text_level": 1,
689
+ "bbox": [
690
+ 176,
691
+ 704,
692
+ 326,
693
+ 719
694
+ ],
695
+ "page_idx": 5
696
+ },
697
+ {
698
+ "type": "text",
699
+ "text": "We evaluate explanation algorithms on both shallow LSTM models and deep fine-tuned BERT Transformer (Devlin et al., 2018) models. We use two sentiment analysis datasets, namely the Stanford Sentiment Treebank-2 (SST-2) dataset (Socher et al., 2013) and the Yelp Sentiment Polarity dataset (Zhang et al., 2015), as well as TACRED relation extraction dataset (Zhang et al., 2017) for experiments. The two tasks are modeled as binary and multi-class classification tasks respectively. For the SST-2 dataset, while it provides sentiment polarity scores for all the phrases on the nodes of the constituency parsing trees, we do not train our model on these phrases, and use these scores as the evaluation for the phrase level explanations. Our Transformer model is fine-tuned from pretrained BERT (Devlin et al., 2018) model. See Appendix A for other implementation details. ",
700
+ "bbox": [
701
+ 174,
702
+ 734,
703
+ 825,
704
+ 861
705
+ ],
706
+ "page_idx": 5
707
+ },
708
+ {
709
+ "type": "text",
710
+ "text": "Compared Methods. We compare our explanation algorithm with following baselines: Input occlusion (Li et al., 2016) and Integrated Gradient+SHAP (GradSHAP) (Lundberg & Lee, 2017); two algorithms applied for hierarchical explanations, namely Contextual Decomposition (CD) (Murdoch et al., 2018), and Agglomerative Contextual Decomposition (ACD) (Singh et al., 2019). We ",
711
+ "bbox": [
712
+ 174,
713
+ 867,
714
+ 823,
715
+ 924
716
+ ],
717
+ "page_idx": 5
718
+ },
719
+ {
720
+ "type": "table",
721
+ "img_path": "images/9aa47d0670217bdc0c9e6dc9d06098440041f37501613b4cc3f337eb1a627984.jpg",
722
+ "table_caption": [],
723
+ "table_footnote": [],
724
+ "table_body": "<table><tr><td>Dataset</td><td colspan=\"3\">SST-2</td><td colspan=\"2\">Yelp Polarity</td><td colspan=\"2\">TACRED</td></tr><tr><td>Model</td><td colspan=\"2\">BERT</td><td colspan=\"2\">LSTM</td><td>BERT LSTM</td><td>BERT</td><td>LSTM</td></tr><tr><td>Metric</td><td>word p</td><td>phrase p word p</td><td>phrase p</td><td>word p</td><td>word p</td><td>word p</td><td>word p</td></tr><tr><td>Input Occlusion</td><td>0.2229</td><td>0.4081 0.6489</td><td>0.4899</td><td>0.3781</td><td>0.6935</td><td>0.7646</td><td>0.5756</td></tr><tr><td>Direct Feed</td><td>0.2005</td><td>0.4889 0.6798</td><td>0.5588</td><td>0.3875</td><td>0.7905</td><td>0.1986</td><td>0.5771</td></tr><tr><td>GradSHAP</td><td>0.5073</td><td>0.5991</td><td>0.7024 0.5402</td><td>0.5791</td><td>0.7388</td><td>0.2965</td><td>0.6651</td></tr><tr><td>CD</td><td>0.2334</td><td>0.3068</td><td>0.6231 0.4727</td><td>0.2645</td><td>0.7451</td><td>0.0052</td><td>0.6508</td></tr><tr><td>ACD</td><td>0.3053</td><td>0.3698</td><td>0.2495 0.1856</td><td>0.3010</td><td>0.5024</td><td>0.2027</td><td>0.0291</td></tr><tr><td>Statistic</td><td>0.5223</td><td>0.4741</td><td>0.7271 0.4959</td><td>0.7294</td><td>0.9094</td><td>0.5324</td><td>0.7662</td></tr><tr><td>SCD</td><td>0.5481</td><td>0.6015</td><td>0.7151 0.5664</td><td>0.7180</td><td>0.7793</td><td>0.7980</td><td>0.6823</td></tr><tr><td>sOC</td><td>0.6265</td><td>0.6628</td><td>0.7226 0.5649</td><td>0.6971</td><td>0.7683</td><td>0.7982</td><td>0.7354</td></tr></table>",
725
+ "bbox": [
726
+ 187,
727
+ 97,
728
+ 810,
729
+ 242
730
+ ],
731
+ "page_idx": 6
732
+ },
733
+ {
734
+ "type": "text",
735
+ "text": "Table 1: Correlation between word & phrase importance attribution and linear model coefficients & SST-2 human annotations, achieved by baselines and our explanation algorithms. ",
736
+ "bbox": [
737
+ 171,
738
+ 252,
739
+ 825,
740
+ 280
741
+ ],
742
+ "page_idx": 6
743
+ },
744
+ {
745
+ "type": "image",
746
+ "img_path": "images/9a177001f004c56a380bde08aecef3e1f99667c15a45fe37c0ab41b1af22f9f4.jpg",
747
+ "image_caption": [
748
+ "Figure 3: Hierarchical Explanation of a prediction by the BERT Transformer model on SST-2. We generate explanations for all the phrases on the truncated constituency parsing tree, with positive sentiments shown in red and negative sentiments shown in blue. We see our method identify positive segments in the overall negative sentence, such as “a breath of fresh air” "
749
+ ],
750
+ "image_footnote": [],
751
+ "bbox": [
752
+ 174,
753
+ 297,
754
+ 821,
755
+ 454
756
+ ],
757
+ "page_idx": 6
758
+ },
759
+ {
760
+ "type": "text",
761
+ "text": "also compare with a naive however neglected baseline in prior literature, which directly feed the given phrase to the model and take the prediction score as the importance of the phrase, noted as Direct Feed. In BERT models, Direct Feed is implemented by turning off the attention mask of words except the [CLS] token and the phrase to be explained. For our algorithms, we list the performance of corpus statistic based approach (Statistic) for approximating context independent importance in Eq. 3, Sampling and Contextual Decomposition (SCD), and Sampling and Occlusion (SOC) algorithm. In section 4.4, we also consider padding instead of sampling the context words in SCD and SOC. ",
762
+ "bbox": [
763
+ 174,
764
+ 550,
765
+ 825,
766
+ 661
767
+ ],
768
+ "page_idx": 6
769
+ },
770
+ {
771
+ "type": "text",
772
+ "text": "4.1 HIERARCHICAL VISUALIZATION OF IMPORTANT WORDS AND PHRASES ",
773
+ "text_level": 1,
774
+ "bbox": [
775
+ 176,
776
+ 681,
777
+ 709,
778
+ 695
779
+ ],
780
+ "page_idx": 6
781
+ },
782
+ {
783
+ "type": "text",
784
+ "text": "We verify the performance of our algorithms in identifying important words and phrases captured by models. We follow the quantitative evaluation protocol proposed in CD algorithm (Murdoch et al., 2018) for evaluating word-level explanations, which computes Pearson correlation between the coefficients learned by a linear bag-of-words model and the importance scores attributed by explanation methods, also noted as the word $\\rho$ . When the linear model is accurate, its coefficients could stand for general importance of words. For evaluating phrase level explanations, we notice the SST-2 dataset provides human annotated real-valued sentiment polarity for each phrase on constituency parsing trees. We generate explanations for each phrase on the parsing tree and evaluate the Pearson correlation between the ground truth scores and the importance scores assigned for phrases, also noted as the phrase $\\rho$ . We draw $K = 2 0$ samples for $N = 1 0$ words adjacent to the phrase to be explained at the sampling step in our SOC and SCD algorithms. The parameter setting is trade-off between the efficiency and performance. See Section 4.4 for detailed parameter analysis. ",
785
+ "bbox": [
786
+ 173,
787
+ 708,
788
+ 825,
789
+ 875
790
+ ],
791
+ "page_idx": 6
792
+ },
793
+ {
794
+ "type": "text",
795
+ "text": "Table 1 shows word $\\rho$ and phrase $\\rho$ achieved by our algorithms and competitors. Generally, explanation algorithms that follow our formulations achieve highest word $\\rho$ and phrase $\\rho$ for all the datasets and models. SOC and SCD perform robustly on the deep Transformer model, achieving higher word $\\rho$ and phrase $\\rho$ than input occlusion and contextual decomposition algorithms by a large margin. We see the simple Direct Feed method provide promising results on shallow LSTM networks, but fail in deeper Transformer models. The statistic based approximation of the context independent importance, which do not employ a trained sampler, yields competitive words $\\rho$ but low phrase $\\rho$ . Our analysis show that it is common that a long phrase does not exist in previously seen examples. In this case, phrase $\\rho$ achieved by statistic based approximation is pushed towards that of the input occlusion algorithm. ",
796
+ "bbox": [
797
+ 176,
798
+ 882,
799
+ 823,
800
+ 924
801
+ ],
802
+ "page_idx": 6
803
+ },
804
+ {
805
+ "type": "image",
806
+ "img_path": "images/3bc16530c3a8b2ee687641f1b9bf78f2fe68e95e598a91dbf0d47fe12ca29295.jpg",
807
+ "image_caption": [
808
+ "Figure 4: Extracting phrase-level classification patterns from LSTM relation extraction model with SCD. Red indicate evidence for predicting the class, and blue indicate distractor for predicting the class. By applying the agglomerative clustering algorithm and defining a threshold score, we effecively extract “a sister, O-Person” as a classification rule for the relation per:siblings. However, we see CD fails in this example. "
809
+ ],
810
+ "image_footnote": [],
811
+ "bbox": [
812
+ 178,
813
+ 103,
814
+ 823,
815
+ 268
816
+ ],
817
+ "page_idx": 7
818
+ },
819
+ {
820
+ "type": "text",
821
+ "text": "",
822
+ "bbox": [
823
+ 174,
824
+ 375,
825
+ 825,
826
+ 472
827
+ ],
828
+ "page_idx": 7
829
+ },
830
+ {
831
+ "type": "text",
832
+ "text": "Qualitative study also shows that our explanation visualize complicated compositional semantics captured by models, such as positive segments in the negative example, and adversative conjunctions connected with “but”. We present an example explanation provided by SOC algorithm in Figure 3 and Appendix. ",
833
+ "bbox": [
834
+ 174,
835
+ 479,
836
+ 825,
837
+ 535
838
+ ],
839
+ "page_idx": 7
840
+ },
841
+ {
842
+ "type": "text",
843
+ "text": "4.2 EXPLANATION AS CLASSIFICATION PATTERN EXTRACTION FROM MODELS ",
844
+ "text_level": 1,
845
+ "bbox": [
846
+ 176,
847
+ 560,
848
+ 730,
849
+ 575
850
+ ],
851
+ "page_idx": 7
852
+ },
853
+ {
854
+ "type": "text",
855
+ "text": "We show our explanation algorithm is a nature fit for extracting phrase level classification rules from neural classifiers. With the agglomerative clustering algorithm in Singh et al. (2019), our explanation effectively identify phrase-level classification patterns without evaluating all possible phrases in the sentence even when a predefined hierarchy does not exist. Figure 4 show an example of automatically constructed hierarchy and extracted classification rules in an example in the TACRED dataset. ",
856
+ "bbox": [
857
+ 174,
858
+ 590,
859
+ 825,
860
+ 674
861
+ ],
862
+ "page_idx": 7
863
+ },
864
+ {
865
+ "type": "text",
866
+ "text": "4.3 ENHANCING HUMAN TRUST OF MODELS",
867
+ "text_level": 1,
868
+ "bbox": [
869
+ 174,
870
+ 699,
871
+ 500,
872
+ 714
873
+ ],
874
+ "page_idx": 7
875
+ },
876
+ {
877
+ "type": "text",
878
+ "text": "We follow the human evaluation protocol in Singh et al. (2019) and study whether our explanations help subjects to better trust model predictions. We ask subjects to rank the provided visualizations based on how they would like to trust the model. For the SST-2 dataset, we show subjects the predictions of the fine-tuned BERT model, and the explanations generated by SOC, SCD, ACD and GradSHAP algorithms for phrases. The phrase polarities are visualized in a hierarchy with the provided parsing tree of each sentence in the dataset. For the TACRED dataset, we show the explanations provided by SOC, SCD, CD and Direct Feed algorithms on the LSTM model. We binarilize the importance of a phrase by calculating the difference between its importance to the predicted class and the its top importance to other classes, and the hierarchies are constructed automatically with agglomerative clustering (Singh et al., 2019). Figure 5 shows average ranking score of explanations, where 4 for the best, and 1 for the worst. On the SST-2 dataset, SOC achieves significantly higher ranking score than ACD and GradSHAP, showing a $p$ -value less than 0.05 and 0.001 respectively. On the TACRED dataset, SCD achieve the best ranking score, showing significantly better ranking score than CD and Direct Feed with a $p$ -value less than $1 0 ^ { - 6 }$ . ",
879
+ "bbox": [
880
+ 174,
881
+ 729,
882
+ 825,
883
+ 924
884
+ ],
885
+ "page_idx": 7
886
+ },
887
+ {
888
+ "type": "image",
889
+ "img_path": "images/775be1ede204bf81cc10912bbf2f8706604b06944e5de78b00d7c65c1bc287b4.jpg",
890
+ "image_caption": [
891
+ "Figure 5: Results for human evaluation on the Transformer model trained on SST-2 sentiment analysis dataset (between SOC, SCD, ACD, GradSHAP) and the LSTM model trained on TACRED relation extraction dataset (between SOC, SCD, CD, DirectFeed). "
892
+ ],
893
+ "image_footnote": [],
894
+ "bbox": [
895
+ 176,
896
+ 104,
897
+ 821,
898
+ 207
899
+ ],
900
+ "page_idx": 8
901
+ },
902
+ {
903
+ "type": "image",
904
+ "img_path": "images/d4b0eaf040bf9369102c4d3e9a3a0d410b422bd8b1571dd47f7cba8c7141c19d.jpg",
905
+ "image_caption": [
906
+ "Figure 6: Word $\\rho$ and phrase $\\rho$ curves as the size of the context region $N$ and the number of samples $K$ change on the BERT model trained on the SST-2 dataset. Dash line notes for the performance of padding the context words instead of sampling. "
907
+ ],
908
+ "image_footnote": [],
909
+ "bbox": [
910
+ 176,
911
+ 287,
912
+ 820,
913
+ 425
914
+ ],
915
+ "page_idx": 8
916
+ },
917
+ {
918
+ "type": "text",
919
+ "text": "4.4 PARAMETER ANALYSIS ",
920
+ "text_level": 1,
921
+ "bbox": [
922
+ 176,
923
+ 512,
924
+ 377,
925
+ 526
926
+ ],
927
+ "page_idx": 8
928
+ },
929
+ {
930
+ "type": "text",
931
+ "text": "Both SOC and SCD algorithms require specifying the size of the context region $N$ and the number of samples $K$ . In Figure 6 (also Figure 7 in Appendix) we show the impact of these parameters. We also plot the performance curves when we pad the contexts instead of sampling. We see sampling the context achieves much better performance than padding the context given a fixed size of the context region $N$ . We also see word $\\rho$ and phrase $\\rho$ increase as the number of samples $K$ increases. The overall performance also increases as the size of the context region $N$ increases at the early stage, and saturates when $N$ grows large, which is consistent with our hypothesis that words or phrases usually do not interact with the words that are far away them in the input. ",
932
+ "bbox": [
933
+ 174,
934
+ 540,
935
+ 825,
936
+ 652
937
+ ],
938
+ "page_idx": 8
939
+ },
940
+ {
941
+ "type": "text",
942
+ "text": "5 RELATED WORKS ",
943
+ "text_level": 1,
944
+ "bbox": [
945
+ 176,
946
+ 679,
947
+ 354,
948
+ 695
949
+ ],
950
+ "page_idx": 8
951
+ },
952
+ {
953
+ "type": "text",
954
+ "text": "Interpretability of neural networks has been studied with vairous techniques, including probing learned features with auxiliary tasks (Tenney et al., 2019), or designing models with inherent interpretability (Bahdanau et al., 2015; Lei et al., 2016). A major line of work, local explanation algorithms, explains predictions by assigning importance scores for input features. This line of work include input occlusion (Kad´ ar et al., 2017), gradient based algorithms (Simonyan et al., ´ 2013; Hechtlinger, 2016; Ancona et al., 2017), additive feature attribution methods (Ribeiro et al., 2016; Shrikumar et al., 2017; Sundararajan et al., 2017), among which Shapley value based approaches (Lundberg & Lee, 2017) have been studied intensively because of its good mathematical properties. In the context of input occlusion explanations, researchers also study how to efficiently marginalize over input features to be explained (Zintgraf et al., 2017; Chang et al., 2019), while our research show extra focus could be placed on marginalizing over contexts. Regarding explanations of models with structured inputs, Chen et al. (2019) propose L-Shapley and C-Shapley for efficient approximation of Shapley values, with a similar hypothesis with us that the importance of a word is usually only strongly dependent on its neighboring contexts. Chen et al. (2018) propose a feature selection based approach for explanation in an information theoretic perspective. ",
955
+ "bbox": [
956
+ 174,
957
+ 715,
958
+ 825,
959
+ 924
960
+ ],
961
+ "page_idx": 8
962
+ },
963
+ {
964
+ "type": "text",
965
+ "text": "On the other hand, global explanation algorithms (Guidotti et al., 2018) have also been studied for identifying generally important features, such as Feature Importance Ranking Measure (Zien et al., 2009), Accumulated Local Effects (Apley, 2016), while usually restricted in the domain of tabular data. We note that the context independence property in our proposed methods implies we study hierarchical explanation as a global explanation problem (Guidotti et al., 2018). Compared with local explanation algorithms, global explanation algorithms are less studied for explaining individual predictions (Poerner et al., 2018), because they reveal the average behavior of models. However, with a hierarchical organization, we show global explanations are also powerful at explaining individual predictions, achieving better human evaluation scores and could explain compositional semantics where local explanation algorithms such as additive feature attribution algorithms totally fail. Moreover, we note that the use of explanation algorithms is not exclusive; we may apply explanation algorithms of different categories to make a more holistic explanation of model predictions. ",
966
+ "bbox": [
967
+ 174,
968
+ 103,
969
+ 825,
970
+ 270
971
+ ],
972
+ "page_idx": 9
973
+ },
974
+ {
975
+ "type": "text",
976
+ "text": "Another closely related field is statistical feature interaction detection (Hooker, 2004; Sorokina et al., 2008; Tsang et al., 2017) from learned models, which usually focus on tabular data only. An exception is (Tsang et al., 2018), which also studies word interactions in neural sequence model predictions, but does not study interactions in a phrase level. ",
977
+ "bbox": [
978
+ 174,
979
+ 277,
980
+ 823,
981
+ 333
982
+ ],
983
+ "page_idx": 9
984
+ },
985
+ {
986
+ "type": "text",
987
+ "text": "6 CONCLUSION ",
988
+ "text_level": 1,
989
+ "bbox": [
990
+ 176,
991
+ 353,
992
+ 318,
993
+ 369
994
+ ],
995
+ "page_idx": 9
996
+ },
997
+ {
998
+ "type": "text",
999
+ "text": "In this work, we identify two desirable properties for informative hierarchical explanations of predictions, namely the non-additivity and context-independence. We propose a formulation to quantify context independent importance of words and phrases that satisfies the properties above. We revisit the prior line of works on contextual decomposition algorithms, and propose Sampling and Contextual Decomposition (SCD) algorithm and Sampling and Occlusion algorithm (SOC). Experiments on multiple datasets and models show that our explanation algorithms generate informative hierarchical explanations, help to extract classification rules from models, and enhance human trust of models. ",
1000
+ "bbox": [
1001
+ 174,
1002
+ 385,
1003
+ 825,
1004
+ 497
1005
+ ],
1006
+ "page_idx": 9
1007
+ },
1008
+ {
1009
+ "type": "text",
1010
+ "text": "ACKNOWLEDGEMENTS ",
1011
+ "text_level": 1,
1012
+ "bbox": [
1013
+ 176,
1014
+ 518,
1015
+ 366,
1016
+ 532
1017
+ ],
1018
+ "page_idx": 9
1019
+ },
1020
+ {
1021
+ "type": "text",
1022
+ "text": "This research is based upon work supported in part by NSF SMA 18-29268 and JP Morgan AI Research Award. We would like to thank all the collaborators in USC INK research lab for their constructive feedback on the work. ",
1023
+ "bbox": [
1024
+ 176,
1025
+ 549,
1026
+ 825,
1027
+ 590
1028
+ ],
1029
+ "page_idx": 9
1030
+ },
1031
+ {
1032
+ "type": "text",
1033
+ "text": "REFERENCES ",
1034
+ "text_level": 1,
1035
+ "bbox": [
1036
+ 176,
1037
+ 612,
1038
+ 285,
1039
+ 627
1040
+ ],
1041
+ "page_idx": 9
1042
+ },
1043
+ {
1044
+ "type": "text",
1045
+ "text": "Marco Ancona, Enea Ceolini, Cengiz Oztireli, and Markus Gross. Towards better understanding of ¨ gradient-based attribution methods for deep neural networks. arXiv preprint arXiv:1711.06104, 2017. ",
1046
+ "bbox": [
1047
+ 174,
1048
+ 635,
1049
+ 825,
1050
+ 676
1051
+ ],
1052
+ "page_idx": 9
1053
+ },
1054
+ {
1055
+ "type": "text",
1056
+ "text": "Daniel W Apley. Visualizing the effects of predictor variables in black box supervised learning models. arXiv preprint arXiv:1612.08468, 2016. ",
1057
+ "bbox": [
1058
+ 173,
1059
+ 688,
1060
+ 823,
1061
+ 715
1062
+ ],
1063
+ "page_idx": 9
1064
+ },
1065
+ {
1066
+ "type": "text",
1067
+ "text": "Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings, 2015. URL http://arxiv.org/abs/1409.0473. ",
1068
+ "bbox": [
1069
+ 173,
1070
+ 726,
1071
+ 825,
1072
+ 781
1073
+ ],
1074
+ "page_idx": 9
1075
+ },
1076
+ {
1077
+ "type": "text",
1078
+ "text": "Alexander Binder, Gregoire Montavon, Sebastian Lapuschkin, Klaus-Robert M ´ uller, and Wojciech ¨ Samek. Layer-wise relevance propagation for neural networks with local renormalization layers. In International Conference on Artificial Neural Networks, pp. 63–71. Springer, 2016. ",
1079
+ "bbox": [
1080
+ 176,
1081
+ 791,
1082
+ 823,
1083
+ 834
1084
+ ],
1085
+ "page_idx": 9
1086
+ },
1087
+ {
1088
+ "type": "text",
1089
+ "text": "Chun-Hao Chang, Elliot Creager, Anna Goldenberg, and David Duvenaud. Explaining image classifiers by counterfactual generation. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id=B1MXz20cYQ. ",
1090
+ "bbox": [
1091
+ 174,
1092
+ 843,
1093
+ 821,
1094
+ 886
1095
+ ],
1096
+ "page_idx": 9
1097
+ },
1098
+ {
1099
+ "type": "text",
1100
+ "text": "Jianbo Chen, Le Song, Martin J. Wainwright, and Michael I. Jordan. Learning to explain: An information-theoretic perspective on model interpretation. In ICML, 2018. ",
1101
+ "bbox": [
1102
+ 173,
1103
+ 895,
1104
+ 821,
1105
+ 924
1106
+ ],
1107
+ "page_idx": 9
1108
+ },
1109
+ {
1110
+ "type": "text",
1111
+ "text": "Jianbo Chen, Le Song, Martin J. Wainwright, and Michael I. Jordan. L-shapley and c-shapley: Efficient model interpretation for structured data. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id $\\underline { { \\underline { { \\mathbf { \\Pi } } } } } =$ S1E3Ko09F7. ",
1112
+ "bbox": [
1113
+ 176,
1114
+ 103,
1115
+ 823,
1116
+ 146
1117
+ ],
1118
+ "page_idx": 10
1119
+ },
1120
+ {
1121
+ "type": "text",
1122
+ "text": "Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018. ",
1123
+ "bbox": [
1124
+ 173,
1125
+ 156,
1126
+ 821,
1127
+ 185
1128
+ ],
1129
+ "page_idx": 10
1130
+ },
1131
+ {
1132
+ "type": "text",
1133
+ "text": "Katsushige Fujimoto, Ivan Kojadinovic, and Jean-Luc Marichal. Axiomatic characterizations of probabilistic and cardinal-probabilistic interaction indices. Games and Economic Behavior, 55 (1):72–99, 2006. ",
1134
+ "bbox": [
1135
+ 174,
1136
+ 195,
1137
+ 826,
1138
+ 238
1139
+ ],
1140
+ "page_idx": 10
1141
+ },
1142
+ {
1143
+ "type": "text",
1144
+ "text": "Riccardo Guidotti, Anna Monreale, Salvatore Ruggieri, Franco Turini, Fosca Giannotti, and Dino Pedreschi. A survey of methods for explaining black box models. ACM computing surveys (CSUR), 51(5):93, 2018. ",
1145
+ "bbox": [
1146
+ 173,
1147
+ 248,
1148
+ 826,
1149
+ 291
1150
+ ],
1151
+ "page_idx": 10
1152
+ },
1153
+ {
1154
+ "type": "text",
1155
+ "text": "Yotam Hechtlinger. Interpretation of prediction models using the input gradient. arXiv preprint arXiv:1611.07634, 2016. ",
1156
+ "bbox": [
1157
+ 171,
1158
+ 301,
1159
+ 823,
1160
+ 330
1161
+ ],
1162
+ "page_idx": 10
1163
+ },
1164
+ {
1165
+ "type": "text",
1166
+ "text": "Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997. ",
1167
+ "bbox": [
1168
+ 171,
1169
+ 340,
1170
+ 823,
1171
+ 371
1172
+ ],
1173
+ "page_idx": 10
1174
+ },
1175
+ {
1176
+ "type": "text",
1177
+ "text": "Giles Hooker. Discovering additive structure in black box functions. In Proceedings of the tenth ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 575–580, 2004. ",
1178
+ "bbox": [
1179
+ 176,
1180
+ 380,
1181
+ 823,
1182
+ 422
1183
+ ],
1184
+ "page_idx": 10
1185
+ },
1186
+ {
1187
+ "type": "text",
1188
+ "text": "Akos Kad´ ar, Grzegorz Chrupała, and Afra Alishahi. Representation of linguistic form and function´ in recurrent neural networks. Computational Linguistics, 43(4):761–780, 2017. ",
1189
+ "bbox": [
1190
+ 173,
1191
+ 433,
1192
+ 820,
1193
+ 463
1194
+ ],
1195
+ "page_idx": 10
1196
+ },
1197
+ {
1198
+ "type": "text",
1199
+ "text": "Tao Lei, Regina Barzilay, and Tommi S. Jaakkola. Rationalizing neural predictions. In EMNLP, 2016. ",
1200
+ "bbox": [
1201
+ 173,
1202
+ 472,
1203
+ 823,
1204
+ 501
1205
+ ],
1206
+ "page_idx": 10
1207
+ },
1208
+ {
1209
+ "type": "text",
1210
+ "text": "Jiwei Li, Will Monroe, and Dan Jurafsky. Understanding neural networks through representation erasure. arXiv preprint arXiv:1612.08220, 2016. ",
1211
+ "bbox": [
1212
+ 173,
1213
+ 512,
1214
+ 823,
1215
+ 541
1216
+ ],
1217
+ "page_idx": 10
1218
+ },
1219
+ {
1220
+ "type": "text",
1221
+ "text": "Hui Liu, Qingyu Yin, and William Yang Wang. Towards explainable NLP: A generative explanation framework for text classification. In Proceedings of the 57th Conference of the Association for Computational Linguistics, pp. 5570–5581, Florence, Italy, July 2019a. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/P19-1560. ",
1222
+ "bbox": [
1223
+ 173,
1224
+ 550,
1225
+ 825,
1226
+ 608
1227
+ ],
1228
+ "page_idx": 10
1229
+ },
1230
+ {
1231
+ "type": "text",
1232
+ "text": "Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692, 2019b. ",
1233
+ "bbox": [
1234
+ 176,
1235
+ 617,
1236
+ 823,
1237
+ 661
1238
+ ],
1239
+ "page_idx": 10
1240
+ },
1241
+ {
1242
+ "type": "text",
1243
+ "text": "Scott M Lundberg and Su-In Lee. A unified approach to interpreting model predictions. In Advances in Neural Information Processing Systems, pp. 4765–4774, 2017. ",
1244
+ "bbox": [
1245
+ 173,
1246
+ 671,
1247
+ 823,
1248
+ 700
1249
+ ],
1250
+ "page_idx": 10
1251
+ },
1252
+ {
1253
+ "type": "text",
1254
+ "text": "Sina Mohseni, Niloofar Zarei, and Eric D Ragan. A survey of evaluation methods and measures for interpretable machine learning. arXiv preprint arXiv:1811.11839, 2018. ",
1255
+ "bbox": [
1256
+ 173,
1257
+ 710,
1258
+ 825,
1259
+ 739
1260
+ ],
1261
+ "page_idx": 10
1262
+ },
1263
+ {
1264
+ "type": "text",
1265
+ "text": "W James Murdoch, Peter J Liu, and Bin Yu. Beyond word importance: Contextual decomposition to extract interactions from lstms. In ICLR, 2018. ",
1266
+ "bbox": [
1267
+ 173,
1268
+ 750,
1269
+ 825,
1270
+ 779
1271
+ ],
1272
+ "page_idx": 10
1273
+ },
1274
+ {
1275
+ "type": "text",
1276
+ "text": "Jeffrey Pennington, Richard Socher, and Christopher Manning. Glove: Global vectors for word representation. In Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP), pp. 1532–1543, 2014. ",
1277
+ "bbox": [
1278
+ 173,
1279
+ 787,
1280
+ 823,
1281
+ 832
1282
+ ],
1283
+ "page_idx": 10
1284
+ },
1285
+ {
1286
+ "type": "text",
1287
+ "text": "Matthew E Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. Deep contextualized word representations. arXiv preprint arXiv:1802.05365, 2018. ",
1288
+ "bbox": [
1289
+ 173,
1290
+ 842,
1291
+ 823,
1292
+ 885
1293
+ ],
1294
+ "page_idx": 10
1295
+ },
1296
+ {
1297
+ "type": "text",
1298
+ "text": "Nina Poerner, Hinrich Schutze, and Benjamin Roth. Evaluating neural network explanation methods ¨ using hybrid documents and morphological agreement. arXiv preprint arXiv:1801.06422, 2018. ",
1299
+ "bbox": [
1300
+ 174,
1301
+ 895,
1302
+ 820,
1303
+ 924
1304
+ ],
1305
+ "page_idx": 10
1306
+ },
1307
+ {
1308
+ "type": "text",
1309
+ "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, San Francisco, CA, USA, August 13-17, 2016, pp. 1135–1144, 2016. ",
1310
+ "bbox": [
1311
+ 174,
1312
+ 103,
1313
+ 825,
1314
+ 160
1315
+ ],
1316
+ "page_idx": 11
1317
+ },
1318
+ {
1319
+ "type": "text",
1320
+ "text": "Lloyd S Shapley. A value for n-person games. Contributions to the Theory of Games, 2(28):307– 317, 1953. ",
1321
+ "bbox": [
1322
+ 173,
1323
+ 169,
1324
+ 821,
1325
+ 196
1326
+ ],
1327
+ "page_idx": 11
1328
+ },
1329
+ {
1330
+ "type": "text",
1331
+ "text": "Avanti Shrikumar, Peyton Greenside, and Anshul Kundaje. Learning important features through propagating activation differences. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 3145–3153. JMLR. org, 2017. ",
1332
+ "bbox": [
1333
+ 174,
1334
+ 207,
1335
+ 825,
1336
+ 250
1337
+ ],
1338
+ "page_idx": 11
1339
+ },
1340
+ {
1341
+ "type": "text",
1342
+ "text": "Karen Simonyan, Andrea Vedaldi, and Andrew Zisserman. Deep inside convolutional networks: Visualising image classification models and saliency maps. arXiv preprint arXiv:1312.6034, 2013. ",
1343
+ "bbox": [
1344
+ 176,
1345
+ 257,
1346
+ 820,
1347
+ 287
1348
+ ],
1349
+ "page_idx": 11
1350
+ },
1351
+ {
1352
+ "type": "text",
1353
+ "text": "Chandan Singh, W James Murdoch, and Bin Yu. Hierarchical interpretations for neural network predictions. In ICLR, 2019. ",
1354
+ "bbox": [
1355
+ 174,
1356
+ 295,
1357
+ 821,
1358
+ 324
1359
+ ],
1360
+ "page_idx": 11
1361
+ },
1362
+ {
1363
+ "type": "text",
1364
+ "text": "Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew $\\mathrm { N g }$ , and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 conference on empirical methods in natural language processing, pp. 1631–1642, 2013. ",
1365
+ "bbox": [
1366
+ 174,
1367
+ 333,
1368
+ 825,
1369
+ 390
1370
+ ],
1371
+ "page_idx": 11
1372
+ },
1373
+ {
1374
+ "type": "text",
1375
+ "text": "Daria Sorokina, Rich Caruana, Mirek Riedewald, and Daniel Fink. Detecting statistical interactions with additive groves of trees. In Proceedings of the 25th international conference on Machine learning, pp. 1000–1007. ACM, 2008. ",
1376
+ "bbox": [
1377
+ 173,
1378
+ 398,
1379
+ 826,
1380
+ 441
1381
+ ],
1382
+ "page_idx": 11
1383
+ },
1384
+ {
1385
+ "type": "text",
1386
+ "text": "Mukund Sundararajan, Ankur Taly, and Qiqi Yan. Axiomatic attribution for deep networks. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 3319– 3328. JMLR. org, 2017. ",
1387
+ "bbox": [
1388
+ 173,
1389
+ 450,
1390
+ 823,
1391
+ 493
1392
+ ],
1393
+ "page_idx": 11
1394
+ },
1395
+ {
1396
+ "type": "text",
1397
+ "text": "Ian Tenney, Dipanjan Das, and Ellie Pavlick. Bert rediscovers the classical nlp pipeline. In Association for Computational Linguistics, 2019. URL https://arxiv.org/abs/1905.05950. ",
1398
+ "bbox": [
1399
+ 169,
1400
+ 501,
1401
+ 823,
1402
+ 531
1403
+ ],
1404
+ "page_idx": 11
1405
+ },
1406
+ {
1407
+ "type": "text",
1408
+ "text": "Michael Tsang, Dehua Cheng, and Yan Liu. Detecting statistical interactions from neural network weights. arXiv preprint arXiv:1705.04977, 2017. ",
1409
+ "bbox": [
1410
+ 171,
1411
+ 540,
1412
+ 823,
1413
+ 569
1414
+ ],
1415
+ "page_idx": 11
1416
+ },
1417
+ {
1418
+ "type": "text",
1419
+ "text": "Michael Tsang, Youbang Sun, Dongxu Ren, and Yan Liu. Can i trust you more? model-agnostic hierarchical explanations. ArXiv, abs/1812.04801, 2018. ",
1420
+ "bbox": [
1421
+ 169,
1422
+ 577,
1423
+ 825,
1424
+ 607
1425
+ ],
1426
+ "page_idx": 11
1427
+ },
1428
+ {
1429
+ "type": "text",
1430
+ "text": "Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pp. 5998–6008, 2017. ",
1431
+ "bbox": [
1432
+ 173,
1433
+ 614,
1434
+ 825,
1435
+ 659
1436
+ ],
1437
+ "page_idx": 11
1438
+ },
1439
+ {
1440
+ "type": "text",
1441
+ "text": "Alex Wang, Kyunghyun Cho, and CIFAR Azrieli Global Scholar. Bert has a mouth, and it must speak: Bert as a markov random field language model. NAACL HLT 2019, pp. 30, 2019. ",
1442
+ "bbox": [
1443
+ 169,
1444
+ 666,
1445
+ 823,
1446
+ 696
1447
+ ],
1448
+ "page_idx": 11
1449
+ },
1450
+ {
1451
+ "type": "text",
1452
+ "text": "Xiang Zhang, Junbo Zhao, and Yann LeCun. Character-level convolutional networks for text classification. In Advances in neural information processing systems, pp. 649–657, 2015. ",
1453
+ "bbox": [
1454
+ 171,
1455
+ 704,
1456
+ 823,
1457
+ 733
1458
+ ],
1459
+ "page_idx": 11
1460
+ },
1461
+ {
1462
+ "type": "text",
1463
+ "text": "Yuhao Zhang, Victor Zhong, Danqi Chen, Gabor Angeli, and Christopher D. Manning. Positionaware attention and supervised data improve slot filling. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing (EMNLP 2017), pp. 35–45, 2017. URL https://nlp.stanford.edu/pubs/zhang2017tacred.pdf. ",
1464
+ "bbox": [
1465
+ 174,
1466
+ 742,
1467
+ 825,
1468
+ 799
1469
+ ],
1470
+ "page_idx": 11
1471
+ },
1472
+ {
1473
+ "type": "text",
1474
+ "text": "Alexander Zien, Nicole Kramer, S ¨ oren Sonnenburg, and Gunnar R ¨ atsch. The feature importance ¨ ranking measure. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pp. 694–709. Springer, 2009. ",
1475
+ "bbox": [
1476
+ 174,
1477
+ 808,
1478
+ 825,
1479
+ 851
1480
+ ],
1481
+ "page_idx": 11
1482
+ },
1483
+ {
1484
+ "type": "text",
1485
+ "text": "Luisa M Zintgraf, Taco S Cohen, Tameem Adel, and Max Welling. Visualizing deep neural network decisions: Prediction difference analysis. In ICLR, 2017. ",
1486
+ "bbox": [
1487
+ 173,
1488
+ 859,
1489
+ 825,
1490
+ 888
1491
+ ],
1492
+ "page_idx": 11
1493
+ },
1494
+ {
1495
+ "type": "image",
1496
+ "img_path": "images/600bae4ad06a059a70d2ecd50fa6120a3fd524391412564b805e3dd1e7115958.jpg",
1497
+ "image_caption": [
1498
+ "Figure 7: Word $\\rho$ and phrase $\\rho$ curve as the size of the context region $N$ and the number of samples $K$ change on LSTM trained on the SST-2 dataset. Dash line notes for the performance of padding the context words instead of sampling. "
1499
+ ],
1500
+ "image_footnote": [],
1501
+ "bbox": [
1502
+ 178,
1503
+ 114,
1504
+ 818,
1505
+ 251
1506
+ ],
1507
+ "page_idx": 12
1508
+ },
1509
+ {
1510
+ "type": "text",
1511
+ "text": "A IMPLEMENTATION DETAILS ",
1512
+ "text_level": 1,
1513
+ "bbox": [
1514
+ 178,
1515
+ 330,
1516
+ 439,
1517
+ 345
1518
+ ],
1519
+ "page_idx": 12
1520
+ },
1521
+ {
1522
+ "type": "text",
1523
+ "text": "Our LSTM classifiers use 1 layer unidirectional LSTM and the number of hidden units is set to 128, 500, and 300 for SST-2, Yelp, and TACRED dataset respectively. For all models, we load the pretrained 300-dimensional Glove word vectors (Pennington et al., 2014). The language model sampler is also built on LSTM and have the same parameter settings as the classifiers. Our Transformer models are fine-tuned from pretrained BERT models (Devlin et al., 2018), which have 12 layers and 768 hidden units of per representation. On three datasets, LSTM models achieve $82 \\%$ accuracy, $9 5 \\%$ accuracy, and 0.64 F1 score on average. The fine-tuned BERT models achieve $92 \\%$ accuracy, $96 \\%$ accuracy, and 0.68 F1 score on average. We use the same parameter settings between LSTM classifiers and language models on three datasets. Following Murdoch et al. (2018), we randomly sample a subset (set to 500 instances) of sentences of length at most 40 words for explanation on Yelp dataset, and also for TACRED dataset. On TACRED dataset, we generate explanations only for correctly predicted instances with a label other than no relation. ",
1524
+ "bbox": [
1525
+ 174,
1526
+ 362,
1527
+ 825,
1528
+ 529
1529
+ ],
1530
+ "page_idx": 12
1531
+ },
1532
+ {
1533
+ "type": "text",
1534
+ "text": "B PERFORMANCE ON ADVERSARIAL MODELS ",
1535
+ "text_level": 1,
1536
+ "bbox": [
1537
+ 174,
1538
+ 549,
1539
+ 573,
1540
+ 564
1541
+ ],
1542
+ "page_idx": 12
1543
+ },
1544
+ {
1545
+ "type": "text",
1546
+ "text": "For computing context independent importance of a phrase, an intuitive and simple alternative approach, which is nevertheless neglected in prior literature, is to only feed the input to the model and treat the prediction score as the explanation. In Table 1, while the score of the Direct Feed is lower than that of the best performing algorithms, the score is rather competitive. ",
1547
+ "bbox": [
1548
+ 174,
1549
+ 580,
1550
+ 825,
1551
+ 636
1552
+ ],
1553
+ "page_idx": 12
1554
+ },
1555
+ {
1556
+ "type": "text",
1557
+ "text": "The potential risk of this explanation is that it assumes model performs reasonably on incomplete sentence fragments that are significantly out of the data distribution. As a result, the explanation of short phrases can be misleading. To simulate the situation, we train a LSTM model on inversed labels on isolate words, in addition to the original training instances. The model could achieve the same accuracy as the original LSTM model. However, the word $\\rho$ and the phrase $\\rho$ of Direct Feed drop by a large margin, showing a word $\\rho$ of -0.38 and 0.09. SOC and SCD are still robust on the adverse LSTM model, both showing a word $\\rho$ and phrase $\\rho$ of more than 0.60 and 0.55. ",
1558
+ "bbox": [
1559
+ 174,
1560
+ 643,
1561
+ 825,
1562
+ 741
1563
+ ],
1564
+ "page_idx": 12
1565
+ },
1566
+ {
1567
+ "type": "text",
1568
+ "text": "The masking operation could also cause performance drop because the masked sentence can be out of data distribution when explaining long phrases. For SOC, the risk can be resolved by implementing the masking operation of the phrase $\\mathbf { p }$ by another round of sampling from a language model conditioned on its context $\\mathbf { x } _ { - \\mathbf { p } }$ , but we do not find empirical evidence showing that it improves performance. ",
1569
+ "bbox": [
1570
+ 174,
1571
+ 747,
1572
+ 823,
1573
+ 818
1574
+ ],
1575
+ "page_idx": 12
1576
+ },
1577
+ {
1578
+ "type": "text",
1579
+ "text": "C EXPLANATION HEATMAPS ",
1580
+ "bbox": [
1581
+ 176,
1582
+ 837,
1583
+ 428,
1584
+ 853
1585
+ ],
1586
+ "page_idx": 12
1587
+ },
1588
+ {
1589
+ "type": "table",
1590
+ "img_path": "images/eb0e7d91b00c030f5f2c0d378eb33fab84f6b6ce2d9cc8e324128f0d1d904c64.jpg",
1591
+ "table_caption": [
1592
+ "Table 2: Correlation between averaged word & phrase importance attribution and linear model coefficients and human annotations over all 2210 test instances in SST-2 dataset. The relative performance is similar to the case without score averaging as shown in Table 1. "
1593
+ ],
1594
+ "table_footnote": [],
1595
+ "table_body": "<table><tr><td>Model</td><td colspan=\"2\">BERT</td><td colspan=\"2\">LSTM</td></tr><tr><td>Metric</td><td>word pavg</td><td>phrase pavg</td><td>word pavg</td><td>phrase pavg</td></tr><tr><td>Input Occlusion</td><td>0.2947</td><td>0.4365</td><td>0.7150</td><td>0.4968</td></tr><tr><td>GradSHAP</td><td>0.5444</td><td>0.6078</td><td>0.7360</td><td>0.5449</td></tr><tr><td>CD</td><td>0.3642</td><td>0.3755</td><td>0.6962</td><td>0.4777</td></tr><tr><td>ACD</td><td>0.3023</td><td>0.3913</td><td>0.3210</td><td>0.2110</td></tr><tr><td>SCD</td><td>0.5601</td><td>0.6072</td><td>0.7348</td><td>0.5685</td></tr><tr><td>SOC</td><td>0.6282</td><td>0.6706</td><td>0.7430</td><td>0.5675</td></tr></table>",
1596
+ "bbox": [
1597
+ 259,
1598
+ 128,
1599
+ 736,
1600
+ 244
1601
+ ],
1602
+ "page_idx": 13
1603
+ },
1604
+ {
1605
+ "type": "image",
1606
+ "img_path": "images/e8b4f32408df2f1b030936982ece21d34f16bbbc518325d9ecd5d5daad1e7f74.jpg",
1607
+ "image_caption": [
1608
+ "Figure 8: More examples about rule extraction from LSTM models trained on TACRED relation extraction dataset with SOC. Red indicate evidence for predicting the class, and blue indicate distractor for predicting the class. By applying the agglomerative clustering algorithm and defining a threshold score, we effectively extract classification rules from LSTM models. The ground truth label noted on the top "
1609
+ ],
1610
+ "image_footnote": [],
1611
+ "bbox": [
1612
+ 179,
1613
+ 366,
1614
+ 816,
1615
+ 616
1616
+ ],
1617
+ "page_idx": 13
1618
+ },
1619
+ {
1620
+ "type": "table",
1621
+ "img_path": "images/44ded41954b80a468951b87ea90596e84651b756884fecf178acfc6d2aef2c75.jpg",
1622
+ "table_caption": [
1623
+ "Table 3: Phrase-level classification patterns extracted from models. We show the results of SCD and SOC respectively for the SST-2 and the TACRED dataset. "
1624
+ ],
1625
+ "table_footnote": [],
1626
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Dataset</td><td rowspan=1 colspan=1>Label</td><td rowspan=1 colspan=1>Pattern</td></tr><tr><td rowspan=1 colspan=1>SST-2</td><td rowspan=1 colspan=1>PositiveNegative</td><td rowspan=1 colspan=1>frighteningly evocative; insight and honestyneither funny nor provocative; kill the suspense</td></tr><tr><td rowspan=1 colspan=1>TACRED</td><td rowspan=1 colspan=1>person:ageorganization:top-memberperson:origin</td><td rowspan=1 colspan=1>[PERSON],[NUMBER], was; a [NUMBER] manchief engineer of the [ORGANIZATION][Nationality] citizen; tribal member from [COUNTRY]</td></tr></table>",
1627
+ "bbox": [
1628
+ 173,
1629
+ 765,
1630
+ 825,
1631
+ 853
1632
+ ],
1633
+ "page_idx": 13
1634
+ },
1635
+ {
1636
+ "type": "image",
1637
+ "img_path": "images/ebbb122c87e8fe4ddab4b2afc711ab36a4142275691f31d787b01508f00073ed.jpg",
1638
+ "image_caption": [],
1639
+ "image_footnote": [],
1640
+ "bbox": [
1641
+ 186,
1642
+ 209,
1643
+ 821,
1644
+ 313
1645
+ ],
1646
+ "page_idx": 14
1647
+ },
1648
+ {
1649
+ "type": "image",
1650
+ "img_path": "images/5b87050b839727ad8d24a7779bc8f4d652fd4bb997b56e0cbaf723eafb9f9090.jpg",
1651
+ "image_caption": [],
1652
+ "image_footnote": [],
1653
+ "bbox": [
1654
+ 184,
1655
+ 352,
1656
+ 823,
1657
+ 457
1658
+ ],
1659
+ "page_idx": 14
1660
+ },
1661
+ {
1662
+ "type": "image",
1663
+ "img_path": "images/953c5224ded7e8b4e45151ba2414ae85141a4010e926886359f1659336d7bd0f.jpg",
1664
+ "image_caption": [],
1665
+ "image_footnote": [],
1666
+ "bbox": [
1667
+ 184,
1668
+ 496,
1669
+ 821,
1670
+ 602
1671
+ ],
1672
+ "page_idx": 14
1673
+ },
1674
+ {
1675
+ "type": "image",
1676
+ "img_path": "images/15ec0991ea99fa3d3c5c11c725104d79f4758cfb788eef1b8accc4628de5bc9d.jpg",
1677
+ "image_caption": [
1678
+ "Figure 9: Explanation heatmaps generated by SOC, SCD, CD, and GradSHAP on a negatively predicted sentence by BERT Transformer model in SST-2 dataset. Only SOC and SCD captures adversarial conjunction connected by “but”. "
1679
+ ],
1680
+ "image_footnote": [],
1681
+ "bbox": [
1682
+ 184,
1683
+ 637,
1684
+ 823,
1685
+ 763
1686
+ ],
1687
+ "page_idx": 14
1688
+ }
1689
+ ]
parse/train/BkxRRkSKwr/BkxRRkSKwr_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BkxRRkSKwr/BkxRRkSKwr_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SklD9yrFPS/SklD9yrFPS.md ADDED
@@ -0,0 +1,433 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # NEURAL TANGENTS: FAST AND EASY INFINITE NEURAL NETWORKS IN PYTHON
2
+
3
+ Roman Novak∗, Lechao Xiao∗, Jiri Hron†, Jaehoon Lee,
4
+
5
+ Alexander A. Alemi, Jascha Sohl-Dickstein, Samuel S. Schoenholz∗
6
+
7
+ Google Brain, †University of Cambridge
8
+
9
+ {romann, xlc}@google.com, jh2084@cam.ac.uk, {jaehlee, alemi, jaschasd, schsam}@google.com
10
+
11
+ # ABSTRACT
12
+
13
+ NEURAL TANGENTS is a library for working with infinite-width neural networks. It provides a high-level API for specifying complex and hierarchical neural network architectures. These networks can then be trained and evaluated either at finitewidth as usual or in their infinite-width limit. Infinite-width networks can be trained analytically using exact Bayesian inference or using gradient descent via the Neural Tangent Kernel. Additionally, NEURAL TANGENTS provides tools to study gradient descent training dynamics of wide but finite networks in either function space or weight space.
14
+
15
+ The entire library runs out-of-the-box on CPU, GPU, or TPU. All computations can be automatically distributed over multiple accelerators with near-linear scaling in the number of devices. NEURAL TANGENTS is available at
16
+
17
+ www.github.com/google/neural-tangents
18
+
19
+ We also provide an accompanying interactive Colab notebook1.
20
+
21
+ # 1 INTRODUCTION
22
+
23
+ Deep neural networks (DNNs) owe their success in part to the broad availability of high-level, flexible, and efficient software libraries like Tensorflow (Abadi et al., 2015), Keras (Chollet et al., 2015), PyTorch.nn (Paszke et al., 2017), Chainer (Tokui et al., 2015; Akiba et al., 2017), JAX (Bradbury et al., 2018a), and others. These libraries enable researchers to rapidly build complex models by constructing them out of smaller primitives. The success of new machine learning approaches will similarly depend on developing sophisticated software tools to support them.
24
+
25
+ # 1.1 INFINITE-WIDTH BAYESIAN NEURAL NETWORKS
26
+
27
+ Recently, a new class of machine learning models has attracted significant attention, namely, deep infinitely wide neural networks. In the infinite-width limit, a large class of Bayesian neural networks become Gaussian Processes (GPs) with a specific, architecture-dependent, compositional kernel; these models are called Neural Network Gaussian Processes (NNGPs). This correspondence was first established for shallow fully-connected networks by Neal (1994) and was extended to multilayer setting in (Lee et al., 2018; Matthews et al., 2018b). Since then, this correspondence has been expanded to a wide range of nonlinearities (Matthews et al., 2018a; Novak et al., 2019) and architectures including those with convolutional layers (Garriga-Alonso et al., 2019; Novak et al., 2019), residual connections (Garriga-Alonso et al., 2019), pooling (Novak et al., 2019), as well as graph neural networks (Du et al., 2019). The results for individual architectures have subsequently been generalized, and it was shown that a GP correspondence holds for a general class of networks that can be mapped to so-called tensor programs in (Yang, 2019). The recurrence relationship defining the NNGP kernel has additionally been extensively studied in the context of mean field theory and initialization (Cho & Saul, 2009; Daniely et al., 2016; Poole et al., 2016; Schoenholz et al., 2016; Yang & Schoenholz, 2017; Xiao et al., 2018; Li & Nguyen, 2019; Pretorius et al., 2018; Hayou et al., 2018; Karakida et al., 2018; Blumenfeld et al., 2019; Hayou et al., 2019).
28
+
29
+ # 1.2 INFINITE-WIDTH NEURAL NETWORKS TRAINED BY GRADIENT DESCENT
30
+
31
+ In addition to enabling a closed form description of Bayesian neural networks, the infinite-width limit has also very recently provided insights into neural networks trained by gradient descent. In the last year, several papers have shown that randomly initialized neural networks trained with gradient descent are characterized by a distribution that is related to the NNGP, and is described by the so-called Neural Tangent Kernel (NTK) (Jacot et al., 2018; Lee et al., 2019; Chizat et al., 2019), a kernel which was implicit in some earlier papers (Li & Liang, 2018; Allen-Zhu et al., 2018; Du et al., 2018a;b; Zou et al., 2019). In addition to this “function space” perspective, a dual, “weight space” view on the wide network limit was proposed in Lee et al. (2019) which showed that networks under gradient descent were well-described by the first-order Taylor series about their initial parameters.
32
+
33
+ # 1.3 PROMISE AND PRACTICAL BARRIERS TO WORKING WITH INFINITE-WIDTH NETWORKS
34
+
35
+ Combined, these discoveries established infinite-width networks as useful theoretical tools to understand a wide range of phenomena in deep learning. Furthermore, the practical utility of these models has been proven by achieving state-of-the-art performance on image classification benchmarks among GPs without trainable kernels (Garriga-Alonso et al., 2019; Novak et al., 2019; Arora et al., 2019a), and by their ability to match or exceed the performance of finite width networks in some situations, especially for fully- and locally-connected model families (Lee et al., 2018; Novak et al., 2019; Arora et al., 2019b).
36
+
37
+ However, despite their utility, using NNGPs and NTK-GPs is arduous and can require weeks-tomonths of work by seasoned practitioners. Kernels corresponding to neural networks must be derived by hand on a per-architecture basis. Overall, this process is laborious and error prone, and is reminiscent of the state of neural networks before high quality Automatic Differentiation (AD) packages proliferated.
38
+
39
+ # 1.4 SUMMARY OF CONTRIBUTIONS
40
+
41
+ In this paper, we introduce a new open-source software library called NEURAL TANGENTS targeting JAX (Bradbury et al., 2018a) to accelerate research on infinite limits of neural networks. The main features of NEURAL TANGENTS are:2
42
+
43
+ • A high-level neural network API for specifying complex, hierarchical, models. Networks specified using this API can have their infinite-width NNGP kernel and NTK evaluated analytically (§2.1, Listings $1 , 2 , 3 , \ S \mathrm { B } . 2 )$ .
44
+ • Functions to approximate infinite-width kernels by Monte Carlo sampling for networks whose kernels cannot be constructed analytically. These methods are agnostic to the neural network library used to build the network and are therefore quite versatile (§2.2, Figure 2, $\ S _ { \mathrm { B } . 5 ) }$ .
45
+ • An API to analytically perform inference using infinite-width networks either by computing the Bayesian posterior or by computing the result of continuous gradient descent with an MSE loss. The API additionally includes tools to perform inference by numerically solving the ODEs corresponding to: continuous gradient descent, with-or-without momentum, on arbitrary loss functions, at finite or infinite time (§2.1, Figure 1, §B.4).
46
+ • Functions to compute arbitrary-order Taylor series approximations to neural networks about a given setting of parameters to explore the weight space perspective on the infinite-width limit (§B.6, Figure 6).
47
+ • Leveraging XLA, our library runs out-of-the-box on CPU, GPU, or TPU. Kernel computations can automatically be distributed over multiple accelerators with near-perfect scaling (§3.2, Figure 5, §B.3).
48
+
49
+ We begin with three short examples (§2) that demonstrate the ease, efficiency, and versatility of performing calculations with infinite networks using NEURAL TANGENTS. With a high level view of the library in hand, we then dive into a number of technical aspects of our library (§3).
50
+
51
+ # 1.5 BACKGROUND
52
+
53
+ We briefly describe the NNGP (§1.1) and NTK (§1.2). NNGP. Neural networks are often structured as affine transformations followed by pointwise applications of nonlinearities. Let $z _ { i } ^ { l } ( x )$ describe the $i ^ { \mathrm { { t h } } }$ pre-activation following a linear transformation in $l ^ { \mathrm { t h } }$ layer of a neural network. At initialization, the parameters of the network are randomly distributed and so central-limit theorem style arguments can be used to show that the pre-activations become Gaussian distributed with mean zero and are therefore described entirely by their covariance matrix $\mathcal { K } ( x , x ^ { \prime } ) = \mathbb { E } [ z _ { i } ^ { l } ( x ) z _ { i } ^ { l } ( x ^ { \prime } ) ]$ . This describes a NNGP with the kernel, $\boldsymbol { \kappa } ( \boldsymbol { x } , \boldsymbol { x } ^ { \prime } )$ . One can use the NNGP to make Bayesian posterior predictions at a test point, $x$ , which are Gaussian distributed with with mean $\mu ( x ) \overset { \cdot } { = } \mathcal { K } ( x , \overset { \cdot } { \mathcal { X } } ) \mathcal { K } ( \mathcal { X } , \overset { \cdot } { \mathcal { X } } ) ^ { - 1 } \mathcal { Y }$ and variance $\overset { \vartriangle } { \boldsymbol { \sigma } ^ { 2 } } ( \boldsymbol { x } ) = \boldsymbol { { K } } ( \boldsymbol { x } , \boldsymbol { x } ) - \boldsymbol { { K } } ( \boldsymbol { x } , \boldsymbol { \mathcal { X } } ) \boldsymbol { { K } } ( \boldsymbol { \mathcal { X } } , \boldsymbol { \mathcal { X } } ) ^ { - 1 } \boldsymbol { { K } } ( \boldsymbol { \mathcal { X } } , \boldsymbol { x } )$ , where $( \mathcal { X } , \mathcal { Y } )$ is the training set of inputs and targets respectively. NTK. When neural networks are optimized using continuous gradient descent with learning rate $\eta$ on mean squared error (MSE) loss, the function evaluated on training points evolves as $\bar { \partial _ { t } } f _ { t } ( \boldsymbol { \mathcal { X } } ) \stackrel { } { = } - \eta J _ { t } ( \boldsymbol { \mathcal { X } } ) \boldsymbol { \bar { J } } _ { t } ( \boldsymbol { \mathcal { X } } ) ^ { T } \left( f _ { t } ( \boldsymbol { \mathcal { X } } ) - \boldsymbol { \mathcal { Y } } \right)$ where $J _ { t } ( \mathcal { X } )$ is the Jacobian of the output $f _ { t }$ evaluated at $\mathcal { X }$ and $\Theta _ { t } ( \chi , \chi ) = J _ { t } ( \chi ) J _ { t } ( \chi ) ^ { T }$ is the NTK. In the infinite-width limit, the NTK remains constant ( $\Theta _ { t } = \Theta$ ) throughout training and the time-evolution of the outputs can be solved in closed form as a Gaussian with mean $f _ { t } ( x ) { \overset { \vartriangle } { = } } \Theta ( x , \chi ) \Theta ( \chi , \chi ) ^ { - 1 } \left( I - \exp \left[ { \bar { - } } \eta \Theta ( \chi , \chi ) t \right] \right) \mathcal { V }$ .
54
+
55
+ # 2 EXAMPLES
56
+
57
+ We begin by applying NEURAL TANGENTS to several example tasks. While these tasks are designed for pedagogy rather than research novelty, they are nonetheless emblematic of problems regularly faced in research. We emphasize that without NEURAL TANGENTS, it would be necessary to derive the kernels for each architecture by hand.
58
+
59
+ # 2.1 INFERENCE WITH AN INFINITELY WIDE NEURAL NETWORK
60
+
61
+ We begin by training an infinitely wide neural network with gradient descent and comparing the result to training an ensemble of wide-but-finite networks. This example is worked through in detail in the Colab notebook.3
62
+
63
+ We train on a synthetic dataset with training data drawn from the process $y _ { i } = \sin ( x _ { i } ) + \epsilon _ { i }$ with $x _ { i } \sim \mathrm { U n i f o r m } ( - \pi , \pi )$ and $\epsilon _ { i } \sim \mathcal { N } ( 0 , \sigma ^ { 2 } )$ independently and identically distributed. To train an infinite neural network with Erf activations4 on this data using gradient descent and an MSE loss we write the following:
64
+
65
+ <table><tr><td> from neural_tangents import predict, stax</td></tr><tr><td>init_fn,apply_fn,kernel_fn = stax.serial(</td></tr><tr><td>stax.Dense(2048,W_std=1.5,b_std=0.05),stax.Erf(),</td></tr><tr><td>stax.Dense(2048,W_std=1.5,b_std=0.05),stax.Erf(),</td></tr><tr><td>stax.Dense(1,W_std=1.5,b_std=0.05))</td></tr><tr><td>y_mean,y_var = predict.gp_inference(kernel_fn,x_train,y_train,x_test,&#x27;ntk&#x27;,</td></tr><tr><td>diag_reg=1e-4, compute_cov=True)</td></tr></table>
66
+
67
+ The above code analytically generates the predictions that would result from performing gradient descent for an infinite amount of time. However, it is often desirable to investigate finite-time learning dynamics of deep networks. This is also supported in NEURAL TANGENTS as illustrated in the following snippet:
68
+
69
+ ![](images/7d36a9ebaef8635c9861217c8e5aed9fa2b89fba7c2f995a7a97c3809d483331.jpg)
70
+ Figure 1: Training dynamics for an ensemble of finite-width networks compared with an infinite network. Left: Mean and variance of the train and test MSE loss evolution throughout training. Right: Comparison between the predictions of the trained infinite network and the respective ensemble of finite-width networks. The shaded region and the dashed lines denote two standard deviations of uncertainty in the predictions for the infinite network and the ensemble respectively.
71
+
72
+ predict_fn $=$ predict.gradient_descent_mse_gp(kernel_fn, x_train, y_train, x_test, 'ntk', diag_reg=1e-4, compute_cov=True) y_mean, y_var $=$ predict_fn $t = 1 0 0$ ) # Predict the distribution at $t ~ = ~ 1 0 0$ .
73
+
74
+ The above specification set the hidden layer widths to 2048, which has no effect on the infinite width network inference, but the init_fn and apply_fn here correspond to ordinary finite width networks. In Figure 1 we compare the result of this exact inference with training an ensemble of one-hundred of these finite-width networks by looking at the training curves and output predictions of both models. We see excellent agreement between exact inference using the infinite-width model and the result of training an ensemble using gradient descent.
75
+
76
+ # 2.2 AN INFINITELY WIDERESNET
77
+
78
+ The above example considers a relatively simple network on a synthetic task. In practice we may want to consider real-world architectures, and see how close they are to their infinite-width limit. For this task we study a variant of an infinite-channel Wide Residual Network (Zagoruyko & Komodakis, 2016) (WRN-28- $\infty$ ). We first define both finite and infinite models within Listing 1.
79
+
80
+ We now study how quickly the kernel of the finite-channel WideResNet approaches its infinite channel limit. We explore two different axes along which convergence takes place: first, as a function of the number of channels (as measured by the widening factor, $k$ ) and second as a function of the number of finite-network Monte Carlo samples we average over. NEURAL TANGENTS makes it easy to compute MC averages of finite kernels using the following snippet:
81
+
82
+ <table><tr><td>kernel_fn = nt.monte_carlo_kernel_fn(init_fn,apply_fn,rng_key,n_samples) sampled_kernel = kernel_fn(x,x)</td></tr></table>
83
+
84
+ The convergence is shown in Figure 2. We see that as both the number of samples is increased or the network is made wider, the empirical kernel approaches the kernel of the infinite network. As noted in Novak et al. (2019), for any finite widening factor the MC estimate is biased. Here, however, the bias is small relative to the variance and the distance to the empirical kernel decreases with the number of samples.
85
+
86
+ # 2.3 COMPARISON OF NEURAL NETWORK ARCHITECTURES AND TRAINING SET SIZES
87
+
88
+ The above examples demonstrate how one might construct a complicated architecture and perform inference using NEURAL TANGENTSNext we train a range of architectures on CIFAR-10 and compare ˙ their performance as a function of dataset size. In particular, we compare a fully-connected network, a convolutional network whose penultimate layer vectorizes the image, and the wide-residual network described above. In each case, we perform exact infinite-time inference using the analytic infinitewidth NNGP or NTK. For each architecture we perform a hyperparameter search over the depth of the network, selecting the depth that maximizes the marginal log likelihood on the training set.
89
+
90
+ <table><tr><td>def WideResNetBlock(channels,strides=(1,1),channel_mismatch=False): Main = stax.serial(stax.Relu(),stax.Conv(channels,(3,3),strides,padding=&#x27;SAME&#x27;),</td></tr><tr><td>stax.Relu(),stax.Conv(channels,(3,3),padding=&#x27;SAME&#x27;))</td></tr><tr><td>Shortcut = (stax.Identity() if not channel_mismatch else</td></tr><tr><td>stax.Conv(channels,(3,3),strides,padding=&#x27;SAME&#x27;))</td></tr><tr><td>return stax.serial(stax.FanOut(2),stax.parallel(Main, Shortcut),stax.FanInSum())</td></tr><tr><td>def WideResNetGroup(n,channels,strides=(1,1)):</td></tr><tr><td>blocks = [WideResNetBlock(channels,strides,channel_mismatch=True)] for _ in range(n - 1):</td></tr><tr><td>blocks += [WideResNetBlock(channels,(1,1))]</td></tr><tr><td>return stax.serial(*blocks)</td></tr><tr><td>def WideResNet(block_size,k,num_classes):</td></tr><tr><td>return stax.serial(stax.Conv(16,(3,3),padding=&#x27;SAME&#x27;),</td></tr><tr><td>WideResNetGroup(block_size,int(16 * k)),</td></tr><tr><td>WideResNetGroup(block_size,int(32 * k),(2,2)),</td></tr><tr><td></td></tr><tr><td>WideResNetGroup(block_size,int(64 * k),(2,2)),</td></tr><tr><td>stax.GlobalAvgPool(),stax.Dense(num_classes))</td></tr></table>
91
+
92
+ ![](images/738fe4a412750c34dacc5e1c9ef2b36afa70499b22dde2e0f8b6f15b8d6beb80.jpg)
93
+ Listing 1: Definition of an infinitely WideResNet. This snippet simultaneously defines a finite ( init_fn, apply_fn ) and an infinite ( kernel_fn ) model. This model is used in Figures 2 and 3.
94
+ Figure 2: Convergence of the Monte Carlo (MC) estimates of the WideResNet WRN-28- $k$ (where $k$ is the widening factor) NNGP and NTK kernels (computed with monte_carlo_kernel_fn ) to their analytic values (WRN-28- $\mathbf { \nabla } \cdot \infty$ , computed with kernel_fn ), as the network gets wider by increasing the widening factor (vertical axis) and as more random networks are averaged over (horizontal axis). Experimental detail. The kernel is computed in 32-bit precision on a $1 0 0 \times 5 0$ batch of $8 \times 8$ -downsampled CIFAR10 (Krizhevsky, 2009) images. For sampling efficiency, for NNGP the output of the penultimate layer was used, and for NTK the output layer was assumed to be of dimension 1 (all logits are i.i.d. conditioned on a given input). The displayed distance is the relative Frobenius norm squared, i.e. $\| \mathcal { K } - \mathcal { K } _ { k , n } \| _ { \mathrm { F } } ^ { 2 } / \| \mathcal { K } \| _ { \mathrm { F } } ^ { 2 }$ , where $k$ is the widening factor and $n$ is the number of samples.
95
+
96
+ ![](images/523d59030611f20a9a2e0d09b3b9c2c0cdd81d32b1b1b67b3639518fa4145f05.jpg)
97
+ Figure 3: CIFAR-10 classification with varying neural network architectures. NEURAL TANGENTS simplify experimentation with architectures. Here we use infinite time NTK inference and full Bayesian NNGP inference for CIFAR-10 for Fully Connected (FC, Listing 3), Convolutional network without pooling (CONV, Listing 2), and Wide Residual Network w/ pooling (WRESNET, Listing 1). As is common in prior work (Lee et al., 2018; Novak et al., 2019), the classification task is treated as MSE regression on zero-mean targets like $( - 0 . 1 , \ldots , - 0 . 1 , 0 . 9 , - 0 . 1 , \ldots , - 0 . 1 )$ . For each training set size, the best model in the family is selected by minimizing the mean negative marginal log-likelihood (NLL, right) on the training set.
98
+
99
+ The results are shown in Figure 3. We see that in each case the performance of the model increases approximately logarithmically in the size of the dataset. Moreover, we observe a clear hierarchy of performance, especially at large dataset size, in terms of architecture (FC < CONV $<$ WRESNET w/ pooling).
100
+
101
+ # 3 IMPLEMENTATION: TRANSFORMING TENSOR OPS TO KERNEL OPS
102
+
103
+ Neural networks are compositions of basic tensor operations such as: dense or convolutional affine transformations, application of pointwise nonlinearities, pooling, or normalization. For most networks without weight tying between layers the kernel computation can also be written compositionally and there is a direct correspondence between tensor operations and kernel operations (see $\ S$ for an example). The core logic of NEURAL TANGENTS is a set of translation rules, that sends each tensor operation acting on a finite-width layer to a corresponding transformation of the kernel for an infinite-width network. This is illustrated in Figure 4 for a simple convolutional architecture. In the associated table, we compare tensor operations (second column) with corresponding transformations of the NT and NNGP kernel tensors (third and fourth column respectively). See $\ S _ { \mathrm { D } }$ for a list of all tensor operations for which translation rules are currently implemented.
104
+
105
+ One subtlety to consider when designing networks is that most infinite-width results require nonlinear transformations to be preceded by affine transformations (either dense or convolutional). This is because infinite-width results often assume that the pre-activations of nonlinear layers are approximately Gaussian. Randomness in weights and biases causes the output of infinite affine layers to satisfy this Gaussian requirement. Fortunately, prefacing nonlinear operations with affine transformations is common practice when designing neural networks and NEURAL TANGENTS will raise an error if this requirement is not satisfied.
106
+
107
+ # 3.1 A TASTE OF TENSOR-TO-KERNEL OPS TRANSLATION
108
+
109
+ To get some intuition behind the translation rules, we consider the case of a nonlinearity followed by a dense layer. Let $z = z \left( \mathcal { X } , \theta \right) \in \mathbb { R } ^ { d \times n }$ be the preactivations resulting from $d$ distinct inputs at a node in some hidden layer of a neural network. Suppose $z$ has NNGP kernel and NTK given by
110
+
111
+ $$
112
+ \mathcal { K } _ { z } = \mathbb { E } _ { \theta } \left[ z _ { i } z _ { i } ^ { T } \right] , \quad \Theta _ { z } = \mathbb { E } _ { \theta } \left[ \frac { \partial z _ { i } } { \partial \theta } \left( \frac { \partial z _ { i } } { \partial \theta } \right) ^ { T } \right]
113
+ $$
114
+
115
+ where $z _ { i } ~ \in ~ \mathbb { R } ^ { d }$ is the $i ^ { \mathrm { { t h } } }$ neuron and $\theta$ are the parameters in the network up until $z$ . Here $d$ is the cardinality of the network inputs $\mathcal { X }$ and $n$ is the number of neurons in the $z$ node. We nonlinear interactions between spatially-distant pixels at shallow depths (left). Values are rep• Pooling enforces translation-invariant Figure 4: An example of the translation of a convolutional neural network into a sequence of on a 2K/4K train/validation subsets of CIFAR10. See §A.7.3 for experimental details.• For other architectures we use a Monte Carlo approach. Sampling finite random networks of a given architecture and predictions in both CNNs and CNN-kernel operations. We demonstrate how the compositional nature of a typical NN computation on its empirically computing the output covariance allows to performance.inputs induces a corresponding compositional computation on the NNGP and NT kernels. Presented 1. Global aver(biased) estimate converges to the true CNN-GP covariance in • Shallow CNN models can perform is a 2-hidden-layer 1D CNN with nonlinearity $\phi$ pooling: take h = 1d1d. Then, performing regression on the 10-dimensional outputs $z ^ { 2 }$ nstantiated networks) and #channels, both in terms of variance Frobenius distance and the GP accuracy.rse than fully-connectedernatives due to failing to capture for each of the 4 (1, 2, 3, 4) inputs $x$ from the dataset $\mathcal { X }$ 2 (attaching a fully-connected layer . To declutter notation, unit weight K 1 ⌘ d2Figure 2: Validation accuracy (left) of an MC-Figure 2: Validation accuracy (left) of annon-linear interactions between and zero bias variances are assumed in all layers. Top: recursive output $( z ^ { 2 } )$ ↵,↵0 + b . P increases with n M (i.e. channNN-GP increases with n M (i.e. c only to the center pixel of the output) computation in the CNN times number of sa(right) to the exactimes numbe(right) to the(top) induces a respective recursive NNGP kernel $( \bar { \tilde { \mathcal { K } } } ^ { 2 } \otimes I _ { 1 0 } )$ roaches that of the exact CNN-GP (not shown), while the des. The dark band in the left plot corresponds to ill-condd approaches that of the exact CNN-GP (not shown), whilecreases. The dark band in the left plot corresponds to ill- computation (NTK computation being tional layer.8 This approach takes all pixel-pixel covariances into consideration and m of KL+1 when the number of outer products contributing to KL+1 approximately equals i of KL+1 when the number of outer products contributing to KL+1 approximately eqFigure 1: Different dimensionality collapsing strategies described in §3. Validation accuraUnder review as a conference paper at ICLR 2019Under review as a conference paper at ICLR 2019similar, not shown). Bottom: explicit listing of tensor and corresponding kernel ops in each layer. the kernel translation invariant. However, it requires O |X |2d2 memory to computValues reported are for a 3-layer model applied to a 2K/4K train/validation subset of CIValues reported are for a 3-layer model applied to a 2K/4K train/validation subset § invariance of the kernel. CNN-GP with zero padding ( 3.1) outperforms an analogous C4. Computing the NN-GP covarianceSee Table 1 for operation definitions. Illustration and description adapted from Figure 3 in Novak et al. (2019).
116
+
117
+ ![](images/dc33197d54e9fa73da24e373d18f1fc7c1cc2e91400e0870ddf2b1d21bfcc05f.jpg)
118
+ ubsampling, zero or no padding(not always necessary to track the whole 4x4x10x10 covariance.)
119
+
120
+ <table><tr><td>Layer</td><td>Tensor Op</td><td>NNGP Op</td><td>NTK Op</td></tr><tr><td>0 (input)</td><td>y=x</td><td>K=xxT</td><td>0°=0</td></tr><tr><td>O (pre-activations)</td><td>z° = Conv (y°)</td><td>=A(x°)</td><td>=+A(0°)</td></tr><tr><td>1 (activations)</td><td>y¹=(2°)</td><td>K1=T(xo)</td><td>01=↑(x0)①0</td></tr><tr><td>1 (pre-activations)</td><td>z1 = Conv (y1)</td><td>K1 =A(x1)</td><td>1=¹+A(01)</td></tr><tr><td>2 (activations)</td><td>y²=(21)</td><td>K²=T(x1)</td><td>0²=T(x1)0θ1</td></tr><tr><td>2 (readout)</td><td>z² = Dense o Flatten (y2)</td><td>K² = Tr(K²)</td><td>² =² +Tr(0²)</td></tr></table>
121
+
122
+ assume $z$ e↵ 2 ⇥ L+1 ⇤ 2 the Monte Carlo-GP (MC-GP) kernel, the Monte Carlo-GP (MC-GP) kernel,depth, as information becomes more uniformly spatially distributed (Xiao et al., 2018). CNNNN-GP with no pooling can be computed using is a mean zero multivariate Gaussian. We wish to compute the kernel corresponding to $h =$ Dense $\bigl ( \sigma _ { \omega } , \sigma _ { b } \bigr ) \bigl ( \phi ( z ) \bigr )$ nonlinear interactions between spatialby computing the kernels of $y = \phi ( z )$ 1 n1 M ls at shand $h =$ b epths (lefDense $\left( \sigma _ { \omega } , \sigma _ { b } \right) \left( y \right)$ • For other archiSampling finiteseparately. Here,
123
+
124
+ $$
125
+ h = \mathrm { D e n s e } ( \sigma _ { \omega } , \sigma _ { b } ) ( y ) \equiv \left( 1 / \sqrt { n } \right) \sigma _ { \omega } W y + \sigma _ { b } \beta ,
126
+ $$
127
+
128
+ covariance Froand the variables $W _ { i j }$ distanceand $\beta _ { i }$ analogous to §2 (Lee et a the GP accuracy.are i.i.d. Gaussian $\mathcal { N } ( 0 , 1 )$ tthews et al., 2018b).n!1 n,M 1 n!1 n,M 1 pool 2! X ⇥ L+1 ⇤ 2(#NN instantiations). We will compute kernel operations - denoted $\phi ^ { * }$ and Dense $( \sigma _ { \omega } , \sigma _ { b } ) ^ { * }$ For finite width networks, the uncertainty i⇥For finite width networks, the uncerta1 d2Figure 2: Validation accuracy (left) of an MFigure 2: Validation accuracy (left) o - induced by the tensor operations $\phi$ Kn,M is Var K⇤ 1y in Kn,M is V⇥ l ⇤ 1↵0 1 ↵,↵0 -CNN-GP incren MC-CNN-GPand Dense $( \sigma _ { \omega } , \sigma _ { b } )$ ✓ Kn (✓) /M .l= Var✓ Kn (✓)lM (i.e. channh n ⇥ M (i.e. c5. Finally, 4 MONTE CARLO EVALUATION OF INTRACT ✓ n / finite n, Kl is also a biased estimate of Kl , wher ✓ n finite n, Kl is also a biased estimate of Kl ,This approach corresponds to applying global av(right) to the exact kernel decreases. The dark band i(right) to the exact kernel decreases. The dark bwe will compute the kernel operation associated with the composition $( \mathrm { D e n s e } ( \sigma _ { \omega } , \dot { \sigma _ { b } } ) \circ \phi ) ^ { * } \stackrel { \cdot } { = }$ Dense $( \sigma _ { \omega } , \sigma _ { b } ) ^ { * } \circ \phi ^ { * }$ .
129
+
130
+ to traditional randomis nearly constais nearly csample-samdownsampled to downsampFirst we compute the NNGP and NT kernels for $y$ ature methods (Rafor constant Mn. stant for constant e covariance of the⇥ 8. See Figure d to 8 ⇥ 8. See Fi. To compute $\mathcal { K } _ { y }$ & Recht, 2007), the core idea is to instann,M us treat M n as the effective sample size fWe thus treat M n as the effective sampleor O d2 per covariance entry in an itera similar results with other architectures a7 for similar results with other architectunote that from its definition,
131
+
132
+ $$
133
+ \begin{array} { r } { \mathcal { K } _ { y } = \mathcal { K } _ { \phi ( z ) } = \mathbb { E } _ { \theta } \left[ \phi ( z ) _ { i } \phi ( z ) _ { i } ^ { T } \right] = \mathbb { E } _ { \theta } [ \phi ( z _ { i } ) \phi ( z _ { i } ) ^ { T } ] = \mathcal { T } ( \mathcal { K } _ { z } ) . } \end{array}
134
+ $$
135
+
136
+ Since $\phi$ O ⇣ |X |2 d2 O ⇣ |Xthe Monte Cthe Mdoes not introduce any new variables $\Theta _ { y }$ ⇣ |X |2 + n2 + nd ⌘ , making th⌘ to O ⇣ |X |2 + n2 + nd ⌘, makKe↵1 ⌘ 2! ⇥GP (MC-GP) kernel,Carlo-GP (MC-GP) kernel,can be computed as,
137
+
138
+ $$
139
+ \begin{array} { r } { \Theta _ { y } = \mathbb { E } _ { \theta } \left[ \frac { \partial \phi ( z _ { i } ) } { \partial \theta } \left( \frac { \partial \phi ( z _ { i } ) } { \partial \theta } \right) ^ { T } \right] = \mathbb { E } _ { \theta } \left[ \mathrm { d i a g } ( \dot { \phi } ( z _ { i } ) ) \frac { \partial z _ { i } } { \partial \theta } \left( \frac { \partial z _ { i } } { \partial \theta } \right) ^ { T } \mathrm { d i a g } ( \dot { \phi } ( z _ { i } ) ) \right] = \dot { \mathcal { T } } ( K _ { z } ) \odot \Theta _ { z } . } \end{array}
140
+ $$
141
+
142
+ LocallyLanalogous to Taken together these equations imply that,
143
+
144
+ $$
145
+ ( \mathcal { K } _ { y } , \Theta _ { y } ) = \phi ^ { * } \left( \mathcal { K } _ { z } , \Theta _ { z } \right) \equiv \left( \mathcal { T } ( \mathcal { K } _ { z } ) , \dot { \mathcal { T } } ( \mathcal { K } _ { z } ) \odot \Theta _ { z } \right)
146
+ $$
147
+
148
+ $^ 5 \mathcal { T } \left( \Sigma \right) \equiv \mathbb { E } \left[ \phi ( u ) \phi ( u ) ^ { T } \right] , \dot { \mathcal { T } } \left( \Sigma \right) \equiv \mathbb { E } \left[ \phi ^ { \prime } ( u ) \phi ^ { \prime } ( u ) ^ { T } \right] , u \sim \mathcal { N } \left( 0 , \Sigma \right) .$ § §xel covariances. LCNs destroy p§ §el-pixel covariances. LCNs deswe do not know the analytic forative to the variance. In particulaall relative to the variance. In par, as in (Lee et al., 2019).
149
+
150
+ will be the translation rule for a pointwise nonlinearity. Note that Equation Equation 4 only has an analytic expression for a small set of activation functions $\phi$ .
151
+
152
+ Next we consider the case of a dense operation. Using the independence between the weights, the biases, and $h$ it follows that,
153
+
154
+ $$
155
+ \mathcal { K } _ { h } = \mathbb { E } _ { W , \beta , \theta } [ h _ { i } h _ { i } ^ { T } ] = \sigma _ { \omega } ^ { 2 } \mathbb { E } _ { \theta } [ y _ { i } y _ { i } ^ { T } ] + \sigma _ { b } ^ { 2 } = \sigma _ { \omega } ^ { 2 } \mathcal { K } _ { y } + \sigma _ { b } ^ { 2 } .
156
+ $$
157
+
158
+ Finally, the NTK of $h$ can be computed as a sum of two terms:
159
+
160
+ $$
161
+ \Theta _ { h } = \mathbb { E } _ { W , \beta , \theta } \left[ \frac { \partial h _ { i } } { \partial ( W , \beta ) } \left( \frac { \partial h _ { i } } { \partial ( W , \beta ) } \right) ^ { T } \right] + \mathbb { E } _ { W , \beta , \theta } \left[ \frac { \partial h _ { i } } { \partial \theta } \left( \frac { \partial h _ { i } } { \partial \theta } \right) ^ { T } \right] = \sigma _ { \omega } ^ { 2 } K _ { y } + \sigma _ { b } ^ { 2 } + \sigma _ { \omega } ^ { 2 } \Theta _ { y } .
162
+ $$
163
+
164
+ This gives the translation rule for the dense layer in terms of $\mathcal { K } _ { y }$ and $\Theta _ { y }$ as,
165
+
166
+ $$
167
+ \begin{array} { r } { ( K _ { h } , \theta _ { h } ) = \mathrm { D e n s e } ( \sigma _ { \omega } , \sigma _ { b } ) ^ { * } \left( K _ { y } , \theta _ { y } \right) \equiv \left( \sigma _ { \omega } ^ { 2 } K _ { y } + \sigma _ { b } ^ { 2 } , \sigma _ { \omega } ^ { 2 } K _ { y } + \sigma _ { b } ^ { 2 } + \sigma _ { \omega } ^ { 2 } \Theta _ { y } \right) . } \end{array}
168
+ $$
169
+
170
+ # 3.2 PERFORMANCE
171
+
172
+ Our library performs a number of automatic performance optimizations without sacrificing flexibility.
173
+
174
+ Leveraging block-diagonal covariance structure. A common computational challenge with GPs is inverting the training set covariance matrix. Naively, for a classification task with $C$ classes and training set $\mathcal { X }$ , NNGP and NTK covariances have the shape of $| \mathcal { X } | C \times | \mathcal { X } | C$ . For CIFAR-10, this would be $5 0 0 , 0 0 0 \times 5 0 0 , 0 0 0$ . However, if a fully-connected readout layer is used (which is an extremely common design in classification architectures), the $C$ logits are i.i.d. conditioned on the input $x$ . This results in outputs that are normally distributed with a block-diagonal covariance matrix of the form $\Sigma \otimes I _ { C }$ , where $\Sigma$ has shape $| { \mathcal { X } } | \times | { \mathcal { X } } |$ and $I _ { C }$ is the $C \times C$ identity matrix. This reduces the computational complexity and storage in many common cases by an order of magnitude, which makes closed-form exact inference feasible in these cases.
175
+
176
+ Automatically tracking only the smallest necessary subset of intermediary covariance entries. For most architectures, especially convolutional, the main computational burden lies in constructing the covariance matrix (as opposed to inverting it). Specifically for a convolutional network of depth $l$ , constructing the $| { \mathcal { X } } | \times | { \mathcal { X } } |$ output covariance matrix, $\Sigma$ , involves computing $l$ intermediate layer covariance matrices, $\Sigma ^ { l }$ , of size $| \mathcal { X } | d \times | \mathcal { X } | d$ (see Listing 1 for a model requiring this computation) where $d$ is the total number of pixels in the intermediate layer outputs (e.g. $d = 1 0 2 4$ in the case of CIFAR-10 with SAME padding). However, as Xiao et al. (2018); Novak et al. (2019); GarrigaAlonso et al. (2019) remarked, if no pooling is used in the network the output covariance $\Sigma$ can be computed by only using the stack of $d$ $| { \mathcal { X } } | \times | { \mathcal { X } } |$ -blocks of $\Sigma ^ { l }$ , bringing the time and memory cost from $O ( \left| \mathcal { X } \right| ^ { 2 } d ^ { 2 } )$ down to $\mathcal { O } ( | \mathcal { X } | ^ { 2 } d )$ per layer (see Figure 4 and Listing 2 for models admitting this optimization). Finally, if the network has no convolutional layers, the cost further reduces to $\mathcal { O } ( | \mathcal { X } | ^ { 2 } )$ (see Listing 3 for an example). These choices are performed automatically by NEURAL TANGENTS to achieve efficient computation and minimal memory footprint.
177
+
178
+ Expressing covariance computations as 2D convolutions with optimal layout. A key insight to high performance in convolutional models is that the covariance propagation operator for convolutional layers $\mathcal { A }$ can be expressed in terms of 2D convolutions when it operates on both the full $| \mathcal { X } | d \times | \mathcal { X } | d$ covariance matrix $\Sigma$ , and on the $d$ diagonal $| { \mathcal { X } } | \times | { \mathcal { X } } |$ -blocks. This allows utilization of modern hardware accelerators, many of which target 2D convolutions as their primary machine learning application.
179
+
180
+ Simultaneous NNGP and NT kernel computations. As NTK computation requires the NNGP covariance as an intermediary computation, the NNGP covariance is computed together with the NTK at no extra cost. This is especially convenient for researchers looking to investigate similarities and differences between these two infinite-width NN limits.
181
+
182
+ Automatic batching and parallelism across multiple devices. In most cases as the dataset or model becomes large, it is impossible to perform the entire kernel computation at once. Additionally, in many cases it is desirable to parallelize the kernel computation across devices (CPUs, GPUs, or TPUs). NEURAL TANGENTS provides an easy way to perform both of these common tasks using a single batch decorator shown below:
183
+
184
+ ![](images/f2aeeade5bdd8d9bd5879621efb00e2d1a10bd0f64e6d393af477cfc20888164.jpg)
185
+ Figure 5: Performance scaling with batch size (left) and number of GPUs (right). Shows time per entry needed to compute the analytic NNGP and NTK covariance matrices (using kernel_fn ) in a 21-layer ReLU network with global average pooling. Left: Increasing the batch size when computing the covariance matrix in blocks allows for a significant performance increase until a certain threshold when all cores in a single GPU are saturated. Simpler models are expected to have better scaling with batch size. Right: Time-per-sample scales linearly with the number of GPUs, demonstrating near-perfect hardware utilization.
186
+
187
+ <table><tr><td>batched_kernel_fn = nt.batch(kernel_fn,batch_size) batched_kernel_fn(x,x) == kernel_fn(x,x) # True!</td></tr></table>
188
+
189
+ This code works with either analytic kernels or empirical kernels. By default, it automatically shares the computation over all available devices. We plot the performance as a function of batch size and number of accelerators when computing the theoretical NTK of a 21-layer convolutional network in Figure 5, observing near-perfect scaling with the number of accelerators.
190
+
191
+ Op fusion. JAX and XLA allow end-to-end compilation of the whole kernel computation and/or inference. This enables the XLA compiler to fuse low-level ops into custom model-specific accelerator kernels, as well as eliminating overhead from op-by-op dispatch to an accelerator. In similar vein, we allow the covariance tensor to change its order of dimensions from layer to layer, with the order tracked and parsed as additional metadata under the hood. This eliminates redundant transpositions6 by adjusting the computation performed by each layer based on the input metadata.
192
+
193
+ # 4 CONCLUSION
194
+
195
+ We believe NEURAL TANGENTS will enable researchers to quickly and easily explore infinite-width networks. By democratizing this previously challenging model family, we hope that researchers will begin to use infinite neural networks, in addition to their finite counterparts, when faced with a new problem domain (especially in cases that are data-limited). In addition, we are excited to see novel uses of infinite networks as theoretical tools to gain insight and clarity into many of the hard theoretical problems in deep learning. Going forward, there are significant additions to NEURAL TANGENTS that we are exploring. There are more layers we would like to add in the future $( \ S _ { \mathrm { { D } } } )$ that will enable an even larger range of infinite network topologies. Additionally, there are further performance improvements we would like to implement, to allow experimenting with larger models and datasets. We invite the community to join our efforts by contributing new layers to the library (§B.7), or by using it for research and providing feedback!
196
+
197
+ # ACKNOWLEDGMENTS
198
+
199
+ We thank Yasaman Bahri for frequent discussion and useful feedback on the manuscript. We additionally appreciate both Yasaman Bahri and Greg Yang for the ongoing contributions to improve the library. We thank Sergey Ioffe for feedback on the text, as well as Ravid Ziv, and Jeffrey Pennington for discussion and feedback on early versions of the library.
200
+
201
+ # REFERENCES
202
+
203
+ Martín Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S. Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Ian Goodfellow, Andrew Harp, Geoffrey Irving, Michael Isard, Yangqing Jia, Rafal Jozefowicz, Lukasz Kaiser, Manjunath Kudlur, Josh Levenberg, Dan Mané, Rajat Monga, Sherry Moore, Derek Murray, Chris Olah, Mike Schuster, Jonathon Shlens, Benoit Steiner, Ilya Sutskever, Kunal Talwar, Paul Tucker, Vincent Vanhoucke, Vijay Vasudevan, Fernanda Viégas, Oriol Vinyals, Pete Warden, Martin Wattenberg, Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. TensorFlow: Large-scale machine learning on heterogeneous systems, 2015. URL http://tensorflow.org/. Software available from tensorflow.org.
204
+
205
+ Takuya Akiba, Keisuke Fukuda, and Shuji Suzuki. ChainerMN: Scalable Distributed Deep Learning Framework. In Proceedings of Workshop on ML Systems in The Thirty-first Annual Conference on Neural Information Processing Systems (NIPS), 2017. URL http://learningsys.org/nips17/ assets/papers/paper_25.pdf.
206
+
207
+ Zeyuan Allen-Zhu, Yuanzhi Li, and Zhao Song. A convergence theory for deep learning via overparameterization. In International Conference on Machine Learning, 2018.
208
+
209
+ Anonymous. Infinite attention: Nngp and ntk for deep attention networks. In International Conference on Machine Learning (ICML), 2020. submission under review.
210
+
211
+ Sanjeev Arora, Simon S Du, Wei Hu, Zhiyuan Li, Ruslan Salakhutdinov, and Ruosong Wang. On exact computation with an infinitely wide neural net. In Advances In Neural Information Processing Systems, 2019a.
212
+
213
+ Sanjeev Arora, Simon S. Du, Zhiyuan Li, Ruslan Salakhutdinov, Ruosong Wang, and Dingli Yu. Harnessing the power of infinitely wide deep nets on small-data tasks, 2019b.
214
+
215
+ Yaniv Blumenfeld, Dar Gilboa, and Daniel Soudry. A mean field theory of quantized deep networks: The quantization-depth trade-off. arXiv preprint arXiv:1906.00771, 2019.
216
+
217
+ James Bradbury, Roy Frostig, Peter Hawkins, Matthew James Johnson, Chris Leary, Dougal Maclaurin, and Skye Wanderman-Milne. JAX: composable transformations of Python+NumPy programs, 2018a. URL http://github.com/google/jax.
218
+
219
+ James Bradbury, Roy Frostig, Peter Hawkins, Matthew James Johnson, Chris Leary, Dougal Maclaurin, and Skye Wanderman-Milne. Stax, a flexible neural net specification library in jax, 2018b. URL https://github.com/google/jax/blob/master/jax/experimental/stax.py.
220
+
221
+ Lenaic Chizat, Edouard Oyallon, and Francis Bach. On lazy training in differentiable programming. arXiv preprint arXiv:1812.07956, 2019.
222
+
223
+ Youngmin Cho and Lawrence K Saul. Kernel methods for deep learning. In Advances In Neural Information Processing Systems, 2009.
224
+
225
+ François Chollet et al. Keras. https://keras.io, 2015.
226
+
227
+ Amit Daniely, Roy Frostig, and Yoram Singer. Toward deeper understanding of neural networks: The power of initialization and a dual view on expressivity. In Advances In Neural Information Processing Systems, pp. 2253–2261, 2016.
228
+
229
+ Simon S Du, Jason D Lee, Haochuan Li, Liwei Wang, and Xiyu Zhai. Gradient descent finds global minima of deep neural networks. arXiv preprint arXiv:1811.03804, 2018a.
230
+
231
+ Simon S Du, Xiyu Zhai, Barnabas Poczos, and Aarti Singh. Gradient descent provably optimizes over-parameterized neural networks. arXiv preprint arXiv:1810.02054, 2018b.
232
+
233
+ Simon S Du, Kangcheng Hou, Russ R Salakhutdinov, Barnabas Poczos, Ruosong Wang, and Keyulu Xu. Graph neural tangent kernel: Fusing graph neural networks with graph kernels. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett (eds.), Advances in Neural Information Processing Systems 32, pp.
234
+
235
+ 5724–5734. Curran Associates, Inc., 2019. URL http://papers.nips.cc/paper/ 8809-graph-neural-tangent-kernel-fusing-graph-neural-networks-with-graph-kernels. pdf.
236
+
237
+ Jacob R Gardner, Geoff Pleiss, David Bindel, Kilian Q Weinberger, and Andrew Gordon Wilson. Gpytorch: Blackbox matrix-matrix gaussian process inference with gpu acceleration. In Advances in Neural Information Processing Systems, 2018.
238
+
239
+ Adrià Garriga-Alonso, Carl Edward Rasmussen, and Laurence Aitchison. Deep convolutional networks as shallow gaussian processes. In International Conference on Learning Representations, 2019.
240
+
241
+ GPy. GPy: A gaussian process framework in python. http://github.com/SheffieldML/GPy, 2012.
242
+
243
+ Soufiane Hayou, Arnaud Doucet, and Judith Rousseau. On the selection of initialization and activation function for deep neural networks. arXiv preprint arXiv:1805.08266, 2018.
244
+
245
+ Soufiane Hayou, Arnaud Doucet, and Judith Rousseau. Mean-field behaviour of neural tangent kernel for deep neural networks, 2019.
246
+
247
+ Arthur Jacot, Franck Gabriel, and Clément Hongler. Neural tangent kernel: Convergence and generalization in neural networks. In Advances in neural information processing systems, 2018.
248
+
249
+ Ryo Karakida, Shotaro Akaho, and Shun-ichi Amari. Universal statistics of fisher information in deep neural networks: mean field approach. 2018.
250
+
251
+ Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, 2009.
252
+
253
+ Jaehoon Lee, Yasaman Bahri, Roman Novak, Sam Schoenholz, Jeffrey Pennington, and Jascha Sohl-dickstein. Deep neural networks as gaussian processes. In International Conference on Learning Representations, 2018.
254
+
255
+ Jaehoon Lee, Lechao Xiao, Samuel S. Schoenholz, Yasaman Bahri, Roman Novak, Jascha SohlDickstein, and Jeffrey Pennington. Wide neural networks of any depth evolve as linear models under gradient descent. In Advances in neural information processing systems, 2019.
256
+
257
+ Ping Li and Phan-Minh Nguyen. On random deep weight-tied autoencoders: Exact asymptotic analysis, phase transitions, and implications to training. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id=HJx54i05tX.
258
+
259
+ Yuanzhi Li and Yingyu Liang. Learning overparameterized neural networks via stochastic gradient descent on structured data. In Advances in Neural Information Processing Systems, pp. 8157–8166, 2018.
260
+
261
+ Alexander G. de G. Matthews, Mark van der Wilk, Tom Nickson, Keisuke. Fujii, Alexis Boukouvalas, Pablo Le‘on-Villagr‘a, Zoubin Ghahramani, and James Hensman. GPflow: A Gaussian process library using TensorFlow. Journal of Machine Learning Research, 18(40):1–6, apr 2017. URL http://jmlr.org/papers/v18/16-537.html.
262
+
263
+ Alexander G de G Matthews, Mark Rowland, Jiri Hron, Richard E Turner, and Zoubin Ghahramani. Gaussian process behaviour in wide deep neural networks. arXiv preprint arXiv:1804.11271, 2018a.
264
+
265
+ Alexander G. de G. Matthews, Jiri Hron, Mark Rowland, Richard E. Turner, and Zoubin Ghahramani. Gaussian process behaviour in wide deep neural networks. In International Conference on Learning Representations, 2018b.
266
+
267
+ Radford M. Neal. Priors for infinite networks (tech. rep. no. crg-tr-94-1). University of Toronto, 1994.
268
+
269
+ Roman Novak, Lechao Xiao, Jaehoon Lee, Yasaman Bahri, Greg Yang, Jiri Hron, Daniel A. Abolafia, Jeffrey Pennington, and Jascha Sohl-Dickstein. Bayesian deep convolutional networks with many channels are gaussian processes. In International Conference on Learning Representations, 2019.
270
+
271
+ Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. In NIPS-W, 2017.
272
+
273
+ Ben Poole, Subhaneil Lahiri, Maithra Raghu, Jascha Sohl-Dickstein, and Surya Ganguli. Exponential expressivity in deep neural networks through transient chaos. In Advances In Neural Information Processing Systems, 2016.
274
+
275
+ Arnu Pretorius, Elan van Biljon, Steve Kroon, and Herman Kamper. Critical initialisation for deep signal propagation in noisy rectifier neural networks. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett (eds.), Advances in Neural Information Processing Systems 31, pp. 5717–5726. Curran Associates, Inc., 2018. URL http://papers.nips.cc/paper/ 7814-critical-initialisation-for-deep-signal-propagation-in-noisy-rectifier-neural-networks. pdf.
276
+
277
+ Samuel S Schoenholz, Justin Gilmer, Surya Ganguli, and Jascha Sohl-Dickstein. Deep information propagation. arXiv preprint arXiv:1611.01232, 2016.
278
+
279
+ Seiya Tokui, Kenta Oono, Shohei Hido, and Justin Clayton. Chainer: a next-generation open source framework for deep learning. In Proceedings of Workshop on Machine Learning Systems (LearningSys) in The Twenty-ninth Annual Conference on Neural Information Processing Systems (NIPS), 2015. URL http://learningsys.org/papers/LearningSys_2015_paper_33.pdf.
280
+
281
+ Lechao Xiao, Yasaman Bahri, Jascha Sohl-Dickstein, Samuel Schoenholz, and Jeffrey Pennington. Dynamical isometry and a mean field theory of CNNs: How to train 10,000-layer vanilla convolutional neural networks. In International Conference on Machine Learning, 2018.
282
+
283
+ Lechao Xiao, Jeffrey Pennington, and Samuel S Schoenholz. Disentangling trainability and generalization in deep learning. arXiv preprint arXiv:1912.13053, 2019.
284
+
285
+ Ge Yang and Samuel Schoenholz. Mean field residual networks: On the edge of chaos. In Advances In Neural Information Processing Systems, 2017.
286
+
287
+ Greg Yang. Scaling limits of wide neural networks with weight sharing: Gaussian process behavior, gradient independence, and neural tangent kernel derivation. arXiv preprint arXiv:1902.04760, 2019.
288
+
289
+ Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. In Proceedings of the British Machine Vision Conference (BMVC), 2016.
290
+
291
+ Difan Zou, Yuan Cao, Dongruo Zhou, and Quanquan Gu. Gradient descent optimizes overparameterized deep relu networks. Machine Learning, Oct 2019. ISSN 1573-0565. doi: 10.1007/s10994-019-05839-6. URL https://doi.org/10.1007/s10994-019-05839-6.
292
+
293
+ # APPENDIX
294
+
295
+ A NEURAL TANGENTS AND PRIOR WORK
296
+
297
+ Here we briefly discuss the differences between NEURAL TANGENTS and the relevant prior work.
298
+
299
+ 1. Prior benchmarks in the domain of infinitely wide neural networks. Various prior works have evaluated convolutional and fully-connected models on certain datasets (Lee et al., 2018; Matthews et al., 2018b;a; Novak et al., 2019; Garriga-Alonso et al., 2019; Arora et al., 2019a). While these efforts must have required implementing certain parts of our library, to our knowledge such prior efforts were either not open-sourced or not comprehensive / user-friendly / scalable enough to be used as a user-facing library. In addition, all of the works above used their own separate implementation, which further highlights a need for a more general approach.
300
+
301
+ 2. Code released by Lee et al. (2019). Lee et al. (2019) have released code along with their paper submission, which is a strict and minor subset of our library. More specifically, at the time of the submission, Lee et al. (2019) have released code equivalent to nt.linearize , nt.empirical_ntk_fn , nt.predict.gradient_descent_mse , nt.predict.gradient_descent , and nt.predict.momentum . Every other part of the library (most notably, nt.stax ) is new in this submission and was not used by Lee et al. (2019) or any other prior work. At the time of writing, NEURAL TANGENTS differs from the code released by Lee et al. (2019) by about $+ 9 , 5 0 0 / - 2 , 5 0 0$ lines of code.
302
+
303
+ 3. GPy (2012), GPFlow (Matthews et al., 2017), GPyTorch (Gardner et al., 2018), and other GP packages. While various packages allowing for kernel construction, optimization, and inference with Gaussian Processes exist, none of them allow easy construction of the very specific kernels corresponding to infinite neural networks (NNGP/NTK; nt.stax ), nor do they provide the tools and convenience for studying wide but finite networks and their training dynamics ( nt.taylor_expand , nt.predict , nt.monte_carlo_kernel_fn ). On the other hand, NEURAL TANGENTS does not provide any tools for approximate inference with these kernels.
304
+
305
+ # B LIBRARY DESCRIPTION
306
+
307
+ NEURAL TANGENTS provides a high-level interface for specifying analytic, infinite-width, Bayesian and gradient descent trained neural networks as Gaussian Processes. This interface closely follows the stax API (Bradbury et al., 2018b) in JAX.
308
+
309
+ # B.1 NEURAL NETWORKS WITH JAX
310
+
311
+ stax represents each component of a network as two functions: init_fn and apply_fn . These components can be composed in serial or in parallel to produce new network components with their own init_fn and apply_fn . In this way, complicated neural network architectures can be specified hierarchically.
312
+
313
+ Calling init_fn on a random seed and an input shape generates a random draw of trainable parameters for a neural network. Calling apply_fn on these parameters and a batch of inputs returns the outputs of the given finite neural network.
314
+
315
+ from jax.experimental import stax
316
+ init_fn, apply_fn $=$ stax.serial(stax.Dense(512), stax.Relu, stax.Dense(10)) _, params $=$ init_fn(key, (-1, $3 2 \ \times \ 3 2 \ \times \ 3 )$ )
317
+ fx_train, fx_test $=$ apply_fn(params, x_train), apply_fn(params, x_test)
318
+
319
+ # B.2 INFINITE NEURAL NETWORKS WITH NEURAL TANGENTS
320
+
321
+ We extend stax layers to return a third function kernel_fn , which represents the covariance functions of the infinite NNGP and NTK networks of the given architecture (recall that since infinite networks are GPs, they are fully defined by their covariance functions, assuming 0 mean as is common in the literature).
322
+
323
+ from neural_tangents import stax init_fn, apply_fn, kernel_fn $=$ stax.serial(stax.Dense(512), stax.Relu(), stax.Dense(10))
324
+
325
+ We demonstrate a specification of a more complicated architecture (WideResNet) in Listing 1.
326
+
327
+ kernel_fn accepts two batches of inputs $\mathsf { x } \mathsf { 1 }$ and $\times 2$ and returns their NNGP covariance and NTK matrices as kernel_fn(x1, x2).nngp and kernel_fn(x1, x2).ntk respectively, which can then be used to make posterior test set predictions as the mean of a conditional multivariate normal $\mathcal { V } _ { \mathrm { t e s t } } = K \left( \mathcal { X } _ { \mathrm { t e s t } } , \mathcal { X } _ { \mathrm { t r a i n } } \right) \mathcal { K } \left( \mathcal { X } _ { \mathrm { t r a i n } } , \mathcal { X } _ { \mathrm { t r a i n } } \right) ^ { - 1 } \mathcal { Y } _ { \mathrm { t r a i n } }$ :
328
+
329
+ from jax.numpy.linalg import inv y_test $=$ kernel_fn(x_test, x_train).ntk @ inv(kernel_fn(x_train, x_train).ntk) @ y_train
330
+
331
+ Note that the above code does not do Cholesky decomposition and is presented merely to show the mathematical expression. We provide efficient GP inference method in the predict submodule:
332
+
333
+ import neural_tangents as nt y_test $=$ nt.predict.gp_inference(kernel_fn, x_train, y_train, x_test, get='ntk', diag_reg=1e-4, compute_cov=False)
334
+
335
+ # B.3 COMPUTING INFINITE NETWORK KERNELS IN BATCHES AND IN PARALLEL
336
+
337
+ Naively, the kernel_fn will compute the whole kernel in a single call on one device. However, for large datasets or complicated architectures, it is often necessary to distribute the calculation in some way. To do this, we introduce a batch decorator that takes a kernel_fn and returns a new kernel_fn with the exact same signature. The new function computes the kernel in batches and automatically parallelizes the calculation over however many devices are available, with near-perfect speedup scaling with the number of devices (Figure 5, right).
338
+
339
+ import neural_tangents as nt kernel_fn $=$ nt.batch(kernel_fn, batch_siz $: = 3 2$ )
340
+
341
+ Note that batching is often used to compute large covariance matrices that may not even fit on a GPU/TPU device, and require to be stored and used for inference using CPU RAM. This is easy to achieve by simply specifying nt.batch(..., store_on_device $=$ False) . Once the matrix is stored in RAM, inference will be performed with a CPU when nt.predict methods are called. As mentioned in $\ S \_$ , for many (notably, convolutional, and especially pooling) architectures, inference cost can be small relative to kernel construction, even when running on CPU (for example, it takes less than 3 minutes to execute jax.scipy.linalg.solve(..., sym_pos $=$ True) on a $4 5 , 0 0 0 \times 4 5 , 0 0 0$ training covariance matrix and a $1 5 , 0 0 0 \times 1 0$ training target matrix).
342
+
343
+ # B.4 TRAINING DYNAMICS OF INFINITE NETWORKS
344
+
345
+ In addition to closed form multivariate Gaussian posterior prediction, it is also interesting to consider network predictions following continuous gradient descent. To facilitate this we provide several functions to compute predictions following gradient descent with an MSE loss, for gradient descent with arbitrary loss, or for momentum with arbitrary loss. The first case is handled analytically, while the latter two are computed by numerically integrating the differential equation. For example, the following code will compute the function evaluation on train and test points following gradient descent for some time training_time .
346
+
347
+ import neural_tangents as nt predictor $=$ nt.predict.gradient_descent_mse(kernel_fn(x_train, x_train), y_train, fx_train, fx_test $=$ predictor(training_time, fx_train, fx_test)
348
+
349
+ # B.5 INFINITE NETWORKS OF ANY ARCHITECTURE THROUGH SAMPLING
350
+
351
+ Of course, there are cases where the analytic kernel cannot be computed. To support these situations, we provide utility functions to efficiently compute Monte Carlo estimates of the NNGP covariance and NTK. These functions work with neural networks constructed using any neural network library.
352
+
353
+ ![](images/c17cc4ca28a9ecabd2d48f765b403e3e5d5e94cf55a3ec2ddff9bdb4d684646b.jpg)
354
+ Figure 6: Training a neural network and its various approximations using nt.taylor_expand . Presented is a 5-layer Erf-neural network of width 512 trained on MNIST using SGD with momentum, along with its constant $\mathbf { 0 } ^ { \mathrm { t h } }$ order), linear $1 ^ { \mathrm { s t } }$ order), and quadratic ( $2 ^ { \mathrm { { \bar { n } d } } }$ order) Taylor expansions about the initial parameters. As training progresses (left to right), lower-order expansions deviate from the original function faster than higher-order ones.
355
+
356
+ from jax import random
357
+ from jax.experimental import stax
358
+ import neural_tangents as nt
359
+ init_fn, apply_fn $=$ stax.serial(stax.Dense(64), stax.BatchNorm(), stax.Sigmoid, stax.Dense(1))
360
+ kernel_fn $=$ nt.monte_carlo_kernel_fn(init_fn, apply_fn, key=random.PRNGKey(1), n_samples=128)
361
+ kernel $=$ kernel_fn(x_train, x_train)
362
+
363
+ We demonstrate convergence of the Monte Carlo kernel estimates to the closed-form analytic kernels in the case of a WideResNet in Figure 2.
364
+
365
+ # B.6 WEIGHTS OF WIDE BUT FINITE NETWORKS
366
+
367
+ While most of NEURAL TANGENTS is devoted to a function-space perspective—describing the distribution of function values on finite collections of training and testing points—we also provide tools to investigate a dual weight space perspective described in Lee et al. (2019). Convergence of dynamics to NTK dynamics coincide with networks being described by a linear approximation about their initial set of parameters. We provide decorators linearize and taylor_expand to approximate functions to linear order and to arbitrary order respectively. Both functions take an apply_fn and returns a new apply_fn that computes the series approximation.
368
+
369
+ <table><tr><td>import neural_tangents as nt</td></tr><tr><td>taylor_apply_fn = nt.taylor_expand(apply_fn,params,order)</td></tr><tr><td></td></tr><tr><td>fx_train_approx = taylor_apply_fn(new_params,x_train)</td></tr></table>
370
+
371
+ These act exactly like normal JAX functions and, in particular, can be plugged into gradient descent, which we demonstrate in Figure 6.
372
+
373
+ # B.7 EXTENDING NEURAL TANGENTS
374
+
375
+ Many neural network layers admit a sensible infinite-width limit behavior in the Bayesian and continuous gradient descent regimes as long as the multivariate central limit theorem applies to their outputs conditioned on their inputs. To add such layer to NEURAL TANGENTS, one only has to implement it as a method in nt.stax with the following signature:
376
+
377
+ @_layer # an internal decorator taking care of certain boilerplate. NewLayer(layer_params: Any) $- >$ (init_fn: function, apply_fn: function, kernel_fn: function)
378
+
379
+ Here init_fn and apply_fn are initialization and the forward pass methods of the finite width layer implementation (see $\ S \_$ ). If the layer of interest already exists in JAX, there is no need to implement these methods and the user can simply return the respective methods from jax.experimental.stax (see nt.stax.Flatten for an example; in fact the majority of nt.stax layers call the original jax.experimental.stax layers for finite width layer methods).
380
+
381
+ In this case what remains is to implement the kernel_fn method with signature kernel_fn(input_kernel: nt.utils.Kernel) $- >$ output_kernel: nt.utils.Kernel
382
+
383
+ Here both input_kernel and output_kernel are namedtuple s containing the NNGP and NTK covariance matrices, as well as additional metadata useful for computing the kernel propagation operation. The specific operation to be performed should be derived by the user in the context of the particular operation that the finite width layer performs. This transformation could be as simple as an affine map on the kernel matrices, but could also be analytically intractable.
384
+
385
+ Once implemented, the correctness of the implementation can be very easily tested by extending the nt.tests.stax_test with the new layer, to test the agreement with large-widths empirical NNGP and NTK kernels.
386
+
387
+ # C ARCHITECTURE SPECIFICATIONS
388
+
389
+ ![](images/d585927bbb68e78beafbe748b4f3bef6a93431aab58b8ffd852c009811ca0f71.jpg)
390
+
391
+ # Listing 2: All-convolutional model (ConvOnly) definition used in Figure 3.
392
+
393
+ ![](images/801935c1a7f572e98ea1b04abd0aa36b4a882b17bb6136e81444e1ea54c600df.jpg)
394
+ Listing 3: Fully-connected (FC) model definition used in Figure 3.
395
+
396
+ D IMPLEMENTED AND COMING SOON FUNCTIONALITY
397
+
398
+ The following layers7 are currently implemented, with translation rules given in Table 1:
399
+
400
+ serial
401
+ parallel
402
+ FanOut
403
+ FanInSum
404
+ FanInConcat
405
+ Dense
406
+ Conv with arbitrary filter shapes, strides, dimension numbers, and padding8
407
+ Relu
408
+ LeakyRelu
409
+ Abs
410
+ ABRelu
411
+ Erf
412
+ Identity
413
+ Flatten
414
+ AvgPool
415
+ GlobalAvgPool
416
+ SumPool
417
+ GlobalSumPool
418
+ Dropout
419
+ LayerNorm
420
+ GlobalSelfAttention (Anonymous, 2020)
421
+
422
+ The following is in our near-term plans:
423
+
424
+ Exp , Elu , Selu , Gelu • Apache Beam support.
425
+
426
+ The following layers do not have known closed-form expressions for infinite network covariances, and respective infinite networks have to be estimated empirically (via nt.monte_carlo_kernel_fn ) or using other approximations (not currently implemented):
427
+
428
+ <table><tr><td>Tensor Op</td><td>NNGP Op</td><td>NTK Op</td></tr><tr><td>x</td><td>K</td><td>Θ</td></tr><tr><td>Dense(σw, b)</td><td>²K+²</td><td>(²K+²)+²Θ</td></tr><tr><td>?</td><td>T(K)</td><td>T(K)0Θ</td></tr><tr><td>Dropout(p)</td><td></td><td>K +(¹-1)Diag()Θ+(¹-1) Diag(θ)</td></tr><tr><td>Conv(σw, Ob)</td><td>²A(K)+²</td><td>²A(K)+σ²+σ²A(0)</td></tr><tr><td>Flatten</td><td>Tr(K)</td><td>Tr(K + Θ)</td></tr><tr><td>AvgPool(s, q, p)</td><td>AvgPool(s, q, p)(KC)</td><td>AvgPool(s, q, p)(K + Θ)</td></tr><tr><td>GlobalAvgPool</td><td>GlobalAvgPool(KC)</td><td>GlobalAvgPool(K + Θ)</td></tr><tr><td>SumPool(s, q,p)</td><td>SumPool(s,q, p)(K)</td><td>SumPool(s,q, p)(K + Θ)</td></tr><tr><td>GlobalSumPool</td><td>GlobalSumPool(KC)</td><td>GlobalSumPool(K + Θ)</td></tr><tr><td>Attn(σQk, σov)</td><td>Attn(σQk, σov)(K)</td><td>2Attn(σQk, σov)(K)+</td></tr><tr><td>(Anonymous, 2020)</td><td></td><td>Attn(σqk, σov)(0)</td></tr><tr><td>FanInSum(X1,..., Xn)</td><td>银份 Σj=1Kj</td><td>Σ-10j</td></tr><tr><td>FanOut(n)</td><td>[K] * n</td><td>[0] * n</td></tr></table>
429
+
430
+ Table 1: Translation rules (§3) converting tensor operations into operations on NNGP and NTK kernels. Here the input tensor $\mathcal { X }$ is assumed to have shape $| { \mathcal { X } } | \times { \bf { \bar { H } } } \times W \times C$ (dataset size, height, width, number of channels), and the full NNGP and NT kernels $\kappa$ and $\tau$ are considered to be of shape $( | \mathcal { X } | \times H \times W ) ^ { \times 2 }$ (in practice shapes of $| \mathcal { X } | ^ { \times 2 } \times H \times W$ and $| \mathcal { X } | ^ { \times 2 }$ are also possible, depending on which optimizations in $\ S \_$ are applicable). Notation details. The $\mathrm { T r }$ , GlobalAvgPool, and GlobalSumPool ops are assumed to act on all spatial axes (with sizes $H$ and $W$ in this example), producing a $| \mathcal { X } | ^ { \times 2 }$ -kernel. Similarly, the AvgPool and SumPool ops is assumed to act on all spatial axes as well, applying the specified strides $s$ , pooling window sizes $p$ and padding strategy $p$ to the respective axes pairs in $\kappa$ and $\tau$ (acting as 4D pooling with replicated parameters of the 2D version). $\tau$ and $\dot { \tau }$ are defined identically to Lee et al. (2019) as $\mathcal { T } ( \bar { \Sigma ) } = \mathbb { E } \left[ \bar { \phi ( u ) } \phi ( u ) ^ { T } \right] , \bar { \mathcal { T } } ( \Sigma ) =$ $\mathbb { E } \left[ \phi ^ { \prime } ( u ) \phi ^ { \prime } ( u ) ^ { T } \right] , u \sim \mathcal { N } ( 0 , \Sigma )$ . These expressions can be evaluated in closed form for many nonlinearities, and preserve the shape of the kernel. The $\mathcal { A }$ op is defined similarly to Novak et al. (2019); Xiao et al. (2018) as $\begin{array} { r } { \big [ \boldsymbol { A } \left( \boldsymbol { \Sigma } \right) \big ] _ { h , h ^ { \prime } } ^ { w , w ^ { \prime } } \left( \boldsymbol { x } , \boldsymbol { x } ^ { \prime } \right) = \sum _ { d h , d w } \left[ \boldsymbol { \Sigma } \right] _ { h + d h , h ^ { \prime } + d h } ^ { w + d w , w ^ { \prime } + d w } \left( \boldsymbol { x } , \boldsymbol { x } ^ { \prime } \right) / q ^ { 2 } } \end{array}$ , where the summation is performed over the convolutional filter receptive field with $q$ pixels (we assume unit strides and circular padding in this expression, but generalization to other settings is trivial and supported by the library). $[ \bar { \Sigma } ] \ast n = [ \Sigma , \dots , \Sigma ]$ ( $\stackrel { \cdot } { n }$ -fold replication). For LayerNorm, FanInConcat, and Attn (Anonymous, 2020) translation rules we refer the reader to our code at https://github. com/google/neural-tangents, as these ops are challenging to express concisely using current notation. See Figure 4 for an example of applying the translation rules to a specific model, and $\ S 3 . 1$ for deriving a sample translation rule. See $\ S _ { \mathrm { D } }$ for the full list of currently implemented translations.
431
+
432
+ ![](images/e0402f1bf50c30aac42c3079031ac3d57a8f61244a949dc9969238f42522e5ec.jpg)
433
+ Figure 7: Predictive negative log-likelihoods and condition numbers. Top. Test negative loglikelihoods for NNGP posterior and Gaussian predictive distribution for NTK at infinite training time for CIFAR-10 (test set of 2000 points). Fully Connected (FC, Listing 3) and Convolutional network without pooling (CONV, Listing 2) models are selected based on train marginal negative log-likelihoods in Figure 3. Bottom. Condition numbers for covariance matrices corresponding to NTK/NNGP as well as respective predictive covaraince on the test set. Ill-conditioning of Wide Residual Network kernels due to pooling layers (Xiao et al., 2019) could be the cause of numerical issues when evaluating predictive NLL for this kernels.
parse/train/SklD9yrFPS/SklD9yrFPS_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SklD9yrFPS/SklD9yrFPS_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SklD9yrFPS/SklD9yrFPS_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/T6AxtOaWydQ/T6AxtOaWydQ.md ADDED
@@ -0,0 +1,527 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # $i$ -MIX: A DOMAIN-AGNOSTIC STRATEGYFOR CONTRASTIVE REPRESENTATION LEARNING
2
+
3
+ Kibok Lee1,2 Yian Zhu1 Kihyuk Sohn3 Chun-Liang $\mathbf { L i ^ { 3 } }$ Jinwoo $\mathbf { S h i n ^ { 4 } }$ Honglak Lee1,5 1University of Michigan 2Amazon Web Services 3Google Cloud AI 4KAIST $^ { 5 } \mathrm { L } \bar { \mathrm { G } }$ AI Research 1 {kibok,yianz,honglak}@umich.edu 3 {kihyuks,chunliang}@google.com 2kibok@amazon.com 4jinwoos@kaist.ac.kr 5honglak@lgresearch.ai
4
+
5
+ # ABSTRACT
6
+
7
+ Contrastive representation learning has shown to be effective to learn representations from unlabeled data. However, much progress has been made in vision domains relying on data augmentations carefully designed using domain knowledge. In this work, we propose $i$ -Mix, a simple yet effective domain-agnostic regularization strategy for improving contrastive representation learning. We cast contrastive learning as training a non-parametric classifier by assigning a unique virtual class to each data in a batch. Then, data instances are mixed in both the input and virtual label spaces, providing more augmented data during training. In experiments, we demonstrate that $i$ -Mix consistently improves the quality of learned representations across domains, including image, speech, and tabular data. Furthermore, we confirm its regularization effect via extensive ablation studies across model and dataset sizes. The code is available at https://github.com/kibok90/imix.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Representation learning (Bengio et al., 2013) is a fundamental task in machine learning since the success of machine learning relies on the quality of representation. Self-supervised representation learning (SSL) has been successfully applied in several domains, including image recognition (He et al., 2020; Chen et al., 2020a), natural language processing (Mikolov et al., 2013; Devlin et al., 2018), robotics (Sermanet et al., 2018; Lee et al., 2019), speech recognition (Ravanelli et al., 2020), and video understanding (Korbar et al., 2018; Owens & Efros, 2018). Since no label is available in the unsupervised setting, pretext tasks are proposed to provide self-supervision: for example, context prediction (Doersch et al., 2015), inpainting (Pathak et al., 2016), and contrastive learning (Wu et al., 2018b; Hjelm et al., 2019; He et al., 2020; Chen et al., 2020a). SSL has also been used as an auxiliary task to improve the performance on the main task, such as generative model learning (Chen et al., 2019), semi-supervised learning (Zhai et al., 2019), and improving robustness and uncertainty (Hendrycks et al., 2019).
12
+
13
+ Recently, contrastive representation learning has gained increasing attention by showing state-ofthe-art performance in SSL for large-scale image recognition (He et al., 2020; Chen et al., 2020a), which outperforms its supervised pre-training counterpart (He et al., 2016) on downstream tasks. However, while the concept of contrastive learning is applicable to any domains, the quality of learned representations rely on the domain-specific inductive bias: as anchors and positive samples are obtained from the same data instance, data augmentation introduces semantically meaningful variance for better generalization. To achieve a strong, yet semantically meaningful data augmentation, domain knowledge is required, e.g., color jittering in 2D images or structural information in video understanding. Hence, contrastive representation learning in different domains requires an effort to develop effective data augmentations. Furthermore, while recent works have focused on largescale settings where millions of unlabeled data is available, it would not be practical in real-world applications. For example, in lithography, acquiring data is very expensive in terms of both time and cost due to the complexity of manufacturing process (Lin et al., 2018; Sim et al., 2019).
14
+
15
+ Meanwhile, MixUp (Zhang et al., 2018) has shown to be a successful data augmentation for supervised learning in various domains and tasks, including image classification (Zhang et al., 2018), generative model learning (Lucas et al., 2018), and natural language processing (Guo et al., 2019; Guo, 2020).
16
+
17
+ In this paper, we explore the following natural, yet important question: is the idea of MixUp useful for unsupervised, self-supervised, or contrastive representation learning across different domains?
18
+
19
+ To this end, we propose instance $M i x \left( i – M i x \right)$ , a domain-agnostic regularization strategy for contrastive representation learning. The key idea of $i$ -Mix is to introduce virtual labels in a batch and mix data instances and their corresponding virtual labels in the input and label spaces, respectively. We first introduce the general formulation of $i$ -Mix, and then we show the applicability of $i$ -Mix to state-ofthe-art contrastive representation learning methods, SimCLR (Chen et al., 2020a) and MoCo (He et al., 2020), and a self-supervised learning method without negative pairs, BYOL (Grill et al., 2020).
20
+
21
+ Through the experiments, we demonstrate the efficacy of $i$ -Mix in a variety of settings. First, we show the effectiveness of $i$ -Mix by evaluating the discriminative performance of learned representations in multiple domains. Specifically, we adapt $i$ -Mix to the contrastive representation learning methods, advancing state-of-the-art performance across different domains, including image (Krizhevsky & Hinton, 2009; Deng et al., 2009), speech (Warden, 2018), and tabular (Asuncion & Newman, 2007) datasets. Then, we study $i$ -Mix in various conditions, including when 1) the model and training dataset is small or large, 2) domain knowledge is limited, and 3) transfer learning.
22
+
23
+ Contribution. In summary, our contribution is three-fold:
24
+
25
+ • We propose $i$ -Mix, a method for regularizing contrastive representation learning, motivated by MixUp (Zhang et al., 2018). We show how to apply $i$ -Mix to state-of-the-art contrastive representation learning methods (Chen et al., 2020a; He et al., 2020; Grill et al., 2020). • We show that $i$ -Mix consistently improves contrastive representation learning in both vision and non-vision domains. In particular, the discriminative performance of representations learned with $i$ -Mix is on par with fully supervised learning on CIFAR-10/100 (Krizhevsky & Hinton, 2009) and Speech Commands (Warden, 2018). • We verify the regularization effect of $i$ -Mix in a variety of settings. We empirically observed that $i$ -Mix significantly improves contrastive representation learning when 1) the training dataset size is small, or 2) the domain knowledge for data augmentations is not enough.
26
+
27
+ # 2 RELATED WORK
28
+
29
+ Self-supervised representation learning (SSL) aims at learning representations from unlabeled data by solving a pretext task that is derived from self-supervision. Early works on SSL proposed pretext tasks based on data reconstruction by autoencoding (Bengio et al., 2007), such as context prediction (Doersch et al., 2015) and inpainting (Pathak et al., 2016). Decoder-free SSL has made a huge progress in recent years. Exemplar CNN (Dosovitskiy et al., 2014) learns by classifying individual instances with data augmentations. SSL of visual representation, including colorization (Zhang et al., 2016), solving jigsaw puzzles (Noroozi & Favaro, 2016), counting the number of objects (Noroozi et al., 2017), rotation prediction (Gidaris et al., 2018), next pixel prediction (Oord et al., 2018; Henaff´ et al., 2019), and combinations of them (Doersch & Zisserman, 2017; Kim et al., 2018; Noroozi et al., 2018) often leverages image-specific properties to design pretext tasks. Meanwhile, alhough deep clustering (Caron et al., 2018; 2019; Asano et al., 2020) is often distinguished from SSL, it also leverages unsupervised clustering assignments as self-supervision for representation learning.
30
+
31
+ Contrastive representation learning has gained lots of attention for SSL (He et al., 2020; Chen et al., 2020a). As opposed to early works on exemplar CNN (Dosovitskiy et al., 2014; 2015), contrastive learning maximizes similarities of positive pairs while minimizes similarities of negative pairs instead of training an instance classifier. As the choice of negative pairs is crucial for the quality of learned representations, recent works have carefully designed them. Memory-based approaches (Wu et al., 2018b; Hjelm et al., 2019; Bachman et al., 2019; Misra & van der Maaten, 2020; Tian et al., 2020a) maintain a memory bank of embedding vectors of instances to keep negative samples, where the memory is updated with embedding vectors extracted from previous batches. In addition, MoCo (He et al., 2020) showed that differentiating the model for anchors and positive/negative samples is effective, where the model for positive/negative samples is updated by the exponential moving average of the model for anchors. On the other hand, recent works (Ye et al., 2019; Misra & van der Maaten, 2020; Chen et al., 2020a; Tian et al., 2020a) showed that learning invariance to different views is important in contrastive representation learning. The views can be generated through data augmentations carefully designed using domain knowledge (Chen et al., 2020a), splitting input channels (Tian et al., 2020a), or borrowing the idea of other pretext tasks, such as creating jigsaw puzzles or rotating inputs (Misra & van der Maaten, 2020). In particular, SimCLR (Chen et al., 2020a) showed that a simple memory-free approach with a large batch size and strong data augmentations has a comparable performance to memory-based approaches. InfoMin (Tian et al., 2020b) further studied a way to generate good views for contrastive representation learning and achieved state-of-the-art performance by combining prior works. Different from other contrastive representation learning methods, BYOL (Grill et al., 2020) does not require negative pairs, where the proposed pretext task aims at predicting latent representations of one view from another. While prior works have focused on SSL on large-scale visual recognition tasks, our work focuses on contrastive representation learning in both small- and large-scale settings in different domains.
32
+
33
+ Data augmentation is a technique to increase the diversity of data, especially when training data are not enough for generalization. Since the augmented data must be understood as the original data, data augmentations are carefully designed using the domain knowledge about images (DeVries & Taylor, 2017b; Cubuk et al., 2019a;b; Zhong et al., 2020), speech (Amodei et al., 2016; Park et al., 2019), or natural languages (Zhang et al., 2015; Wei & Zou, 2019).
34
+
35
+ Some works have studied data augmentation with less domain knowledge: DeVries & Taylor (2017a) proposed a domain-agnostic augmentation strategy by first encoding the dataset and then applying augmentations in the feature space. MixUp (Zhang et al., 2018) is an effective data augmentation strategy in supervised learning, which performs vicinal risk minimization instead of empirical risk minimization, by linearly interpolating input data and their labels on the data and label spaces, respectively. On the other hand, MixUp has also shown its effectiveness in other tasks and non-vision domains, including generative adversarial networks (Lucas et al., 2018), improved robustness and uncertainty (Hendrycks et al., 2020), and sentence classification in natural language processing (Guo, 2020; Guo et al., 2019). Other variations have also been investigated by interpolating in the feature space (Verma et al., 2019) or leveraging domain knowledge (Yun et al., 2019). MixUp would not be directly applicable to some domains, such as point clouds, but its adaptation can be effective (Harris et al., 2020). $i$ -Mix is a kind of data augmentation for better generalization in contrastive representation learning, resulting in better performances on downstream tasks.
36
+
37
+ Concurrent works have leveraged the idea of MixUp for contrastive representation learning. As discussed in Section 3.3, only input data can be mixed for improving contrastive representation learning (Shen et al., 2020; Verma et al., 2020; Zhou et al., 2020), which can be considered as injecting data-driven noises. Kalantidis et al. (2020) mixed hard negative samples on the embedding space. Kim et al. (2020) reported similar observations to ours but focused on small image datasets.
38
+
39
+ # 3 APPROACH
40
+
41
+ In this section, we review MixUp (Zhang et al., 2018) in supervised learning and present $i$ -Mix in contrastive learning (He et al., 2020; Chen et al., 2020a; Grill et al., 2020). Throughout this section, let $\mathcal { X }$ be a data space, $\mathbb { R } ^ { D }$ be a $D$ -dimensional embedding space, and a model $f : \mathcal { X } \to \mathbb { R } ^ { D }$ be a mapping between them. For conciseness, $f _ { i } = f ( x _ { i } )$ and $\tilde { f _ { i } } = f ( \tilde { x } _ { i } )$ for $x _ { i } , { \tilde { x } } _ { i } \in { \mathcal { X } }$ , and model parameters are omitted in loss functions.
42
+
43
+ # 3.1 MIXUP IN SUPERVISED LEARNING
44
+
45
+ Suppose an one-hot label $y _ { i } \in \{ 0 , 1 \} ^ { C }$ is assigned to a data $x _ { i }$ , where $C$ is the number of classes. Let a linear classifier predicting the labels consists of weight vectors $\{ w _ { 1 } , \ldots , w _ { C } \}$ , where $w _ { c } \in \mathbb { R } ^ { D }$ . 1 Then, the cross-entropy loss for supervised learning is defined as:
46
+
47
+ $$
48
+ \ell _ { \mathrm { S u p } } ( x _ { i } , y _ { i } ) = - \sum _ { c = 1 } ^ { C } y _ { i , c } \log \frac { \exp ( w _ { c } ^ { \top } f _ { i } ) } { \sum _ { k = 1 } ^ { C } \exp ( w _ { k } ^ { \top } f _ { i } ) } .
49
+ $$
50
+
51
+ While the cross-entropy loss is widely used for supervised training of deep neural networks, there are several challenges of training with the cross-entropy loss, such as preventing overfitting or networks being overconfident. Several regularization techniques have been proposed to alleviate these issues, including label smoothing (Szegedy et al., 2016), adversarial training (Miyato et al., 2018), and confidence calibration (Lee et al., 2018).
52
+
53
+ MixUp (Zhang et al., 2018) is an effective regularization with negligible computational overhead. It conducts a linear interpolation of two data instances in both input and label spaces and trains a model by minimizing the cross-entropy loss defined on the interpolated data and labels. Specifically, for two labeled data $( x _ { i } , y _ { i } )$ , $( x _ { j } , y _ { j } )$ , the MixUp loss is defined as follows:
54
+
55
+ $$
56
+ \ell _ { \mathrm { S u p } } ^ { \mathrm { M i x U p } } \big ( ( x _ { i } , y _ { i } ) , ( x _ { j } , y _ { j } ) ; \lambda \big ) = \ell _ { \mathrm { S u p } } ( \lambda x _ { i } + ( 1 - \lambda ) x _ { j } , \lambda y _ { i } + ( 1 - \lambda ) y _ { j } ) ,
57
+ $$
58
+
59
+ where $\lambda \sim \operatorname { B e t a } ( \alpha , \alpha )$ is a mixing coefficient sampled from the beta distribution. MixUp is a vicinal risk minimization method (Chapelle et al., 2001) that augments data and their labels in a data-driven manner. Not only improving the generalization on the supervised task, it also improves adversarial robustness (Pang et al., 2019) and confidence calibration (Thulasidasan et al., 2019).
60
+
61
+ # 3.2 $i$ -MIX IN CONTRASTIVE LEARNING
62
+
63
+ We introduce instance mix $\mathit { i }$ -Mix), a data-driven augmentation strategy for contrastive representation learning to improve the generalization of learned representations. Intuitively, instead of mixing class labels, $i$ -Mix interpolates their virtual labels, which indicates their identity in a batch.
64
+
65
+ Let $\boldsymbol { B } = \{ ( x _ { i } , \tilde { x } _ { i } ) \} _ { i = 1 } ^ { N }$ be a batch of data pairs, where $N$ is the batch size, $x _ { i } , { \tilde { x } } _ { i } \in { \mathcal { X } }$ are two views of the same data, which are usually generated by different augmentations. For each anchor $x _ { i }$ , we call ${ \tilde { x } } _ { i }$ and $\tilde { x } _ { j \neq i }$ positive and negative samples, respectively.2 Then, the model $f$ learns to maximize similarities of positive pairs (instances from the same data) while minimize similarities of negative pairs (instances from different data) in the embedding space. The output of $f$ is L2-normalized, which has shown to be effective (Wu et al., 2018a; He et al., 2020; Chen et al., 2020a). Let $v _ { i } \in \{ 0 , 1 \} ^ { N }$ be the virtual label of $x _ { i }$ and $\tilde { x } _ { i }$ in a batch $\boldsymbol { B }$ , where $v _ { i , i } = 1$ and $v _ { i , j \neq i } = 0$ . For a general sample-wise contrastive loss with virtual labels $\ell ( x _ { i } , v _ { i } )$ , the $i$ -Mix loss is defined as follows:
66
+
67
+ $$
68
+ \ell ^ { i \cdot \mathrm { M i x } } \big ( ( x _ { i } , v _ { i } ) , ( x _ { j } , v _ { j } ) ; \mathcal { B } , \lambda \big ) = \ell ( \mathrm { M i x } ( x _ { i } , x _ { j } ; \lambda ) , \lambda v _ { i } + ( 1 - \lambda ) v _ { j } ; \mathcal { B } ) ,
69
+ $$
70
+
71
+ where $\lambda \sim \operatorname { B e t a } ( \alpha , \alpha )$ is a mixing coefficient and Mix is a mixing operator, which can be adapted depending on target domains: for example, $\operatorname { M i x U p } ( x _ { i } , x _ { j } ; \lambda ) = \lambda x _ { i } + ( 1 - \lambda ) x _ { j }$ (Zhang et al., 2018) when data values are continuous, and $\mathbf { C u t M i x } ( x _ { i } , x _ { j } ; \lambda ) = M _ { \lambda } \odot x _ { i } + ( 1 - M _ { \lambda } ) \odot x _ { j }$ (Yun et al., 2019) when data values have a spatial correlation with neighbors, where $M _ { \lambda }$ is a binary mask filtering out a region whose relative area is $( 1 - \lambda )$ , and $\odot$ is an element-wise multiplication. Note that some mixing operators might not work well for some domains: for example, CutMix would not be valid when data values and their spatial neighbors have no correlation. However, the MixUp operator generally works well across domains including image, speech, and tabular; we use it for $i$ -Mix formulations and experiments, unless otherwise specified. In the following, we show how to apply $i$ -Mix to contrastive representation learning methods.
72
+
73
+ SimCLR (Chen et al., 2020a) is a simple contrastive representation learning method without a memory bank, where each anchor has one positive sample and $( 2 N - 2 )$ negative samples. Let $x _ { N + i } = \tilde { x } _ { i }$ for conciseness. Then, the $( 2 N { - } 1 )$ -way discrimination loss is written as follows:
74
+
75
+ $$
76
+ \ell _ { \mathrm { S i m C L R } } ( x _ { i } ; \mathcal { B } ) = - \log \frac { \exp { \left( s ( f _ { i } , f _ { ( N + i ) \bmod { 2 N } } ) / \tau \right) } } { \sum _ { k = 1 , k \ne i } ^ { 2 N } \exp { \left( s ( f _ { i } , f _ { k } ) / \tau \right) } } ,
77
+ $$
78
+
79
+ where $\tau$ is a temperature scaling parameter and $s ( f , { \tilde { f } } ) = ( f ^ { \top } { \tilde { f } } ) / \| f \| \| { \tilde { f } } \|$ is the inner product of two L2-normalized vectors. In this formulation, $i$ -Mix is not directly applicable because virtual labels are defined differently for each anchor.3 To resolve this issue, we simplify the formulation of SimCLR by excluding anchors from negative samples. Then, with virtual labels, the $N$ -way discrimination loss is written as follows:
80
+
81
+ $$
82
+ \ell _ { \mathrm { N - p a i r } } ( x _ { i } , v _ { i } ; \mathcal { B } ) = - \sum _ { n = 1 } ^ { N } v _ { i , n } \log \frac { \exp { \left( s ( f _ { i } , \tilde { f } _ { n } ) / \tau \right) } } { \sum _ { k = 1 } ^ { N } \exp { \left( s ( f _ { i } , \tilde { f } _ { k } ) / \tau \right) } } ,
83
+ $$
84
+
85
+ where we call it the N-pair contrastive loss, as the formulation is similar to the $\mathbf { N } .$ -pair loss in the context of metric learning (Sohn, 2016).4 For two data instances $( x _ { i } , v _ { i } )$ , $( x _ { j } , v _ { j } )$ and a batch of data
86
+
87
+ Algorithm 1 Loss computation for $i$ -Mix on N-pair contrastive learning in PyTorch-like style.
88
+
89
+ a, b $=$ aug(x), aug(x) # two different views of input x
90
+ lam $=$ Beta(alpha, alpha).sample() # mixing coefficient
91
+ randidx $=$ randperm(len(x))
92
+ $\ a = \ 1 a _ { } \ m$ $^ { \star }$ a + (1-lam) $\star$ a[randidx]
93
+ logits $=$ matmul(normalize(model(a)), normalize(model(b)).T) / t
94
+ $1 0 s s = 1 a m$ $\star$ CrossEntropyLoss(logits, arange(len(x))) + \ (1-lam) $\star$ CrossEntropyLoss(logits, randidx)
95
+
96
+ pairs $\boldsymbol { B } = \{ ( x _ { i } , \tilde { x } _ { i } ) \} _ { i = 1 } ^ { N }$ , the $i$ -Mix loss is defined as follows:
97
+
98
+ $$
99
+ \ell _ { \mathrm { N - p a i r } } ^ { i \mathrm { - } \mathrm { M i x } } \big ( ( x _ { i } , v _ { i } ) , ( x _ { j } , v _ { j } ) ; \mathcal { B } , \lambda \big ) = \ell _ { \mathrm { N - p a i r } } ( \lambda x _ { i } + ( 1 - \lambda ) x _ { j } , \lambda v _ { i } + ( 1 - \lambda ) v _ { j } ; \mathcal { B } ) .
100
+ $$
101
+
102
+ Algorithm 1 provides the pseudocode of $i$ -Mix on $\mathbf { N } .$ -pair contrastive learning for one iteration.5
103
+
104
+ Pair relations in contrastive loss. To use contrastive loss for representation learning, one needs to properly define a pair relation $\{ ( x _ { i } , \tilde { x } _ { i } ) \} _ { i = 1 } ^ { N }$ . For contrastive representation learning, where semantic class labels are not provided, the pair relation would be defined in that 1) a positive pair, $x _ { i }$ and ${ \tilde { x } } _ { i }$ , are different views of the same data and 2) a negative pair, $x _ { i }$ and $\tilde { x } _ { j \neq i }$ , are different data instances. For supervised representation learning, $x _ { i }$ and $\tilde { x } _ { i }$ are two data instances from the same class, while $x _ { i }$ and $\tilde { x } _ { j \neq i }$ are from different classes. Note that two augmented versions of the same data also belong to the same class, so they can also be considered as a positive pair. $i$ -Mix is not limited to self-supervised contrastive representation learning, but it can also be used as a regularization method for supervised contrastive representation learning (Khosla et al., 2020) or deep metric learning (Sohn, 2016; Movshovitz-Attias et al., 2017).
105
+
106
+ MoCo (He et al., 2020). In contrastive representation learning, the number of negative samples affects the quality of learned representations (Arora et al., 2019). Because SimCLR mines negative samples in the current batch, having a large batch size is crucial, which often requires a lot of computational resources (Chen et al., 2020a). For efficient training, recent works have maintained a memory bank $\mathcal { M } = \{ \mu _ { k } \} _ { k = 1 } ^ { K }$ , which is a queue of previously extracted embedding vectors, where $K$ is the size of the memory bank (Wu et al., 2018b; He et al., 2020; Tian et al., 2020a;b). In addition, MoCo introduces an exponential moving average (EMA) model to extract positive and negative embedding vectors, whose parameters are updated as $\theta _ { f ^ { \tt E M A } } m \theta _ { f ^ { \tt E M A } } + ( 1 - m ) \theta _ { f }$ , where $m \in [ 0 , 1 )$ is a momentum coefficient and $\theta$ is model parameters. The loss is written as follows:
107
+
108
+ $$
109
+ \ell _ { \operatorname { M o C o } } ( x _ { i } ; \mathcal { B } , \mathcal { M } ) = - \log \frac { \exp \big ( s ( f _ { i } , \tilde { f } _ { i } ^ { \mathrm { E M A } } ) / \tau \big ) } { \exp \big ( s ( f _ { i } , \tilde { f } _ { i } ^ { \mathrm { E M A } } ) / \tau \big ) + \sum _ { k = 1 } ^ { K } \exp \big ( s ( f _ { i } , \mu _ { k } ) / \tau \big ) } .
110
+ $$
111
+
112
+ The memory bank $\mathcal { M }$ is then updated with $\{ \tilde { f } _ { i } ^ { \mathrm { E M A } } \}$ in the first-in first-out order. In this $( K { + } 1 )$ -way discrimination loss, data pairs are independent to each other, such that $i$ -Mix is not directly applicable because virtual labels are defined differently for each anchor. To overcome this issue, we include the positive samples of other anchors as negative samples, similar to the N-pair contrastive loss in Eq. (5). Let $\tilde { v } _ { i } \in \dot { \{ 0 , 1 \} } ^ { N + K }$ be a virtual label indicating the positive sample of each anchor, where $\tilde { v } _ { i , i } = 1$ and $\tilde { v } _ { i , j \neq i } = 0$ . Then, the $( N { + } K )$ -way discrimination loss is written as follows:
113
+
114
+ $$
115
+ \ell _ { \mathrm { M o C o } } ( x _ { i } , \tilde { v } _ { i } ; \mathcal { B } , \mathcal { M } ) = - \sum _ { n = 1 } ^ { N } \tilde { v } _ { i , n } \log \frac { \exp \big ( s ( f _ { i } , \tilde { f } _ { n } ^ { \mathrm { E M A } } ) / \tau \big ) } { \sum _ { k = 1 } ^ { N } \exp \big ( s ( f _ { i } , \tilde { f } _ { k } ^ { \mathrm { E M A } } ) / \tau \big ) + \sum _ { k = 1 } ^ { K } \exp \big ( s ( f _ { i } , \mu _ { k } ) / \tau \big ) } .
116
+ $$
117
+
118
+ As virtual labels are bounded in the same set in this formulation, $i$ -Mix is directly applicable: for two data instances $( x _ { i } , \tilde { v } _ { i } )$ , $( x _ { j } , \tilde { v } _ { j } )$ , a batch of data pairs $\boldsymbol { B } = \{ ( x _ { i } , \tilde { x } _ { i } ) \} _ { i = 1 } ^ { N }$ , and the memory bank $\mathcal { M }$ the $i$ -Mix loss is defined as follows:
119
+
120
+ $$
121
+ \ell _ { \mathrm { M o C o } } ^ { i \cdot \mathrm { M i x } } \big ( ( x _ { i } , \tilde { v } _ { i } ) , ( x _ { j } , \tilde { v } _ { j } ) ; \mathcal { B } , \mathcal { M } , \lambda \big ) = \ell _ { \mathrm { M o C o } } ( \lambda x _ { i } + ( 1 - \lambda ) x _ { j } , \lambda \tilde { v } _ { i } + ( 1 - \lambda ) \tilde { v } _ { j } ; \mathcal { B } , \mathcal { M } ) .
122
+ $$
123
+
124
+ BYOL (Grill et al., 2020). Different from other contrastive representation learning methods, BYOL is a self-supervised representation learning method without contrasting negative pairs. For two views of the same data $x _ { i } , { \tilde { x } } _ { i } \in { \mathcal { X } }$ , the model $f$ learns to predict a view embedded with the EMA model $\tilde { f } _ { i } ^ { \mathtt { E M A } }$ from its embedding $f _ { i }$ . Specifically, an additional prediction layer $g$ is introduced, such that the difference between $g ( f _ { i } )$ and $\tilde { f } _ { i } ^ { \mathtt { E M A } }$ is learned to be minimized. The BYOL loss is written as follows:
125
+
126
+ $$
127
+ \ell _ { \mathrm { B Y O L } } ( x _ { i } , \tilde { x } _ { i } ) = \Big \| g ( f _ { i } ) / \| g ( f _ { i } ) \| - \tilde { f } _ { i } / \| \tilde { f } _ { i } \| \Big \| ^ { 2 } = 2 - 2 \cdot s ( g ( f _ { i } ) , \tilde { f } _ { i } ) .
128
+ $$
129
+
130
+ This formulation can be represented in the form of the general contrastive loss in Eq. (3), as the second view $\tilde { x } _ { i }$ can be accessed from the batch $\boldsymbol { B }$ with its virtual label $v _ { i }$ . To derive $i$ -Mix in BYOL, let $\tilde { F } = [ \tilde { f } _ { 1 } / \| \tilde { f } _ { 1 } \| , . . . , \tilde { f } _ { N } / \| \tilde { f } _ { N } \| ] \in \mathbb { R } ^ { D \times N }$ be the collection of L2-normalized embedding vectors of the second views, such that $\tilde { f } _ { i } / { \| \tilde { f } _ { i } \| } = \tilde { F } v _ { i }$ . Then, the BYOL loss is written as follows:
131
+
132
+ $$
133
+ \ell _ { \mathrm { B Y O L } } ( x _ { i } , v _ { i } ; \mathcal { B } ) = \Big | \Big | g ( f _ { i } ) / \| g ( f _ { i } ) \| - \tilde { F } v _ { i } \Big | \Big | ^ { 2 } = 2 - 2 \cdot s ( g ( f _ { i } ) , \tilde { F } v _ { i } ) .
134
+ $$
135
+
136
+ For two data instances $( x _ { i } , v _ { i } ) , ( x _ { j } , v _ { j } )$ and a batch of data pairs $\boldsymbol { B } = \{ ( x _ { i } , \tilde { x } _ { i } ) \} _ { i = 1 } ^ { N }$ , the $i$ -Mix loss is defined as follows:
137
+
138
+ $$
139
+ \ell _ { \mathrm { B Y O L } } ^ { i \mathrm { - } \mathrm { M i x } } \big ( ( x _ { i } , v _ { i } ) , ( x _ { j } , v _ { j } ) ; \mathcal { B } , \lambda \big ) = \ell _ { \mathrm { B Y O L } } ( \lambda x _ { i } + ( 1 - \lambda ) x _ { j } , \lambda v _ { i } + ( 1 - \lambda ) v _ { j } ; \mathcal { B } ) .
140
+ $$
141
+
142
+ # 3.3 INPUTMIX
143
+
144
+ The contribution of data augmentations to the quality of learned representations is crucial in contrastive representation learning. For the case when the domain knowledge about efficient data augmentations is limited, we propose to apply InputMix together with $i$ -Mix, which mixes input data but not their labels. This method can be viewed as introducing structured noises driven by auxiliary data to the principal data with the largest mixing coefficient $\lambda$ , and the label of the principal data is assigned to the mixed data (Shen et al., 2020; Verma et al., 2020; Zhou et al., 2020). We applied InputMix and $i$ -Mix together on image datasets in Table 3.
145
+
146
+ # 4 EXPERIMENTS
147
+
148
+ In this section, we demonstrate the effectiveness of $i$ -Mix. In all experiments, we conduct contrastive representation learning on a pretext dataset and evaluate the quality of representations via supervised classification on a downstream dataset. We report the accuracy averaged over up to five runs. In the first stage, a convolutional neural network (CNN) or multilayer perceptron (MLP) followed by the two-layer MLP projection head is trained on an unlabeled dataset. Then, we replace the projection head with a linear classifier and train only the linear classifier on a labeled dataset for downstream task. Except for transfer learning, datasets for the pretext and downstream tasks are the same. For $i$ -Mix, we sample a mixing coefficient $\lambda \sim \operatorname { B e t a } ( \alpha , \alpha )$ for each data, where $\alpha = 1$ unless otherwise stated.6 Additional details for the experimental settings and more experiments can be found in Appendix C.
149
+
150
+ # 4.1 EXPERIMENTAL SETUP
151
+
152
+ Baselines and datasets. We consider 1) N-pair contrastive learning as a memory-free contrastive learning method,7 2) MoCo v2 (He et al., 2020; Chen et al., 2020b) 8 as a memory-based contrastive learning method, and 3) BYOL (Grill et al., 2020), which is a self-supervised learning method without negative pairs. We apply $i$ -Mix to these methods and compare their performances. To show the effectiveness of $i$ -Mix across domains, we evaluate the methods on datasets from multiple domains, including image, speech, and tabular datasets.
153
+
154
+ CIFAR-10/100 (Krizhevsky & Hinton, 2009) consist of 50k training and 10k test images, and ImageNet (Deng et al., 2009) has 1.3M training and $5 0 \mathrm { k }$ validation images, where we use them for evaluation. For ImageNet, we also use a subset of randomly chosen 100 classes out of 1k classes to experiment at a different scale. We apply a set of data augmentations randomly in sequence including random resized cropping, horizontal flipping, color jittering, gray scaling, and Gaussian blurring for ImageNet, which has shown to be effective (Chen et al., 2020a;b). We use ResNet-50 (He et al., 2016) as a backbone network. Models are trained with a batch size of 256 (i.e., 512 including augmented data) for up to 4000 epochs on CIFAR-10 and 100, and with a batch size of 512 for 800 epochs on ImageNet. For ImageNet experiments, we use the CutMix (Yun et al., 2019) version of $i$ -Mix.
155
+
156
+ Table 1: Comparison of contrastive representation learning methods and $i$ -Mix in different domains.
157
+
158
+ <table><tr><td>Domain</td><td>Dataset</td><td>N-pair</td><td>+ i-Mix</td><td>MoCo v2</td><td>+i-Mix</td><td>BYOL</td><td>+ i-Mix</td></tr><tr><td rowspan="2">Image</td><td>CIFAR-10</td><td>93.3 ± 0.1</td><td>95.6 ± 0.2</td><td>93.5 ± 0.2</td><td>96.1 ± 0.1</td><td>94.2 ± 0.2</td><td>96.3 ± 0.2</td></tr><tr><td>CIFAR-100</td><td>70.8 ± 0.4</td><td>75.8 ± 0.3</td><td>71.6 ± 0.1</td><td>78.1 ± 0.3</td><td>72.7 ± 0.4</td><td>78.6 ± 0.2</td></tr><tr><td>Speech</td><td>Commands</td><td>94.9 ± 0.1</td><td>98.3 ± 0.1</td><td>96.3 ± 0.1</td><td>98.4 ± 0.0</td><td>94.8 ± 0.2</td><td>98.3 ± 0.0</td></tr><tr><td>Tabular</td><td>CovType</td><td>68.5 ± 0.3</td><td>72.1 ± 0.2</td><td>70.5 ± 0.2</td><td>73.1 ± 0.1</td><td>72.1 ± 0.2</td><td>74.1 ± 0.2</td></tr></table>
159
+
160
+ ![](images/8473f60cefed5a238250395c59d0509718e1aba53b0e15d03c8e43c684d29c55.jpg)
161
+ Figure 1: Comparison of performance gains by applying $i$ -Mix to MoCo v2 with different model sizes and number of epochs on CIFAR-10 and 100.
162
+
163
+ The Speech Commands dataset (Warden, 2018) contains 51k training, 7k validation, and $\mathrm { 7 k }$ test data in 12 classes. We apply a set of data augmentations randomly in sequence: changing amplitude, speed, and pitch in time domain, stretching, time shifting, and adding background noise in frequency domain. Augmented data are then transformed to a $3 2 \times 3 2$ mel spectogram. We use the same architecture with image experiments. Models are trained with a batch size of 256 for 500 epochs.
164
+
165
+ For tabular dataset experiments, we consider Forest Cover Type (CovType) and Higgs Boson (Higgs) from UCI repository (Asuncion & Newman, 2007). CovType contains 15k training and 566k test data in 7 classes, and Higgs contains $1 0 . 5 \mathbf { M }$ training and $0 . 5 \mathbf { M }$ test data for binary classification. For Higgs, we use a subset of $1 0 0 \mathrm { k }$ and 1M training data to experiment at a different scale. Since the domain knowledge for data augmentations on tabular data is limited, only a masking noise with the probability 0.2 is considered as a data augmentation. We use a 5-layer MLP with batch normalization (Ioffe & Szegedy, 2015) as a backbone network. Models are trained with a batch size of 512 for 500 epochs. We use $\alpha = 2$ for CovType and Higgs100k, as it is slightly better than $\alpha = 1$ .
166
+
167
+ # 4.2 MAIN RESULTS
168
+
169
+ Table 1 shows the wide applicability of $i$ -Mix to state-of-the-art contrastive representation learning methods in multiple domains. $i$ -Mix results in consistent improvements on the classification accuracy, e.g., up to $6 . 5 \%$ when $i$ -Mix is applied to MoCo v2 on CIFAR-100. Interestingly, we observe that linear classifiers on top of representations learned with $i$ -Mix without fine-tuning the pre-trained part often yield a classification accuracy on par with simple end-to-end supervised learning from random initialization, e.g., $i$ -Mix vs. end-to-end supervised learning performance is $9 6 . 3 \%$ vs. $9 5 . 5 \%$ on CIFAR-10, $7 8 . 6 \%$ vs. $7 8 . 9 \%$ on CIFAR-100, and $9 8 . 2 \%$ vs. $9 8 . 0 \%$ on Speech Commands.
170
+
171
+ # 4.3 REGULARIZATION EFFECT OF $i$ -MIX
172
+
173
+ A better regularization method often benefits from longer training of deeper models, which is more critical when training on a small dataset. To investigate the regularization effect of $i$ -Mix, we first \*InputMix is applied when no other data augmentations are used.
174
+
175
+ Table 2: Comparison of MoCo v2 and $i$ -Mix on large-scale datasets.
176
+
177
+ <table><tr><td>Domain</td><td>Dataset</td><td>MoCo v2</td><td>+i-Mix</td></tr><tr><td>Image</td><td>ImageNet-100 ImageNet-1k</td><td>84.1 70.9</td><td>87.0 71.3</td></tr><tr><td>Domain</td><td>Dataset</td><td>MoCo v2</td><td></td></tr><tr><td></td><td>Higgs100k</td><td></td><td>+ i-Mix</td></tr><tr><td>Tabular</td><td>Higgs1M</td><td>72.1 74.9</td><td>72.9 74.5</td></tr></table>
178
+
179
+ ![](images/fa2a288628733d39a2bc1ccdf221b14291afd7829aca1751db7c167dc905cadf.jpg)
180
+ Figure 2: Comparison of MoCo v2 and $i$ -Mix trained on the different size of ImageNet.
181
+
182
+ Table 3: Comparison of MoCo v2 and $i$ -Mix with and without data augmentations.
183
+
184
+ <table><tr><td rowspan="2">Aug</td><td colspan="2">CIFAR-10</td><td colspan="2">CIFAR-100</td><td colspan="2">Speech Commands</td><td colspan="2">CovType</td><td colspan="2">Higgs100k</td><td colspan="2">Higgs1M</td></tr><tr><td>MoCo v2</td><td>+i-Mix*</td><td>MoCo v2</td><td>+i-Mix*</td><td>MoCo v2</td><td>+i-Mix</td><td>MoCo v2</td><td>+ i-Mix</td><td>MoCo v2</td><td>+i-Mix</td><td>MoCo v2</td><td>+i-Mix</td></tr><tr><td>=</td><td>47.7 ± 1.3</td><td>83.4 ±0.4</td><td>24.7 ±0.7</td><td>54.0 ± 0.5</td><td>76.9 ± 1.7</td><td>92.8 ± 0.5</td><td>69.6 ±0.3</td><td>73.1 ± 0.1</td><td>64.2</td><td>71.8</td><td>65.5</td><td>72.9</td></tr><tr><td>√</td><td>93.5 ± 0.2</td><td>96.1 ± 0.1</td><td>71.6 ± 0.1</td><td>78.1 ±0.3</td><td>96.3 ± 0.1</td><td>98.4 ± 0.0</td><td>70.5 ± 0.2</td><td>73.1 ± 0.1</td><td>72.1</td><td>72.9</td><td>74.9</td><td>74.5</td></tr></table>
185
+
186
+ make a comparison between MoCo v2 and $i$ -Mix by training with different model sizes and number of training epochs on the pretext task. We train ResNet-18, 50, 101, and 152 models with varying number of training epochs from 200 to 2000. Figure 1 shows the performance of MoCo v2 (solid box) and $i$ -Mix (dashed box). The improvement by applying $i$ -Mix to MoCo v2 is consistent over the different architecture size and the number of training epochs. Deeper models benefit from $i$ -Mix, achieving $9 6 . 7 \%$ on CIFAR-10 and $7 9 . 1 \%$ on CIFAR-100 when the backbone network is ResNet-152. On the other hand, models trained without $i$ -Mix start to show decrease in performance, possibly due to overfitting to the pretext task when trained longer. The trend clearly shows that $i$ -Mix results in better representations via improved regularization.
187
+
188
+ Next, we study the effect of $i$ -Mix with varying dataset sizes for the pretext tasks. Table 2 shows the effect of $i$ -Mix on large-scale datasets10 from image and tabular domains. We observe that $i$ -Mix is particularly effective when the amount of training data is reduced, e.g., ImageNet-100 consists of images from 100 classes, thus has only $10 \%$ of training data compared to ImageNet-1k. However, the performance gain is reduced when the amount of training data is large. we further study representations learned with different pretext dataset sizes from $1 \%$ to $100 \%$ of the ImageNet training data in Figure 2. Here, different from ImageNet-100, we reduce the amount of data for each class, but maintain the number of classes the same. We observe that the performance gain by $i$ -Mix is more significant when the size of the pretext dataset is small. Our study suggests that $i$ -Mix is effective for regularizing self-supervised representation learning when training from a limited amount of data. We believe that this is aligned with findings in Zhang et al. (2018) for MixUp in supervised learning. Finally, when a large-scale unlabeled dataset is available, we expect $i$ -Mix would still be useful in obtaining better representations when trained longer with deeper and larger models.
189
+
190
+ # 4.4 CONTRASTIVE LEARNING WITHOUT DOMAIN-SPECIFIC DATA AUGMENTATION
191
+
192
+ Data augmentations play a key role in contrastive representation learning, and therefore it raises a question when applying them to domains with a limited or no knowledge of such augmentations. In this section, we study the effectiveness of $i$ -Mix as a domain-agnostic strategy for contrastive representation learning, which can be adapted to different domains. Table 3 shows the performance of MoCo v2 and $i$ -Mix with and without data augmentations. We observe significant performance gains with $i$ -Mix when other data augmentations are not applied. For example, compared to the accuracy of $9 3 . 5 \%$ on CIFAR-10 when other data augmentations are applied, contrastive learning achieves $4 7 . 7 \%$ when trained without any data augmentations. This suggests that data augmentation is an essential part for the success of contrastive representation learning (Chen et al., 2020a). However, $i$ -Mix is able to learn meaningful representations without other data augmentations and achieves the accuracy of $8 3 . 4 \%$ on CIFAR-10.
193
+
194
+ <table><tr><td rowspan="2">VOC Object Detection</td><td colspan="2">ImageNet</td></tr><tr><td>MoCo v2</td><td>+ i-Mix</td></tr><tr><td>AP</td><td>57.3 ± 0.1</td><td>57.5± 0.4</td></tr><tr><td>AP50</td><td>82.5 ± 0.2</td><td>82.7 ± 0.2</td></tr><tr><td>AP75</td><td>63.8 ±0.3</td><td>64.2 ± 0.7</td></tr></table>
195
+
196
+ (b) ImageNet as the pretext dataset
197
+
198
+ Table 4: Comparison of MoCo v2 and $i$ -Mix in transfer learning.
199
+
200
+ <table><tr><td>Pretext</td><td colspan="2">CIFAR-10</td><td colspan="2">CIFAR-100</td></tr><tr><td>Downstream</td><td>MoCo v2</td><td>+i-Mix</td><td>MoCo v2</td><td>+i-Mix</td></tr><tr><td>CIFAR-10</td><td>93.5 ± 0.2</td><td>96.1 ± 0.1</td><td>85.9 ±0.3</td><td>90.0 ± 0.4</td></tr><tr><td>CIFAR-100</td><td>64.1 ± 0.4</td><td>70.8 ± 0.4</td><td>71.6 ± 0.1</td><td>78.1 ± 0.3</td></tr></table>
201
+
202
+ (a) CIFAR-10 and 100 as the pretext dataset
203
+
204
+ In Table 3, InputMix is applied together with $i$ -Mix to further improve the performance on image datasets. For each principal data, we mix two auxiliary data, with mixing coefficients $( 0 . 5 \lambda _ { 1 } + 0 . 5$ , $0 . 5 \lambda _ { 2 }$ , $0 . 5 \lambda _ { 3 }$ ), where $\lambda _ { 1 } , \lambda _ { 2 } , \lambda _ { 3 } \sim \mathrm { D i r i c h l e t } ( 1 , 1 , 1 )$ .11 In the above example, while $i$ -Mix is better than baselines, adding InputMix further improves the performance of $i$ -Mix, i.e., from $7 5 . 1 \%$ to $8 3 . 4 \%$ on CIFAR-10, and from $5 0 . 7 \%$ to $5 4 . 0 \%$ on CIFAR-100. This confirms that InputMix can further improve the performance when domain-specific data augmentations are not available, as discussed in Section 3.3.
205
+
206
+ Moreover, we verify its effectiveness on other domains beyond the image domain. For example, the performance improves from $7 6 . 9 \%$ to $9 2 . 8 \%$ on the Speech Commands dataset when we assume no other data augmentations are available. We also observe consistent improvements in accuracy for tabular datasets, even when the training dataset size is large. Although the domain knowledge for data augmentations is important to achieve state-of-the-art results, our demonstration shows the potential of $i$ -Mix to be used for a wide range of application domains where domain knowledge is particularly limited.
207
+
208
+ # 4.5 TRANSFERABILITY OF $i$ -MIX
209
+
210
+ In this section, we show the improved transferability of the representations learned with $i$ -Mix. The results are provided in Table 4. First, we train linear classifiers with downstream datasets different from the pretext dataset used to train backbone networks and evaluate their performance, e.g., CIFAR-10 as pretext and CIFAR-100 as downstream datasets or vice versa. We observe consistent performance gains when learned representations from one dataset are evaluated on classification tasks of another dataset. Next, we transfer representations trained on ImageNet to the PASCAL VOC object detection task (Everingham et al., 2010). We follow the settings in prior works (He et al., 2020; Chen et al., 2020b): the parameters of the pre-trained ResNet-50 are transferred to a Faster R-CNN detector with the ResNet50-C4 backbone (Ren et al., 2015), and fine-tuned end-to-end on the VOC $_ { 0 7 + 1 2 }$ trainval dataset and evaluated on the VOC 07 test dataset. We report the average precision (AP) averaged over IoU thresholds between $50 \%$ to $9 5 \%$ at a step of $5 \%$ , and $\mathrm { { A P } _ { 5 0 } }$ and $\mathsf { A P } _ { 7 5 }$ , which are AP values when IoU threshold is $50 \%$ and $7 5 \%$ , respectively. Similar to Table 2, we observe small but consistent performance gains in all metrics. Those results confirm that $i$ -Mix improves the quality of learned representations, such that performances on downstream tasks are improved.
211
+
212
+ # 5 CONCLUSION
213
+
214
+ We propose $i$ -Mix, a domain-agnostic regularization strategy applicable to a class of self-supervised learning. The key idea of $i$ -Mix is to introduce a virtual label to each data instance, and mix both inputs and the corresponding virtual labels. We show that $i$ -Mix is applicable to state-of-the-art self-supervised representation learning methods including SimCLR, MoCo, and BYOL, which consistently improves the performance in a variety of settings and domains. Our experimental results indicate that $i$ -Mix is particularly effective when the training dataset size is small or data augmentation is not available, each of which are prevalent in practice.
215
+
216
+ # REFERENCES
217
+
218
+ Dario Amodei, Sundaram Ananthanarayanan, Rishita Anubhai, Jingliang Bai, Eric Battenberg, Carl Case, Jared Casper, Bryan Catanzaro, Qiang Cheng, Guoliang Chen, et al. Deep speech 2: End-to-end speech recognition in english and mandarin. In ICML, 2016.
219
+
220
+ Sanjeev Arora, Hrishikesh Khandeparkar, Mikhail Khodak, Orestis Plevrakis, and Nikunj Saunshi. A theoretical analysis of contrastive unsupervised representation learning. In ICML, 2019.
221
+
222
+ Yuki Markus Asano, Christian Rupprecht, and Andrea Vedaldi. Self-labelling via simultaneous clustering and representation learning. In ICLR, 2020.
223
+
224
+ Arthur Asuncion and David Newman. Uci machine learning repository, 2007.
225
+
226
+ Philip Bachman, R Devon Hjelm, and William Buchwalter. Learning representations by maximizing mutual information across views. In NeurIPS, 2019.
227
+
228
+ Christopher Beckham, Sina Honari, Vikas Verma, Alex M Lamb, Farnoosh Ghadiri, R Devon Hjelm, Yoshua Bengio, and Chris Pal. On adversarial mixup resynthesis. In NeurIPS, 2019.
229
+
230
+ Yoshua Bengio, Pascal Lamblin, Dan Popovici, and Hugo Larochelle. Greedy layer-wise training of deep networks. In NIPS, 2007.
231
+
232
+ Yoshua Bengio, Aaron Courville, and Pascal Vincent. Representation learning: A review and new perspectives. PAMI, 35(8):1798–1828, 2013.
233
+
234
+ Mathilde Caron, Piotr Bojanowski, Armand Joulin, and Matthijs Douze. Deep clustering for unsupervised learning of visual features. In ECCV, 2018.
235
+
236
+ Mathilde Caron, Piotr Bojanowski, Julien Mairal, and Armand Joulin. Unsupervised pre-training of image features on non-curated data. In ICCV, 2019.
237
+
238
+ Olivier Chapelle, Jason Weston, Leon Bottou, and Vladimir Vapnik. Vicinal risk minimization. In ´ NIPS, 2001.
239
+
240
+ Ting Chen, Xiaohua Zhai, Marvin Ritter, Mario Lucic, and Neil Houlsby. Self-supervised gans via auxiliary rotation loss. In CVPR, 2019.
241
+
242
+ Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. arXiv preprint arXiv:2002.05709, 2020a.
243
+
244
+ Xinlei Chen, Haoqi Fan, Ross Girshick, and Kaiming He. Improved baselines with momentum contrastive learning. arXiv preprint arXiv:2003.04297, 2020b.
245
+
246
+ Ekin D Cubuk, Barret Zoph, Dandelion Mane, Vijay Vasudevan, and Quoc V Le. Autoaugment: Learning augmentation policies from data. In CVPR, 2019a.
247
+
248
+ Ekin D Cubuk, Barret Zoph, Jonathon Shlens, and Quoc V Le. Randaugment: Practical data augmentation with no separate search. arXiv preprint arXiv:1909.13719, 2019b.
249
+
250
+ Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, 2009.
251
+
252
+ Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018.
253
+
254
+ Terrance DeVries and Graham W Taylor. Dataset augmentation in feature space. arXiv preprint arXiv:1702.05538, 2017a.
255
+
256
+ Terrance DeVries and Graham W Taylor. Improved regularization of convolutional neural networks with cutout. arXiv preprint arXiv:1708.04552, 2017b.
257
+
258
+ Carl Doersch and Andrew Zisserman. Multi-task self-supervised visual learning. In ICCV, 2017.
259
+
260
+ Carl Doersch, Abhinav Gupta, and Alexei A Efros. Unsupervised visual representation learning by context prediction. In ICCV, 2015.
261
+
262
+ Alexey Dosovitskiy, Jost Tobias Springenberg, Martin Riedmiller, and Thomas Brox. Discriminative unsupervised feature learning with convolutional neural networks. In NeurIPS, 2014.
263
+
264
+ Alexey Dosovitskiy, Philipp Fischer, Jost Tobias Springenberg, Martin Riedmiller, and Thomas Brox. Discriminative unsupervised feature learning with exemplar convolutional neural networks. PAMI, 38(9):1734–1747, 2015.
265
+
266
+ Mark Everingham, Luc Van Gool, Christopher KI Williams, John Winn, and Andrew Zisserman. The pascal visual object classes (voc) challenge. IJCV, 88(2):303–338, 2010.
267
+
268
+ Maurice Frechet. Sur la distance de deux lois de probabilit ´ e.´ COMPTES RENDUS HEBDOMADAIRES DES SEANCES DE L ACADEMIE DES SCIENCES, 244(6):689–692, 1957.
269
+
270
+ Spyros Gidaris, Praveer Singh, and Nikos Komodakis. Unsupervised representation learning by predicting image rotations. In ICLR, 2018.
271
+
272
+ Ian J Goodfellow, David Warde-Farley, Mehdi Mirza, Aaron Courville, and Yoshua Bengio. Maxout networks. In ICML, 2013.
273
+
274
+ Priya Goyal, Piotr Dollar, Ross Girshick, Pieter Noordhuis, Lukasz Wesolowski, Aapo Kyrola, ´ Andrew Tulloch, Yangqing Jia, and Kaiming He. Accurate, large minibatch SGD: training imagenet in 1 hour. arXiv preprint arXiv:1706.02677, 2017.
275
+
276
+ Jean-Bastien Grill, Florian Strub, Florent Altche, Corentin Tallec, Pierre H Richemond, Elena ´ Buchatskaya, Carl Doersch, Bernardo Avila Pires, Zhaohan Daniel Guo, Mohammad Gheshlaghi Azar, et al. Bootstrap your own latent: A new approach to self-supervised learning. arXiv preprint arXiv:2006.07733, 2020.
277
+
278
+ Hongyu Guo. Nonlinear mixup: Out-of-manifold data augmentation for text classification. In AAAI, 2020.
279
+
280
+ Hongyu Guo, Yongyi Mao, and Richong Zhang. Augmenting data with mixup for sentence classification: An empirical study. arXiv preprint arXiv:1905.08941, 2019.
281
+
282
+ Michael Gutmann and Aapo Hyvarinen. Noise-contrastive estimation: A new estimation principle ¨ for unnormalized statistical models. In AISTATS, 2010.
283
+
284
+ Ethan Harris, Antonia Marcu, Matthew Painter, Mahesan Niranjan, and Adam Prugel- ¨ Bennett Jonathon Hare. Fmix: Enhancing mixed sample data augmentation. arXiv preprint arXiv:2002.12047, 2020.
285
+
286
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016.
287
+
288
+ Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In CVPR, 2020.
289
+
290
+ Olivier J Henaff, Ali Razavi, Carl Doersch, SM Eslami, and Aaron van den Oord. Data-efficient ´ image recognition with contrastive predictive coding. arXiv preprint arXiv:1905.09272, 2019.
291
+
292
+ Dan Hendrycks, Mantas Mazeika, Saurav Kadavath, and Dawn Song. Using self-supervised learning can improve model robustness and uncertainty. In NeurIPS, 2019.
293
+
294
+ Dan Hendrycks, Norman Mu, Ekin D Cubuk, Barret Zoph, Justin Gilmer, and Balaji Lakshminarayanan. Augmix: A simple data processing method to improve robustness and uncertainty. In ICLR, 2020.
295
+
296
+ Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. In NeurIPS, 2017.
297
+
298
+ R Devon Hjelm, Alex Fedorov, Samuel Lavoie-Marchildon, Karan Grewal, Phil Bachman, Adam Trischler, and Yoshua Bengio. Learning deep representations by mutual information estimation and maximization. In ICLR, 2019.
299
+
300
+ Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015.
301
+
302
+ Yannis Kalantidis, Mert Bulent Sariyildiz, Noe Pion, Philippe Weinzaepfel, and Diane Larlus. Hard negative mixing for contrastive learning. In NeurIPS, 2020.
303
+
304
+ Prannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna, Yonglong Tian, Phillip Isola, Aaron Maschinot, Ce Liu, and Dilip Krishnan. Supervised contrastive learning. arXiv preprint arXiv:2004.11362, 2020.
305
+
306
+ Dahun Kim, Donghyeon Cho, Donggeun Yoo, and In So Kweon. Learning image representations by completing damaged jigsaw puzzles. In WACV, 2018.
307
+
308
+ Sungnyun Kim, Gihun Lee, Sangmin Bae, and Se-Young Yun. Mixco: Mix-up contrastive learning for visual representation. arXiv preprint arXiv:2010.06300, 2020.
309
+
310
+ Bruno Korbar, Du Tran, and Lorenzo Torresani. Cooperative learning of audio and video models from self-supervised synchronization. In NeurIPS, 2018.
311
+
312
+ Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical report, University of Toronto, 2009.
313
+
314
+ Kimin Lee, Honglak Lee, Kibok Lee, and Jinwoo Shin. Training confidence-calibrated classifiers for detecting out-of-distribution samples. In ICLR, 2018.
315
+
316
+ Michelle A Lee, Yuke Zhu, Krishnan Srinivasan, Parth Shah, Silvio Savarese, Li Fei-Fei, Animesh Garg, and Jeannette Bohg. Making sense of vision and touch: Self-supervised learning of multimodal representations for contact-rich tasks. In ICRA, 2019.
317
+
318
+ Yibo Lin, Yuki Watanabe, Taiki Kimura, Tetsuaki Matsunawa, Shigeki Nojima, Meng Li, and David Z Pan. Data efficient lithography modeling with residual neural networks and transfer learning. In Proceedings of the 2018 International Symposium on Physical Design, pp. 82–89, 2018.
319
+
320
+ Ilya Loshchilov and Frank Hutter. Sgdr: Stochastic gradient descent with warm restarts. In ICLR, 2017.
321
+
322
+ Thomas Lucas, Corentin Tallec, Jakob Verbeek, and Yann Ollivier. Mixed batches and symmetric discriminators for gan training. In ICML, 2018.
323
+
324
+ Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. Distributed representations of words and phrases and their compositionality. In NeurIPS, 2013.
325
+
326
+ Ishan Misra and Laurens van der Maaten. Self-supervised learning of pretext-invariant representations. In CVPR, 2020.
327
+
328
+ Takeru Miyato, Shin-ichi Maeda, Masanori Koyama, and Shin Ishii. Virtual adversarial training: a regularization method for supervised and semi-supervised learning. PAMI, 41(8):1979–1993, 2018.
329
+
330
+ Yair Movshovitz-Attias, Alexander Toshev, Thomas K Leung, Sergey Ioffe, and Saurabh Singh. No fuss distance metric learning using proxies. In ICCV, 2017.
331
+
332
+ Mehdi Noroozi and Paolo Favaro. Unsupervised learning of visual representations by solving jigsaw puzzles. In ECCV, 2016.
333
+
334
+ Mehdi Noroozi, Hamed Pirsiavash, and Paolo Favaro. Representation learning by learning to count. In ICCV, 2017.
335
+
336
+ Mehdi Noroozi, Ananth Vinjimoor, Paolo Favaro, and Hamed Pirsiavash. Boosting self-supervised learning via knowledge transfer. In CVPR, 2018.
337
+
338
+ Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018.
339
+
340
+ Andrew Owens and Alexei A Efros. Audio-visual scene analysis with self-supervised multisensory features. In ECCV, 2018.
341
+
342
+ Tianyu Pang, Kun Xu, and Jun Zhu. Mixup inference: Better exploiting mixup to defend adversarial attacks. arXiv preprint arXiv:1909.11515, 2019.
343
+
344
+ Daniel S Park, William Chan, Yu Zhang, Chung-Cheng Chiu, Barret Zoph, Ekin D Cubuk, and Quoc V Le. Specaugment: A simple data augmentation method for automatic speech recognition. arXiv preprint arXiv:1904.08779, 2019.
345
+
346
+ Deepak Pathak, Philipp Krahenbuhl, Jeff Donahue, Trevor Darrell, and Alexei A Efros. Context encoders: Feature learning by inpainting. In CVPR, 2016.
347
+
348
+ Mirco Ravanelli, Jianyuan Zhong, Santiago Pascual, Pawel Swietojanski, Joao Monteiro, Jan Trmal, and Yoshua Bengio. Multi-task self-supervised learning for robust speech recognition. In ICASSP, 2020.
349
+
350
+ Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In NeurIPS, 2015.
351
+
352
+ Pierre Sermanet, Corey Lynch, Yevgen Chebotar, Jasmine Hsu, Eric Jang, Stefan Schaal, Sergey Levine, and Google Brain. Time-contrastive networks: Self-supervised learning from video. In ICRA, 2018.
353
+
354
+ Zhiqiang Shen, Zechun Liu, Zhuang Liu, Marios Savvides, and Trevor Darrell. Rethinking image mixture for unsupervised visual representation learning. arXiv preprint arXiv:2003.05438, 2020.
355
+
356
+ Woojoo Sim, Kibok Lee, Dingdong Yang, Jaeseung Jeong, Ji-Suk Hong, Sooryong Lee, and Honglak Lee. Automatic correction of lithography hotspots with a deep generative model. In Optical Microlithography XXXII, volume 10961, pp. 1096105. International Society for Optics and Photonics, 2019.
357
+
358
+ Kihyuk Sohn. Improved deep metric learning with multi-class n-pair loss objective. In NeurIPS, 2016.
359
+
360
+ Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In CVPR, 2015.
361
+
362
+ Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In CVPR, 2016.
363
+
364
+ Sunil Thulasidasan, Gopinath Chennupati, Jeff A Bilmes, Tanmoy Bhattacharya, and Sarah Michalak. On mixup training: Improved calibration and predictive uncertainty for deep neural networks. In NeurIPS, 2019.
365
+
366
+ Yonglong Tian, Dilip Krishnan, and Phillip Isola. Contrastive multiview coding. In ECCV, 2020a.
367
+
368
+ Yonglong Tian, Chen Sun, Ben Poole, Dilip Krishnan, Cordelia Schmid, and Phillip Isola. What makes for good views for contrastive learning. arXiv preprint arXiv:2005.10243, 2020b.
369
+
370
+ Leonid Nisonovich Vaserstein. Markov processes over denumerable products of spaces, describing large systems of automata. Problemy Peredachi Informatsii, 5(3):64–72, 1969.
371
+
372
+ Vikas Verma, Alex Lamb, Christopher Beckham, Amir Najafi, Ioannis Mitliagkas, Aaron Courville, David Lopez-Paz, and Yoshua Bengio. Manifold mixup: Better representations by interpolating hidden states. In ICML, 2019.
373
+
374
+ Vikas Verma, Minh-Thang Luong, Kenji Kawaguchi, Hieu Pham, and Quoc V Le. Towards domainagnostic contrastive learning. arXiv preprint arXiv:2011.04419, 2020.
375
+
376
+ Pete Warden. Speech commands: A dataset for limited-vocabulary speech recognition. arXiv preprint arXiv:1804.03209, 2018.
377
+
378
+ Jason W Wei and Kai Zou. Eda: Easy data augmentation techniques for boosting performance on text classification tasks. arXiv preprint arXiv:1901.11196, 2019.
379
+
380
+ Yue Wu, Yinpeng Chen, Lijuan Wang, Yuancheng Ye, Zicheng Liu, Yandong Guo, Zhengyou Zhang, and Yun Fu. Incremental classifier learning with generative adversarial networks. arXiv preprint arXiv:1802.00853, 2018a.
381
+
382
+ Zhirong Wu, Yuanjun Xiong, Stella X Yu, and Dahua Lin. Unsupervised feature learning via non-parametric instance discrimination. In CVPR, 2018b.
383
+
384
+ Mang Ye, Xu Zhang, Pong C Yuen, and Shih-Fu Chang. Unsupervised embedding learning via invariant and spreading instance feature. In CVPR, 2019.
385
+
386
+ Sangdoo Yun, Dongyoon Han, Seong Joon Oh, Sanghyuk Chun, Junsuk Choe, and Youngjoon Yoo. Cutmix: Regularization strategy to train strong classifiers with localizable features. In ICCV, 2019.
387
+
388
+ Xiaohua Zhai, Avital Oliver, Alexander Kolesnikov, and Lucas Beyer. S4l: Self-supervised semisupervised learning. In ICCV, 2019.
389
+
390
+ Hongyi Zhang, Moustapha Cisse, Yann N Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. In ICLR, 2018.
391
+
392
+ Richard Zhang, Phillip Isola, and Alexei A Efros. Colorful image colorization. In ECCV, 2016.
393
+
394
+ Xiang Zhang, Junbo Zhao, and Yann LeCun. Character-level convolutional networks for text classification. In NeurIPS, 2015.
395
+
396
+ Zhun Zhong, Liang Zheng, Guoliang Kang, Shaozi Li, and Yi Yang. Random erasing data augmentation. In AAAI, 2020.
397
+
398
+ Hong-Yu Zhou, Shuang Yu, Cheng Bian, Yifan Hu, Kai Ma, and Yefeng Zheng. Comparing to learn: Surpassing imagenet pretraining on radiographs by comparing image representations. In MICCAI, 2020.
399
+
400
+ # A MORE APPLICATIONS OF $i$ -MIX
401
+
402
+ In this section, we introduce more variations of $i$ -Mix. For conciseness, we use $v _ { i }$ to denote virtual labels for different methods. We make the definition of $v _ { i }$ for each application clear.
403
+
404
+ # A.1 $i$ -MIX FOR SIMCLR
405
+
406
+ For each anchor, SimCLR takes other anchors as negative samples such that the virtual labels must be extended. Let $x _ { N + i } = \tilde { x } _ { i }$ for conciseness, and $\bar { v _ { i } } \in \{ 0 , 1 \} ^ { 2 \bar { N } }$ be the virtual label indicating the positive sample of each anchor, where $v _ { i , N + i } = 1$ and $v _ { i , j \neq N + i } = 0$ . Note that $v _ { i , i } = 0$ because the anchor itself is not counted as a positive sample. Then, Eq. (4) can be represented in the form of the cross-entropy loss:
407
+
408
+ $$
409
+ \ell _ { \mathrm { S i m C L R } } ( x _ { i } , v _ { i } ; \mathcal { B } ) = - \sum _ { n = 1 } ^ { 2 N } v _ { i , n } \log \frac { \exp { \left( s ( f _ { i } , f _ { n } ) / \tau \right) } } { \sum _ { k = 1 , k \neq i } ^ { 2 N } \exp { \left( s ( f _ { i } , f _ { k } ) / \tau \right) } } .
410
+ $$
411
+
412
+ The application of $i$ -Mix to SimCLR is straightforward: for two data instances $( x _ { i } , v _ { i } )$ , $( x _ { j } , v _ { j } )$ and a batch of data $\boldsymbol { B } = \{ x _ { i } \} _ { i = 1 } ^ { 2 N }$ , the $i$ -Mix loss is defined as follows:12
413
+
414
+ $$
415
+ \ell _ { \mathrm { S i m C L R } } ^ { i \mathrm { - M i x } } \big ( ( x _ { i } , v _ { i } ) , ( x _ { j } , v _ { j } ) ; \mathcal { B } , \lambda \big ) = \ell _ { \mathrm { S i m C L R } } \big ( \lambda x _ { i } + ( 1 - \lambda ) x _ { j } , \lambda v _ { i } + ( 1 - \lambda ) v _ { j } ; \mathcal { B } \big ) .
416
+ $$
417
+
418
+ Note that only the input data of Eq. (A.2) is mixed, such that $f _ { i }$ in Eq. (A.1) is an embedding vector of the mixed data while the other $f _ { n }$ ’s are the ones of clean data. Because both clean and mixed data need to be fed to the network $f$ , $i$ -Mix for SimCLR requires twice more memory and training time compared to SimCLR when the same batch size is used.
419
+
420
+ # A.2 $i$ -MIX FOR SUPERVISED CONTRASTIVE LEARNING
421
+
422
+ Supervised contrastive learning has recently shown to be effective for supervised representation learning and it often outperforms the standard end-to-end supervised classifier learning (Khosla et al., 2020). Suppose an one-hot label $y _ { i } \in \{ 0 , 1 \} ^ { C }$ is assigned to a data $x _ { i }$ , where $C$ is the number of classes. Let $ { \boldsymbol { B } } = \{ ( x _ { i } , y _ { i } ) \} _ { i = 1 } ^ { 2 N }$ $x _ { N + i } = \tilde { x } _ { i }$ , let $v _ { i } \in \{ 0 , 1 \} ^ { 2 N }$ and $y _ { N + i } = y _ { i }$ be the virtual label indicating the positive samples of each anchor, for conciseness. For a batch of data pairs and their labels where $v _ { i , j } = 1$ if $y _ { i } = y _ { j \neq i }$ , and otherwise $v _ { i , j } = 0$ . Intuitively, $\begin{array} { r } { \sum _ { j = 1 } ^ { 2 N } v _ { i , j } = 2 N _ { y _ { i } } - 1 } \end{array}$ where $N _ { y _ { i } }$ is the number of data with the label $y _ { i }$ . Then, the supervised learning version of the SimCLR (SupCLR) loss function is written as follows:
423
+
424
+ $$
425
+ \ell _ { \mathrm { S u p C L R } } ( x _ { i } , v _ { i } ; \mathcal { B } ) = - \frac { 1 } { 2 N _ { y _ { i } } - 1 } \sum _ { n = 1 } ^ { 2 N } v _ { i , n } \log \frac { \exp { \left( s ( f _ { i } , f _ { n } ) / \tau \right) } } { \sum _ { k = 1 , k \neq i } ^ { 2 N } \exp { \left( s ( f _ { i } , f _ { k } ) / \tau \right) } } .
426
+ $$
427
+
428
+ The application of $i$ -Mix to SupCLR is straightforward: for two data instances $( x _ { i } , v _ { i } )$ , $( x _ { j } , v _ { j } )$ and a batch of data $\boldsymbol { B } = \{ x _ { i } \} _ { i = 1 } ^ { 2 N }$ , the $i$ -Mix loss is defined as follows:
429
+
430
+ $$
431
+ \ell _ { \mathrm { S u p C L R } } ^ { i \mathrm { - } \mathrm { M i x } } \big ( ( x _ { i } , v _ { i } ) , ( x _ { j } , v _ { j } ) ; \mathcal { B } , \lambda \big ) = \ell _ { \mathrm { S u p C L R } } \big ( \lambda x _ { i } + ( 1 - \lambda ) x _ { j } , \lambda v _ { i } + ( 1 - \lambda ) v _ { j } ; \mathcal { B } \big ) .
432
+ $$
433
+
434
+ # A.3 $i$ -MIX FOR N-PAIR SUPERVISED CONTRASTIVE LEARNING
435
+
436
+ Note that $i$ -Mix in Eq. (A.4) is not as efficient as SupCLR in Eq. (A.3) due to the same reason in the case of SimCLR. To overcome this, we reformulate SupCLR in the form of the N-pair loss (Sohn, 2016). Suppose an one-hot label $y _ { i } \in \{ 0 , 1 \} ^ { C }$ is assigned to a data $x _ { i }$ , where $C$ is the number of classes. For a batch of data pairs and their labels $\boldsymbol { B } = \{ ( x _ { i } , \tilde { x } _ { i } , y _ { i } ) \} _ { i = 1 } ^ { N }$ , let $v _ { i } \in \{ 0 , 1 \} ^ { N }$ be the virtual label indicating the positive samples of each anchor, where $v _ { i , j } = 1$ if $y _ { i } = y _ { j \neq i }$ , and otherwise $v _ { i , j } = 0$ . Then, the supervised version of the $\mathbf { N } .$ -pair (Sup-N-pair) contrastive loss function is written as follows:
437
+
438
+ $$
439
+ \ell _ { \mathrm { S u p - N - p a i r } } ( x _ { i } , v _ { i } ; \mathcal { B } ) = - \frac { 1 } { N _ { y _ { i } } } \sum _ { n = 1 } ^ { N } v _ { i , n } \log \frac { \exp { \left( s ( f _ { i } , \tilde { f } _ { n } ) / \tau \right) } } { \sum _ { k = 1 } ^ { N } \exp { \left( s ( f _ { i } , \tilde { f } _ { k } ) / \tau \right) } } .
440
+ $$
441
+
442
+ Then, the $i$ -Mix loss for Sup-N-pair is defined as follows:
443
+
444
+ $$
445
+ \ell _ { \mathrm { S u p - N - p a i r } } ^ { i \mathrm { - M i x } } \big ( ( x _ { i } , v _ { i } ) , ( x _ { j } , v _ { j } ) ; \mathcal { B } , \lambda \big ) = \ell _ { \mathrm { S u p - N - p a i r } } \big ( \lambda x _ { i } + ( 1 - \lambda ) x _ { j } , \lambda v _ { i } + ( 1 - \lambda ) v _ { j } ; \mathcal { B } \big ) .
446
+ $$
447
+
448
+ 12The $j$ -th data can be excluded from the negative samples, but it does not result in a significant difference.
449
+
450
+ # B PROOF OF THE LINEARITY OF LOSSES WITH RESPECT TO VIRTUAL LABELS
451
+
452
+ Cross-entropy loss. The loss used in contrastive representation learning works, which is often referred to as InfoNCE (Oord et al., 2018), can be represented in the form of the cross-entropy loss as we showed for N-pair contrastive learning, SimCLR (Chen et al., 2020a), and MoCo (He et al., 2020). Here we provide an example in the case of N-pair contrastive learning. Let $f _ { i j } ^ { \lambda } = f ( \lambda x _ { i } + ( 1 - \lambda ) x _ { j } )$ for conciseness.
453
+
454
+ $$
455
+ \begin{array} { l } { \ell _ { \mathrm { N - p a r } } ^ { \mathrm { - d M x } } \big ( ( x _ { i } , v _ { i } ) , ( x _ { j } , v _ { j } ) ; \mathcal { B } , \lambda \big ) = \ell _ { \mathrm { N - p a r } } ( \lambda x _ { i } + ( 1 - \lambda ) x _ { j } , \lambda v _ { i } + ( 1 - \lambda ) v _ { j } ; \mathcal { B } ) } \\ { = - { \displaystyle \sum _ { n = 1 } ^ { N } } ( \lambda v _ { i , n } + ( 1 - \lambda ) v _ { j , n } ) \log { \frac { \exp { \big ( s ( f _ { i j } ^ { \lambda } , \tilde { f _ { n } } ) / \tau \big ) } } { \sum _ { k = 1 } ^ { N } \exp { \big ( s ( f _ { i j } ^ { \lambda } , \tilde { f _ { k } } ) / \tau \big ) } } } } \\ { = - { \displaystyle \lambda \sum _ { n = 1 } ^ { N } } v _ { i , n } \log { \frac { \exp { \big ( s ( f _ { i j } ^ { \lambda } , \tilde { f _ { n } } ) / \tau \big ) } } { \sum _ { k = 1 } ^ { N } \exp { \big ( s ( f _ { i j } ^ { \lambda } , \tilde { f _ { k } } ) / \tau \big ) } } } - ( 1 - \lambda ) { \displaystyle \sum _ { n = 1 } ^ { N } } v _ { j , n } \log { \frac { \exp { \big ( s ( f _ { i j } ^ { \lambda } , \tilde { f _ { n } } ) / \tau \big ) } } { \sum _ { k = 1 } ^ { N } \exp { \big ( s ( f _ { i j } ^ { \lambda } , \tilde { f _ { k } } ) / \tau \big ) } } } } \\ { = { \lambda \ell _ { \mathrm { N - p a r } } } ( \lambda x _ { i } + ( 1 - \lambda ) x _ { j } , v _ { i } ; \mathcal { B } ) + ( 1 - \lambda ) \ell _ { \mathrm { N - p a r } } ( \lambda x _ { i } + ( 1 - \lambda ) x _ { j } , v _ { j } ; \mathcal { B } ) . } \end{array}
456
+ $$
457
+
458
+ L2 loss between L2-normalized feature vectors. The BYOL (Grill et al., 2020) loss is in this type. Let $\tilde { F } = [ \tilde { f } _ { 1 } / \| \tilde { f } _ { 1 } \| , . . . , \tilde { f } _ { N } / \| \tilde { f } _ { N } \| ] \in \mathbb { R } ^ { D \times N }$ such that $\tilde { f } _ { i } / \| \tilde { f } _ { i } \| = \tilde { F } v _ { i }$ , and $\bar { g } = g ( f ( \lambda x _ { i } + ( 1 - \lambda ) x _ { j } ) ) / \| g ( f ( \lambda x _ { i } + ( 1 - \lambda ) x _ { j } ) ) \|$ for conciseness.
459
+
460
+ $$
461
+ \begin{array} { r l } & { \ell _ { \mathtt { B Y O L } } ^ { \mathrm { i - A l i x } } \big ( ( x _ { i } , v _ { i } ) , ( x _ { j } , v _ { j } ) ; \mathcal { B } , \lambda \big ) = \ell _ { \mathtt { B Y O L } } ( \lambda x _ { i } + ( 1 - \lambda ) x _ { j } , \lambda v _ { i } + ( 1 - \lambda ) v _ { j } ) } \\ & { \ = \left\| \bar { g } - \tilde { F } ( \lambda v _ { i } + ( 1 - \lambda ) v _ { j } ) \right\| ^ { 2 } = \left\| \bar { g } - \Big ( \lambda \tilde { F } v _ { i } + ( 1 - \lambda ) \tilde { F } v _ { j } \Big ) \right\| ^ { 2 } } \\ & { = 1 - 2 \cdot \bar { g } ^ { \top } \left( \lambda \tilde { F } v _ { i } + ( 1 - \lambda ) \tilde { F } v _ { j } \right) + \left\| \lambda \tilde { F } v _ { i } + ( 1 - \lambda ) \tilde { F } v _ { j } \right\| ^ { 2 } } \\ & { = 2 - 2 \cdot \bar { g } ^ { \top } \left( \lambda \tilde { F } v _ { i } + ( 1 - \lambda ) \tilde { F } v _ { j } \right) + \mathrm { c o n s t } } \\ & { = \lambda \| \bar { g } - \tilde { F } v _ { i } \| ^ { 2 } + ( 1 - \lambda ) \| \bar { g } - \tilde { F } v _ { j } \| ^ { 2 } + \mathrm { c o n s t } } \\ & { = \lambda \ell _ { \mathtt { B Y O L } } ( \lambda x _ { i } + ( 1 - \lambda ) x _ { j } , v _ { i } ; \mathcal { B } ) + ( 1 - \lambda ) \ell _ { \mathtt { B Y O L } } ( \lambda x _ { i } + ( 1 - \lambda ) x _ { j } , v _ { j } ; \mathcal { B } ) + \mathrm { c o n s t . } } \end{array}
462
+ $$
463
+
464
+ Because $\tilde { F }$ is not backpropagated, it can be considered as a constant.
465
+
466
+ # C MORE ON EXPERIMENTS
467
+
468
+ We describe details of the experimental settings and more experimental results. For additional experiments below, we adapted the code for supervised contrastive learning (Khosla et al., 2020).13
469
+
470
+ # C.1 SETUP
471
+
472
+ In this section, we describe details of the experimental settings. Note that the learning rate is scaled by the batch size (Goyal et al., 2017): ScaledLearningRate $=$ LearningRate $\times$ BatchSize/256.
473
+
474
+ Image. The experiments on CIFAR-10 and 100 (Krizhevsky & Hinton, 2009) and ImageNet (Deng et al., 2009) are conducted in two stages: following Chen et al. (2020a), the convolutional neural network (CNN) part of ResNet-50 (He et al., 2016)14 followed by the two-layer multilayer perceptron (MLP) projection head (output dimensions are 2048 and 128, respectively) is trained on the unlabeled pretext dataset with a batch size of 256 (i.e., 512 augmented data) with the stochastic gradient descent (SGD) optimizer with a momentum of 0.9 over up to 4000 epochs. BYOL has an additional prediction head (output dimensions are the same with the projection head), which follows the projection head, only for the model updated by gradient. 10 epochs of warmup with a linear schedule to an initial learning rate of 0.125, followed by the cosine learning rate schedule (Loshchilov & Hutter, 2017) is used. We use the weight decay of 0.0001 for the first stage. For ImageNet, we use the same hyperparameters except that the batch size is 512 and the initial learning rate is 0.03.
475
+
476
+ Then, the head of the CNN is replaced with a linear classifier, and only the linear classifier is trained with the labeled downstream dataset. For the second stage, we use a batch size of 256 with the SGD optimizer with a momentum of 0.9 and an initial learning rate chosen among $\{ 1 , 3 , 5 , 1 0 , 3 0 , 5 0 , 7 0 \}$ over 100 epochs, where the learning rate is decayed by 0.2 after 80, 90, 95 epochs. No weight decay is used at the second stage. The quality of representation is evaluated by the top-1 accuracy on the downstream task. We sample a single mixing coefficient $\lambda \sim \mathrm { B e t a } ( 1 , 1 )$ for each training batch. The temperature is set to $\tau = 0 . 2$ . Note that the optimal distribution of $\lambda$ and the optimal value of $\tau$ varies over different architectures, methods, and datasets, but the choices above result in a reasonably good performance. The memory bank size of MoCo is 65536 for ImageNet and 4096 for other datasets, and the momentum for the exponential moving average (EMA) update is 0.999 for MoCo and BYOL. We do not symmetrize the BYOL loss, as it does not significantly improve the performance while increasing computational complexity.
477
+
478
+ For data augmentation, we follow Chen et al. (2020a): We apply a set of data augmentations randomly in sequence including resized cropping (Szegedy et al., 2015), horizontal flipping with a probability of 0.5, color jittering,15 and gray scaling with a probability of 0.2. A Gaussian blurring with $\sigma \in [ 0 . { \dot { 1 } } , 2 ]$ and kernel size of $10 \%$ of the image height/width is applied for ImageNet. For evaluation on downstream tasks, we apply padded cropping with the pad size of 4 and horizontal flipping for CIFAR-10 and 100, and resized cropping and horizontal flipping for ImageNet.
479
+
480
+ Speech. In the experiments on Speech Commands (Warden, 2018), the network is the same with the image domain experiments, except that the number of input channels is one instead of three. The temperature is set to $\tau = 0 . 5$ for the standard setting and $\tau = 0 . 2$ for the no augmentation setting. $10 \%$ of silence data (all zero) are added when training. At the first stage, the model is trained with the SGD optimizer with a momentum of 0.9 and an initial learning rate of 0.125 over 500 epochs, where the learning rate decays by 0.1 after 300 and 400 epochs and the weight decay is 0.0001. The other settings are the same with the experiments on CIFAR.
481
+
482
+ For data augmentation,16 we apply a set of data augmentations randomly in sequence including changing amplitude, speed, and pitch in time domain, stretching, time shifting, and adding background noise in frequency domain. Each data augmentation is applied with a probability of 0.5. Augmented data are then transformed to the mel spectogram in the size of $3 2 \times 3 2$ .
483
+
484
+ Tabular. In the experiments on CovType and Higgs (Asuncion & Newman, 2007), we take a fivelayer MLP with batch normalization as a backbone network. The output dimensions of layers are (2048-2048-4096-4096-8192), where all layers have batch normalization followed by ReLU except for the last layer. The last layer activation is maxout (Goodfellow et al., 2013) with 4 sets, such that the output dimension is 2048. On top of this five-layer MLP, we attach two-layer MLP (2048-128) as a projection head. We sample a single mixing coefficient $\lambda \sim \operatorname { B e t a } ( \alpha , \alpha )$ for each training batch, where $\alpha = 2$ for CovType and Higgs100k, and $\alpha = 1$ for Higgs1M. The temperature is set to $\tau = 0 . 1$ . The other settings are the same with the experiments on CIFAR, except that the batch size is 512 and the number of training epochs is 500. At the second stage, the MLP head is replaced with a linear classifier. For Higgs, the classifier is computed by linear regression from the feature matrix obtained without data augmentation to the label matrix using the pseudoinverse. Since the prior knowledge on tabular data is very limited, only the masking noise with a probability of 0.2 is considered as a data augmentation.
485
+
486
+ # C.2 VARIATIONS OF $i$ -MIX
487
+
488
+ We compare the MixUp (Zhang et al., 2018) and CutMix (Yun et al., 2019) variation of $i$ -Mix on N-pair contrastive learning and SimCLR. To distinguish them, we call them $i$ -MixUp and $i$ -CutMix, respectively. To be fair with the memory usage in the pretext task stage, we reduce the batch size of $i$ -MixUp and $i$ -CutMix by half (256 to 128) for SimCLR. Following the learning rate adjustment strategy in Goyal et al. (2017), we also decrease the learning rate by half (0.125 to 0.0625) when the batch size is reduced. We note that $i$ -MixUp and $i$ -CutMix on SimCLR take approximately 2.5 times more training time to achieve the same number of training epochs. The results are provided in Table C.1. We first verify that the N-pair formulation results in no worse performance than that of SimCLR. This justifies to conduct experiments using the N-pair formulation instead of that of
489
+
490
+ Table C.1: Comparison of N-pair contrastive learning and SimCLR with $i$ -MixUp and $i$ -CutMix on them with ResNet-50 on CIFAR-10 and 100. We run all experiments for 1000 epochs. $i$ -MixUp improves the accuracy on the downstream task regardless of the data distribution shift between the pretext and downstream tasks. $i$ -CutMix shows a comparable performance with $i$ -MixUp when the pretext and downstream datasets are the same, but it does not when the data distribution shift occurs.
491
+
492
+ <table><tr><td rowspan="2">Pretext</td><td rowspan="2">Downstream</td><td colspan="3">N-pair</td><td colspan="3">SimCLR</td></tr><tr><td>Vanilla</td><td>i-MixUp</td><td>i-CutMix</td><td>Vanilla</td><td>i-MixUp</td><td>i-CutMix</td></tr><tr><td rowspan="2">CIFAR-10</td><td>CIFAR-10</td><td>92.4 ± 0.1</td><td>94.8 ± 0.2</td><td>94.7 ± 0.1</td><td>92.5 ± 0.1</td><td>94.8 ± 0.2</td><td>94.8 ± 0.2</td></tr><tr><td>CIFAR-100</td><td>60.2 ± 0.3</td><td>63.3 ± 0.2</td><td>61.5 ± 0.2</td><td>60.0 ± 0.2</td><td>61.4 ± 1.0</td><td>57.1 ± 0.4</td></tr><tr><td rowspan="2">CIFAR-100</td><td>CIFAR-10</td><td>84.4 ± 0.2</td><td>86.2 ± 0.2</td><td>85.1 ± 0.2</td><td>84.4 ± 0.2</td><td>85.2 ± 0.3</td><td>83.7 ± 0.6</td></tr><tr><td>CIFAR-100</td><td>68.7 ±0.2</td><td>72.3 ± 0.2</td><td>72.3 ± 0.4</td><td>68.7 ± 0.2</td><td>72.3 ± 0.2</td><td>71.7 ± 0.2</td></tr></table>
493
+
494
+ <table><tr><td rowspan="2">Pretext</td><td rowspan="2">Downstream</td><td colspan="3">Self-Supervised Pretext</td><td colspan="3">Supervised Pretext</td></tr><tr><td>SimCLR</td><td>N-pair</td><td>+i-Mix</td><td>SimCLR</td><td>N-pair</td><td>+ i-Mix</td></tr><tr><td rowspan="2">CIFAR-10</td><td>CIFAR-10</td><td>92.5 ± 0.1</td><td>92.4 ± 0.1</td><td>94.8 ± 0.2</td><td>95.6 ± 0.3</td><td>95.7 ± 0.1</td><td>97.0 ± 0.1</td></tr><tr><td>CIFAR-100</td><td>60.0 ± 0.2</td><td>60.2 ± 0.3</td><td>63.3 ± 0.2</td><td>58.6 ± 0.2</td><td>58.9 ± 0.5</td><td>57.8 ± 0.6</td></tr><tr><td rowspan="2">CIFAR-100</td><td>CIFAR-10</td><td>84.4 ± 0.2</td><td>84.4 ±0.2</td><td>86.2 ± 0.2</td><td>86.5 ± 0.4</td><td>86.7 ±0.2</td><td>88.7 ± 0.2</td></tr><tr><td>CIFAR-100</td><td>68.7 ± 0.2</td><td>68.7 ±0.2</td><td>72.3 ± 0.2</td><td>74.3 ± 0.2</td><td>74.6 ± 0.3</td><td>78.4 ± 0.2</td></tr></table>
495
+
496
+ Table C.2: Comparison of the N-pair self-supervised and supervised contrastive learning methods and $i$ -Mix on them with ResNet-50 on CIFAR-10 and 100. We also provide the performance of formulations proposed in prior works: SimCLR (Chen et al., 2020a) and its supervised version (Khosla et al., 2020). We run all experiments for 1000 epochs. $i$ -Mix improves the accuracy on the downstream task regardless of the data distribution shift between the pretext and downstream tasks, except the case that the pretest task has smaller number of classes than that of the downstream task. The quality of representation depends on the pretext task in terms of the performance of transfer learning: self-supervised learning is better on CIFAR-10, while supervised learning is better on CIFAR-100.
497
+
498
+ SimCLR, which is simpler and more efficient, especially when applying $i$ -Mix, while not losing the performance. When pretext and downstream tasks share the training dataset, $i$ -CutMix often outperforms $i$ -MixUp, though the margin is small. However, $i$ -CutMix shows a worse performance in transfer learning.
499
+
500
+ Table C.2 compares the performance of SimCLR, N-pair contrastive learning, and $i$ -Mix on N-pair contrastive learning when the pretext task is self-supervised and supervised contrastive learning. We confirm that the N-pair formulation results in no worse performance than that of SimCLR in supervised contrastive learning as well. $i$ -Mix improves the performance of supervised contrastive learning from $9 5 . 7 \%$ to $9 7 . 0 \%$ on CIFAR-10, similarly to improvement achieved by MixUp for supervised learning where it improves the performance of supervised classifier learning from $9 5 . 5 \%$ to $9 6 . 6 \%$ . On the other hand, when the pretext dataset is CIFAR-100, the performance of supervised contrastive learning is not better than that of supervised learning: MixUp improves the performance of supervised classifier learning from $7 8 . 9 \%$ to $8 2 . 2 \%$ , and $i$ -Mix improves the performance of supervised contrastive learning from $7 4 . 6 \%$ to $7 8 . 4 \%$ .
501
+
502
+ While supervised $i$ -Mix improves the classification accuracy on CIFAR-10 when trained on CIFAR10, the representation does not transfer well to CIFAR-100, possibly due to overfitting to 10 class classification. When pretext dataset is CIFAR-100, supervised contrastive learning shows a better performance than self-supervised contrastive learning regardless of the distribution shift, as it learns sufficiently general representation for linear classifier to work well on CIFAR-10 as well.
503
+
504
+ # C.3 QUALITATIVE EMBEDDING ANALYSIS
505
+
506
+ Figure C.1 visualizes embedding spaces learned by N-pair contrastive learning and $i$ -Mix on CIFAR10 and 100. When the downstream dataset is the same with the pretext task, both contrastive learning and $i$ -Mix cluster classes well, as shown in Figure C.1(a) and C.1(b). However, when the downstream task is transferred to CIFAR-100, $i$ -Mix in Figure C.1(d) clusters classes better than contrastive
507
+
508
+ ![](images/09aaec87d3dfdc35343a524857d7608e25fc20b8fefbed66db145cd3957a69f8.jpg)
509
+ Figure C.1: t-SNE visualization of embeddings trained by contrastive learning and $i$ -Mix with ResNet50 on CIFAR-10. (a,b): Classes are well-clustered in both cases when applied to CIFAR-10. (c,d): When models are transferred to CIFAR-100, classes are more clustered for $i$ -Mix than contrastive learning, as highlighted in dashed boxes. We show 10 classes for a better visualization.
510
+
511
+ <table><tr><td rowspan="2">Pretext</td><td rowspan="2">Downstream</td><td colspan="2">FED(×10-4)(↓)</td><td colspan="2">Training Acc (%) (↑)</td><td colspan="2">Test Acc (%) (↑)</td></tr><tr><td>N-pair</td><td>+ i-Mix</td><td>N-pair</td><td>+ i-Mix</td><td>N-pair</td><td>+i-Mix</td></tr><tr><td rowspan="2">CIFAR-10</td><td>CIFAR-10</td><td>30.0</td><td>16.7</td><td>96.1</td><td>96.1</td><td>92.4</td><td>94.8</td></tr><tr><td>CIFAR-100</td><td>13.8</td><td>7.9</td><td>70.7</td><td>69.5</td><td>60.2</td><td>63.3</td></tr><tr><td rowspan="2">CIFAR-100</td><td>CIFAR-10</td><td>15.2</td><td>9.7</td><td>88.1</td><td>88.8</td><td>84.4</td><td>86.2</td></tr><tr><td>CIFAR-100</td><td>30.4</td><td>13.3</td><td>85.6</td><td>79.0</td><td>68.7</td><td>72.3</td></tr></table>
512
+
513
+ Table C.3: Comparison of N-pair contrastive learning and $i$ -Mix with ResNet-50 on CIFAR-10 and 100 in terms of the Frechet embedding distance (FED) between training and test data distribution on ´ the embedding space, and training and test accuracy. $\uparrow ( \downarrow )$ indicates that the higher (lower) number is the better. $i$ -Mix improves contrastive learning in all metrics, which shows that $i$ -Mix is an effective regularization method for the pretext task, such that the learned representation is more generalized.
514
+
515
+ learning in Figure C.1(c). Specifically, clusters of “apple,” “chair,” and “dolphin,” can be found in Figure C.1(d) while they spread out in Figure C.1(c). Also, “rose” and “squirrel” are more separated in Figure C.1(d) than C.1(c). This shows that the representation learned with $i$ -Mix is more generalizable than vanilla contrastive learning.
516
+
517
+ # C.4 QUANTITATIVE EMBEDDING ANALYSIS
518
+
519
+ To estimate the quality of representation by the similarity between training and test data distribution, we measure the Frechet embedding distance (FED): similarly to the Fr ´ echet inception distance (FID) ´ introduced in Heusel et al. (2017), FED is the Frechet distance (´ Frechet´ , 1957; Vaserstein, 1969) between the set of training and test embedding vectors under the Gaussian distribution assumption. For conciseness, let ${ \bar { f } } _ { i } = { f } ( x _ { i } ) / \| f ( x _ { i } ) \|$ be an $\ell _ { 2 }$ normalized embedding vector; we normalize embedding vectors as we do when we measure the cosine similarity. Then, with the estimated mean $\begin{array} { r } { m = \frac { 1 } { N } \bar { \sum _ { i = 1 } ^ { N } { \bar { f } _ { i } } } } \end{array}$ and the estimated covariance $\begin{array} { r } { S = \frac { 1 } { N } \sum _ { i = 1 } ^ { N } ( { \bar { f } } _ { i } - m ) ( { \bar { f } } _ { i } - m ) ^ { \top } } \end{array}$ , the FED can be defined as
520
+
521
+ $$
522
+ \begin{array} { r } { d ^ { 2 } \big ( ( m ^ { \mathrm { t r } } , S ^ { \mathrm { t r } } ) , ( m ^ { \mathrm { t e } } , S ^ { \mathrm { t e } } ) \big ) = \| m ^ { \mathrm { t r } } - m ^ { \mathrm { t e } } \| ^ { 2 } + \operatorname { T r } \big ( S ^ { \mathrm { t r } } + S ^ { \mathrm { t e } } - 2 ( S ^ { \mathrm { t r } } S ^ { \mathrm { t e } } ) ^ { \frac { 1 } { 2 } } \big ) . } \end{array}
523
+ $$
524
+
525
+ As shown in Table C.3, $i$ -Mix improves FED over contrastive learning, regardless of the distribution shift. Note that the distance is large when the training dataset of the downstream task is the same with that of the pretext task. This is because the model is overfit to the training dataset, such that the distance from the test dataset, which is unseen during training, has to be large.
526
+
527
+ On the other hand, Table C.3 shows that $i$ -Mix reduces the gap between the training and test accuracy. This implies that $i$ -Mix is an effective regularization method for pretext tasks, such that the learned representation is more generalizable on downstream tasks.
parse/train/T6AxtOaWydQ/T6AxtOaWydQ_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/T6AxtOaWydQ/T6AxtOaWydQ_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/T6AxtOaWydQ/T6AxtOaWydQ_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Xb8xvrtB8Ce/Xb8xvrtB8Ce.md ADDED
@@ -0,0 +1,472 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # BAG OF TRICKS FOR ADVERSARIAL TRAINING
2
+
3
+ Tianyu Pang, Xiao Yang, Yinpeng Dong, Hang Su, Jun Zhu∗ Department of Computer Science & Technology, Institute for AI, BNRist Center Tsinghua-Bosch Joint ML Center, THBI Lab, Tsinghua University, Beijing, 100084 China {pty17,yangxiao19,dyp17}@mails.tsinghua.edu.cn, {suhangss,dcszj}@tsinghua.edu.cn
4
+
5
+ # ABSTRACT
6
+
7
+ Adversarial training (AT) is one of the most effective strategies for promoting model robustness. However, recent benchmarks show that most of the proposed improvements on AT are less effective than simply early stopping the training procedure. This counter-intuitive fact motivates us to investigate the implementation details of tens of AT methods. Surprisingly, we find that the basic settings (e.g., weight decay, training schedule, etc.) used in these methods are highly inconsistent. In this work, we provide comprehensive evaluations on CIFAR-10, focusing on the effects of mostly overlooked training tricks and hyperparameters for adversarially trained models. Our empirical observations suggest that adversarial robustness is much more sensitive to some basic training settings than we thought. For example, a slightly different value of weight decay can reduce the model robust accuracy by more than $7 \%$ , which is probable to override the potential promotion induced by the proposed methods. We conclude a baseline training setting and re-implement previous defenses to achieve new state-of-the-art results1. These facts also appeal to more concerns on the overlooked confounders when benchmarking defenses.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Adversarial training (AT) has been one of the most effective defense strategies against adversarial attacks (Biggio et al., 2013; Szegedy et al., 2014; Goodfellow et al., 2015). Based on the primary AT frameworks like PGD-AT (Madry et al., 2018), many improvements have been proposed from different perspectives, and demonstrate promising results (detailed in Sec. 2). However, the recent benchmarks (Croce & Hein, 2020b; Chen & Gu, 2020) find that simply early stopping the training procedure of PGD-AT (Rice et al., 2020) can attain the gains from almost all the previously proposed improvements, including the state-of-the-art TRADES (Zhang et al., 2019b).
12
+
13
+ This fact is somewhat striking since TRADES also executes early stopping (one epoch after decaying the learning rate) in their code implementation. Besides, the reported robustness of PGD-AT in Rice et al. (2020) is much higher than in Madry et al. (2018), even without early-stopping. This paradox motivates us to check the implementation details of these seminal works. We find that TRADES uses weight decay of $2 \times 1 0 ^ { - 4 }$ , Gaussian PGD initialization as $\delta _ { 0 } \sim \mathcal { N } ( 0 , \alpha I )$ , and eval mode of batch normalization (BN) when crafting adversarial examples, while Rice et al. (2020) use weight decay of $5 \times 1 0 ^ { - 4 }$ , uniform PGD initialization as $\delta _ { 0 } \sim \mathcal { U } ( - \epsilon , \epsilon )$ , and train mode of BN to generate adversarial examples. In our experiments on CIFAR-10 (e.g., Table 8), the two slightly different settings can differ the robust accuracy by $\sim 5 \%$ , which is significant according to the reported benchmarks.
14
+
15
+ To have a comprehensive study, we further investigate the implementation details of tens of papers working on the AT methods, some of which are summarized in Table 1. We find that even using the same model architectures, the basic hyperparameter settings (e.g., weight decay, learning rate schedule, etc.) used in these papers are highly inconsistent and customized, which could affect the model performance and may override the gains from the methods themselves. Under this situation, if we directly benchmark these methods using their released code or checkpoints, some actually effective improvements would be under-estimated due to the improper hyperparameter settings.
16
+
17
+ Our contributions. We evaluate the effects of a wide range of basic training tricks (e.g., warmup, early stopping, weight decay, batch size, BN mode, etc.) on the adversarially trained models. Our empirical results suggest that improper training settings can largely degenerate the model performance, while this degeneration may be mistakenly ascribed to the methods themselves. We provide a baseline recipe for PGD-AT on CIFAR-10 as an example, and demonstrate the generality of the recipe on training other frameworks like TRADES. As seen in Table 16, the retrained TRADES achieve new state-of-the-art performance on the AutoAttack benchmark (Croce & Hein, 2020b).
18
+
19
+ Table 1: Hyperparameter settings and tricks used to implement different AT methods on CIFAR-10. We convert the training steps into epochs, and provide code links for reference in Table 11. Compared to the model architectures, the listed settings are easy to be neglected and paid less attention to unify.
20
+
21
+ <table><tr><td rowspan=2 colspan=1>Method</td><td rowspan=2 colspan=1>1.r.</td><td rowspan=2 colspan=1>Total epoch(l.r. decay)</td><td rowspan=2 colspan=1>Batchsize</td><td rowspan=2 colspan=1>Weightdecay</td><td rowspan=1 colspan=1>Early stop</td><td rowspan=1 colspan=1>Warm-up</td></tr><tr><td rowspan=1 colspan=1>(train /attack)</td><td rowspan=1 colspan=1>(l.r. / pertub.)</td></tr><tr><td rowspan=1 colspan=1>Madry et al. (2018)</td><td rowspan=1 colspan=1>0.1</td><td rowspan=1 colspan=1>200 (100,150)</td><td rowspan=1 colspan=1>128</td><td rowspan=1 colspan=1>2×10-4</td><td rowspan=1 colspan=1>No/No</td><td rowspan=1 colspan=1>No/No</td></tr><tr><td rowspan=1 colspan=1>Cai et al. (2018)</td><td rowspan=1 colspan=1>0.1</td><td rowspan=1 colspan=1>300 (150,250)</td><td rowspan=1 colspan=1>200</td><td rowspan=1 colspan=1>5×10-4</td><td rowspan=1 colspan=1>No /No</td><td rowspan=1 colspan=1>No / Yes</td></tr><tr><td rowspan=2 colspan=1>Zhang et al. (2019b)Wang et al. (2019)</td><td rowspan=1 colspan=1>0.1</td><td rowspan=1 colspan=1>76 (75)</td><td rowspan=1 colspan=1>128</td><td rowspan=1 colspan=1>2 ×10-4</td><td rowspan=1 colspan=1>Yes /No</td><td rowspan=1 colspan=1>No /No</td></tr><tr><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>120 (60,100)</td><td rowspan=1 colspan=1>128</td><td rowspan=1 colspan=1>1×10-4</td><td rowspan=1 colspan=1>No / Yes</td><td rowspan=1 colspan=1>No/No</td></tr><tr><td rowspan=1 colspan=1>Qin et al. (2019)</td><td rowspan=1 colspan=1>0.1</td><td rowspan=1 colspan=1>110 (100, 105)</td><td rowspan=1 colspan=1>256</td><td rowspan=1 colspan=1>2×10-4</td><td rowspan=1 colspan=1>No/No</td><td rowspan=1 colspan=1>No / Yes</td></tr><tr><td rowspan=1 colspan=1>Mao et al. (2019)</td><td rowspan=1 colspan=1>0.1</td><td rowspan=1 colspan=1>80 (50, 60)</td><td rowspan=1 colspan=1>50</td><td rowspan=1 colspan=1>2 ×10-4</td><td rowspan=1 colspan=1>No/No</td><td rowspan=1 colspan=1>No /No</td></tr><tr><td rowspan=2 colspan=1>Carmon et al. (2019)Alayrac et al. (2019)</td><td rowspan=1 colspan=1>0.1</td><td rowspan=1 colspan=1>100 (cosine anneal)</td><td rowspan=1 colspan=1>256</td><td rowspan=1 colspan=1>5×10-4</td><td rowspan=1 colspan=1>No /No</td><td rowspan=1 colspan=1>No /No</td></tr><tr><td rowspan=1 colspan=1>0.2</td><td rowspan=1 colspan=1>64 (38, 46,51)</td><td rowspan=1 colspan=1>128</td><td rowspan=1 colspan=1>5×10-4</td><td rowspan=1 colspan=1>No/No</td><td rowspan=1 colspan=1>No /No</td></tr><tr><td rowspan=1 colspan=1>Shafahi et al. (2019b)</td><td rowspan=1 colspan=1>0.1</td><td rowspan=1 colspan=1>200 (100,150)</td><td rowspan=1 colspan=1>128</td><td rowspan=1 colspan=1>2×10-4</td><td rowspan=1 colspan=1>No /No</td><td rowspan=1 colspan=1>No /No</td></tr><tr><td rowspan=1 colspan=1>Zhang et al. (2019a)</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>105 (79,90,100)</td><td rowspan=1 colspan=1>256</td><td rowspan=1 colspan=1>5×10-4</td><td rowspan=1 colspan=1>No /No</td><td rowspan=1 colspan=1>No /No</td></tr><tr><td rowspan=2 colspan=1>Zhang &amp; Wang (2019)Atzmon et al. (2019)</td><td rowspan=1 colspan=1>0.1</td><td rowspan=1 colspan=1>200 (60, 90)</td><td rowspan=1 colspan=1>60</td><td rowspan=1 colspan=1>2×10-4</td><td rowspan=1 colspan=1>No /No</td><td rowspan=1 colspan=1>No/No</td></tr><tr><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>100 (50)</td><td rowspan=1 colspan=1>32</td><td rowspan=1 colspan=1>1×10-4</td><td rowspan=1 colspan=1>No /No</td><td rowspan=1 colspan=1>No/No</td></tr><tr><td rowspan=1 colspan=1>Wong et al. (2020)</td><td rowspan=1 colspan=1>0~0.2</td><td rowspan=1 colspan=1>30 (one cycle)</td><td rowspan=1 colspan=1>128</td><td rowspan=1 colspan=1>5×10-4</td><td rowspan=1 colspan=1>No /No</td><td rowspan=1 colspan=1>Yes /No</td></tr><tr><td rowspan=1 colspan=1>Rice et al. (2020)</td><td rowspan=1 colspan=1>0.1</td><td rowspan=1 colspan=1>200 (100,150)</td><td rowspan=1 colspan=1>128</td><td rowspan=1 colspan=1>5×10-4</td><td rowspan=1 colspan=1>Yes /No</td><td rowspan=1 colspan=1>No /No</td></tr><tr><td rowspan=3 colspan=1>Ding et al. (2020)Pang et al. (2020a)Zhang et al. (2020)</td><td rowspan=1 colspan=1>0.3</td><td rowspan=1 colspan=1>128 (51, 77, 102)</td><td rowspan=1 colspan=1>128</td><td rowspan=1 colspan=1>2×10-4</td><td rowspan=1 colspan=1>No /No</td><td rowspan=1 colspan=1>No /No</td></tr><tr><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>200 (100,150)</td><td rowspan=1 colspan=1>50</td><td rowspan=1 colspan=1>1×10-4</td><td rowspan=1 colspan=1>No /No</td><td rowspan=1 colspan=1>No /No</td></tr><tr><td rowspan=1 colspan=1>0.1</td><td rowspan=1 colspan=1>120 (60,90,110)</td><td rowspan=1 colspan=1>128</td><td rowspan=1 colspan=1>2×10-4</td><td rowspan=1 colspan=1>No / Yes</td><td rowspan=1 colspan=1>No /No</td></tr><tr><td rowspan=2 colspan=1>Huang et al. (2020)Cheng et al. (2020)</td><td rowspan=1 colspan=1>0.1</td><td rowspan=1 colspan=1>200 (cosine anneal)</td><td rowspan=1 colspan=1>256</td><td rowspan=1 colspan=1>5×10-4</td><td rowspan=1 colspan=1>No /No</td><td rowspan=1 colspan=1>Yes /No</td></tr><tr><td rowspan=1 colspan=1>0.1</td><td rowspan=1 colspan=1>200 (80,140,180)</td><td rowspan=1 colspan=1>128</td><td rowspan=1 colspan=1>5×10-4</td><td rowspan=1 colspan=1>No /No</td><td rowspan=1 colspan=1>No /No</td></tr><tr><td rowspan=2 colspan=1>Lee et al. (2020)Xu et al. (2020)</td><td rowspan=2 colspan=1>0.10.1</td><td rowspan=1 colspan=1>200 (100,150)</td><td rowspan=1 colspan=1>128</td><td rowspan=1 colspan=1>2×10-4</td><td rowspan=1 colspan=1>No /No</td><td rowspan=2 colspan=1>No /NoNo/No</td></tr><tr><td rowspan=1 colspan=1>120 (60,90)</td><td rowspan=1 colspan=1>256</td><td rowspan=1 colspan=1>1×10-4</td><td rowspan=1 colspan=1>No/No</td></tr></table>
22
+
23
+ Although our empirical conclusions may not generalize to other datasets or tasks, we reveal the facts that adversarially trained models could be sensitive to certain training settings, which are usually neglected in previous work. These results also encourage the community to re-implement the previously proposed defenses with fine-tuned training settings to better explore their potentials.
24
+
25
+ # 2 RELATED WORK
26
+
27
+ In this section, we introduce related work on the adversarial defenses and recent benchmarks. We detail on the adversarial attacks in Appendix A.1.
28
+
29
+ # 2.1 ADVERSARIAL DEFENSES
30
+
31
+ To alleviate the adversarial vulnerability of deep learning models, many defense strategies have been proposed, but most of them can eventually be evaded by adaptive attacks (Carlini & Wagner, 2017b; Athalye et al., 2018). Other more theoretically guaranteed routines include training provably robust networks (Dvijotham et al., 2018a;b; Hein & Andriushchenko, 2017; Wong & Kolter, 2018) and obtaining certified models via randomized smoothing (Cohen et al., 2019). While these methods are promising, they currently do not match the state-of-the-art robustness under empirical evaluations.
32
+
33
+ The idea of adversarial training (AT) stems from the seminal work of Goodfellow et al. (2015), while other AT frameworks like PGD-AT (Madry et al., 2018) and TRADES (Zhang et al., 2019b) occupied the winner solutions in the adversarial competitions (Kurakin et al., 2018; Brendel et al., 2020). Based on these primary AT frameworks, many improvements have been proposed via encoding the mechanisms inspired from other domains, including ensemble learning (Tramèr et al., 2018; Pang et al., 2019), metric learning (Mao et al., 2019; Li et al., 2019; Pang et al., 2020c), generative modeling (Jiang et al., 2018; Pang et al., 2018b; Wang & Yu, 2019; Deng et al., 2020), semisupervised learning (Carmon et al., 2019; Alayrac et al., 2019; Zhai et al., 2019), and self-supervised learning (Hendrycks et al., 2019; Chen et al., 2020a;b; Naseer et al., 2020). On the other hand, due to the high computational cost of AT, many efforts are devoted to accelerating the training procedure via reusing the computations (Shafahi et al., 2019b; Zhang et al., 2019a), adaptive adversarial steps (Wang et al., 2019; Zhang et al., 2020) or one-step training (Wong et al., 2020; Liu et al., 2020; Vivek B & Venkatesh Babu, 2020). The following works try to solve the side effects (e.g., catastrophic overfitting) caused by these fast AT methods (Andriushchenko & Flammarion, 2020; Li et al., 2020).
34
+
35
+ Table 2: Test accuracy $( \% )$ under different early stopping and warmup on CIFAR-10. The model is ResNet-18 (results on WRN-34-10 is in Table 14). For early stopping attack iter., we denote, e.g., 40 / 70 as the epochs to increase the tolerance step by one (Zhang et al., 2020). For warmup, the learning rate and the maximal perturbation linearly increase from zero to preset values in $1 0 / 1 5 / 2 0$ epochs.
36
+
37
+ <table><tr><td rowspan="2"></td><td rowspan="2">Base</td><td colspan="3">Early stopping attack iter.</td><td colspan="3">Warmup on l.r.</td><td colspan="3">Warmup on perturb.</td></tr><tr><td>40/70</td><td>40 /100</td><td>60 /100</td><td>10</td><td>15</td><td>20</td><td>10</td><td>15</td><td>20</td></tr><tr><td>Clean</td><td>82.52</td><td>86.52</td><td>86.56</td><td>85.67</td><td>82.45</td><td>82.64</td><td>82.31</td><td>82.64</td><td>82.75</td><td>82.78</td></tr><tr><td>PGD-10 AA</td><td>53.58 48.51</td><td>52.65 46.6</td><td>53.22 46.04</td><td>52.90 45.96</td><td>53.43 48.26</td><td>53.29 48.12</td><td>53.35 48.37</td><td>53.65 48.44</td><td>53.27 48.17</td><td>53.62 48.48</td></tr></table>
38
+
39
+ # 2.2 ADVERSARIAL BENCHMARKS
40
+
41
+ Due to the large number of proposed defenses, several benchmarks have been developed to rank the adversarial robustness of existing methods. Dong et al. (2020) perform large-scale experiments to generate robustness curves, which are used for evaluating typical defenses. Croce & Hein (2020b) propose AutoAttack, which is an ensemble of four selected attacks. They apply AutoAttack on tens of previous defenses and provide a comprehensive leader board. Chen & Gu (2020) propose the black-box RayS attack, and establish a similar leader board for defenses. In this paper, we mainly apply PGD attack and AutoAttack as two common ways to evaluate the models.
42
+
43
+ Except for the adversarial robustness, there are other efforts that introduce augmented datasets for accessing the robustness against general corruptions or perturbations. Mu & Gilmer (2019) introduce MNIST-C with a suite of 15 corruptions applied to the MNIST test set, while Hendrycks & Dietterich (2019) introduce ImageNet-C and ImageNet-P with common corruptions and perturbations on natural images. Evaluating robustness on these datasets can reflect the generality of the proposed defenses, and avoid overfitting to certain attacking patterns (Engstrom et al., 2019; Tramèr & Boneh, 2019).
44
+
45
+ # 3 BAG OF TRICKS
46
+
47
+ Our overarching goal is to investigate how the usually overlooked implementation details affect the performance of the adversarially trained models. Our experiments are done on CIFAR-10 (Krizhevsky & Hinton, 2009) under the $\ell _ { \infty }$ threat model of maximal perturbation $\epsilon = 8 / 2 5 5$ , without accessibility to additional data. We evaluate the models under 10-steps PGD attack (PGD-10) (Madry et al., 2018) and AutoAttack (AA) (Croce & Hein, 2020b). For the PGD attack, we apply untargeted mode using ground truth labels, step size of 2/255, and 5 restarts for evaluation / no restart for training. For the AutoAttack2, we apply the standard version, with no restart for AutoPGD and FAB, compared to 5 restarts for plus version. We consider some basic training tricks and perform ablation studies on each of them, based on the default training setting as described below:
48
+
49
+ Default setting. Following Rice et al. (2020), in the default setting, we apply the primary PGD-AT framework and the hyperparameters including batch size 128; SGD momentum optimizer with the initial learning rate of 0.1; weight decay $5 \times 1 \bar { 0 } ^ { - 4 }$ ; ReLU activation function and no label smoothing; train mode for batch normalization when crafting adversarial examples. All the models are trained for 110 epochs with the learning rate decaying by a factor of 0.1 at 100 and 105 epochs, respectively. We report the results on the checkpoint with the best PGD-10 accuracy.
50
+
51
+ Note that our empirical observations and conclusions may not always generalize to other datasets or AT frameworks, but we emphasize the importance of using consistent implementation details (not only the same model architectures) to enable fair comparisons among different AT methods.
52
+
53
+ Table 3: Test accuracy $( \% )$ under different batch size and learning rate (l.r.) on CIFAR-10. The basic l.r. is 0.1, while the scaled l.r. is, e.g., 0.2 for batch size 256, and 0.05 for batch size 64.
54
+
55
+ <table><tr><td rowspan=1 colspan=5>ResNet-18</td></tr><tr><td rowspan=1 colspan=1>Batch</td><td rowspan=1 colspan=2>Basic 1.r.</td><td rowspan=1 colspan=1>Sca</td><td rowspan=1 colspan=1>Scaled l.r.</td></tr><tr><td rowspan=1 colspan=1>size</td><td rowspan=1 colspan=1>Clean</td><td rowspan=1 colspan=1>PGD-10</td><td rowspan=1 colspan=1>Clean</td><td rowspan=1 colspan=1>PGD-10</td></tr><tr><td rowspan=1 colspan=1>64</td><td rowspan=1 colspan=1>80.08</td><td rowspan=1 colspan=1>51.31</td><td rowspan=1 colspan=1>82.44</td><td rowspan=4 colspan=1>52.48152.5253.36</td></tr><tr><td rowspan=1 colspan=1>128</td><td rowspan=1 colspan=1>82.52</td><td rowspan=1 colspan=1>53.58</td><td rowspan=2 colspan=1>182.24</td></tr><tr><td rowspan=1 colspan=1>256</td><td rowspan=1 colspan=1>83.33</td><td rowspan=1 colspan=1>52.20</td></tr><tr><td rowspan=1 colspan=1>512</td><td rowspan=1 colspan=1>83.40</td><td rowspan=1 colspan=1>50.69</td><td rowspan=1 colspan=1>82.16</td></tr><tr><td rowspan=1 colspan=5>WRN-34-10</td></tr><tr><td rowspan=1 colspan=1>Batchsize</td><td rowspan=1 colspan=1>Clean</td><td rowspan=1 colspan=1>Basic 1.r.PGD-10</td><td rowspan=1 colspan=1>Clean</td><td rowspan=1 colspan=1>Scaled 1.r.PGD-10</td></tr><tr><td rowspan=1 colspan=1>64</td><td rowspan=1 colspan=1>84.20</td><td rowspan=1 colspan=1>54.69</td><td rowspan=1 colspan=1>85.40</td><td rowspan=3 colspan=1>54.86156.09</td></tr><tr><td rowspan=1 colspan=1>128</td><td rowspan=1 colspan=1>86.07</td><td rowspan=1 colspan=1>56.60</td><td rowspan=1 colspan=1>1</td></tr><tr><td rowspan=1 colspan=1>256</td><td rowspan=1 colspan=1>86.21</td><td rowspan=1 colspan=1>52.90</td><td rowspan=1 colspan=1>85.89</td></tr><tr><td rowspan=1 colspan=1>512</td><td rowspan=1 colspan=1>86.29</td><td rowspan=1 colspan=1>50.17</td><td rowspan=1 colspan=1>86.47</td><td rowspan=1 colspan=1>55.49</td></tr></table>
56
+
57
+ Table 4: Test accuracy $( \% )$ under different degrees of label smoothing (LS) on CIFAR-10. More evaluation results under, e.g., PGD-1000 can be found in Table 17.
58
+
59
+ <table><tr><td rowspan=1 colspan=5>ResNet-18</td></tr><tr><td rowspan=1 colspan=1>LS</td><td rowspan=1 colspan=1>Clean</td><td rowspan=1 colspan=1>PGD-10</td><td rowspan=1 colspan=1>AA</td><td rowspan=1 colspan=1>RayS</td></tr><tr><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>82.52</td><td rowspan=1 colspan=1>53.58</td><td rowspan=1 colspan=1>48.51</td><td rowspan=1 colspan=1>53.34</td></tr><tr><td rowspan=1 colspan=1>0.1</td><td rowspan=1 colspan=1>82.69</td><td rowspan=1 colspan=1>54.04</td><td rowspan=1 colspan=1>48.76</td><td rowspan=1 colspan=1>53.71</td></tr><tr><td rowspan=1 colspan=1>0.2</td><td rowspan=1 colspan=1>82.73</td><td rowspan=1 colspan=1>54.22</td><td rowspan=1 colspan=1>49.20</td><td rowspan=1 colspan=1>53.66</td></tr><tr><td rowspan=1 colspan=1>0.3</td><td rowspan=1 colspan=1>82.51</td><td rowspan=1 colspan=1>54.34</td><td rowspan=1 colspan=1>49.24</td><td rowspan=1 colspan=1>53.59</td></tr><tr><td rowspan=1 colspan=1>0.4</td><td rowspan=1 colspan=1>82.39</td><td rowspan=1 colspan=1>54.13</td><td rowspan=1 colspan=1>48.83</td><td rowspan=1 colspan=1>53.40</td></tr><tr><td rowspan=1 colspan=5>WRN-34-10</td></tr><tr><td rowspan=1 colspan=1>LS</td><td rowspan=1 colspan=1>Clean</td><td rowspan=1 colspan=1>PGD-10</td><td rowspan=1 colspan=1>AA</td><td rowspan=1 colspan=1>RayS</td></tr><tr><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>86.07</td><td rowspan=1 colspan=1>56.60</td><td rowspan=1 colspan=1>52.19</td><td rowspan=1 colspan=1>60.07</td></tr><tr><td rowspan=1 colspan=1>0.1</td><td rowspan=1 colspan=1>85.96</td><td rowspan=1 colspan=1>56.88</td><td rowspan=1 colspan=1>52.74</td><td rowspan=1 colspan=1>59.99</td></tr><tr><td rowspan=1 colspan=1>0.2</td><td rowspan=1 colspan=1>86.09</td><td rowspan=1 colspan=1>57.31</td><td rowspan=1 colspan=1>53.00</td><td rowspan=1 colspan=1>60.28</td></tr><tr><td rowspan=1 colspan=1>0.3</td><td rowspan=1 colspan=1>85.99</td><td rowspan=1 colspan=1>57.55</td><td rowspan=1 colspan=1>52.70</td><td rowspan=1 colspan=1>61.00</td></tr><tr><td rowspan=1 colspan=1>0.4</td><td rowspan=1 colspan=1>86.19</td><td rowspan=1 colspan=1>57.63</td><td rowspan=1 colspan=1>52.71</td><td rowspan=1 colspan=1>60.64</td></tr></table>
60
+
61
+ Table 5: Test accuracy $( \% )$ using different optimizers on CIFAR-10. The model is ResNet-18 (results on WRN-34-10 is in Table 15). The initial learning rate for Adam and AdamW is 0.0001.
62
+
63
+ <table><tr><td></td><td>Mom</td><td>Nesterov</td><td>Adam</td><td>AdamW</td><td>SGD-GC</td><td>SGD-GCC</td></tr><tr><td>Clean</td><td>82.52</td><td>82.83</td><td>83.20</td><td>81.68</td><td>82.77</td><td>82.93</td></tr><tr><td>PGD-10</td><td>53.58</td><td>53.78</td><td>48.87</td><td>46.58</td><td>53.62</td><td>53.40</td></tr><tr><td>AA</td><td>48.51</td><td>48.22</td><td>44.04</td><td>42.39</td><td>48.33</td><td>48.51</td></tr></table>
64
+
65
+ # 3.1 EARLY STOPPING AND WARMUP
66
+
67
+ Early stopping training epoch. The trick of early stopping w.r.t. the training epoch was first applied in the implementation of TRADES (Zhang et al., 2019b), where the learning rate decays at the 75th epoch and the training is stopped at the 76th epoch. Later Rice et al. (2020) provide a comprehensive study on the overfitting phenomenon in AT, and advocate early stopping the training epoch as a general strategy for preventing adversarial overfitting, which could be triggered according to the PGD accuracy on a split validation set. Due to its effectiveness, we regard this trick as a default choice.
68
+
69
+ Early stopping adversarial intensity. Another level of early stopping happens on the adversarial intensity, e.g., early stopping PGD steps when crafting adversarial examples for training. This trick was first applied by the runner-up of the defense track in NeurIPS 2018 adversarial vision challenge (Brendel et al., 2020). Later efforts are devoted to formalizing this early stopping mechanism with different trigger rules (Wang et al., 2019; Zhang et al., 2020). Balaji et al. (2019) early stop the adversarial perturbation, which has a similar effect on the adversarial intensity. In the left part of Table 2, we evaluate the method proposed by Zhang et al. (2020) due to its simplicity. As seen, this kind of early stopping can improve the performance on clean data while keeping comparable accuracy under PGD-10. However, the performance under the stronger AutoAttack is degraded.
70
+
71
+ Warmup w.r.t. learning rate. Warmup w.r.t. learning rate is a general trick for training deep learning models (Goodfellow et al., 2016). In the adversarial setting, Wong et al. (2020) show that the one cycle learning rate schedule is one of the critical ingredients for the success of FastAT. Thus, we evaluate the effect of this trick for the piecewise learning rate schedule and PGD-AT framework. We linearly increase the learning rate from zero to the preset value in the first $1 0 / 1 5 / 2 0$ epochs. As shown in the middle part of Table 2, the effect of warming up learning rate is marginal.
72
+
73
+ Warmup w.r.t. adversarial intensity. In the AT procedure, warmup can also be executed w.r.t. the adversarial intensity. Cai et al. (2018) propose the curriculum AT process to gradually increase the adversarial intensity and monitor the overfitting trend. Qin et al. (2019) increase the maximal perturbation $\epsilon$ from zero to $8 / 2 5 5$ in the first 15 epochs. In the right part of Table 2, we linearly increase the maximal perturbation in the first $1 0 / 1 5 / 2 0$ epochs, while the effect is still limited.
74
+
75
+ Table 6: Test accuracy $( \% )$ under different non-linear activation function on CIFAR-10. The model is ResNet-18. We apply the hyperparameters recommended by Xie et al. (2020) on ImageNet for the activation function. Here the notation ‡ indicates using weight decay of $5 \times 1 0 ^ { - 5 }$ , where applying weight decay of $5 \times 1 0 ^ { - 4 }$ with these activations will lead to much worse model performance.
76
+
77
+ <table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>ReLU</td><td rowspan=1 colspan=1>Leaky.</td><td rowspan=1 colspan=1>ELU t</td><td rowspan=1 colspan=1>CELU t</td><td rowspan=1 colspan=1>SELU $</td><td rowspan=1 colspan=1>GELU</td><td rowspan=1 colspan=1>Softplus</td><td rowspan=1 colspan=1>Tanh </td></tr><tr><td rowspan=1 colspan=1>Clean</td><td rowspan=1 colspan=1>82.52</td><td rowspan=1 colspan=1>82.11</td><td rowspan=1 colspan=1>82.17</td><td rowspan=1 colspan=1>81.37</td><td rowspan=1 colspan=1>78.88</td><td rowspan=1 colspan=1>80.42</td><td rowspan=1 colspan=1>82.80</td><td rowspan=1 colspan=1>80.13</td></tr><tr><td rowspan=1 colspan=1>PGD-10</td><td rowspan=1 colspan=1>53.58</td><td rowspan=1 colspan=1>53.25</td><td rowspan=1 colspan=1>52.08</td><td rowspan=1 colspan=1>51.37</td><td rowspan=1 colspan=1>49.53</td><td rowspan=1 colspan=1>52.21</td><td rowspan=1 colspan=1>54.30</td><td rowspan=1 colspan=1>49.12</td></tr></table>
78
+
79
+ ![](images/afd42297ddeaace9780d3ca20347f805044ffbe95dc41aeea206c172479da363.jpg)
80
+ Figure 1: (a) Test accuracy w.r.t. different values of weight decay. The reported checkpoints correspond to the best PGD-10 accuracy (Rice et al., 2020). We test on two model architectures, and highlight (with red circles) three most commonly used weight decays in previous work; (b) Curves of test accuracy w.r.t. training epochs, where the model is WRN-34-10. We set weight decay be $1 \times 1 0 ^ { - 4 }$ , $2 \times \mathrm { { i } 0 ^ { - 4 } }$ , and $5 \times \bar { 1 0 } ^ { - 4 }$ , respectively. We can observe that smaller weight decay can learn faster but also more tend to overfit w.r.t. the robust accuracy. In Fig. 4, we early decay the learning rate before the models overfitting, but weight decay of $5 \times \mathrm { { \dot { 1 } } 0 ^ { - 4 } }$ still achieve better robustness.
81
+
82
+ # 3.2 TRAINING HYPERPARAMETERS
83
+
84
+ Batch size. On the large-scale datasets like ImageNet (Deng et al., 2009), it has been recognized that the mini-batch size is an important factor influencing the model performance (Goyal et al., 2017), where larger batch size traverses the dataset faster but requires more memory usage. In the adversarial setting, Xie et al. (2019) use a batch size of 4096 to train a robust model on ImageNet, which achieves state-of-the-art performance under adversarial attacks. As to the defenses reported on the CIFAR-10 dataset, the mini-batch sizes are usually chosen between 128 and 256, as shown in Table 1. To evaluate the effect, we test on two model architectures and four values of batch size in Table 3. Since the number of training epochs is fixed to 110, we also consider applying the linear scaling rule introduced in Goyal et al. (2017), i.e., when the mini-batch size is multiplied by $k$ , multiply the learning rate by $k$ . We treat the batch size of 128 and the learning rate of 0.1 as a basic setting to obtain the factor $k$ . We can observe that the batch size of 128 works well on CIFAR-10, while the linear scaling rule can benefit the cases with other batch sizes.
85
+
86
+ Table 7: Test accuracy $( \% )$ under different BN modes on CIFAR-10. We evaluate across several model architectures, since the BN layers have different positions in different models.
87
+
88
+ <table><tr><td rowspan="2"></td><td rowspan="2">BN mode</td><td colspan="6">Model architecture</td></tr><tr><td>ResNet-18</td><td>SENet-18</td><td>DenseNet-121</td><td>GoogleNet</td><td>DPN26</td><td>WRN-34-10</td></tr><tr><td rowspan="3">Clean</td><td>train</td><td>82.52</td><td>82.20</td><td>85.38</td><td>83.97</td><td>83.67</td><td>86.07</td></tr><tr><td>eval</td><td>83.48</td><td>84.11</td><td>86.33</td><td>85.26</td><td>84.56</td><td>87.38</td></tr><tr><td>-</td><td>+0.96</td><td>+1.91</td><td>+0.95</td><td>+1.29</td><td>+0.89</td><td>+1.31</td></tr><tr><td rowspan="3">PGD-10</td><td>train</td><td>53.58</td><td>54.01</td><td>56.22</td><td>53.76</td><td>53.88</td><td>56.60</td></tr><tr><td>eval</td><td>53.64</td><td>53.90</td><td>56.11</td><td>53.77</td><td>53.41</td><td>56.04</td></tr><tr><td>-</td><td>+0.06</td><td>-0.11</td><td>-0.11</td><td>+0.01</td><td>-0.47</td><td>-0.56</td></tr><tr><td rowspan="3">AA</td><td>train</td><td>48.51</td><td>48.72</td><td>51.58</td><td>48.73</td><td>48.50</td><td>52.19</td></tr><tr><td>eval</td><td>48.75</td><td>48.95</td><td>51.24</td><td>48.83</td><td>48.30</td><td>51.93</td></tr><tr><td>1</td><td>+0.24</td><td>+0.23</td><td>-0.34</td><td>+0.10</td><td>-0.20</td><td>-0.26</td></tr></table>
89
+
90
+ ![](images/f472ef4b8e755a793d6cef70c9bbbb7c60c9aa90d532a3d4ebd0efa6e46c5449.jpg)
91
+ Figure 2: Clean accuracy vs. PGD-10 accuracy for different model architectures. The circle sizes are proportional to the number of parameters that specified in Table 12.
92
+
93
+ Label smoothing (LS). Shafahi et al. (2019a) propose to utilize LS to mimic adversarial training. Pang et al. (2019) also find that imposing LS on the ensemble prediction can alleviate the adversarial transferability among individual members. Unfortunately, combing LS with standard training cannot prevent the models from evaded by adaptive attacks (Tramer et al., 2020) or larger iteration steps (Summers & Dinneen, 2018). Beyond previous observations, we further evaluate the effect of LS on adversarial training. As shown in Table 4 and Table 17, mild LS can improve $0 . 5 \sim 1 \%$ robust accuracy under the strong attacks we evaluated, including AutoAttack and PGD-1000, without affecting the clean performance. This can be regarded as the effect induced by calibrating the confidence (Stutz et al., 2020) of adversarially trained models $( 8 0 \% \sim 8 5 \%$ accuracy on clean data). In contrast, excessive LS could degrade the robustness (e.g., $\mathrm { L S } = 0 . 3$ vs. $\mathrm { L S } = 0 . 4$ on ResNet-18), which is consistent with the recent observations in Jiang et al. (2020) (they use $\mathrm { L S } = 0 . 5$ ). However, since LS is known for its potential gradient masking effect, we advocate careful evaluations when applying this trick on the proposed defenses, following the suggestions in Carlini et al. (2019).
94
+
95
+ Optimizer. Most of the AT methods apply SGD with momentum as the optimizer. The momentum factor is usually set to be 0.9 with zero dampening. In other cases, Carmon et al. (2019) apply SGD with Nesterov, and Rice et al. (2020) apply Adam for cyclic learning rate schedule. We test some commonly used optimizers in Table 5, as well as the decoupled AdamW (Loshchilov & Hutter, 2019) and the recently proposed gradient centralization trick SGD-GC / SGD-GCC (Yong et al., 2020). We can find that SGD-based optimizers (e.g., Mom, Nesterov, SGD-GC / SGD-GCC) have similar performance, while Adam / AdamW performs worse for piecewise learning rate schedule.
96
+
97
+ Weight decay. As observed in Table 1, three different values of weight decay are used in previous defenses, including $1 \times 1 0 ^ { - 4 }$ , $2 \times 1 0 ^ { - 4 }$ , and $5 \times 1 0 ^ { - 4 }$ . While $5 \times 1 0 ^ { - 4 }$ is a fairly widely used value for weight decay in deep learning, the prevalence of the value $2 \times 1 0 ^ { - 4 }$ should stem from Madry et al. (2018) in the adversarial setting. In Fig. 1(a), we report the best test accuracy under different values of weight decay3. We can see that the gap of robust accuracy can be significant due to slightly different values of weight decay (e.g., up to $\sim 7 \%$ for $1 \times 1 0 ^ { - 4 }$ vs. $5 \times 1 0 ^ { - 4 }$ ). Besides, in Fig. 1(b) we plot the learning curves of test accuracy w.r.t. training epochs. Note that smaller values of weight decay make the model learn faster in the initial phase, but the overfitting phenomenon also appears earlier. In Fig. 3, we visualize the cross sections of the decision boundary. We can see that proper values of weight decay (e.g., $5 \times 1 0 ^ { - 4 }$ ) can enlarge margins from decision boundary and improve robustness. Nevertheless, as shown in the left two columns, this effect is less significant on promoting clean accuracy. As a result, weight decay is a critical and usually neglected ingredient that largely influences the robust accuracy of adversarially trained models. In contrast, the clean accuracy is much less sensitive to weight decay, for both adversarially and standardly (shown in Fig. 5) trained models.
98
+
99
+ ![](images/f15e695ed43c9ecc274421c52ce8f3c356040987ef341c044231f00c822430a3.jpg)
100
+ Figure 3: Random normal cross-sections of the decision boundary for PGD-AT with different weight decay. The model architecture is WRN-34-10. Following the examples in Moosavi-Dezfooli et al. (2019), we craft PGD-10 perturbation as the normal direction $v$ , and $r$ be a random direction, under the $\ell _ { \infty }$ constraint of $8 / 2 5 5$ . The values of $\mathbf { X }$ -axis and y-axis represent the multiplied scale factors.
101
+
102
+ Activation function. Most of the previous AT methods apply ReLU as the non-linear activation function in their models, while Xie et al. (2020) empirically demonstrate that smooth activation functions can better improve model robustness on ImageNet. Following their settings, we test if a similar conclusion holds on CIFAR-10. By comparing the results on ReLU and Softplus in Table 6 (for PGD-AT) and Table 13 (for TRADES), we confirm that smooth activation indeed benefits model robustness for ResNet-18. However, as shown in Table 8 (for PGD-AT) and Table 9 (for TRADES), this benefit is less significant on larger models like WRN. Thus we deduce that smaller model capacity can benefit more from the smoothness of activation function. Besides, as shown in Table 6, models trained on CIFAR-10 seem to prefer activation function $\sigma ( x )$ with zero truncation, i.e., $\sigma ( { \boldsymbol { x } } ) \geq 0$ . Those with negative return values like ELU, LeakyReLU, Tanh have worse performance than ReLU.
103
+
104
+ Table 9: Test accuracy $( \% )$ . The AT framework is TRADES. We highlight the setting used by the original implementation in Zhang et al. (2019b). As listed in Table 16, our retrained TRADES models can achieve state-of-the-art performance in the AutoAttack benchmark.
105
+
106
+ <table><tr><td colspan="6">Threat model: loo constraint, e = 0.031</td></tr><tr><td>Architecture</td><td>Weight decay</td><td>BN mode</td><td>Activation</td><td>Clean PGD-10</td><td>AA</td></tr><tr><td rowspan="5">WRN-34-10</td><td>2 ×10-4</td><td>train</td><td>ReLU</td><td>83.86 54.96</td><td>51.52</td></tr><tr><td>2 × 10-4</td><td> eval</td><td>ReLU 85.17</td><td>55.10</td><td>51.85</td></tr><tr><td>5 ×10-4</td><td>train ReLU</td><td>84.17</td><td>57.34</td><td>53.51</td></tr><tr><td>5×10-4</td><td>eval</td><td>ReLU 85.34</td><td>58.54</td><td>54.64</td></tr><tr><td>5×10-4</td><td>eval Softplus</td><td>84.66</td><td>58.05</td><td>54.20</td></tr><tr><td rowspan="2">WRN-34-20</td><td>5×10-4</td><td>eval</td><td>ReLU</td><td>86.93 57.93</td><td>54.42</td></tr><tr><td>5×10-4</td><td>eval Softplus</td><td>85.43 8/255</td><td>57.94</td><td>54.32</td></tr><tr><td colspan="6">Threat model: l constraint,∈=</td></tr><tr><td>Architecture</td><td>Weight decay</td><td>BN mode Activation</td><td>Clean</td><td>PGD-10</td><td>AA</td></tr><tr><td rowspan="5">WRN-34-10</td><td>2×10-4</td><td>train</td><td>ReLU 84.50</td><td>54.60</td><td>50.94</td></tr><tr><td>2 × 10-4</td><td> eval</td><td>ReLU</td><td>85.17</td><td>54.58 51.54</td></tr><tr><td>5 ×10-4</td><td>train</td><td>ReLU 84.04</td><td>57.41</td><td>53.83</td></tr><tr><td>5×10-4</td><td>eval</td><td>ReLU</td><td>85.48 57.45</td><td>53.80</td></tr><tr><td>5×10-4</td><td>eval</td><td>Softplus 84.24</td><td>57.59</td><td>53.88</td></tr><tr><td rowspan="5">WRN-34-20</td><td>2 ×10-4</td><td>train</td><td>ReLU</td><td>84.50 53.86</td><td>51.18</td></tr><tr><td>2 × 10-4</td><td>eval</td><td>ReLU</td><td>85.48 53.21</td><td>50.59</td></tr><tr><td>5 ×10-4</td><td>train</td><td>ReLU</td><td>85.87 57.40</td><td>54.22</td></tr><tr><td>5×10-4</td><td>eval</td><td>ReLU</td><td>86.43</td><td>57.91 54.39</td></tr><tr><td>5×10-4</td><td>eval</td><td>Softplus</td><td>85.51</td><td>57.50 54.21</td></tr></table>
107
+
108
+ Model architecture. Su et al. (2018) provide a comprehensive study on the robustness of standardly trained models, using different model architectures. For the adversarially trained models, it has been generally recognized that larger model capacity can usually lead to better robustness (Madry et al., 2018). Recently, Guo et al. (2020) blend in the technique of AutoML to explore robust architectures. In Fig. 2, we perform similar experiments on more hand-crafted model architectures. The selected models have comparable numbers of parameters. We can observe that DenseNet can achieve both the best clean and robust accuracy, while being memory-efficient (but may require longer inference time). This is consistent with the observation in Guo et al. (2020) that residual connections can benefit the AT procedure. Interestingly, Wu et al. (2020) demonstrate that residual connections allow easier generation of highly transferable adversarial examples, while in our case this weakness for the standardly trained models may turn out to strengthen the adversarially trained models.
109
+
110
+ Batch normalization (BN) mode. When crafting adversarial examples in the training procedure, Zhang et al. (2019b) use eval mode for BN, while Rice et al. (2020) and Madry et al. (2018) use train mode for BN. Since the parameters in the BN layers are not updated in this progress, the difference between these two modes is mainly on the recorded moving average BN mean and variance used in the test phase. As pointed out in Xie & Yuille (2020), properly dealing with BN layers is critical to obtain a well-performed adversarially trained model. Thus in Table 7, we employ the train or eval mode of BN for crafting adversarial examples during training, and report the results on different model architectures to dig out general rules. As seen, using eval mode for BN can increase clean accuracy, while keeping comparable robustness. We also advocate for the eval mode, because if we apply train mode for multi-step PGD attack, the BN mean and variance will be recorded for every intermediate step, which could blur the adversarial distribution used by BN layers during inference.
111
+
112
+ # Takeaways:
113
+
114
+ (i) Slightly different values of weight decay could largely affect the robustness of trained models;
115
+ (ii) Moderate label smoothing and linear scaling rule on l.r. for different batch sizes are beneficial;
116
+ (iii) Applying eval BN mode to craft training adversarial examples can avoid blurring the distribution;
117
+ (iv) Early stopping the adversarial steps or perturbation may degenerate worst-case robustness;
118
+ (v) Smooth activation benefits more when the model capacity is not enough for adversarial training.
119
+
120
+ Table 10: Test accuracy $( \% )$ . The considered AT frameworks are FastAT and FreeAT. The model architecture is WRN-34-10. Detailed settings used for these defenses are described in Sec. 3.5.
121
+
122
+ <table><tr><td>Defense</td><td>Label smooth</td><td>Weight decay</td><td>BN mode</td><td>Clean</td><td>Accuracy PGD-10</td><td>AA</td></tr><tr><td rowspan="4">FastAT (Wong et al., 2020)</td><td>0</td><td>2×10-4</td><td>train</td><td>82.19</td><td>47.47</td><td>42.99</td></tr><tr><td>0</td><td>5× 10-4</td><td>train</td><td>82.93</td><td>48.48</td><td>44.06</td></tr><tr><td>0</td><td>5× 10-4</td><td>eval</td><td>84.00</td><td>48.16</td><td>43.66</td></tr><tr><td>0.1</td><td>5× 10-4</td><td>train</td><td>82.83</td><td>48.76</td><td>44.50</td></tr><tr><td rowspan="4">FreeAT (Shafahi et al.,2019b)</td><td>0</td><td>2× 10-4</td><td>train</td><td>87.42</td><td>47.66</td><td>44.24</td></tr><tr><td>0</td><td>5× 10-4</td><td>train</td><td>88.17</td><td>48.90</td><td>45.66</td></tr><tr><td>0</td><td>5× 10-4</td><td>eval</td><td>88.26</td><td>48.50</td><td>45.49</td></tr><tr><td>0.1</td><td>5×10-4</td><td>train</td><td>88.07</td><td>49.26</td><td>45.91</td></tr></table>
123
+
124
+ # 3.3 COMBINATION OF TRICKS
125
+
126
+ In the above, we separately evaluate the effect of each training trick in the AT procedure. Now we investigate combining the selected useful tricks, which involve label smoothing, weight decay, activation function and BN mode. As demonstrated in Table 8, the improvements are not ideally additive by combining different tricks, while label smoothing and smooth activation function are helpful, but not significant, especially when we apply model architectures with a larger capacity.
127
+
128
+ We also find that the high performance of the models trained by Rice et al. (2020) partially comes from its reasonable training settings, compared to previous work. Based on these, we provide a trick list for training robust models on CIFAR-10 for reference.
129
+
130
+ # Baseline setting (CIFAR-10):
131
+
132
+ Batch size 128; SGD momentum optimizer; weight decay $5 \times 1 0 ^ { - 4 }$ ; eval mode BN for generating adversarial examples; warmups are not necessary; moderate label smoothing $( 0 . 1 \sim 0 . 2 )$ and smooth activation function could be beneficial; model architecture with residual connections.
133
+
134
+ # 3.4 RE-IMPLEMENTATION OF TRADES
135
+
136
+ As a sanity check, we re-implement TRADES to see if our conclusions derived from PGD-AT can generalize and provide the results in Table 9. We can observe that after simply changing the weight decay from $2 \times 1 0 ^ { - 4 }$ to $5 \times 1 0 ^ { - 4 }$ , the clean accuracy of TRADES improves by $\sim \bar { 1 } \%$ and the AA accuracy improves by $\sim 4 \%$ , which make the trained model surpass the previously state-of-theart models reported by the AutoAttack benchmark, as listed in Table 16. This fact highlights the importance of employing a standardized training setting for fair comparisons of different AT methods.
137
+
138
+ # 3.5 EVALUATIONS ON OTHER AT FRAMEWORKS
139
+
140
+ To examine the universality of our observations on PGD-AT and TRADES, we further evaluate on other AT frameworks, including FastAT (Wong et al., 2020) and FreeAT (Shafahi et al., 2019b). We base on the FastAT code4 to implement the methods. Specifically, for FastAT, we use cyclic learning rate schedule with $l _ { \mathrm { m i n } } = 0$ and $l _ { \mathrm { m a x } } = 0 . 2$ , training for 15 epochs. For FreeAT, we also use cyclic learning rate schedule with $l _ { \mathrm { m i n } } = 0$ and $l _ { \operatorname* { m a x } } = 0 . 0 4$ , training for 24 epochs with mini-batch replays be 4. The results are provided in Table 10. We can find that our observations generalize well to other AT frameworks, which verifies that the proposed baseline setting could be a decent default choice for adversarial training on CIFAR-10.
141
+
142
+ # 4 CONCLUSION
143
+
144
+ In this work, we take a step in examining how the usually neglected implementation details impact the performance of adversarially trained models. Our empirical results suggest that compared to clean accuracy, robustness is more sensitive to some seemingly unimportant differences in training settings. Thus when building AT methods, we should more carefully fine-tune the training settings (on validation sets), or follow certain long-tested setup in the adversarial setting.
145
+
146
+ # ACKNOWLEDGEMENTS
147
+
148
+ This work was supported by the National Key Research and Development Program of China (Nos. 2020AAA0104304, 2017YFA0700904), NSFC Projects (Nos. 61620106010, 62076147, U19B2034, U19A2081), Beijing Academy of Artificial Intelligence (BAAI), Tsinghua-Huawei Joint Research Program, a grant from Tsinghua Institute for Guo Qiang, Tiangong Institute for Intelligent Computing, and the NVIDIA NVAIL Program with GPU/DGX Acceleration. Tianyu Pang was supported by MSRA Fellowship and Baidu Scholarship.
149
+
150
+ # REFERENCES
151
+
152
+ Jean-Baptiste Alayrac, Jonathan Uesato, Po-Sen Huang, Alhussein Fawzi, Robert Stanforth, and Pushmeet Kohli. Are labels required for improving adversarial robustness? In Advances in Neural Information Processing Systems (NeurIPS), pp. 12192–12202, 2019.
153
+
154
+ Maksym Andriushchenko and Nicolas Flammarion. Understanding and improving fast adversarial training. In Advances in neural information processing systems (NeurIPS), 2020.
155
+
156
+ Maksym Andriushchenko, Francesco Croce, Nicolas Flammarion, and Matthias Hein. Square attack: a query-efficient black-box adversarial attack via random search. In European Conference on Computer Vision (ECCV), 2020.
157
+
158
+ Anish Athalye, Nicholas Carlini, and David Wagner. Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. In International Conference on Machine Learning (ICML), 2018.
159
+
160
+ Matan Atzmon, Niv Haim, Lior Yariv, Ofer Israelov, Haggai Maron, and Yaron Lipman. Controlling neural level sets. In Advances in Neural Information Processing Systems (NeurIPS), pp. 2034–2043, 2019.
161
+
162
+ Yogesh Balaji, Tom Goldstein, and Judy Hoffman. Instance adaptive adversarial training: Improved accuracy tradeoffs in neural nets. arXiv preprint arXiv:1910.08051, 2019.
163
+
164
+ Battista Biggio, Igino Corona, Davide Maiorca, Blaine Nelson, Nedim Šrndic, Pavel Laskov, Giorgio ´ Giacinto, and Fabio Roli. Evasion attacks against machine learning at test time. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pp. 387–402. Springer, 2013.
165
+
166
+ Wieland Brendel, Jonas Rauber, and Matthias Bethge. Decision-based adversarial attacks: Reliable attacks against black-box machine learning models. In International Conference on Learning Representations (ICLR), 2018.
167
+
168
+ Wieland Brendel, Jonas Rauber, Alexey Kurakin, Nicolas Papernot, Behar Veliqi, Sharada P Mohanty, Florian Laurent, Marcel Salathé, Matthias Bethge, Yaodong Yu, et al. Adversarial vision challenge. In The NeurIPS’18 Competition, pp. 129–153. Springer, 2020.
169
+
170
+ Qi-Zhi Cai, Chang Liu, and Dawn Song. Curriculum adversarial training. In International Joint Conference on Artificial Intelligence (IJCAI), pp. 3740–3747, 2018.
171
+
172
+ Nicholas Carlini and David Wagner. Towards evaluating the robustness of neural networks. In IEEE Symposium on Security and Privacy (S&P), 2017a.
173
+
174
+ Nicholas Carlini and David Wagner. Adversarial examples are not easily detected: Bypassing ten detection methods. In ACM Workshop on Artificial Intelligence and Security (AISec), 2017b.
175
+
176
+ Nicholas Carlini, Anish Athalye, Nicolas Papernot, Wieland Brendel, Jonas Rauber, Dimitris Tsipras, Ian Goodfellow, Aleksander Madry, and Alexey Kurakin. On evaluating adversarial robustness. arXiv preprint arXiv:1902.06705, 2019.
177
+
178
+ Yair Carmon, Aditi Raghunathan, Ludwig Schmidt, Percy Liang, and John C Duchi. Unlabeled data improves adversarial robustness. In Advances in Neural Information Processing Systems (NeurIPS), 2019.
179
+
180
+ Jinghui Chen and Quanquan Gu. Rays: A ray searching method for hard-label adversarial attack. arXiv preprint arXiv:2006.12792, 2020.
181
+
182
+ Kejiang Chen, Yuefeng Chen, Hang Zhou, Xiaofeng Mao, Yuhong Li, Yuan He, Hui Xue, Weiming Zhang, and Nenghai Yu. Self-supervised adversarial training. In IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 2218–2222. IEEE, 2020a.
183
+
184
+ Pin-Yu Chen, Huan Zhang, Yash Sharma, Jinfeng Yi, and Cho-Jui Hsieh. Zoo: Zeroth order optimization based black-box attacks to deep neural networks without training substitute models. In ACM Workshop on Artificial Intelligence and Security (AISec). ACM, 2017a.
185
+
186
+ Pin-Yu Chen, Yash Sharma, Huan Zhang, Jinfeng Yi, and Cho-Jui Hsieh. Ead: elastic-net attacks to deep neural networks via adversarial examples. In AAAI Conference on Artificial Intelligence (AAAI), 2018.
187
+
188
+ Tianlong Chen, Sijia Liu, Shiyu Chang, Yu Cheng, Lisa Amini, and Zhangyang Wang. Adversarial robustness: From self-supervised pre-training to fine-tuning. In Conference on Computer Vision and Pattern Recognition (CVPR), pp. 699–708, 2020b.
189
+
190
+ Yunpeng Chen, Jianan Li, Huaxin Xiao, Xiaojie Jin, Shuicheng Yan, and Jiashi Feng. Dual path networks. In Advances in Neural Information Processing Systems (NeurIPS), pp. 4467–4475, 2017b.
191
+
192
+ Minhao Cheng, Thong Le, Pin-Yu Chen, Jinfeng Yi, Huan Zhang, and Cho-Jui Hsieh. Query-efficient hard-label black-box attack: An optimization-based approach. In International Conference on Learning Representations (ICLR), 2019a.
193
+
194
+ Minhao Cheng, Qi Lei, Pin-Yu Chen, Inderjit Dhillon, and Cho-Jui Hsieh. Cat: Customized adversarial training for improved robustness. arXiv preprint arXiv:2002.06789, 2020.
195
+
196
+ Shuyu Cheng, Yinpeng Dong, Tianyu Pang, Hang Su, and Jun Zhu. Improving black-box adversarial attacks with a transfer-based prior. In Advances in Neural Information Processing Systems (NeurIPS), 2019b.
197
+
198
+ Jeremy M Cohen, Elan Rosenfeld, and J Zico Kolter. Certified adversarial robustness via randomized smoothing. In International Conference on Machine Learning (ICML), 2019.
199
+
200
+ Francesco Croce and Matthias Hein. Minimally distorted adversarial examples with a fast adaptive boundary attack. In International Conference on Machine Learning (ICML), 2020a.
201
+
202
+ Francesco Croce and Matthias Hein. Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacks. In International Conference on Machine Learning (ICML), 2020b.
203
+
204
+ Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2009.
205
+
206
+ Zhijie Deng, Yinpeng Dong, Tianyu Pang, Hang Su, and Jun Zhu. Adversarial distributional training for robust deep learning. arXiv preprint arXiv:2002.05999, 2020.
207
+
208
+ Gavin Weiguang Ding, Yash Sharma, Kry Yik Chau Lui, and Ruitong Huang. Mma training: Direct input space margin maximization through adversarial training. In International Conference on Learning Representations (ICLR), 2020.
209
+
210
+ Yinpeng Dong, Fangzhou Liao, Tianyu Pang, Hang Su, Jun Zhu, Xiaolin Hu, and Jianguo Li. Boosting adversarial attacks with momentum. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018.
211
+
212
+ Yinpeng Dong, Tianyu Pang, Hang Su, and Jun Zhu. Evading defenses to transferable adversarial examples by translation-invariant attacks. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019.
213
+
214
+ Yinpeng Dong, Qi-An Fu, Xiao Yang, Tianyu Pang, Hang Su, Zihao Xiao, and Jun Zhu. Benchmarking adversarial robustness on image classification. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020.
215
+
216
+ Krishnamurthy Dvijotham, Sven Gowal, Robert Stanforth, Relja Arandjelovic, Brendan O’Donoghue, Jonathan Uesato, and Pushmeet Kohli. Training verified learners with learned verifiers. arXiv preprint arXiv:1805.10265, 2018a.
217
+
218
+ Krishnamurthy Dvijotham, Robert Stanforth, Sven Gowal, Timothy Mann, and Pushmeet Kohli. A dual approach to scalable verification of deep networks. In Annual Conference on Uncertainty in Artificial Intelligence (UAI), 2018b.
219
+
220
+ Logan Engstrom, Brandon Tran, Dimitris Tsipras, Ludwig Schmidt, and Aleksander Madry. A rotation and a translation suffice: Fooling cnns with simple transformations. In International Conference on Machine Learning (ICML), 2019.
221
+
222
+ Reuben Feinman, Ryan R Curtin, Saurabh Shintre, and Andrew B Gardner. Detecting adversarial samples from artifacts. arXiv preprint arXiv:1703.00410, 2017.
223
+
224
+ Ian Goodfellow, Yoshua Bengio, and Aaron Courville. Deep Learning. MIT Press, 2016. http: //www.deeplearningbook.org.
225
+
226
+ Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In International Conference on Learning Representations (ICLR), 2015.
227
+
228
+ Sven Gowal, Chongli Qin, Jonathan Uesato, Timothy Mann, and Pushmeet Kohli. Uncovering the limits of adversarial training against norm-bounded adversarial examples. arXiv preprint arXiv:2010.03593, 2020.
229
+
230
+ Priya Goyal, Piotr Dollár, Ross Girshick, Pieter Noordhuis, Lukasz Wesolowski, Aapo Kyrola, Andrew Tulloch, Yangqing Jia, and Kaiming He. Accurate, large minibatch sgd: Training imagenet in 1 hour. arXiv preprint arXiv:1706.02677, 2017.
231
+
232
+ Chuan Guo, Mayank Rana, Moustapha Cisse, and Laurens Van Der Maaten. Countering adversarial images using input transformations. In International Conference on Learning Representations (ICLR), 2018.
233
+
234
+ Minghao Guo, Yuzhe Yang, Rui Xu, Ziwei Liu, and Dahua Lin. When nas meets robustness: In search of robust architectures against adversarial attacks. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 631–640, 2020.
235
+
236
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In European Conference on Computer Vision (ECCV), pp. 630–645. Springer, 2016.
237
+
238
+ Matthias Hein and Maksym Andriushchenko. Formal guarantees on the robustness of a classifier against adversarial manipulation. In Advances in Neural Information Processing Systems (NeurIPS), pp. 2266–2276, 2017.
239
+
240
+ Dan Hendrycks and Thomas Dietterich. Benchmarking neural network robustness to common corruptions and perturbations. In International Conference on Learning Representations (ICLR), 2019.
241
+
242
+ Dan Hendrycks, Kimin Lee, and Mantas Mazeika. Using pre-training can improve model robustness and uncertainty. In International Conference on Machine Learning (ICML), 2019.
243
+
244
+ Jie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 7132–7141, 2018.
245
+
246
+ Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 4700–4708, 2017.
247
+
248
+ Lang Huang, Chao Zhang, and Hongyang Zhang. Self-adaptive training: beyond empirical risk minimization. arXiv preprint arXiv:2002.10319, 2020.
249
+
250
+ Andrew Ilyas, Logan Engstrom, Anish Athalye, and Jessy Lin. Black-box adversarial attacks with limited queries and information. In International Conference on Machine Learning (ICML), 2018.
251
+
252
+ Haoming Jiang, Zhehui Chen, Yuyang Shi, Bo Dai, and Tuo Zhao. Learning to defense by learning to attack. arXiv preprint arXiv:1811.01213, 2018.
253
+
254
+ Linxi Jiang, Xingjun Ma, Zejia Weng, James Bailey, and Yu-Gang Jiang. Imbalanced gradients: A new cause of overestimated adversarial robustness. arXiv preprint arXiv:2006.13726, 2020.
255
+
256
+ Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical report, Citeseer, 2009.
257
+
258
+ Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial examples in the physical world. In The International Conference on Learning Representations (ICLR) Workshops, 2017.
259
+
260
+ Alexey Kurakin, Ian Goodfellow, Samy Bengio, Yinpeng Dong, Fangzhou Liao, Ming Liang, Tianyu Pang, Jun Zhu, Xiaolin Hu, Cihang Xie, et al. Adversarial attacks and defences competition. arXiv preprint arXiv:1804.00097, 2018.
261
+
262
+ Saehyung Lee, Hyungyu Lee, and Sungroh Yoon. Adversarial vertex mixup: Toward better adversarially robust generalization. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 272–281, 2020.
263
+
264
+ Bai Li, Shiqi Wang, Suman Jana, and Lawrence Carin. Towards understanding fast adversarial training. arXiv preprint arXiv:2006.03089, 2020.
265
+
266
+ Pengcheng Li, Jinfeng Yi, Bowen Zhou, and Lijun Zhang. Improving the robustness of deep neural networks via adversarial training with triplet loss. In International Joint Conference on Artificial Intelligence (IJCAI), 2019.
267
+
268
+ Guanxiong Liu, Issa Khalil, and Abdallah Khreishah. Using single-step adversarial training to defend iterative adversarial examples. arXiv preprint arXiv:2002.09632, 2020.
269
+
270
+ Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In International Conference on Learning Representations (ICLR), 2019.
271
+
272
+ Xingjun Ma, Bo Li, Yisen Wang, Sarah M Erfani, Sudanthi Wijewickrema, Michael E Houle, Grant Schoenebeck, Dawn Song, and James Bailey. Characterizing adversarial subspaces using local intrinsic dimensionality. arXiv preprint arXiv:1801.02613, 2018.
273
+
274
+ Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. In International Conference on Learning Representations (ICLR), 2018.
275
+
276
+ Chengzhi Mao, Ziyuan Zhong, Junfeng Yang, Carl Vondrick, and Baishakhi Ray. Metric learning for adversarial robustness. In Advances in Neural Information Processing Systems (NeurIPS), pp. 478–489, 2019.
277
+
278
+ Jan Hendrik Metzen, Tim Genewein, Volker Fischer, and Bastian Bischoff. On detecting adversarial perturbations. In International Conference on Learning Representations (ICLR), 2017.
279
+
280
+ Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Jonathan Uesato, and Pascal Frossard. Robustness via curvature regularization, and vice versa. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019.
281
+
282
+ Norman Mu and Justin Gilmer. Mnist-c: A robustness benchmark for computer vision. arXiv preprint arXiv:1906.02337, 2019.
283
+
284
+ Muzammal Naseer, Salman Khan, Munawar Hayat, Fahad Shahbaz Khan, and Fatih Porikli. A selfsupervised approach for adversarial robustness. In Conference on Computer Vision and Pattern Recognition (CVPR), pp. 262–271, 2020.
285
+
286
+ Anh Nguyen, Jason Yosinski, and Jeff Clune. Deep neural networks are easily fooled: High confidence predictions for unrecognizable images. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 427–436, 2015.
287
+
288
+ Tianyu Pang, Chao Du, Yinpeng Dong, and Jun Zhu. Towards robust detection of adversarial examples. In Advances in Neural Information Processing Systems (NeurIPS), pp. 4579–4589, 2018a.
289
+
290
+ Tianyu Pang, Chao Du, and Jun Zhu. Max-mahalanobis linear discriminant analysis networks. In International Conference on Machine Learning (ICML), 2018b.
291
+
292
+ Tianyu Pang, Kun Xu, Chao Du, Ning Chen, and Jun Zhu. Improving adversarial robustness via promoting ensemble diversity. In International Conference on Machine Learning (ICML), 2019.
293
+
294
+ Tianyu Pang, Kun Xu, Yinpeng Dong, Chao Du, Ning Chen, and Jun Zhu. Rethinking softmax crossentropy loss for adversarial robustness. In International Conference on Learning Representations (ICLR), 2020a.
295
+
296
+ Tianyu Pang, Kun Xu, and Jun Zhu. Mixup inference: Better exploiting mixup to defend adversarial attacks. In International Conference on Learning Representations (ICLR), 2020b.
297
+
298
+ Tianyu Pang, Xiao Yang, Yinpeng Dong, Kun Xu, Hang Su, and Jun Zhu. Boosting adversarial training with hypersphere embedding. In Advances in Neural Information Processing Systems (NeurIPS), 2020c.
299
+
300
+ Nicolas Papernot, Patrick McDaniel, Somesh Jha, Matt Fredrikson, Z Berkay Celik, and Ananthram Swami. The limitations of deep learning in adversarial settings. In IEEE European Symposium on Security and Privacy (EuroS&P), pp. 372–387. IEEE, 2016.
301
+
302
+ Chongli Qin, James Martens, Sven Gowal, Dilip Krishnan, Krishnamurthy Dvijotham, Alhussein Fawzi, Soham De, Robert Stanforth, and Pushmeet Kohli. Adversarial robustness through local linearization. In Advances in Neural Information Processing Systems (NeurIPS), pp. 13824–13833, 2019.
303
+
304
+ Ilija Radosavovic, Raj Prateek Kosaraju, Ross Girshick, Kaiming He, and Piotr Dollár. Designing network design spaces. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 10428–10436, 2020.
305
+
306
+ Edward Raff, Jared Sylvester, Steven Forsyth, and Mark McLean. Barrage of random transforms for adversarially robust defense. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 6528–6537, 2019.
307
+
308
+ Leslie Rice, Eric Wong, and J Zico Kolter. Overfitting in adversarially robust deep learning. In International Conference on Machine Learning (ICML), 2020.
309
+
310
+ Ali Shafahi, Amin Ghiasi, Furong Huang, and Tom Goldstein. Label smoothing and logit squeezing: A replacement for adversarial training? arXiv preprint arXiv:1910.11585, 2019a.
311
+
312
+ Ali Shafahi, Mahyar Najibi, Amin Ghiasi, Zheng Xu, John Dickerson, Christoph Studer, Larry S Davis, Gavin Taylor, and Tom Goldstein. Adversarial training for free! In Advances in Neural Information Processing Systems (NeurIPS), 2019b.
313
+
314
+ Dawn Song, Kevin Eykholt, Ivan Evtimov, Earlence Fernandes, Bo Li, Amir Rahmati, Florian Tramer, Atul Prakash, and Tadayoshi Kohno. Physical adversarial examples for object detectors. In USENIX Workshop on Offensive Technologies, 2018a.
315
+
316
+ Yang Song, Taesup Kim, Sebastian Nowozin, Stefano Ermon, and Nate Kushman. Pixeldefend: Leveraging generative models to understand and defend against adversarial examples. In International Conference on Learning Representations (ICLR), 2018b.
317
+
318
+ David Stutz, Matthias Hein, and Bernt Schiele. Confidence-calibrated adversarial training: Generalizing to unseen attacks. In International Conference on Machine Learning (ICML), 2020.
319
+
320
+ Dong Su, Huan Zhang, Hongge Chen, Jinfeng Yi, Pin-Yu Chen, and Yupeng Gao. Is robustness the cost of accuracy? – a comprehensive study on the robustness of 18 deep image classification models. In European Conference on Computer Vision (ECCV), 2018.
321
+
322
+ Cecilia Summers and Michael J Dinneen. Logit regularization methods for adversarial robustness. ICLR submission, 2018. https://openreview.net/forum?id=BJlr0j0ctX.
323
+
324
+ Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In International Conference on Learning Representations (ICLR), 2014.
325
+
326
+ Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 1–9, 2015.
327
+
328
+ Pedro Tabacof and Eduardo Valle. Exploring the space of adversarial images. In 2016 International Joint Conference on Neural Networks (IJCNN), pp. 426–433. IEEE, 2016.
329
+
330
+ Florian Tramèr and Dan Boneh. Adversarial training and robustness for multiple perturbations. In Advances in Neural Information Processing Systems (NeurIPS), pp. 5858–5868, 2019.
331
+
332
+ Florian Tramèr, Alexey Kurakin, Nicolas Papernot, Dan Boneh, and Patrick McDaniel. Ensemble adversarial training: Attacks and defenses. In International Conference on Learning Representations (ICLR), 2018.
333
+
334
+ Florian Tramer, Nicholas Carlini, Wieland Brendel, and Aleksander Madry. On adaptive attacks to adversarial example defenses. In Advances in Neural Information Processing Systems (NeurIPS), 2020.
335
+
336
+ Jonathan Uesato, Brendan O’Donoghue, Aaron van den Oord, and Pushmeet Kohli. Adversarial risk and the dangers of evaluating against weak attacks. In International Conference on Machine Learning (ICML), 2018.
337
+
338
+ S Vivek B and R Venkatesh Babu. Single-step adversarial training with dropout scheduling. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020.
339
+
340
+ Huaxia Wang and Chun-Nam Yu. A direct approach to robust deep learning using adversarial networks. In International Conference on Learning Representations (ICLR), 2019.
341
+
342
+ Yisen Wang, Xingjun Ma, James Bailey, Jinfeng Yi, Bowen Zhou, and Quanquan Gu. On the convergence and robustness of adversarial training. In International Conference on Machine Learning (ICML), pp. 6586–6595, 2019.
343
+
344
+ Eric Wong and Zico Kolter. Provable defenses against adversarial examples via the convex outer adversarial polytope. In International Conference on Machine Learning (ICML), pp. 5283–5292, 2018.
345
+
346
+ Eric Wong, Leslie Rice, and J. Zico Kolter. Fast is better than free: Revisiting adversarial training. In International Conference on Learning Representations (ICLR), 2020.
347
+
348
+ Dongxian Wu, Yisen Wang, Shu-Tao Xia, James Bailey, and Xingjun Ma. Skip connections matter: On the transferability of adversarial examples generated with resnets. In International Conference on Learning Representations (ICLR), 2020.
349
+
350
+ Cihang Xie and Alan Yuille. Intriguing properties of adversarial training at scale. In International Conference on Learning Representations (ICLR), 2020.
351
+
352
+ Cihang Xie, Jianyu Wang, Zhishuai Zhang, Zhou Ren, and Alan Yuille. Mitigating adversarial effects through randomization. In International Conference on Learning Representations (ICLR), 2018.
353
+
354
+ Cihang Xie, Yuxin Wu, Laurens van der Maaten, Alan Yuille, and Kaiming He. Feature denoising for improving adversarial robustness. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019.
355
+
356
+ Cihang Xie, Mingxing Tan, Boqing Gong, Alan Yuille, and Quoc V Le. Smooth adversarial training. arXiv preprint arXiv:2006.14536, 2020.
357
+
358
+ Saining Xie, Ross Girshick, Piotr Dollár, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 1492–1500, 2017.
359
+
360
+ Zheng Xu, Ali Shafahi, and Tom Goldstein. Exploring model robustness with adaptive networks and improved adversarial training. arXiv preprint arXiv:2006.00387, 2020.
361
+
362
+ Hongwei Yong, Jianqiang Huang, Xiansheng Hua, and Lei Zhang. Gradient centralization: A new optimization technique for deep neural networks. In European Conference on Computer Vision (ECCV), 2020.
363
+
364
+ Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. In The British Machine Vision Conference (BMVC), 2016.
365
+
366
+ Runtian Zhai, Tianle Cai, Di He, Chen Dan, Kun He, John Hopcroft, and Liwei Wang. Adversarially robust generalization just requires more unlabeled data. arXiv preprint arXiv:1906.00555, 2019.
367
+
368
+ Dinghuai Zhang, Tianyuan Zhang, Yiping Lu, Zhanxing Zhu, and Bin Dong. You only propagate once: Accelerating adversarial training via maximal principle. In Advances in Neural Information Processing Systems (NeurIPS), 2019a.
369
+
370
+ Haichao Zhang and Jianyu Wang. Defense against adversarial attacks using feature scatteringbased adversarial training. In Advances in Neural Information Processing Systems (NeurIPS), pp. 1829–1839, 2019.
371
+
372
+ Hongyang Zhang, Yaodong Yu, Jiantao Jiao, Eric P Xing, Laurent El Ghaoui, and Michael I Jordan. Theoretically principled trade-off between robustness and accuracy. In International Conference on Machine Learning (ICML), 2019b.
373
+
374
+ Jingfeng Zhang, Xilie Xu, Bo Han, Gang Niu, Lizhen Cui, Masashi Sugiyama, and Mohan Kankanhalli. Attacks which do not kill training make adversarial learning stronger. In International Conference on Machine Learning (ICML), 2020.
375
+
376
+ # A TECHNICAL DETAILS
377
+
378
+ In this section we introduce more related backgrounds and technical details for reference.
379
+
380
+ # A.1 ADVERSARIAL ATTACKS
381
+
382
+ Since the seminal L-BFGS and FGSM attacks (Szegedy et al., 2014; Goodfellow et al., 2015), a large amount of attacking methods on generating adversarial examples have been introduced. In the white-box setting, gradient-based methods are popular and powerful, which span in the $\ell _ { \infty }$ threat model (Nguyen et al., 2015; Madry et al., 2018), $\ell _ { 2 }$ threat model (Carlini & Wagner, 2017a), $\ell _ { 1 }$ threat model (Chen et al., 2018), and $\ell _ { 0 }$ threat model (Papernot et al., 2016). In the black-box setting, the attack strategies are much more diverse. These include transfer-based attacks (Dong et al., 2018; 2019; Cheng et al., 2019b), quasi-gradient attacks (Chen et al., 2017a; Uesato et al., 2018; Ilyas et al., 2018), and decision-based attacks (Brendel et al., 2018; Cheng et al., 2019a). Adversarial attacks can be also realized in the physical world (Kurakin et al., 2017; Song et al., 2018a). Below we formulate the PGD attack and AutoAttack that we used in our evaluations.
383
+
384
+ PGD attack. One of the most commonly studied adversarial attack is the projected gradient descent (PGD) method (Madry et al., 2018). Let $x _ { 0 }$ be a randomly perturbed sample in the neighborhood of the clean input $x$ , then PGD iteratively crafts the adversarial example as
385
+
386
+ $$
387
+ \begin{array} { r } { x _ { i } = \mathrm { c l i p } _ { x , \epsilon } ( x _ { i - 1 } + \epsilon _ { i } \cdot \mathrm { s i g n } ( \nabla _ { x _ { i - 1 } } \mathcal { L } ( x _ { i - 1 } , y ) ) ) , } \end{array}
388
+ $$
389
+
390
+ where $\mathrm { c l i p } _ { x , \epsilon } ( \cdot )$ is the clipping function and $\mathcal { L }$ is the adversarial objective. The accuracy under PGD attack has been a standard metric to evaluate the model robustness.
391
+
392
+ AutoAttack. Croce & Hein (2020b) first propose the Auto-PGD (APGD) algorithm, where the main idea is to automatically tune the adversarial step sizes according to the optimization trend. As to the adversarial objective, except for the traditional cross-entropy (CE) loss, they develop a new difference of logits ratio (DLR) loss as
393
+
394
+ $$
395
+ \mathrm { D L R } ( x , y ) = - \frac { z _ { y } - \operatorname* { m a x } _ { i \neq y } z _ { i } } { z _ { \pi _ { 1 } } - z _ { \pi _ { 3 } } } ,
396
+ $$
397
+
398
+ where $z$ is the logits and $\pi$ is the ordering which sorts the components of $z$ . Finally, the authors propose to group $\mathbf { A P G D } _ { \mathrm { C E } }$ and $\mathrm { A P G D } _ { \mathrm { D L R } }$ with FAB (Croce & Hein, 2020a) and square attack (Andriushchenko et al., 2020) to form the AutoAttack (AA).
399
+
400
+ # A.2 REFERENCE CODES
401
+
402
+ In Table 11, we provide the code links for the referred defenses. The summarized training settings are either described in their papers or manually retrieved by us in their code implementations.
403
+
404
+ Table 11: We summarize the code links for the referred defense methods in Table 1.
405
+
406
+ <table><tr><td>Method</td><td>Code link</td></tr><tr><td>Madry et al. (2018) Cai et al. (2018)</td><td>github.com/MadryLab/cifar10_challenge</td></tr><tr><td>Zhang et al. (2019b)</td><td>github.com/sunblaze-ucb/curriculum-adversarial-training-CAT</td></tr><tr><td></td><td>github.com/yaodongyu/TRADES</td></tr><tr><td>Wang et al. (2019)</td><td> github.com/YisenWang/dynamic_adv_training</td></tr><tr><td>Mao et al. (2019)</td><td>github.com/columbia/Metric_Learning_Adversarial_Robustness</td></tr><tr><td>Carmon et al. (2019)</td><td>github.com/yaircarmon/semisup-adv</td></tr><tr><td>Alayrac et al. (2019)</td><td>github.com/deepmind/deepmind-research/unsupervised_adversarial_training</td></tr><tr><td>Shafahi et al. (2019b)</td><td>github.com/ashafahi/free_adv_train</td></tr><tr><td>Zhang et al. (2019a)</td><td>github.com/a1600012888/YOPO-You-Only-Propagate-Once</td></tr><tr><td>Zhang &amp; Wang (2019)</td><td> github.com/Haichao-Zhang/FeatureScatter</td></tr><tr><td>Atzmon et al. (2019)</td><td>github.com/matanatz/ControllingNeuralLevelsets</td></tr><tr><td>Wong et al. (2020)</td><td>github.com/locuslab/fast_adversarial</td></tr><tr><td>Rice et al. (2020)</td><td></td></tr><tr><td>Ding et al. (2020)</td><td>github.com/locuslab/robust_overfitting</td></tr><tr><td>Pang et al. (2020a)</td><td>github.com/BorealisAI/mma_training github.com/P2333/Max-Mahalanobis-Training</td></tr><tr><td>Zhang et al. (2020)</td><td>github.com/zjfheart/Friendly-Adversarial-Training</td></tr><tr><td>Huang et al. (2020)</td><td> github.com/LayneH/self-adaptive-training</td></tr><tr><td>Lee et al. (2020)</td><td> github.com/Saehyung-Lee/cifar10_challenge</td></tr></table>
407
+
408
+ # A.3 MODEL ARCHITECTURES
409
+
410
+ We select some typical hand-crafted model architectures as the objects of study, involving DenseNet (Huang et al., 2017), GoogleNet (Szegedy et al., 2015), (PreAct) ResNet (He et al., 2016), SENet (Hu et al., 2018), WRN (Zagoruyko & Komodakis, 2016), DPN (Chen et al., 2017b), ResNeXt (Xie et al., 2017), and RegNetX (Radosavovic et al., 2020). The models are implemented by https://github.com/kuangliu/pytorch-cifar.
411
+
412
+ Table 12: Number of parameters for different model architectures.
413
+
414
+ <table><tr><td>Architecture</td><td># of param.</td><td>Architecture</td><td># of param.</td><td>Architecture</td><td># of param.</td></tr><tr><td>DenseNet-121</td><td>28.29 M</td><td>DPN26</td><td>46.47 M</td><td>GoogleNet</td><td>24.81 M</td></tr><tr><td>DenseNet-201</td><td>73.55 M</td><td>DPN92</td><td>137.50 M</td><td>ResNeXt-29</td><td>36.65 M</td></tr><tr><td>RegNetX (200MF)</td><td>9.42 M</td><td>ResNet-18</td><td>44.70 M</td><td>SENet-18</td><td>45.09 M</td></tr><tr><td>RegNetX (400MF)</td><td>19.34 M</td><td>ResNet-50</td><td>94.28 M</td><td>WRN-34-10</td><td>193.20 M</td></tr></table>
415
+
416
+ # A.4 INFERENCE-PHASE ADVERSARIAL DEFENSES
417
+
418
+ Except for enhancing the models in the training phase, there are other methods that intend to improve robustness in the inference phase. These attempts include performing local linear transformation like adding Gaussian noise (Tabacof & Valle, 2016), different operations of image processing (Guo et al., 2018; Xie et al., 2018; Raff et al., 2019) or specified inference principle (Pang et al., 2020b). On the other hand, detection-based methods aim to filter out adversarial examples and resort to higher-level intervention. Although detection is a suboptimal strategy compared to classification, it can avoid over-confident wrong decisions. These efforts include training auxiliary classifiers to detect adversarial inputs (Metzen et al., 2017), designing detection statistics (Feinman et al., 2017; Ma et al., 2018; Pang et al., 2018a), or basing on additional probabilistic models (Song et al., 2018b).
419
+
420
+ # A.5 CONCURRENT WORK
421
+
422
+ Gowal et al. (2020) also provide a comprehensive study on different training tricks of AT, and push forward the state-of-the-art performance of adversarially trained models on MNIST, CIFAR-10 and CIFAR-100. While they analyze some properties that we also analyze in this paper (such as training batch size, label smoothing, weight decay, activation functions), they also complement our analyses with experiments on, e.g., weight moving average and data quality. Both of our works reveal the importance of training details in the process of AT, and contribute to establishing more justified perspectives for evaluating AT methods.
423
+
424
+ # B ADDITIONAL RESULTS
425
+
426
+ In this section, we provide additional results to further support the conclusions in the main text.
427
+
428
+ # B.1 EARLY DECAYS LEARNING RATE
429
+
430
+ As shown in Fig. 1, smaller values of weight decay make the training faster but also more tend to overfit. So in Fig. 4, we early decay the learning rate at 40 and 45 epochs, rather than 100 and 105 epochs. We can see that the models can achieve the same clean accuracy, but the weight decay of $5 \times 1 0 ^ { - 4 }$ can still achieve better robustness. Besides, in Fig. 5, we use different values of weight decay for standard training, where the models can also achieve similar clean accuracy. These results demonstrate that adversarial robustness is a more difficult target than clean performance, and is more sensitive to the training hyperparameters, both for standardly and adversarially trained models.
431
+
432
+ ![](images/2c5ac82336fce091a0a149baff8ed603412248c2aa8693deb1b9e1bde14efaa4.jpg)
433
+ Figure 4: Curves of test accuracy w.r.t. training epochs, where the model is WRN-34-10. Here we early decay the learning rate at 40 and 45 epochs for the cases of weight decay $1 \times 1 0 ^ { - 4 }$ and $2 \times 1 0 ^ { - 4 }$ , just before they overfitting. We can see that the models can achieve the same clean accuracy as weight decay $5 \times 1 0 ^ { - 4 }$ , but still worse robustness.
434
+
435
+ ![](images/a6bc7f686167e2543afcaca3a82a1ef3e6408a2fa475ba56cdf4bba1eafb7e4f.jpg)
436
+ Figure 5: Curves of test accuracy w.r.t. training epochs. The model architecture is WRN-34-10, and is standardly trained on CIFAR-10. We can observe that the final performance of each model is comparable, which means that clean accuracy is less sensitive to different values of weight decay. This observation also holds for the adversarially trained models as shown in Fig. 1.
437
+
438
+ # B.2 THE EFFECT OF SMOOTH ACTIVATION FUNCTION
439
+
440
+ In Table 13 we test the effect of Softplus and BN mode on ResNet-18.
441
+
442
+ Table 13: Test accuracy $( \% )$ of TRADES. We compare with the results in Table 6 to check the effect of smooth activation function on TRADES, as well as the compatibility of it with eval BN mode.
443
+
444
+ <table><tr><td colspan="7">Threat model: lo constraint,e=8/255</td></tr><tr><td>Architecture</td><td>Weight decay</td><td>BN mode</td><td>Activation</td><td>Clean</td><td>PGD-10</td><td>AA</td></tr><tr><td rowspan="4">ResNet-18</td><td>5×10-4</td><td>train</td><td>ReLU</td><td>80.23</td><td>53.60</td><td>48.96</td></tr><tr><td>5×10-4</td><td>train</td><td>Softplus</td><td>81.26</td><td>54.58</td><td>50.35</td></tr><tr><td>5×10-4</td><td>eval</td><td>ReLU</td><td>81.45</td><td>53.51</td><td>49.06</td></tr><tr><td>5×10-4</td><td>eval</td><td>Softplus</td><td>82.37</td><td>54.37</td><td>50.51</td></tr></table>
445
+
446
+ B.3 RESULTS OF EARLY STOPPING, WARMUP, AND OPTIMIZERS ON WRN-34-10
447
+
448
+ In Table 14 and Table 15, we provide the results on WRN-34-10.
449
+
450
+ Table 14: Test accuracy $( \% )$ under different early stopping and warmup on CIFAR-10. The model is WRN-34-10. For early stopping attack iterations, we denote, e.g., $4 0 / 7 0$ as the epochs to increase the tolerance step by one (Zhang et al., 2020). For warmup, the learning rate (l.r.) and the maximal perturbation (perturb.) linearly increase from zero to the preset value in the first $1 0 / 1 5 / 2 0$ epochs.
451
+
452
+ <table><tr><td rowspan="2"></td><td rowspan="2">Base</td><td colspan="3">Early stopping attack iter.</td><td colspan="3">Warmup on l.r.</td><td colspan="3">Warmup on perturb.</td></tr><tr><td>40 /70</td><td>40 /100</td><td>60 /100</td><td>10</td><td>15</td><td>20</td><td>10</td><td>15</td><td>20</td></tr><tr><td>Clean</td><td>86.07</td><td>88.29</td><td>88.25</td><td>88.81</td><td>86.35</td><td>86.63</td><td>86.41</td><td>86.66</td><td>86.43</td><td>86.73</td></tr><tr><td>PGD-10</td><td>56.60</td><td>56.06</td><td>55.49</td><td>56.41</td><td>56.31</td><td>56.60</td><td>56.28</td><td>56.25</td><td>56.37</td><td>55.65</td></tr><tr><td>AA</td><td>52.19</td><td>50.19</td><td>49.44</td><td>49.81</td><td>51.96</td><td>52.13</td><td>51.75</td><td>51.88</td><td>52.06</td><td>51.70</td></tr></table>
453
+
454
+ Table 15: Test accuracy $( \% )$ using different optimizers on CIFAR-10. The model is WRN-34-10. The initial learning rate for Adam and AdamW is 0.0001, while for other optimizers is 0.1.
455
+
456
+ <table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Mom</td><td rowspan=1 colspan=1>Nesterov</td><td rowspan=1 colspan=1>Adam</td><td rowspan=1 colspan=1>AdamW</td><td rowspan=1 colspan=1>SGD-GC</td><td rowspan=1 colspan=1>SGD-GCC</td></tr><tr><td rowspan=3 colspan=1>CleanPGD-10AA</td><td rowspan=1 colspan=1>86.07</td><td rowspan=1 colspan=1>86.80</td><td rowspan=1 colspan=1>81.00</td><td rowspan=1 colspan=1>80.72</td><td rowspan=1 colspan=1>86.70</td><td rowspan=2 colspan=1>86.6756.14</td></tr><tr><td rowspan=1 colspan=1>56.60</td><td rowspan=1 colspan=1>56.34</td><td rowspan=1 colspan=1>52.54</td><td rowspan=1 colspan=1>50.32</td><td rowspan=1 colspan=1>56.06</td></tr><tr><td rowspan=1 colspan=1>52.19</td><td rowspan=1 colspan=1>51.93</td><td rowspan=1 colspan=1>46.52</td><td rowspan=1 colspan=1>45.79</td><td rowspan=1 colspan=1>51.75</td><td rowspan=1 colspan=1>51.65</td></tr></table>
457
+
458
+ # B.4 RANK IN THE AUTOATTACK BENCHMARK
459
+
460
+ The models evaluated in this paper are all retrained based on the released codes (Zhang et al., 2019b; Rice et al., 2020). Now we compare our trained models with the AutoAttack public benchmark, where the results of previous work are based on the released pretrained models. In Table 16, we retrieve our results in Table 9 on the TRADES model where we simply change the weight decay from $2 \times 1 0 ^ { - 4 }$ to $5 \times 1 0 ^ { - 4 }$ . We can see that this seemingly unimportant difference sends the TRADES model back to the state-of-the-art position in the benchmark.
461
+
462
+ Table 16: We retrieve the results of top-rank methods from https://github.com/fra31/ auto-attack. All the methods listed below do not require additional training data on CIFAR-10. Here the model of Ours (TRADES) corresponds to lines of weight decay $5 \times \mathrm { \bar { 1 0 ^ { - 4 } } }$ , eval BN mode and ReLU activation in Table 9, which only differs from the original TRADES in weight decay. We run our methods 5 times with different random seeds, and report the mean and standard deviation.
463
+
464
+ <table><tr><td rowspan=1 colspan=6>Threat model: lo constraint, ∈ = 8/255</td></tr><tr><td rowspan=1 colspan=3>Method</td><td rowspan=1 colspan=1>Architecture</td><td rowspan=1 colspan=1>Clean</td><td rowspan=1 colspan=1>AA</td></tr><tr><td rowspan=1 colspan=3>Ours (TRADES)</td><td rowspan=1 colspan=1>WRN-34-20</td><td rowspan=1 colspan=1>86.43</td><td rowspan=7 colspan=1>54.3953.94 ± 0.1053.7453.5153.4252.84</td></tr><tr><td rowspan=2 colspan=2>Ours (TRADES)</td><td rowspan=1 colspan=1></td><td rowspan=2 colspan=1></td><td rowspan=2 colspan=1>WRN-34-10</td><td rowspan=2 colspan=1>85.49 ± 0.24</td></tr><tr><td rowspan=1 colspan=1></td><td></td></tr><tr><td rowspan=2 colspan=2>Pang et al. (2020c)</td><td rowspan=1 colspan=1></td><td rowspan=2 colspan=1></td><td rowspan=2 colspan=1>WRN-34-20</td><td rowspan=2 colspan=1>85.14</td></tr><tr><td rowspan=1 colspan=1>)</td><td></td></tr><tr><td rowspan=2 colspan=3>Zhang et al. (2020)Rice et al. (2020)Qin et al. (2019)</td><td rowspan=1 colspan=1>WRN-34-10</td><td rowspan=1 colspan=1>84.52</td><td rowspan=1 colspan=1>84.52</td></tr><tr><td rowspan=1 colspan=1>WRN-34-20WRN-40-8</td><td rowspan=1 colspan=1>85.3486.28</td></tr><tr><td rowspan=1 colspan=5>Threat model: looconstraint, e = 0.031</td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=1 colspan=3>Method</td><td rowspan=1 colspan=1>Architecture</td><td rowspan=1 colspan=1>Clean</td><td rowspan=1 colspan=1>AA</td></tr><tr><td rowspan=1 colspan=3>Ours (TRADES)Huang et al. (2020)Zhang et al. (2019b)</td><td rowspan=1 colspan=1>WRN-34-10WRN-34-10WRN-34-10</td><td rowspan=1 colspan=1>85.45 ± 0.0983.4884.92</td><td rowspan=1 colspan=1>54.28 ± 0.2453.3453.08</td></tr></table>
465
+
466
+ # B.5 MORE EVALUATIONS ON LABEL SMOOTHING
467
+
468
+ In Table 17 we further investigate the effect of label smoothing on adversarial training.
469
+
470
+ Table 17: Test accuracy $( \% )$ ) under different label smoothing on CIFAR-10. The model is ResNet18 trained by PGD-AT. We evaluate under PGD-1000 with different number of restarts and step sizes. Here we use the cross-entropy (CE) objective and C&W objective (Carlini & Wagner, 2017a), respectively. We also evaluate under the SPSA attack (Uesato et al., 2018) for 10, 000 iteration steps, with batch size 128, perturbation size 0.001 and learning rate of $1 / 2 5 5$ .
471
+
472
+ <table><tr><td rowspan=1 colspan=4>Evaluation method</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=4>Label smoothing</td></tr><tr><td rowspan=1 colspan=2>Attack</td><td rowspan=1 colspan=1>Restart</td><td rowspan=1 colspan=1>Step size</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0.1</td><td rowspan=1 colspan=1>0.2</td><td rowspan=1 colspan=1>0.3</td><td rowspan=1 colspan=1>0.4</td></tr><tr><td rowspan=4 colspan=2>PGD-1000(CE objective)</td><td rowspan=2 colspan=1>15</td><td rowspan=1 colspan=1>2/255</td><td rowspan=1 colspan=1>52.45</td><td rowspan=1 colspan=1>52.95</td><td rowspan=1 colspan=1>53.08</td><td rowspan=1 colspan=1>53.10</td><td rowspan=1 colspan=1>53.14</td></tr><tr><td rowspan=3 colspan=1>51010</td><td rowspan=3 colspan=1>2/2552/2550.5/255</td><td rowspan=1 colspan=1>52.41</td><td rowspan=1 colspan=1>52.89</td><td rowspan=1 colspan=1>53.01</td><td rowspan=1 colspan=1>53.04</td><td rowspan=1 colspan=1>53.03</td></tr><tr><td rowspan=1 colspan=1>52.31</td><td rowspan=1 colspan=1>52.85</td><td rowspan=1 colspan=1>52.92</td><td rowspan=1 colspan=1>53.02</td><td rowspan=1 colspan=1>52.96</td></tr><tr><td rowspan=1 colspan=1>52.63</td><td rowspan=1 colspan=1>52.94</td><td rowspan=1 colspan=1>53.33</td><td rowspan=1 colspan=1>53.30</td><td rowspan=1 colspan=1>53.25</td></tr><tr><td rowspan=4 colspan=2>PGD-1000(C&amp;W objective)</td><td rowspan=3 colspan=1>1510</td><td rowspan=3 colspan=1>2/2552/2552/255</td><td rowspan=1 colspan=1>50.64</td><td rowspan=1 colspan=1>50.76</td><td rowspan=1 colspan=1>51.07</td><td rowspan=1 colspan=1>50.96</td><td rowspan=1 colspan=1>50.54</td></tr><tr><td rowspan=1 colspan=1>50.58</td><td rowspan=1 colspan=1>50.66</td><td rowspan=1 colspan=1>50.93</td><td rowspan=1 colspan=1>50.86</td><td rowspan=1 colspan=1>50.44</td></tr><tr><td rowspan=1 colspan=1>)</td><td rowspan=1 colspan=1>50.55</td><td rowspan=1 colspan=1>50.59</td><td rowspan=1 colspan=1>50.90</td><td rowspan=1 colspan=1>50.85</td><td rowspan=1 colspan=1>50.44</td></tr><tr><td rowspan=1 colspan=1>10</td><td rowspan=1 colspan=1>0.5/255</td><td rowspan=1 colspan=1>50.63</td><td rowspan=1 colspan=1>50.73</td><td rowspan=1 colspan=1>51.03</td><td rowspan=1 colspan=1>51.04</td><td rowspan=1 colspan=1>50.52</td></tr><tr><td rowspan=1 colspan=2>SPSA-10000</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1/255</td><td rowspan=1 colspan=1>61.69</td><td rowspan=1 colspan=1>61.92</td><td rowspan=1 colspan=1>61.93</td><td rowspan=1 colspan=1>61.79</td><td rowspan=1 colspan=1>61.53</td></tr></table>
parse/train/Xb8xvrtB8Ce/Xb8xvrtB8Ce_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Xb8xvrtB8Ce/Xb8xvrtB8Ce_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Xb8xvrtB8Ce/Xb8xvrtB8Ce_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ioyq7NsR1KJ/ioyq7NsR1KJ.md ADDED
@@ -0,0 +1,321 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Adversarial Graph Augmentation to Improve Graph Contrastive Learning
2
+
3
+ Susheel Suresh Purdue University suresh43@purdue.edu
4
+
5
+ Pan Li∗ Purdue University panli@purdue.edu
6
+
7
+ Cong Hao Georgia Tech callie.hao@gatech.edu
8
+
9
+ Jennifer Neville Purdue University and Microsoft Research jenneville@microsoft.com
10
+
11
+ # Abstract
12
+
13
+ Self-supervised learning of graph neural networks (GNN) is in great need because of the widespread label scarcity issue in real-world graph/network data. Graph contrastive learning (GCL), by training GNNs to maximize the correspondence between the representations of the same graph in its different augmented forms, may yield robust and transferable GNNs even without using labels. However, GNNs trained by traditional GCL often risk capturing redundant graph features and thus may be brittle and provide sub-par performance in downstream tasks. Here, we propose a novel principle, termed adversarial-GCL (AD-GCL), which enables GNNs to avoid capturing redundant information during the training by optimizing adversarial graph augmentation strategies used in GCL. We pair AD-GCL with theoretical explanations and design a practical instantiation based on trainable edge-dropping graph augmentation. We experimentally validate AD-GCL2 by comparing with the state-of-the-art GCL methods and achieve performance gains of up-to $14 \%$ in unsupervised, $6 \%$ in transfer, and $3 \%$ in semi-supervised learning settings overall with 18 different benchmark datasets for the tasks of molecule property regression and classification, and social network classification.
14
+
15
+ # 1 Introduction
16
+
17
+ Graph representation learning (GRL) aims to encode graph-structured data into low-dimensional vector representations, which has recently shown great potential in many applications in biochemistry, physics and social science [1–3]. Graph neural networks (GNNs), inheriting the power of neural networks [4, 5], have become the almost de facto encoders for GRL [6–9]. GNNs have been mostly studied in cases with supervised end-to-end training [10–16], where a large number of task-specific labels are needed. However, in many applications, annotating labels of graph data takes a lot of time and resources [17, 18], e.g., identifying pharmacological effect of drug molecule graphs requires living animal experiments [19]. Therefore, recent research efforts are directed towards studying self-supervised learning for GNNs, where only limited or even no labels are needed [18, 20–31].
18
+
19
+ Designing proper self-supervised-learning principles for GNNs is crucial, as they drive what information of graph-structured data will be captured by GNNs and may heavily impact their performance in downstream tasks. Many previous works adopt the edge-reconstruction principle to match traditional network-embedding requirement [32–35], where the edges of the input graph are expected to be reconstructed based on the output of GNNs [20, 21, 36]. Experiments showed that these GNN models learn to over-emphasize node proximity [23] and may lose subtle but crucial structural information, thus failing in many tasks including node-role classification [16, 35, 37, 38] and graph classification [17].
20
+
21
+ ![](images/6d694aef4bf6a33ce4c69cf2021f535607c422a87dd7b0d950b7eb4d6dcd6b3a.jpg)
22
+ Figure 1: The AD-GCL principle and its instantiation based on learnable edge-dropping augmentation. ADGCL contains two components for graph data encoding and graph data augmentation. The GNN encoder $f ( \cdot )$ maximizes the mutual information between the original graph $G$ and the augmented graph $t ( G )$ while the GNN augmenter optimizes the augmentation $T ( \cdot )$ to remove the information from the original graph. The instantiation of AD-GCL proposed in this work uses edge dropping: An edge $e$ of $G$ is randomly dropped according to Bernoulli $\left( \omega _ { e } \right)$ , where $\omega _ { e }$ is parameterized by the GNN augmenter.
23
+
24
+ To avoid the above issue, graph contrastive learning (GCL) has attracted more attention recently [18, 22, 23, 25–31]. GCL leverages the mutual information maximization principle (InfoMax) [39] that aims to maximize the correspondence between the representations of a graph (or a node) in its different augmented forms [18, 24, 25, 28–31]. Perfect correspondence indicates that a representation precisely identifies its corresponding graph (or node) and thus the encoding procedure does not decrease the mutual information between them.
25
+
26
+ However, researchers have found that the InfoMax principle may be risky because it may push encoders to capture redundant information that is irrelevant to the downstream tasks: Redundant information suffices to identify each graph to achieve InfoMax, but encoding it yields brittle representations and may severely deteriorate the performance of the encoder in the downstream tasks [40]. This observation reminds us of another principle, termed information bottleneck (IB) [41–46]. As opposed to InfoMax, IB asks the encoder to capture the minimal sufficient information for the downstream tasks. Specifically, IB minimizes the information from the original data while maximizing the information that is relevant to the downstream tasks. As the redundant information gets removed, the encoder learnt by IB tends to be more robust and transferable. Recently, IB has been applied to GNNs [47, 48]. But IB needs the knowledge of the downstream tasks that may not be available.
27
+
28
+ Hence, a natural question emerges: When the knowledge of downstream tasks are unavailable, how to train GNNs that may remove redundant information? Previous works highlight some solutions by designing data augmentation strategies for GCL but those strategies are typically task-related and sub-optimal. They either leverage domain knowledge [25, 28, 30], e.g., node centralities in network science or molecule motifs in bio-chemistry, or depend on extensive evaluation on the downstream tasks, where the best strategy is selected based on validation performance [24, 30].
29
+
30
+ In this paper, we approach this question by proposing a novel principle that pairs GCL with adversarial training, termed AD-GCL, as shown in Fig.1. We particularly focus on training self-supervised GNNs for graph-level tasks, though the idea may be generalized for node-level tasks. AD-GCL consists of two components: The first component contains a GNN encoder, which adopts InfoMax to maximize the correspondence/mutual information between the representations of the original graph and its augmented graphs. The second component contains a GNN-based augmenter, which aims to optimize the augmentation strategy to decrease redundant information from the original graph as much as possible. AD-GCL essentially allows the encoder capturing the minimal sufficient information to distinguish graphs in the dataset. We further provide theoretical explanations of AD-GCL. We show that with certain regularization on the search space of the augmenter, AD-GCL can yield a lower bound guarantee of the information related to the downstream tasks, while simultaneously holding an upper bound guarantee of the redundant information from the original graphs, which matches the aim of the IB principle. We further give an instantiation of AD-GCL: The GNN augmenter adopts a task-agnostic augmentation strategy and will learn an input-graph-dependent non-uniform-edge-drop probability to perform graph augmentation.
31
+
32
+ Finally, we extensively evaluate AD-GCL on 18 different benchmark datasets for molecule property classification and regression, and social network classification tasks in different setting viz. unsupervised learning (Sec. 5.1), transfer learning (Sec. 5.3) and semi-supervised learning (Sec. 5.4) learning. AD-GCL achieves significant performance gains in relative improvement and high mean ranks over the datasets compared to state-of-the-art baselines. We also study the theoretical aspects of AD-GCL with apt experiments and analyze the results to offer fresh perspectives (Sec. 5.2): Interestingly, we observe that AD-GCL outperforms traditional GCL based on non-optimizable augmentation across almost the entire range of perturbation levels.
33
+
34
+ # 2 Notations and Preliminaries
35
+
36
+ We first introduce some preliminary concepts and notations for further exposition. In this work, we consider attributed graphs $G = ( V , E )$ where $V$ is a node set and $E$ is an edge set. $G$ may have node attributes $\{ X _ { v } \in \mathbb { R } ^ { \breve { F } } \mid ^ { \cdot } v \in V \}$ and edge attributes $\{ X _ { e } \in \mathbb { R } ^ { F } \mid e \in E \}$ of dimension $F$ . We denote the set of the neighbors of a node $v$ as $\mathcal { N } _ { v }$ .
37
+
38
+ Learning Graph Representations. Given a set of graphs $G _ { i }$ , $i = 1 , 2 , . . . , n$ , in some universe $\mathcal { G }$ , the aim is to learn an encoder $f : \mathcal { G } \mathbb { R } ^ { d }$ , where $f ( G _ { i } )$ can be further used in some downstream task. We also assume that $G _ { i }$ ’s are all IID sampled from an unknown distribution $\mathbb { P } _ { \mathcal { G } }$ defined over $\mathcal { G }$ . In a downstream task, each $G _ { i }$ is associated with a label $y _ { i } \in \mathcal { V }$ . Another model $q : \mathbb { R } ^ { d } \mathcal { V }$ will be learnt to predict $Y _ { i }$ based on $q ( f ( G _ { i } ) )$ . We assume $( G _ { i } , Y _ { i } )$ ’s are IID sampled from a distribution $\mathbb { P } _ { \mathcal { G } \times \mathcal { y } } = \mathbb { P } _ { \mathcal { y } | \mathcal { G } } \mathbb { P } _ { \mathcal { G } }$ , where $\mathbb { P } _ { \mathcal { V } | \mathcal { G } }$ is the conditional distribution of the graph label in the downstream task given the graph.
39
+
40
+ Graph Neural Networks (GNNs). In this work, we focus on using GNNs, message passing GNNs in particular [49], as the encoder $f$ . For a graph $G = ( V , E )$ , every node $v \in V$ will be paired with a node representation $h _ { v }$ initialized as $h _ { v } ^ { ( 0 ) } = X _ { v }$ . These representations will be updated by a GNN. During the $k ^ { \mathrm { { t h } } }$ iteration, each $h _ { v } ^ { ( k - 1 ) }$ is updated using $v ^ { \prime } \mathrm { s }$ neighbourhood information expressed as,
41
+
42
+ $$
43
+ h _ { v } ^ { ( k ) } = \mathrm { U P D A T E } ^ { ( k ) } \Bigg ( h _ { v } ^ { ( k - 1 ) } , \mathrm { A G G R E G A T E } ^ { ( k ) } \Big ( \big \{ ( h _ { u } ^ { ( k - 1 ) } , X _ { u v } ) \mid u \in \mathcal { N } _ { v } \big \} \Big ) \Bigg )
44
+ $$
45
+
46
+ where AGGREGATE $( \cdot )$ is a trainable function that maps the set of node representations and edge attributes $X _ { u v }$ to an aggregated vector, $\mathrm { U P D A T E } ( \cdot )$ is another trainable function that maps both $v$ ’s current representation and the aggregated vector to $v$ ’s updated representation. After $K$ iterations of Eq. 1, the graph representation is obtained by pooling the final set of node representations as,
47
+
48
+ $$
49
+ f ( G ) : \triangleq h _ { G } = \mathrm { P O O L } \big ( \{ h _ { v } ^ { ( K ) } \mid v \in V \} \big )
50
+ $$
51
+
52
+ For design choices regarding aggregation, update and pooling functions we refer the reader to [3, 7, 8].
53
+
54
+ The Mutual Information Maximization Principle. GCL is built upon the InfoMax principle [39], which prescribes to learn an encoder $f$ that maximizes the mutual information or the correspondence between the graph and its representation. The rationale behind GCL is that a graph representation $f ( G )$ should capture the features of the graph $G$ so that representation can distinguish this graph from other graphs. Specifically, the objective of GCL follows
55
+
56
+ $$
57
+ \operatorname { I n f o M a x : } \quad \operatorname* { m a x } _ { f } I ( G ; f ( G ) ) , \quad \operatorname { w h e r e } G \sim \mathbb { P } _ { \mathcal { G } } .
58
+ $$
59
+
60
+ where $I ( X _ { 1 } ; X _ { 2 } )$ denotes the mutual information between two random variables $X _ { 1 }$ and $X _ { 2 }$ [50].
61
+
62
+ Note that the encoder $f ( \cdot )$ given by GNNs is not injective in the graph space $\mathcal { G }$ due to its limited expressive power [14, 15]. Specifically, for the graphs that cannot be distinguished by 1-WL test [51], GNNs will associate them with the same representations. We leave more discussion on 1-WL test in Appendix C. In contrast to using CNNs as encoders, one can never expect GNNs to identify all the graphs in $\mathcal { G }$ based their representations, which introduces a unique challenge for GCL.
63
+
64
+ # 3 Adversarial Graph Contrastive Learning
65
+
66
+ In this section, we introduce our adversarial graph contrastive learning (AD-GCL) framework and one of its instantiations based on edge perturbation.
67
+
68
+ # 3.1 Theoretical Motivation and Formulation of AD-GCL
69
+
70
+ The InfoMax principle in Eq. 3 could be problematic in practice for general representation learning. Tschannen et al. have shown that for image classification, representations capturing the information that is entirely irrelevant to the image labels are also able to maximize the mutual information but such representations are definitely not useful for image classification [40]. A similar issue can also be observed in graph representation learning, as illustrated by Fig.2: We consider a binary graph classification problem with graphs in the dataset ogbg-molbace [52]. Two GNN encoders with exactly the same architecture are trained to keep mutual information maximization between graph representations and the input graphs, but one of the GNN encoders in the same time is further supervised by random graph labels. Although the GNN encoder supervised by random labels still keeps one-to-one correspondance between every input graph and its representation (i.e., mutual information maximization), we may observe significant performance degeneration of this GNN encoder when evaluating it over the downstream ground-truth labels. More detailed experiment setup is left in Appendix G.1.
71
+
72
+ This observation inspires us to rethink what a good graph representation is. Recently, the information bottleneck has applied to learn graph representations [47, 48]. Specifically, the objective of graph information bottleneck (GIB) follows
73
+
74
+ $$
75
+ \operatorname* { m a x } _ { f } I ( f ( G ) ; Y ) - \beta I ( G ; f ( G ) ) ,
76
+ $$
77
+
78
+ where $( G , Y ) \sim \mathbb { P } _ { \mathcal { G } \times \mathcal { Y } } , \beta$ is a positive constant. Comparing Eq. 3 and Eq. 4, we may observe the different requirements between InfoMax and GIB: InfoMax asks for maximizing the information from the original graph, while GIB asks for minimizing such information but simultaneously maximizing the information that is relevant to the downstream tasks. As GIB asks to remove redundant information, GIB naturally avoids the issue encountered in Fig.2. Removing extra information also makes GNNs trained w.r.t. GIB robust to adverserial attack and strongly transferrable [47, 48].
79
+
80
+ ![](images/1a375c3c6f0ec578b5e9153070667306b3731900152c64e3663b11c7420630c2.jpg)
81
+ Figure 2: Two GNNs keep the mutual information maximized between graphs and their representations. Simultaneously, they get supervised by ground-truth labels (green) and random labels (blue) respectively. The curves show their testing performance on predicting ground-truth labels.
82
+
83
+ Unfortunately, GIB requires the knowledge of the class labels $Y$ from the downstream task and thus does not apply to self-supervised training of GNNs where there are few or no labels. Then, the question is how to learn robust and transferable GNNs in a self-supervised way.
84
+
85
+ To address this, we will develop a GCL approach that uses adversarial learning to avoid capturing redundant information during the representation learning. In general, GCL methods use graph data augmentation (GDA) processes to perturb the original observed graphs and decrease the amount of information they encode. Then, the methods apply InfoMax over perturbed graph pairs (using different GDAs) to train an encoder $f$ to capture the remaining information.
86
+
87
+ Definition 1 (Graph Data Augmentation (GDA)). For a graph $G \in { \mathcal { G } }$ , $T ( G )$ denotes a graph data augmentation of $G$ , which is a distribution defined over $\mathcal { G }$ conditioned on $G$ . We use $t ( G ) \in { \mathcal { G } }$ to denote a sample of $T ( G )$ .
88
+
89
+ Specifically, given two ways of GDA $T _ { 1 }$ and $T _ { 2 }$ , the objective of GCL becomes
90
+
91
+ GDA-GCL: $\operatorname* { m a x } _ { f } I ( f ( t _ { 1 } ( G ) ) ; f ( t _ { 2 } ( G ) ) )$ , where $G \sim \mathbb { P } _ { \mathcal { G } , } t _ { i } ( G ) \sim T _ { i } ( G ) , i \in \{ 1 , 2 \} .$
92
+
93
+ In practice, GDA processes are often pre-designed based on either domain knowledge or extensive evaluation, and improper choice of GDA may severely impact the downstream performance [17, 24]. We will review a few GDAs adopted in existing works in Sec.4.
94
+
95
+ In contrast to previous predefined GDAs, our idea, inspired by GIB, is to learn the GDA process (over a parameterized family), so that the encoder $f$ can capture the minimal information that is sufficient to identify each graph.
96
+
97
+ AD-GCL: We optimize the following objective, over a GDA family $\tau$ (defined below).
98
+
99
+ $$
100
+ \operatorname* { m i n } _ { T \in { \mathcal { T } } } \operatorname* { m a x } _ { f } I ( f ( G ) ; f ( t ( G ) ) ) , \quad { \mathrm { w h e r e ~ } } G \sim \mathbb { P } _ { \mathcal { G } } , t ( G ) \sim T ( G ) ,
101
+ $$
102
+
103
+ Definition 2 (Graph Data Augmentation Family). Let $\tau$ denote a family of different GDAs $T _ { \Phi } ( \cdot )$ , where $\Phi$ is the parameter in some universe. A $T _ { \Phi } ( \cdot ) \in \mathcal { T }$ is a specific GDA with parameter $\Phi$ .
104
+
105
+ The min-max principle in AD-GCL aims to train the encoder such that even with a very aggressive GDA (i.e., where $t ( G )$ is very different from $G$ ), the mutual information $/$ the correspondence between the perturbed graph and the original graph can be maximized. Compared with the two GDAs adopted in GDA-GCL (Eq.5), AD-GCL views the original graph $G$ as the anchor while pushing its perturbation $T ( G )$ as far from the anchor as it can. The automatic search over $T \in { \mathcal { T } }$ saves a great deal of effort evaluating different combinations of GDA as adopted in [24].
106
+
107
+ Relating AD-GCL to the downstream task. Next, we will theoretically characterize the property of the encoder trained via AD-GCL. The analysis here not only further illustrates the rationale of AD-GCL but helps design practical $\tau$ when some knowledge of $Y$ is accessible. But note that our analysis does not make any assumption on the availability of $Y$ .
108
+
109
+ Note that GNNs learning graph representations is very different from CNNs learning image representations because GNNs are never injective mappings between the graph universe $\mathcal { G }$ and the representation space $\mathbb { R } ^ { d }$ , because the expressive power of GNNs is limited by the 1-WL test [14, 15, 51]. So, we need to define a quotient space of $\mathcal { G }$ based on the equivalence given by the 1-WL test.
110
+
111
+ Definition 3 (Graph Quotient Space). Define the equivalence $\cong$ between two graphs $G _ { 1 } \cong G _ { 2 }$ if $G _ { 1 }$ , $G _ { 2 }$ cannot be distinguished by the $I$ -WL test. Define the quotient space $\mathcal { G } ^ { \prime } = \mathcal { G } / \cong$ .
112
+
113
+ So every element in the quotient space, i.e., $G ^ { \prime } \in \mathcal { G } ^ { \prime }$ , is a representative graph from a family of graphs that cannot be distinguished by the 1-WL test. Note that our definition also allows attributed graphs.
114
+
115
+ Definition 4 (Probability Measures in $\mathcal { G } ^ { \prime }$ ). Define $\mathbb { P } _ { \mathcal { G } ^ { \prime } }$ over the space $\mathcal { G } ^ { \prime }$ such that $\mathbb { P } _ { \mathcal { G } ^ { \prime } } ( G ^ { \prime } ) =$ $\mathbb { P } _ { \mathcal { G } } ( G \cong G ^ { \prime } )$ for any $G ^ { \prime } \in \mathcal { G } ^ { \prime }$ . Further define $\begin{array} { r } { \mathbb { P } _ { \mathcal { G } ^ { \prime } \times \mathcal { V } } ( \bar { G } ^ { \prime } , Y ^ { \prime } ) = \mathbb { P } _ { \mathcal { G } \times \mathcal { V } } ( G \cong G ^ { \prime } , Y = Y ^ { \prime } ) } \end{array}$ . Given $a$ GDA $T ( \cdot )$ defined over $\mathcal { G }$ , define a distribution on $\mathcal { G } ^ { \prime }$ , $T ^ { \prime } ( G ^ { \prime } ) = \mathbb { E } _ { G \sim \mathbb { P } _ { \mathcal { G } } } [ T ( G ) | G \cong G ^ { \prime } ] .$ for $G ^ { \prime } \in \mathcal { G } ^ { \prime }$ .
116
+
117
+ Now, we provide our theoretical results and give their implication. The proof is in the Appendix B.
118
+
119
+ Theorem 1. Suppose the encoder $f$ is implemented by a GNN as powerful as the $^ { l }$ -WL test. Suppose $\mathcal { G }$ is a countable space and thus $\mathcal { G } ^ { \prime }$ is a countable space. Then, the optimal solution $( f ^ { * } , T ^ { * } )$ to AD-GCL satisfies, letting $T ^ { \prime * } ( G ^ { \prime } ) = \mathbb { E } _ { G \sim \mathbb { P } _ { \mathcal { G } } } [ T ^ { * } ( G ) | { \bar { G } } \cong G ^ { \prime } ] ,$ ,
120
+
121
+ 1. $\begin{array} { r l r } { I ( f ^ { * } ( t ^ { * } ( G ) ) ; G \mid Y ) } & { \leq } & { \operatorname* { m i n } _ { T \in { \mathcal T } } I ( t ^ { \prime } ( G ^ { \prime } ) ; G ^ { \prime } ) \ - \ I ( t ^ { \prime * } ( G ^ { \prime } ) ; Y ) , } \end{array}$ , where $t ^ { \prime } ( G ^ { \prime } ) \sim T ^ { \prime } ( G ^ { \prime } ) ,$ $t ^ { \prime * } ( G ^ { \prime } ) \sim T ^ { \prime * } ( G ^ { \prime } )$ , $( G , Y ) \sim \mathbb { P } _ { \mathcal { G } \times \mathcal { Y } }$ and $( G ^ { \prime } , Y ) \sim \mathbb { P } _ { \mathcal { G } ^ { \prime } \times \mathcal { Y } }$ .
122
+
123
+ 2. $I ( f ^ { * } ( G ) ; Y ) \geq I ( f ^ { * } ( t ^ { \prime * } ( G ^ { \prime } ) ) ; Y ) = I ( t ^ { \prime * } ( G ^ { \prime } ) ; Y ) .$ , where $t ^ { \prime * } ( G ^ { \prime } ) \sim T ^ { \prime * } ( G ^ { \prime } )$ , $( G , Y ) \sim \mathbb { P } _ { \mathcal { G } \times \mathcal { Y } }$ and $( G ^ { \prime } , Y ) \sim \mathbb { P } _ { \mathcal { G } ^ { \prime } \times \mathcal { Y } }$ .
124
+
125
+ The statement 1 in Theorem 1 guarantees a upper bound of the information that is captured by the representations but irrelevant to the downstream task, which matches our aim. This bound has a form very relevant to the GIB principle (Eq.4 when $\beta = 1$ ), since $\begin{array} { r l } { \operatorname* { m i n } _ { T \in \mathcal { T } } I ( t ^ { \prime } ( G ^ { \prime } ) ; G ^ { \prime } ) - I ( t ^ { \prime * } ( G ^ { \prime } ) ; Y ) \ge } \end{array}$ $\begin{array} { r } { \operatorname* { m i n } _ { f } [ I ( f ( G ) ; G ) - I ( \bar { f } ( G ) ; \bar { Y } ) ] } \end{array}$ , where $f$ is a GNN encoder as powerful as the 1-WL test. But note that this inequality also implies that the encoder given by AD-GCL may be worse than the optimal encoder given by GIB $\begin{array} { r } { \beta = 1 , } \end{array}$ ). This makes sense as GIB has the access to the downstream task $Y$ .
126
+
127
+ The statement 2 in Theorem 1 guarantees a lower bound of the mutual information between the learnt representations and the labels of the downstream task. As long as the GDA family $\tau$ has a good control, $\begin{array} { r } { I ( t ^ { \prime * } ( G ^ { \prime } ) ; Y ) \ge \operatorname* { m i n } _ { T \in \mathcal { T } } I ( t ^ { \prime } ( G ^ { \prime } ) ; Y ) } \end{array}$ and $I ( f ^ { * } ( G ) ; { \bar { Y } } )$ thus cannot be too small. This implies that it is better to regularize when learning over $\tau$ . In our instantiation, based on edge-dropping augmentation (Sec. 3.2), we regularize the ratio of dropped edges per graph.
128
+
129
+ # 3.2 Instantiation of AD-GCL via Learnable Edge Perturbation
130
+
131
+ We now introduce a practical instantiation of the AD-GCL principle (Eq. 6) based on learnable edge-dropping augmentations as illustrated in Fig. 1. (See Appendix $\mathrm { D }$ for a summary of AD-GCL in its algorithmic form.) The objective of AD-GCL has two folds: (1) Optimize the encoder $f$ to maximize the mutual information between the representations of the original graph $G$ and its augmented graph $t ( G )$ ; (2) Optimize the GDA $T ( G )$ where $t ( G )$ is sampled to minimize such a mutual information. We always set the encoder as a GNN $f _ { \Theta }$ with learnable parameters $\Theta$ and next we focus on the GDA, $T _ { \Phi } ( G )$ that has learnable parameters $\Phi$ .
132
+
133
+ Learnable Edge Dropping GDA model $T _ { \Phi } ( \cdot )$ . Edge dropping is the operation of deleting some edges in a graph. As a proof of concept, we adopt edge dropping to formulate the GDA family $\tau$ . Other types of GDAs such as node dropping, edge adding and feature masking can also be paired with our AD-GCL principle. Interestingly, in our experiments, edge-dropping augmentation optimized by AD-GCL has already achieved much better performance than any pre-defined random
134
+
135
+ GDAs even carefully selected via extensive evaluation [24] (See Sec.5). Another reason that supports edge dropping is due to our Theorem 1 statement 2, which shows that good GDAs should keep some information related to the downstream tasks. Many GRL downstream tasks such as molecule classification only depends on the structural fingerprints that can be represented as subgraphs of the original graph [53]. Dropping a few edges may not change those subgraph structures and thus keeps the information sufficient to the downstream classification. But note that this reasoning does not mean that we leverage domain knowledge to design GDA, as the family $\tau$ is still broad and the specific GDA still needs to be optimized. Moreover, experiments show that our instantiation also works extremely well on social network classification and molecule property regression, where the evidence of subgraph fingerprints may not exist any more.
136
+
137
+ Parameterizing $T _ { \Phi } ( \cdot )$ . For each $G = ( V , E )$ , we set $T _ { \Phi } ( G )$ , $T \in { \mathcal { T } }$ as a random graph model [54, 55] conditioning on $G$ . Each sample $t ( G ) \sim T _ { \Phi } ( G )$ is a graph that shares the same node set with $G$ while the edge set of $t ( G )$ is only a subset of $E$ . Each edge $e \in E$ will be associated with a random variable $p _ { e } \sim \mathrm { B e r n o u l l i } ( \omega _ { e } )$ , where $e$ is in $t ( G )$ if $p _ { e } = 1$ and is dropped otherwise.
138
+
139
+ We parameterize the Bernoulli weights $\omega _ { e }$ by leveraging another GNN, i.e., the augmenter, to run on $G$ according to Eq.1 of $K$ layers, get the final-layer node representations $\{ h _ { v } ^ { ( K ) } | v \in V \}$ and set
140
+
141
+ $$
142
+ \omega _ { e } = \mathbf { M L P } ( [ h _ { u } ^ { ( K ) } ; h _ { z } ^ { ( K ) } ] ) , \quad \mathrm { w h e r e } e = ( u , z ) \operatorname { a n d } \left\{ h _ { v } ^ { ( K ) } ~ | ~ v \in V \right\} = \mathbf { G N N - a u g m e n t e r } ( G ) .
143
+ $$
144
+
145
+ To train $T ( G )$ in an end-to-end fashion, we relax the discrete $p _ { e }$ to be a continuous variable in $[ 0 , 1 ]$ and utilize the Gumbel-Max reparametrization trick [56, 57]. Specifically, $p _ { e } = \mathrm { S i g m o i d } ( ( \log \delta -$ $\log ( 1 - \delta ) + \omega _ { e } ) / \tau )$ , where $\delta \sim \mathrm { U n i f o r m } ( 0 , 1 )$ . As temperature hyper-parameter $\tau 0$ , $p _ { e }$ gets closer to being binary. Moreover, the gradients $\frac { \partial p _ { e } } { \partial \omega _ { e } }$ are smooth and well defined. This style of edge dropping based on a random graph model has also been used for parameterized explanations of GNNs [58].
146
+
147
+ Regularizing $T _ { \Phi } ( \cdot )$ . As shown in Theorem 1, a reasonable GDA should keep a certain amount of information related to the downstream tasks (statement 2). Hence, we expect the GDAs in the edge dropping family $\tau$ not to perform very aggressive perturbation. Therefore, we regularize the ratio of edges being dropped per graph by enforcing the following constraint: For a graph $G$ and its augmented graph $t ( G )$ , we add $\textstyle \sum _ { e \in E } \omega _ { e } / | E |$ to the objective, where $\omega _ { e }$ is defined in Eq.7 indicates the probability that $e$ gets dropped.
148
+
149
+ Putting everything together, the final objective is as follows.
150
+
151
+ $$
152
+ \operatorname* { m i n } _ { \Phi } \operatorname* { m a x } _ { \Theta } I ( f _ { \Theta } ( G ) ; f _ { \Theta } ( t ( G ) ) ) + \lambda _ { \mathrm { r e g } } \mathbb { E } _ { G } \big [ \sum _ { e \in E } \omega _ { e } / | E | \big ] , \mathrm { w h e r e } G \sim \mathbb { P } _ { \mathcal { G } } , t ( G ) \sim T _ { \Phi } ( G ) .
153
+ $$
154
+
155
+ Note $\Phi$ corresponds to the learnable parameters of the augmenter GNN and MLP used to derive the $\omega _ { e }$ ’s and $\Theta$ corresponds to the learnable parameters of the GNN $f$ .
156
+
157
+ Estimating the objective in Eq.8. In our implementation, the second (regularization) term is easy to estimate empirically. For the first (mutual information) term, we adopt InfoNCE as the estimator [59–61], which is known to be a lower bound of the mutual information and is frequently used for contrastive learning [40, 59, 62]. Specfically, during the training, given a minibatch of $m$ graphs $\{ G _ { i } \} _ { i = 1 } ^ { m }$ , let $z _ { i , 1 } = g ( f _ { \Theta } ( G _ { i } ) )$ and $z _ { i , 2 } = g ( f _ { \Theta } ( t ( G _ { i } ) ) )$ where $g ( \cdot )$ is the projection head implemented by a 2-layer MLP as suggested in [62]. With $s i m ( \cdot , \cdot )$ denoting cosine similarity, we estimate the mutual information for the mini-batch as follows.
158
+
159
+ $$
160
+ I ( f _ { \Theta } ( G ) ; f _ { \Theta } ( t ( G ) ) ) \to \hat { I } = \frac { 1 } { m } \sum _ { i = 1 } ^ { m } \log \frac { \exp ( s i m ( z _ { i , 1 } , z _ { i , 2 } ) ) } { \sum _ { i ^ { \prime } = 1 , i ^ { \prime } \neq i } ^ { m } \exp ( s i m ( z _ { i , 1 } , z _ { i ^ { \prime } , 2 } ) ) }
161
+ $$
162
+
163
+ # 4 Related Work
164
+
165
+ GNNs for GRL is a broad field and gets a high-level review in the Sec. 1. Here, we focus on the topics that are most relevant to graph contrastive learning (GCL).
166
+
167
+ Contrastive learning (CL) [39, 59, 60, 63–65] was initially proposed to train CNNs for image representation learning and has recently achieved great success [62,66]. GCL applies the idea of CL on GNNs. In contrast to the case of CNNs, GCL trained using GNNs posts us new fundamental challenges. An image often has multiple natural views, say by imposing different color filters and so on. Hence, different views of an image give natural contrastive pairs for CL to train CNNs. However, graphs are more abstract and the irregularity of graph structures typically provides crucial information. Thus, designing contrastive pairs for GCL must play with irregular graph structures and thus becomes more challenging. Some works use different parts of a graph to build contrastive pairs, including nodes v.s. whole graphs [18, 67], nodes v.s. nodes [68], nodes v.s. subgraphs [17, 69]. Other works adopt graph data augmentations (GDA) such as edge perturbation [31] to generate contrastive pairs. Recently. GraphCL [24] gives an extensive study on different combinations of GDAs including node dropping, edge perturbation, subgraph sampling and feature masking. Extensive evaluation is required to determine good combinations. MVGRL [25] and GCA [30] leverage the domain knowledge of network science and adopt network centrality to perform GDAs. Note that none of the above methods consider optimizing augmentations. In contrast, our principle AD-GCL provides theoretical guiding principles to optimize augmentations. Very recently, JOAO [70] adopts a bi-level optimization framework sharing some high-level ideas with our adversarial training strategy but has several differences: 1) the GDA search space in JOAO is set as different types of augmentation with uniform perturbation, such as uniform edge/node dropping while we allow augmentation with non-uniform perturbation. 2) JOAO relaxes the GDA combinatorial search problem into continuous space via Jensen’s inequality and adopts projected gradient descent to optimize. Ours, instead, adopts Bayesian modeling plus reparameterization tricks to optimize. The performance comparison between AD-GCL and JOAO for the tasks investigated in Sec. 5 is given in Appendix H.
168
+
169
+ Tian et al. [71] has recently proposed the InfoMin principle that shares some ideas with AD-GCL but there are several fundamental differences. Theoretically, InfoMin needs the downstream tasks to supervise the augmentation. Rephrased in our notation, the optimal augmentation $T _ { I M } ( G )$ given by InfoMin (called the sweet spot in [71]) needs to satisfy $I ( t _ { I M } ( G ) ; Y ) = I ( G ; Y )$ and $\bar { I } ( t _ { I M } ( \bar { G } ) ; G | Y ) = 0$ , $t _ { I M } ( G ) \sim T _ { I M } \bar { ( G ) }$ , neither of which are possible without the downstreamtask knowledge. Instead, our Theorem 1 provides more reasonable arguments and creatively suggests using regularization to control the tradeoff. Empirically, InfoMin is applied to CNNs while AD-GCL is applied to GNNs. AD-GCL needs to handle the above challenges due to irregular graph structures and the limited expressive power of GNNs [14, 15], which InfoMin does not consider.
170
+
171
+ # 5 Experiments and Analysis
172
+
173
+ This section is devoted to the empirical evaluation of the proposed instantiation of our AD-GCL principle. Our initial focus is on unsupervised learning which is followed by analysis of the effects of regularization. We further apply AD-GCL to transfer and semi-supervised learning. Summary of datasets and training details for specific experiments are provided in Appendix E and G respectively.
174
+
175
+ # 5.1 Unsupervised Learning
176
+
177
+ In this setting, an encoder (specifically GIN [72]) is trained with different self-supervised methods to learn graph representations, which are then evaluated by feeding these representations to make prediction for the downstream tasks. We use datasets from Open Graph Benchmark (OGB) [52], TU Dataset [73] and ZINC [74] for graph-level property classification and regression. More details regarding the experimental setting are provided in the Appendix G.
178
+
179
+ We consider two types of AD-GCL, where one is with a fixed regularization weight $\lambda _ { \mathrm { { r e g } } } ~ = ~ 5$ (Eq.8), termed AD-GCL-FIX, and another is with $\lambda _ { \mathrm { r e g } }$ tuned over the validation set among $\{ 0 . 1 , 0 . 3 , 0 . 5 , 1 . 0 , 2 . 0 , 5 . 0 , 1 0 . 0 \}$ , termed AD-GCL-OPT. AD-GCL-FIX assumes any information from the downstream task as unavailable while AD-GCL-OPT assumes the augmentation search space has some weak information from the downstream task. A full range of analysis on how $\lambda _ { \mathrm { r e g } }$ impacts AD-GCL will be investigated in Sec. 5.2. We compare AD-GCL with three unsupervised/selfsupervised learning baselines for graph-level tasks, which include randomly initialized untrained GIN (RU-GIN) [72], InfoGraph [18] and GraphCL [24]. Previous works [18, 24] show that they generally outperform graph kernels [75–77] and network embedding methods [33, 34, 78, 79].
180
+
181
+ We also adopt GCL with GDA based on non-adversarial edge dropping (NAD-GCL) for ablation study. NAD-GCL drops the edges of a graph uniformly at random. We consider NAD-GCL-FIX and NAD-GCL-OPT with different edge drop ratios. NAD-GCL-GCL adopts the edge drop ratio of AD-GCL-FIX at the saddle point of the optimization (Eq.8) while NAD-GCL-OPT optimally tunes the edge drop ratio over the validation datasets to match AD-GCL-OPT. We also adopt fully supervised GIN (F-GIN) to provide an anchor of the performance. We stress that all methods adopt GIN [72] as the encoder. Except F-GIN, all methods adopt a downstream linear classifier or regressor with the same hyper-parameters for fair comparison. Adopting linear models was suggested by [40], which explicitly attributes any performance gain/drop to the quality of learnt representations.
182
+
183
+ <table><tr><td></td><td>Dataset</td><td>NCI1</td><td>PROTEINS</td><td>MUTAG</td><td>DD</td><td>COLLAB</td><td>RDT-B</td><td>RDT-M5K</td><td>IMDB-B</td><td>IMDB-M</td></tr><tr><td></td><td>F-GIN</td><td>78.27±1.35</td><td>72.39 ± 2.76</td><td>90.41 ± 4.61</td><td>74.87 ±3.56</td><td>74.82 ±0.92</td><td>86.79 ± 2.04</td><td>53.28 ± 3.17</td><td>71.83 ± 1.93</td><td>48.46 ± 2.31</td></tr><tr><td></td><td>RU-GIN [72]</td><td>62.98 ±0.10</td><td>69.03±0.33</td><td>87.61 ±0.39</td><td>74.22 ±0.30</td><td>63.08±0.10</td><td>58.97 ±0.13</td><td>27.52 ± 0.61</td><td>51.86±0.33</td><td>32.81 ±0.57</td></tr><tr><td>peraeer</td><td>InfoGraph [18]</td><td>68.13± 0.59</td><td>72.57 ± 0.65</td><td>87.71 ± 1.77</td><td>75.23 ±0.39</td><td>70.35± 0.64</td><td>78.79 ± 2.14</td><td>51.11 ± 0.55</td><td>71.11 ± 0.88</td><td>48.66 ± 0.67</td></tr><tr><td></td><td>GraphCL [24]</td><td>68.54± 0.55</td><td>72.86 ± 1.01</td><td>88.29 ± 1.31</td><td>74.70± 0.70</td><td>71.26 ± 0.55</td><td>82.63 ± 0.99</td><td>53.05 ±0.40</td><td>70.80± 0.77</td><td>48.49 ± 0.63</td></tr><tr><td></td><td>NAD-GCL-FIX</td><td>69.23±0.60</td><td>72.81 ± 0.71</td><td>88.58 ± 1.58</td><td>74.55±0.55</td><td>71.56 ±0.58</td><td>83.41 ±0.66</td><td>52.72 ± 0.71</td><td>70.94 ± 0.77</td><td>48.33± 0.47</td></tr><tr><td></td><td>NAD-GCL-OPT</td><td>69.30± 0.32</td><td>73.18 ± 0.71</td><td>89.05 ± 1.06</td><td>74.55 ±0.55</td><td>72.04 ± 0.67</td><td>83.74±0.76</td><td>53.43± 0.26</td><td>71.94 ± 0.59</td><td>49.01 ± 0.93</td></tr><tr><td></td><td>AD-GCL-FIX</td><td>69.67 ± 0.51*</td><td>73.59± 0.65</td><td>89.25 ± 1.45</td><td>74.49 ±0.52</td><td>73.32 ± 0.61*</td><td>85.52 ±0.79*</td><td>53.00±0.82</td><td>71.57 ± 1.01</td><td>49.04 ±0.53</td></tr><tr><td></td><td>AD-GCL-OPT</td><td>69.67± 0.51*</td><td>73.81 ± 0.46*</td><td>89.70 ± 1.03</td><td>75.10 ± 0.39</td><td>73.32 ± 0.61*</td><td>85.52 ± 0.79*</td><td>54.93 ± 0.43*</td><td>72.33 ± 0.56*</td><td>49.89 ± 0.66*</td></tr><tr><td colspan="11">Regression (Downstream Classifier - Linear Regression + L2)</td></tr><tr><td></td><td>Task Dataset</td><td>molesol</td><td>mollipo</td><td>molfreesolv</td><td>ZINC-10K</td><td>molbace</td><td>molbbbp</td><td>Classification (Downstream Classifier - Logistic Regression + L2) molclintox</td><td>moltox21</td><td>molsider</td></tr><tr><td></td><td>Metric</td><td></td><td>RMSE (shared) (↓)</td><td></td><td>MAE(↓)</td><td></td><td></td><td>ROC-AUC % (shared) (↑)</td><td></td><td></td></tr><tr><td></td><td>F-GIN</td><td>1.173 ± 0.057</td><td>0.757 ± 0.018</td><td>2.755 ± 0.349</td><td>0.254± 0.005</td><td>72.97± 4.00</td><td>68.17 ± 1.48</td><td>88.14 ± 2.51</td><td>74.91 ± 0.51</td><td>57.60 ± 1.40</td></tr><tr><td></td><td></td><td></td><td>1.075±0.022</td><td>7.526 ± 2.119</td><td>0.809±0.022</td><td>75.07± 2.23</td><td>64.48 ± 2.46</td><td>72.29 ± 4.15</td><td>71.53± 0.74</td><td>62.29 ± 1.12</td></tr><tr><td>Besgereg</td><td>RU-GIN [72] InfoGraph [18]</td><td>1.706 ± 0.180</td><td>1.005 ± 0.023</td><td>10.005 ± 4.819</td><td>0.890 ± 0.017</td><td>74.74 ± 3.64</td><td>66.33 ± 2.79</td><td>64.50± 5.32</td><td>69.74 ± 0.57</td><td>60.54 ± 0.90</td></tr><tr><td></td><td>GraphCL [24]</td><td>1.344 ± 0.178 1.272 ± 0.089</td><td>0.910 ± 0.016</td><td>7.679 ± 2.748</td><td>0.627 ± 0.013</td><td>74.32± 2.70</td><td>68.22 ± 1.89</td><td>74.92 ± 4.42</td><td>72.40 ± 1.01</td><td>61.76 ± 1.11</td></tr><tr><td></td><td>NAD-GCL-FIX</td><td>1.392 ± 0.065</td><td>0.952 ± 0.024</td><td>5.840 ±0.877</td><td>0.609 ±0.010</td><td>73.60±2.73</td><td>66.12 ± 1.80</td><td>73.32 ±3.66</td><td>71.65 ± 0.94</td><td>60.41 ± 1.48</td></tr><tr><td>8</td><td>NAD-GCL-OPT</td><td>1.242 ± 0.096</td><td>0.897 ± 0.022</td><td>5.840 ±0.877</td><td>0.609 ± 0.010</td><td>73.69 ± 3.67</td><td>67.70 ± 1.78</td><td>74.40 ± 4.92</td><td>71.65 ± 0.94</td><td>61.14 ± 1.43</td></tr><tr><td></td><td>AD-GCL-FIX</td><td>1.217 ±0.087</td><td>0.842±0.028*</td><td>5.150±0.624*</td><td>0.578±0.012*</td><td>76.37±2.03</td><td>68.24 ± 1.47</td><td>80.77 ± 3.92</td><td>71.42±0.73</td><td></td></tr><tr><td></td><td>AD-GCL-OPT</td><td>1.136 ± 0.050*</td><td>0.812 ± 0.020*</td><td>4.145 ± 0.369*</td><td>0.544± 0.004*</td><td>77.27 ± 2.56</td><td>69.54 ± 1.92</td><td>80.77 ± 3.92</td><td>72.92 ± 0.86</td><td>63.19 ±0.95 63.19 ± 0.95</td></tr></table>
184
+
185
+ Table 1: Unsupervised learning performance for (TOP) biochemical and social network classification in TU datasets [73] (Averaged accuracy $\pm$ std. over 10 runs) and (BOTTOM) chemical molecules property prediction in OGB datasets [52] (mean $\pm$ std. over 10 runs). $\mathbf { B o l d / B o l d ^ { \star } }$ indicats our methods outperform baselines with $\geq 0 . 5 / \geq 2$ std respectively. Fully supervised (F-GIN) results are shown only for placing GRL methods in perspective. Ablation-study (AB-S) results do not count as baselines.
186
+
187
+ Tables 1 show the results for unsupervised graph level property prediction in social and chemical domains respectively. We witness the big performance gain of AD-GCL as opposed to all baselines across all the datasets. Note GraphCL utilizes extensive evaluation to select the best combination of augmentions over a broad GDA family including node-dropping, edge dropping and subgraph sampling. Our results indicate that such extensive evaluation may not be necessary while optimizing the augmentation strategy in an adversarial way is greatly beneficial.
188
+
189
+ We stress that edge dropping is not cherry picked as the search space of augmentation strategies. Other search spaces may even achieve better performance, while an extensive investigation is left for the future work.
190
+
191
+ Moreover, AD-GCL also clearly improves upon the performance against its non-adversarial counterparts (NAD-GCL) across all the datasets, which further demonstrates stable and significant advantages of the AD-GCL principle. Essentially, the input-graph-dependent augmentation learnt by AD-GCL yields much benefit. Finally, we compare AD-GCL-FIX with AD-GCL-OPT. Interestingly, two methods achieve comparable results though AD-GCL-OPT is sometimes better. This observation implies that the AD-GCL principle may be robust to the choice of $\lambda _ { \mathrm { r e g } }$ and thus motivates the analysis in the next subsection. Moreover, weak information from the downstream tasks indeed help with controlling the search space and further betters the performance. We also list the optimal $\lambda _ { \mathrm { r e g } }$ ’s of AD-GCL-OPT for different datasets in Appendix F.1 for the purpose of comparison and reproduction.
192
+
193
+ # 5.1.1 Note on the linear downstream classifier
194
+
195
+ We find that the choice of the downstream classifier can significantly affect the evaluation of the self-supervised representations. InfoGraph [18] and GraphCL [24] adopt a non-linear SVM model as the downstream classifier. Such a non-linear model is more powerful than the linear model we adopt and thus causes some performance gap between the results showed in Table 1 (TOP) and (BOTTOM) and their original results (listed in Appendix G.2.1 as Table 8). We argue that using a non-linear SVM model as the downstream classifier is unfair, because the performance of even a randomly initialized untrained GIN (RU-GIN) is significantly improved (comparing results from Table 1 (TOP) to Table 8 ). Therefore, we argue for adopting a linear classifier protocol as suggested by [40]. That having been said, our methods (both AD-GCL-FIX and AD-GCL-OPT) still performs significantly better than baselines in most cases, even when a non-linear SVM classifer is adopted, as shown in Table 8. Several relative gains are there no matter whether the downstream classifier is a simple linear model (Tables 1) or a non-linear SVM model (Table 8). AD-GCL methods significantly outperform InfoGraph in 5 over 8 datasets and GraphCL in 6 over 8 datasets. This further provides the evidence for the effectiveness of our method. Details on the practical benefits of linear downstream models can be found in Appendix G.2.1.
196
+
197
+ ![](images/e95f5581d389136c562488bb2359f3b760fe8a591248475f39986e8a7dd3c96e.jpg)
198
+ Figure 3: (a) $\lambda _ { \mathrm { { r e g } } } \nu . s .$ . expected edge drop ratio ${ \mathbb E } _ { \mathcal G } [ \sum _ { e } \omega _ { e } / | E | ]$ (measured at saddle point of Eq.8). (b) Training dynamics of expected drop ratio for $\lambda _ { \mathrm { r e g } }$ . (c) Validation performance for graph classification v.s. edge drop ratio. Compare AD-GCL and GCL with non-adversarial edge dropping. The markers on AD-GCL’s performance curves show the $\lambda _ { \mathrm { r e g } }$ used.
199
+
200
+ # 5.2 Analysis of Regularizing the GDA Model
201
+
202
+ Here, we study how different $\lambda _ { \mathrm { r e g } }$ ’s impact the expected edge drop ratio of AD-GCL at the saddle point of Eq.8 and further impact the model performance on the validation datasets. Due to the page limitation, we focus on classification tasks in the main text while leaving the discussion on regression tasks in the Appendix F.2. Figure 3 shows the results.
203
+
204
+ As shown in Figure 3(a), a large $\lambda _ { \mathrm { r e g } }$ tends to yield a small expected edge drop ratio at the convergent point, which matches our expectation. $\lambda _ { \mathrm { r e g } }$ ranging from 0.1 to 10.0 corresponds to dropping almost everything $80 \%$ edges) to nothing $- 1 0 \%$ edges). The validation performance in Figure 3(c) is out of our expectation. We find that for classification tasks, the performance of the encoder is extremely robust to different choices of $\lambda _ { \mathrm { r e g } }$ ’s when trained w.r.t. the AD-GCL principle, though the edge drop ratios at the saddle point are very different. However, the non-adversarial counterpart NAD-GCL is sensitive to different edge drop ratios, especially on the molecule dataset (e.g., ogbg-molclitox, ogbg-molbbbp). We actually observe the similar issue of NAD-GCL across all molecule datasets (See Appendix F.3). More interesting aspects of our results appear at the extreme cases. When $\lambda _ { \mathrm { r e g } } \geq 5 . 0$ the convergent edge drop ratio is close to 0, which means no edge dropping, but AD-GCL still significantly outperforms naive GCL with small edge drop ratio. When $\lambda _ { \mathrm { r e g } } = 0 . 3$ , the convergent edge drop ratio is greater than 0.6, which means dropping more than half of the edges, but AD-GCL still keeps reasonable performance. We suspect that such benefit comes from the training dynamics of AD-GCL (examples as shown in Figure 3(b)). Particularly, optimizing augmentations allows for non-uniform edge-dropping probability. During the optimization procedure, AD-GCL pushes high drop probability on redundant edges while low drop probability on critical edges, which allows the encoder to differentiate redundant and critical information. This cannot be fully explained by the final convergent edge drop ratio and motivates future investigation of AD-GCL from a more in-depth theoretical perspective.
205
+
206
+ # 5.3 Transfer Learning
207
+
208
+ Next, we evaluate the GNN encoders trained by AD-GCL on transfer learning to predict chemical molecule properties and biological protein functions. We follow the setting in [17] and use the same datasets: GNNs are pre-trained on one dataset using self-supervised learning and later fine-tuned on another dataset to test out-of-distribution performance. Here, we only consider AD-GCL-FIX as AD-GCL-OPT is only expected to have better performance. We adopt baselines including no pre-trained GIN (i.e., without self-supervised training on the first dataset and with only fine-tuning), InfoGraph [18], GraphCL [24], three different pre-train strategies in [17] including edge prediction,
209
+
210
+ <table><tr><td colspan="4">Pre-TrainDataset</td><td colspan="5">ZINC2M</td><td>PPI-306K</td></tr><tr><td>Fine-TuneDataset</td><td>BBBP</td><td>Tox21</td><td>SIDER</td><td>ClinTox</td><td>BACE</td><td>HIV</td><td>MUV</td><td>ToxCast</td><td>PPI</td></tr><tr><td>No Pre-Train</td><td>65.8± 4.5</td><td>74.0±0.8</td><td>57.3 ± 1.6</td><td>58.0±4.4</td><td>70.1 ± 5.4</td><td>75.3 ± 1.9</td><td>71.8± 2.5</td><td>63.4±0.6</td><td>64.8 ±1.0</td></tr><tr><td>EdgePred [17]</td><td>67.3 ± 2.4</td><td>76.0±0.6</td><td>60.4±0.7</td><td>64.1 ± 3.7</td><td>79.9± 0.9</td><td>76.3 ± 1.0</td><td>74.1 ± 2.1</td><td>64.1± 0.6</td><td>65.7 ± 1.3</td></tr><tr><td>AttrMasking [17]</td><td>64.3 ± 2.8</td><td>76.7 ±0.4</td><td>61.0 ±0.7</td><td>71.8 ± 4.1</td><td>79.3 ± 1.6</td><td>77.2 ± 1.1</td><td>74.7 ± 1.4</td><td>64.2 ± 0.5</td><td>65.2 ± 1.6</td></tr><tr><td>ContextPred [17]</td><td>68.0± 2.0</td><td>75.7 ±0.7</td><td>60.9 ±0.6</td><td>65.9±3.8</td><td>79.6 ± 1.2</td><td>77.3 ± 1.0</td><td>75.8 ± 1.7</td><td>63.9±0.6</td><td>64.4 ± 1.3</td></tr><tr><td>InfoGraph [18]</td><td>68.8±0.8</td><td>75.3± 0.5</td><td>58.4±0.8</td><td>69.9±3.0</td><td>75.9 ± 1.6</td><td>76.0±0.7</td><td>75.3 ± 2.5</td><td>62.7 ± 0.4</td><td>64.1 ± 1.5</td></tr><tr><td>GraphCL [24]</td><td>69.68 ± 0.67</td><td>73.87 ± 0.66</td><td>60.53 ±0.88</td><td>75.99 ± 2.65</td><td>75.38 ± 1.44</td><td>78.47 ± 1.22</td><td>69.8± 2.66</td><td>62.40 ±0.57</td><td>67.88 ± 0.85</td></tr><tr><td>AD-GCL-FIX</td><td>70.01 ±1.07</td><td>76.54 ± 0.82</td><td>63.28±0.79</td><td>79.78 ± 3.52</td><td>78.51 ±0.80</td><td>78.28 ± 0.97</td><td>72.30 ± 1.61</td><td>63.07±0.72</td><td>68.83 ± 1.26</td></tr><tr><td>Our Ranks</td><td>1</td><td>2</td><td>1</td><td>1</td><td>4</td><td>2</td><td>5</td><td>5</td><td>1</td></tr></table>
211
+
212
+ Table 2: Transfer learning performance for chemical molecules property prediction (mean ROC-AUC ± std. over 10 runs). Bold indicates our methods outperform baselines with $\geq 0 . 5$ std..
213
+
214
+ <table><tr><td>Dataset</td><td>NCI1</td><td>PROTEINS</td><td>DD</td><td>COLLAB</td><td>RDT-B</td><td>RDT-M5K</td></tr><tr><td>No Pre-Train</td><td>73.72 ± 0.24</td><td>70.40± 1.54</td><td>73.56± 0.41</td><td>73.71± 0.27</td><td>86.63± 0.27</td><td>51.33 ± 0.44</td></tr><tr><td>SS-GCN-A</td><td>73.59 ± 0.32</td><td>70.29 ±0.64</td><td>74.30± 0.81</td><td>74.19 ± 0.13</td><td>87.74 ± 0.39</td><td>52.01 ±0.20</td></tr><tr><td>GAE [20]</td><td>74.36± 0.24</td><td>70.51 ± 0.17</td><td>74.54± 0.68</td><td>75.09 ± 0.19</td><td>87.69 ± 0.40</td><td>53.58 ±0.13</td></tr><tr><td>InfoGraph [18]</td><td>74.86 ± 0.26</td><td>72.27 ± 0.40</td><td>75.78± 0.34</td><td>73.76 ± 0.29</td><td>88.66 ± 0.95</td><td>53.61 ± 0.31</td></tr><tr><td>GraphCL [24]</td><td>74.63 ± 0.25</td><td>74.17 ± 0.34</td><td>76.17 ± 1.37</td><td>74.23 ± 0.21</td><td>89.11 ± 0.19</td><td>52.55± 0.45</td></tr><tr><td>AD-GCL-FIX Our Ranks</td><td>75.18 ± 0.31 1</td><td>73.96± 0.47 2</td><td>77.91±0.73* 1</td><td>75.82± 0.26* 1</td><td>90.10±0.15* 1</td><td>53.49±0.28 3</td></tr></table>
215
+
216
+ Table 3: Semi-supervised learning performance with $10 \%$ labels on TU datasets [73] (10-Fold Accuracy $( \% ) \pm$ std over 5 runs). Bold/Bold⋆ indicate our methods outperform baselines with $\geq 0 . 5 \ \mathrm { s t d } / \geq 2$ std respectively.
217
+
218
+ node attribute masking and context prediction that utilize edge, node and subgraph context respectively.
219
+ More detailed setup is given in Appendix G.
220
+
221
+ According to Table 2, AD-GCL-FIX significantly outperforms baselines in 3 out of 9 datasets and achieves a mean rank of 2.4 across these 9 datasets which is better than all baselines. Note that although AD-GCL only achieves 5th on some datasets, AD-GCL still significantly outperforms InfoGraph [18] and GraphCL [24], both of which are strong GNN self-training baselines. In contrast to InfoGraph [18] and GraphCL [24], AD-GCL achieves some performance much closer to those baselines (EdgePred, AttrMasking and ContextPred) based on domain knowledge and extensive evaluation in [17]. This is rather significant as our method utilizes only edge dropping GDA, which again shows the effectiveness of the AD-GCL principle.
222
+
223
+ # 5.4 Semi-Supervised Learning
224
+
225
+ Lastly, we evaluate AD-GCL on semi-supervised learning for graph classification on the benchmark TU datasets [73]. We follow the setting in [24]: GNNs are pre-trained on one dataset using selfsupervised learning and later fine-tuned based on $10 \%$ label supervision on the same dataset. Again, we only consider AD-GCL-FIX and compare it with several baselines in [24]: 1) no pre-trained GCN, which is directly trained by the $10 \%$ labels from scratch, 2) SS-GCN-A, a baseline that introduces more labelled data by creating random augmentations and then gets trained from scratch, 3) a predictive method GAE [20] that utilizes adjacency reconstruction in the pre-training phase, and GCL methods, 4) InfoGraph [18] and 5) GraphCL [24]. Note that here we have to keep the encoder architecture same and thus AD-GCL-FIX adopts GCN as the encoder. Table 3 shows the results. AD-GCL-FIX significantly outperforms baselines in 3 out of 6 datasets and achieves a mean rank of 1.5 across these 6 datasets, which again demonstrates the strength of AD-GCL.
226
+
227
+ # 6 Conclusions
228
+
229
+ In this work we have developed a theoretically motivated, novel principle: AD-GCL that goes a step beyond the conventional InfoMax objective for self-supervised learning of GNNs. The optimal GNN encoders that are agnostic to the downstream tasks are the ones that capture the minimal sufficient information to identify each graph in the dataset. To achieve this goal, AD-GCL suggests to better graph contrastive learning via optimizing graph augmentations in an adversarial way. Following this principle, we developed a practical instantiation based on learnable edge dropping. We have extensively analyzed and demonstrated the benefits of AD-GCL and its instantiation with real-world datasets for graph property prediction in unsupervised, transfer and semi-supervised learning settings.
230
+
231
+ # Acknowledgments and Disclosure of Funding
232
+
233
+ We greatly thank the actionable suggestions given by reviewers and the area chair. S.S. and J.N. are supported by the National Science Foundation under contract numbers CCF-1918483 and IIS1618690. P.L. is partly supported by the 2021 JP Morgan Faculty Award and the National Science Foundation (NSF) award HDR-2117997.
234
+
235
+ # References
236
+
237
+ [1] A. W. Senior, R. Evans, J. Jumper, J. Kirkpatrick, L. Sifre, T. Green, C. Qin, A. Žídek, A. W. Nelson, A. Bridgland et al., “Improved protein structure prediction using potentials from deep learning,” Nature, vol. 577, no. 7792, pp. 706–710, 2020.
238
+ [2] J. Shlomi, P. Battaglia, and J.-R. Vlimant, “Graph neural networks in particle physics,” Machine Learning: Science and Technology, vol. 2, no. 2, p. 021001, 2020.
239
+ [3] W. L. Hamilton, “Graph representation learning,” Synthesis Lectures on Artificial Intelligence and Machine Learning, vol. 14, no. 3, pp. 1–159, 2020.
240
+ [4] K. Hornik, M. Stinchcombe, H. White et al., “Multilayer feedforward networks are universal approximators.” Neural Networks, vol. 2, no. 5, pp. 359–366, 1989.
241
+ [5] G. Cybenko, “Approximation by superpositions of a sigmoidal function,” Mathematics of control, signals and systems, vol. 2, no. 4, pp. 303–314, 1989.
242
+ [6] F. Scarselli, M. Gori, A. C. Tsoi, M. Hagenbuchner, and G. Monfardini, “The graph neural network model,” IEEE Transactions on Neural Networks, vol. 20, no. 1, pp. 61–80, 2008.
243
+ [7] I. Chami, S. Abu-El-Haija, B. Perozzi, C. Ré, and K. Murphy, “Machine learning on graphs: A model and comprehensive taxonomy,” arXiv preprint arXiv:2005.03675, 2020.
244
+ [8] Z. Zhang, P. Cui, and W. Zhu, “Deep learning on graphs: A survey,” IEEE TKDE, 2020.
245
+ [9] W. L. Hamilton, R. Ying, and J. Leskovec, “Representation learning on graphs: Methods and applications,” IEEE Data Engineering Bulletin, vol. 40, no. 3, pp. 52–74, 2017.
246
+ [10] T. N. Kipf and M. Welling, “Semi-supervised classification with graph convolutional networks,” in International Conference on Learning Representations, 2017.
247
+ [11] H. Dai, B. Dai, and L. Song, “Discriminative embeddings of latent variable models for structured data,” in International Conference on Machine Learning. PMLR, 2016, pp. 2702–2711.
248
+ [12] P. Velickovi ˇ c, G. Cucurull, A. Casanova, A. Romero, P. Liò, and Y. Bengio, “Graph attention ´ networks,” in International Conference on Learning Representations, 2018.
249
+ [13] M. Zhang, Z. Cui, M. Neumann, and Y. Chen, “An end-to-end deep learning architecture for graph classification,” in the AAAI Conference on Artificial Intelligence, 2018, pp. 4438–4445.
250
+ [14] K. Xu, W. Hu, J. Leskovec, and S. Jegelka, “How powerful are graph neural networks?” in International Conference on Learning Representations, 2019.
251
+ [15] C. Morris, M. Ritzert, M. Fey, W. L. Hamilton, J. E. Lenssen, G. Rattan, and M. Grohe, “Weisfeiler and leman go neural: Higher-order graph neural networks,” in the AAAI Conference on Artificial Intelligence, vol. 33, 2019, pp. 4602–4609.
252
+ [16] P. Li, Y. Wang, H. Wang, and J. Leskovec, “Distance encoding: Design provably more powerful neural networks for graph representation learning,” Advances in Neural Information Processing Systems, vol. 33, 2020.
253
+ [17] W. Hu, B. Liu, J. Gomes, M. Zitnik, P. Liang, V. Pande, and J. Leskovec, “Strategies for pre-training graph neural networks,” International Conference on Learning Representations, 2020.
254
+ [18] F.-Y. Sun, J. Hoffmann, and J. Tang, “Infograph: Unsupervised and semi-supervised graph-level representation learning via mutual information maximization,” arXiv preprint arXiv:1908.01000, 2019.
255
+ [19] H. G. Vogel, Drug discovery and evaluation: pharmacological assays. Springer Science & Business Media, 2002.
256
+ [20] T. N. Kipf and M. Welling, “Variational graph auto-encoders,” arXiv preprint arXiv:1611.07308, 2016.
257
+ [21] A. Grover, A. Zweig, and S. Ermon, “Graphite: Iterative generative modeling of graphs,” in International Conference on Machine Learning. PMLR, 2019, pp. 2434–2444.
258
+ [22] Z. Peng, W. Huang, M. Luo, Q. Zheng, Y. Rong, T. Xu, and J. Huang, “Graph representation learning via graphical mutual information maximization,” in Proceedings of The Web Conference 2020, 2020.
259
+ [23] P. Velickovi ˇ c, W. Fedus, W. L. Hamilton, P. Liò, Y. Bengio, and R. D. Hjelm, “Deep graph ´ infomax,” arXiv preprint arXiv:1809.10341, 2018.
260
+ [24] Y. You, T. Chen, Y. Sui, T. Chen, Z. Wang, and Y. Shen, “Graph contrastive learning with augmentations,” Advances in Neural Information Processing Systems, vol. 33, 2020.
261
+ [25] K. Hassani and A. H. Khasahmadi, “Contrastive multi-view representation learning on graphs,” in International Conference on Machine Learning. PMLR, 2020, pp. 4116–4126.
262
+ [26] Y. Xie, Z. Xu, Z. Wang, and S. Ji, “Self-supervised learning of graph neural networks: A unified review,” arXiv preprint arXiv:2102.10757, 2021.
263
+ [27] Y. Liu, S. Pan, M. Jin, C. Zhou, F. Xia, and P. S. Yu, “Graph self-supervised learning: A survey,” arXiv preprint arXiv:2103.00111, 2021.
264
+ [28] S. Zhang, Z. Hu, A. Subramonian, and Y. Sun, “Motif-driven contrastive learning of graph representations,” arXiv preprint arXiv:2012.12533, 2020.
265
+ [29] S. Thakoor, C. Tallec, M. G. Azar, R. Munos, P. Velickovi ˇ c, and M. Valko, “Bootstrapped ´ representation learning on graphs,” arXiv preprint arXiv:2102.06514, 2021.
266
+ [30] Y. Zhu, Y. Xu, F. Yu, Q. Liu, S. Wu, and L. Wang, “Graph contrastive learning with adaptive augmentation,” arXiv preprint arXiv:2010.14945, 2020.
267
+ [31] J. Qiu, Q. Chen, Y. Dong, J. Zhang, H. Yang, M. Ding, K. Wang, and J. Tang, “Gcc: Graph contrastive coding for graph neural network pre-training,” in Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, 2020, pp. 1150– 1160.
268
+ [32] M. Belkin and P. Niyogi, “Laplacian eigenmaps for dimensionality reduction and data representation,” Neural computation, vol. 15, no. 6, pp. 1373–1396, 2003.
269
+ [33] B. Perozzi, R. Al-Rfou, and S. Skiena, “Deepwalk: Online learning of social representations,” in Proceedings of the 20th ACM SIGKDD international conference on Knowledge discovery and data mining, 2014, pp. 701–710.
270
+ [34] A. Grover and J. Leskovec, “node2vec: Scalable feature learning for networks,” in the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2016, pp. 855–864.
271
+ [35] L. F. Ribeiro, P. H. Saverese, and D. R. Figueiredo, “struc2vec: Learning node representations from structural identity,” in the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2017, pp. 385–394.
272
+ [36] W. Hamilton, Z. Ying, and J. Leskovec, “Inductive representation learning on large graphs,” in Advances in Neural Information Processing Systems, 2017.
273
+ [37] K. Henderson, B. Gallagher, T. Eliassi-Rad, H. Tong, S. Basu, L. Akoglu, D. Koutra, C. Faloutsos, and L. Li, “Rolx: structural role extraction & mining in large graphs,” in the ACM SIGKDD international conference on Knowledge discovery and data mining, 2012, pp. 1231–1239.
274
+ [38] C. Donnat, M. Zitnik, D. Hallac, and J. Leskovec, “Learning structural node embeddings via diffusion wavelets,” in the ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, 2018, pp. 1320–1329.
275
+ [39] R. Linsker, “Self-organization in a perceptual network,” Computer, vol. 21, no. 3, pp. 105–117, 1988.
276
+ [40] M. Tschannen, J. Djolonga, P. K. Rubenstein, S. Gelly, and M. Lucic, “On mutual information maximization for representation learning,” in International Conference on Learning Representations, 2020.
277
+ [41] N. Tishby, F. C. Pereira, and W. Bialek, “The information bottleneck method,” arXiv preprint physics/0004057, 2000.
278
+ [42] N. Tishby and N. Zaslavsky, “Deep learning and the information bottleneck principle,” in 2015 IEEE Information Theory Workshop (ITW). IEEE, 2015.
279
+ [43] Z. Goldfeld and Y. Polyanskiy, “The information bottleneck problem and its applications in machine learning,” IEEE Journal on Selected Areas in Information Theory, 2020.
280
+ [44] A. A. Alemi, I. Fischer, J. V. Dillon, and K. Murphy, “Deep variational information bottleneck,” arXiv preprint arXiv:1612.00410, 2016.
281
+ [45] X. B. Peng, A. Kanazawa, S. Toyer, P. Abbeel, and S. Levine, “Variational discriminator bottleneck: Improving imitation learning, inverse rl, and gans by constraining information flow,” arXiv preprint arXiv:1810.00821, 2018.
282
+ [46] I. Higgins, L. Matthey, A. Pal, C. Burgess, X. Glorot, M. Botvinick, S. Mohamed, and A. Lerchner, “beta-vae: Learning basic visual concepts with a constrained variational framework.” in International Conference on Learning Representations, 2017.
283
+ [47] T. Wu, H. Ren, P. Li, and J. Leskovec, “Graph information bottleneck,” in Advances in Neural Information Processing Systems, 2020.
284
+ [48] J. Yu, T. Xu, Y. Rong, Y. Bian, J. Huang, and R. He, “Recognizing predictive substructures with subgraph information bottleneck,” International Conference on Learning Representations, 2021.
285
+ [49] J. Gilmer, S. S. Schoenholz, P. F. Riley, O. Vinyals, and G. E. Dahl, “Neural message passing for quantum chemistry,” in International Conference on Machine Learning. JMLR. org, 2017.
286
+ [50] T. M. Cover and J. A. Thomas, Elements of Information Theory. John Wiley & Sons, 2012.
287
+ [51] B. Weisfeiler and A. Leman, “A reduction of a graph to a canonical form and an algebra arising during this reduction,” Nauchno-Technicheskaya Informatsia, 1968.
288
+ [52] W. Hu, M. Fey, M. Zitnik, Y. Dong, H. Ren, B. Liu, M. Catasta, and J. Leskovec, “Open graph benchmark: Datasets for machine learning on graphs,” arXiv preprint arXiv:2005.00687, 2020.
289
+ [53] D. Duvenaud, D. Maclaurin, J. Aguilera-Iparraguirre, R. Gómez-Bombarelli, T. Hirzel, A. Aspuru-Guzik, and R. P. Adams, “Convolutional networks on graphs for learning molecular fingerprints,” Advances in Neural Information Processing Systems, vol. 2015, pp. 2224–2232, 2015.
290
+ [54] E. N. Gilbert, “Random graphs,” The Annals of Mathematical Statistics, vol. 30, no. 4, pp. 1141–1144, 1959.
291
+ [55] P. Erdos and A. Rényi, “On random graphs i.” ˝ Publ. Math. Debrecen, vol. 6, pp. 290–297, 1959.
292
+ [56] C. J. Maddison, A. Mnih, and Y. W. Teh, “The concrete distribution: A continuous relaxation of discrete random variables,” in International Conference on Learning Representations, 2017.
293
+ [57] E. Jang, S. Gu, and B. Poole, “Categorical reparameterization with gumbel-softmax,” in International Conference on Learning Representations, 2017.
294
+ [58] D. Luo, W. Cheng, D. Xu, W. Yu, B. Zong, H. Chen, and X. Zhang, “Parameterized explainer for graph neural network,” Advances in Neural Information Processing Systems, vol. 33, 2020.
295
+ [59] A. v. d. Oord, Y. Li, and O. Vinyals, “Representation learning with contrastive predictive coding,” arXiv preprint arXiv:1807.03748, 2018.
296
+ [60] Y. Tian, D. Krishnan, and P. Isola, “Contrastive multiview coding,” arXiv preprint arXiv:1906.05849, 2019.
297
+ [61] B. Poole, S. Ozair, A. Van Den Oord, A. Alemi, and G. Tucker, “On variational bounds of mutual information,” in International Conference on Machine Learning, 2019.
298
+ [62] T. Chen, S. Kornblith, M. Norouzi, and G. Hinton, “A simple framework for contrastive learning of visual representations,” in International Conference on Machine Learning. PMLR, 2020, pp. 1597–1607.
299
+ [63] S. Becker and G. E. Hinton, “Self-organizing neural network that discovers surfaces in randomdot stereograms,” Nature, vol. 355, no. 6356, pp. 161–163, 1992.
300
+ [64] O. Henaff, “Data-efficient image recognition with contrastive predictive coding,” in International Conference on Machine Learning. PMLR, 2020, pp. 4182–4192.
301
+ [65] R. D. Hjelm, A. Fedorov, S. Lavoie-Marchildon, K. Grewal, P. Bachman, A. Trischler, and Y. Bengio, “Learning deep representations by mutual information estimation and maximization,” in International Conference on Learning Representations, 2019.
302
+ [66] T. Chen, S. Kornblith, K. Swersky, M. Norouzi, and G. Hinton, “Big self-supervised models are strong semi-supervised learners,” arXiv preprint arXiv:2006.10029, 2020.
303
+ [67] P. Velickovi ˇ c, W. Fedus, W. L. Hamilton, P. Liò, Y. Bengio, and R. D. Hjelm, “Deep graph ´ infomax,” arXiv preprint arXiv:1809.10341, 2018.
304
+ [68] Z. Peng, W. Huang, M. Luo, Q. Zheng, Y. Rong, T. Xu, and J. Huang, “Graph representation learning via graphical mutual information maximization,” in Proceedings of The Web Conference 2020, 2020, pp. 259–270.
305
+ [69] Y. Jiao, Y. Xiong, J. Zhang, Y. Zhang, T. Zhang, and Y. Zhu, “Sub-graph contrast for scalable self-supervised graph representation learning,” arXiv preprint arXiv:2009.10273, 2020.
306
+ [70] Y. You, T. Chen, Y. Shen, and Z. Wang, “Graph contrastive learning automated,” arXiv preprint arXiv:2106.07594, 2021.
307
+ [71] Y. Tian, C. Sun, B. Poole, D. Krishnan, C. Schmid, and P. Isola, “What makes for good views for contrastive learning?” in Advances in Neural Information Processing Systems, 2020.
308
+ [72] K. Xu, W. Hu, J. Leskovec, and S. Jegelka, “How powerful are graph neural networks?” in International Conference on Learning Representations, 2019.
309
+ [73] C. Morris, N. M. Kriege, F. Bause, K. Kersting, P. Mutzel, and M. Neumann, “Tudataset: A collection of benchmark datasets for learning with graphs,” in ICML 2020 Workshop on Graph Representation Learning and Beyond ( $G R L +$ 2020), 2020. [Online]. Available: www.graphlearning.io
310
+ [74] V. P. Dwivedi, C. K. Joshi, T. Laurent, Y. Bengio, and X. Bresson, “Benchmarking graph neural networks,” arXiv preprint arXiv:2003.00982, 2020.
311
+ [75] N. M. Kriege, F. D. Johansson, and C. Morris, “A survey on graph kernels,” Applied Network Science, vol. 5, no. 1, pp. 1–42, 2020.
312
+ [76] P. Yanardag and S. Vishwanathan, “Deep graph kernels,” in Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. ACM, 2015, pp. 1365–1374.
313
+ [77] N. Shervashidze, P. Schweitzer, E. J. v. Leeuwen, K. Mehlhorn, and K. M. Borgwardt, “Weisfeiler-lehman graph kernels,” Journal of Machine Learning Research, vol. 12, no. Sep, pp. 2539–2561, 2011.
314
+ [78] A. Narayanan, M. Chandramohan, R. Venkatesan, L. Chen, Y. Liu, and S. Jaiswal, “graph2vec: Learning distributed representations of graphs,” arXiv preprint arXiv:1707.05005, 2017.
315
+ [79] B. Adhikari, Y. Zhang, N. Ramakrishnan, and B. A. Prakash, “Sub2vec: Feature learning for subgraphs,” in Pacific-Asia Conference on Knowledge Discovery and Data Mining. Springer, 2018, pp. 170–182.
316
+ [80] T. M. Cover, Elements of information theory. John Wiley & Sons, 1999.
317
+ [81] L. Babai, “Groups, graphs, algorithms: The graph isomorphism problem,” in Proc. ICM, vol. 3. World Scientific, 2018, pp. 3303–3320.
318
+ [82] H. A. Helfgott, J. Bajpai, and D. Dona, “Graph isomorphisms in quasi-polynomial time,” arXiv preprint arXiv:1710.04574, 2017.
319
+ [83] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay, “Scikit-learn: Machine learning in Python,” Journal of Machine Learning Research, vol. 12, pp. 2825–2830, 2011.
320
+ [84] C. Zhu, R. H. Byrd, P. Lu, and J. Nocedal, “Algorithm 778: L-bfgs-b: Fortran subroutines for large-scale bound-constrained optimization,” ACM Transactions on Mathematical Software (TOMS), vol. 23, no. 4, pp. 550–560, 1997.
321
+ [85] R.-E. Fan, K.-W. Chang, C.-J. Hsieh, X.-R. Wang, and C.-J. Lin, “Liblinear: A library for large linear classification,” Journal of Machine Learning Research, vol. 9, pp. 1871–1874, 2008.
parse/train/ioyq7NsR1KJ/ioyq7NsR1KJ_content_list.json ADDED
@@ -0,0 +1,1327 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Adversarial Graph Augmentation to Improve Graph Contrastive Learning ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 225,
8
+ 122,
9
+ 774,
10
+ 172
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Susheel Suresh Purdue University suresh43@purdue.edu ",
17
+ "bbox": [
18
+ 210,
19
+ 227,
20
+ 375,
21
+ 267
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Pan Li∗ Purdue University panli@purdue.edu ",
28
+ "bbox": [
29
+ 421,
30
+ 226,
31
+ 560,
32
+ 267
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Cong Hao Georgia Tech callie.hao@gatech.edu ",
39
+ "bbox": [
40
+ 604,
41
+ 226,
42
+ 785,
43
+ 268
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "Jennifer Neville Purdue University and Microsoft Research jenneville@microsoft.com ",
50
+ "bbox": [
51
+ 359,
52
+ 289,
53
+ 638,
54
+ 330
55
+ ],
56
+ "page_idx": 0
57
+ },
58
+ {
59
+ "type": "text",
60
+ "text": "Abstract ",
61
+ "text_level": 1,
62
+ "bbox": [
63
+ 462,
64
+ 349,
65
+ 535,
66
+ 364
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "Self-supervised learning of graph neural networks (GNN) is in great need because of the widespread label scarcity issue in real-world graph/network data. Graph contrastive learning (GCL), by training GNNs to maximize the correspondence between the representations of the same graph in its different augmented forms, may yield robust and transferable GNNs even without using labels. However, GNNs trained by traditional GCL often risk capturing redundant graph features and thus may be brittle and provide sub-par performance in downstream tasks. Here, we propose a novel principle, termed adversarial-GCL (AD-GCL), which enables GNNs to avoid capturing redundant information during the training by optimizing adversarial graph augmentation strategies used in GCL. We pair AD-GCL with theoretical explanations and design a practical instantiation based on trainable edge-dropping graph augmentation. We experimentally validate AD-GCL2 by comparing with the state-of-the-art GCL methods and achieve performance gains of up-to $14 \\%$ in unsupervised, $6 \\%$ in transfer, and $3 \\%$ in semi-supervised learning settings overall with 18 different benchmark datasets for the tasks of molecule property regression and classification, and social network classification. ",
73
+ "bbox": [
74
+ 233,
75
+ 372,
76
+ 766,
77
+ 593
78
+ ],
79
+ "page_idx": 0
80
+ },
81
+ {
82
+ "type": "text",
83
+ "text": "1 Introduction ",
84
+ "text_level": 1,
85
+ "bbox": [
86
+ 174,
87
+ 613,
88
+ 310,
89
+ 630
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Graph representation learning (GRL) aims to encode graph-structured data into low-dimensional vector representations, which has recently shown great potential in many applications in biochemistry, physics and social science [1–3]. Graph neural networks (GNNs), inheriting the power of neural networks [4, 5], have become the almost de facto encoders for GRL [6–9]. GNNs have been mostly studied in cases with supervised end-to-end training [10–16], where a large number of task-specific labels are needed. However, in many applications, annotating labels of graph data takes a lot of time and resources [17, 18], e.g., identifying pharmacological effect of drug molecule graphs requires living animal experiments [19]. Therefore, recent research efforts are directed towards studying self-supervised learning for GNNs, where only limited or even no labels are needed [18, 20–31]. ",
96
+ "bbox": [
97
+ 174,
98
+ 637,
99
+ 825,
100
+ 762
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Designing proper self-supervised-learning principles for GNNs is crucial, as they drive what information of graph-structured data will be captured by GNNs and may heavily impact their performance in downstream tasks. Many previous works adopt the edge-reconstruction principle to match traditional network-embedding requirement [32–35], where the edges of the input graph are expected to be reconstructed based on the output of GNNs [20, 21, 36]. Experiments showed that these GNN models learn to over-emphasize node proximity [23] and may lose subtle but crucial structural information, thus failing in many tasks including node-role classification [16, 35, 37, 38] and graph classification [17]. ",
107
+ "bbox": [
108
+ 174,
109
+ 768,
110
+ 825,
111
+ 866
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "image",
117
+ "img_path": "images/6d694aef4bf6a33ce4c69cf2021f535607c422a87dd7b0d950b7eb4d6dcd6b3a.jpg",
118
+ "image_caption": [
119
+ "Figure 1: The AD-GCL principle and its instantiation based on learnable edge-dropping augmentation. ADGCL contains two components for graph data encoding and graph data augmentation. The GNN encoder $f ( \\cdot )$ maximizes the mutual information between the original graph $G$ and the augmented graph $t ( G )$ while the GNN augmenter optimizes the augmentation $T ( \\cdot )$ to remove the information from the original graph. The instantiation of AD-GCL proposed in this work uses edge dropping: An edge $e$ of $G$ is randomly dropped according to Bernoulli $\\left( \\omega _ { e } \\right)$ , where $\\omega _ { e }$ is parameterized by the GNN augmenter. "
120
+ ],
121
+ "image_footnote": [],
122
+ "bbox": [
123
+ 173,
124
+ 89,
125
+ 823,
126
+ 241
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "To avoid the above issue, graph contrastive learning (GCL) has attracted more attention recently [18, 22, 23, 25–31]. GCL leverages the mutual information maximization principle (InfoMax) [39] that aims to maximize the correspondence between the representations of a graph (or a node) in its different augmented forms [18, 24, 25, 28–31]. Perfect correspondence indicates that a representation precisely identifies its corresponding graph (or node) and thus the encoding procedure does not decrease the mutual information between them. ",
133
+ "bbox": [
134
+ 174,
135
+ 345,
136
+ 825,
137
+ 429
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "However, researchers have found that the InfoMax principle may be risky because it may push encoders to capture redundant information that is irrelevant to the downstream tasks: Redundant information suffices to identify each graph to achieve InfoMax, but encoding it yields brittle representations and may severely deteriorate the performance of the encoder in the downstream tasks [40]. This observation reminds us of another principle, termed information bottleneck (IB) [41–46]. As opposed to InfoMax, IB asks the encoder to capture the minimal sufficient information for the downstream tasks. Specifically, IB minimizes the information from the original data while maximizing the information that is relevant to the downstream tasks. As the redundant information gets removed, the encoder learnt by IB tends to be more robust and transferable. Recently, IB has been applied to GNNs [47, 48]. But IB needs the knowledge of the downstream tasks that may not be available. ",
144
+ "bbox": [
145
+ 174,
146
+ 435,
147
+ 825,
148
+ 574
149
+ ],
150
+ "page_idx": 1
151
+ },
152
+ {
153
+ "type": "text",
154
+ "text": "Hence, a natural question emerges: When the knowledge of downstream tasks are unavailable, how to train GNNs that may remove redundant information? Previous works highlight some solutions by designing data augmentation strategies for GCL but those strategies are typically task-related and sub-optimal. They either leverage domain knowledge [25, 28, 30], e.g., node centralities in network science or molecule motifs in bio-chemistry, or depend on extensive evaluation on the downstream tasks, where the best strategy is selected based on validation performance [24, 30]. ",
155
+ "bbox": [
156
+ 174,
157
+ 580,
158
+ 825,
159
+ 662
160
+ ],
161
+ "page_idx": 1
162
+ },
163
+ {
164
+ "type": "text",
165
+ "text": "In this paper, we approach this question by proposing a novel principle that pairs GCL with adversarial training, termed AD-GCL, as shown in Fig.1. We particularly focus on training self-supervised GNNs for graph-level tasks, though the idea may be generalized for node-level tasks. AD-GCL consists of two components: The first component contains a GNN encoder, which adopts InfoMax to maximize the correspondence/mutual information between the representations of the original graph and its augmented graphs. The second component contains a GNN-based augmenter, which aims to optimize the augmentation strategy to decrease redundant information from the original graph as much as possible. AD-GCL essentially allows the encoder capturing the minimal sufficient information to distinguish graphs in the dataset. We further provide theoretical explanations of AD-GCL. We show that with certain regularization on the search space of the augmenter, AD-GCL can yield a lower bound guarantee of the information related to the downstream tasks, while simultaneously holding an upper bound guarantee of the redundant information from the original graphs, which matches the aim of the IB principle. We further give an instantiation of AD-GCL: The GNN augmenter adopts a task-agnostic augmentation strategy and will learn an input-graph-dependent non-uniform-edge-drop probability to perform graph augmentation. ",
166
+ "bbox": [
167
+ 174,
168
+ 670,
169
+ 825,
170
+ 876
171
+ ],
172
+ "page_idx": 1
173
+ },
174
+ {
175
+ "type": "text",
176
+ "text": "Finally, we extensively evaluate AD-GCL on 18 different benchmark datasets for molecule property classification and regression, and social network classification tasks in different setting viz. unsupervised learning (Sec. 5.1), transfer learning (Sec. 5.3) and semi-supervised learning (Sec. 5.4) learning. AD-GCL achieves significant performance gains in relative improvement and high mean ranks over the datasets compared to state-of-the-art baselines. We also study the theoretical aspects of AD-GCL with apt experiments and analyze the results to offer fresh perspectives (Sec. 5.2): Interestingly, we observe that AD-GCL outperforms traditional GCL based on non-optimizable augmentation across almost the entire range of perturbation levels. ",
177
+ "bbox": [
178
+ 174,
179
+ 883,
180
+ 821,
181
+ 911
182
+ ],
183
+ "page_idx": 1
184
+ },
185
+ {
186
+ "type": "text",
187
+ "text": "",
188
+ "bbox": [
189
+ 173,
190
+ 90,
191
+ 825,
192
+ 175
193
+ ],
194
+ "page_idx": 2
195
+ },
196
+ {
197
+ "type": "text",
198
+ "text": "2 Notations and Preliminaries ",
199
+ "text_level": 1,
200
+ "bbox": [
201
+ 176,
202
+ 183,
203
+ 441,
204
+ 200
205
+ ],
206
+ "page_idx": 2
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "We first introduce some preliminary concepts and notations for further exposition. In this work, we consider attributed graphs $G = ( V , E )$ where $V$ is a node set and $E$ is an edge set. $G$ may have node attributes $\\{ X _ { v } \\in \\mathbb { R } ^ { \\breve { F } } \\mid ^ { \\cdot } v \\in V \\}$ and edge attributes $\\{ X _ { e } \\in \\mathbb { R } ^ { F } \\mid e \\in E \\}$ of dimension $F$ . We denote the set of the neighbors of a node $v$ as $\\mathcal { N } _ { v }$ . ",
211
+ "bbox": [
212
+ 174,
213
+ 207,
214
+ 825,
215
+ 262
216
+ ],
217
+ "page_idx": 2
218
+ },
219
+ {
220
+ "type": "text",
221
+ "text": "Learning Graph Representations. Given a set of graphs $G _ { i }$ , $i = 1 , 2 , . . . , n$ , in some universe $\\mathcal { G }$ , the aim is to learn an encoder $f : \\mathcal { G } \\mathbb { R } ^ { d }$ , where $f ( G _ { i } )$ can be further used in some downstream task. We also assume that $G _ { i }$ ’s are all IID sampled from an unknown distribution $\\mathbb { P } _ { \\mathcal { G } }$ defined over $\\mathcal { G }$ . In a downstream task, each $G _ { i }$ is associated with a label $y _ { i } \\in \\mathcal { V }$ . Another model $q : \\mathbb { R } ^ { d } \\mathcal { V }$ will be learnt to predict $Y _ { i }$ based on $q ( f ( G _ { i } ) )$ . We assume $( G _ { i } , Y _ { i } )$ ’s are IID sampled from a distribution $\\mathbb { P } _ { \\mathcal { G } \\times \\mathcal { y } } = \\mathbb { P } _ { \\mathcal { y } | \\mathcal { G } } \\mathbb { P } _ { \\mathcal { G } }$ , where $\\mathbb { P } _ { \\mathcal { V } | \\mathcal { G } }$ is the conditional distribution of the graph label in the downstream task given the graph. ",
222
+ "bbox": [
223
+ 173,
224
+ 268,
225
+ 826,
226
+ 368
227
+ ],
228
+ "page_idx": 2
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "Graph Neural Networks (GNNs). In this work, we focus on using GNNs, message passing GNNs in particular [49], as the encoder $f$ . For a graph $G = ( V , E )$ , every node $v \\in V$ will be paired with a node representation $h _ { v }$ initialized as $h _ { v } ^ { ( 0 ) } = X _ { v }$ . These representations will be updated by a GNN. During the $k ^ { \\mathrm { { t h } } }$ iteration, each $h _ { v } ^ { ( k - 1 ) }$ is updated using $v ^ { \\prime } \\mathrm { s }$ neighbourhood information expressed as, ",
233
+ "bbox": [
234
+ 174,
235
+ 381,
236
+ 825,
237
+ 445
238
+ ],
239
+ "page_idx": 2
240
+ },
241
+ {
242
+ "type": "equation",
243
+ "img_path": "images/d18a2c5ce3fe5c758a68ba8353c48bd43a199f7139a222782d8fa24376bb25ae.jpg",
244
+ "text": "$$\nh _ { v } ^ { ( k ) } = \\mathrm { U P D A T E } ^ { ( k ) } \\Bigg ( h _ { v } ^ { ( k - 1 ) } , \\mathrm { A G G R E G A T E } ^ { ( k ) } \\Big ( \\big \\{ ( h _ { u } ^ { ( k - 1 ) } , X _ { u v } ) \\mid u \\in \\mathcal { N } _ { v } \\big \\} \\Big ) \\Bigg )\n$$",
245
+ "text_format": "latex",
246
+ "bbox": [
247
+ 258,
248
+ 446,
249
+ 740,
250
+ 484
251
+ ],
252
+ "page_idx": 2
253
+ },
254
+ {
255
+ "type": "text",
256
+ "text": "where AGGREGATE $( \\cdot )$ is a trainable function that maps the set of node representations and edge attributes $X _ { u v }$ to an aggregated vector, $\\mathrm { U P D A T E } ( \\cdot )$ is another trainable function that maps both $v$ ’s current representation and the aggregated vector to $v$ ’s updated representation. After $K$ iterations of Eq. 1, the graph representation is obtained by pooling the final set of node representations as, ",
257
+ "bbox": [
258
+ 173,
259
+ 486,
260
+ 825,
261
+ 542
262
+ ],
263
+ "page_idx": 2
264
+ },
265
+ {
266
+ "type": "equation",
267
+ "img_path": "images/f58f13405a67dd1b4bc45c1d6ff7f5f86b8efdb724cb72c57c4b0ced542a4015.jpg",
268
+ "text": "$$\nf ( G ) : \\triangleq h _ { G } = \\mathrm { P O O L } \\big ( \\{ h _ { v } ^ { ( K ) } \\mid v \\in V \\} \\big )\n$$",
269
+ "text_format": "latex",
270
+ "bbox": [
271
+ 364,
272
+ 547,
273
+ 632,
274
+ 568
275
+ ],
276
+ "page_idx": 2
277
+ },
278
+ {
279
+ "type": "text",
280
+ "text": "For design choices regarding aggregation, update and pooling functions we refer the reader to [3, 7, 8]. ",
281
+ "bbox": [
282
+ 169,
283
+ 573,
284
+ 823,
285
+ 588
286
+ ],
287
+ "page_idx": 2
288
+ },
289
+ {
290
+ "type": "text",
291
+ "text": "The Mutual Information Maximization Principle. GCL is built upon the InfoMax principle [39], which prescribes to learn an encoder $f$ that maximizes the mutual information or the correspondence between the graph and its representation. The rationale behind GCL is that a graph representation $f ( G )$ should capture the features of the graph $G$ so that representation can distinguish this graph from other graphs. Specifically, the objective of GCL follows ",
292
+ "bbox": [
293
+ 173,
294
+ 597,
295
+ 825,
296
+ 667
297
+ ],
298
+ "page_idx": 2
299
+ },
300
+ {
301
+ "type": "equation",
302
+ "img_path": "images/ece0318cea32d6ae2994b038da99772ba64a21c11a3cb8d12749db63acad40a6.jpg",
303
+ "text": "$$\n\\operatorname { I n f o M a x : } \\quad \\operatorname* { m a x } _ { f } I ( G ; f ( G ) ) , \\quad \\operatorname { w h e r e } G \\sim \\mathbb { P } _ { \\mathcal { G } } .\n$$",
304
+ "text_format": "latex",
305
+ "bbox": [
306
+ 338,
307
+ 672,
308
+ 658,
309
+ 698
310
+ ],
311
+ "page_idx": 2
312
+ },
313
+ {
314
+ "type": "text",
315
+ "text": "where $I ( X _ { 1 } ; X _ { 2 } )$ denotes the mutual information between two random variables $X _ { 1 }$ and $X _ { 2 }$ [50]. ",
316
+ "bbox": [
317
+ 176,
318
+ 704,
319
+ 813,
320
+ 719
321
+ ],
322
+ "page_idx": 2
323
+ },
324
+ {
325
+ "type": "text",
326
+ "text": "Note that the encoder $f ( \\cdot )$ given by GNNs is not injective in the graph space $\\mathcal { G }$ due to its limited expressive power [14, 15]. Specifically, for the graphs that cannot be distinguished by 1-WL test [51], GNNs will associate them with the same representations. We leave more discussion on 1-WL test in Appendix C. In contrast to using CNNs as encoders, one can never expect GNNs to identify all the graphs in $\\mathcal { G }$ based their representations, which introduces a unique challenge for GCL. ",
327
+ "bbox": [
328
+ 173,
329
+ 724,
330
+ 825,
331
+ 796
332
+ ],
333
+ "page_idx": 2
334
+ },
335
+ {
336
+ "type": "text",
337
+ "text": "3 Adversarial Graph Contrastive Learning ",
338
+ "text_level": 1,
339
+ "bbox": [
340
+ 174,
341
+ 804,
342
+ 550,
343
+ 821
344
+ ],
345
+ "page_idx": 2
346
+ },
347
+ {
348
+ "type": "text",
349
+ "text": "In this section, we introduce our adversarial graph contrastive learning (AD-GCL) framework and one of its instantiations based on edge perturbation. ",
350
+ "bbox": [
351
+ 171,
352
+ 828,
353
+ 825,
354
+ 856
355
+ ],
356
+ "page_idx": 2
357
+ },
358
+ {
359
+ "type": "text",
360
+ "text": "3.1 Theoretical Motivation and Formulation of AD-GCL ",
361
+ "text_level": 1,
362
+ "bbox": [
363
+ 173,
364
+ 861,
365
+ 581,
366
+ 876
367
+ ],
368
+ "page_idx": 2
369
+ },
370
+ {
371
+ "type": "text",
372
+ "text": "The InfoMax principle in Eq. 3 could be problematic in practice for general representation learning. Tschannen et al. have shown that for image classification, representations capturing the information that is entirely irrelevant to the image labels are also able to maximize the mutual information but such representations are definitely not useful for image classification [40]. A similar issue can also be observed in graph representation learning, as illustrated by Fig.2: We consider a binary graph classification problem with graphs in the dataset ogbg-molbace [52]. Two GNN encoders with exactly the same architecture are trained to keep mutual information maximization between graph representations and the input graphs, but one of the GNN encoders in the same time is further supervised by random graph labels. Although the GNN encoder supervised by random labels still keeps one-to-one correspondance between every input graph and its representation (i.e., mutual information maximization), we may observe significant performance degeneration of this GNN encoder when evaluating it over the downstream ground-truth labels. More detailed experiment setup is left in Appendix G.1. ",
373
+ "bbox": [
374
+ 173,
375
+ 882,
376
+ 825,
377
+ 911
378
+ ],
379
+ "page_idx": 2
380
+ },
381
+ {
382
+ "type": "text",
383
+ "text": "",
384
+ "bbox": [
385
+ 173,
386
+ 90,
387
+ 825,
388
+ 243
389
+ ],
390
+ "page_idx": 3
391
+ },
392
+ {
393
+ "type": "text",
394
+ "text": "This observation inspires us to rethink what a good graph representation is. Recently, the information bottleneck has applied to learn graph representations [47, 48]. Specifically, the objective of graph information bottleneck (GIB) follows ",
395
+ "bbox": [
396
+ 173,
397
+ 250,
398
+ 562,
399
+ 305
400
+ ],
401
+ "page_idx": 3
402
+ },
403
+ {
404
+ "type": "equation",
405
+ "img_path": "images/5ad1372a02023eb91292571a4bf4a68b8cb1edbc47ee44dcf3155691cfa57434.jpg",
406
+ "text": "$$\n\\operatorname* { m a x } _ { f } I ( f ( G ) ; Y ) - \\beta I ( G ; f ( G ) ) ,\n$$",
407
+ "text_format": "latex",
408
+ "bbox": [
409
+ 279,
410
+ 306,
411
+ 504,
412
+ 330
413
+ ],
414
+ "page_idx": 3
415
+ },
416
+ {
417
+ "type": "text",
418
+ "text": "where $( G , Y ) \\sim \\mathbb { P } _ { \\mathcal { G } \\times \\mathcal { Y } } , \\beta$ is a positive constant. Comparing Eq. 3 and Eq. 4, we may observe the different requirements between InfoMax and GIB: InfoMax asks for maximizing the information from the original graph, while GIB asks for minimizing such information but simultaneously maximizing the information that is relevant to the downstream tasks. As GIB asks to remove redundant information, GIB naturally avoids the issue encountered in Fig.2. Removing extra information also makes GNNs trained w.r.t. GIB robust to adverserial attack and strongly transferrable [47, 48]. ",
419
+ "bbox": [
420
+ 174,
421
+ 335,
422
+ 562,
423
+ 474
424
+ ],
425
+ "page_idx": 3
426
+ },
427
+ {
428
+ "type": "image",
429
+ "img_path": "images/1a375c3c6f0ec578b5e9153070667306b3731900152c64e3663b11c7420630c2.jpg",
430
+ "image_caption": [
431
+ "Figure 2: Two GNNs keep the mutual information maximized between graphs and their representations. Simultaneously, they get supervised by ground-truth labels (green) and random labels (blue) respectively. The curves show their testing performance on predicting ground-truth labels. "
432
+ ],
433
+ "image_footnote": [],
434
+ "bbox": [
435
+ 576,
436
+ 251,
437
+ 820,
438
+ 372
439
+ ],
440
+ "page_idx": 3
441
+ },
442
+ {
443
+ "type": "text",
444
+ "text": "Unfortunately, GIB requires the knowledge of the class labels $Y$ from the downstream task and thus does not apply to self-supervised training of GNNs where there are few or no labels. Then, the question is how to learn robust and transferable GNNs in a self-supervised way. ",
445
+ "bbox": [
446
+ 174,
447
+ 481,
448
+ 825,
449
+ 523
450
+ ],
451
+ "page_idx": 3
452
+ },
453
+ {
454
+ "type": "text",
455
+ "text": "To address this, we will develop a GCL approach that uses adversarial learning to avoid capturing redundant information during the representation learning. In general, GCL methods use graph data augmentation (GDA) processes to perturb the original observed graphs and decrease the amount of information they encode. Then, the methods apply InfoMax over perturbed graph pairs (using different GDAs) to train an encoder $f$ to capture the remaining information. ",
456
+ "bbox": [
457
+ 173,
458
+ 529,
459
+ 825,
460
+ 599
461
+ ],
462
+ "page_idx": 3
463
+ },
464
+ {
465
+ "type": "text",
466
+ "text": "Definition 1 (Graph Data Augmentation (GDA)). For a graph $G \\in { \\mathcal { G } }$ , $T ( G )$ denotes a graph data augmentation of $G$ , which is a distribution defined over $\\mathcal { G }$ conditioned on $G$ . We use $t ( G ) \\in { \\mathcal { G } }$ to denote a sample of $T ( G )$ . ",
467
+ "bbox": [
468
+ 176,
469
+ 602,
470
+ 825,
471
+ 645
472
+ ],
473
+ "page_idx": 3
474
+ },
475
+ {
476
+ "type": "text",
477
+ "text": "Specifically, given two ways of GDA $T _ { 1 }$ and $T _ { 2 }$ , the objective of GCL becomes ",
478
+ "bbox": [
479
+ 174,
480
+ 647,
481
+ 696,
482
+ 662
483
+ ],
484
+ "page_idx": 3
485
+ },
486
+ {
487
+ "type": "text",
488
+ "text": "GDA-GCL: $\\operatorname* { m a x } _ { f } I ( f ( t _ { 1 } ( G ) ) ; f ( t _ { 2 } ( G ) ) )$ , where $G \\sim \\mathbb { P } _ { \\mathcal { G } , } t _ { i } ( G ) \\sim T _ { i } ( G ) , i \\in \\{ 1 , 2 \\} .$ ",
489
+ "bbox": [
490
+ 217,
491
+ 666,
492
+ 774,
493
+ 689
494
+ ],
495
+ "page_idx": 3
496
+ },
497
+ {
498
+ "type": "text",
499
+ "text": "In practice, GDA processes are often pre-designed based on either domain knowledge or extensive evaluation, and improper choice of GDA may severely impact the downstream performance [17, 24]. We will review a few GDAs adopted in existing works in Sec.4. ",
500
+ "bbox": [
501
+ 174,
502
+ 695,
503
+ 826,
504
+ 738
505
+ ],
506
+ "page_idx": 3
507
+ },
508
+ {
509
+ "type": "text",
510
+ "text": "In contrast to previous predefined GDAs, our idea, inspired by GIB, is to learn the GDA process (over a parameterized family), so that the encoder $f$ can capture the minimal information that is sufficient to identify each graph. ",
511
+ "bbox": [
512
+ 174,
513
+ 743,
514
+ 825,
515
+ 787
516
+ ],
517
+ "page_idx": 3
518
+ },
519
+ {
520
+ "type": "text",
521
+ "text": "AD-GCL: We optimize the following objective, over a GDA family $\\tau$ (defined below). ",
522
+ "bbox": [
523
+ 171,
524
+ 796,
525
+ 758,
526
+ 811
527
+ ],
528
+ "page_idx": 3
529
+ },
530
+ {
531
+ "type": "equation",
532
+ "img_path": "images/6cf9db9019b86df886a76b47da1ca3962632c670d1d338f5831a558414cfdfc1.jpg",
533
+ "text": "$$\n\\operatorname* { m i n } _ { T \\in { \\mathcal { T } } } \\operatorname* { m a x } _ { f } I ( f ( G ) ; f ( t ( G ) ) ) , \\quad { \\mathrm { w h e r e ~ } } G \\sim \\mathbb { P } _ { \\mathcal { G } } , t ( G ) \\sim T ( G ) ,\n$$",
534
+ "text_format": "latex",
535
+ "bbox": [
536
+ 336,
537
+ 816,
538
+ 745,
539
+ 840
540
+ ],
541
+ "page_idx": 3
542
+ },
543
+ {
544
+ "type": "text",
545
+ "text": "Definition 2 (Graph Data Augmentation Family). Let $\\tau$ denote a family of different GDAs $T _ { \\Phi } ( \\cdot )$ , where $\\Phi$ is the parameter in some universe. A $T _ { \\Phi } ( \\cdot ) \\in \\mathcal { T }$ is a specific GDA with parameter $\\Phi$ . ",
546
+ "bbox": [
547
+ 173,
548
+ 845,
549
+ 826,
550
+ 876
551
+ ],
552
+ "page_idx": 3
553
+ },
554
+ {
555
+ "type": "text",
556
+ "text": "The min-max principle in AD-GCL aims to train the encoder such that even with a very aggressive GDA (i.e., where $t ( G )$ is very different from $G$ ), the mutual information $/$ the correspondence between the perturbed graph and the original graph can be maximized. Compared with the two GDAs adopted in GDA-GCL (Eq.5), AD-GCL views the original graph $G$ as the anchor while pushing its perturbation $T ( G )$ as far from the anchor as it can. The automatic search over $T \\in { \\mathcal { T } }$ saves a great deal of effort evaluating different combinations of GDA as adopted in [24]. ",
557
+ "bbox": [
558
+ 174,
559
+ 882,
560
+ 823,
561
+ 912
562
+ ],
563
+ "page_idx": 3
564
+ },
565
+ {
566
+ "type": "text",
567
+ "text": "",
568
+ "bbox": [
569
+ 174,
570
+ 90,
571
+ 825,
572
+ 147
573
+ ],
574
+ "page_idx": 4
575
+ },
576
+ {
577
+ "type": "text",
578
+ "text": "Relating AD-GCL to the downstream task. Next, we will theoretically characterize the property of the encoder trained via AD-GCL. The analysis here not only further illustrates the rationale of AD-GCL but helps design practical $\\tau$ when some knowledge of $Y$ is accessible. But note that our analysis does not make any assumption on the availability of $Y$ . ",
579
+ "bbox": [
580
+ 174,
581
+ 155,
582
+ 825,
583
+ 210
584
+ ],
585
+ "page_idx": 4
586
+ },
587
+ {
588
+ "type": "text",
589
+ "text": "Note that GNNs learning graph representations is very different from CNNs learning image representations because GNNs are never injective mappings between the graph universe $\\mathcal { G }$ and the representation space $\\mathbb { R } ^ { d }$ , because the expressive power of GNNs is limited by the 1-WL test [14, 15, 51]. So, we need to define a quotient space of $\\mathcal { G }$ based on the equivalence given by the 1-WL test. ",
590
+ "bbox": [
591
+ 174,
592
+ 217,
593
+ 826,
594
+ 272
595
+ ],
596
+ "page_idx": 4
597
+ },
598
+ {
599
+ "type": "text",
600
+ "text": "Definition 3 (Graph Quotient Space). Define the equivalence $\\cong$ between two graphs $G _ { 1 } \\cong G _ { 2 }$ if $G _ { 1 }$ , $G _ { 2 }$ cannot be distinguished by the $I$ -WL test. Define the quotient space $\\mathcal { G } ^ { \\prime } = \\mathcal { G } / \\cong$ . ",
601
+ "bbox": [
602
+ 174,
603
+ 273,
604
+ 825,
605
+ 303
606
+ ],
607
+ "page_idx": 4
608
+ },
609
+ {
610
+ "type": "text",
611
+ "text": "So every element in the quotient space, i.e., $G ^ { \\prime } \\in \\mathcal { G } ^ { \\prime }$ , is a representative graph from a family of graphs that cannot be distinguished by the 1-WL test. Note that our definition also allows attributed graphs. ",
612
+ "bbox": [
613
+ 174,
614
+ 309,
615
+ 825,
616
+ 338
617
+ ],
618
+ "page_idx": 4
619
+ },
620
+ {
621
+ "type": "text",
622
+ "text": "Definition 4 (Probability Measures in $\\mathcal { G } ^ { \\prime }$ ). Define $\\mathbb { P } _ { \\mathcal { G } ^ { \\prime } }$ over the space $\\mathcal { G } ^ { \\prime }$ such that $\\mathbb { P } _ { \\mathcal { G } ^ { \\prime } } ( G ^ { \\prime } ) =$ $\\mathbb { P } _ { \\mathcal { G } } ( G \\cong G ^ { \\prime } )$ for any $G ^ { \\prime } \\in \\mathcal { G } ^ { \\prime }$ . Further define $\\begin{array} { r } { \\mathbb { P } _ { \\mathcal { G } ^ { \\prime } \\times \\mathcal { V } } ( \\bar { G } ^ { \\prime } , Y ^ { \\prime } ) = \\mathbb { P } _ { \\mathcal { G } \\times \\mathcal { V } } ( G \\cong G ^ { \\prime } , Y = Y ^ { \\prime } ) } \\end{array}$ . Given $a$ GDA $T ( \\cdot )$ defined over $\\mathcal { G }$ , define a distribution on $\\mathcal { G } ^ { \\prime }$ , $T ^ { \\prime } ( G ^ { \\prime } ) = \\mathbb { E } _ { G \\sim \\mathbb { P } _ { \\mathcal { G } } } [ T ( G ) | G \\cong G ^ { \\prime } ] .$ for $G ^ { \\prime } \\in \\mathcal { G } ^ { \\prime }$ . ",
623
+ "bbox": [
624
+ 174,
625
+ 342,
626
+ 826,
627
+ 386
628
+ ],
629
+ "page_idx": 4
630
+ },
631
+ {
632
+ "type": "text",
633
+ "text": "Now, we provide our theoretical results and give their implication. The proof is in the Appendix B. ",
634
+ "bbox": [
635
+ 174,
636
+ 392,
637
+ 820,
638
+ 407
639
+ ],
640
+ "page_idx": 4
641
+ },
642
+ {
643
+ "type": "text",
644
+ "text": "Theorem 1. Suppose the encoder $f$ is implemented by a GNN as powerful as the $^ { l }$ -WL test. Suppose $\\mathcal { G }$ is a countable space and thus $\\mathcal { G } ^ { \\prime }$ is a countable space. Then, the optimal solution $( f ^ { * } , T ^ { * } )$ to AD-GCL satisfies, letting $T ^ { \\prime * } ( G ^ { \\prime } ) = \\mathbb { E } _ { G \\sim \\mathbb { P } _ { \\mathcal { G } } } [ T ^ { * } ( G ) | { \\bar { G } } \\cong G ^ { \\prime } ] ,$ , ",
645
+ "bbox": [
646
+ 174,
647
+ 410,
648
+ 826,
649
+ 454
650
+ ],
651
+ "page_idx": 4
652
+ },
653
+ {
654
+ "type": "text",
655
+ "text": "1. $\\begin{array} { r l r } { I ( f ^ { * } ( t ^ { * } ( G ) ) ; G \\mid Y ) } & { \\leq } & { \\operatorname* { m i n } _ { T \\in { \\mathcal T } } I ( t ^ { \\prime } ( G ^ { \\prime } ) ; G ^ { \\prime } ) \\ - \\ I ( t ^ { \\prime * } ( G ^ { \\prime } ) ; Y ) , } \\end{array}$ , where $t ^ { \\prime } ( G ^ { \\prime } ) \\sim T ^ { \\prime } ( G ^ { \\prime } ) ,$ $t ^ { \\prime * } ( G ^ { \\prime } ) \\sim T ^ { \\prime * } ( G ^ { \\prime } )$ , $( G , Y ) \\sim \\mathbb { P } _ { \\mathcal { G } \\times \\mathcal { Y } }$ and $( G ^ { \\prime } , Y ) \\sim \\mathbb { P } _ { \\mathcal { G } ^ { \\prime } \\times \\mathcal { Y } }$ . ",
656
+ "bbox": [
657
+ 176,
658
+ 459,
659
+ 823,
660
+ 491
661
+ ],
662
+ "page_idx": 4
663
+ },
664
+ {
665
+ "type": "text",
666
+ "text": "2. $I ( f ^ { * } ( G ) ; Y ) \\geq I ( f ^ { * } ( t ^ { \\prime * } ( G ^ { \\prime } ) ) ; Y ) = I ( t ^ { \\prime * } ( G ^ { \\prime } ) ; Y ) .$ , where $t ^ { \\prime * } ( G ^ { \\prime } ) \\sim T ^ { \\prime * } ( G ^ { \\prime } )$ , $( G , Y ) \\sim \\mathbb { P } _ { \\mathcal { G } \\times \\mathcal { Y } }$ and $( G ^ { \\prime } , Y ) \\sim \\mathbb { P } _ { \\mathcal { G } ^ { \\prime } \\times \\mathcal { Y } }$ . ",
667
+ "bbox": [
668
+ 173,
669
+ 496,
670
+ 823,
671
+ 527
672
+ ],
673
+ "page_idx": 4
674
+ },
675
+ {
676
+ "type": "text",
677
+ "text": "The statement 1 in Theorem 1 guarantees a upper bound of the information that is captured by the representations but irrelevant to the downstream task, which matches our aim. This bound has a form very relevant to the GIB principle (Eq.4 when $\\beta = 1$ ), since $\\begin{array} { r l } { \\operatorname* { m i n } _ { T \\in \\mathcal { T } } I ( t ^ { \\prime } ( G ^ { \\prime } ) ; G ^ { \\prime } ) - I ( t ^ { \\prime * } ( G ^ { \\prime } ) ; Y ) \\ge } \\end{array}$ $\\begin{array} { r } { \\operatorname* { m i n } _ { f } [ I ( f ( G ) ; G ) - I ( \\bar { f } ( G ) ; \\bar { Y } ) ] } \\end{array}$ , where $f$ is a GNN encoder as powerful as the 1-WL test. But note that this inequality also implies that the encoder given by AD-GCL may be worse than the optimal encoder given by GIB $\\begin{array} { r } { \\beta = 1 , } \\end{array}$ ). This makes sense as GIB has the access to the downstream task $Y$ . ",
678
+ "bbox": [
679
+ 173,
680
+ 539,
681
+ 825,
682
+ 622
683
+ ],
684
+ "page_idx": 4
685
+ },
686
+ {
687
+ "type": "text",
688
+ "text": "The statement 2 in Theorem 1 guarantees a lower bound of the mutual information between the learnt representations and the labels of the downstream task. As long as the GDA family $\\tau$ has a good control, $\\begin{array} { r } { I ( t ^ { \\prime * } ( G ^ { \\prime } ) ; Y ) \\ge \\operatorname* { m i n } _ { T \\in \\mathcal { T } } I ( t ^ { \\prime } ( G ^ { \\prime } ) ; Y ) } \\end{array}$ and $I ( f ^ { * } ( G ) ; { \\bar { Y } } )$ thus cannot be too small. This implies that it is better to regularize when learning over $\\tau$ . In our instantiation, based on edge-dropping augmentation (Sec. 3.2), we regularize the ratio of dropped edges per graph. ",
689
+ "bbox": [
690
+ 173,
691
+ 628,
692
+ 825,
693
+ 699
694
+ ],
695
+ "page_idx": 4
696
+ },
697
+ {
698
+ "type": "text",
699
+ "text": "3.2 Instantiation of AD-GCL via Learnable Edge Perturbation ",
700
+ "text_level": 1,
701
+ "bbox": [
702
+ 174,
703
+ 710,
704
+ 622,
705
+ 726
706
+ ],
707
+ "page_idx": 4
708
+ },
709
+ {
710
+ "type": "text",
711
+ "text": "We now introduce a practical instantiation of the AD-GCL principle (Eq. 6) based on learnable edge-dropping augmentations as illustrated in Fig. 1. (See Appendix $\\mathrm { D }$ for a summary of AD-GCL in its algorithmic form.) The objective of AD-GCL has two folds: (1) Optimize the encoder $f$ to maximize the mutual information between the representations of the original graph $G$ and its augmented graph $t ( G )$ ; (2) Optimize the GDA $T ( G )$ where $t ( G )$ is sampled to minimize such a mutual information. We always set the encoder as a GNN $f _ { \\Theta }$ with learnable parameters $\\Theta$ and next we focus on the GDA, $T _ { \\Phi } ( G )$ that has learnable parameters $\\Phi$ . ",
712
+ "bbox": [
713
+ 174,
714
+ 733,
715
+ 825,
716
+ 830
717
+ ],
718
+ "page_idx": 4
719
+ },
720
+ {
721
+ "type": "text",
722
+ "text": "Learnable Edge Dropping GDA model $T _ { \\Phi } ( \\cdot )$ . Edge dropping is the operation of deleting some edges in a graph. As a proof of concept, we adopt edge dropping to formulate the GDA family $\\tau$ . Other types of GDAs such as node dropping, edge adding and feature masking can also be paired with our AD-GCL principle. Interestingly, in our experiments, edge-dropping augmentation optimized by AD-GCL has already achieved much better performance than any pre-defined random ",
723
+ "bbox": [
724
+ 174,
725
+ 842,
726
+ 823,
727
+ 911
728
+ ],
729
+ "page_idx": 4
730
+ },
731
+ {
732
+ "type": "text",
733
+ "text": "GDAs even carefully selected via extensive evaluation [24] (See Sec.5). Another reason that supports edge dropping is due to our Theorem 1 statement 2, which shows that good GDAs should keep some information related to the downstream tasks. Many GRL downstream tasks such as molecule classification only depends on the structural fingerprints that can be represented as subgraphs of the original graph [53]. Dropping a few edges may not change those subgraph structures and thus keeps the information sufficient to the downstream classification. But note that this reasoning does not mean that we leverage domain knowledge to design GDA, as the family $\\tau$ is still broad and the specific GDA still needs to be optimized. Moreover, experiments show that our instantiation also works extremely well on social network classification and molecule property regression, where the evidence of subgraph fingerprints may not exist any more. ",
734
+ "bbox": [
735
+ 173,
736
+ 90,
737
+ 825,
738
+ 231
739
+ ],
740
+ "page_idx": 5
741
+ },
742
+ {
743
+ "type": "text",
744
+ "text": "Parameterizing $T _ { \\Phi } ( \\cdot )$ . For each $G = ( V , E )$ , we set $T _ { \\Phi } ( G )$ , $T \\in { \\mathcal { T } }$ as a random graph model [54, 55] conditioning on $G$ . Each sample $t ( G ) \\sim T _ { \\Phi } ( G )$ is a graph that shares the same node set with $G$ while the edge set of $t ( G )$ is only a subset of $E$ . Each edge $e \\in E$ will be associated with a random variable $p _ { e } \\sim \\mathrm { B e r n o u l l i } ( \\omega _ { e } )$ , where $e$ is in $t ( G )$ if $p _ { e } = 1$ and is dropped otherwise. ",
745
+ "bbox": [
746
+ 173,
747
+ 239,
748
+ 825,
749
+ 297
750
+ ],
751
+ "page_idx": 5
752
+ },
753
+ {
754
+ "type": "text",
755
+ "text": "We parameterize the Bernoulli weights $\\omega _ { e }$ by leveraging another GNN, i.e., the augmenter, to run on $G$ according to Eq.1 of $K$ layers, get the final-layer node representations $\\{ h _ { v } ^ { ( K ) } | v \\in V \\}$ and set ",
756
+ "bbox": [
757
+ 171,
758
+ 303,
759
+ 823,
760
+ 335
761
+ ],
762
+ "page_idx": 5
763
+ },
764
+ {
765
+ "type": "equation",
766
+ "img_path": "images/adba4ddc334a2053162d3f368e85fd984836ea5e554cea681186b0e142856eba.jpg",
767
+ "text": "$$\n\\omega _ { e } = \\mathbf { M L P } ( [ h _ { u } ^ { ( K ) } ; h _ { z } ^ { ( K ) } ] ) , \\quad \\mathrm { w h e r e } e = ( u , z ) \\operatorname { a n d } \\left\\{ h _ { v } ^ { ( K ) } ~ | ~ v \\in V \\right\\} = \\mathbf { G N N - a u g m e n t e r } ( G ) .\n$$",
768
+ "text_format": "latex",
769
+ "bbox": [
770
+ 192,
771
+ 342,
772
+ 787,
773
+ 362
774
+ ],
775
+ "page_idx": 5
776
+ },
777
+ {
778
+ "type": "text",
779
+ "text": "To train $T ( G )$ in an end-to-end fashion, we relax the discrete $p _ { e }$ to be a continuous variable in $[ 0 , 1 ]$ and utilize the Gumbel-Max reparametrization trick [56, 57]. Specifically, $p _ { e } = \\mathrm { S i g m o i d } ( ( \\log \\delta -$ $\\log ( 1 - \\delta ) + \\omega _ { e } ) / \\tau )$ , where $\\delta \\sim \\mathrm { U n i f o r m } ( 0 , 1 )$ . As temperature hyper-parameter $\\tau 0$ , $p _ { e }$ gets closer to being binary. Moreover, the gradients $\\frac { \\partial p _ { e } } { \\partial \\omega _ { e } }$ are smooth and well defined. This style of edge dropping based on a random graph model has also been used for parameterized explanations of GNNs [58]. ",
780
+ "bbox": [
781
+ 173,
782
+ 375,
783
+ 825,
784
+ 463
785
+ ],
786
+ "page_idx": 5
787
+ },
788
+ {
789
+ "type": "text",
790
+ "text": "Regularizing $T _ { \\Phi } ( \\cdot )$ . As shown in Theorem 1, a reasonable GDA should keep a certain amount of information related to the downstream tasks (statement 2). Hence, we expect the GDAs in the edge dropping family $\\tau$ not to perform very aggressive perturbation. Therefore, we regularize the ratio of edges being dropped per graph by enforcing the following constraint: For a graph $G$ and its augmented graph $t ( G )$ , we add $\\textstyle \\sum _ { e \\in E } \\omega _ { e } / | E |$ to the objective, where $\\omega _ { e }$ is defined in Eq.7 indicates the probability that $e$ gets dropped. ",
791
+ "bbox": [
792
+ 173,
793
+ 472,
794
+ 825,
795
+ 559
796
+ ],
797
+ "page_idx": 5
798
+ },
799
+ {
800
+ "type": "text",
801
+ "text": "Putting everything together, the final objective is as follows. ",
802
+ "bbox": [
803
+ 173,
804
+ 563,
805
+ 566,
806
+ 578
807
+ ],
808
+ "page_idx": 5
809
+ },
810
+ {
811
+ "type": "equation",
812
+ "img_path": "images/d82581966d637e66bc8394e6ebb68279f8da365e0d02cbfe39bafbf599673465.jpg",
813
+ "text": "$$\n\\operatorname* { m i n } _ { \\Phi } \\operatorname* { m a x } _ { \\Theta } I ( f _ { \\Theta } ( G ) ; f _ { \\Theta } ( t ( G ) ) ) + \\lambda _ { \\mathrm { r e g } } \\mathbb { E } _ { G } \\big [ \\sum _ { e \\in E } \\omega _ { e } / | E | \\big ] , \\mathrm { w h e r e } G \\sim \\mathbb { P } _ { \\mathcal { G } } , t ( G ) \\sim T _ { \\Phi } ( G ) .\n$$",
814
+ "text_format": "latex",
815
+ "bbox": [
816
+ 197,
817
+ 584,
818
+ 779,
819
+ 619
820
+ ],
821
+ "page_idx": 5
822
+ },
823
+ {
824
+ "type": "text",
825
+ "text": "Note $\\Phi$ corresponds to the learnable parameters of the augmenter GNN and MLP used to derive the $\\omega _ { e }$ ’s and $\\Theta$ corresponds to the learnable parameters of the GNN $f$ . ",
826
+ "bbox": [
827
+ 174,
828
+ 622,
829
+ 823,
830
+ 650
831
+ ],
832
+ "page_idx": 5
833
+ },
834
+ {
835
+ "type": "text",
836
+ "text": "Estimating the objective in Eq.8. In our implementation, the second (regularization) term is easy to estimate empirically. For the first (mutual information) term, we adopt InfoNCE as the estimator [59–61], which is known to be a lower bound of the mutual information and is frequently used for contrastive learning [40, 59, 62]. Specfically, during the training, given a minibatch of $m$ graphs $\\{ G _ { i } \\} _ { i = 1 } ^ { m }$ , let $z _ { i , 1 } = g ( f _ { \\Theta } ( G _ { i } ) )$ and $z _ { i , 2 } = g ( f _ { \\Theta } ( t ( G _ { i } ) ) )$ where $g ( \\cdot )$ is the projection head implemented by a 2-layer MLP as suggested in [62]. With $s i m ( \\cdot , \\cdot )$ denoting cosine similarity, we estimate the mutual information for the mini-batch as follows. ",
837
+ "bbox": [
838
+ 173,
839
+ 656,
840
+ 825,
841
+ 756
842
+ ],
843
+ "page_idx": 5
844
+ },
845
+ {
846
+ "type": "equation",
847
+ "img_path": "images/61439cd838cac1f32cceac37a3663fdcaff951d1c17dafa2ba02442b098ac213.jpg",
848
+ "text": "$$\nI ( f _ { \\Theta } ( G ) ; f _ { \\Theta } ( t ( G ) ) ) \\to \\hat { I } = \\frac { 1 } { m } \\sum _ { i = 1 } ^ { m } \\log \\frac { \\exp ( s i m ( z _ { i , 1 } , z _ { i , 2 } ) ) } { \\sum _ { i ^ { \\prime } = 1 , i ^ { \\prime } \\neq i } ^ { m } \\exp ( s i m ( z _ { i , 1 } , z _ { i ^ { \\prime } , 2 } ) ) }\n$$",
849
+ "text_format": "latex",
850
+ "bbox": [
851
+ 276,
852
+ 758,
853
+ 722,
854
+ 795
855
+ ],
856
+ "page_idx": 5
857
+ },
858
+ {
859
+ "type": "text",
860
+ "text": "4 Related Work ",
861
+ "text_level": 1,
862
+ "bbox": [
863
+ 174,
864
+ 796,
865
+ 323,
866
+ 814
867
+ ],
868
+ "page_idx": 5
869
+ },
870
+ {
871
+ "type": "text",
872
+ "text": "GNNs for GRL is a broad field and gets a high-level review in the Sec. 1. Here, we focus on the topics that are most relevant to graph contrastive learning (GCL). ",
873
+ "bbox": [
874
+ 176,
875
+ 820,
876
+ 821,
877
+ 849
878
+ ],
879
+ "page_idx": 5
880
+ },
881
+ {
882
+ "type": "text",
883
+ "text": "Contrastive learning (CL) [39, 59, 60, 63–65] was initially proposed to train CNNs for image representation learning and has recently achieved great success [62,66]. GCL applies the idea of CL on GNNs. In contrast to the case of CNNs, GCL trained using GNNs posts us new fundamental challenges. An image often has multiple natural views, say by imposing different color filters and so on. Hence, different views of an image give natural contrastive pairs for CL to train CNNs. However, graphs are more abstract and the irregularity of graph structures typically provides crucial information. Thus, designing contrastive pairs for GCL must play with irregular graph structures and thus becomes more challenging. Some works use different parts of a graph to build contrastive pairs, including nodes v.s. whole graphs [18, 67], nodes v.s. nodes [68], nodes v.s. subgraphs [17, 69]. Other works adopt graph data augmentations (GDA) such as edge perturbation [31] to generate contrastive pairs. Recently. GraphCL [24] gives an extensive study on different combinations of GDAs including node dropping, edge perturbation, subgraph sampling and feature masking. Extensive evaluation is required to determine good combinations. MVGRL [25] and GCA [30] leverage the domain knowledge of network science and adopt network centrality to perform GDAs. Note that none of the above methods consider optimizing augmentations. In contrast, our principle AD-GCL provides theoretical guiding principles to optimize augmentations. Very recently, JOAO [70] adopts a bi-level optimization framework sharing some high-level ideas with our adversarial training strategy but has several differences: 1) the GDA search space in JOAO is set as different types of augmentation with uniform perturbation, such as uniform edge/node dropping while we allow augmentation with non-uniform perturbation. 2) JOAO relaxes the GDA combinatorial search problem into continuous space via Jensen’s inequality and adopts projected gradient descent to optimize. Ours, instead, adopts Bayesian modeling plus reparameterization tricks to optimize. The performance comparison between AD-GCL and JOAO for the tasks investigated in Sec. 5 is given in Appendix H. ",
884
+ "bbox": [
885
+ 174,
886
+ 854,
887
+ 826,
888
+ 911
889
+ ],
890
+ "page_idx": 5
891
+ },
892
+ {
893
+ "type": "text",
894
+ "text": "",
895
+ "bbox": [
896
+ 174,
897
+ 90,
898
+ 825,
899
+ 353
900
+ ],
901
+ "page_idx": 6
902
+ },
903
+ {
904
+ "type": "text",
905
+ "text": "Tian et al. [71] has recently proposed the InfoMin principle that shares some ideas with AD-GCL but there are several fundamental differences. Theoretically, InfoMin needs the downstream tasks to supervise the augmentation. Rephrased in our notation, the optimal augmentation $T _ { I M } ( G )$ given by InfoMin (called the sweet spot in [71]) needs to satisfy $I ( t _ { I M } ( G ) ; Y ) = I ( G ; Y )$ and $\\bar { I } ( t _ { I M } ( \\bar { G } ) ; G | Y ) = 0$ , $t _ { I M } ( G ) \\sim T _ { I M } \\bar { ( G ) }$ , neither of which are possible without the downstreamtask knowledge. Instead, our Theorem 1 provides more reasonable arguments and creatively suggests using regularization to control the tradeoff. Empirically, InfoMin is applied to CNNs while AD-GCL is applied to GNNs. AD-GCL needs to handle the above challenges due to irregular graph structures and the limited expressive power of GNNs [14, 15], which InfoMin does not consider. ",
906
+ "bbox": [
907
+ 174,
908
+ 359,
909
+ 825,
910
+ 484
911
+ ],
912
+ "page_idx": 6
913
+ },
914
+ {
915
+ "type": "text",
916
+ "text": "5 Experiments and Analysis ",
917
+ "text_level": 1,
918
+ "bbox": [
919
+ 176,
920
+ 498,
921
+ 423,
922
+ 516
923
+ ],
924
+ "page_idx": 6
925
+ },
926
+ {
927
+ "type": "text",
928
+ "text": "This section is devoted to the empirical evaluation of the proposed instantiation of our AD-GCL principle. Our initial focus is on unsupervised learning which is followed by analysis of the effects of regularization. We further apply AD-GCL to transfer and semi-supervised learning. Summary of datasets and training details for specific experiments are provided in Appendix E and G respectively. ",
929
+ "bbox": [
930
+ 174,
931
+ 523,
932
+ 825,
933
+ 579
934
+ ],
935
+ "page_idx": 6
936
+ },
937
+ {
938
+ "type": "text",
939
+ "text": "5.1 Unsupervised Learning ",
940
+ "text_level": 1,
941
+ "bbox": [
942
+ 174,
943
+ 590,
944
+ 377,
945
+ 606
946
+ ],
947
+ "page_idx": 6
948
+ },
949
+ {
950
+ "type": "text",
951
+ "text": "In this setting, an encoder (specifically GIN [72]) is trained with different self-supervised methods to learn graph representations, which are then evaluated by feeding these representations to make prediction for the downstream tasks. We use datasets from Open Graph Benchmark (OGB) [52], TU Dataset [73] and ZINC [74] for graph-level property classification and regression. More details regarding the experimental setting are provided in the Appendix G. ",
952
+ "bbox": [
953
+ 174,
954
+ 607,
955
+ 825,
956
+ 678
957
+ ],
958
+ "page_idx": 6
959
+ },
960
+ {
961
+ "type": "text",
962
+ "text": "We consider two types of AD-GCL, where one is with a fixed regularization weight $\\lambda _ { \\mathrm { { r e g } } } ~ = ~ 5$ (Eq.8), termed AD-GCL-FIX, and another is with $\\lambda _ { \\mathrm { r e g } }$ tuned over the validation set among $\\{ 0 . 1 , 0 . 3 , 0 . 5 , 1 . 0 , 2 . 0 , 5 . 0 , 1 0 . 0 \\}$ , termed AD-GCL-OPT. AD-GCL-FIX assumes any information from the downstream task as unavailable while AD-GCL-OPT assumes the augmentation search space has some weak information from the downstream task. A full range of analysis on how $\\lambda _ { \\mathrm { r e g } }$ impacts AD-GCL will be investigated in Sec. 5.2. We compare AD-GCL with three unsupervised/selfsupervised learning baselines for graph-level tasks, which include randomly initialized untrained GIN (RU-GIN) [72], InfoGraph [18] and GraphCL [24]. Previous works [18, 24] show that they generally outperform graph kernels [75–77] and network embedding methods [33, 34, 78, 79]. ",
963
+ "bbox": [
964
+ 174,
965
+ 683,
966
+ 825,
967
+ 809
968
+ ],
969
+ "page_idx": 6
970
+ },
971
+ {
972
+ "type": "text",
973
+ "text": "We also adopt GCL with GDA based on non-adversarial edge dropping (NAD-GCL) for ablation study. NAD-GCL drops the edges of a graph uniformly at random. We consider NAD-GCL-FIX and NAD-GCL-OPT with different edge drop ratios. NAD-GCL-GCL adopts the edge drop ratio of AD-GCL-FIX at the saddle point of the optimization (Eq.8) while NAD-GCL-OPT optimally tunes the edge drop ratio over the validation datasets to match AD-GCL-OPT. We also adopt fully supervised GIN (F-GIN) to provide an anchor of the performance. We stress that all methods adopt GIN [72] as the encoder. Except F-GIN, all methods adopt a downstream linear classifier or regressor with the same hyper-parameters for fair comparison. Adopting linear models was suggested by [40], which explicitly attributes any performance gain/drop to the quality of learnt representations. ",
974
+ "bbox": [
975
+ 174,
976
+ 814,
977
+ 825,
978
+ 911
979
+ ],
980
+ "page_idx": 6
981
+ },
982
+ {
983
+ "type": "table",
984
+ "img_path": "images/0e60eb881093e417772fff9abfc6e6e720c66e5cd2725844396fa19be0bcd081.jpg",
985
+ "table_caption": [],
986
+ "table_footnote": [
987
+ "Table 1: Unsupervised learning performance for (TOP) biochemical and social network classification in TU datasets [73] (Averaged accuracy $\\pm$ std. over 10 runs) and (BOTTOM) chemical molecules property prediction in OGB datasets [52] (mean $\\pm$ std. over 10 runs). $\\mathbf { B o l d / B o l d ^ { \\star } }$ indicats our methods outperform baselines with $\\geq 0 . 5 / \\geq 2$ std respectively. Fully supervised (F-GIN) results are shown only for placing GRL methods in perspective. Ablation-study (AB-S) results do not count as baselines. "
988
+ ],
989
+ "table_body": "<table><tr><td></td><td>Dataset</td><td>NCI1</td><td>PROTEINS</td><td>MUTAG</td><td>DD</td><td>COLLAB</td><td>RDT-B</td><td>RDT-M5K</td><td>IMDB-B</td><td>IMDB-M</td></tr><tr><td></td><td>F-GIN</td><td>78.27±1.35</td><td>72.39 ± 2.76</td><td>90.41 ± 4.61</td><td>74.87 ±3.56</td><td>74.82 ±0.92</td><td>86.79 ± 2.04</td><td>53.28 ± 3.17</td><td>71.83 ± 1.93</td><td>48.46 ± 2.31</td></tr><tr><td></td><td>RU-GIN [72]</td><td>62.98 ±0.10</td><td>69.03±0.33</td><td>87.61 ±0.39</td><td>74.22 ±0.30</td><td>63.08±0.10</td><td>58.97 ±0.13</td><td>27.52 ± 0.61</td><td>51.86±0.33</td><td>32.81 ±0.57</td></tr><tr><td>peraeer</td><td>InfoGraph [18]</td><td>68.13± 0.59</td><td>72.57 ± 0.65</td><td>87.71 ± 1.77</td><td>75.23 ±0.39</td><td>70.35± 0.64</td><td>78.79 ± 2.14</td><td>51.11 ± 0.55</td><td>71.11 ± 0.88</td><td>48.66 ± 0.67</td></tr><tr><td></td><td>GraphCL [24]</td><td>68.54± 0.55</td><td>72.86 ± 1.01</td><td>88.29 ± 1.31</td><td>74.70± 0.70</td><td>71.26 ± 0.55</td><td>82.63 ± 0.99</td><td>53.05 ±0.40</td><td>70.80± 0.77</td><td>48.49 ± 0.63</td></tr><tr><td></td><td>NAD-GCL-FIX</td><td>69.23±0.60</td><td>72.81 ± 0.71</td><td>88.58 ± 1.58</td><td>74.55±0.55</td><td>71.56 ±0.58</td><td>83.41 ±0.66</td><td>52.72 ± 0.71</td><td>70.94 ± 0.77</td><td>48.33± 0.47</td></tr><tr><td></td><td>NAD-GCL-OPT</td><td>69.30± 0.32</td><td>73.18 ± 0.71</td><td>89.05 ± 1.06</td><td>74.55 ±0.55</td><td>72.04 ± 0.67</td><td>83.74±0.76</td><td>53.43± 0.26</td><td>71.94 ± 0.59</td><td>49.01 ± 0.93</td></tr><tr><td></td><td>AD-GCL-FIX</td><td>69.67 ± 0.51*</td><td>73.59± 0.65</td><td>89.25 ± 1.45</td><td>74.49 ±0.52</td><td>73.32 ± 0.61*</td><td>85.52 ±0.79*</td><td>53.00±0.82</td><td>71.57 ± 1.01</td><td>49.04 ±0.53</td></tr><tr><td></td><td>AD-GCL-OPT</td><td>69.67± 0.51*</td><td>73.81 ± 0.46*</td><td>89.70 ± 1.03</td><td>75.10 ± 0.39</td><td>73.32 ± 0.61*</td><td>85.52 ± 0.79*</td><td>54.93 ± 0.43*</td><td>72.33 ± 0.56*</td><td>49.89 ± 0.66*</td></tr><tr><td colspan=\"11\">Regression (Downstream Classifier - Linear Regression + L2)</td></tr><tr><td></td><td>Task Dataset</td><td>molesol</td><td>mollipo</td><td>molfreesolv</td><td>ZINC-10K</td><td>molbace</td><td>molbbbp</td><td>Classification (Downstream Classifier - Logistic Regression + L2) molclintox</td><td>moltox21</td><td>molsider</td></tr><tr><td></td><td>Metric</td><td></td><td>RMSE (shared) (↓)</td><td></td><td>MAE(↓)</td><td></td><td></td><td>ROC-AUC % (shared) (↑)</td><td></td><td></td></tr><tr><td></td><td>F-GIN</td><td>1.173 ± 0.057</td><td>0.757 ± 0.018</td><td>2.755 ± 0.349</td><td>0.254± 0.005</td><td>72.97± 4.00</td><td>68.17 ± 1.48</td><td>88.14 ± 2.51</td><td>74.91 ± 0.51</td><td>57.60 ± 1.40</td></tr><tr><td></td><td></td><td></td><td>1.075±0.022</td><td>7.526 ± 2.119</td><td>0.809±0.022</td><td>75.07± 2.23</td><td>64.48 ± 2.46</td><td>72.29 ± 4.15</td><td>71.53± 0.74</td><td>62.29 ± 1.12</td></tr><tr><td>Besgereg</td><td>RU-GIN [72] InfoGraph [18]</td><td>1.706 ± 0.180</td><td>1.005 ± 0.023</td><td>10.005 ± 4.819</td><td>0.890 ± 0.017</td><td>74.74 ± 3.64</td><td>66.33 ± 2.79</td><td>64.50± 5.32</td><td>69.74 ± 0.57</td><td>60.54 ± 0.90</td></tr><tr><td></td><td>GraphCL [24]</td><td>1.344 ± 0.178 1.272 ± 0.089</td><td>0.910 ± 0.016</td><td>7.679 ± 2.748</td><td>0.627 ± 0.013</td><td>74.32± 2.70</td><td>68.22 ± 1.89</td><td>74.92 ± 4.42</td><td>72.40 ± 1.01</td><td>61.76 ± 1.11</td></tr><tr><td></td><td>NAD-GCL-FIX</td><td>1.392 ± 0.065</td><td>0.952 ± 0.024</td><td>5.840 ±0.877</td><td>0.609 ±0.010</td><td>73.60±2.73</td><td>66.12 ± 1.80</td><td>73.32 ±3.66</td><td>71.65 ± 0.94</td><td>60.41 ± 1.48</td></tr><tr><td>8</td><td>NAD-GCL-OPT</td><td>1.242 ± 0.096</td><td>0.897 ± 0.022</td><td>5.840 ±0.877</td><td>0.609 ± 0.010</td><td>73.69 ± 3.67</td><td>67.70 ± 1.78</td><td>74.40 ± 4.92</td><td>71.65 ± 0.94</td><td>61.14 ± 1.43</td></tr><tr><td></td><td>AD-GCL-FIX</td><td>1.217 ±0.087</td><td>0.842±0.028*</td><td>5.150±0.624*</td><td>0.578±0.012*</td><td>76.37±2.03</td><td>68.24 ± 1.47</td><td>80.77 ± 3.92</td><td>71.42±0.73</td><td></td></tr><tr><td></td><td>AD-GCL-OPT</td><td>1.136 ± 0.050*</td><td>0.812 ± 0.020*</td><td>4.145 ± 0.369*</td><td>0.544± 0.004*</td><td>77.27 ± 2.56</td><td>69.54 ± 1.92</td><td>80.77 ± 3.92</td><td>72.92 ± 0.86</td><td>63.19 ±0.95 63.19 ± 0.95</td></tr></table>",
990
+ "bbox": [
991
+ 171,
992
+ 85,
993
+ 825,
994
+ 340
995
+ ],
996
+ "page_idx": 7
997
+ },
998
+ {
999
+ "type": "text",
1000
+ "text": "",
1001
+ "bbox": [
1002
+ 174,
1003
+ 422,
1004
+ 823,
1005
+ 450
1006
+ ],
1007
+ "page_idx": 7
1008
+ },
1009
+ {
1010
+ "type": "text",
1011
+ "text": "Tables 1 show the results for unsupervised graph level property prediction in social and chemical domains respectively. We witness the big performance gain of AD-GCL as opposed to all baselines across all the datasets. Note GraphCL utilizes extensive evaluation to select the best combination of augmentions over a broad GDA family including node-dropping, edge dropping and subgraph sampling. Our results indicate that such extensive evaluation may not be necessary while optimizing the augmentation strategy in an adversarial way is greatly beneficial. ",
1012
+ "bbox": [
1013
+ 174,
1014
+ 457,
1015
+ 825,
1016
+ 540
1017
+ ],
1018
+ "page_idx": 7
1019
+ },
1020
+ {
1021
+ "type": "text",
1022
+ "text": "We stress that edge dropping is not cherry picked as the search space of augmentation strategies. Other search spaces may even achieve better performance, while an extensive investigation is left for the future work. ",
1023
+ "bbox": [
1024
+ 174,
1025
+ 546,
1026
+ 825,
1027
+ 588
1028
+ ],
1029
+ "page_idx": 7
1030
+ },
1031
+ {
1032
+ "type": "text",
1033
+ "text": "Moreover, AD-GCL also clearly improves upon the performance against its non-adversarial counterparts (NAD-GCL) across all the datasets, which further demonstrates stable and significant advantages of the AD-GCL principle. Essentially, the input-graph-dependent augmentation learnt by AD-GCL yields much benefit. Finally, we compare AD-GCL-FIX with AD-GCL-OPT. Interestingly, two methods achieve comparable results though AD-GCL-OPT is sometimes better. This observation implies that the AD-GCL principle may be robust to the choice of $\\lambda _ { \\mathrm { r e g } }$ and thus motivates the analysis in the next subsection. Moreover, weak information from the downstream tasks indeed help with controlling the search space and further betters the performance. We also list the optimal $\\lambda _ { \\mathrm { r e g } }$ ’s of AD-GCL-OPT for different datasets in Appendix F.1 for the purpose of comparison and reproduction. ",
1034
+ "bbox": [
1035
+ 173,
1036
+ 594,
1037
+ 825,
1038
+ 719
1039
+ ],
1040
+ "page_idx": 7
1041
+ },
1042
+ {
1043
+ "type": "text",
1044
+ "text": "5.1.1 Note on the linear downstream classifier ",
1045
+ "text_level": 1,
1046
+ "bbox": [
1047
+ 173,
1048
+ 734,
1049
+ 503,
1050
+ 750
1051
+ ],
1052
+ "page_idx": 7
1053
+ },
1054
+ {
1055
+ "type": "text",
1056
+ "text": "We find that the choice of the downstream classifier can significantly affect the evaluation of the self-supervised representations. InfoGraph [18] and GraphCL [24] adopt a non-linear SVM model as the downstream classifier. Such a non-linear model is more powerful than the linear model we adopt and thus causes some performance gap between the results showed in Table 1 (TOP) and (BOTTOM) and their original results (listed in Appendix G.2.1 as Table 8). We argue that using a non-linear SVM model as the downstream classifier is unfair, because the performance of even a randomly initialized untrained GIN (RU-GIN) is significantly improved (comparing results from Table 1 (TOP) to Table 8 ). Therefore, we argue for adopting a linear classifier protocol as suggested by [40]. That having been said, our methods (both AD-GCL-FIX and AD-GCL-OPT) still performs significantly better than baselines in most cases, even when a non-linear SVM classifer is adopted, as shown in Table 8. Several relative gains are there no matter whether the downstream classifier is a simple linear model (Tables 1) or a non-linear SVM model (Table 8). AD-GCL methods significantly outperform InfoGraph in 5 over 8 datasets and GraphCL in 6 over 8 datasets. This further provides the evidence for the effectiveness of our method. Details on the practical benefits of linear downstream models can be found in Appendix G.2.1. ",
1057
+ "bbox": [
1058
+ 174,
1059
+ 758,
1060
+ 825,
1061
+ 911
1062
+ ],
1063
+ "page_idx": 7
1064
+ },
1065
+ {
1066
+ "type": "image",
1067
+ "img_path": "images/e95f5581d389136c562488bb2359f3b760fe8a591248475f39986e8a7dd3c96e.jpg",
1068
+ "image_caption": [
1069
+ "Figure 3: (a) $\\lambda _ { \\mathrm { { r e g } } } \\nu . s .$ . expected edge drop ratio ${ \\mathbb E } _ { \\mathcal G } [ \\sum _ { e } \\omega _ { e } / | E | ]$ (measured at saddle point of Eq.8). (b) Training dynamics of expected drop ratio for $\\lambda _ { \\mathrm { r e g } }$ . (c) Validation performance for graph classification v.s. edge drop ratio. Compare AD-GCL and GCL with non-adversarial edge dropping. The markers on AD-GCL’s performance curves show the $\\lambda _ { \\mathrm { r e g } }$ used. "
1070
+ ],
1071
+ "image_footnote": [],
1072
+ "bbox": [
1073
+ 173,
1074
+ 88,
1075
+ 823,
1076
+ 308
1077
+ ],
1078
+ "page_idx": 8
1079
+ },
1080
+ {
1081
+ "type": "text",
1082
+ "text": "",
1083
+ "bbox": [
1084
+ 174,
1085
+ 382,
1086
+ 825,
1087
+ 438
1088
+ ],
1089
+ "page_idx": 8
1090
+ },
1091
+ {
1092
+ "type": "text",
1093
+ "text": "5.2 Analysis of Regularizing the GDA Model ",
1094
+ "text_level": 1,
1095
+ "bbox": [
1096
+ 173,
1097
+ 444,
1098
+ 498,
1099
+ 459
1100
+ ],
1101
+ "page_idx": 8
1102
+ },
1103
+ {
1104
+ "type": "text",
1105
+ "text": "Here, we study how different $\\lambda _ { \\mathrm { r e g } }$ ’s impact the expected edge drop ratio of AD-GCL at the saddle point of Eq.8 and further impact the model performance on the validation datasets. Due to the page limitation, we focus on classification tasks in the main text while leaving the discussion on regression tasks in the Appendix F.2. Figure 3 shows the results. ",
1106
+ "bbox": [
1107
+ 174,
1108
+ 464,
1109
+ 825,
1110
+ 518
1111
+ ],
1112
+ "page_idx": 8
1113
+ },
1114
+ {
1115
+ "type": "text",
1116
+ "text": "As shown in Figure 3(a), a large $\\lambda _ { \\mathrm { r e g } }$ tends to yield a small expected edge drop ratio at the convergent point, which matches our expectation. $\\lambda _ { \\mathrm { r e g } }$ ranging from 0.1 to 10.0 corresponds to dropping almost everything $80 \\%$ edges) to nothing $- 1 0 \\%$ edges). The validation performance in Figure 3(c) is out of our expectation. We find that for classification tasks, the performance of the encoder is extremely robust to different choices of $\\lambda _ { \\mathrm { r e g } }$ ’s when trained w.r.t. the AD-GCL principle, though the edge drop ratios at the saddle point are very different. However, the non-adversarial counterpart NAD-GCL is sensitive to different edge drop ratios, especially on the molecule dataset (e.g., ogbg-molclitox, ogbg-molbbbp). We actually observe the similar issue of NAD-GCL across all molecule datasets (See Appendix F.3). More interesting aspects of our results appear at the extreme cases. When $\\lambda _ { \\mathrm { r e g } } \\geq 5 . 0$ the convergent edge drop ratio is close to 0, which means no edge dropping, but AD-GCL still significantly outperforms naive GCL with small edge drop ratio. When $\\lambda _ { \\mathrm { r e g } } = 0 . 3$ , the convergent edge drop ratio is greater than 0.6, which means dropping more than half of the edges, but AD-GCL still keeps reasonable performance. We suspect that such benefit comes from the training dynamics of AD-GCL (examples as shown in Figure 3(b)). Particularly, optimizing augmentations allows for non-uniform edge-dropping probability. During the optimization procedure, AD-GCL pushes high drop probability on redundant edges while low drop probability on critical edges, which allows the encoder to differentiate redundant and critical information. This cannot be fully explained by the final convergent edge drop ratio and motivates future investigation of AD-GCL from a more in-depth theoretical perspective. ",
1117
+ "bbox": [
1118
+ 173,
1119
+ 526,
1120
+ 825,
1121
+ 787
1122
+ ],
1123
+ "page_idx": 8
1124
+ },
1125
+ {
1126
+ "type": "text",
1127
+ "text": "5.3 Transfer Learning ",
1128
+ "text_level": 1,
1129
+ "bbox": [
1130
+ 174,
1131
+ 795,
1132
+ 341,
1133
+ 810
1134
+ ],
1135
+ "page_idx": 8
1136
+ },
1137
+ {
1138
+ "type": "text",
1139
+ "text": "Next, we evaluate the GNN encoders trained by AD-GCL on transfer learning to predict chemical molecule properties and biological protein functions. We follow the setting in [17] and use the same datasets: GNNs are pre-trained on one dataset using self-supervised learning and later fine-tuned on another dataset to test out-of-distribution performance. Here, we only consider AD-GCL-FIX as AD-GCL-OPT is only expected to have better performance. We adopt baselines including no pre-trained GIN (i.e., without self-supervised training on the first dataset and with only fine-tuning), InfoGraph [18], GraphCL [24], three different pre-train strategies in [17] including edge prediction, ",
1140
+ "bbox": [
1141
+ 174,
1142
+ 814,
1143
+ 825,
1144
+ 911
1145
+ ],
1146
+ "page_idx": 8
1147
+ },
1148
+ {
1149
+ "type": "table",
1150
+ "img_path": "images/a88f1609a09ff10a6c138458111b658ed92b0782da1e13cff5a4c34b9475c852.jpg",
1151
+ "table_caption": [],
1152
+ "table_footnote": [
1153
+ "Table 2: Transfer learning performance for chemical molecules property prediction (mean ROC-AUC ± std. over 10 runs). Bold indicates our methods outperform baselines with $\\geq 0 . 5$ std.. "
1154
+ ],
1155
+ "table_body": "<table><tr><td colspan=\"4\">Pre-TrainDataset</td><td colspan=\"5\">ZINC2M</td><td>PPI-306K</td></tr><tr><td>Fine-TuneDataset</td><td>BBBP</td><td>Tox21</td><td>SIDER</td><td>ClinTox</td><td>BACE</td><td>HIV</td><td>MUV</td><td>ToxCast</td><td>PPI</td></tr><tr><td>No Pre-Train</td><td>65.8± 4.5</td><td>74.0±0.8</td><td>57.3 ± 1.6</td><td>58.0±4.4</td><td>70.1 ± 5.4</td><td>75.3 ± 1.9</td><td>71.8± 2.5</td><td>63.4±0.6</td><td>64.8 ±1.0</td></tr><tr><td>EdgePred [17]</td><td>67.3 ± 2.4</td><td>76.0±0.6</td><td>60.4±0.7</td><td>64.1 ± 3.7</td><td>79.9± 0.9</td><td>76.3 ± 1.0</td><td>74.1 ± 2.1</td><td>64.1± 0.6</td><td>65.7 ± 1.3</td></tr><tr><td>AttrMasking [17]</td><td>64.3 ± 2.8</td><td>76.7 ±0.4</td><td>61.0 ±0.7</td><td>71.8 ± 4.1</td><td>79.3 ± 1.6</td><td>77.2 ± 1.1</td><td>74.7 ± 1.4</td><td>64.2 ± 0.5</td><td>65.2 ± 1.6</td></tr><tr><td>ContextPred [17]</td><td>68.0± 2.0</td><td>75.7 ±0.7</td><td>60.9 ±0.6</td><td>65.9±3.8</td><td>79.6 ± 1.2</td><td>77.3 ± 1.0</td><td>75.8 ± 1.7</td><td>63.9±0.6</td><td>64.4 ± 1.3</td></tr><tr><td>InfoGraph [18]</td><td>68.8±0.8</td><td>75.3± 0.5</td><td>58.4±0.8</td><td>69.9±3.0</td><td>75.9 ± 1.6</td><td>76.0±0.7</td><td>75.3 ± 2.5</td><td>62.7 ± 0.4</td><td>64.1 ± 1.5</td></tr><tr><td>GraphCL [24]</td><td>69.68 ± 0.67</td><td>73.87 ± 0.66</td><td>60.53 ±0.88</td><td>75.99 ± 2.65</td><td>75.38 ± 1.44</td><td>78.47 ± 1.22</td><td>69.8± 2.66</td><td>62.40 ±0.57</td><td>67.88 ± 0.85</td></tr><tr><td>AD-GCL-FIX</td><td>70.01 ±1.07</td><td>76.54 ± 0.82</td><td>63.28±0.79</td><td>79.78 ± 3.52</td><td>78.51 ±0.80</td><td>78.28 ± 0.97</td><td>72.30 ± 1.61</td><td>63.07±0.72</td><td>68.83 ± 1.26</td></tr><tr><td>Our Ranks</td><td>1</td><td>2</td><td>1</td><td>1</td><td>4</td><td>2</td><td>5</td><td>5</td><td>1</td></tr></table>",
1156
+ "bbox": [
1157
+ 173,
1158
+ 88,
1159
+ 825,
1160
+ 196
1161
+ ],
1162
+ "page_idx": 9
1163
+ },
1164
+ {
1165
+ "type": "table",
1166
+ "img_path": "images/57e328c08e8801e9bbf5752a81bad13c3b60812af8a0b3ac33803e8a9893efe4.jpg",
1167
+ "table_caption": [],
1168
+ "table_footnote": [
1169
+ "Table 3: Semi-supervised learning performance with $10 \\%$ labels on TU datasets [73] (10-Fold Accuracy $( \\% ) \\pm$ std over 5 runs). Bold/Bold⋆ indicate our methods outperform baselines with $\\geq 0 . 5 \\ \\mathrm { s t d } / \\geq 2$ std respectively. "
1170
+ ],
1171
+ "table_body": "<table><tr><td>Dataset</td><td>NCI1</td><td>PROTEINS</td><td>DD</td><td>COLLAB</td><td>RDT-B</td><td>RDT-M5K</td></tr><tr><td>No Pre-Train</td><td>73.72 ± 0.24</td><td>70.40± 1.54</td><td>73.56± 0.41</td><td>73.71± 0.27</td><td>86.63± 0.27</td><td>51.33 ± 0.44</td></tr><tr><td>SS-GCN-A</td><td>73.59 ± 0.32</td><td>70.29 ±0.64</td><td>74.30± 0.81</td><td>74.19 ± 0.13</td><td>87.74 ± 0.39</td><td>52.01 ±0.20</td></tr><tr><td>GAE [20]</td><td>74.36± 0.24</td><td>70.51 ± 0.17</td><td>74.54± 0.68</td><td>75.09 ± 0.19</td><td>87.69 ± 0.40</td><td>53.58 ±0.13</td></tr><tr><td>InfoGraph [18]</td><td>74.86 ± 0.26</td><td>72.27 ± 0.40</td><td>75.78± 0.34</td><td>73.76 ± 0.29</td><td>88.66 ± 0.95</td><td>53.61 ± 0.31</td></tr><tr><td>GraphCL [24]</td><td>74.63 ± 0.25</td><td>74.17 ± 0.34</td><td>76.17 ± 1.37</td><td>74.23 ± 0.21</td><td>89.11 ± 0.19</td><td>52.55± 0.45</td></tr><tr><td>AD-GCL-FIX Our Ranks</td><td>75.18 ± 0.31 1</td><td>73.96± 0.47 2</td><td>77.91±0.73* 1</td><td>75.82± 0.26* 1</td><td>90.10±0.15* 1</td><td>53.49±0.28 3</td></tr></table>",
1172
+ "bbox": [
1173
+ 236,
1174
+ 241,
1175
+ 759,
1176
+ 337
1177
+ ],
1178
+ "page_idx": 9
1179
+ },
1180
+ {
1181
+ "type": "text",
1182
+ "text": "node attribute masking and context prediction that utilize edge, node and subgraph context respectively. \nMore detailed setup is given in Appendix G. ",
1183
+ "bbox": [
1184
+ 174,
1185
+ 393,
1186
+ 823,
1187
+ 421
1188
+ ],
1189
+ "page_idx": 9
1190
+ },
1191
+ {
1192
+ "type": "text",
1193
+ "text": "According to Table 2, AD-GCL-FIX significantly outperforms baselines in 3 out of 9 datasets and achieves a mean rank of 2.4 across these 9 datasets which is better than all baselines. Note that although AD-GCL only achieves 5th on some datasets, AD-GCL still significantly outperforms InfoGraph [18] and GraphCL [24], both of which are strong GNN self-training baselines. In contrast to InfoGraph [18] and GraphCL [24], AD-GCL achieves some performance much closer to those baselines (EdgePred, AttrMasking and ContextPred) based on domain knowledge and extensive evaluation in [17]. This is rather significant as our method utilizes only edge dropping GDA, which again shows the effectiveness of the AD-GCL principle. ",
1194
+ "bbox": [
1195
+ 174,
1196
+ 428,
1197
+ 825,
1198
+ 539
1199
+ ],
1200
+ "page_idx": 9
1201
+ },
1202
+ {
1203
+ "type": "text",
1204
+ "text": "5.4 Semi-Supervised Learning ",
1205
+ "text_level": 1,
1206
+ "bbox": [
1207
+ 176,
1208
+ 563,
1209
+ 398,
1210
+ 578
1211
+ ],
1212
+ "page_idx": 9
1213
+ },
1214
+ {
1215
+ "type": "text",
1216
+ "text": "Lastly, we evaluate AD-GCL on semi-supervised learning for graph classification on the benchmark TU datasets [73]. We follow the setting in [24]: GNNs are pre-trained on one dataset using selfsupervised learning and later fine-tuned based on $10 \\%$ label supervision on the same dataset. Again, we only consider AD-GCL-FIX and compare it with several baselines in [24]: 1) no pre-trained GCN, which is directly trained by the $10 \\%$ labels from scratch, 2) SS-GCN-A, a baseline that introduces more labelled data by creating random augmentations and then gets trained from scratch, 3) a predictive method GAE [20] that utilizes adjacency reconstruction in the pre-training phase, and GCL methods, 4) InfoGraph [18] and 5) GraphCL [24]. Note that here we have to keep the encoder architecture same and thus AD-GCL-FIX adopts GCN as the encoder. Table 3 shows the results. AD-GCL-FIX significantly outperforms baselines in 3 out of 6 datasets and achieves a mean rank of 1.5 across these 6 datasets, which again demonstrates the strength of AD-GCL. ",
1217
+ "bbox": [
1218
+ 173,
1219
+ 590,
1220
+ 826,
1221
+ 743
1222
+ ],
1223
+ "page_idx": 9
1224
+ },
1225
+ {
1226
+ "type": "text",
1227
+ "text": "6 Conclusions ",
1228
+ "text_level": 1,
1229
+ "bbox": [
1230
+ 174,
1231
+ 767,
1232
+ 305,
1233
+ 784
1234
+ ],
1235
+ "page_idx": 9
1236
+ },
1237
+ {
1238
+ "type": "text",
1239
+ "text": "In this work we have developed a theoretically motivated, novel principle: AD-GCL that goes a step beyond the conventional InfoMax objective for self-supervised learning of GNNs. The optimal GNN encoders that are agnostic to the downstream tasks are the ones that capture the minimal sufficient information to identify each graph in the dataset. To achieve this goal, AD-GCL suggests to better graph contrastive learning via optimizing graph augmentations in an adversarial way. Following this principle, we developed a practical instantiation based on learnable edge dropping. We have extensively analyzed and demonstrated the benefits of AD-GCL and its instantiation with real-world datasets for graph property prediction in unsupervised, transfer and semi-supervised learning settings. ",
1240
+ "bbox": [
1241
+ 174,
1242
+ 800,
1243
+ 825,
1244
+ 911
1245
+ ],
1246
+ "page_idx": 9
1247
+ },
1248
+ {
1249
+ "type": "text",
1250
+ "text": "Acknowledgments and Disclosure of Funding ",
1251
+ "text_level": 1,
1252
+ "bbox": [
1253
+ 174,
1254
+ 88,
1255
+ 553,
1256
+ 107
1257
+ ],
1258
+ "page_idx": 10
1259
+ },
1260
+ {
1261
+ "type": "text",
1262
+ "text": "We greatly thank the actionable suggestions given by reviewers and the area chair. S.S. and J.N. are supported by the National Science Foundation under contract numbers CCF-1918483 and IIS1618690. P.L. is partly supported by the 2021 JP Morgan Faculty Award and the National Science Foundation (NSF) award HDR-2117997. ",
1263
+ "bbox": [
1264
+ 174,
1265
+ 121,
1266
+ 826,
1267
+ 176
1268
+ ],
1269
+ "page_idx": 10
1270
+ },
1271
+ {
1272
+ "type": "text",
1273
+ "text": "References ",
1274
+ "text_level": 1,
1275
+ "bbox": [
1276
+ 174,
1277
+ 196,
1278
+ 266,
1279
+ 213
1280
+ ],
1281
+ "page_idx": 10
1282
+ },
1283
+ {
1284
+ "type": "text",
1285
+ "text": "[1] A. W. Senior, R. Evans, J. Jumper, J. Kirkpatrick, L. Sifre, T. Green, C. Qin, A. Žídek, A. W. Nelson, A. Bridgland et al., “Improved protein structure prediction using potentials from deep learning,” Nature, vol. 577, no. 7792, pp. 706–710, 2020. \n[2] J. Shlomi, P. Battaglia, and J.-R. Vlimant, “Graph neural networks in particle physics,” Machine Learning: Science and Technology, vol. 2, no. 2, p. 021001, 2020. \n[3] W. L. Hamilton, “Graph representation learning,” Synthesis Lectures on Artificial Intelligence and Machine Learning, vol. 14, no. 3, pp. 1–159, 2020. \n[4] K. Hornik, M. Stinchcombe, H. White et al., “Multilayer feedforward networks are universal approximators.” Neural Networks, vol. 2, no. 5, pp. 359–366, 1989. \n[5] G. Cybenko, “Approximation by superpositions of a sigmoidal function,” Mathematics of control, signals and systems, vol. 2, no. 4, pp. 303–314, 1989. \n[6] F. Scarselli, M. Gori, A. C. Tsoi, M. Hagenbuchner, and G. Monfardini, “The graph neural network model,” IEEE Transactions on Neural Networks, vol. 20, no. 1, pp. 61–80, 2008. \n[7] I. Chami, S. Abu-El-Haija, B. Perozzi, C. Ré, and K. Murphy, “Machine learning on graphs: A model and comprehensive taxonomy,” arXiv preprint arXiv:2005.03675, 2020. \n[8] Z. Zhang, P. Cui, and W. Zhu, “Deep learning on graphs: A survey,” IEEE TKDE, 2020. \n[9] W. L. Hamilton, R. Ying, and J. Leskovec, “Representation learning on graphs: Methods and applications,” IEEE Data Engineering Bulletin, vol. 40, no. 3, pp. 52–74, 2017. \n[10] T. N. Kipf and M. Welling, “Semi-supervised classification with graph convolutional networks,” in International Conference on Learning Representations, 2017. \n[11] H. Dai, B. Dai, and L. Song, “Discriminative embeddings of latent variable models for structured data,” in International Conference on Machine Learning. PMLR, 2016, pp. 2702–2711. \n[12] P. Velickovi ˇ c, G. Cucurull, A. Casanova, A. Romero, P. Liò, and Y. Bengio, “Graph attention ´ networks,” in International Conference on Learning Representations, 2018. \n[13] M. Zhang, Z. Cui, M. Neumann, and Y. Chen, “An end-to-end deep learning architecture for graph classification,” in the AAAI Conference on Artificial Intelligence, 2018, pp. 4438–4445. \n[14] K. Xu, W. Hu, J. Leskovec, and S. Jegelka, “How powerful are graph neural networks?” in International Conference on Learning Representations, 2019. \n[15] C. Morris, M. Ritzert, M. Fey, W. L. Hamilton, J. E. Lenssen, G. Rattan, and M. Grohe, “Weisfeiler and leman go neural: Higher-order graph neural networks,” in the AAAI Conference on Artificial Intelligence, vol. 33, 2019, pp. 4602–4609. \n[16] P. Li, Y. Wang, H. Wang, and J. Leskovec, “Distance encoding: Design provably more powerful neural networks for graph representation learning,” Advances in Neural Information Processing Systems, vol. 33, 2020. \n[17] W. Hu, B. Liu, J. Gomes, M. Zitnik, P. Liang, V. Pande, and J. Leskovec, “Strategies for pre-training graph neural networks,” International Conference on Learning Representations, 2020. \n[18] F.-Y. Sun, J. Hoffmann, and J. Tang, “Infograph: Unsupervised and semi-supervised graph-level representation learning via mutual information maximization,” arXiv preprint arXiv:1908.01000, 2019. \n[19] H. G. Vogel, Drug discovery and evaluation: pharmacological assays. Springer Science & Business Media, 2002. \n[20] T. N. Kipf and M. Welling, “Variational graph auto-encoders,” arXiv preprint arXiv:1611.07308, 2016. \n[21] A. Grover, A. Zweig, and S. Ermon, “Graphite: Iterative generative modeling of graphs,” in International Conference on Machine Learning. PMLR, 2019, pp. 2434–2444. \n[22] Z. Peng, W. Huang, M. Luo, Q. Zheng, Y. Rong, T. Xu, and J. Huang, “Graph representation learning via graphical mutual information maximization,” in Proceedings of The Web Conference 2020, 2020. \n[23] P. Velickovi ˇ c, W. Fedus, W. L. Hamilton, P. Liò, Y. Bengio, and R. D. Hjelm, “Deep graph ´ infomax,” arXiv preprint arXiv:1809.10341, 2018. \n[24] Y. You, T. Chen, Y. Sui, T. Chen, Z. Wang, and Y. Shen, “Graph contrastive learning with augmentations,” Advances in Neural Information Processing Systems, vol. 33, 2020. \n[25] K. Hassani and A. H. Khasahmadi, “Contrastive multi-view representation learning on graphs,” in International Conference on Machine Learning. PMLR, 2020, pp. 4116–4126. \n[26] Y. Xie, Z. Xu, Z. Wang, and S. Ji, “Self-supervised learning of graph neural networks: A unified review,” arXiv preprint arXiv:2102.10757, 2021. \n[27] Y. Liu, S. Pan, M. Jin, C. Zhou, F. Xia, and P. S. Yu, “Graph self-supervised learning: A survey,” arXiv preprint arXiv:2103.00111, 2021. \n[28] S. Zhang, Z. Hu, A. Subramonian, and Y. Sun, “Motif-driven contrastive learning of graph representations,” arXiv preprint arXiv:2012.12533, 2020. \n[29] S. Thakoor, C. Tallec, M. G. Azar, R. Munos, P. Velickovi ˇ c, and M. Valko, “Bootstrapped ´ representation learning on graphs,” arXiv preprint arXiv:2102.06514, 2021. \n[30] Y. Zhu, Y. Xu, F. Yu, Q. Liu, S. Wu, and L. Wang, “Graph contrastive learning with adaptive augmentation,” arXiv preprint arXiv:2010.14945, 2020. \n[31] J. Qiu, Q. Chen, Y. Dong, J. Zhang, H. Yang, M. Ding, K. Wang, and J. Tang, “Gcc: Graph contrastive coding for graph neural network pre-training,” in Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, 2020, pp. 1150– 1160. \n[32] M. Belkin and P. Niyogi, “Laplacian eigenmaps for dimensionality reduction and data representation,” Neural computation, vol. 15, no. 6, pp. 1373–1396, 2003. \n[33] B. Perozzi, R. Al-Rfou, and S. Skiena, “Deepwalk: Online learning of social representations,” in Proceedings of the 20th ACM SIGKDD international conference on Knowledge discovery and data mining, 2014, pp. 701–710. \n[34] A. Grover and J. Leskovec, “node2vec: Scalable feature learning for networks,” in the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2016, pp. 855–864. \n[35] L. F. Ribeiro, P. H. Saverese, and D. R. Figueiredo, “struc2vec: Learning node representations from structural identity,” in the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2017, pp. 385–394. \n[36] W. Hamilton, Z. Ying, and J. Leskovec, “Inductive representation learning on large graphs,” in Advances in Neural Information Processing Systems, 2017. \n[37] K. Henderson, B. Gallagher, T. Eliassi-Rad, H. Tong, S. Basu, L. Akoglu, D. Koutra, C. Faloutsos, and L. Li, “Rolx: structural role extraction & mining in large graphs,” in the ACM SIGKDD international conference on Knowledge discovery and data mining, 2012, pp. 1231–1239. \n[38] C. Donnat, M. Zitnik, D. Hallac, and J. Leskovec, “Learning structural node embeddings via diffusion wavelets,” in the ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, 2018, pp. 1320–1329. \n[39] R. Linsker, “Self-organization in a perceptual network,” Computer, vol. 21, no. 3, pp. 105–117, 1988. \n[40] M. Tschannen, J. Djolonga, P. K. Rubenstein, S. Gelly, and M. Lucic, “On mutual information maximization for representation learning,” in International Conference on Learning Representations, 2020. \n[41] N. Tishby, F. C. Pereira, and W. Bialek, “The information bottleneck method,” arXiv preprint physics/0004057, 2000. \n[42] N. Tishby and N. Zaslavsky, “Deep learning and the information bottleneck principle,” in 2015 IEEE Information Theory Workshop (ITW). IEEE, 2015. \n[43] Z. Goldfeld and Y. Polyanskiy, “The information bottleneck problem and its applications in machine learning,” IEEE Journal on Selected Areas in Information Theory, 2020. \n[44] A. A. Alemi, I. Fischer, J. V. Dillon, and K. Murphy, “Deep variational information bottleneck,” arXiv preprint arXiv:1612.00410, 2016. \n[45] X. B. Peng, A. Kanazawa, S. Toyer, P. Abbeel, and S. Levine, “Variational discriminator bottleneck: Improving imitation learning, inverse rl, and gans by constraining information flow,” arXiv preprint arXiv:1810.00821, 2018. \n[46] I. Higgins, L. Matthey, A. Pal, C. Burgess, X. Glorot, M. Botvinick, S. Mohamed, and A. Lerchner, “beta-vae: Learning basic visual concepts with a constrained variational framework.” in International Conference on Learning Representations, 2017. \n[47] T. Wu, H. Ren, P. Li, and J. Leskovec, “Graph information bottleneck,” in Advances in Neural Information Processing Systems, 2020. \n[48] J. Yu, T. Xu, Y. Rong, Y. Bian, J. Huang, and R. He, “Recognizing predictive substructures with subgraph information bottleneck,” International Conference on Learning Representations, 2021. \n[49] J. Gilmer, S. S. Schoenholz, P. F. Riley, O. Vinyals, and G. E. Dahl, “Neural message passing for quantum chemistry,” in International Conference on Machine Learning. JMLR. org, 2017. \n[50] T. M. Cover and J. A. Thomas, Elements of Information Theory. John Wiley & Sons, 2012. \n[51] B. Weisfeiler and A. Leman, “A reduction of a graph to a canonical form and an algebra arising during this reduction,” Nauchno-Technicheskaya Informatsia, 1968. \n[52] W. Hu, M. Fey, M. Zitnik, Y. Dong, H. Ren, B. Liu, M. Catasta, and J. Leskovec, “Open graph benchmark: Datasets for machine learning on graphs,” arXiv preprint arXiv:2005.00687, 2020. \n[53] D. Duvenaud, D. Maclaurin, J. Aguilera-Iparraguirre, R. Gómez-Bombarelli, T. Hirzel, A. Aspuru-Guzik, and R. P. Adams, “Convolutional networks on graphs for learning molecular fingerprints,” Advances in Neural Information Processing Systems, vol. 2015, pp. 2224–2232, 2015. \n[54] E. N. Gilbert, “Random graphs,” The Annals of Mathematical Statistics, vol. 30, no. 4, pp. 1141–1144, 1959. \n[55] P. Erdos and A. Rényi, “On random graphs i.” ˝ Publ. Math. Debrecen, vol. 6, pp. 290–297, 1959. \n[56] C. J. Maddison, A. Mnih, and Y. W. Teh, “The concrete distribution: A continuous relaxation of discrete random variables,” in International Conference on Learning Representations, 2017. \n[57] E. Jang, S. Gu, and B. Poole, “Categorical reparameterization with gumbel-softmax,” in International Conference on Learning Representations, 2017. \n[58] D. Luo, W. Cheng, D. Xu, W. Yu, B. Zong, H. Chen, and X. Zhang, “Parameterized explainer for graph neural network,” Advances in Neural Information Processing Systems, vol. 33, 2020. \n[59] A. v. d. Oord, Y. Li, and O. Vinyals, “Representation learning with contrastive predictive coding,” arXiv preprint arXiv:1807.03748, 2018. \n[60] Y. Tian, D. Krishnan, and P. Isola, “Contrastive multiview coding,” arXiv preprint arXiv:1906.05849, 2019. \n[61] B. Poole, S. Ozair, A. Van Den Oord, A. Alemi, and G. Tucker, “On variational bounds of mutual information,” in International Conference on Machine Learning, 2019. \n[62] T. Chen, S. Kornblith, M. Norouzi, and G. Hinton, “A simple framework for contrastive learning of visual representations,” in International Conference on Machine Learning. PMLR, 2020, pp. 1597–1607. \n[63] S. Becker and G. E. Hinton, “Self-organizing neural network that discovers surfaces in randomdot stereograms,” Nature, vol. 355, no. 6356, pp. 161–163, 1992. \n[64] O. Henaff, “Data-efficient image recognition with contrastive predictive coding,” in International Conference on Machine Learning. PMLR, 2020, pp. 4182–4192. \n[65] R. D. Hjelm, A. Fedorov, S. Lavoie-Marchildon, K. Grewal, P. Bachman, A. Trischler, and Y. Bengio, “Learning deep representations by mutual information estimation and maximization,” in International Conference on Learning Representations, 2019. \n[66] T. Chen, S. Kornblith, K. Swersky, M. Norouzi, and G. Hinton, “Big self-supervised models are strong semi-supervised learners,” arXiv preprint arXiv:2006.10029, 2020. \n[67] P. Velickovi ˇ c, W. Fedus, W. L. Hamilton, P. Liò, Y. Bengio, and R. D. Hjelm, “Deep graph ´ infomax,” arXiv preprint arXiv:1809.10341, 2018. \n[68] Z. Peng, W. Huang, M. Luo, Q. Zheng, Y. Rong, T. Xu, and J. Huang, “Graph representation learning via graphical mutual information maximization,” in Proceedings of The Web Conference 2020, 2020, pp. 259–270. \n[69] Y. Jiao, Y. Xiong, J. Zhang, Y. Zhang, T. Zhang, and Y. Zhu, “Sub-graph contrast for scalable self-supervised graph representation learning,” arXiv preprint arXiv:2009.10273, 2020. \n[70] Y. You, T. Chen, Y. Shen, and Z. Wang, “Graph contrastive learning automated,” arXiv preprint arXiv:2106.07594, 2021. \n[71] Y. Tian, C. Sun, B. Poole, D. Krishnan, C. Schmid, and P. Isola, “What makes for good views for contrastive learning?” in Advances in Neural Information Processing Systems, 2020. \n[72] K. Xu, W. Hu, J. Leskovec, and S. Jegelka, “How powerful are graph neural networks?” in International Conference on Learning Representations, 2019. \n[73] C. Morris, N. M. Kriege, F. Bause, K. Kersting, P. Mutzel, and M. Neumann, “Tudataset: A collection of benchmark datasets for learning with graphs,” in ICML 2020 Workshop on Graph Representation Learning and Beyond ( $G R L +$ 2020), 2020. [Online]. Available: www.graphlearning.io \n[74] V. P. Dwivedi, C. K. Joshi, T. Laurent, Y. Bengio, and X. Bresson, “Benchmarking graph neural networks,” arXiv preprint arXiv:2003.00982, 2020. \n[75] N. M. Kriege, F. D. Johansson, and C. Morris, “A survey on graph kernels,” Applied Network Science, vol. 5, no. 1, pp. 1–42, 2020. \n[76] P. Yanardag and S. Vishwanathan, “Deep graph kernels,” in Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. ACM, 2015, pp. 1365–1374. \n[77] N. Shervashidze, P. Schweitzer, E. J. v. Leeuwen, K. Mehlhorn, and K. M. Borgwardt, “Weisfeiler-lehman graph kernels,” Journal of Machine Learning Research, vol. 12, no. Sep, pp. 2539–2561, 2011. \n[78] A. Narayanan, M. Chandramohan, R. Venkatesan, L. Chen, Y. Liu, and S. Jaiswal, “graph2vec: Learning distributed representations of graphs,” arXiv preprint arXiv:1707.05005, 2017. \n[79] B. Adhikari, Y. Zhang, N. Ramakrishnan, and B. A. Prakash, “Sub2vec: Feature learning for subgraphs,” in Pacific-Asia Conference on Knowledge Discovery and Data Mining. Springer, 2018, pp. 170–182. \n[80] T. M. Cover, Elements of information theory. John Wiley & Sons, 1999. \n[81] L. Babai, “Groups, graphs, algorithms: The graph isomorphism problem,” in Proc. ICM, vol. 3. World Scientific, 2018, pp. 3303–3320. \n[82] H. A. Helfgott, J. Bajpai, and D. Dona, “Graph isomorphisms in quasi-polynomial time,” arXiv preprint arXiv:1710.04574, 2017. \n[83] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay, “Scikit-learn: Machine learning in Python,” Journal of Machine Learning Research, vol. 12, pp. 2825–2830, 2011. \n[84] C. Zhu, R. H. Byrd, P. Lu, and J. Nocedal, “Algorithm 778: L-bfgs-b: Fortran subroutines for large-scale bound-constrained optimization,” ACM Transactions on Mathematical Software (TOMS), vol. 23, no. 4, pp. 550–560, 1997. \n[85] R.-E. Fan, K.-W. Chang, C.-J. Hsieh, X.-R. Wang, and C.-J. Lin, “Liblinear: A library for large linear classification,” Journal of Machine Learning Research, vol. 9, pp. 1871–1874, 2008. ",
1286
+ "bbox": [
1287
+ 171,
1288
+ 223,
1289
+ 828,
1290
+ 917
1291
+ ],
1292
+ "page_idx": 10
1293
+ },
1294
+ {
1295
+ "type": "text",
1296
+ "text": "",
1297
+ "bbox": [
1298
+ 171,
1299
+ 49,
1300
+ 830,
1301
+ 915
1302
+ ],
1303
+ "page_idx": 11
1304
+ },
1305
+ {
1306
+ "type": "text",
1307
+ "text": "",
1308
+ "bbox": [
1309
+ 171,
1310
+ 63,
1311
+ 828,
1312
+ 919
1313
+ ],
1314
+ "page_idx": 12
1315
+ },
1316
+ {
1317
+ "type": "text",
1318
+ "text": "",
1319
+ "bbox": [
1320
+ 171,
1321
+ 66,
1322
+ 828,
1323
+ 914
1324
+ ],
1325
+ "page_idx": 13
1326
+ }
1327
+ ]
parse/train/ioyq7NsR1KJ/ioyq7NsR1KJ_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ioyq7NsR1KJ/ioyq7NsR1KJ_model.json ADDED
The diff for this file is too large to render. See raw diff