ZHANGYUXUAN-zR commited on
Commit
3670755
·
verified ·
1 Parent(s): 058a2fc

Add files using upload-large-folder tool

Browse files
parse/train/H196sainb/H196sainb.md ADDED
@@ -0,0 +1,314 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # WORD TRANSLATION WITHOUT PARALLEL DATA
2
+
3
+ Guillaume Lample∗ † ‡ , Alexis Conneau∗ † § , Marc’Aurelio Ranzato† , Ludovic Denoyer‡ , Herve J ´ egou ´ † {glample,aconneau,ranzato,rvj}@fb.com ludovic.denoyer@upmc.fr
4
+
5
+ # ABSTRACT
6
+
7
+ State-of-the-art methods for learning cross-lingual word embeddings have relied on bilingual dictionaries or parallel corpora. Recent studies showed that the need for parallel data supervision can be alleviated with character-level information. While these methods showed encouraging results, they are not on par with their supervised counterparts and are limited to pairs of languages sharing a common alphabet. In this work, we show that we can build a bilingual dictionary between two languages without using any parallel corpora, by aligning monolingual word embedding spaces in an unsupervised way. Without using any character information, our model even outperforms existing supervised methods on cross-lingual tasks for some language pairs. Our experiments demonstrate that our method works very well also for distant language pairs, like English-Russian or EnglishChinese. We finally describe experiments on the English-Esperanto low-resource language pair, on which there only exists a limited amount of parallel data, to show the potential impact of our method in fully unsupervised machine translation. Our code, embeddings and dictionaries are publicly available1.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Most successful methods for learning distributed representations of words (e.g. Mikolov et al. (2013c;a); Pennington et al. (2014); Bojanowski et al. (2017)) rely on the distributional hypothesis of Harris (1954), which states that words occurring in similar contexts tend to have similar meanings. Levy & Goldberg (2014) show that the skip-gram with negative sampling method of Mikolov et al. (2013c) amounts to factorizing a word-context co-occurrence matrix, whose entries are the pointwise mutual information of the respective word and context pairs. Exploiting word cooccurrence statistics leads to word vectors that reflect the semantic similarities and dissimilarities: similar words are close in the embedding space and conversely.
12
+
13
+ Mikolov et al. (2013b) first noticed that continuous word embedding spaces exhibit similar structures across languages, even when considering distant language pairs like English and Vietnamese. They proposed to exploit this similarity by learning a linear mapping from a source to a target embedding space. They employed a parallel vocabulary of five thousand words as anchor points to learn this mapping and evaluated their approach on a word translation task. Since then, several studies aimed at improving these cross-lingual word embeddings (Faruqui & Dyer (2014); Xing et al. (2015); Lazaridou et al. (2015); Ammar et al. (2016); Artetxe et al. (2016); Smith et al. (2017)), but they all rely on bilingual word lexicons.
14
+
15
+ Recent attempts at reducing the need for bilingual supervision (Smith et al., 2017) employ identical character strings to form a parallel vocabulary. The iterative method of Artetxe et al. (2017) gradually aligns embedding spaces, starting from a parallel vocabulary of aligned digits. These methods are however limited to similar languages sharing a common alphabet, such as European languages. Some recent methods explored distribution-based approach (Cao et al., 2016) or adversarial training Zhang et al. (2017b) to obtain cross-lingual word embeddings without any parallel data. While these approaches sound appealing, their performance is significantly below supervised methods. To sum up, current methods have either not reached competitive performance, or they still require parallel data, such as aligned corpora (Gouws et al., 2015; Vulic & Moens, 2015) or a seed parallel lexicon (Duong et al., 2016).
16
+
17
+ In this paper, we introduce a model that either is on par, or outperforms supervised state-of-the-art methods, without employing any cross-lingual annotated data. We only use two large monolingual corpora, one in the source and one in the target language. Our method leverages adversarial training to learn a linear mapping from a source to a target space and operates in two steps. First, in a twoplayer game, a discriminator is trained to distinguish between the mapped source embeddings and the target embeddings, while the mapping (which can be seen as a generator) is jointly trained to fool the discriminator. Second, we extract a synthetic dictionary from the resulting shared embedding space and fine-tune the mapping with the closed-form Procrustes solution from Schonemann (1966). ¨ Since the method is unsupervised, cross-lingual data can not be used to select the best model. To overcome this issue, we introduce an unsupervised selection metric that is highly correlated with the mapping quality and that we use both as a stopping criterion and to select the best hyper-parameters.
18
+
19
+ In summary, this paper makes the following main contributions:
20
+
21
+ • We present an unsupervised approach that reaches or outperforms state-of-the-art supervised approaches on several language pairs and on three different evaluation tasks, namely word translation, sentence translation retrieval, and cross-lingual word similarity. On a standard word translation retrieval benchmark, using 200k vocabularies, our method reaches $6 6 . 2 \%$ accuracy on English-Italian while the best supervised approach is at $6 3 . 7 \%$ .
22
+ • We introduce a cross-domain similarity adaptation to mitigate the so-called hubness problem (points tending to be nearest neighbors of many points in high-dimensional spaces). It is inspired by the self-tuning method from Zelnik-manor & Perona (2005), but adapted to our two-domain scenario in which we must consider a bi-partite graph for neighbors. This approach significantly improves the absolute performance, and outperforms the state of the art both in supervised and unsupervised setups on word-translation benchmarks.
23
+ We propose an unsupervised criterion that is highly correlated with the quality of the mapping, that can be used both as a stopping criterion and to select the best hyper-parameters. We release high-quality dictionaries for 12 oriented languages pairs, as well as the corresponding supervised and unsupervised word embeddings. We demonstrate the effectiveness of our method using an example of a low-resource language pair where parallel corpora are not available (English-Esperanto) for which our method is particularly suited.
24
+
25
+ The paper is organized as follows. Section 2 describes our unsupervised approach with adversarial training and our refinement procedure. We then present our training procedure with unsupervised model selection in Section 3. We report in Section 4 our results on several cross-lingual tasks for several language pairs and compare our approach to supervised methods. Finally, we explain how our approach differs from recent related work on learning cross-lingual word embeddings.
26
+
27
+ # 2 MODEL
28
+
29
+ In this paper, we always assume that we have two sets of embeddings trained independently on monolingual data. Our work focuses on learning a mapping between the two sets such that translations are close in the shared space. Mikolov et al. (2013b) show that they can exploit the similarities of monolingual embedding spaces to learn such a mapping. For this purpose, they use a known dictionary of $n = 5 0 0 0$ pairs of words $\{ x _ { i } , y _ { i } \} _ { i \in \{ 1 , n \} }$ , and learn a linear mapping $W$ between the source and the target space such that
30
+
31
+ $$
32
+ W ^ { \star } = \operatorname * { a r g m i n } _ { W \in M _ { d } ( \mathbb { R } ) } \| W X - Y \| _ { \mathrm { F } }
33
+ $$
34
+
35
+ where $d$ is the dimension of the embeddings, $M _ { d } ( \mathbb { R } )$ is the space of $d \times d$ matrices of real numbers, and $X$ and $Y$ are two aligned matrices of size $d \times n$ containing the embeddings of the words in the parallel vocabulary. The translation $t$ of any source word $s$ is defined as $t = \operatorname { a r g m a x } _ { t } \cos ( W x _ { s } , y _ { t } )$
36
+
37
+ ![](images/a375fb56e8f18a1414f7462979179ca6f187e0446ab5929b41af9f6db3dbefb1.jpg)
38
+ Figure 1: Toy illustration of the method. (A) There are two distributions of word embeddings, English words in red denoted by $X$ and Italian words in blue denoted by $Y$ , which we want to align/translate. Each dot represents a word in that space. The size of the dot is proportional to the frequency of the words in the training corpus of that language. (B) Using adversarial learning, we learn a rotation matrix $W$ which roughly aligns the two distributions. The green stars are randomly selected words that are fed to the discriminator to determine whether the two word embeddings come from the same distribution. (C) The mapping $W$ is further refined via Procrustes. This method uses frequent words aligned by the previous step as anchor points, and minimizes an energy function that corresponds to a spring system between anchor points. The refined mapping is then used to map all words in the dictionary. $\mathbf { \tau } ( \mathbf { D } )$ Finally, we translate by using the mapping $W$ and a distance metric, dubbed CSLS, that expands the space where there is high density of points (like the area around the word “cat”), so that “hubs” (like the word “cat”) become less close to other word vectors than they would otherwise (compare to the same region in panel (A)).
39
+
40
+ In practice, Mikolov et al. (2013b) obtained better results on the word translation task using a simple linear mapping, and did not observe any improvement when using more advanced strategies like multilayer neural networks. Xing et al. (2015) showed that these results are improved by enforcing an orthogonality constraint on $W$ . In that case, the equation (1) boils down to the Procrustes problem, which advantageously offers a closed form solution obtained from the singular value decomposition (SVD) of ${ \check { Y } } { \check { X } } ^ { T }$ :
41
+
42
+ $$
43
+ \boldsymbol { W } ^ { \star } = \operatorname * { a r g m i n } _ { \boldsymbol { W } \in O _ { d } ( \mathbb { R } ) } \| \boldsymbol { W } \boldsymbol { X } - \boldsymbol { Y } \| _ { \mathrm { F } } = \boldsymbol { U } \boldsymbol { V } ^ { T } , \operatorname { w i t h } \boldsymbol { U } \boldsymbol { \Sigma } \boldsymbol { V } ^ { T } = \mathrm { S } \mathbf { V } \mathbf { D } ( \boldsymbol { Y } \boldsymbol { X } ^ { T } ) .
44
+ $$
45
+
46
+ In this paper, we show how to learn this mapping $W$ without cross-lingual supervision; an illustration of the approach is given in Fig. 1. First, we learn an initial proxy of $W$ by using an adversarial criterion. Then, we use the words that match the best as anchor points for Procrustes. Finally, we improve performance over less frequent words by changing the metric of the space, which leads to spread more of those points in dense regions. Next, we describe the details of each of these steps.
47
+
48
+ # 2.1 DOMAIN-ADVERSARIAL SETTING
49
+
50
+ In this section, we present our domain-adversarial approach for learning $W$ without cross-lingual supervision. Let $\bar { \mathcal { X } } \bar { = } \{ x _ { 1 } , . . . , x _ { n } \}$ and ${ \mathcal { V } } = \{ y _ { 1 } , . . . , { \bar { y _ { m } } } \}$ be two sets of $n$ and $m$ word embeddings coming from a source and a target language respectively. A model is trained to discriminate between elements randomly sampled from $W \mathcal { X } = \{ W x _ { 1 } , . . . , W x _ { n } \}$ and $\mathcal { V }$ . We call this model the discriminator. $W$ is trained to prevent the discriminator from making accurate predictions. As a result, this is a two-player game, where the discriminator aims at maximizing its ability to identify the origin of an embedding, and $W$ aims at preventing the discriminator from doing so by making $W \mathcal { X }$ and $\mathcal { V }$ as similar as possible. This approach is in line with the work of Ganin et al. (2016), who proposed to learn latent representations invariant to the input domain, where in our case, a domain is represented by a language (source or target).
51
+
52
+ Discriminator objective We refer to the discriminator parameters as $\theta _ { D }$ . We consider the probability $P _ { \theta _ { D } } ( \mathrm { s o u r c e } = 1 | z )$ that a vector $z$ is the mapping of a source embedding (as opposed to a target embedding) according to the discriminator. The discriminator loss can be written as:
53
+
54
+ $$
55
+ \mathcal { L } _ { D } ( \theta _ { D } | W ) = - \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \log P _ { \theta _ { D } } \big ( \mathrm { s o u r c e } = 1 \big | W x _ { i } \big ) - \frac { 1 } { m } \sum _ { i = 1 } ^ { m } \log P _ { \theta _ { D } } \big ( \mathrm { s o u r c e } = 0 \big | y _ { i } \big ) .
56
+ $$
57
+
58
+ Mapping objective In the unsupervised setting, $W$ is now trained so that the discriminator is unable to accurately predict the embedding origins:
59
+
60
+ $$
61
+ \mathcal { L } _ { W } ( W | \theta _ { D } ) = - \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \log P _ { \theta _ { D } } \left( \mathrm { s o u r c e } = 0 \middle | W x _ { i } \right) - \frac { 1 } { m } \sum _ { i = 1 } ^ { m } \log P _ { \theta _ { D } } \left( \mathrm { s o u r c e } = 1 \middle | y _ { i } \right) .
62
+ $$
63
+
64
+ Learning algorithm To train our model, we follow the standard training procedure of deep adversarial networks of Goodfellow et al. (2014). For every input sample, the discriminator and the mapping matrix $W$ are trained successively with stochastic gradient updates to respectively minimize $\mathcal { L } _ { D }$ and ${ \mathcal { L } } _ { W }$ . The details of training are given in the next section.
65
+
66
+ # 2.2 REFINEMENT PROCEDURE
67
+
68
+ The matrix $W$ obtained with adversarial training gives good performance (see Table 1), but the results are still not on par with the supervised approach. In fact, the adversarial approach tries to align all words irrespective of their frequencies. However, rare words have embeddings that are less updated and are more likely to appear in different contexts in each corpus, which makes them harder to align. Under the assumption that the mapping is linear, it is then better to infer the global mapping using only the most frequent words as anchors. Besides, the accuracy on the most frequent word pairs is high after adversarial training.
69
+
70
+ To refine our mapping, we build a synthetic parallel vocabulary using the $W$ just learned with adversarial training. Specifically, we consider the most frequent words and retain only mutual nearest neighbors to ensure a high-quality dictionary. Subsequently, we apply the Procrustes solution in (2) on this generated dictionary. Considering the improved solution generated with the Procrustes algorithm, it is possible to generate a more accurate dictionary and apply this method iteratively, similarly to Artetxe et al. (2017). However, given that the synthetic dictionary obtained using adversarial training is already strong, we only observe small improvements when doing more than one iteration, i.e., the improvements on the word translation task are usually below $1 \%$ .
71
+
72
+ # 2.3 CROSS-DOMAIN SIMILARITY LOCAL SCALING (CSLS)
73
+
74
+ In this subsection, our motivation is to produce reliable matching pairs between two languages: we want to improve the comparison metric such that the nearest neighbor of a source word, in the target language, is more likely to have as a nearest neighbor this particular source word.
75
+
76
+ Nearest neighbors are by nature asymmetric: $y$ being a $K$ -NN of $x$ does not imply that $x$ is a $K$ -NN of $y$ . In high-dimensional spaces (Radovanovic et al., 2010), this leads to a phenomenon that is ´ detrimental to matching pairs based on a nearest neighbor rule: some vectors, dubbed hubs, are with high probability nearest neighbors of many other points, while others (anti-hubs) are not nearest neighbors of any point. This problem has been observed in different areas, from matching image features in vision (Jegou et al., 2010) to translating words in text understanding applications (Dinu et al., 2015). Various solutions have been proposed to mitigate this issue, some being reminiscent of pre-processing already existing in spectral clustering algorithms (Zelnik-manor & Perona, 2005).
77
+
78
+ However, most studies aiming at mitigating hubness consider a single feature distribution. In our case, we have two domains, one for each language. This particular case is taken into account by Dinu et al. (2015), who propose a pairing rule based on reverse ranks, and the inverted soft-max (ISF) by Smith et al. (2017), which we evaluate in our experimental section. These methods are not fully satisfactory because the similarity updates are different for the words of the source and target languages. Additionally, ISF requires to cross-validate a parameter, whose estimation is noisy in an unsupervised setting where we do not have a direct cross-validation criterion.
79
+
80
+ In contrast, we consider a bi-partite neighborhood graph, in which each word of a given dictionary is connected to its $K$ nearest neighbors in the other language. We denote by $\mathcal { N } _ { \mathrm { T } } ( W x _ { s } )$ the neighborhood, on this bi-partite graph, associated with a mapped source word embedding $W x _ { s }$ . All $K$ elements of $\mathcal { N } _ { \mathrm { T } } ( W \bar { x } _ { s } )$ are words from the target language. Similarly we denote by $ { \mathcal { N } } _ { \mathrm { S } } ( y _ { t } )$ the neighborhood associated with a word $t$ of the target language. We consider the mean similarity of a source embedding $x _ { s }$ to its target neighborhood as
81
+
82
+ $$
83
+ r _ { \mathrm { T } } ( W x _ { s } ) = \frac { 1 } { K } \sum _ { y _ { t } \in \mathcal { N } _ { \mathrm { T } } ( W x _ { s } ) } \cos ( W x _ { s } , y _ { t } ) ,
84
+ $$
85
+
86
+ where $\cos ( . , . )$ is the cosine similarity. Likewise we denote by $r _ { \mathrm { S } } ( y _ { t } )$ the mean similarity of a target word $y _ { t }$ to its neighborhood. These quantities are computed for all source and target word vectors with the efficient nearest neighbors implementation by Johnson et al. (2017). We use them to define a similarity measure $\mathrm { C S L S } ( . , . )$ between mapped source words and target words, as
87
+
88
+ $$
89
+ \mathrm { C S L S } ( W x _ { s } , y _ { t } ) = 2 \cos ( W x _ { s } , y _ { t } ) - r _ { \mathrm { T } } ( W x _ { s } ) - r _ { \mathrm { S } } ( y _ { t } ) .
90
+ $$
91
+
92
+ Intuitively, this update increases the similarity associated with isolated word vectors. Conversely it decreases the ones of vectors lying in dense areas. Our experiments show that the CSLS significantly increases the accuracy for word translation retrieval, while not requiring any parameter tuning.
93
+
94
+ # 3 TRAINING AND ARCHITECTURAL CHOICES
95
+
96
+ # 3.1 ARCHITECTURE
97
+
98
+ We use unsupervised word vectors that were trained using fastText2. These correspond to monolingual embeddings of dimension 300 trained on Wikipedia corpora; therefore, the mapping $W$ has size $3 0 0 \times 3 0 0$ . Words are lower-cased, and those that appear less than 5 times are discarded for training. As a post-processing step, we only select the first $2 0 0 \mathrm { k }$ most frequent words in our experiments.
99
+
100
+ For our discriminator, we use a multilayer perceptron with two hidden layers of size 2048, and Leaky-ReLU activation functions. The input to the discriminator is corrupted with dropout noise with a rate of 0.1. As suggested by Goodfellow (2016), we include a smoothing coefficient $s = 0 . 2$ in the discriminator predictions. We use stochastic gradient descent with a batch size of 32, a learning rate of 0.1 and a decay of 0.95 both for the discriminator and $W$ . We divide the learning rate by 2 every time our unsupervised validation criterion decreases.
101
+
102
+ # 3.2 DISCRIMINATOR INPUTS
103
+
104
+ The embedding quality of rare words is generally not as good as the one of frequent words (Luong et al., 2013), and we observed that feeding the discriminator with rare words had a small, but not negligible negative impact. As a result, we only feed the discriminator with the 50,000 most frequent words. At each training step, the word embeddings given to the discriminator are sampled uniformly. Sampling them according to the word frequency did not have any noticeable impact on the results.
105
+
106
+ # 3.3 ORTHOGONALITY
107
+
108
+ Smith et al. (2017) showed that imposing an orthogonal constraint to the linear operator led to better performance. Using an orthogonal matrix has several advantages. First, it ensures that the monolingual quality of the embeddings is preserved. Indeed, an orthogonal matrix preserves the dot product of vectors, as well as their $\ell _ { 2 }$ distances, and is therefore an isometry of the Euclidean space (such as a rotation). Moreover, it made the training procedure more stable in our experiments. In this work, we propose to use a simple update step to ensure that the matrix $W$ stays close to an orthogonal matrix during training (Cisse et al. (2017)). Specifically, we alternate the update of our model with the following update rule on the matrix $W$ :
109
+
110
+ $$
111
+ \boldsymbol { W } ( 1 + \beta ) \boldsymbol { W } - \beta ( \boldsymbol { W } \boldsymbol { W } ^ { T } ) \boldsymbol { W }
112
+ $$
113
+
114
+ where $\beta = 0 . 0 1$ is usually found to perform well. This method ensures that the matrix stays close to the manifold of orthogonal matrices after each update. In practice, we observe that the eigenvalues of our matrices all have a modulus close to 1, as expected.
115
+
116
+ # 3.4 DICTIONARY GENERATION
117
+
118
+ The refinement step requires to generate a new dictionary at each iteration. In order for the Procrustes solution to work well, it is best to apply it on correct word pairs. As a result, we use the CSLS method described in Section 2.3 to select more accurate translation pairs in the dictionary. To increase even more the quality of the dictionary, and ensure that $W$ is learned from correct translation pairs, we only consider mutual nearest neighbors, i.e. pairs of words that are mutually nearest neighbors of each other according to CSLS. This significantly decreases the size of the generated dictionary, but improves its accuracy, as well as the overall performance.
119
+
120
+ # 3.5 VALIDATION CRITERION FOR UNSUPERVISED MODEL SELECTION
121
+
122
+ Selecting the best model is a challenging, yet important task in the unsupervised setting, as it is not possible to use a validation set (using a validation set would mean that we possess parallel data). To address this issue, we perform model selection using an unsupervised criterion that quantifies the closeness of the source and target embedding spaces. Specifically, we consider the $1 0 \mathrm { k }$ most frequent source words, and use CSLS to generate a translation for each of them. We then compute the average cosine similarity between these deemed translations, and use this average as a validation metric. We found that this simple criterion is better correlated with the performance on the evaluation tasks than optimal transport distances such as the Wasserstein distance (Rubner et al. (2000)). Figure 2 shows the correlation between the evaluation score and this unsupervised criterion (without stabilization by learning rate shrinkage). We use it as a stopping criterion during training, and also for hyperparameter selection in all our experiments.
123
+
124
+ ![](images/1e02f98edd43edf80496c882b227ef5de282d19a885425a598178ddb6518f5c1.jpg)
125
+ Figure 2: Unsupervised model selection. Correlation between our unsupervised validation criterion (black line) and actual word translation accuracy (blue line). In this particular experiment, the selected model is at epoch 10. Observe how our criterion is well correlated with translation accuracy.
126
+
127
+ # 4 EXPERIMENTS
128
+
129
+ In this section, we empirically demonstrate the effectiveness of our unsupervised approach on several benchmarks, and compare it with state-of-the-art supervised methods. We first present the cross-lingual evaluation tasks that we consider to evaluate the quality of our cross-lingual word embeddings. Then, we present our baseline model. Last, we compare our unsupervised approach to our baseline and to previous methods. In the appendix, we offer a complementary analysis on the alignment of several sets of English embeddings trained with different methods and corpora.
130
+
131
+ # 4.1 EVALUATION TASKS
132
+
133
+ Word translation The task considers the problem of retrieving the translation of given source words. The problem with most available bilingual dictionaries is that they are generated using online tools like Google Translate, and do not take into account the polysemy of words. Failing to capture word polysemy in the vocabulary leads to a wrong evaluation of the quality of the word embedding space. Other dictionaries are generated using phrase tables of machine translation systems, but they are very noisy or trained on relatively small parallel corpora. For this task, we create high-quality dictionaries of up to $1 0 0 \mathrm { k }$ pairs of words using an internal translation tool to alleviate this issue. We make these dictionaries publicly available as part of the MUSE library3.
134
+
135
+ <table><tr><td></td><td>en-es es-en</td><td>en-fr fr-en</td><td></td><td>en-de de-en</td><td></td><td>en-ru ru-en</td><td>en-zh zh-en</td><td></td><td></td><td>en-eo eo-en</td></tr><tr><td colspan="9">Methodswith cross-lingual supervision and fastText embeddings</td></tr><tr><td>Procrustes - NN</td><td>77.4 77.3</td><td>74.9</td><td>76.1</td><td>68.4 67.7</td><td>47.0</td><td>58.2</td><td></td><td>40.630.2</td><td></td><td>22.120.4</td></tr><tr><td>Procrustes - ISF</td><td>81.1 82.6</td><td>81.1</td><td>81.3</td><td>71.1</td><td>71.5</td><td>49.563.8</td><td></td><td>35.7 37.5</td><td></td><td>29.0 27.9</td></tr><tr><td>Procrustes - CSLS</td><td>81.4 82.9</td><td>81.1</td><td>82.4</td><td>73.572.4</td><td>51.7</td><td>63.7</td><td></td><td>42.7 36.7</td><td></td><td>29.3 25.3</td></tr><tr><td colspan="9"> Methods without cross-lingual supervision and fastText embeddings</td></tr><tr><td>Adv - NN</td><td>69.8 71.3</td><td>70.4</td><td>61.9</td><td>63.1 59.6</td><td>29.1</td><td>41.5</td><td>18.5</td><td>22.3</td><td>13.5</td><td>12.1</td></tr><tr><td>Adv - CSLS</td><td>75.7</td><td>79.7 77.8</td><td>71.2</td><td>70.1</td><td>66.4</td><td>37.2 48.1</td><td>23.4</td><td>28.3</td><td>18.6</td><td>16.6</td></tr><tr><td>Adv - Refine - NN</td><td>79.1 78.1</td><td>78.1</td><td>78.2</td><td>71.3</td><td>69.6</td><td>37.3 54.3</td><td>30.9</td><td>21.9</td><td>20.7</td><td>20.6</td></tr><tr><td>Adv - Refine - CSLS</td><td>81.7 83.3</td><td>82.3</td><td>82.1</td><td>74.0</td><td>72.2</td><td>44.0 59.1</td><td>32.5</td><td>31.4</td><td>28.2</td><td>25.6</td></tr></table>
136
+
137
+ Table 1: Word translation retrieval P@1 for our released vocabularies in various language pairs. We consider 1,500 source test queries, and 200k target words for each language pair. We use fastText embeddings trained on Wikipedia. NN: nearest neighbors. ISF: inverted softmax. (’en’ is English, ’fr’ is French, ’de’ is German, ’ru’ is Russian, ’zh’ is classical Chinese and ’eo’ is Esperanto)
138
+
139
+ Table 2: English-Italian word translation average precisions $( \ @ 1$ , $@ 5 .$ , $@ 1 0 )$ from $1 . 5 \mathrm { k }$ source word queries using $2 0 0 \mathrm { k }$ target words. Results marked with the symbol † are from Smith et al. (2017). Wiki means the embeddings were trained on Wikipedia using fastText. Note that the method used by Artetxe et al. (2017) does not use the same supervision as other supervised methods, as they only use numbers in their initial parallel dictionary.
140
+
141
+ <table><tr><td rowspan=1 colspan=1></td><td rowspan=2 colspan=2>English to Italian Italian to EnglishP@1 P@5 P@10P@1 P@5 P@10Methodswith cross-lingual supervision (WaCky)</td></tr><tr><td rowspan=1 colspan=1>Methodswith cross-lingual supervision (WaCky)</td></tr><tr><td rowspan=2 colspan=1>Mikolov et al. (2013b)Dinu et al. (2015)tCCA+Artetxe et al. (2017)Smith et al. (2017)tProcrustes - CSLS</td><td rowspan=2 colspan=1>33.848.3 53.938.556.4 63.936.152.7 58.139.754.7 60.543.160.7 66.444.961.866.6</td><td rowspan=1 colspan=1>24.941.0 47.4</td></tr><tr><td rowspan=1 colspan=1>24.645.4 54.131.049.9 57.033.852.4 59.138.058.5 63.638.557.2 63.0</td></tr><tr><td rowspan=1 colspan=1>Methodswithoutcross-li</td><td rowspan=1 colspan=2>Methodswithout cross-lingual supervision (WaCky)</td></tr><tr><td rowspan=1 colspan=1>Adv - Refine- CSLS</td><td rowspan=1 colspan=1>45.160.7 65.1</td><td rowspan=1 colspan=1>38.357.8 62.8</td></tr><tr><td rowspan=1 colspan=3>Methodswith cross-lingual supervision(Wiki)</td></tr><tr><td rowspan=1 colspan=3>Procrustes- CSLS 63.778.6 81.1 56.376.2 80.6</td></tr><tr><td rowspan=1 colspan=3>Methods without cross-lingual supervision (Wiki)</td></tr><tr><td rowspan=1 colspan=1>Adv - Refine - CSLS</td><td rowspan=1 colspan=1>66.280.483.4</td><td rowspan=1 colspan=1>58.776.5 80.9</td></tr></table>
142
+
143
+ We report results on these bilingual dictionaries, as well on those released by Dinu et al. (2015) to allow for a direct comparison with previous approaches. For each language pair, we consider 1,500 query source and $2 0 0 \mathrm { k }$ target words. Following standard practice, we measure how many times one of the correct translations of a source word is retrieved, and report precision $@ k$ for $k = 1 , 5 , 1 0$ .
144
+
145
+ Cross-lingual semantic word similarity We also evaluate the quality of our cross-lingual word embeddings space using word similarity tasks. This task aims at evaluating how well the cosine similarity between two words of different languages correlates with a human-labeled score. We use the SemEval 2017 competition data (Camacho-Collados et al. (2017)) which provides large, highquality and well-balanced datasets composed of nominal pairs that are manually scored according to a well-defined similarity scale. We report Pearson correlation.
146
+
147
+ Sentence translation retrieval Going from the word to the sentence level, we consider bag-ofwords aggregation methods to perform sentence retrieval on the Europarl corpus. We consider 2,000 source sentence queries and $2 0 0 \mathrm { k }$ target sentences for each language pair and report the precision $@ k$ for $k = 1 , 5 , 1 0$ , which accounts for the fraction of pairs for which the correct translation of the source words is in the $k$ -th nearest neighbors. We use the idf-weighted average to merge word into sentence embeddings. The idf weights are obtained using other $3 0 0 \mathrm { k }$ sentences from Europarl.
148
+
149
+ # 4.2 RESULTS AND DISCUSSION
150
+
151
+ In what follows, we present the results on word translation retrieval using our bilingual dictionaries in Table 1 and our comparison to previous work in Table 2 where we significantly outperform previous approaches. We also present results on the sentence translation retrieval task in Table 3 and the cross-lingual word similarity task in Table 4. Finally, we present results on word-by-word translation for English-Esperanto in Table 5.
152
+
153
+ Baselines In our experiments, we consider a supervised baseline that uses the solution of the Procrustes formula given in (2), and trained on a dictionary of 5,000 source words. This baseline can be combined with different similarity measures: NN for nearest neighbor similarity, ISF for Inverted SoftMax and the CSLS approach described in Section 2.2.
154
+
155
+ Cross-domain similarity local scaling This approach has a single parameter $K$ defining the size of the neighborhood. The performance is very stable and therefore $K$ does not need cross-validation: the results are essentially the same for $K = 5$ , 10 and 50, therefore we set $K = 1 0$ in all experiments. In Table 1, we observe the impact of the similarity metric with the Procrustes supervised approach. Looking at the difference between Procrustes-NN and Procrustes-CSLS, one can see that CSLS provides a strong and robust gain in performance across all language pairs, with up to $7 . 2 \%$ in eneo. We observe that Procrustes-CSLS is almost systematically better than Procrustes-ISF, while being computationally faster and not requiring hyper-parameter tuning. In Table 2, we compare our Procrustes-CSLS approach to previous models presented in Mikolov et al. (2013b); Dinu et al. (2015); Smith et al. (2017); Artetxe et al. (2017) on the English-Italian word translation task, on which state-of-the-art models have been already compared. We show that our Procrustes-CSLS approach obtains an accuracy of $4 4 . 9 \%$ , outperforming all previous approaches. In Table 3, we also obtain a strong gain in accuracy in the Italian-English sentence retrieval task using CSLS, from $5 3 . 5 \%$ to $6 9 . 5 \%$ , outperforming previous approaches by an absolute gain of more than $20 \%$ .
156
+
157
+ Table 3: English-Italian sentence translation retrieval. We report the average $\mathbf { P } @ \mathbf { k }$ from 2,000 source queries using 200,000 target sentences. We use the same embeddings as in Smith et al. (2017). Their results are marked with the symbol †.
158
+
159
+ <table><tr><td></td><td>English to Italian P@1 P@5 P@10</td><td>Italian to English P@1 P@5 P@10</td></tr><tr><td colspan="3">Methods with cross-lingual supervision</td></tr><tr><td>Mikolov et al. (2013b) Dinu et al. (2015) † Smith et al. (2017) t Procrustes - NN</td><td>10.5 18.7 22.8 45.3 72.4 80.7 54.6 72.7 78.2 42.6 54.7 59.0</td><td>12.0 22.1 48.9 71.3 42.9 62.2 53.5 65.5</td><td>26.7 78.3 69.2 69.5</td></tr><tr><td colspan="3">Procrustes - CSLS 66.1 77.1 80.7 69.5 79.6 83.5</td></tr><tr><td>Methods without cross-lingual supervision Adv- CSLS 42.5</td><td>57.6 63.6</td><td>47.0</td><td>62.1 67.8</td></tr></table>
160
+
161
+ Impact of the monolingual embeddings For the word translation task, we obtained a significant boost in performance when considering fastText embeddings trained on Wikipedia, as opposed to previously used CBOW embeddings trained on the WaCky datasets (Baroni et al. (2009)), as can been seen in Table 2. Among the two factors of variation, we noticed that this boost in performance was mostly due to the change in corpora. The fastText embeddings, which incorporates more syntactic information about the words, obtained only two percent more accuracy compared to CBOW embeddings trained on the same corpus, out of the $1 8 . 8 \%$ gain. We hypothesize that this gain is due to the similar co-occurrence statistics of Wikipedia corpora. Figure 3 in the appendix shows results on the alignment of different monolingual embeddings and concurs with this hypothesis. We also obtained better results for monolingual evaluation tasks such as word similarities and word analogies when training our embeddings on the Wikipedia corpora.
162
+
163
+ Adversarial approach Table 1 shows that the adversarial approach provides a strong system for learning cross-lingual embeddings without parallel data. On the es-en and en-fr language pairs, Adv-CSLS obtains a $\mathrm { P @ 1 }$ of $7 9 . 7 \%$ and $7 7 . 8 \%$ , which is only $3 . 2 \%$ and $3 . 3 \%$ below the supervised approach. Additionally, we observe that most systems still obtain decent results on distant languages that do not share a common alphabet (en-ru and en-zh), for which method exploiting identical character strings are just not applicable (Artetxe et al. (2017)). This method allows us to build a strong synthetic vocabulary using similarities obtained with CSLS. The gain in absolute accuracy observed with CSLS on the Procrustes method is even more important here, with differences between $A d \nu – N N$ and Adv-CSLS of up to $8 . 4 \%$ on es-en. As a simple baseline, we tried to match the first two moments of the projected source and target embeddings, which amounts to solving $W ^ { \star } \in \mathrm { \ a r g m i n } _ { W }$ $\| ( W X ) ^ { T } ( \dot { W } \dot { X } ) - Y ^ { T } Y \| _ { \mathrm { F } }$ and solving the sign ambiguity (Umeyama, 1988). This attempt was not successful, which we explain by the fact that this method tries to align only the first two moments, while adversarial training matches all the moments and can learn to focus on specific areas of the distributions instead of considering global statistics.
164
+
165
+ Refinement: closing the gap with supervised approaches The refinement step on the synthetic bilingual vocabulary constructed after adversarial training brings an additional and significant gain in performance, closing the gap between our approach and the supervised baseline. In Table 1, we observe that our unsupervised method even outperforms our strong supervised baseline on en-it and en-es, and is able to retrieve the correct translation of a source word with up to $83 \%$ accuracy. The better performance of the unsupervised approach can be explained by the strong similarity of cooccurrence statistics between the languages, and by the limitation in the supervised approach that uses a pre-defined fixed-size vocabulary (of 5,000 unique source words): in our case the refinement step can potentially use more anchor points. In Table 3, we also observe a strong gain in accuracy (up to $1 5 \%$ ) on sentence retrieval using bag-of-words embeddings, which is consistent with the gain observed on the word retrieval task.
166
+
167
+ <table><tr><td>SemEval 2017</td><td>en-es</td><td>en-de</td><td>en-it</td></tr><tr><td colspan="4">Methodswith cross-lingual supervision</td></tr><tr><td>NASARI our baseline</td><td>0.64 0.72</td><td>0.60 0.72</td><td>0.65 0.71</td></tr><tr><td colspan="4">Methods without cross-lingual supervision</td></tr><tr><td>Adv</td><td>0.69</td><td>0.70</td><td>0.67</td></tr><tr><td>Adv -Refine</td><td>0.71</td><td>0.71</td><td>0.71</td></tr></table>
168
+
169
+ Table 4: Cross-lingual wordsim task. NASARI (Camacho-Collados et al. (2016)) refers to the official SemEval2017 baseline. We report Pearson correlation.
170
+
171
+ Table 5: BLEU score on English-Esperanto. Although being a naive approach, word-byword translation is enough to get a rough idea of the input sentence. The quality of the generated dictionary has a significant impact on the BLEU score.
172
+
173
+ <table><tr><td></td><td>en-eo</td><td>eo-en</td></tr><tr><td>Dictionary - NN</td><td>6.1</td><td>11.9</td></tr><tr><td>Dictionary - CSLS</td><td>11.1</td><td>14.3</td></tr></table>
174
+
175
+ Application to a low-resource language pair and to machine translation Our method is particularly suited for low-resource languages for which there only exists a very limited amount of parallel data. We apply it to the English-Esperanto language pair. We use the fastText embeddings trained on Wikipedia, and create a dictionary based on an online lexicon. The performance of our unsupervised approach on English-Esperanto is of $2 8 . 2 \%$ , compared to $2 9 . 3 \%$ with the supervised method. On Esperanto-English, our unsupervised approach obtains $2 5 . 6 \%$ , which is $1 . 3 \%$ better than the supervised method. The dictionary we use for that language pair does not take into account the polysemy of words, which explains why the results are lower than on other language pairs. People commonly report the $\mathrm { P @ 5 }$ to alleviate this issue. In particular, the $\mathrm { P @ 5 }$ for English-Esperanto and Esperanto-English is of $4 6 . 5 \%$ and $4 3 . 9 \%$ respectively.
176
+
177
+ To show the impact of such a dictionary on machine translation, we apply it to the English-Esperanto Tatoeba corpora (Tiedemann, 2012). We remove all pairs containing sentences with unknown words, resulting in about $6 0 \mathrm { k }$ pairs. Then, we translate sentences in both directions by doing word-byword translation. In Table 5, we report the BLEU score with this method, when using a dictionary generated using nearest neighbors, and CSLS. With CSLS, this naive approach obtains 11.1 and 14.3 BLEU on English-Esperanto and Esperanto-English respectively. Table 6 in the appendix shows some examples of sentences in Esperanto translated into English using word-by-word translation. As one can see, the meaning is mostly conveyed in the translated sentences, but the translations contain some simple errors. For instance, the “mi” is translated into “sorry” instead of “i”, etc. The translations could easily be improved using a language model.
178
+
179
+ # 5 RELATED WORK
180
+
181
+ Work on bilingual lexicon induction without parallel corpora has a long tradition, starting with the seminal works by Rapp (1995) and Fung (1995). Similar to our approach, they exploit the Harris (1954) distributional structure, but using discrete word representations such as TF-IDF vectors. Following studies by Fung & Yee (1998); Rapp (1999); Schafer & Yarowsky (2002); Koehn & Knight (2002); Haghighi et al. (2008); Irvine & Callison-Burch (2013) leverage statistical similarities between two languages to learn small dictionaries of a few hundred words. These methods need to be initialized with a seed bilingual lexicon, using for instance the edit distance between source and target words. This can be seen as prior knowledge, only available for closely related languages. There is also a large amount of studies in statistical decipherment, where the machine translation problem is reduced to a deciphering problem, and the source language is considered as a ciphertext (Ravi & Knight, 2011; Pourdamghani & Knight, 2017). Although initially not based on distributional semantics, recent studies show that the use of word embeddings can bring significant improvement in statistical decipherment (Dou et al., 2015).
182
+
183
+ The rise of distributed word embeddings has revived some of these approaches, now with the goal of aligning embedding spaces instead of just aligning vocabularies. Cross-lingual word embeddings can be used to extract bilingual lexicons by computing the nearest neighbor of a source word, but also allow other applications such as sentence retrieval or cross-lingual document classification (Klementiev et al., 2012). In general, they are used as building blocks for various cross-lingual language processing systems. More recently, several approaches have been proposed to learn bilingual dictionaries mapping from the source to the target space (Mikolov et al., 2013b; Zou et al., 2013; Faruqui & Dyer, 2014; Ammar et al., 2016). In particular, Xing et al. (2015) showed that adding an orthogonality constraint to the mapping can significantly improve performance, and has a closed-form solution. This approach was further referred to as the Procrustes approach in Smith et al. (2017).
184
+
185
+ The hubness problem for cross-lingual word embedding spaces was investigated by Dinu et al. (2015). The authors added a correction to the word retrieval algorithm by incorporating a nearest neighbors reciprocity term. More similar to our cross-domain similarity local scaling approach, Smith et al. (2017) introduced the inverted-softmax to down-weight similarities involving oftenretrieved hub words. Intuitively, given a query source word and a candidate target word, they estimate the probability that the candidate translates back to the query, rather than the probability that the query translates to the candidate.
186
+
187
+ Recent work by Smith et al. (2017) leveraged identical character strings in both source and target languages to create a dictionary with low supervision, on which they applied the Procrustes algorithm. Similar to this approach, recent work by Artetxe et al. (2017) used identical digits and numbers to form an initial seed dictionary, and performed an update similar to our refinement step, but iteratively until convergence. While they showed they could obtain good results using as little as twenty parallel words, their method still needs cross-lingual information and is not suitable for languages that do not share a common alphabet. For instance, the method of Artetxe et al. (2017) on our dataset does not work on the word translation task for any of the language pairs, because the digits were filtered out from the datasets used to train the fastText embeddings. This iterative EMbased algorithm initialized with a seed lexicon has also been explored in other studies (Haghighi et al., 2008; Kondrak et al., 2017).
188
+
189
+ There has been a few attempts to align monolingual word vector spaces with no supervision. Similar to our work, Zhang et al. (2017b) employed adversarial training, but their approach is different than ours in multiple ways. First, they rely on sharp drops of the discriminator accuracy for model selection. In our experiments, their model selection criterion does not correlate with the overall model performance, as shown in Figure 2. Furthermore, it does not allow for hyper-parameters tuning, since it selects the best model over a single experiment. We argue it is a serious limitation, since the best hyper-parameters vary significantly across language pairs. Despite considering small vocabularies of a few thousand words, their method obtained weak results compared to supervised approaches. More recently, Zhang et al. (2017a) proposed to minimize the earth-mover distance after adversarial training. They compare their results only to their supervised baseline trained with a small seed lexicon, which is one to two orders of magnitude smaller than what we report here.
190
+
191
+ # 6 CONCLUSION
192
+
193
+ In this work, we show for the first time that one can align word embedding spaces without any cross-lingual supervision, i.e., solely based on unaligned datasets of each language, while reaching or outperforming the quality of previous supervised approaches in several cases. Using adversarial training, we are able to initialize a linear mapping between a source and a target space, which we also use to produce a synthetic parallel dictionary. It is then possible to apply the same techniques proposed for supervised techniques, namely a Procrustean optimization. Two key ingredients contribute to the success of our approach: First we propose a simple criterion that is used as an effective unsupervised validation metric. Second we propose the similarity measure CSLS, which mitigates the hubness problem and drastically increases the word translation accuracy. As a result, our approach produces high-quality dictionaries between different pairs of languages, with up to $8 3 . 3 \%$ on the Spanish-English word translation task. This performance is on par with supervised approaches. Our method is also effective on the English-Esperanto pair, thereby showing that it works for lowresource language pairs, and can be used as a first step towards unsupervised machine translation.
194
+
195
+ # ACKNOWLEDGMENTS
196
+
197
+ We thank Juan Miguel Pino, Moustapha Cisse, Nicolas Usunier, Yann Ollivier, David Lopez-Paz, ´ Alexandre Sablayrolles, and the FAIR team for useful comments and discussions.
198
+
199
+ # REFERENCES
200
+
201
+ Waleed Ammar, George Mulcaire, Yulia Tsvetkov, Guillaume Lample, Chris Dyer, and Noah A Smith. Massively multilingual word embeddings. arXiv preprint arXiv:1602.01925, 2016.
202
+
203
+ Mikel Artetxe, Gorka Labaka, and Eneko Agirre. Learning principled bilingual mappings of word embeddings while preserving monolingual invariance. Proceedings of EMNLP, 2016.
204
+
205
+ Mikel Artetxe, Gorka Labaka, and Eneko Agirre. Learning bilingual word embeddings with (almost) no bilingual data. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 451–462. Association for Computational Linguistics, 2017.
206
+
207
+ Marco Baroni, Silvia Bernardini, Adriano Ferraresi, and Eros Zanchetta. The wacky wide web: a collection of very large linguistically processed web-crawled corpora. Language resources and evaluation, 43(3):209–226, 2009.
208
+
209
+ Piotr Bojanowski, Edouard Grave, Armand Joulin, and Tomas Mikolov. Enriching word vectors with subword information. Transactions of the Association for Computational Linguistics, 5: 135–146, 2017.
210
+
211
+ Jose Camacho-Collados, Mohammad Taher Pilehvar, and Roberto Navigli. Nasari: Integrating ex-´ plicit knowledge and corpus statistics for a multilingual representation of concepts and entities. Artificial Intelligence, 240:36–64, 2016.
212
+
213
+ Jose Camacho-Collados, Mohammad Taher Pilehvar, Nigel Collier, and Roberto Navigli. Semeval2017 task 2: Multilingual and cross-lingual semantic word similarity. Proceedings of the 11th International Workshop on Semantic Evaluation (SemEval 2017), 2017.
214
+
215
+ Hailong Cao, Tiejun Zhao, Shu Zhang, and Yao Meng. A distribution-based model to learn bilingual word embeddings. Proceedings of COLING, 2016.
216
+
217
+ Moustapha Cisse, Piotr Bojanowski, Edouard Grave, Yann Dauphin, and Nicolas Usunier. Parseval networks: Improving robustness to adversarial examples. International Conference on Machine Learning, pp. 854–863, 2017.
218
+
219
+ Georgiana Dinu, Angeliki Lazaridou, and Marco Baroni. Improving zero-shot learning by mitigating the hubness problem. International Conference on Learning Representations, Workshop Track, 2015.
220
+
221
+ Qing Dou, Ashish Vaswani, Kevin Knight, and Chris Dyer. Unifying bayesian inference and vector space models for improved decipherment. 2015.
222
+
223
+ Long Duong, Hiroshi Kanayama, Tengfei Ma, Steven Bird, and Trevor Cohn. Learning crosslingual word embeddings without bilingual corpora. Proceedings of EMNLP, 2016.
224
+
225
+ Manaal Faruqui and Chris Dyer. Improving vector space word representations using multilingual correlation. Proceedings of EACL, 2014.
226
+
227
+ Pascale Fung. Compiling bilingual lexicon entries from a non-parallel english-chinese corpus. In Proceedings of the Third Workshop on Very Large Corpora, pp. 173–183, 1995.
228
+
229
+ Pascale Fung and Lo Yuen Yee. An ir approach for translating new words from nonparallel, comparable texts. In Proceedings of the 17th International Conference on Computational Linguistics - Volume 1, COLING ’98, pp. 414–420. Association for Computational Linguistics, 1998.
230
+
231
+ Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, Franc¸ois Laviolette, Mario Marchand, and Victor Lempitsky. Domain-adversarial training of neural networks. Journal of Machine Learning Research, 17(59):1–35, 2016.
232
+
233
+ Ian Goodfellow. Nips 2016 tutorial: Generative adversarial networks. arXiv preprint arXiv:1701.00160, 2016.
234
+
235
+ Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. Advances in neural information processing systems, pp. 2672–2680, 2014.
236
+
237
+ Stephan Gouws, Yoshua Bengio, and Greg Corrado. Bilbowa: Fast bilingual distributed representations without word alignments. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15), pp. 748–756, 2015.
238
+
239
+ Aria Haghighi, Percy Liang, Taylor Berg-Kirkpatrick, and Dan Klein. Learning bilingual lexicons from monolingual corpora. In Proceedings of the 46th Annual Meeting of the Association for Computational Linguistics, 2008.
240
+
241
+ Zellig S Harris. Distributional structure. Word, 10(2-3):146–162, 1954.
242
+
243
+ Ann Irvine and Chris Callison-Burch. Supervised bilingual lexicon induction with multiple monolingual signals. In HLT-NAACL, 2013.
244
+
245
+ Herve Jegou, Cordelia Schmid, Hedi Harzallah, and Jakob Verbeek. Accurate image search using the contextual dissimilarity measure. IEEE Transactions on Pattern Analysis and Machine Intelligence, 32(1):2–11, 2010.
246
+
247
+ Jeff Johnson, Matthijs Douze, and Herve J ´ egou. Billion-scale similarity search with gpus. ´ arXiv preprint arXiv:1702.08734, 2017.
248
+
249
+ Alexandre Klementiev, Ivan Titov, and Binod Bhattarai. Inducing crosslingual distributed representations of words. Proceedings of COLING, pp. 1459–1474, 2012.
250
+
251
+ Philipp Koehn and Kevin Knight. Learning a translation lexicon from monolingual corpora. In Proceedings of the ACL-02 workshop on Unsupervised lexical acquisition-Volume 9, pp. 9–16. Association for Computational Linguistics, 2002.
252
+
253
+ Grzegorz Kondrak, Bradley Hauer, and Garrett Nicolai. Bootstrapping unsupervised bilingual lexicon induction. In EACL, 2017.
254
+
255
+ Angeliki Lazaridou, Georgiana Dinu, and Marco Baroni. Hubness and pollution: Delving into crossspace mapping for zero-shot learning. Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics, 2015.
256
+
257
+ Omer Levy and Yoav Goldberg. Neural word embedding as implicit matrix factorization. Advances in neural information processing systems, pp. 2177–2185, 2014.
258
+
259
+ Thang Luong, Richard Socher, and Christopher D Manning. Better word representations with recursive neural networks for morphology. CoNLL, pp. 104–113, 2013.
260
+
261
+ Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. Efficient estimation of word representations in vector space. Proceedings of Workshop at ICLR, 2013a.
262
+
263
+ Tomas Mikolov, Quoc V Le, and Ilya Sutskever. Exploiting similarities among languages for machine translation. arXiv preprint arXiv:1309.4168, 2013b.
264
+
265
+ Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. Distributed representations of words and phrases and their compositionality. Advances in neural information processing systems, pp. 3111–3119, 2013c.
266
+
267
+ Robert Parker, David Graff, Junbo Kong, Ke Chen, and Kazuaki Maeda. English gigaword. Linguistic Data Consortium, 2011.
268
+
269
+ Jeffrey Pennington, Richard Socher, and Christopher D Manning. Glove: Global vectors for word representation. Proceedings of EMNLP, 14:1532–1543, 2014.
270
+
271
+ N. Pourdamghani and K. Knight. Deciphering related languages. In EMNLP, 2017.
272
+
273
+ Milos Radovanovi ˇ c, Alexandros Nanopoulos, and Mirjana Ivanovi ´ c. Hubs in space: Popular nearest ´ neighbors in high-dimensional data. Journal of Machine Learning Research, 11(Sep):2487–2531, 2010.
274
+
275
+ Reinhard Rapp. Identifying word translations in non-parallel texts. In Proceedings of the 33rd Annual Meeting on Association for Computational Linguistics, ACL ’95, pp. 320–322. Association for Computational Linguistics, 1995.
276
+
277
+ Reinhard Rapp. Automatic identification of word translations from unrelated english and german corpora. In Proceedings of the 37th Annual Meeting of the Association for Computational Linguistics, ACL $\overline { { 9 9 } }$ . Association for Computational Linguistics, 1999.
278
+
279
+ S. Ravi and K. Knight. Deciphering foreign language. In ACL, 2011.
280
+
281
+ Yossi Rubner, Carlo Tomasi, and Leonidas J Guibas. The earth mover’s distance as a metric for image retrieval. International journal of computer vision, 40(2):99–121, 2000.
282
+
283
+ Charles Schafer and David Yarowsky. Inducing translation lexicons via diverse similarity measures and bridge languages. In Proceedings of the 6th Conference on Natural Language Learning - Volume 20, COLING-02. Association for Computational Linguistics, 2002.
284
+
285
+ Peter H Schonemann. A generalized solution of the orthogonal procrustes problem. ¨ Psychometrika, 31(1):1–10, 1966.
286
+
287
+ Samuel L Smith, David HP Turban, Steven Hamblin, and Nils Y Hammerla. Offline bilingual word vectors, orthogonal transformations and the inverted softmax. International Conference on Learning Representations, 2017.
288
+
289
+ Jrg Tiedemann. Parallel data, tools and interfaces in opus. In Nicoletta Calzolari (Conference Chair), Khalid Choukri, Thierry Declerck, Mehmet Uur Doan, Bente Maegaard, Joseph Mariani, Asuncion Moreno, Jan Odijk, and Stelios Piperidis (eds.), Proceedings of the Eight International Conference on Language Resources and Evaluation (LREC’12), Istanbul, Turkey, may 2012. European Language Resources Association (ELRA). ISBN 978-2-9517408-7-7.
290
+
291
+ Shinji Umeyama. An eigendecomposition approach to weighted graph matching problems. IEEE transactions on pattern analysis and machine intelligence, 10(5):695–703, 1988.
292
+
293
+ Ivan Vulic and Marie-Francine Moens. Bilingual word embeddings from non-parallel documentaligned data applied to bilingual lexicon induction. Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics (ACL 2015), pp. 719–725, 2015.
294
+
295
+ Chao Xing, Dong Wang, Chao Liu, and Yiye Lin. Normalized word embedding and orthogonal transform for bilingual word translation. Proceedings of NAACL, 2015.
296
+
297
+ Lihi Zelnik-manor and Pietro Perona. Self-tuning spectral clustering. In L. K. Saul, Y. Weiss, and L. Bottou (eds.), Advances in Neural Information Processing Systems 17, pp. 1601–1608. MIT Press, 2005.
298
+
299
+ Meng Zhang, Yang Liu, Huanbo Luan, and Maosong Sun. Earth mover’s distance minimization for unsupervised bilingual lexicon induction. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 1924–1935. Association for Computational Linguistics, 2017a.
300
+
301
+ Meng Zhang, Yang Liu, Huanbo Luan, and Maosong Sun. Adversarial training for unsupervised bilingual lexicon induction. Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics, 2017b.
302
+
303
+ Will Y Zou, Richard Socher, Daniel M Cer, and Christopher D Manning. Bilingual word embeddings for phrase-based machine translation. Proceedings of EMNLP, 2013.
304
+
305
+ # 7 APPENDIX
306
+
307
+ In order to gain a better understanding of the impact of using similar corpora or similar word embedding methods, we investigated merging two English monolingual embedding spaces using either Wikipedia or the Gigaword corpus (Parker et al. (2011)), and either Skip-Gram, CBOW or fastText methods (see Figure 3).
308
+
309
+ ![](images/4767165f2c7004518c8f2f65461d13bb723ce259f75c4c8cfb83d0afd949af44.jpg)
310
+ Figure 3: English to English word alignment accuracy. Evolution of word translation retrieval accuracy with regard to word frequency, using either Wikipedia (Wiki) or the Gigaword corpus (Giga), and either skip-gram, continuous bag-of-words (CBOW) or fastText embeddings. The model can learn to perfectly align embeddings trained on the same corpus but with different seeds (a), as well as embeddings learned using different models (overall, when employing CSLS which is more accurate on rare words) (b). However, the model has more trouble aligning embeddings trained on different corpora (Wikipedia and Gigaword) (c). This can be explained by the difference in co-occurrence statistics of the two corpora, particularly on the rarer words. Performance can be further deteriorated by using both different models and different types of corpus (d).
311
+
312
+ Table 6: Esperanto-English. Examples of fully unsupervised word-by-word translations. The translations reflect the meaning of the source sentences, and could potentially be improved using a simple language model.
313
+
314
+ <table><tr><td>Source Hypothesis Reference</td><td>mi kelkfoje parolas kun mia najbaro tra la barilo . sorry sometimes speaks with my neighbor across the barrier . i sometimes talk to my neighbor across the fence .</td></tr><tr><td>Source Hypothesis Reference</td><td>laviro malanta ili ludas la pianon. the man behind theyplays the piano . the man behind them is playing the piano .</td></tr><tr><td>Source Hypothesis Reference</td><td>bonvole protektu min kontra tiuj malbonaj viroj. gratefully protects hi against those worst men . please defend me from such bad men .</td></tr></table>
parse/train/H196sainb/H196sainb_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Hy_o3x-0b/Hy_o3x-0b.md ADDED
@@ -0,0 +1,235 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # FEATURE MAP VARIATIONAL AUTO-ENCODERS
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ There have been multiple attempts with variational auto-encoders (VAE) to learn powerful global representations of complex data using a combination of latent stochastic variables and an autoregressive model over the dimensions of the data. However, for the most challenging natural image tasks the purely autoregressive model with stochastic variables still outperform the combined stochasticautoregressive models. In this paper, we present simple additions to the VAE framework that generalize to natural images by embedding spatial information in the stochastic layers. We significantly improve the state-of-the-art results on MNIST, OMNIGLOT, CIFAR10 and ImageNet when the feature map parameterization of the stochastic variables are combined with the autoregressive PixelCNN approach. Interestingly, we also observe close to state-of-the-art results without the autoregressive part. This opens the possibility for high quality image generation with only one forward-pass.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ In representation learning the goal is to learn a posterior latent distribution that explains the observed data well (Bengio et al., 2013). Learning good representations from data can be used for various tasks such as generative modelling and semi-supervised learning (Kingma, 2013; Rezende et al., 2014; Kingma et al., 2014; Rasmus et al., 2015; Maaløe et al., 2016). The decomposition of variational auto-encoders (VAE) (Kingma, 2013; Rezende et al., 2014) provides the potential to disentangle the internal representation of the input data from local to global features through a hierarchy of stochastic latent variables. This makes the VAE an obvious candidate for learning good representations. However, in order to make inference tractable VAEs contain simplifying assumptions. This limits their ability to learn a good posterior latent representation.
12
+
13
+ In complex data distributions with temporal dependencies (e.g. text, images and audio), the VAE assumption on conditional independence in the input distribution limits the ability to learn local structures. This has a significant impact on its generative performance, and thereby also the learned representations. Additionally, the one-layered VAE model with a $\mathcal { N } ( 0 , I )$ latent prior poses serious constraints on the posterior complexity that the model is able to learn. A deep hierarchy of stochastic latent variables should endow the model with more expressiveness, but the VAE has a tendency to skip the learning of the higher representations since they pose a direct cost in its optimization term.
14
+
15
+ There have been several attempts to eliminate the limitations of the VAE. Some concern formulating a more expressive variational distribution (Burda et al., 2015b; Rezende & Mohamed, 2015; Tran et al., 2016; Maaløe et al., 2016) where other concerns learning a deeper hierarchy of latent variables (Sønderby et al., 2016). These contributions have resulted in better performance, but are still limited when modelling complex data distributions where a conditional independence does not apply. When parameterizing the VAE decoder with recurrent neural networks (Krishnan et al., 2015; Bowman et al., 2015; Fraccaro et al., 2016), the decoding architecture gets too powerful which results in unused latent stochastic variables (Chen et al., 2017).
16
+
17
+ The limitations of the VAE have spawned interest towards other generative models such as Generative Adversarial Networks (GAN) (Goodfellow et al., 2014) and the autoregressive PixelCNN/PixelRNN models (van den Oord et al., 2016b). These methods have proven powerful in learning good generative models, but the lack of stochastic latent variables makes them less suitable for representation learning purposes (Chen et al., 2017). Lately, we have seen several successful attempts to combine VAEs with PixelCNNs (Gulrajani et al., 2016; Chen et al., 2017). This results in a model where the global structure of the data is learned in the stochastic latent variables of the VAE and the local structure is learned in the PixelCNN. However, despite the additional complexity and potential extra expressiveness, these models do not outperform a simple autoregressive model (van den Oord et al., 2016a; Salimans et al., 2017).
18
+
19
+ ![](images/81b532c59f5662a4ac87ce773d4f0e660749b00b8951bd9c03beb7b75132da0f.jpg)
20
+ Figure 1: A visualization of FAME where the solid lines denote the variational approximation (inference/encoder/recognition) network and dashed lines denote the generative model (decoder) network for training. When performing reconstructions during training, the input image is concatenated with the output of the generative model (blue) and when generating the model follows a normal autoregressive sampling flow (red) while also using the stochastic latent variables $\mathbf { z } = z _ { 1 } , . . . , z _ { L }$ . Both the variational approximation and the generative model follow a top-down hierarchical structure which enables precision weighted stochastic variables in the variational approximation.
21
+
22
+ In this paper we present the Feature Map Variational Auto-Encoder (FAME) that combines the top-down variational approximation presented in the Ladder Variational Auto-Encoder (LVAE) (Sønderby et al., 2016) with a spatial (feature map) representation of the stochastic latent variables and an autoregressive decoder. We show that (i) FAME outperforms previously state-of-the-art loglikelihood on MNIST, OMNIGLOT, CIFAR10 and ImageNet, (ii) FAME learns a deep hierarchy of stochastic latent variables without inactivated latent units, (iii) by removing the autoregressive decoder FAME performs close to previous state-of-the-art log-likelihood suggesting that it is possible to get good quality generation with just one forward pass.
23
+
24
+ # 2 FEATURE MAP VARIATIONAL AUTO-ENCODER
25
+
26
+ The VAE (Rezende et al., 2014; Kingma, 2013) is a generative model with a hierarchy of stochastic latent variables:
27
+
28
+ $$
29
+ \displaystyle p _ { \theta } ( x , \mathbf { z } ) = p _ { \theta } ( x | z _ { 1 } ) p _ { \theta } ( z _ { L } ) \prod _ { i = 1 } ^ { L - 1 } p _ { \theta } ( z _ { i } | z _ { i + 1 } ) ~ ,
30
+ $$
31
+
32
+ where $\mathbf { z } ~ = ~ z _ { 1 } , . . . , z _ { L }$ , $\theta$ denotes the parameters, and $L$ denotes the number of stochastic latent variable layers. The stochastic latent variables are usually modelled as conditionally independent Gaussian distributions with a diagonal covariance:
33
+
34
+ $$
35
+ p _ { \theta } ( z _ { i } | z _ { i + 1 } ) = \mathcal { N } \Big ( z _ { i } ; \mu _ { \theta , i } ( z _ { i + 1 } ) , \mathrm { d i a g } ( \sigma _ { \theta , i } ^ { 2 } ( z _ { i + 1 } ) ) \Big ) , \qquad p _ { \theta } ( z _ { L } ) = \mathcal { N } \Big ( z _ { L } ; 0 , I \Big ) .
36
+ $$
37
+
38
+ Since the posterior $p ( \mathbf { z } | x )$ often is intractable we introduce a variational approximation $q _ { \phi } ( \mathbf { z } | x )$ with parameters $\phi$ . In the original VAE formulation $q _ { \phi } ( \mathbf { z } | x )$ is decomposed as a bottom-up inference path through the hierarchy of the stochastic layers:
39
+
40
+ $$
41
+ \begin{array} { l } { { \displaystyle q _ { \phi } ( { \bf z } | x ) = q _ { \phi } ( z _ { 1 } | x ) \prod _ { i = 2 } ^ { L } q _ { \phi } ( z _ { i } | z _ { i - 1 } ) ~ , } } \\ { { \displaystyle q _ { \phi } ( z _ { 1 } | x ) = \mathcal { N } \Big ( z _ { 1 } ; \mu _ { \phi , 1 } ( x ) , \mathrm { d i a g } ( \sigma _ { \phi , 1 } ^ { 2 } ( x ) ) \Big ) ~ , } } \\ { { \displaystyle q _ { \phi } ( z _ { i } | z _ { i - 1 } ) = \mathcal { N } \Big ( z _ { i } ; \mu _ { \phi , i } ( z _ { i - 1 } ) , \mathrm { d i a g } ( \sigma _ { \phi , i } ^ { 2 } ( z _ { i - 1 } ) ) \Big ) ~ . } } \end{array}
42
+ $$
43
+
44
+ We optimize an evidence lower-bound (ELBO) to the log-likelihood $\begin{array} { r } { \log p _ { \theta } ( x ) = \log \int _ { \mathbf { z } } p _ { \theta } ( x , \mathbf { z } ) d \mathbf { z } } \end{array}$ . Burda et al. (2015a) introduced the importance weighted bound:
45
+
46
+ $$
47
+ \log p ( x ) \ge \mathbb { E } _ { q _ { \phi } ( \mathbf { z } ^ { 1 } | x ) } , . . . , \mathbb { E } _ { q _ { \phi } ( \mathbf { z } ^ { K } | x ) } \left[ \log \sum _ { k = 1 } ^ { K } \frac { p _ { \theta } ( x , \mathbf { z } ^ { k } ) } { q _ { \phi } ( \mathbf { z } ^ { k } | x ) } \right] \equiv \mathcal { L } _ { K } ( \theta , \phi ; x )
48
+ $$
49
+
50
+ and proved that $\mathcal L _ { K } ( \theta , \phi ; x ) \ge \mathcal L _ { L } ( \theta , \phi ; x )$ for $K > L$ . For $K = 1$ the bound co-incides with the standard ELBO: $\mathcal { L } ( \theta , \phi ; x ) = \mathcal { L } _ { 1 } ( \theta , \phi ; x )$ . The hierarchical structure of both the variational approximation and generative model give the VAE the expressiveness to learn different representations of the data throughout its stochastic variables, going from local (e.g. edges in images) to global features (e.g. class specific information). However, we can apply as recursive argument Maaløe et al. (2017) to show that when optimizing with respect to the parameters $\theta$ and $\phi$ the VAE is regularized towards $q _ { \phi } ( z _ { L } | z _ { L - 1 } ) = p _ { \theta } ( z _ { L } ) = \bar { \mathcal { N } } ( z _ { L } ; 0 , \bar { I _ { ) } }$ . This is evident if we rewrite Equation 6 for $K = 1$ :
51
+
52
+ $$
53
+ \mathcal { L } ( \theta , \phi ; x ) = \mathbb { E } _ { q _ { \phi } ( z _ { 1 : L - 1 } | x ) } \left[ \frac { p _ { \theta } ( x , z _ { 1 : L - 1 } | z _ { L } ) } { q _ { \phi } ( z _ { 1 : L - 1 } | x ) } \right] - \mathbb { E } _ { q _ { \phi } ( z _ { 1 : L - 1 } | x ) } \left[ K L \big ( q _ { \phi } ( z _ { L } | z _ { L - 1 } ) | | p _ { \theta } ( z _ { L } ) \big ) \right] .
54
+ $$
55
+
56
+ $K L \big ( q _ { \phi } ( z _ { L } | z _ { L - 1 } ) | | p _ { \theta } ( z _ { L } ) \big ) = 0$ is a local maxima and learning a useful representation in $z _ { L }$ can therefore be disregarded throughout the remainder of the training. The same argumentation can be used for all subsequent layers $z _ { 2 : L }$ , hence the VAE has a tendency to collapse towards not using the full hierarchy of latent variables. There are different ways to get around this tendency, where the simplest is to down-weight the $K L$ -divergence with a temperature term (Bowman et al., 2015; Sønderby et al., 2016). This term is applied during the initial phase of optimization and thereby downscales the regularizing effect. However, this only works for a limited number of hierarchically stacked latent variables (Sønderby et al., 2016).
57
+
58
+ Formulating a deep hierarchical VAE is not the only cause of inactive latent variables, it also occurs when the parameterization of the decoder gets too powerful (Krishnan et al., 2015; Fraccaro et al., 2016; Chen et al., 2017). This can be caused by using autoregressive models such as $p ( x , \mathbf { z } ) =$ $\begin{array} { r } { \prod _ { j } p ( x ^ { j } | x ^ { < j } , \mathbf { z } ) p ( \mathbf { z } ) } \end{array}$ . Chen et al. (2017) circumvent this by introducing the Variational Lossy AutoEncoder (VLAE) where they define the architecture for the VAE and autoregressive model such that they capture global and local structures. They also utilize the power of more expressive posterior approximations using inverse autoregressive flows (Rezende & Mohamed, 2015; Kingma et al., 2016). In the PixelVAE, Gulrajani et al. (2016) takes a similar approach to defining the generative model but makes a simpler factorizing decomposition in the variational approximation ${ \bar { q } } _ { \phi } ( \mathbf { z } | x ) =$ $\textstyle \prod _ { i } ^ { L } q _ { \phi } ( z _ { i } | x )$ , where the terms have some degree of parameter sharing. This formulation results in a less flexible model.
59
+
60
+ In Kingma et al. (2016); Gulrajani et al. (2016); Chen et al. (2017) we have seen that VAEs with simple decompositions of the stochastic latent variables and a powerful autoregressive decoder can result in good generative performance and representation learning. However, despite the additional cost of learning a VAE we only see improvement in the log-likelihood over the PixelCNN for small gray-scale image datasets (Salimans et al., 2017). We propose FAME that extends the VAE with a top-down variational approximation similar to the LVAE (Sønderby et al., 2016) combined with spatial stochastic latent layers and an autoregressive decoder, so that we ensure expressive latent stochastic variables learned in a deep hierarchy (cf. Figure 1).
61
+
62
+ # 2.1 TOP-DOWN VARIATIONAL APPROXIMATION
63
+
64
+ The LVAE (Sønderby et al., 2016) does not change the generative model but changes the variational distribution to be top-down like the generative model. Furthermore the variational distribution shares parameters with the generative model which can be viewed as a precision-weighted (inverse variance) combination of information from the prior and data distribution. The variational approximation is defined as:
65
+
66
+ $$
67
+ q _ { \phi } ( { \bf z } | x ) = q _ { \phi } ( z _ { L } | x ) \prod _ { i = 1 } ^ { L - 1 } q _ { \phi } ( z _ { i } | z _ { i + 1 } , x ) .
68
+ $$
69
+
70
+ The stochastic latent variables are all fully factorized Gaussian distributions and are therefore modelled by $q _ { \phi } ( z _ { i } | z _ { i + 1 } , x ) = \mathcal { N } ( z _ { i } | \mu _ { i } , \mathrm { d i a g } ( \bar { \sigma } _ { i } ^ { 2 } ) )$ for layers $i = 1 , . . . , L$ . Instead of letting $q$ and $p$ have
71
+
72
+ separate parameters (as in the VAE), the LVAE let the mean and variance be defined in terms of a function of $x$ (the bottom-up data part) and the generative model (the top-down prior):
73
+
74
+ $$
75
+ \begin{array} { l } { \displaystyle \mu _ { i } = \frac { \mu _ { \phi , i } \sigma _ { \phi , i } ^ { - 2 } + \mu _ { \theta , i } \sigma _ { \theta , i } ^ { - 2 } } { \sigma _ { \phi , i } ^ { - 2 } + \sigma _ { \theta , i } ^ { - 2 } } } \\ { \displaystyle \sigma _ { i } = \frac { 1 } { \sigma _ { \phi , i } ^ { - 2 } + \sigma _ { \theta , i } ^ { - 2 } } , } \end{array}
76
+ $$
77
+
78
+ where $\mu _ { \phi , i } = \mu _ { \phi , i } ( x )$ and $\mu _ { \theta , i } = \mu _ { \theta , i } ( z _ { i + 1 } )$ and like-wise for the variance functions. This precision weighted parameterization has previously yielded excellent results for densely connected networks (Sønderby et al., 2016).
79
+
80
+ # 2.2 CONVOLUTIONAL STOCHASTIC LAYERS
81
+
82
+ We have seen multiple contributions (e.g. Gulrajani et al. (2016)) where VAEs (and similar models) have been parameterized with convolutions in the deterministic layers $h _ { j } ^ { i }$ , for $j = 1 , . . . , M$ , and $M$ is the number of layers connecting the stochastic latent variables $z _ { i }$ . The size of the spatial feature maps decreases towards higher latent representations and transposed convolutions are used in the generative model. In FAME we propose to extend this notion, so that each of the stochastic latent layers $z _ { i } , . . . , z _ { L - 1 }$ are also convolutional. This gives the model more expressiveness in the latent layers, since it will keep track of the spatial composition of the data (and thereby learn better representations). The top stochastic layer $z _ { L }$ in FAME is a fully-connected dense layer, which makes it simpler to condition on a non-informative $\mathcal { N } ( 0 , I )$ prior and sample from a learned generative model $p _ { \boldsymbol { \theta } } ( \boldsymbol { x } , \mathbf { z } )$ . For the $i = 1 , . . . , L - 1$ stochastic latent variables, the architecture is as follows:
83
+
84
+ $$
85
+ \begin{array} { r l } & { \quad h _ { M , i } = \mathrm { C N N } ( h _ { < M , i } ) } \\ & { \quad \mu _ { \phi \vee \theta , i } = \mathrm { L i n e a r } ( \mathrm { C O N V } ( h _ { M , i } ) ) } \\ & { \sigma _ { \phi \vee \theta , i } = \mathrm { S o f t p l u s } \left( \mathrm { C O N V } ( h _ { M , i } ) \right) , } \end{array}
86
+ $$
87
+
88
+ where CNN and CONV denote a convolutional neural network and convolutional layer respectively. The top-most latent stochastic layer $z _ { L }$ is computed by:
89
+
90
+ $$
91
+ \begin{array} { r l } & { \quad h _ { M , L } = \mathrm { F l a t t e n } \big ( \mathrm { C N N } \big ( h _ { < M , L } \big ) \big ) } \\ & { \quad \mu _ { \phi \vee \theta , L } = \mathrm { L i n e a r } \big ( \mathrm { D e n s e } \big ( h _ { M , L } \big ) \big ) } \\ & { \sigma _ { \phi \vee \theta , L } = { \mathrm { S o f t p l u s } } \big ( \mathrm { D e n s e } \big ( h _ { M , L } \big ) \big ) \ . } \end{array}
92
+ $$
93
+
94
+ This new feature map parameterization of the stochastic layers should be viewed as a step towards a better variational model where the test ELBO and the amount of activated stochastic units are direct meaures hereof.
95
+
96
+ # 2.3 AUTOREGRESSIVE DECODING
97
+
98
+ From van den Oord et al. (2016b;a); Salimans et al. (2017) we have seen that the PixelCNN architecture is very powerful in modelling a conditional distribution between pixels. In FAME we introduce a PixelCNN in the input dimension of the generative model $p _ { \boldsymbol { \theta } } ( \boldsymbol { x } | \mathbf { z } )$ (cf. Figure 1). During training we concatenate the input with the reconstruction data in the channel dimension and propagate it through the PixelCNN, similarly to what is done in Gulrajani et al. (2016). When generating samples we fix a sample from the stochastic latent variables and generate the image pixel by pixel autoregressively.
99
+
100
+ # 3 EXPERIMENTS
101
+
102
+ We test FAME on images from which we can compare with a wide range of generative models. First we evaluate on gray-scaled image datasets: statically and dynamically binarized MNIST (LeCun et al., 1998) and OMNIGLOT (Lake et al., 2013). The OMNIGLOT dataset is of particular interest due to the large variance amongst samples. Secondly we evaluate our models on natural image datasets: CIFAR10 (Krizhevsky, 2009) and 32x32 ImageNet1 (van den Oord et al., 2016b). When modelling the gray-scaled images we assume a Bernoulli $\boldsymbol { B }$ distribution using a Sigmoid activation function as the output and for the natural images we assume a Categorical distribution $\pi$ by applying the 256-way Softmax approach introduced in van den Oord et al. (2016b). We evaluate the grayscaled images with $\mathcal { L } _ { 5 0 0 0 }$ (cf. Equation 6) and due to runtime and space complexity we evaluate the natural images with $\mathcal { L } _ { 1 0 0 0 }$ .
103
+
104
+ ![](images/c687533d2b3ea0d625b9087d9bbf1144d0b5048a887a7e4a6440da6e27b82529.jpg)
105
+ Figure 2: 10 randomly picked CIFAR10 images (left) and 200 random samples drawn from a $\bar { \mathcal { N } ( 0 , I ) }$ distribution and propagated through the generative model (right).
106
+
107
+ Table 2: Negative log-likelihood performance on dynamically (left) and statically (right) binarized MNIST in nats. For the dynamically binarized MNIST results show the results for the FAME No Concatenation that has no dependency on the input image. The evidence lower-bound is computed with 5000 importance weighted samples $\mathcal { L } _ { 5 0 0 0 } ( \bar { \theta } , \phi ; x )$ .
108
+
109
+ <table><tr><td></td><td>NLL</td><td></td><td></td></tr><tr><td>IWAE(BURDA ET AL., 2015A)</td><td>82.90</td><td></td><td>NLL</td></tr><tr><td>LVAE(SONDERBY ET AL.,2016)</td><td>81.74</td><td>DRAW (GREGOR ET AL., 2015)</td><td>80.97</td></tr><tr><td>CAGEM(MAALOE ET AL.,2017)</td><td>81.60</td><td>DVAE (ROLFE,2017)</td><td>81.01</td></tr><tr><td>DVAE(ROLFE,2017)</td><td>80.04</td><td>IAF VAE (KINGMA ET AL., 2016)</td><td>79.88</td></tr><tr><td>VGP (TRAN ET AL., 2016)</td><td>79.88</td><td>PIXELRNN(VAN DEN OORD ET AL., 2016B)</td><td>79.20</td></tr><tr><td>IAF VAE KINGMA ET AL. (2016) VLAE CHEN ET AL. (2017)</td><td>79.10</td><td>VLAE (CHEN ET AL.,2017)</td><td>79.03</td></tr><tr><td>FAMENO CONCATENATION</td><td>78.53 78.73</td><td>PIXELVAE (GULRAJANI ET AL., 2016)</td><td>79.02</td></tr><tr><td>FAME</td><td colspan="2">FAME 77.82</td><td>79.30</td></tr></table>
110
+
111
+ We use a hierarchy of 5 stochastic latent variables. In case of gray-scaled images the stochastic latent layers are dense with sizes 64, 32, 16, 8, 4 (equivalent to Sønderby et al. (2016)) and for the natural images they are spatial (cf. Table 1). There was no significant difference when using feature maps (as compared to dense layers) for modelling gray-scaled images. We apply batchnormalization (Ioffe & Szegedy, 2015) and ReLU activation functions as the non-linearity between all hidden layers $h _ { i , j }$ and use a simple PixelCNN as in van den Oord et al. (2016b) with 4 residual blocks.
112
+
113
+ Because of the concatenation in the autoregressive decoder (cf. Figure 1), generation is a cumbersome process that scales linearly with the amount of pixels in the input image. Therefore we have defined a slightly changed parameterization denoted FAME No Concatenation, where the concatenation with the input is omitted. The generation has no dependency on the input data distribution and can therefore be performed in one forward-pass through the generative model.
114
+
115
+ For optimization we apply the Adam optimizer (Kingma & Ba, 2014) with a constant learning rate of 0.0003. We use 1 importance weighted sample and temperature (Sønderby et al., 2016) scaling from .3 to 1. during the initial 200 epochs for gray-scaled images and .01 to 1. during the first 400 epochs for natural images. All models are trained using the same optimization scheme.
116
+
117
+ # 3.1 GENERATIVE PERFORMANCE ON GRAY-SCALED IMAGES
118
+
119
+ The MNIST dataset serves as a good sanity check and has a myriad of previously published generative modelling benchmarks. We experienced much faster convergence rate on FAME compared to training a regular LVAE. On the dynamically binarized MNIST dataset we see a significant improvement (cf. Table 2). However, on the statically binarized MNIST, the parameterization and current optimization strategy was unsuccessful in achieving state-of-the-art results (cf. Table 1). In Figure 4a we see random samples drawn from a $\mathcal { N } ( 0 , \bar { I } )$ distribution and propagated through the decoder parameters $\theta$ . We also trained the FAME No Concatenation which performs nearly on par with the previously state-of-the-art VLAE model (Chen et al., 2017) that in comparison utilizes a skip-connection from the input distribution to the generative decoder: $\begin{array} { r } { p _ { \mathrm { l o c a l } } ( x \bar { \vert } z ) = \prod _ { i } p ( x _ { i } \vert z , x _ { \mathrm { W i n d o w A r o u n d } ( i ) } ) } \end{array}$ . This proves that a better parameterization of the VAE improves the performance without the need of tedious autoregressive generation. There was no significant difference in the $K L { \big ( } q ( \mathbf { z } | x ) | | p ( \mathbf { z } ) { \big ) }$ between FAME and FAME No Concatenation. FAME use 10.85 nats in average to encode images, whereas FAME No Concatenation use 12.29 nats.
120
+
121
+ Table 1: The convolutional layer (Conv), filter size (F), depth (K), stride (S), dense layer (Dense) and dimensionality (D) used in defining FAME for gray-scaled and natural images. The architecture is defined such that we ensure dimensionality reduction throughout the hierarchical stochastic layers. The autoregressive decoder is a PixelCNN (van den Oord et al., 2016b) with a mask $A$ convolution $\mathrm { F } { = } 7 \mathrm { x } 7$ , ${ \mathrm { K } } { = } 6 4$ , ${ \bf S } { = } 1$ followed by 4 residual blocks of convolutions with mask $B$ , $\mathrm { F } { = } 3 \mathrm { x } 3 $ , ${ \mathrm { K } } { = } 6 4$ , ${ \bf S } { = } 1$ . Finally there are three non-residual layers of convolutions with mask $B$ where the last is the output layer with a Sigmoid activation for gray-scaled images and a 256-way Softmax for natural images.
122
+
123
+ <table><tr><td colspan="2">GRAY-SCALED IMAGES 28X28</td><td>NATURAL IMAGES 32X32</td></tr><tr><td rowspan="2">h:,1</td><td>1x CONVF=5x5,K=32,S=2</td><td>2 XCONVF=3x3,K=96,S=1</td></tr><tr><td>1 X CONVF=3x3,K=64,S=1</td><td>1 XCONVF=3x3,K=96,S=2</td></tr><tr><td rowspan="2">21</td><td>1xDENSED=64</td><td>1xCONVF=3x3,K=8,S=1</td></tr><tr><td>64FEATUREVECTOR</td><td>16X16X8FEATUREMAPS</td></tr><tr><td rowspan="2">h.,2</td><td>1 X CONVF=3x3,K=64,S=2</td><td>2 X CONVF=3x3,K=192,S=1</td></tr><tr><td>1 X CONVF=3x3,K=64,S=1</td><td>1 X CONV F=3x3,K=192,S=2</td></tr><tr><td rowspan="2">22</td><td>1XDENSED=32</td><td>1xCONVF=3x3,K=16,S=1</td></tr><tr><td>32FEATUREVECTOR</td><td>8X8X16FEATUREMAPS</td></tr><tr><td rowspan="2">h:3</td><td>1 XCONVF=3x3,K=64,S=2</td><td>2 X CONVF=3x3,K=192,S=1</td></tr><tr><td>1 X CONVF=3x3,K=64,S=1</td><td>1 X CONV F=3x3,K=192,S=2</td></tr><tr><td rowspan="2">23</td><td>1XDENSE D=16</td><td>1xCONVF=3x3,K=16,S=1</td></tr><tr><td>16FEATUREVECTOR</td><td>4X4X16FEATURE MAPS</td></tr><tr><td rowspan="2">h:4</td><td>1xCONVF=3x3,K=64,S=2</td><td>2 XCONVF=3x3,K=192,S=1</td></tr><tr><td>1 X CONV F=3x3,K=64,S=1</td><td>1 X CONV F=3x3,K=192,S=2</td></tr><tr><td rowspan="2">24</td><td>1XDENSE D=8</td><td>1xCONVF=3x3,K=16,S=1</td></tr><tr><td>8 FEATURE VECTOR</td><td>2 X2X16FEATURE MAPS</td></tr><tr><td rowspan="2">h:5</td><td>1xCONVF=3x3,K=64,S=2</td><td>2 x CoNV F=3x3,K=192,S=1</td></tr><tr><td>1 X CONVF=3x3,K=64,S=1</td><td>1 X CONVF=3x3,K=192,S=2</td></tr><tr><td rowspan="2">25</td><td>1XDENSE D=4</td><td>1XDENSE D=64</td></tr><tr><td>4FEATUREVECTOR</td><td>64FEATUREVECTOR</td></tr></table>
124
+
125
+ OMNIGLOT consists of 50 alphabets of handwritten characters, where each character has a limited amount of samples. Each character has high variance which makes it harder to fit a good generative model compared to MNIST. Table 3 presents the negative log-likelihood of FAME for OMNIGLOT and demonstrates significant improvement over previously published state-of-the-art. Figure 4b shows generated samples from the learned $\theta$ parameter space.
126
+
127
+ From Sønderby et al. (2016) we have seen that the LVAE is able to learn a much tighter $\mathcal { L } _ { 1 }$ ELBO compared to the VAE. For the MNIST experiments, the $\mathcal { L } _ { 1 }$ ELBO is at 80.11 nats
128
+
129
+ NLL
130
+ Figure 3: Negative log-likelihood performance on OMNIGLOT in nats. The evidence lower-bound is computed with 5000 importance weighted samples $\mathcal { L } _ { 5 0 0 0 } ( \theta , \phi ; x )$ .
131
+
132
+ <table><tr><td></td><td>INLL</td></tr><tr><td>IWAE(BURDA ETAL.,2015A) LVAE (SONDERBY ET AL., 2016)</td><td>103.38 102.11</td></tr><tr><td>RBM(BURDA ET AL.,2015B)</td><td>100.46</td></tr><tr><td>DVAE (ROLFE,2017)</td><td>97.43</td></tr><tr><td>DRAW(GREGOR ET AL., 2015)</td><td>96.50</td></tr><tr><td>CONV DRAW (GREGOR ET AL., 2016)</td><td>91.00</td></tr><tr><td>VLAE CHEN ET AL.(2017)</td><td>89.83</td></tr><tr><td>FAME</td><td>82.54</td></tr></table>
133
+
134
+ compared to the $\mathcal { L } _ { 5 0 0 0 } \ 7 7 . 8 2$ nats. Similarly the OMNIGLOT $\mathcal { L } _ { 1 }$ ELBO is 86.62 nats compared to 82.54 nats. This shows significant improvements when using importance weighted samples and indicates that the parameterization of the FAME can be done in a way so that the bound is even tighter. We also find that the top-most latent stochastic layer is not collapsing into its prior, since the $\check { K L } \big ( q ( z _ { 5 } | x ) | | p ( z _ { 5 } ) \big )$ is 5.04 nats for MNIST and 3.67 nats for OMNIGLOT.
135
+
136
+ ![](images/b338fdae5c47740a67c45a5f778ab34fd0412cbd170a9cb5d7e7028127ae58e9.jpg)
137
+ Figure 4: Random samples drawn from a $\mathcal { N } ( 0 , I )$ distribution and propagated through the generative model of FAME for the dynamically binarized MNIST (a) and OMNIGLOT (b) dataset.
138
+
139
+ ![](images/436d967e9861b19cef79af447ec1513a5608bb503e90c3e6c5ea2ab698d460f6.jpg)
140
+ Figure 5: MNIST reconstructions when masking the output from the FAME stochastic variables (a) and the concatenated input image (b) prior to feeding them to the autoregressive PixelCNN. It is interesting to see how the edge information comes from the autoregressive dependency on the input image.
141
+
142
+ In order to analyze the contribution from the autoregressive decoder we experimented on masking the contribution from either the concatenated image or the output of the FAME decoder before feeding it into the PixelCNN layers (cf. Figure 1). In Figure 5a we see the results of reconstructing MNIST images when masking out the contribution from the stochastic variables and in Figure 5b we mask out the contribution from the concatenated input image.
143
+
144
+ # 3.2 GENERATIVE PERFORMANCE ON NATURAL IMAGES
145
+
146
+ We investigate the performance of FAME on two natural image datasets: CIFAR10 and ImageNet. Learning a generative model on natural images is more challenging, which is also why there are many tricks that can be done in regards to the autoregressive decoding (van den Oord et al., 2016a; Salimans et al., 2017; Chen et al., 2017). However, since we are interested in the additional expressiveness of a LVAE parameterization with convolutional stochastic latent variables, we have chosen a suboptimal architecture for the autoregressive decoding (cf. Table 1) (van den Oord et al., 2016b). An obvious improvement to the decoder would be to incorporate the PixelCNN $^ { + + }$ (Salimans et al., 2017), but by using the simpler architecture we ensure that the improvements in log-likelihood is not a result of a strong autoregressive model.
147
+
148
+ From Table 3 we see the performance from FAME and FAME No Concatenation on the CIFAR10 dataset. Similarly to the gray-scaled images, FAME outperforms current state-of-the-art results significantly. It is also interesting to see how FAME No Concatenation performs close to the previously published state-of-the-art results. Especially in the image space, this could prove interesting, since the FAME No Concatenation has no additional autoregressive runtime complexity. We only investigated the $3 2 \mathrm { x } 3 2 $ ImageNet dataset, since the training time is significant and it outperformed the $6 4 \mathrm { x } 6 4$ models (cf. Table 4), whereas the previously published 64x64 ImageNet models consistently outperform their 32x32 counterpart. In Figure 2 we show samples from FAME on the CIFAR10 dataset. Similarly to previously published results it is difficult to analyze the performance from the samples. However, we can conclude that FAME is able to capture spatial correlations in the images for generating sharp samples. It is also interesting to see how it captures the contours of objects in the images.
149
+
150
+ BITS/DIM
151
+ Table 3: Negative log-likelihood performance on CIFAR10 in bits/dim. The evidence lower-bound is computed with 1000 importance weighted samples $\mathcal { L } _ { 1 0 0 0 } ( \theta , \phi ; x )$ .
152
+
153
+ <table><tr><td>UNIFORMDISTRIBUTION(VANDEN OORD ET AL.,2016B) DEEP DIFFUSION (SOHL-DICKSTEIN ET AL.,2015) MULTIVARIATE GAUSSIAN(VAN DEN OORD ET AL.,2016B) NICE(DINH ET AL., 2014) DEEP GMMS(VAN DEN OORD&amp; SCHRAUWEN,2014) CONV DRAW (GREGOR ET AL.,2016) REAL NVP (DINH ET AL., 2016) PIXELCNN(VAN DEN OORD ET AL.,2016B) IAF VAE KINGMA ET AL. (2016) GATED PIXELCNN(VAN DEN OORD ET AL.,2016A) PIXELRNN(VAN DEN OORD ET AL.,2016B) VLAE(CHEN ET AL., 2017) 2.95 PIXELCNN++ (SALIMANS ET AL., 2017) 2.92 FAMENO CONCATENATION 2.98 FAME 2.75</td><td>8.00 5.40 4.70 4.48 4.00 3.58 3.49 3.14 3.11 3.03 3.00</td></tr></table>
154
+
155
+ Table 4: Negative log-likelihood performance on ImageNet in bits/dim. The evidence lower-bound is computed with 1000 importance weighted samples $\mathcal { \bar { L } } _ { 1 0 0 0 } ( \theta , \phi ; x )$ .
156
+
157
+ <table><tr><td></td><td>BITS/DIM</td></tr><tr><td>CONVDRAW 32X32(GREGOR ET AL.,2016)</td><td>4.40</td></tr><tr><td>CONV DRAW 64X64(GREGOR ET AL., 2016)</td><td>4.10</td></tr><tr><td>REAL NVP 32X32 (DINH ET AL.,2016)</td><td>4.28</td></tr><tr><td>REAL NVP 64X64 (DINH ET AL.,2016)</td><td>4.01</td></tr><tr><td>PIXELVAE 64X64(GULRAJANI ET AL.,2016)</td><td>3.66</td></tr><tr><td>PIXELRNN 32X32(VAN DEN OORD ET AL., 2016B)</td><td>3.86</td></tr><tr><td>PIXELRNN 64X64(VAN DEN OORD ET AL., 2016B)</td><td>3.63</td></tr><tr><td>GATED PIXELCNN 32X32(VAN DEN OORD ET AL., 2016A)</td><td>3.83</td></tr><tr><td>GATED PIXELCNN 64X64(VAN DEN OORD ET AL.,2016A)</td><td>3.57</td></tr><tr><td>FAME32x32</td><td>3.23</td></tr></table>
158
+
159
+ # 4 CONCLUSION
160
+
161
+ We have presented FAME, an extension to the VAE that significantly improve state-of-the-art performance on standard benchmark datasets. By introducing feature map representations in the latent stochastic variables in addition to top-down inference we have shown that the model is able to capture representations of complex image distributions while utilizing a powerful autoregressive architecture as a decoder.
162
+
163
+ In order to analyze the contribution from the VAE as opposed to the autoregressive model, we have presented results without concatenating the input image when reconstructing and generating. This parameterization shows on par results with the previously state-of-the-art results without depending on the time consuming autoregressive generation.
164
+
165
+ Further directions for FAME is to (i) test it on larger image datasets with images of a higher resolution, (ii) expand the model to capture other data modalities such as audio and text, (iii) combine the model in a semi-supervised framework.
166
+
167
+ # REFERENCES
168
+
169
+ Yoshua Bengio, Aaron Courville, and Pascal Vincent. Representation learning: A review and new perspectives. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(8), 2013.
170
+
171
+ S.R. Bowman, L. Vilnis, O. Vinyals, A.M. Dai, R. Jozefowicz, and S. Bengio. Generating sentences from a continuous space. arXiv preprint arXiv:1511.06349, 2015.
172
+
173
+ Yuri Burda, Roger Grosse, and Ruslan Salakhutdinov. Importance Weighted Autoencoders. arXiv preprint arXiv:1509.00519, 2015a.
174
+
175
+ Yuri Burda, Roger Grosse, and Ruslan Salakhutdinov. Accurate and conservative estimates of mrf log-likelihood using reverse annealing. In Proceedings of the International Conference on Artificial Intelligence and Statistics, 2015b.
176
+
177
+ Xi Chen, Diederik P. Kingma, Tim Salimans, Yan Duan, Prafulla Dhariwal, John Schulman, Ilya Sutskever, and Pieter Abbeel. Variational Lossy Autoencoder. In International Conference on Learning Representations, 2017.
178
+
179
+ Laurent Dinh, David Krueger, and Yoshua Bengio. Nice: Non-linear independent components estimation. arXiv preprint arXiv:1410.8516, 2014.
180
+
181
+ Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using real nvp. arXiv preprint arXiv:1605.08803, 2016.
182
+
183
+ Marco Fraccaro, Søren Kaae Sønderby, Ulrich Paquet, and Ole Winther. Sequential neural models with stochastic layers. In Advances in Neural Information Processing Systems. 2016.
184
+
185
+ Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in Neural Information Processing Systems. 2014.
186
+
187
+ Karol Gregor, Ivo Danihelka, Alex Graves, and Daan Wierstra. Draw: A recurrent neural network for image generation. arXiv preprint arXiv:1502.04623, 2015.
188
+
189
+ Karol Gregor, Rezende Danilo Jimenez Besse, Fredric, Ivo Danihelka, and Daan Wierstra. Towards conceptual compression. arXiv preprint arXiv:1604.08772, 2016.
190
+
191
+ Ishaan Gulrajani, Kundan Kumar, Faruk Ahmed, Adrien Ali Taiga, Francesco Visin, David Vazquez, and Aaron Courville. PixelVAE: A latent variable model for natural images. arXiv e-prints, 1611.05013, November 2016.
192
+
193
+ Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Proceedings of International Conference on Machine Learning, 2015.
194
+
195
+ Diederik Kingma and Jimmy Ba. Adam: A Method for Stochastic Optimization. arXiv preprint arXiv:1412.6980, 12 2014.
196
+
197
+ Diederik P. Kingma, Danilo Jimenez Rezende, Shakir Mohamed, and Max Welling. SemiSupervised Learning with Deep Generative Models. In Proceedings of the International Conference on Machine Learning, 2014.
198
+
199
+ Diederik P Kingma, Tim Salimans, Rafal Jozefowicz, Xi Chen, Ilya Sutskever, and Max Welling. Improved variational inference with inverse autoregressive flow. In Advances in Neural Information Processing Systems. 2016.
200
+
201
+ Max Kingma, Diederik P; Welling. Auto-Encoding Variational Bayes. arXiv preprint arXiv:1312.6114, 12 2013.
202
+
203
+ Rahul G Krishnan, Uri Shalit, and David Sontag. Deep Kalman filters. arXiv:1511.05121, 2015.
204
+
205
+ Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, University of Toronto, 2009.
206
+
207
+ Brenden M Lake, Ruslan R Salakhutdinov, and Josh Tenenbaum. One-shot learning by inverting a compositional causal process. In Advances in Neural Information Processing Systems. 2013.
208
+
209
+ Yann LeCun, Lon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pp. 2278–2324, 1998.
210
+
211
+ Lars Maaløe, Casper K. Sønderby, Søren K. Sønderby, and Ole Winther. Auxiliary Deep Generative Models. In Proceedings of the International Conference on Machine Learning, 2016.
212
+
213
+ Lars Maaløe, Marco Fraccaro, and Ole Winther. Semi-supervised generation with cluster-aware generative models. arXiv preprint arXiv:1704.00637, 2017.
214
+
215
+ Antti Rasmus, Mathias Berglund, Mikko Honkala, Harri Valpola, and Tapani Raiko. Semisupervised learning with ladder networks. In Advances in Neural Information Processing Systems, 2015.
216
+
217
+ Danilo J. Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic Backpropagation and Approximate Inference in Deep Generative Models. arXiv preprint arXiv:1401.4082, 04 2014.
218
+
219
+ Danilo Jimenez Rezende and Shakir Mohamed. Variational Inference with Normalizing Flows. In Proceedings of the International Conference on Machine Learning, 2015.
220
+
221
+ Jason Tyler Rolfe. Discrete variational autoencoders. In Proceedings of the International Conference on Learning Representations, 2017.
222
+
223
+ Tim Salimans, Andrej Karparthy, Xi Chen, and Diederik P. Kingma. Pixelcnn $^ { + + }$ : Improving the pixelcnn with discretized logistic mixture likelihood and other modifications. arXiv preprint:1701.05517, 2017, 2017.
224
+
225
+ Jascha Sohl-Dickstein, Eric A. Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics. arXiv preprint arXiv:1503.03585, 2015.
226
+
227
+ Casper Kaae Sønderby, Tapani Raiko, Lars Maaløe, Søren Kaae Sønderby, and Ole Winther. Ladder variational autoencoders. In Advances in Neural Information Processing Systems 29. 2016.
228
+
229
+ Dustin Tran, Rajesh Ranganath, and David M Blei. Variational Gaussian process. In Proceedings of the International Conference on Learning Representations, 2016.
230
+
231
+ Aaron van den Oord and Benjamin Schrauwen. Factoring variations in natural images with deep gaussian mixture models. In Advances in Neural Information Processing Systems, 2014.
232
+
233
+ Aaron van den Oord, Nal Kalchbrenner, Oriol Vinyals, Lasse Espeholt, Alex Graves, and Koray Kavukcuoglu. Conditional image generation with pixelcnn decoders. arXiv preprint arXiv:1606.05328, 2016a.
234
+
235
+ Aaron van den Oord, Kalchbrenner Nal, and Koray Kavukcuoglu. Pixel recurrent neural networks. arXiv preprint arXiv:1601.06759, 01 2016b.
parse/train/Hy_o3x-0b/Hy_o3x-0b_content_list.json ADDED
@@ -0,0 +1,1241 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "FEATURE MAP VARIATIONAL AUTO-ENCODERS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 748,
10
+ 121
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 183,
19
+ 145,
20
+ 398,
21
+ 172
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 210,
32
+ 544,
33
+ 224
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "There have been multiple attempts with variational auto-encoders (VAE) to learn powerful global representations of complex data using a combination of latent stochastic variables and an autoregressive model over the dimensions of the data. However, for the most challenging natural image tasks the purely autoregressive model with stochastic variables still outperform the combined stochasticautoregressive models. In this paper, we present simple additions to the VAE framework that generalize to natural images by embedding spatial information in the stochastic layers. We significantly improve the state-of-the-art results on MNIST, OMNIGLOT, CIFAR10 and ImageNet when the feature map parameterization of the stochastic variables are combined with the autoregressive PixelCNN approach. Interestingly, we also observe close to state-of-the-art results without the autoregressive part. This opens the possibility for high quality image generation with only one forward-pass. ",
40
+ "bbox": [
41
+ 233,
42
+ 242,
43
+ 764,
44
+ 422
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 453,
55
+ 336,
56
+ 468
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "In representation learning the goal is to learn a posterior latent distribution that explains the observed data well (Bengio et al., 2013). Learning good representations from data can be used for various tasks such as generative modelling and semi-supervised learning (Kingma, 2013; Rezende et al., 2014; Kingma et al., 2014; Rasmus et al., 2015; Maaløe et al., 2016). The decomposition of variational auto-encoders (VAE) (Kingma, 2013; Rezende et al., 2014) provides the potential to disentangle the internal representation of the input data from local to global features through a hierarchy of stochastic latent variables. This makes the VAE an obvious candidate for learning good representations. However, in order to make inference tractable VAEs contain simplifying assumptions. This limits their ability to learn a good posterior latent representation. ",
63
+ "bbox": [
64
+ 174,
65
+ 484,
66
+ 825,
67
+ 611
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "In complex data distributions with temporal dependencies (e.g. text, images and audio), the VAE assumption on conditional independence in the input distribution limits the ability to learn local structures. This has a significant impact on its generative performance, and thereby also the learned representations. Additionally, the one-layered VAE model with a $\\mathcal { N } ( 0 , I )$ latent prior poses serious constraints on the posterior complexity that the model is able to learn. A deep hierarchy of stochastic latent variables should endow the model with more expressiveness, but the VAE has a tendency to skip the learning of the higher representations since they pose a direct cost in its optimization term. ",
74
+ "bbox": [
75
+ 174,
76
+ 617,
77
+ 825,
78
+ 715
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "There have been several attempts to eliminate the limitations of the VAE. Some concern formulating a more expressive variational distribution (Burda et al., 2015b; Rezende & Mohamed, 2015; Tran et al., 2016; Maaløe et al., 2016) where other concerns learning a deeper hierarchy of latent variables (Sønderby et al., 2016). These contributions have resulted in better performance, but are still limited when modelling complex data distributions where a conditional independence does not apply. When parameterizing the VAE decoder with recurrent neural networks (Krishnan et al., 2015; Bowman et al., 2015; Fraccaro et al., 2016), the decoding architecture gets too powerful which results in unused latent stochastic variables (Chen et al., 2017). ",
85
+ "bbox": [
86
+ 174,
87
+ 722,
88
+ 825,
89
+ 833
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "The limitations of the VAE have spawned interest towards other generative models such as Generative Adversarial Networks (GAN) (Goodfellow et al., 2014) and the autoregressive PixelCNN/PixelRNN models (van den Oord et al., 2016b). These methods have proven powerful in learning good generative models, but the lack of stochastic latent variables makes them less suitable for representation learning purposes (Chen et al., 2017). Lately, we have seen several successful attempts to combine VAEs with PixelCNNs (Gulrajani et al., 2016; Chen et al., 2017). This results in a model where the global structure of the data is learned in the stochastic latent variables of the VAE and the local structure is learned in the PixelCNN. However, despite the additional complexity and potential extra expressiveness, these models do not outperform a simple autoregressive model (van den Oord et al., 2016a; Salimans et al., 2017). ",
96
+ "bbox": [
97
+ 174,
98
+ 840,
99
+ 823,
100
+ 922
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "image",
106
+ "img_path": "images/81b532c59f5662a4ac87ce773d4f0e660749b00b8951bd9c03beb7b75132da0f.jpg",
107
+ "image_caption": [
108
+ "Figure 1: A visualization of FAME where the solid lines denote the variational approximation (inference/encoder/recognition) network and dashed lines denote the generative model (decoder) network for training. When performing reconstructions during training, the input image is concatenated with the output of the generative model (blue) and when generating the model follows a normal autoregressive sampling flow (red) while also using the stochastic latent variables $\\mathbf { z } = z _ { 1 } , . . . , z _ { L }$ . Both the variational approximation and the generative model follow a top-down hierarchical structure which enables precision weighted stochastic variables in the variational approximation. "
109
+ ],
110
+ "image_footnote": [],
111
+ "bbox": [
112
+ 173,
113
+ 106,
114
+ 820,
115
+ 268
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "",
122
+ "bbox": [
123
+ 173,
124
+ 400,
125
+ 825,
126
+ 457
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "In this paper we present the Feature Map Variational Auto-Encoder (FAME) that combines the top-down variational approximation presented in the Ladder Variational Auto-Encoder (LVAE) (Sønderby et al., 2016) with a spatial (feature map) representation of the stochastic latent variables and an autoregressive decoder. We show that (i) FAME outperforms previously state-of-the-art loglikelihood on MNIST, OMNIGLOT, CIFAR10 and ImageNet, (ii) FAME learns a deep hierarchy of stochastic latent variables without inactivated latent units, (iii) by removing the autoregressive decoder FAME performs close to previous state-of-the-art log-likelihood suggesting that it is possible to get good quality generation with just one forward pass. ",
133
+ "bbox": [
134
+ 173,
135
+ 463,
136
+ 825,
137
+ 575
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "2 FEATURE MAP VARIATIONAL AUTO-ENCODER ",
144
+ "text_level": 1,
145
+ "bbox": [
146
+ 174,
147
+ 594,
148
+ 594,
149
+ 611
150
+ ],
151
+ "page_idx": 1
152
+ },
153
+ {
154
+ "type": "text",
155
+ "text": "The VAE (Rezende et al., 2014; Kingma, 2013) is a generative model with a hierarchy of stochastic latent variables: ",
156
+ "bbox": [
157
+ 176,
158
+ 625,
159
+ 823,
160
+ 654
161
+ ],
162
+ "page_idx": 1
163
+ },
164
+ {
165
+ "type": "equation",
166
+ "img_path": "images/b330a27c8e098ad61d882530a6477b623f889f52d7070d69ad82140ffec8f14f.jpg",
167
+ "text": "$$\n\\displaystyle p _ { \\theta } ( x , \\mathbf { z } ) = p _ { \\theta } ( x | z _ { 1 } ) p _ { \\theta } ( z _ { L } ) \\prod _ { i = 1 } ^ { L - 1 } p _ { \\theta } ( z _ { i } | z _ { i + 1 } ) ~ ,\n$$",
168
+ "text_format": "latex",
169
+ "bbox": [
170
+ 349,
171
+ 652,
172
+ 647,
173
+ 696
174
+ ],
175
+ "page_idx": 1
176
+ },
177
+ {
178
+ "type": "text",
179
+ "text": "where $\\mathbf { z } ~ = ~ z _ { 1 } , . . . , z _ { L }$ , $\\theta$ denotes the parameters, and $L$ denotes the number of stochastic latent variable layers. The stochastic latent variables are usually modelled as conditionally independent Gaussian distributions with a diagonal covariance: ",
180
+ "bbox": [
181
+ 174,
182
+ 698,
183
+ 825,
184
+ 739
185
+ ],
186
+ "page_idx": 1
187
+ },
188
+ {
189
+ "type": "equation",
190
+ "img_path": "images/efa02f7e1ac74238faf389bddadc10fa486057ee28540e45dbb884526644ba8f.jpg",
191
+ "text": "$$\np _ { \\theta } ( z _ { i } | z _ { i + 1 } ) = \\mathcal { N } \\Big ( z _ { i } ; \\mu _ { \\theta , i } ( z _ { i + 1 } ) , \\mathrm { d i a g } ( \\sigma _ { \\theta , i } ^ { 2 } ( z _ { i + 1 } ) ) \\Big ) , \\qquad p _ { \\theta } ( z _ { L } ) = \\mathcal { N } \\Big ( z _ { L } ; 0 , I \\Big ) .\n$$",
192
+ "text_format": "latex",
193
+ "bbox": [
194
+ 228,
195
+ 742,
196
+ 769,
197
+ 770
198
+ ],
199
+ "page_idx": 1
200
+ },
201
+ {
202
+ "type": "text",
203
+ "text": "Since the posterior $p ( \\mathbf { z } | x )$ often is intractable we introduce a variational approximation $q _ { \\phi } ( \\mathbf { z } | x )$ with parameters $\\phi$ . In the original VAE formulation $q _ { \\phi } ( \\mathbf { z } | x )$ is decomposed as a bottom-up inference path through the hierarchy of the stochastic layers: ",
204
+ "bbox": [
205
+ 174,
206
+ 779,
207
+ 825,
208
+ 821
209
+ ],
210
+ "page_idx": 1
211
+ },
212
+ {
213
+ "type": "equation",
214
+ "img_path": "images/ee7d01da20bf01afa53cb66147b2861c3924776af025d0c437cafb5b6566f8e5.jpg",
215
+ "text": "$$\n\\begin{array} { l } { { \\displaystyle q _ { \\phi } ( { \\bf z } | x ) = q _ { \\phi } ( z _ { 1 } | x ) \\prod _ { i = 2 } ^ { L } q _ { \\phi } ( z _ { i } | z _ { i - 1 } ) ~ , } } \\\\ { { \\displaystyle q _ { \\phi } ( z _ { 1 } | x ) = \\mathcal { N } \\Big ( z _ { 1 } ; \\mu _ { \\phi , 1 } ( x ) , \\mathrm { d i a g } ( \\sigma _ { \\phi , 1 } ^ { 2 } ( x ) ) \\Big ) ~ , } } \\\\ { { \\displaystyle q _ { \\phi } ( z _ { i } | z _ { i - 1 } ) = \\mathcal { N } \\Big ( z _ { i } ; \\mu _ { \\phi , i } ( z _ { i - 1 } ) , \\mathrm { d i a g } ( \\sigma _ { \\phi , i } ^ { 2 } ( z _ { i - 1 } ) ) \\Big ) ~ . } } \\end{array}\n$$",
216
+ "text_format": "latex",
217
+ "bbox": [
218
+ 323,
219
+ 824,
220
+ 676,
221
+ 924
222
+ ],
223
+ "page_idx": 1
224
+ },
225
+ {
226
+ "type": "text",
227
+ "text": "We optimize an evidence lower-bound (ELBO) to the log-likelihood $\\begin{array} { r } { \\log p _ { \\theta } ( x ) = \\log \\int _ { \\mathbf { z } } p _ { \\theta } ( x , \\mathbf { z } ) d \\mathbf { z } } \\end{array}$ . Burda et al. (2015a) introduced the importance weighted bound: ",
228
+ "bbox": [
229
+ 171,
230
+ 102,
231
+ 823,
232
+ 132
233
+ ],
234
+ "page_idx": 2
235
+ },
236
+ {
237
+ "type": "equation",
238
+ "img_path": "images/c8a0819a9affddf47cdf353fbdc1450b8b2dc9dfec3022f76e7dd972e2099d56.jpg",
239
+ "text": "$$\n\\log p ( x ) \\ge \\mathbb { E } _ { q _ { \\phi } ( \\mathbf { z } ^ { 1 } | x ) } , . . . , \\mathbb { E } _ { q _ { \\phi } ( \\mathbf { z } ^ { K } | x ) } \\left[ \\log \\sum _ { k = 1 } ^ { K } \\frac { p _ { \\theta } ( x , \\mathbf { z } ^ { k } ) } { q _ { \\phi } ( \\mathbf { z } ^ { k } | x ) } \\right] \\equiv \\mathcal { L } _ { K } ( \\theta , \\phi ; x )\n$$",
240
+ "text_format": "latex",
241
+ "bbox": [
242
+ 263,
243
+ 138,
244
+ 733,
245
+ 183
246
+ ],
247
+ "page_idx": 2
248
+ },
249
+ {
250
+ "type": "text",
251
+ "text": "and proved that $\\mathcal L _ { K } ( \\theta , \\phi ; x ) \\ge \\mathcal L _ { L } ( \\theta , \\phi ; x )$ for $K > L$ . For $K = 1$ the bound co-incides with the standard ELBO: $\\mathcal { L } ( \\theta , \\phi ; x ) = \\mathcal { L } _ { 1 } ( \\theta , \\phi ; x )$ . The hierarchical structure of both the variational approximation and generative model give the VAE the expressiveness to learn different representations of the data throughout its stochastic variables, going from local (e.g. edges in images) to global features (e.g. class specific information). However, we can apply as recursive argument Maaløe et al. (2017) to show that when optimizing with respect to the parameters $\\theta$ and $\\phi$ the VAE is regularized towards $q _ { \\phi } ( z _ { L } | z _ { L - 1 } ) = p _ { \\theta } ( z _ { L } ) = \\bar { \\mathcal { N } } ( z _ { L } ; 0 , \\bar { I _ { ) } }$ . This is evident if we rewrite Equation 6 for $K = 1$ : ",
252
+ "bbox": [
253
+ 173,
254
+ 188,
255
+ 826,
256
+ 287
257
+ ],
258
+ "page_idx": 2
259
+ },
260
+ {
261
+ "type": "equation",
262
+ "img_path": "images/19f052373d74f988225253cf945d715bedd33a1cf24bc9df874f5edd3ed0cd12.jpg",
263
+ "text": "$$\n\\mathcal { L } ( \\theta , \\phi ; x ) = \\mathbb { E } _ { q _ { \\phi } ( z _ { 1 : L - 1 } | x ) } \\left[ \\frac { p _ { \\theta } ( x , z _ { 1 : L - 1 } | z _ { L } ) } { q _ { \\phi } ( z _ { 1 : L - 1 } | x ) } \\right] - \\mathbb { E } _ { q _ { \\phi } ( z _ { 1 : L - 1 } | x ) } \\left[ K L \\big ( q _ { \\phi } ( z _ { L } | z _ { L - 1 } ) | | p _ { \\theta } ( z _ { L } ) \\big ) \\right] .\n$$",
264
+ "text_format": "latex",
265
+ "bbox": [
266
+ 186,
267
+ 292,
268
+ 810,
269
+ 329
270
+ ],
271
+ "page_idx": 2
272
+ },
273
+ {
274
+ "type": "text",
275
+ "text": "$K L \\big ( q _ { \\phi } ( z _ { L } | z _ { L - 1 } ) | | p _ { \\theta } ( z _ { L } ) \\big ) = 0$ is a local maxima and learning a useful representation in $z _ { L }$ can therefore be disregarded throughout the remainder of the training. The same argumentation can be used for all subsequent layers $z _ { 2 : L }$ , hence the VAE has a tendency to collapse towards not using the full hierarchy of latent variables. There are different ways to get around this tendency, where the simplest is to down-weight the $K L$ -divergence with a temperature term (Bowman et al., 2015; Sønderby et al., 2016). This term is applied during the initial phase of optimization and thereby downscales the regularizing effect. However, this only works for a limited number of hierarchically stacked latent variables (Sønderby et al., 2016). ",
276
+ "bbox": [
277
+ 173,
278
+ 334,
279
+ 825,
280
+ 448
281
+ ],
282
+ "page_idx": 2
283
+ },
284
+ {
285
+ "type": "text",
286
+ "text": "Formulating a deep hierarchical VAE is not the only cause of inactive latent variables, it also occurs when the parameterization of the decoder gets too powerful (Krishnan et al., 2015; Fraccaro et al., 2016; Chen et al., 2017). This can be caused by using autoregressive models such as $p ( x , \\mathbf { z } ) =$ $\\begin{array} { r } { \\prod _ { j } p ( x ^ { j } | x ^ { < j } , \\mathbf { z } ) p ( \\mathbf { z } ) } \\end{array}$ . Chen et al. (2017) circumvent this by introducing the Variational Lossy AutoEncoder (VLAE) where they define the architecture for the VAE and autoregressive model such that they capture global and local structures. They also utilize the power of more expressive posterior approximations using inverse autoregressive flows (Rezende & Mohamed, 2015; Kingma et al., 2016). In the PixelVAE, Gulrajani et al. (2016) takes a similar approach to defining the generative model but makes a simpler factorizing decomposition in the variational approximation ${ \\bar { q } } _ { \\phi } ( \\mathbf { z } | x ) =$ $\\textstyle \\prod _ { i } ^ { L } q _ { \\phi } ( z _ { i } | x )$ , where the terms have some degree of parameter sharing. This formulation results in a less flexible model. ",
287
+ "bbox": [
288
+ 173,
289
+ 454,
290
+ 825,
291
+ 612
292
+ ],
293
+ "page_idx": 2
294
+ },
295
+ {
296
+ "type": "text",
297
+ "text": "In Kingma et al. (2016); Gulrajani et al. (2016); Chen et al. (2017) we have seen that VAEs with simple decompositions of the stochastic latent variables and a powerful autoregressive decoder can result in good generative performance and representation learning. However, despite the additional cost of learning a VAE we only see improvement in the log-likelihood over the PixelCNN for small gray-scale image datasets (Salimans et al., 2017). We propose FAME that extends the VAE with a top-down variational approximation similar to the LVAE (Sønderby et al., 2016) combined with spatial stochastic latent layers and an autoregressive decoder, so that we ensure expressive latent stochastic variables learned in a deep hierarchy (cf. Figure 1). ",
298
+ "bbox": [
299
+ 173,
300
+ 617,
301
+ 825,
302
+ 731
303
+ ],
304
+ "page_idx": 2
305
+ },
306
+ {
307
+ "type": "text",
308
+ "text": "2.1 TOP-DOWN VARIATIONAL APPROXIMATION ",
309
+ "text_level": 1,
310
+ "bbox": [
311
+ 174,
312
+ 746,
313
+ 519,
314
+ 761
315
+ ],
316
+ "page_idx": 2
317
+ },
318
+ {
319
+ "type": "text",
320
+ "text": "The LVAE (Sønderby et al., 2016) does not change the generative model but changes the variational distribution to be top-down like the generative model. Furthermore the variational distribution shares parameters with the generative model which can be viewed as a precision-weighted (inverse variance) combination of information from the prior and data distribution. The variational approximation is defined as: ",
321
+ "bbox": [
322
+ 173,
323
+ 772,
324
+ 825,
325
+ 843
326
+ ],
327
+ "page_idx": 2
328
+ },
329
+ {
330
+ "type": "equation",
331
+ "img_path": "images/6bcd09aacdcbe2e294834cbd1bea7f2abf71fc53f14340911af3a937659ef722.jpg",
332
+ "text": "$$\nq _ { \\phi } ( { \\bf z } | x ) = q _ { \\phi } ( z _ { L } | x ) \\prod _ { i = 1 } ^ { L - 1 } q _ { \\phi } ( z _ { i } | z _ { i + 1 } , x ) .\n$$",
333
+ "text_format": "latex",
334
+ "bbox": [
335
+ 364,
336
+ 847,
337
+ 632,
338
+ 890
339
+ ],
340
+ "page_idx": 2
341
+ },
342
+ {
343
+ "type": "text",
344
+ "text": "The stochastic latent variables are all fully factorized Gaussian distributions and are therefore modelled by $q _ { \\phi } ( z _ { i } | z _ { i + 1 } , x ) = \\mathcal { N } ( z _ { i } | \\mu _ { i } , \\mathrm { d i a g } ( \\bar { \\sigma } _ { i } ^ { 2 } ) )$ for layers $i = 1 , . . . , L$ . Instead of letting $q$ and $p$ have ",
345
+ "bbox": [
346
+ 173,
347
+ 895,
348
+ 821,
349
+ 925
350
+ ],
351
+ "page_idx": 2
352
+ },
353
+ {
354
+ "type": "text",
355
+ "text": "separate parameters (as in the VAE), the LVAE let the mean and variance be defined in terms of a function of $x$ (the bottom-up data part) and the generative model (the top-down prior): ",
356
+ "bbox": [
357
+ 171,
358
+ 103,
359
+ 823,
360
+ 132
361
+ ],
362
+ "page_idx": 3
363
+ },
364
+ {
365
+ "type": "equation",
366
+ "img_path": "images/258a1be867d8cb265760d67cd6071b90eb732b79e25db1af827cff920457b413.jpg",
367
+ "text": "$$\n\\begin{array} { l } { \\displaystyle \\mu _ { i } = \\frac { \\mu _ { \\phi , i } \\sigma _ { \\phi , i } ^ { - 2 } + \\mu _ { \\theta , i } \\sigma _ { \\theta , i } ^ { - 2 } } { \\sigma _ { \\phi , i } ^ { - 2 } + \\sigma _ { \\theta , i } ^ { - 2 } } } \\\\ { \\displaystyle \\sigma _ { i } = \\frac { 1 } { \\sigma _ { \\phi , i } ^ { - 2 } + \\sigma _ { \\theta , i } ^ { - 2 } } , } \\end{array}\n$$",
368
+ "text_format": "latex",
369
+ "bbox": [
370
+ 411,
371
+ 136,
372
+ 584,
373
+ 217
374
+ ],
375
+ "page_idx": 3
376
+ },
377
+ {
378
+ "type": "text",
379
+ "text": "where $\\mu _ { \\phi , i } = \\mu _ { \\phi , i } ( x )$ and $\\mu _ { \\theta , i } = \\mu _ { \\theta , i } ( z _ { i + 1 } )$ and like-wise for the variance functions. This precision weighted parameterization has previously yielded excellent results for densely connected networks (Sønderby et al., 2016). ",
380
+ "bbox": [
381
+ 174,
382
+ 219,
383
+ 825,
384
+ 262
385
+ ],
386
+ "page_idx": 3
387
+ },
388
+ {
389
+ "type": "text",
390
+ "text": "2.2 CONVOLUTIONAL STOCHASTIC LAYERS ",
391
+ "text_level": 1,
392
+ "bbox": [
393
+ 176,
394
+ 279,
395
+ 493,
396
+ 292
397
+ ],
398
+ "page_idx": 3
399
+ },
400
+ {
401
+ "type": "text",
402
+ "text": "We have seen multiple contributions (e.g. Gulrajani et al. (2016)) where VAEs (and similar models) have been parameterized with convolutions in the deterministic layers $h _ { j } ^ { i }$ , for $j = 1 , . . . , M$ , and $M$ is the number of layers connecting the stochastic latent variables $z _ { i }$ . The size of the spatial feature maps decreases towards higher latent representations and transposed convolutions are used in the generative model. In FAME we propose to extend this notion, so that each of the stochastic latent layers $z _ { i } , . . . , z _ { L - 1 }$ are also convolutional. This gives the model more expressiveness in the latent layers, since it will keep track of the spatial composition of the data (and thereby learn better representations). The top stochastic layer $z _ { L }$ in FAME is a fully-connected dense layer, which makes it simpler to condition on a non-informative $\\mathcal { N } ( 0 , I )$ prior and sample from a learned generative model $p _ { \\boldsymbol { \\theta } } ( \\boldsymbol { x } , \\mathbf { z } )$ . For the $i = 1 , . . . , L - 1$ stochastic latent variables, the architecture is as follows: ",
403
+ "bbox": [
404
+ 173,
405
+ 304,
406
+ 825,
407
+ 444
408
+ ],
409
+ "page_idx": 3
410
+ },
411
+ {
412
+ "type": "equation",
413
+ "img_path": "images/ab8ebe7975c90c4014ae9988847897759b3dabc4881bf30d4faa057ae542ece4.jpg",
414
+ "text": "$$\n\\begin{array} { r l } & { \\quad h _ { M , i } = \\mathrm { C N N } ( h _ { < M , i } ) } \\\\ & { \\quad \\mu _ { \\phi \\vee \\theta , i } = \\mathrm { L i n e a r } ( \\mathrm { C O N V } ( h _ { M , i } ) ) } \\\\ & { \\sigma _ { \\phi \\vee \\theta , i } = \\mathrm { S o f t p l u s } \\left( \\mathrm { C O N V } ( h _ { M , i } ) \\right) , } \\end{array}\n$$",
415
+ "text_format": "latex",
416
+ "bbox": [
417
+ 372,
418
+ 449,
419
+ 624,
420
+ 503
421
+ ],
422
+ "page_idx": 3
423
+ },
424
+ {
425
+ "type": "text",
426
+ "text": "where CNN and CONV denote a convolutional neural network and convolutional layer respectively. The top-most latent stochastic layer $z _ { L }$ is computed by: ",
427
+ "bbox": [
428
+ 173,
429
+ 506,
430
+ 821,
431
+ 535
432
+ ],
433
+ "page_idx": 3
434
+ },
435
+ {
436
+ "type": "equation",
437
+ "img_path": "images/0eb8e4be27b2eea1c266ad775c0bcc113e4f0a61211b10eace9c89007587553a.jpg",
438
+ "text": "$$\n\\begin{array} { r l } & { \\quad h _ { M , L } = \\mathrm { F l a t t e n } \\big ( \\mathrm { C N N } \\big ( h _ { < M , L } \\big ) \\big ) } \\\\ & { \\quad \\mu _ { \\phi \\vee \\theta , L } = \\mathrm { L i n e a r } \\big ( \\mathrm { D e n s e } \\big ( h _ { M , L } \\big ) \\big ) } \\\\ & { \\sigma _ { \\phi \\vee \\theta , L } = { \\mathrm { S o f t p l u s } } \\big ( \\mathrm { D e n s e } \\big ( h _ { M , L } \\big ) \\big ) \\ . } \\end{array}\n$$",
439
+ "text_format": "latex",
440
+ "bbox": [
441
+ 364,
442
+ 539,
443
+ 633,
444
+ 594
445
+ ],
446
+ "page_idx": 3
447
+ },
448
+ {
449
+ "type": "text",
450
+ "text": "This new feature map parameterization of the stochastic layers should be viewed as a step towards a better variational model where the test ELBO and the amount of activated stochastic units are direct meaures hereof. ",
451
+ "bbox": [
452
+ 174,
453
+ 597,
454
+ 825,
455
+ 638
456
+ ],
457
+ "page_idx": 3
458
+ },
459
+ {
460
+ "type": "text",
461
+ "text": "2.3 AUTOREGRESSIVE DECODING ",
462
+ "text_level": 1,
463
+ "bbox": [
464
+ 176,
465
+ 655,
466
+ 423,
467
+ 670
468
+ ],
469
+ "page_idx": 3
470
+ },
471
+ {
472
+ "type": "text",
473
+ "text": "From van den Oord et al. (2016b;a); Salimans et al. (2017) we have seen that the PixelCNN architecture is very powerful in modelling a conditional distribution between pixels. In FAME we introduce a PixelCNN in the input dimension of the generative model $p _ { \\boldsymbol { \\theta } } ( \\boldsymbol { x } | \\mathbf { z } )$ (cf. Figure 1). During training we concatenate the input with the reconstruction data in the channel dimension and propagate it through the PixelCNN, similarly to what is done in Gulrajani et al. (2016). When generating samples we fix a sample from the stochastic latent variables and generate the image pixel by pixel autoregressively. ",
474
+ "bbox": [
475
+ 173,
476
+ 681,
477
+ 825,
478
+ 780
479
+ ],
480
+ "page_idx": 3
481
+ },
482
+ {
483
+ "type": "text",
484
+ "text": "3 EXPERIMENTS ",
485
+ "text_level": 1,
486
+ "bbox": [
487
+ 176,
488
+ 799,
489
+ 326,
490
+ 815
491
+ ],
492
+ "page_idx": 3
493
+ },
494
+ {
495
+ "type": "text",
496
+ "text": "We test FAME on images from which we can compare with a wide range of generative models. First we evaluate on gray-scaled image datasets: statically and dynamically binarized MNIST (LeCun et al., 1998) and OMNIGLOT (Lake et al., 2013). The OMNIGLOT dataset is of particular interest due to the large variance amongst samples. Secondly we evaluate our models on natural image datasets: CIFAR10 (Krizhevsky, 2009) and 32x32 ImageNet1 (van den Oord et al., 2016b). When modelling the gray-scaled images we assume a Bernoulli $\\boldsymbol { B }$ distribution using a Sigmoid activation function as the output and for the natural images we assume a Categorical distribution $\\pi$ by applying the 256-way Softmax approach introduced in van den Oord et al. (2016b). We evaluate the grayscaled images with $\\mathcal { L } _ { 5 0 0 0 }$ (cf. Equation 6) and due to runtime and space complexity we evaluate the natural images with $\\mathcal { L } _ { 1 0 0 0 }$ . ",
497
+ "bbox": [
498
+ 174,
499
+ 830,
500
+ 825,
501
+ 901
502
+ ],
503
+ "page_idx": 3
504
+ },
505
+ {
506
+ "type": "image",
507
+ "img_path": "images/c687533d2b3ea0d625b9087d9bbf1144d0b5048a887a7e4a6440da6e27b82529.jpg",
508
+ "image_caption": [
509
+ "Figure 2: 10 randomly picked CIFAR10 images (left) and 200 random samples drawn from a $\\bar { \\mathcal { N } ( 0 , I ) }$ distribution and propagated through the generative model (right). "
510
+ ],
511
+ "image_footnote": [],
512
+ "bbox": [
513
+ 173,
514
+ 99,
515
+ 823,
516
+ 253
517
+ ],
518
+ "page_idx": 4
519
+ },
520
+ {
521
+ "type": "table",
522
+ "img_path": "images/67730ed0f3c5571ada3b59b7131e725ab87410ae5b53140fe17c1be2692c3bd6.jpg",
523
+ "table_caption": [
524
+ "Table 2: Negative log-likelihood performance on dynamically (left) and statically (right) binarized MNIST in nats. For the dynamically binarized MNIST results show the results for the FAME No Concatenation that has no dependency on the input image. The evidence lower-bound is computed with 5000 importance weighted samples $\\mathcal { L } _ { 5 0 0 0 } ( \\bar { \\theta } , \\phi ; x )$ . "
525
+ ],
526
+ "table_footnote": [],
527
+ "table_body": "<table><tr><td></td><td>NLL</td><td></td><td></td></tr><tr><td>IWAE(BURDA ET AL., 2015A)</td><td>82.90</td><td></td><td>NLL</td></tr><tr><td>LVAE(SONDERBY ET AL.,2016)</td><td>81.74</td><td>DRAW (GREGOR ET AL., 2015)</td><td>80.97</td></tr><tr><td>CAGEM(MAALOE ET AL.,2017)</td><td>81.60</td><td>DVAE (ROLFE,2017)</td><td>81.01</td></tr><tr><td>DVAE(ROLFE,2017)</td><td>80.04</td><td>IAF VAE (KINGMA ET AL., 2016)</td><td>79.88</td></tr><tr><td>VGP (TRAN ET AL., 2016)</td><td>79.88</td><td>PIXELRNN(VAN DEN OORD ET AL., 2016B)</td><td>79.20</td></tr><tr><td>IAF VAE KINGMA ET AL. (2016) VLAE CHEN ET AL. (2017)</td><td>79.10</td><td>VLAE (CHEN ET AL.,2017)</td><td>79.03</td></tr><tr><td>FAMENO CONCATENATION</td><td>78.53 78.73</td><td>PIXELVAE (GULRAJANI ET AL., 2016)</td><td>79.02</td></tr><tr><td>FAME</td><td colspan=\"2\">FAME 77.82</td><td>79.30</td></tr></table>",
528
+ "bbox": [
529
+ 173,
530
+ 308,
531
+ 823,
532
+ 439
533
+ ],
534
+ "page_idx": 4
535
+ },
536
+ {
537
+ "type": "text",
538
+ "text": "",
539
+ "bbox": [
540
+ 174,
541
+ 523,
542
+ 825,
543
+ 594
544
+ ],
545
+ "page_idx": 4
546
+ },
547
+ {
548
+ "type": "text",
549
+ "text": "We use a hierarchy of 5 stochastic latent variables. In case of gray-scaled images the stochastic latent layers are dense with sizes 64, 32, 16, 8, 4 (equivalent to Sønderby et al. (2016)) and for the natural images they are spatial (cf. Table 1). There was no significant difference when using feature maps (as compared to dense layers) for modelling gray-scaled images. We apply batchnormalization (Ioffe & Szegedy, 2015) and ReLU activation functions as the non-linearity between all hidden layers $h _ { i , j }$ and use a simple PixelCNN as in van den Oord et al. (2016b) with 4 residual blocks. ",
550
+ "bbox": [
551
+ 173,
552
+ 601,
553
+ 825,
554
+ 698
555
+ ],
556
+ "page_idx": 4
557
+ },
558
+ {
559
+ "type": "text",
560
+ "text": "Because of the concatenation in the autoregressive decoder (cf. Figure 1), generation is a cumbersome process that scales linearly with the amount of pixels in the input image. Therefore we have defined a slightly changed parameterization denoted FAME No Concatenation, where the concatenation with the input is omitted. The generation has no dependency on the input data distribution and can therefore be performed in one forward-pass through the generative model. ",
561
+ "bbox": [
562
+ 174,
563
+ 705,
564
+ 823,
565
+ 775
566
+ ],
567
+ "page_idx": 4
568
+ },
569
+ {
570
+ "type": "text",
571
+ "text": "For optimization we apply the Adam optimizer (Kingma & Ba, 2014) with a constant learning rate of 0.0003. We use 1 importance weighted sample and temperature (Sønderby et al., 2016) scaling from .3 to 1. during the initial 200 epochs for gray-scaled images and .01 to 1. during the first 400 epochs for natural images. All models are trained using the same optimization scheme. ",
572
+ "bbox": [
573
+ 174,
574
+ 782,
575
+ 825,
576
+ 838
577
+ ],
578
+ "page_idx": 4
579
+ },
580
+ {
581
+ "type": "text",
582
+ "text": "3.1 GENERATIVE PERFORMANCE ON GRAY-SCALED IMAGES ",
583
+ "text_level": 1,
584
+ "bbox": [
585
+ 174,
586
+ 856,
587
+ 606,
588
+ 869
589
+ ],
590
+ "page_idx": 4
591
+ },
592
+ {
593
+ "type": "text",
594
+ "text": "The MNIST dataset serves as a good sanity check and has a myriad of previously published generative modelling benchmarks. We experienced much faster convergence rate on FAME compared to training a regular LVAE. On the dynamically binarized MNIST dataset we see a significant improvement (cf. Table 2). However, on the statically binarized MNIST, the parameterization and current optimization strategy was unsuccessful in achieving state-of-the-art results (cf. Table 1). In Figure 4a we see random samples drawn from a $\\mathcal { N } ( 0 , \\bar { I } )$ distribution and propagated through the decoder parameters $\\theta$ . We also trained the FAME No Concatenation which performs nearly on par with the previously state-of-the-art VLAE model (Chen et al., 2017) that in comparison utilizes a skip-connection from the input distribution to the generative decoder: $\\begin{array} { r } { p _ { \\mathrm { l o c a l } } ( x \\bar { \\vert } z ) = \\prod _ { i } p ( x _ { i } \\vert z , x _ { \\mathrm { W i n d o w A r o u n d } ( i ) } ) } \\end{array}$ . This proves that a better parameterization of the VAE improves the performance without the need of tedious autoregressive generation. There was no significant difference in the $K L { \\big ( } q ( \\mathbf { z } | x ) | | p ( \\mathbf { z } ) { \\big ) }$ between FAME and FAME No Concatenation. FAME use 10.85 nats in average to encode images, whereas FAME No Concatenation use 12.29 nats. ",
595
+ "bbox": [
596
+ 176,
597
+ 882,
598
+ 823,
599
+ 924
600
+ ],
601
+ "page_idx": 4
602
+ },
603
+ {
604
+ "type": "table",
605
+ "img_path": "images/a852d050af543f38f9ccf3e111385ffe137febf1114f9905df5b9a58d3130849.jpg",
606
+ "table_caption": [
607
+ "Table 1: The convolutional layer (Conv), filter size (F), depth (K), stride (S), dense layer (Dense) and dimensionality (D) used in defining FAME for gray-scaled and natural images. The architecture is defined such that we ensure dimensionality reduction throughout the hierarchical stochastic layers. The autoregressive decoder is a PixelCNN (van den Oord et al., 2016b) with a mask $A$ convolution $\\mathrm { F } { = } 7 \\mathrm { x } 7$ , ${ \\mathrm { K } } { = } 6 4$ , ${ \\bf S } { = } 1$ followed by 4 residual blocks of convolutions with mask $B$ , $\\mathrm { F } { = } 3 \\mathrm { x } 3 $ , ${ \\mathrm { K } } { = } 6 4$ , ${ \\bf S } { = } 1$ . Finally there are three non-residual layers of convolutions with mask $B$ where the last is the output layer with a Sigmoid activation for gray-scaled images and a 256-way Softmax for natural images. "
608
+ ],
609
+ "table_footnote": [],
610
+ "table_body": "<table><tr><td colspan=\"2\">GRAY-SCALED IMAGES 28X28</td><td>NATURAL IMAGES 32X32</td></tr><tr><td rowspan=\"2\">h:,1</td><td>1x CONVF=5x5,K=32,S=2</td><td>2 XCONVF=3x3,K=96,S=1</td></tr><tr><td>1 X CONVF=3x3,K=64,S=1</td><td>1 XCONVF=3x3,K=96,S=2</td></tr><tr><td rowspan=\"2\">21</td><td>1xDENSED=64</td><td>1xCONVF=3x3,K=8,S=1</td></tr><tr><td>64FEATUREVECTOR</td><td>16X16X8FEATUREMAPS</td></tr><tr><td rowspan=\"2\">h.,2</td><td>1 X CONVF=3x3,K=64,S=2</td><td>2 X CONVF=3x3,K=192,S=1</td></tr><tr><td>1 X CONVF=3x3,K=64,S=1</td><td>1 X CONV F=3x3,K=192,S=2</td></tr><tr><td rowspan=\"2\">22</td><td>1XDENSED=32</td><td>1xCONVF=3x3,K=16,S=1</td></tr><tr><td>32FEATUREVECTOR</td><td>8X8X16FEATUREMAPS</td></tr><tr><td rowspan=\"2\">h:3</td><td>1 XCONVF=3x3,K=64,S=2</td><td>2 X CONVF=3x3,K=192,S=1</td></tr><tr><td>1 X CONVF=3x3,K=64,S=1</td><td>1 X CONV F=3x3,K=192,S=2</td></tr><tr><td rowspan=\"2\">23</td><td>1XDENSE D=16</td><td>1xCONVF=3x3,K=16,S=1</td></tr><tr><td>16FEATUREVECTOR</td><td>4X4X16FEATURE MAPS</td></tr><tr><td rowspan=\"2\">h:4</td><td>1xCONVF=3x3,K=64,S=2</td><td>2 XCONVF=3x3,K=192,S=1</td></tr><tr><td>1 X CONV F=3x3,K=64,S=1</td><td>1 X CONV F=3x3,K=192,S=2</td></tr><tr><td rowspan=\"2\">24</td><td>1XDENSE D=8</td><td>1xCONVF=3x3,K=16,S=1</td></tr><tr><td>8 FEATURE VECTOR</td><td>2 X2X16FEATURE MAPS</td></tr><tr><td rowspan=\"2\">h:5</td><td>1xCONVF=3x3,K=64,S=2</td><td>2 x CoNV F=3x3,K=192,S=1</td></tr><tr><td>1 X CONVF=3x3,K=64,S=1</td><td>1 X CONVF=3x3,K=192,S=2</td></tr><tr><td rowspan=\"2\">25</td><td>1XDENSE D=4</td><td>1XDENSE D=64</td></tr><tr><td>4FEATUREVECTOR</td><td>64FEATUREVECTOR</td></tr></table>",
611
+ "bbox": [
612
+ 264,
613
+ 99,
614
+ 728,
615
+ 373
616
+ ],
617
+ "page_idx": 5
618
+ },
619
+ {
620
+ "type": "text",
621
+ "text": "",
622
+ "bbox": [
623
+ 173,
624
+ 520,
625
+ 825,
626
+ 660
627
+ ],
628
+ "page_idx": 5
629
+ },
630
+ {
631
+ "type": "text",
632
+ "text": "OMNIGLOT consists of 50 alphabets of handwritten characters, where each character has a limited amount of samples. Each character has high variance which makes it harder to fit a good generative model compared to MNIST. Table 3 presents the negative log-likelihood of FAME for OMNIGLOT and demonstrates significant improvement over previously published state-of-the-art. Figure 4b shows generated samples from the learned $\\theta$ parameter space. ",
633
+ "bbox": [
634
+ 174,
635
+ 666,
636
+ 483,
637
+ 819
638
+ ],
639
+ "page_idx": 5
640
+ },
641
+ {
642
+ "type": "text",
643
+ "text": "From Sønderby et al. (2016) we have seen that the LVAE is able to learn a much tighter $\\mathcal { L } _ { 1 }$ ELBO compared to the VAE. For the MNIST experiments, the $\\mathcal { L } _ { 1 }$ ELBO is at 80.11 nats ",
644
+ "bbox": [
645
+ 174,
646
+ 827,
647
+ 483,
648
+ 882
649
+ ],
650
+ "page_idx": 5
651
+ },
652
+ {
653
+ "type": "table",
654
+ "img_path": "images/f6e9eb42511f9cce238ff32e73396cae3e67d7593fb99a0276563824c699c6b8.jpg",
655
+ "table_caption": [
656
+ "NLL ",
657
+ "Figure 3: Negative log-likelihood performance on OMNIGLOT in nats. The evidence lower-bound is computed with 5000 importance weighted samples $\\mathcal { L } _ { 5 0 0 0 } ( \\theta , \\phi ; x )$ . "
658
+ ],
659
+ "table_footnote": [],
660
+ "table_body": "<table><tr><td></td><td>INLL</td></tr><tr><td>IWAE(BURDA ETAL.,2015A) LVAE (SONDERBY ET AL., 2016)</td><td>103.38 102.11</td></tr><tr><td>RBM(BURDA ET AL.,2015B)</td><td>100.46</td></tr><tr><td>DVAE (ROLFE,2017)</td><td>97.43</td></tr><tr><td>DRAW(GREGOR ET AL., 2015)</td><td>96.50</td></tr><tr><td>CONV DRAW (GREGOR ET AL., 2016)</td><td>91.00</td></tr><tr><td>VLAE CHEN ET AL.(2017)</td><td>89.83</td></tr><tr><td>FAME</td><td>82.54</td></tr></table>",
661
+ "bbox": [
662
+ 498,
663
+ 691,
664
+ 820,
665
+ 801
666
+ ],
667
+ "page_idx": 5
668
+ },
669
+ {
670
+ "type": "text",
671
+ "text": "compared to the $\\mathcal { L } _ { 5 0 0 0 } \\ 7 7 . 8 2$ nats. Similarly the OMNIGLOT $\\mathcal { L } _ { 1 }$ ELBO is 86.62 nats compared to 82.54 nats. This shows significant improvements when using importance weighted samples and indicates that the parameterization of the FAME can be done in a way so that the bound is even tighter. We also find that the top-most latent stochastic layer is not collapsing into its prior, since the $\\check { K L } \\big ( q ( z _ { 5 } | x ) | | p ( z _ { 5 } ) \\big )$ is 5.04 nats for MNIST and 3.67 nats for OMNIGLOT. ",
672
+ "bbox": [
673
+ 176,
674
+ 882,
675
+ 825,
676
+ 924
677
+ ],
678
+ "page_idx": 5
679
+ },
680
+ {
681
+ "type": "image",
682
+ "img_path": "images/b338fdae5c47740a67c45a5f778ab34fd0412cbd170a9cb5d7e7028127ae58e9.jpg",
683
+ "image_caption": [
684
+ "Figure 4: Random samples drawn from a $\\mathcal { N } ( 0 , I )$ distribution and propagated through the generative model of FAME for the dynamically binarized MNIST (a) and OMNIGLOT (b) dataset. "
685
+ ],
686
+ "image_footnote": [],
687
+ "bbox": [
688
+ 245,
689
+ 101,
690
+ 748,
691
+ 279
692
+ ],
693
+ "page_idx": 6
694
+ },
695
+ {
696
+ "type": "text",
697
+ "text": "",
698
+ "bbox": [
699
+ 173,
700
+ 342,
701
+ 823,
702
+ 371
703
+ ],
704
+ "page_idx": 6
705
+ },
706
+ {
707
+ "type": "image",
708
+ "img_path": "images/436d967e9861b19cef79af447ec1513a5608bb503e90c3e6c5ea2ab698d460f6.jpg",
709
+ "image_caption": [
710
+ "Figure 5: MNIST reconstructions when masking the output from the FAME stochastic variables (a) and the concatenated input image (b) prior to feeding them to the autoregressive PixelCNN. It is interesting to see how the edge information comes from the autoregressive dependency on the input image. "
711
+ ],
712
+ "image_footnote": [],
713
+ "bbox": [
714
+ 246,
715
+ 386,
716
+ 750,
717
+ 564
718
+ ],
719
+ "page_idx": 6
720
+ },
721
+ {
722
+ "type": "text",
723
+ "text": "In order to analyze the contribution from the autoregressive decoder we experimented on masking the contribution from either the concatenated image or the output of the FAME decoder before feeding it into the PixelCNN layers (cf. Figure 1). In Figure 5a we see the results of reconstructing MNIST images when masking out the contribution from the stochastic variables and in Figure 5b we mask out the contribution from the concatenated input image. ",
724
+ "bbox": [
725
+ 174,
726
+ 647,
727
+ 825,
728
+ 718
729
+ ],
730
+ "page_idx": 6
731
+ },
732
+ {
733
+ "type": "text",
734
+ "text": "3.2 GENERATIVE PERFORMANCE ON NATURAL IMAGES ",
735
+ "text_level": 1,
736
+ "bbox": [
737
+ 174,
738
+ 736,
739
+ 573,
740
+ 751
741
+ ],
742
+ "page_idx": 6
743
+ },
744
+ {
745
+ "type": "text",
746
+ "text": "We investigate the performance of FAME on two natural image datasets: CIFAR10 and ImageNet. Learning a generative model on natural images is more challenging, which is also why there are many tricks that can be done in regards to the autoregressive decoding (van den Oord et al., 2016a; Salimans et al., 2017; Chen et al., 2017). However, since we are interested in the additional expressiveness of a LVAE parameterization with convolutional stochastic latent variables, we have chosen a suboptimal architecture for the autoregressive decoding (cf. Table 1) (van den Oord et al., 2016b). An obvious improvement to the decoder would be to incorporate the PixelCNN $^ { + + }$ (Salimans et al., 2017), but by using the simpler architecture we ensure that the improvements in log-likelihood is not a result of a strong autoregressive model. ",
747
+ "bbox": [
748
+ 174,
749
+ 762,
750
+ 825,
751
+ 888
752
+ ],
753
+ "page_idx": 6
754
+ },
755
+ {
756
+ "type": "text",
757
+ "text": "From Table 3 we see the performance from FAME and FAME No Concatenation on the CIFAR10 dataset. Similarly to the gray-scaled images, FAME outperforms current state-of-the-art results significantly. It is also interesting to see how FAME No Concatenation performs close to the previously published state-of-the-art results. Especially in the image space, this could prove interesting, since the FAME No Concatenation has no additional autoregressive runtime complexity. We only investigated the $3 2 \\mathrm { x } 3 2 $ ImageNet dataset, since the training time is significant and it outperformed the $6 4 \\mathrm { x } 6 4$ models (cf. Table 4), whereas the previously published 64x64 ImageNet models consistently outperform their 32x32 counterpart. In Figure 2 we show samples from FAME on the CIFAR10 dataset. Similarly to previously published results it is difficult to analyze the performance from the samples. However, we can conclude that FAME is able to capture spatial correlations in the images for generating sharp samples. It is also interesting to see how it captures the contours of objects in the images. ",
758
+ "bbox": [
759
+ 174,
760
+ 895,
761
+ 821,
762
+ 924
763
+ ],
764
+ "page_idx": 6
765
+ },
766
+ {
767
+ "type": "table",
768
+ "img_path": "images/96612744ecb4a0e66b4933543d7d8672bbfb25464fc65da3937ad33b3aee9457.jpg",
769
+ "table_caption": [
770
+ "BITS/DIM ",
771
+ "Table 3: Negative log-likelihood performance on CIFAR10 in bits/dim. The evidence lower-bound is computed with 1000 importance weighted samples $\\mathcal { L } _ { 1 0 0 0 } ( \\theta , \\phi ; x )$ . "
772
+ ],
773
+ "table_footnote": [],
774
+ "table_body": "<table><tr><td>UNIFORMDISTRIBUTION(VANDEN OORD ET AL.,2016B) DEEP DIFFUSION (SOHL-DICKSTEIN ET AL.,2015) MULTIVARIATE GAUSSIAN(VAN DEN OORD ET AL.,2016B) NICE(DINH ET AL., 2014) DEEP GMMS(VAN DEN OORD&amp; SCHRAUWEN,2014) CONV DRAW (GREGOR ET AL.,2016) REAL NVP (DINH ET AL., 2016) PIXELCNN(VAN DEN OORD ET AL.,2016B) IAF VAE KINGMA ET AL. (2016) GATED PIXELCNN(VAN DEN OORD ET AL.,2016A) PIXELRNN(VAN DEN OORD ET AL.,2016B) VLAE(CHEN ET AL., 2017) 2.95 PIXELCNN++ (SALIMANS ET AL., 2017) 2.92 FAMENO CONCATENATION 2.98 FAME 2.75</td><td>8.00 5.40 4.70 4.48 4.00 3.58 3.49 3.14 3.11 3.03 3.00</td></tr></table>",
775
+ "bbox": [
776
+ 259,
777
+ 113,
778
+ 733,
779
+ 305
780
+ ],
781
+ "page_idx": 7
782
+ },
783
+ {
784
+ "type": "table",
785
+ "img_path": "images/55e0b3f8084ce3f7cb76e23df189ec0feb8c343b526097b9d35fd160d72597ba.jpg",
786
+ "table_caption": [
787
+ "Table 4: Negative log-likelihood performance on ImageNet in bits/dim. The evidence lower-bound is computed with 1000 importance weighted samples $\\mathcal { \\bar { L } } _ { 1 0 0 0 } ( \\theta , \\phi ; x )$ . "
788
+ ],
789
+ "table_footnote": [],
790
+ "table_body": "<table><tr><td></td><td>BITS/DIM</td></tr><tr><td>CONVDRAW 32X32(GREGOR ET AL.,2016)</td><td>4.40</td></tr><tr><td>CONV DRAW 64X64(GREGOR ET AL., 2016)</td><td>4.10</td></tr><tr><td>REAL NVP 32X32 (DINH ET AL.,2016)</td><td>4.28</td></tr><tr><td>REAL NVP 64X64 (DINH ET AL.,2016)</td><td>4.01</td></tr><tr><td>PIXELVAE 64X64(GULRAJANI ET AL.,2016)</td><td>3.66</td></tr><tr><td>PIXELRNN 32X32(VAN DEN OORD ET AL., 2016B)</td><td>3.86</td></tr><tr><td>PIXELRNN 64X64(VAN DEN OORD ET AL., 2016B)</td><td>3.63</td></tr><tr><td>GATED PIXELCNN 32X32(VAN DEN OORD ET AL., 2016A)</td><td>3.83</td></tr><tr><td>GATED PIXELCNN 64X64(VAN DEN OORD ET AL.,2016A)</td><td>3.57</td></tr><tr><td>FAME32x32</td><td>3.23</td></tr></table>",
791
+ "bbox": [
792
+ 261,
793
+ 354,
794
+ 732,
795
+ 493
796
+ ],
797
+ "page_idx": 7
798
+ },
799
+ {
800
+ "type": "text",
801
+ "text": "",
802
+ "bbox": [
803
+ 173,
804
+ 550,
805
+ 825,
806
+ 690
807
+ ],
808
+ "page_idx": 7
809
+ },
810
+ {
811
+ "type": "text",
812
+ "text": "4 CONCLUSION ",
813
+ "text_level": 1,
814
+ "bbox": [
815
+ 176,
816
+ 710,
817
+ 318,
818
+ 727
819
+ ],
820
+ "page_idx": 7
821
+ },
822
+ {
823
+ "type": "text",
824
+ "text": "We have presented FAME, an extension to the VAE that significantly improve state-of-the-art performance on standard benchmark datasets. By introducing feature map representations in the latent stochastic variables in addition to top-down inference we have shown that the model is able to capture representations of complex image distributions while utilizing a powerful autoregressive architecture as a decoder. ",
825
+ "bbox": [
826
+ 174,
827
+ 742,
828
+ 825,
829
+ 811
830
+ ],
831
+ "page_idx": 7
832
+ },
833
+ {
834
+ "type": "text",
835
+ "text": "In order to analyze the contribution from the VAE as opposed to the autoregressive model, we have presented results without concatenating the input image when reconstructing and generating. This parameterization shows on par results with the previously state-of-the-art results without depending on the time consuming autoregressive generation. ",
836
+ "bbox": [
837
+ 174,
838
+ 819,
839
+ 825,
840
+ 875
841
+ ],
842
+ "page_idx": 7
843
+ },
844
+ {
845
+ "type": "text",
846
+ "text": "Further directions for FAME is to (i) test it on larger image datasets with images of a higher resolution, (ii) expand the model to capture other data modalities such as audio and text, (iii) combine the model in a semi-supervised framework. ",
847
+ "bbox": [
848
+ 176,
849
+ 882,
850
+ 823,
851
+ 922
852
+ ],
853
+ "page_idx": 7
854
+ },
855
+ {
856
+ "type": "text",
857
+ "text": "REFERENCES ",
858
+ "text_level": 1,
859
+ "bbox": [
860
+ 176,
861
+ 102,
862
+ 287,
863
+ 118
864
+ ],
865
+ "page_idx": 8
866
+ },
867
+ {
868
+ "type": "text",
869
+ "text": "Yoshua Bengio, Aaron Courville, and Pascal Vincent. Representation learning: A review and new perspectives. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(8), 2013. ",
870
+ "bbox": [
871
+ 176,
872
+ 126,
873
+ 823,
874
+ 155
875
+ ],
876
+ "page_idx": 8
877
+ },
878
+ {
879
+ "type": "text",
880
+ "text": "S.R. Bowman, L. Vilnis, O. Vinyals, A.M. Dai, R. Jozefowicz, and S. Bengio. Generating sentences from a continuous space. arXiv preprint arXiv:1511.06349, 2015. ",
881
+ "bbox": [
882
+ 171,
883
+ 162,
884
+ 823,
885
+ 194
886
+ ],
887
+ "page_idx": 8
888
+ },
889
+ {
890
+ "type": "text",
891
+ "text": "Yuri Burda, Roger Grosse, and Ruslan Salakhutdinov. Importance Weighted Autoencoders. arXiv preprint arXiv:1509.00519, 2015a. ",
892
+ "bbox": [
893
+ 173,
894
+ 202,
895
+ 825,
896
+ 231
897
+ ],
898
+ "page_idx": 8
899
+ },
900
+ {
901
+ "type": "text",
902
+ "text": "Yuri Burda, Roger Grosse, and Ruslan Salakhutdinov. Accurate and conservative estimates of mrf log-likelihood using reverse annealing. In Proceedings of the International Conference on Artificial Intelligence and Statistics, 2015b. ",
903
+ "bbox": [
904
+ 174,
905
+ 239,
906
+ 823,
907
+ 284
908
+ ],
909
+ "page_idx": 8
910
+ },
911
+ {
912
+ "type": "text",
913
+ "text": "Xi Chen, Diederik P. Kingma, Tim Salimans, Yan Duan, Prafulla Dhariwal, John Schulman, Ilya Sutskever, and Pieter Abbeel. Variational Lossy Autoencoder. In International Conference on Learning Representations, 2017. ",
914
+ "bbox": [
915
+ 176,
916
+ 291,
917
+ 823,
918
+ 335
919
+ ],
920
+ "page_idx": 8
921
+ },
922
+ {
923
+ "type": "text",
924
+ "text": "Laurent Dinh, David Krueger, and Yoshua Bengio. Nice: Non-linear independent components estimation. arXiv preprint arXiv:1410.8516, 2014. ",
925
+ "bbox": [
926
+ 173,
927
+ 343,
928
+ 821,
929
+ 373
930
+ ],
931
+ "page_idx": 8
932
+ },
933
+ {
934
+ "type": "text",
935
+ "text": "Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using real nvp. arXiv preprint arXiv:1605.08803, 2016. ",
936
+ "bbox": [
937
+ 174,
938
+ 382,
939
+ 821,
940
+ 411
941
+ ],
942
+ "page_idx": 8
943
+ },
944
+ {
945
+ "type": "text",
946
+ "text": "Marco Fraccaro, Søren Kaae Sønderby, Ulrich Paquet, and Ole Winther. Sequential neural models with stochastic layers. In Advances in Neural Information Processing Systems. 2016. ",
947
+ "bbox": [
948
+ 173,
949
+ 420,
950
+ 823,
951
+ 450
952
+ ],
953
+ "page_idx": 8
954
+ },
955
+ {
956
+ "type": "text",
957
+ "text": "Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in Neural Information Processing Systems. 2014. ",
958
+ "bbox": [
959
+ 173,
960
+ 458,
961
+ 823,
962
+ 501
963
+ ],
964
+ "page_idx": 8
965
+ },
966
+ {
967
+ "type": "text",
968
+ "text": "Karol Gregor, Ivo Danihelka, Alex Graves, and Daan Wierstra. Draw: A recurrent neural network for image generation. arXiv preprint arXiv:1502.04623, 2015. ",
969
+ "bbox": [
970
+ 173,
971
+ 510,
972
+ 823,
973
+ 540
974
+ ],
975
+ "page_idx": 8
976
+ },
977
+ {
978
+ "type": "text",
979
+ "text": "Karol Gregor, Rezende Danilo Jimenez Besse, Fredric, Ivo Danihelka, and Daan Wierstra. Towards conceptual compression. arXiv preprint arXiv:1604.08772, 2016. ",
980
+ "bbox": [
981
+ 173,
982
+ 547,
983
+ 823,
984
+ 578
985
+ ],
986
+ "page_idx": 8
987
+ },
988
+ {
989
+ "type": "text",
990
+ "text": "Ishaan Gulrajani, Kundan Kumar, Faruk Ahmed, Adrien Ali Taiga, Francesco Visin, David Vazquez, and Aaron Courville. PixelVAE: A latent variable model for natural images. arXiv e-prints, 1611.05013, November 2016. ",
991
+ "bbox": [
992
+ 173,
993
+ 585,
994
+ 825,
995
+ 630
996
+ ],
997
+ "page_idx": 8
998
+ },
999
+ {
1000
+ "type": "text",
1001
+ "text": "Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Proceedings of International Conference on Machine Learning, 2015. ",
1002
+ "bbox": [
1003
+ 174,
1004
+ 638,
1005
+ 823,
1006
+ 681
1007
+ ],
1008
+ "page_idx": 8
1009
+ },
1010
+ {
1011
+ "type": "text",
1012
+ "text": "Diederik Kingma and Jimmy Ba. Adam: A Method for Stochastic Optimization. arXiv preprint arXiv:1412.6980, 12 2014. ",
1013
+ "bbox": [
1014
+ 173,
1015
+ 690,
1016
+ 823,
1017
+ 719
1018
+ ],
1019
+ "page_idx": 8
1020
+ },
1021
+ {
1022
+ "type": "text",
1023
+ "text": "Diederik P. Kingma, Danilo Jimenez Rezende, Shakir Mohamed, and Max Welling. SemiSupervised Learning with Deep Generative Models. In Proceedings of the International Conference on Machine Learning, 2014. ",
1024
+ "bbox": [
1025
+ 174,
1026
+ 728,
1027
+ 823,
1028
+ 772
1029
+ ],
1030
+ "page_idx": 8
1031
+ },
1032
+ {
1033
+ "type": "text",
1034
+ "text": "Diederik P Kingma, Tim Salimans, Rafal Jozefowicz, Xi Chen, Ilya Sutskever, and Max Welling. Improved variational inference with inverse autoregressive flow. In Advances in Neural Information Processing Systems. 2016. ",
1035
+ "bbox": [
1036
+ 174,
1037
+ 780,
1038
+ 823,
1039
+ 824
1040
+ ],
1041
+ "page_idx": 8
1042
+ },
1043
+ {
1044
+ "type": "text",
1045
+ "text": "Max Kingma, Diederik P; Welling. Auto-Encoding Variational Bayes. arXiv preprint arXiv:1312.6114, 12 2013. ",
1046
+ "bbox": [
1047
+ 173,
1048
+ 832,
1049
+ 820,
1050
+ 862
1051
+ ],
1052
+ "page_idx": 8
1053
+ },
1054
+ {
1055
+ "type": "text",
1056
+ "text": "Rahul G Krishnan, Uri Shalit, and David Sontag. Deep Kalman filters. arXiv:1511.05121, 2015. ",
1057
+ "bbox": [
1058
+ 171,
1059
+ 871,
1060
+ 805,
1061
+ 887
1062
+ ],
1063
+ "page_idx": 8
1064
+ },
1065
+ {
1066
+ "type": "text",
1067
+ "text": "Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, University of Toronto, 2009. ",
1068
+ "bbox": [
1069
+ 173,
1070
+ 895,
1071
+ 820,
1072
+ 924
1073
+ ],
1074
+ "page_idx": 8
1075
+ },
1076
+ {
1077
+ "type": "text",
1078
+ "text": "Brenden M Lake, Ruslan R Salakhutdinov, and Josh Tenenbaum. One-shot learning by inverting a compositional causal process. In Advances in Neural Information Processing Systems. 2013. ",
1079
+ "bbox": [
1080
+ 171,
1081
+ 103,
1082
+ 825,
1083
+ 132
1084
+ ],
1085
+ "page_idx": 9
1086
+ },
1087
+ {
1088
+ "type": "text",
1089
+ "text": "Yann LeCun, Lon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pp. 2278–2324, 1998. ",
1090
+ "bbox": [
1091
+ 178,
1092
+ 140,
1093
+ 821,
1094
+ 184
1095
+ ],
1096
+ "page_idx": 9
1097
+ },
1098
+ {
1099
+ "type": "text",
1100
+ "text": "Lars Maaløe, Casper K. Sønderby, Søren K. Sønderby, and Ole Winther. Auxiliary Deep Generative Models. In Proceedings of the International Conference on Machine Learning, 2016. ",
1101
+ "bbox": [
1102
+ 173,
1103
+ 193,
1104
+ 823,
1105
+ 222
1106
+ ],
1107
+ "page_idx": 9
1108
+ },
1109
+ {
1110
+ "type": "text",
1111
+ "text": "Lars Maaløe, Marco Fraccaro, and Ole Winther. Semi-supervised generation with cluster-aware generative models. arXiv preprint arXiv:1704.00637, 2017. ",
1112
+ "bbox": [
1113
+ 171,
1114
+ 229,
1115
+ 823,
1116
+ 260
1117
+ ],
1118
+ "page_idx": 9
1119
+ },
1120
+ {
1121
+ "type": "text",
1122
+ "text": "Antti Rasmus, Mathias Berglund, Mikko Honkala, Harri Valpola, and Tapani Raiko. Semisupervised learning with ladder networks. In Advances in Neural Information Processing Systems, 2015. ",
1123
+ "bbox": [
1124
+ 174,
1125
+ 267,
1126
+ 823,
1127
+ 310
1128
+ ],
1129
+ "page_idx": 9
1130
+ },
1131
+ {
1132
+ "type": "text",
1133
+ "text": "Danilo J. Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic Backpropagation and Approximate Inference in Deep Generative Models. arXiv preprint arXiv:1401.4082, 04 2014. ",
1134
+ "bbox": [
1135
+ 173,
1136
+ 319,
1137
+ 823,
1138
+ 349
1139
+ ],
1140
+ "page_idx": 9
1141
+ },
1142
+ {
1143
+ "type": "text",
1144
+ "text": "Danilo Jimenez Rezende and Shakir Mohamed. Variational Inference with Normalizing Flows. In Proceedings of the International Conference on Machine Learning, 2015. ",
1145
+ "bbox": [
1146
+ 174,
1147
+ 357,
1148
+ 820,
1149
+ 387
1150
+ ],
1151
+ "page_idx": 9
1152
+ },
1153
+ {
1154
+ "type": "text",
1155
+ "text": "Jason Tyler Rolfe. Discrete variational autoencoders. In Proceedings of the International Conference on Learning Representations, 2017. ",
1156
+ "bbox": [
1157
+ 173,
1158
+ 395,
1159
+ 820,
1160
+ 424
1161
+ ],
1162
+ "page_idx": 9
1163
+ },
1164
+ {
1165
+ "type": "text",
1166
+ "text": "Tim Salimans, Andrej Karparthy, Xi Chen, and Diederik P. Kingma. Pixelcnn $^ { + + }$ : Improving the pixelcnn with discretized logistic mixture likelihood and other modifications. arXiv preprint:1701.05517, 2017, 2017. ",
1167
+ "bbox": [
1168
+ 173,
1169
+ 431,
1170
+ 825,
1171
+ 477
1172
+ ],
1173
+ "page_idx": 9
1174
+ },
1175
+ {
1176
+ "type": "text",
1177
+ "text": "Jascha Sohl-Dickstein, Eric A. Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics. arXiv preprint arXiv:1503.03585, 2015. ",
1178
+ "bbox": [
1179
+ 173,
1180
+ 484,
1181
+ 820,
1182
+ 513
1183
+ ],
1184
+ "page_idx": 9
1185
+ },
1186
+ {
1187
+ "type": "text",
1188
+ "text": "Casper Kaae Sønderby, Tapani Raiko, Lars Maaløe, Søren Kaae Sønderby, and Ole Winther. Ladder variational autoencoders. In Advances in Neural Information Processing Systems 29. 2016. ",
1189
+ "bbox": [
1190
+ 174,
1191
+ 522,
1192
+ 825,
1193
+ 551
1194
+ ],
1195
+ "page_idx": 9
1196
+ },
1197
+ {
1198
+ "type": "text",
1199
+ "text": "Dustin Tran, Rajesh Ranganath, and David M Blei. Variational Gaussian process. In Proceedings of the International Conference on Learning Representations, 2016. ",
1200
+ "bbox": [
1201
+ 174,
1202
+ 559,
1203
+ 823,
1204
+ 589
1205
+ ],
1206
+ "page_idx": 9
1207
+ },
1208
+ {
1209
+ "type": "text",
1210
+ "text": "Aaron van den Oord and Benjamin Schrauwen. Factoring variations in natural images with deep gaussian mixture models. In Advances in Neural Information Processing Systems, 2014. ",
1211
+ "bbox": [
1212
+ 173,
1213
+ 597,
1214
+ 825,
1215
+ 627
1216
+ ],
1217
+ "page_idx": 9
1218
+ },
1219
+ {
1220
+ "type": "text",
1221
+ "text": "Aaron van den Oord, Nal Kalchbrenner, Oriol Vinyals, Lasse Espeholt, Alex Graves, and Koray Kavukcuoglu. Conditional image generation with pixelcnn decoders. arXiv preprint arXiv:1606.05328, 2016a. ",
1222
+ "bbox": [
1223
+ 173,
1224
+ 635,
1225
+ 823,
1226
+ 678
1227
+ ],
1228
+ "page_idx": 9
1229
+ },
1230
+ {
1231
+ "type": "text",
1232
+ "text": "Aaron van den Oord, Kalchbrenner Nal, and Koray Kavukcuoglu. Pixel recurrent neural networks. arXiv preprint arXiv:1601.06759, 01 2016b. ",
1233
+ "bbox": [
1234
+ 173,
1235
+ 686,
1236
+ 823,
1237
+ 717
1238
+ ],
1239
+ "page_idx": 9
1240
+ }
1241
+ ]
parse/train/Hy_o3x-0b/Hy_o3x-0b_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Hy_o3x-0b/Hy_o3x-0b_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SklTQCNtvS/SklTQCNtvS_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SklTQCNtvS/SklTQCNtvS_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/XjIm8hOCxTm/XjIm8hOCxTm.md ADDED
@@ -0,0 +1,269 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Few-Shot Object Detection via Association and DIscrimination
2
+
3
+ Yuhang Cao1 Jiaqi Wang1,2B Ying Jin1 Tong Wu1 Kai Chen2,3 Ziwei Liu4 Dahua Lin1,2
4
+
5
+ 1CUHK-SenseTime Joint Lab, The Chinese University of Hong Kong 2Shanghai AI Laboratory 3SenseTime Research 4S-Lab, Nanyang Technological University {cy020,wj017,jy021,wt020,dhlin}@ie.cuhk.edu.hk chenkai@sensetime.com ziwei.liu@ntu.edu.sg
6
+
7
+ # Abstract
8
+
9
+ Object detection has achieved substantial progress in the last decade. However, detecting novel classes with only few samples remains challenging, since deep learning under low data regime usually leads to a degraded feature space. Existing works employ a holistic fine-tuning paradigm to tackle this problem, where the model is first pre-trained on all base classes with abundant samples, and then it is used to carve the novel class feature space. Nonetheless, this paradigm is still imperfect. Durning fine-tuning, a novel class may implicitly leverage the knowledge of multiple base classes to construct its feature space, which induces a scattered feature space, hence violating the inter-class separability. To overcome these obstacles, we propose a two-step fine-tuning framework, Few-shot object detection via Association and DIscrimination (FADI), which builds up a discriminative feature space for each novel class with two integral steps. 1) In the association step, in contrast to implicitly leveraging multiple base classes, we construct a compact novel class feature space via explicitly imitating a specific base class feature space. Specifically, we associate each novel class with a base class according to their semantic similarity. After that, the feature space of a novel class can readily imitate the well-trained feature space of the associated base class. 2) In the discrimination step, to ensure the separability between the novel classes and associated base classes, we disentangle the classification branches for base and novel classes. To further enlarge the inter-class separability between all classes, a set-specialized margin loss is imposed. Extensive experiments on standard Pascal VOC and MS-COCO datasets demonstrate that FADI achieves new state-of-the-art performance, significantly improving the baseline in any shot/split by $+ 1 8 . 7$ . Notably, the advantage of FADI is most announced on extremely few-shot scenarios (e.g. 1- and 3- shot). Code is available at: https://github.com/yhcao6/FADI
10
+
11
+ # 1 Introduction
12
+
13
+ Deep learning has achieved impressive performance on object detection [21, 11, 1] in recent years. However, their strong performance heavily relies on a large amount of labeled training data, which limits the scalability and generalizability of the model in the data scarcity scenarios. In contrast, human visual systems can easily generalize to novel classes with only a few supervisions. Therefore, great interests have been invoked to explore few-shot object detection (FSOD), which aims at training a network from limited annotations of novel classes with the aid of sufficient data of base classes.
14
+
15
+ ![](images/d5b4257d029065b6e839e27a6f807e2dd785f77203b1bf438fc1772abbdeb481.jpg)
16
+ Figure 1: Conceptually visualization of our FADI. (a) The conventional fine-tuning paradigm, e.g., TFA [28], learns good decision boundaries during the pre-training stage to separate the decision space into several subspaces (rectangles) occupied by different base classes. In the fine-tuning stage, a novel class (‘cow’) may exploit multiple similar base classes (‘sheep’ and ‘horse’) to construct the feature space of itself, which induces a scattered intra-class structure (the feature space of ‘cow’ across two base classes, ‘sheep’ and ‘horse’). FADI divides the fine-tuning stage into two steps. (b) In the association step, to construct a compact intra-class structure, we associate each novel class with a well-learned base class based on their semantic similarity (‘cow’ is similar to ‘sheep’, ‘motor’ is similar to ‘bike’). The novel class readily learns to align its intra-class distribution to the associated base class. (c) In the discrimination step, to ensure the inter-class separability between novel classes and associated base classes, we disentangle the classification branches for base and novel classes. A set-specialized margin loss is further imposed to enlarge the inter-class separability between all classes.
17
+
18
+ Various methods have since been proposed to tackle the problem of FSOD, including metalearning [13, 35, 32], metric learning [14], and fine-tuning [28, 31, 23]. Among them, fine-tuningbased methods are one of the dominating paradigms for few-shot object detection. [28] introduces a simple two-stage fine-tuning approach (TFA). MPSR [31] improves upon TFA [28] via alleviating the problem of scale variation. The recent state-of-the-art method FSCE [23] shows the classifier is more error-prone than the regressor, and introduces the contrastive-aware object proposal encodings to facilitate the classification of detected objects. All these works employ a holistic fine-tuning paradigm, where the model is first trained on all base classes with abundant samples, and then the pre-trained model is fine-tuned on novel classes. Although it exhibits a considerable performance advantage compared with the earlier meta-learning methods, this fine-tuning paradigm is still imperfect. To be specific, the current design of the fine-tuning stage directly extracts the feature representation of a novel class from the network pre-trained on base classes. Therefore, a novel class may exploit the knowledge of multiple similar base classes to construct the feature space of itself. As a result, the feature space of a novel class will have an incompact intra-class structure that scatters across feature spaces of other classes, breaking the inter-class separability, hence leading to classification confusion, as shown in Figure 1a.
19
+
20
+ To overcome these obstacles, we propose a two-step fine-tuning framework, Few-shot object detection via Association and DIscrimination (FADI), which constructs a discriminable feature space for each novel class with two integral steps, association and discrimination. Specifically, in the association step, as shown in Figure 1b, to construct a compact intra-class structure, we associate each novel class with a well-trained base class based on their underlying semantic similarity. The novel class readily learns to align its feature space to the associated base class, thus naturally becomes separable from the remaining classes. In the discrimination step, as shown in Figure 1c, to ensure the separability between the novel classes and associated base classes, we disentangle the classification branches for base and novel classes to reduce the ambiguity in the feature space induced by the association step. To further enlarge the inter-class separability between all classes, a set-specialized margin loss is applied. To this end, the fine-tuning stage is divided into two dedicated steps, and together complement each other.
21
+
22
+ Extensive experimental results have validated the effectiveness of our approach. We gain significant performance improvements on the Pascal VOC [7] and COCO [18] benchmarks, especially on the extremely few-shot scenario. Specifically, without bells and whistles, FADI improves the TFA [28] baseline by a significant margin in any split and shot with up to $+ 1 8 . 7 \mathrm { m A P } ,$ , and push the envelope of the state-of-the-art performance by 2.5, 4.3, 2.8 and 5.6, 7.8, 1.6 for shot $K = 1 , 2 , 3$ on novel split-1 and split-3 of Pascal VOC dataset, respectively.
23
+
24
+ # 2 Related Work
25
+
26
+ Few-Shot Classification Few-Shot Classification aims to recognize novel instances with abundant base samples and a few novel samples. Metric-based methods address the few-shot learning by learning to compare, different distance formulations [26, 22, 24] are adopted. Initialization-based methods [9, 15] learn a good weight initialization to promote the adaption to unseen samples more effectively. Hallucination-based methods introduce hallucination techniques [10, 29] to alleviate the shortage of novel data. Recently, researchers find out that the simple pre-training and fine-tuning framework [4, 6] can compare favorably against other complex algorithms.
27
+
28
+ Few-Shot Object Detection As an emerging task, FSOD is less explored than few-shot classification. Early works mainly explore the line of meta-learning [13, 35, 32, 14, 36, 37, 8], where a meta-learner is introduced to acquire class agnostic meta knowledge that can be transferred to novel classes. Later, [28] introduces a simple two-stage fine-tuning approach (TFA), which significantly outperforms the earlier meta-learning methods. Following this framework, MPSR [31] enriches object scales by generating multi-scale positive samples to alleviate the inherent scale bias. Recently, FSCE [23] shows in FSOD, the classifier is more error-prone than the regressor and introduces the contrastive-aware object proposal encodings to facilitate the classification of detected objects. Similarly, FADI also aims to promote the discrimination capacity of the classifier. But unlike previous methods that directly learn the classifier by implicitly exploiting the base knowledge, motivated by the works of [34, 33], FADI explicitly associates each novel class with a semantically similar base class to learn a compact intra-class distribution.
29
+
30
+ Margin Loss Loss function plays an important role in the field of recognition tasks. To enhance the discrimination power of traditional softmax loss, different kinds of margin loss are proposed. SphereFace [19] introduces a multiplicative margin constrain in a hypersphere manifold. However, the non-monotonicity of cosine function makes it difficult for stable optimization, CosFace [27] then proposed to further normalize the feature embedding and impose an additive margin in the cosine space. ArcFace [5] moves the additive cosine margin into the angular space to obtain a better discrimination power and more stable training. However, we find these margin losses are not directly applicable under data-scarce settings as they equally treat different kinds of samples but ignore the inherent bias of the classifier towards base classes. Hence we propose a set-specialized margin loss that takes the kind of samples into consideration which yields significantly better performance.
31
+
32
+ # 3 Our Approach
33
+
34
+ In this section, we first review the preliminaries of few-shot object detection setting and the conventional two-stage fine-tuning framework. Then we introduce our method that tackles few-shot object detection via association and discrimination (FADI).
35
+
36
+ # 3.1 Preliminaries
37
+
38
+ In few-shot detection, the training set is composed of a base set $D ^ { B } = \{ x _ { i } ^ { B } , y _ { i } ^ { B } \}$ with abundant data of classes $C ^ { B }$ , and a novel set $D ^ { N } = \{ x _ { i } ^ { N } , y _ { i } ^ { N } \}$ with few-shot data of classes $C ^ { N }$ , where $x _ { i }$ and $y _ { i }$ indicate training samples and labels, respectively. The number of objects for each class in $C ^ { N }$ is $K$ for $K$ -shot detection. The model is expected to detect objects in the test set with classes in $C ^ { B } \cup C ^ { N }$ .
39
+
40
+ Fine-tuning-based methods are the current one of the leading paradigms for few-shot object detection, which successfully adopt a simple two-stage training pipeline to leverage the knowledge of base classes. TFA [28] is a widely adopted baseline of fine-tuning-based few-shot detectors. In the base training stage, the model is trained on base classes with sufficient data to obtain a robust feature representation. In the novel fine-tuning stage, the pre-trained model on base classes is then fine-tuned on a balanced few-shot set which comprises both base and novel classes $( C _ { B } \cup C _ { N } )$ . Aiming at preventing over-fitting during fine-tuning, only the box predictor, i.e., classifier and regressor, are updated to fit the few-shot set. While the feature extractor, i.e., other structures of the network, are frozen [28] to preserve the pre-trained knowledge on the abundant base classes.
41
+
42
+ Although the current design of fine-tuning stage brings considerable gains on few-shot detection, we observe that it may induce a scattered feature space on novel class, which violates the inter-class separability and leads to confusion of classification. Towards this drawback, we proposes few-shot object detection via association and discrimination (FADI), which divides the fine-tuning stage of TFA into a two-step association and discrimination pipelines. In the association step (Sec. 3.2), to construct a compact intra-class distribution, we associate each novel class with a base class based on their underlying semantic similarity. The feature representation of the associated base class is explicitly learned by the novel class. In the discrimination step (Sec. 3.3), to ensure the inter-class separability, we disentangle the base and novel branches and impose a set-specialized margin loss to train a more discriminative classifier for each class.
43
+
44
+ ![](images/d8d782b260730e2288d414fa3700079df56df3e88309178a49b7c9cae34f29d7.jpg)
45
+ Step1: Association
46
+ Figure 2: Method overview. There are two steps in FADI: association and discrimination. To construct a compact intra-class structure, the association step aligns the feature distribution of each novel class with a well-learned base class based on their semantic similarity. To ensure inter-class separability, the discrimination step disentangles classification branches for base and novel classes and imposes a set-specialized margin loss.
47
+
48
+ # 3.2 Association Step
49
+
50
+ In the base training stage, the base model is trained on the abundant base data $D ^ { B }$ and its classifier learns a good decision boundary (see Figure 1) to separate the whole decision space into several subspaces that are occupied by different base classes. Therefore, if a novel class can align the feature distribution of a base class, it will fall into the intra-class distribution of the associated base class, and be naturally separable from the other base classes. And if two novel classes are assigned to different base classes, they will also become separable from each other.
51
+
52
+ To achieve this goal, we introduce a new concept named association, which pairs each novel class to a similar base class by semantic similarity. After then, the feature distribution of the novel class is aligned with the associated base class via feature distribution alignment.
53
+
54
+ Similarity Measurement In order to ease the difficulty of feature distribution alignment, given a novel class $C _ { i } ^ { N }$ and a set of base classes $C ^ { B }$ , we want to associate $C _ { i } ^ { N }$ to the most similar base class in $C ^ { B }$ . An intuitive way is to rely on visual similarity between feature embeddings. However, the embedding is not representative for novel classes under data-scarce scenarios. Thus, we adopt WordNet [20] as an auxiliary to describe the semantic similarity between classes. WordNet is an English vocabulary graph, where nodes represent lemmas or synsets and they are linked according to their relations. It incorporates rich lexical knowledge which benefits the association. Lin Similarity [16] is used to calculate the class-to-class similarity upon WordNet which is given by:
55
+
56
+ $$
57
+ \sin ( \boldsymbol { C } _ { i } ^ { N } , \boldsymbol { C } _ { j } ^ { B } ) = \frac { 2 \cdot \operatorname { I C } ( \operatorname { L C S } ( \boldsymbol { C } _ { i } ^ { N } , \boldsymbol { C } _ { j } ^ { B } ) ) } { \operatorname { I C } ( \boldsymbol { C } _ { i } ^ { N } ) + \operatorname { I C } ( \boldsymbol { C } _ { j } ^ { B } ) } ,
58
+ $$
59
+
60
+ where LCS denotes the lowest common subsumer of two classes in lexical structure of WordNet. IC, i.e., information content, is the probability to encounter a word in a specific corpus. SemCor Corpus is adopted to count the word frequency here. We take the maximum among all base classes to obtain
61
+
62
+ ![](images/f508b247c584df6cff5186b3cae68a85a793e40e1dd382621924009438be38df.jpg)
63
+ Figure 3: t-SNE here shows the distribution of feature after $F C _ { 2 } / F C _ { 2 } ^ { \prime }$ from 200 randomly selected images on PASCAL VOC, ‘horse’ and ‘dog’ are base classes, ‘cow’ and ‘bird’ are novel classes, respectively. The feature space learned by FADI has a more compact intra-class structure and larger inter-class separability.
64
+
65
+ the associated base class $C _ { j i } ^ { B }$ where $j \to i$ means the base class $C _ { j } ^ { B }$ is assigned to the novel class $C _ { i } ^ { N }$ .
66
+
67
+ $$
68
+ C _ { j \to i } ^ { B } \underset { j \in | C ^ { B } | } { \operatorname { a r g m a x } } \sin ( C _ { i } ^ { N } , C _ { j } ^ { B } ) .
69
+ $$
70
+
71
+ To this end, novel class set $C ^ { N }$ is associated with a subset of base class $C ^ { B \to N } \subset C ^ { B }$ .
72
+
73
+ Feature Distribution Alignment After obtaining the associated base class for each novel class, given a sample $x _ { i } ^ { N }$ of novel class $C _ { i } ^ { N }$ , it is associated with a pseudo label $y _ { j } ^ { B }$ of the assigned base class $C _ { j i } ^ { B }$ . We design a pseudo label training mechanism to directly align the feature distribution of the novel class with the assigned base class, as follows.
74
+
75
+ $$
76
+ \operatorname* { m i n } _ { \mathcal { W } _ { a s s o } ^ { N } } \mathcal { L } _ { c l s } ( y _ { j } ^ { B } , f ( \mathbf { z } _ { i } ^ { N } ; \widetilde { \mathcal { W } } _ { c l s } ^ { B } ) ) , \mathrm { ~ w h e r e ~ } \mathbf { z } _ { i } ^ { N } = g ( \phi ( x _ { i } ^ { N } ; \widetilde { \mathcal { W } } _ { p r e } ^ { B } ) ; \mathcal { W } _ { a s s o } ^ { N } ) ,
77
+ $$
78
+
79
+ where $\widetilde { \mathcal W }$ means the weights are frozen. Thus, $f ( \cdot ; \widetilde { \mathcal { W } } _ { c l s } ^ { B } )$ and $\phi ( \cdot ; \widetilde { \mathcal { W } } _ { p r e } ^ { B } )$ indicate the classifier (one fc layer) and the feature extractor (main network structures) with frozen weights and are pre-trained on base classes, and $g ( \cdot ; \mathcal { W } _ { a s s o } ^ { N } )$ means an intermediate structure (one or more fc layers) to align the feature distribution via updating the weights . By assigning pseudo labels and freezing the classifier, this intermediate structure learns to align the feature distribution of the novel class to the associated base class. The main network structures $\phi ( \cdot ; \widetilde { \mathcal { W } } _ { p r e } ^ { B } )$ is also fixed to keep the pre-trained knowledge from base classes.
80
+
81
+ As shown in Figure 2, we use the same RoI head structure of Faster R-CNN [21], but we remove the regressor to reduce it to a pure classification problem. During training, we freeze all parameters except the second linear layer $F C _ { 2 } ^ { ' }$ , which means $g ( \cdot ; \mathcal { W } _ { a s s o } ^ { N } )$ is a single fc layer. We then construct a balanced training set with $K$ shots per class. It is noted we discard the base classes that are associated with novel classes in this step. And the labels of novel classes are replaced by their assigned pseudo labels. As a result, the supervision will enforce the classifier to identify samples of the novel class $C _ { i } ^ { N }$ as the assigned base class $C _ { j i } ^ { B }$ , which means the feature representation of novel classes before the classifier gradually shifts toward their assigned base classes. As shown in Figure 3b, the t-SNE [25] visualization confirms the effectiveness of our distribution alignment. After the association step, the feature distribution of two associated pairs ("bird" and "dog"; "cow" and "horse") are well aligned.
82
+
83
+ # 3.3 Discrimination Step
84
+
85
+ As shown in Figure 3b, after the association step, the feature distribution of each novel class is aligned with the associated base class. Therefore, this novel class will have a compact intra-class distribution and be naturally distinguishable from other classes. However, the association step inevitably leads to confusion between the novel class and its assigned base class. To tackle this problem, we introduce a discrimination step that disentangles the classification branches for base and novel classes. A set-specialized margin loss is further applied to enlarge the inter-class separability.
86
+
87
+ Disentangling Given a training sample $x _ { i }$ with label $y _ { i }$ , we disentangle the classification branches for base and novel classes as follows,
88
+
89
+ $$
90
+ \begin{array} { c } { \displaystyle \operatorname* { m i n } _ { \mathcal { W } _ { c l s } ^ { B } , \mathcal { W } _ { c l s } ^ { N } } \mathcal { L } _ { c l s } ( y _ { i } , [ { \mathbf { p } } ^ { B } , { \mathbf { p } } ^ { N } ] ) , \mathrm { ~ w h e r e ~ } } \\ { \displaystyle { \mathbf { p } ^ { B } = f ( g ( \mathbf { q } ; \widetilde { \mathcal { W } } _ { o r i g i n } ^ { B } ) ; \mathcal { W } _ { c l s } ^ { B } ) , \mathbf { p } ^ { N } = f ( g ( \mathbf { q } ; \widetilde { \mathcal { W } } _ { a s s o } ^ { N } ) ; \mathcal { W } _ { c l s } ^ { N } ) , \mathbf { q } = \phi ( x _ { i } ; \widetilde { \mathcal { W } } _ { p r e } ^ { B } ) , } } \end{array}
91
+ $$
92
+
93
+ where $f ( \cdot ; \mathcal { W } _ { c l s } ^ { B } ) , f ( \cdot ; \mathcal { W } _ { c l s } ^ { N } )$ are the classifiers for base and novel classes, respectively. $g ( \cdot , \widetilde { \mathcal { W } } _ { o r i g i n } ^ { B } )$ $g ( \cdot , \widetilde { \mathcal { W } } _ { a s s o } ^ { N } )$ are the last fc layer with frozen weights for base and novel classes, respectively. As shown in Figunovel classes. we d and ngle the classifiers and thload the original weights layers that ar $F C _ { 2 }$ and train $F C _ { 2 } ^ { ' }$ ) for base andh base classes $F C _ { 2 }$ $F C _ { 2 } ^ { ' }$ $\widetilde { \mathcal { W } } _ { o r i g i n } ^ { B }$ and the weights $\widetilde { \mathcal W } _ { a s s o } ^ { N }$ after association step, respectively. They are frozen in the discrimination step to keep their specific knowledge for base and novel classes. Therefore, $F C _ { 2 }$ and $F C _ { 2 } ^ { ' }$ are suitable to deal with base classes and novel classes, respectively. We attach the base classifier $f ( \cdot ; \mathcal { W } _ { c l s } ^ { B } )$ to $F C _ { 2 }$ , and the novel classifier $f ( \cdot ; \mathcal { W } _ { c l s } ^ { N } )$ to $F C { _ 2 } ^ { \prime }$ . The base classifier is a $| C _ { B } |$ -way classifier. The novel classifier is a $( | C _ { N } | + 1 )$ -way classifier since we empirically let the novel classifier be also responsible for recognizing background class $C _ { 0 }$ . The prediction $\mathbf { p } ^ { B }$ and $\mathbf { p } ^ { N }$ from these two branches will be concatenated to yield the final $( | C _ { B } | + | C _ { N } | + 1 )$ -way prediction $[ \mathbf { p } ^ { B } , \mathbf { p } ^ { N } ]$ .
94
+
95
+ Set-Specialized Margin Loss Besides disentangling, we further propose a set-specialized margin loss to alleviate the confusion between different classes. Different from previous margin losses [19, 27, 5] that directly modify the original CE loss, we introduce a margin loss as an auxiliary loss for the classifier. Given an $i$ -th training sample of label $y _ { i }$ , we adopt cosine similarity to formulate the logits prediction, which follows the typical conventions in few-shot classification and face recognition [27].
96
+
97
+ $$
98
+ p _ { y _ { i } } = \frac { \tau \cdot \mathbf { x } ^ { T } \mathcal { W } _ { y _ { i } } } { | | \mathbf { x } | | \cdot | | \mathcal { W } _ { y _ { i } } | | } , s _ { y _ { i } } = \frac { e ^ { p _ { y _ { i } } } } { \sum _ { j = 1 } ^ { C } e ^ { p _ { j } } } ,
99
+ $$
100
+
101
+ where $\mathcal { W }$ is the weight of the classifier, $\mathbf { x }$ is the input feature and $\tau$ is the temperature factor. We try to maximize the margin of decision boundary between $C _ { y _ { i } }$ and any other class $C _ { j , j \neq y _ { i } }$ , as follows,
102
+
103
+ $$
104
+ \mathcal { L } _ { m _ { i } } = \sum _ { j = 1 , j \neq y _ { i } } ^ { C } - \log ( ( s _ { y _ { i } } - s _ { j } ) ^ { + } + \epsilon ) ,
105
+ $$
106
+
107
+ where $s _ { y _ { i } }$ and $s _ { j }$ are classification scores on class $C _ { y _ { i } }$ and $C _ { j , j \neq y _ { i } }$ , and $\epsilon$ is a small number $( 1 e ^ { - 7 } )$ to keep numerical stability.
108
+
109
+ In the scenario of few-shot learning, there exists an inherent bias that the classifier tends to predict higher scores on base classes, which makes the optimization of margin loss on novel classes becomes more difficult. And the number of background (negative) samples dominates the training samples, thus we may suppress the margin loss on background class $C _ { 0 }$ .
110
+
111
+ Towards the aforementioned problem, it is necessary to introduce the set-specialized handling of different set of classes into the margin loss. Thanks to adopting margin loss as an auxiliary benefit, our design can easily enable set-specialized handling of different sets of classes by simply re-weighting the margin loss value:
112
+
113
+ $$
114
+ { \mathcal { L } } _ { m } = \sum _ { \{ i | y _ { i } \in C ^ { B } \} } \alpha \cdot { \mathcal { L } } _ { m _ { i } } + \sum _ { \{ i | y _ { i } \in C ^ { N } \} } \beta \cdot { \mathcal { L } } _ { m _ { i } } + \sum _ { \{ i | y _ { i } = C ^ { 0 } \} } \gamma \cdot { \mathcal { L } } _ { m _ { i } } ,
115
+ $$
116
+
117
+ where $\alpha , \beta , \gamma$ are hyper-parameters controlling the margin of base samples, novel samples and negative samples, respectively. Intuitively, $\beta$ is larger than $\alpha$ because novel classes are more challenging, and $\gamma$ is a much smaller value to balance the overwhelming negative samples. Finally, the loss function of the discrimination step is shown as in Eq. 8
118
+
119
+ $$
120
+ \mathcal { L } _ { f t } = \mathcal { L } _ { c l s } + \mathcal { L } _ { m } + 2 \cdot \mathcal { L } _ { r e g } ,
121
+ $$
122
+
123
+ where $\mathcal { L } _ { c l s }$ is a cross-entropy loss for classification, $\mathcal { L } _ { \boldsymbol { r } \boldsymbol { e } \boldsymbol { g } }$ is a smooth-L1 loss for regression, and ${ \mathcal { L } } _ { m }$ is the proposed set-specialized margin loss. Since our margin loss increases the gradients on the classification branch, we scale $\mathcal { L } _ { \boldsymbol { r } \boldsymbol { e } \boldsymbol { g } }$ by a factor of 2 to keep the balance of the two tasks. The overall loss takes the form of multi-task learning to jointly optimize the model.
124
+
125
+ Table 1: Performance (novel AP50) on PASCAL VOC dataset. $^ \dagger$ denotes meta-learning-based methods.
126
+
127
+ <table><tr><td rowspan="2">Method /Shot</td><td rowspan="2">Backbone</td><td colspan="5">Novel Split 1</td><td colspan="5">Novel Split 2</td><td colspan="5">Novel Split 3</td></tr><tr><td></td><td>2</td><td>3</td><td>5</td><td>10</td><td>1</td><td>2</td><td>3</td><td>5</td><td>10</td><td>1</td><td>2</td><td>3</td><td>5</td><td>10</td></tr><tr><td>LSTD [2]</td><td>VGG-16</td><td>8.2</td><td>1.0</td><td>12.4</td><td>29.1</td><td>38.5</td><td>11.4</td><td>3.8</td><td>5.0</td><td>15.7</td><td>31.0</td><td>12.6</td><td>8.5</td><td>15.0</td><td>27.3</td><td>36.3</td></tr><tr><td>YOLOv2-ft [30]</td><td>YOLO V2</td><td>6.6</td><td>10.7</td><td>12.5</td><td>24.8</td><td>38.6</td><td>12.5</td><td>4.2</td><td>11.6</td><td>16.1</td><td>33.9</td><td>13.0</td><td>15.9</td><td>15.0</td><td>32.2</td><td>38.4</td></tr><tr><td>fFSRW[13] tMetaDet [30]</td><td></td><td>14.8 17.1</td><td>15.5 19.1</td><td>26.7 28.9</td><td>33.9 35.0</td><td>47.2 48.8</td><td>15.7 18.2</td><td>15.3 20.6</td><td>22.7 25.9</td><td>30.1 30.6</td><td>40.5 41.5</td><td>21.3 20.1</td><td>25.6 22.3</td><td>28.4 27.9</td><td>42.8 41.9</td><td>45.9 42.9</td></tr><tr><td>tRepMet [14]</td><td>InceptionV3</td><td>26.1</td><td>32.9</td><td>34.4</td><td>38.6</td><td>41.3</td><td></td><td>22.1</td><td>23.4</td><td></td><td></td><td></td><td></td><td>31.5</td><td>34.4</td><td>37.2</td></tr><tr><td>FRCN-ft[30]</td><td></td><td>13.8</td><td>19.6</td><td></td><td></td><td></td><td>17.2</td><td></td><td></td><td>28.3</td><td>35.8</td><td>27.5</td><td>31.1</td><td></td><td></td><td>45.1</td></tr><tr><td>FRCN+FPN-ft [28]</td><td>FRCN-R101</td><td>8.2</td><td>20.3</td><td>32.8 29.0</td><td>41.5 40.1</td><td>45.6 45.5</td><td>7.9 13.4</td><td>15.3 20.6</td><td>26.2 28.6</td><td>31.6 32.4</td><td>39.1 38.8</td><td>9.8 19.6</td><td>11.3 20.8</td><td>19.1 28.7</td><td>35.0 42.2</td><td>42.1</td></tr><tr><td>+MetaDet [30]</td><td></td><td>18.9</td><td>20.6</td><td>30.2</td><td>36.8</td><td>49.6</td><td>21.8</td><td>23.1</td><td>27.8</td><td>31.7</td><td>43.0</td><td>20.6</td><td>23.9</td><td>29.4</td><td>43.9</td><td>44.1</td></tr><tr><td>tMeta R-CNN [35]</td><td></td><td>19.9</td><td>25.5</td><td>35.0</td><td>45.7</td><td>51.5</td><td>10.4</td><td>19.4</td><td>29.6</td><td>34.8</td><td>45.4</td><td>14.3</td><td>18.2</td><td>27.5</td><td>41.2</td><td>48.1</td></tr><tr><td>TFA w/fc [28]</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>TFA w/ cos [28]</td><td></td><td>36.8</td><td>29.1</td><td>43.6</td><td>55.7</td><td>57.0</td><td>18.2</td><td>29.0</td><td>33.4</td><td>35.5</td><td>39.0</td><td>27.7</td><td>33.6</td><td>42.5</td><td>48.7</td><td>50.2</td></tr><tr><td></td><td></td><td>39.8</td><td>36.1</td><td>44.7</td><td>55.7</td><td>56.0</td><td>23.5</td><td>26.9</td><td>34.1</td><td>35.1</td><td>39.1</td><td>30.8</td><td>34.8</td><td>42.8</td><td>49.5</td><td>49.8</td></tr><tr><td>MPSR [31]</td><td>FRCN-R101</td><td>41.7</td><td>-</td><td>51.4</td><td>55.2</td><td>61.8</td><td>24.4</td><td>-</td><td>39.2</td><td>39.9</td><td>47.8</td><td>35.6</td><td>-</td><td>42.3</td><td>48.0</td><td>49.7</td></tr><tr><td>SRR-FSD [38]</td><td></td><td>47.8</td><td>50.5</td><td>51.3</td><td>55.2</td><td>56.8</td><td>32.5</td><td>35.3</td><td>39.1</td><td>40.8</td><td>43.8</td><td>40.1</td><td>41.5</td><td>44.3</td><td>46.9</td><td>46.4</td></tr><tr><td>FSCE[23]</td><td></td><td>44.2</td><td>43.8</td><td>51.4</td><td>61.9</td><td>63.4</td><td>27.3</td><td>29.5</td><td>43.5</td><td>44.2</td><td>50.2</td><td>37.2</td><td>41.9</td><td>47.5</td><td>54.6</td><td>58.5</td></tr><tr><td>FADI(Ours)</td><td></td><td>50.3</td><td>54.8</td><td>54.2</td><td>59.3</td><td>63.2</td><td>30.6</td><td>35.0</td><td>40.3</td><td>42.8</td><td>48.0</td><td>45.7</td><td>49.7</td><td>49.1</td><td>55.0</td><td>59.6</td></tr></table>
128
+
129
+ <table><tr><td rowspan="2">shot</td><td colspan="2">nAP</td><td colspan="2">nAP50</td><td colspan="2">nAP75</td></tr><tr><td>TFA</td><td>FADI</td><td>TFA</td><td>FADI</td><td>TFA</td><td>FADI</td></tr><tr><td>1</td><td>3.4</td><td>5.7</td><td>5.8</td><td>10.4</td><td>3.8</td><td>6.0</td></tr><tr><td>2</td><td>4.6</td><td>7.0</td><td>8.3</td><td>13.1</td><td>4.8</td><td>7.0</td></tr><tr><td>3</td><td>6.6</td><td>8.6</td><td>12.1</td><td>15.8</td><td>6.5</td><td>8.3</td></tr><tr><td>5</td><td>8.3</td><td>10.1</td><td>15.3</td><td>18.6</td><td>8.0</td><td>9.7</td></tr><tr><td>10</td><td>10.0</td><td>12.2</td><td>19.1</td><td>22.7</td><td>9.3</td><td>11.9</td></tr><tr><td>30</td><td>13.7</td><td>16.1</td><td>24.9</td><td>29.1</td><td>13.4</td><td>15.8</td></tr></table>
130
+
131
+ (a) Comparison with baseline TFA
132
+
133
+ <table><tr><td rowspan="2">Method</td><td colspan="2">nAP</td><td rowspan="2">nAP75 30</td></tr><tr><td>10</td><td>30 10</td></tr><tr><td>+FSRW [13]</td><td>5.6</td><td>9.1</td><td>4.6 7.6</td></tr><tr><td>+ MetaDet [30]</td><td>7.1</td><td>11.3</td><td>5.9 10.3</td></tr><tr><td>†Meta R-CNN [35]</td><td>8.7</td><td>12.4</td><td>6.6 10.8</td></tr><tr><td>MPSR [31]</td><td>9.8</td><td>14.1</td><td>9.7 14.2</td></tr><tr><td>SRR-FSD [38]</td><td>11.3</td><td>14.7</td><td>9.8 13.5</td></tr><tr><td>FSCE[23]</td><td>11.9</td><td>16.4</td><td>10.5 16.2</td></tr><tr><td>Ours (FADI)</td><td>12.2</td><td>16.1</td><td>11.9 15.8</td></tr></table>
134
+
135
+ (b) Comparison with latest methods.
136
+ Table 2: Performance on MS COCO dataset. $^ \dagger$ denotes meta-learning-based methods. nAP means novel AP.
137
+
138
+ # 4 Experiments
139
+
140
+ # 4.1 Datasets and Evaluation Protocols
141
+
142
+ We conduct experiments on both PASCAL VOC $( 0 7 + 1 2 )$ [7] and MS COCO [18] datasets. To ensure fair comparison, we strictly follow the data split construction and evaluation protocol used in [13, 28, 23]. PASCAL VOC contains 20 categories, and we consider the same 3 base/novel splits with TFA [28] and refer them as Novel Split 1, 2, 3. Each split contains 15 base categories with abundant data and 5 novel categories with $K$ annotated instances for $K = 1 , 2 , 3 , 5 , 1 0$ . We report AP50 of novel categories (nAP50) on VOC07 test set. For MS COCO, 20 classes that overlap with PASCAL VOC are selected as novel classes, and the remaining 60 classes are set as base ones. Similarly, we evaluate our method on shot 1, 2, 3, 5, 10, 30 and the standard COCO-style ap metric is adopted.
143
+
144
+ # 4.2 Implementation Details
145
+
146
+ We implement our methods based on MMDetection [3]. Faster-RCNN [21] with Feature Pyramid Network [17] and ResNet-101 [12] are adopted as base model. Detailed settings are described in the supplementary material.
147
+
148
+ # 4.3 Benchmarking Results
149
+
150
+ Comparison with Baseline Methods To show the effectiveness of our method, we first make a detailed comparison with TFA since our method is based on it. As shown in Table 1, FADI outperforms TFA by a large margin in any shot and split on PASCAL VOC benchmark. To be specific, FADI improves TFA by 10.5, 18.7, 9.5, 3.6, 7.2 and 7.1, 8.1, 6.2, 7.7, 8.9 and 14.9, 14.9, 6.3, 5.5, 9.8 for $K { = } 1$ , 2, 3, 5, 10 on Novel split1, split2 and split3. The lower the shot, the more difficult to learn a discriminative novel classifier. The significant performance gap reflects our FADI can effectively alleviate such problem even under low shot, i.e., $K < = 3$ . Similar improvements can be observed on the challenging COCO benchmark. As shown in Table 2, we boost TFA by 2.3, 2.4, 2.0, 1.8, 2.2, 2.4 for $K { = } 1$ , 2, 3, 5, 10, 30. Besides, we also report nAP50 and nAP75, a larger gap can be obtained under IoU threshold 0.5 which suggests FADI benefits more under lower IoU thresholds.
151
+
152
+ Table 3: Effectiveness of different components of FADI.
153
+
154
+ <table><tr><td>Association</td><td>Disentangling</td><td>Margin</td><td colspan="3">nAP50</td></tr><tr><td></td><td></td><td></td><td>1</td><td>3</td><td>5</td></tr><tr><td></td><td></td><td></td><td>41.3</td><td>46.3</td><td>53.7</td></tr><tr><td></td><td></td><td></td><td>42.4</td><td>46.8</td><td>55.2</td></tr><tr><td></td><td></td><td></td><td>42.2 44.9</td><td>47.3</td><td>54.1</td></tr><tr><td></td><td></td><td></td><td>46.3</td><td>50.3 48.8</td><td>56.8 56.4</td></tr><tr><td>x&lt;x&lt;xv</td><td>xx&lt;&lt;x&gt;</td><td>xxxxν&gt;</td><td>50.3</td><td>54.2</td><td>59.3</td></tr></table>
155
+
156
+ <table><tr><td>Margin</td><td>nAP50</td></tr><tr><td>TFA</td><td>41.3</td></tr><tr><td>CosFace [27]</td><td>38.9</td></tr><tr><td>ArcFace [5]</td><td>37.9</td></tr><tr><td>CosFace (novel)</td><td>44.2</td></tr><tr><td>ArcFace (novel)</td><td>44.3</td></tr><tr><td>Ours</td><td>46.3</td></tr></table>
157
+
158
+ Table 4: Comparison of different margin loss on the TFA baseline model.
159
+
160
+ <table><tr><td>base /novel</td><td>bird</td><td>bus</td><td>cow</td><td>motorbike</td><td>sofa</td><td>nAP50</td></tr><tr><td>random</td><td>person</td><td>boat</td><td>horse</td><td>aeroplane</td><td>sheep</td><td>39.6</td></tr><tr><td>human</td><td>aeroplane</td><td>train</td><td>sheep</td><td>bicycle</td><td>chair</td><td>44.1</td></tr><tr><td>visual</td><td>dog</td><td>car</td><td>horse</td><td>person</td><td>chair</td><td>43.3</td></tr><tr><td>top2</td><td>dog</td><td>car</td><td>sheep</td><td>tv</td><td>diningtable</td><td>41.2</td></tr><tr><td>top1</td><td>horse</td><td>train</td><td>horse</td><td>bicycle</td><td>chair</td><td>44.3</td></tr><tr><td>top1 w/o dup</td><td>dog</td><td>train</td><td>horse</td><td>bicycle</td><td>chair</td><td>44.9</td></tr></table>
161
+
162
+ Table 5: Comparison of different assign policies. Set-specialized margin loss is not adopted in this table.
163
+
164
+ Comparison with State-of-the-Art Methods Next, we compare with other latest few-shot methods. As shown in Table 1, our method pushes the envelope of current SOTA by a large margin in shot 1, 2, 3 for novel split 1 and 3. Specifically, we outperform current SOTA by 2.5, 4.3, 2.8 and 5.6, 7.8, 1.6 for $K = 1 , 2 , 3$ on novel split1 and 3, respectively. As the shot grows, the performance of FADI is slightly behind FSCE [23], we conjecture by unfreezing more layers in the feature extractor, the model can learn a more compact feature space for novel classes as it exploits less base knowledge, and it can better represent the real distribution than the distribution imitated by our association. However, it is not available when the shot is low as the learned distribution will over-fit training samples.
165
+
166
+ # 4.4 Ablation Study
167
+
168
+ In this section, we conduct a thorough ablation study of each component of our method. We first analyze the performance contribution of each component, and then we show the effect of each component and why they work. Unless otherwise specified, all ablation results are reported on Novel Split 1 of Pascal VOC benchmark based on our implementation of TFA [28].
169
+
170
+ Component Analysis Table 3 shows the effectiveness of each component, i.e., Association, Disentangling, and Set-Specialized Margin Loss in our method. It is noted that when we study association without disentangling, we train a modified TFA model by replacing the $F C _ { 2 }$ with $\bar { F C _ { 2 } } ^ { \prime }$ after the association step. Since the association confuses the novel and its assigned base class, the performance of only applying association is not very significant. However, when equipped with disentangling, it can significantly boost the nAP50 by 3.6, 4.0, 3.1 for $K { = } 1$ , 3, 5, respectively. The set-specialized margin loss shows it is generally effective for both the baseline and the proposed ‘association $^ +$ disentangling’ framework. Applying margin loss improves ‘association $^ +$ disentangling’ by 5.4, 3,9, 2.5. With all 3 components, our method totally achieves a gain of 9.0, 7.9, 5.6.
171
+
172
+ Semantic-Guided Association The assigning policy is a key component in the association step. To demonstrate the effectiveness of our semantic-guided assigning with WordNet [20], we explore different assign policies. The results are shown in Table 5. Random means we randomly assign a base class to a novel class. Human denotes manually assigning based on human knowledge. Visual denotes associating base and novel classes by visual similarity. Specifically, we regard the weights of the base classifier as prototype representations of base classes. As a result, the score prediction of novel instances on base classifier can be viewed as the visual similarity. Top1 and top2 mean the strategies that we assign each novel class to the most or second similar base classes by Eq. 1. In such cases, one base class may be assigned to two different novel classes ("horse" is assigned to "bird" and "cow"), we remove such duplication by taking the similarity as the priority of assigning. Specifically, the base and novel classes with the highest similarity will be associated, and they will be removed from the list of classes to be associated. Then we rank the similarity of the remaining classes and choose the new association. We can learn that top1 is better than random and top2 by 4.7 and 3.1, which suggests semantic similarity has a strong implication with performance. By removing the duplication, we further obtain a 0.6 gain.
173
+
174
+ ![](images/6935a5f1df078ac11d06c8d0fd5d7a255b940747b93f1d357f8dc4b0fc45a7e4.jpg)
175
+ Figure 4: Score confusion matrices of different methods on Pascal VOC novel split1. The element in $_ { i }$ -th row, $j$ -th column represents for samples of novel class $i$ , the score prediction on class $j$ . Brighter colors indicate higher scores. If class $_ { i }$ and $j$ are the same, this indicates a more accurate score prediction. Otherwise, it indicates a heavier confusion. The font color of classes represents the association relations, e.g., the associated pairs ‘bird’ and ‘dog’ have the same font color blue.
176
+
177
+ Table 6: Comparison of visual and semantic similarity.
178
+
179
+ <table><tr><td>Metric</td><td colspan="3">Novel Split1</td><td colspan="3">Novel Split2</td><td colspan="3">Novel Split3</td></tr><tr><td></td><td>1</td><td>3</td><td>5</td><td>1</td><td>3</td><td>5</td><td>1</td><td>3</td><td>5</td></tr><tr><td>Visual Semantic</td><td>43.3 44.9</td><td>49.3 50.3</td><td>56.4 56.8</td><td>22.5 26.1</td><td>37.2 38.5</td><td>39.3 40.1</td><td>31.8 37.1</td><td>43.1 45.0</td><td>50.7 51.5</td></tr></table>
180
+
181
+ ![](images/0c4a3a9bca601c8aa28deeefc6a5f2902047cc4f4cd9949c8f8e19616309d725.jpg)
182
+ Figure 5: Examples of co-occurance
183
+
184
+ Set-Specialized Margin Loss Table 4 compares our margin loss with Arcface [5] and CosFace [27]. It can be shown that directly applying these two margin losses will harm the performance. But the degeneration of performance can be reserved by only applying to samples of novel classes. This rescues Arcface from 37.9 to 44.3, Cosface from 38.9 to 44.2. Nevertheless, they are still inferior to our margin loss by 2.0. Detailed hyper-parameter study is described in the supplementary materials.
185
+
186
+ Complementarity between Association and Discrimination Figure 4 shows the score confusion matrices of different methods. We can see that there exists an inherent confusion between some novel and base classes, e.g. in the left top figure, "cow" is confused most with "sheep" and then "horse". However, our association biases such confusion and enforces "cow" to be confused with its more semantic similar class "horse", which demonstrates the association step can align the feature distribution of the associated pairs. On the other hand, thanks to the discrimination step, the confusion incurred by association is effectively alleviated and overall it shows less confusion than TFA (the second column of Figure 4). Moreover, our FADI yields significantly higher score predictions than TFA, which confirms the effectiveness of disentangling and set-specialized margin loss.
187
+
188
+ Superiority of Semantic Similarity over Visual Similarity Table 5 demonstrates semantic similarity works better than visual similarity. Here the weights of the base classifier as prototype representations of base classes. Thus, we take the score prediction of novel instances on base classifier as the visual similarity. However, we find it sometimes can be misleading, especially when a novel instance co-occurrent with a base instance, e.g., ‘cat’ sits on a ‘chair’, ‘person’ rides a ‘bike’ as shown in Figure 5. Such co-occurrence deceives the base classifier that ‘cat’ is similar to ‘chair’ and ‘bike’ is similar to ‘person’, which makes the visual similarity not reliable under data scarcity scenarios. As shown in Table 6, when the shot grows, the performance gap between semantic and visual can be reduced by a more accurate visual similarity measurement.
189
+
190
+ # 5 Conclusion
191
+
192
+ In this paper, we propose Few-shot object detection via Association and DIscrimination (FADI). In the association step, to learn a compact intra-class structure, we selectively associate each novel class with a well-trained base class based on their semantic similarity. The novel class readily learns to align its intra-class distribution to the associated base class. In the discrimination step, to ensure the inter-class separability, we disentangle the classification branches for base and novel classes, respectively. A set-specialized margin loss is further imposed to enlarge the inter-class distance. Experiments results demonstrate that FADI is a concise yet effective solution for FSOD.
193
+
194
+ Acknowledgements. This research was conducted in collaboration with SenseTime. This work is supported by GRF 14203518, ITS/431/18FX, CUHK Agreement TS1712093, Theme-based Research Scheme 2020/21 (No. T41-603/20- R), NTU NAP, RIE2020 Industry Alignment Fund – Industry Collaboration Projects (IAF-ICP) Funding Initiative, and Shanghai Committee of Science and Technology, China (Grant No. 20DZ1100800).
195
+
196
+ # References
197
+
198
+ [1] Zhaowei Cai and Nuno Vasconcelos. Cascade r-cnn: Delving into high quality object detection. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. 1
199
+ [2] Hao Chen, Yali Wang, Guoyou Wang, and Yu Qiao. Lstd: A low-shot transfer detector for object detection. In AAAI Conference on Artificial Intelligence, 2018. 7
200
+ [3] Kai Chen, Jiaqi Wang, Jiangmiao Pang, Yuhang Cao, Yu Xiong, Xiaoxiao Li, Shuyang Sun, Wansen Feng, Ziwei Liu, Jiarui Xu, Zheng Zhang, Dazhi Cheng, Chenchen Zhu, Tianheng Cheng, Qijie Zhao, Buyu Li, Xin Lu, Rui Zhu, Yue Wu, Jifeng Dai, Jingdong Wang, Jianping Shi, Wanli Ouyang, Chen Change Loy, and Dahua Lin. MMDetection: Open mmlab detection toolbox and benchmark. arXiv preprint arXiv:1906.07155, 2019. 7, 12
201
+ [4] Wei-Yu Chen, Yen-Cheng Liu, Zsolt Kira, Yu-Chiang Frank Wang, and Jia-Bin Huang. A closer look at few-shot classification. In International Conference on Learning Representations, 2019. 3
202
+ [5] Jiankang Deng, Jia Guo, Niannan Xue, and Stefanos Zafeiriou. Arcface: Additive angular margin loss for deep face recognition. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. 3, 6, 8, 9
203
+ [6] Guneet S Dhillon, Pratik Chaudhari, Avinash Ravichandran, and Stefano Soatto. A baseline for few-shot image classification. arXiv preprint arXiv:1909.02729, 2019. 3
204
+ [7] M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The pascal visual object classes (voc) challenge. International Journal of Computer Vision, 88(2):303–338, June 2010. 2, 7, 12
205
+ [8] Qi Fan, Wei Zhuo, Chi-Keung Tang, and Yu-Wing Tai. Few-shot object detection with attention-rpn and multi-relation detector. In IEEE Conference on Computer Vision and Pattern Recognition, 2020. 3
206
+ [9] Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In International Conference on Machine Learning, 2017. 3
207
+ [10] Bharath Hariharan and Ross Girshick. Low-shot visual recognition by shrinking and hallucinating features. In IEEE International Conference on Computer Vision, 2017. 3
208
+ [11] Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross Girshick. Mask r-cnn. In IEEE International Conference on Computer Vision, 2017. 1
209
+ [12] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770–778, 2016.
210
+ [13] Bingyi Kang, Zhuang Liu, Xin Wang, Fisher Yu, Jiashi Feng, and Trevor Darrell. Few-shot object detection via feature reweighting. In IEEE International Conference on Computer Vision, 2019. 2, 3, 7
211
+ [14] Leonid Karlinsky, Joseph Shtok, Sivan Harary, Eli Schwartz, Amit Aides, Rogerio Feris, Raja Giryes, and Alex M Bronstein. Repmet: Representative-based metric learning for classification and few-shot object detection. In IEEE International Conference on Computer Vision, 2019. 2, 3, 7
212
+ [15] Kwonjoon Lee, Subhransu Maji, Avinash Ravichandran, and Stefano Soatto. Meta-learning with differentiable convex optimization. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. 3
213
+ [16] Dekang Lin et al. An information-theoretic definition of similarity. In International Conference on Machine Learning, 1998. 4
214
+ [17] Tsung-Yi Lin, Piotr Dollár, Ross B Girshick, Kaiming He, Bharath Hariharan, and Serge J Belongie. Feature pyramid networks for object detection. In IEEE Conference on Computer Vision and Pattern Recognition, 2017. 7
215
+ [18] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In European Conference on Computer Vision, 2014. 2, 7, 12
216
+ [19] Weiyang Liu, Yandong Wen, Zhiding Yu, Ming Li, Bhiksha Raj, and Le Song. Sphereface: Deep hypersphere embedding for face recognition. In IEEE Conference on Computer Vision and Pattern Recognition, 2017. 3, 6
217
+ [20] George A Miller. Wordnet: a lexical database for english. Communications of the ACM. 4, 8
218
+ [21] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In Advances in Neural Information Processing Systems, 2015. 1, 5, 7
219
+ [22] Jake Snell, Kevin Swersky, and Richard S Zemel. Prototypical networks for few-shot learning. In Advances in Neural Information Processing Systems, 2017. 3
220
+ [23] Bo Sun, Banghuai Li, Shengcai Cai, Ye Yuan, and Chi Zhang. Fsce: Few-shot object detection via contrastive proposal encoding. In IEEE Conference on Computer Vision and Pattern Recognition, 2021. 2, 3, 7, 8
221
+ [24] Flood Sung, Yongxin Yang, Li Zhang, Tao Xiang, Philip HS Torr, and Timothy M Hospedales. Learning to compare: Relation network for few-shot learning. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. 3
222
+ [25] Laurens Van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of machine learning research, 2008. 5
223
+ [26] Oriol Vinyals, Charles Blundell, Timothy Lillicrap, Koray Kavukcuoglu, and Daan Wierstra. Matching networks for one shot learning. In Advances in Neural Information Processing Systems, 2016. 3
224
+ [27] Hao Wang, Yitong Wang, Zheng Zhou, Xing Ji, Dihong Gong, Jingchao Zhou, Zhifeng Li, and Wei Liu. Cosface: Large margin cosine loss for deep face recognition. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. 3, 6, 8, 9
225
+ [28] Xin Wang, Thomas E. Huang, Trevor Darrell, Joseph E Gonzalez, and Fisher Yu. Frustratingly simple few-shot object detection. In International Conference on Machine Learning, 2020. 2, 3, 7, 8
226
+ [29] Yu-Xiong Wang, Ross Girshick, Martial Hebert, and Bharath Hariharan. Low-shot learning from imaginary data. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. 3
227
+ [30] Yu-Xiong Wang, Deva Ramanan, and Martial Hebert. Meta-learning to detect rare objects. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. 7
228
+ [31] Jiaxi Wu, Songtao Liu, Di Huang, and Yunhong Wang. Multi-scale positive sample refinement for few-shot object detection. In European Conference on Computer Vision, 2020. 2, 3, 7
229
+ [32] Yang Xiao and Renaud Marlet. Few-shot object detection and viewpoint estimation for objects in the wild. In European Conference on Computer Vision, 2020. 2, 3
230
+ [33] Chen Xing, Negar Rostamzadeh, Boris Oreshkin, and Pedro O O Pinheiro. Adaptive cross-modal few-shot learning. Advances in Neural Information Processing Systems, 2019. 3
231
+ [34] Caixia Yan, Qinghua Zheng, Xiaojun Chang, Minnan Luo, Chung-Hsing Yeh, and Alexander G Hauptman. Semantics-preserving graph propagation for zero-shot object detection. IEEE Transactions on Image Processing, 2020. 3
232
+ [35] Xiaopeng Yan, Ziliang Chen, Anni Xu, Xiaoxi Wang, Xiaodan Liang, and Liang Lin. Meta r-cnn: Towards general solver for instance-level low-shot learning. In IEEE International Conference on Computer Vision, 2019. 2, 3, 7
233
+ [36] Yukuan Yang, Fangyu Wei, Miaojing Shi, and Guoqi Li. Restoring negative information in few-shot object detection. In Advances in Neural Information Processing Systems, 2020. 3
234
+ [37] Ze Yang, Yali Wang, Xianyu Chen, Jianzhuang Liu, and Yu Qiao. Context-transformer: tackling object confusion for few-shot detection. In AAAI Conference on Artificial Intelligence, 2020. 3
235
+ [38] Chenchen Zhu, Fangyi Chen, Uzair Ahmed, and Marios Savvides. Semantic relation reasoning for shotstable few-shot object detection. In IEEE Conference on Computer Vision and Pattern Recognition, 2021. 7
236
+
237
+ # Checklist
238
+
239
+ 1. For all authors...
240
+
241
+ (a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
242
+ (b) Did you describe the limitations of your work? [Yes] See Appendix 1.
243
+ (c) Did you discuss any potential negative societal impacts of your work? [N/A]
244
+ (d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
245
+
246
+ 2. If you are including theoretical results...
247
+
248
+ (a) Did you state the full set of assumptions of all theoretical results? [N/A] (b) Did you include complete proofs of all theoretical results? [N/A]
249
+
250
+ 3. If you ran experiments...
251
+
252
+ (a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [No] We will release the code to ensure strict reproducibility upon the paper accepted.
253
+ (b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] See Section 4.1, Appendix 2 and Appendix 3.
254
+ (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [No]
255
+ (d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] See Appendix 2.
256
+
257
+ 4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
258
+
259
+ (a) If your work uses existing assets, did you cite the creators? [Yes] Pascal VOC [7], MS COCO [18], MMDetection [3]
260
+ (b) Did you mention the license of the assets? [No]
261
+ (c) Did you include any new assets either in the supplemental material or as a URL? [No]
262
+ (d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [No]
263
+ (e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [No]
264
+
265
+ 5. If you used crowdsourcing or conducted research with human subjects...
266
+
267
+ (a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
268
+ (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
269
+ (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
parse/train/XjIm8hOCxTm/XjIm8hOCxTm_content_list.json ADDED
@@ -0,0 +1,1158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Few-Shot Object Detection via Association and DIscrimination ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 284,
8
+ 122,
9
+ 710,
10
+ 172
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Yuhang Cao1 Jiaqi Wang1,2B Ying Jin1 Tong Wu1 Kai Chen2,3 Ziwei Liu4 Dahua Lin1,2 ",
17
+ "bbox": [
18
+ 302,
19
+ 220,
20
+ 699,
21
+ 251
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "1CUHK-SenseTime Joint Lab, The Chinese University of Hong Kong 2Shanghai AI Laboratory 3SenseTime Research 4S-Lab, Nanyang Technological University {cy020,wj017,jy021,wt020,dhlin}@ie.cuhk.edu.hk chenkai@sensetime.com ziwei.liu@ntu.edu.sg ",
28
+ "bbox": [
29
+ 271,
30
+ 256,
31
+ 728,
32
+ 327
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Abstract ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 462,
42
+ 363,
43
+ 535,
44
+ 380
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "Object detection has achieved substantial progress in the last decade. However, detecting novel classes with only few samples remains challenging, since deep learning under low data regime usually leads to a degraded feature space. Existing works employ a holistic fine-tuning paradigm to tackle this problem, where the model is first pre-trained on all base classes with abundant samples, and then it is used to carve the novel class feature space. Nonetheless, this paradigm is still imperfect. Durning fine-tuning, a novel class may implicitly leverage the knowledge of multiple base classes to construct its feature space, which induces a scattered feature space, hence violating the inter-class separability. To overcome these obstacles, we propose a two-step fine-tuning framework, Few-shot object detection via Association and DIscrimination (FADI), which builds up a discriminative feature space for each novel class with two integral steps. 1) In the association step, in contrast to implicitly leveraging multiple base classes, we construct a compact novel class feature space via explicitly imitating a specific base class feature space. Specifically, we associate each novel class with a base class according to their semantic similarity. After that, the feature space of a novel class can readily imitate the well-trained feature space of the associated base class. 2) In the discrimination step, to ensure the separability between the novel classes and associated base classes, we disentangle the classification branches for base and novel classes. To further enlarge the inter-class separability between all classes, a set-specialized margin loss is imposed. Extensive experiments on standard Pascal VOC and MS-COCO datasets demonstrate that FADI achieves new state-of-the-art performance, significantly improving the baseline in any shot/split by $+ 1 8 . 7$ . Notably, the advantage of FADI is most announced on extremely few-shot scenarios (e.g. 1- and 3- shot). Code is available at: https://github.com/yhcao6/FADI ",
51
+ "bbox": [
52
+ 232,
53
+ 396,
54
+ 764,
55
+ 739
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 Introduction ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 174,
65
+ 765,
66
+ 310,
67
+ 782
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Deep learning has achieved impressive performance on object detection [21, 11, 1] in recent years. However, their strong performance heavily relies on a large amount of labeled training data, which limits the scalability and generalizability of the model in the data scarcity scenarios. In contrast, human visual systems can easily generalize to novel classes with only a few supervisions. Therefore, great interests have been invoked to explore few-shot object detection (FSOD), which aims at training a network from limited annotations of novel classes with the aid of sufficient data of base classes. ",
74
+ "bbox": [
75
+ 174,
76
+ 796,
77
+ 826,
78
+ 878
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "image",
84
+ "img_path": "images/d5b4257d029065b6e839e27a6f807e2dd785f77203b1bf438fc1772abbdeb481.jpg",
85
+ "image_caption": [
86
+ "Figure 1: Conceptually visualization of our FADI. (a) The conventional fine-tuning paradigm, e.g., TFA [28], learns good decision boundaries during the pre-training stage to separate the decision space into several subspaces (rectangles) occupied by different base classes. In the fine-tuning stage, a novel class (‘cow’) may exploit multiple similar base classes (‘sheep’ and ‘horse’) to construct the feature space of itself, which induces a scattered intra-class structure (the feature space of ‘cow’ across two base classes, ‘sheep’ and ‘horse’). FADI divides the fine-tuning stage into two steps. (b) In the association step, to construct a compact intra-class structure, we associate each novel class with a well-learned base class based on their semantic similarity (‘cow’ is similar to ‘sheep’, ‘motor’ is similar to ‘bike’). The novel class readily learns to align its intra-class distribution to the associated base class. (c) In the discrimination step, to ensure the inter-class separability between novel classes and associated base classes, we disentangle the classification branches for base and novel classes. A set-specialized margin loss is further imposed to enlarge the inter-class separability between all classes. "
87
+ ],
88
+ "image_footnote": [],
89
+ "bbox": [
90
+ 179,
91
+ 101,
92
+ 815,
93
+ 239
94
+ ],
95
+ "page_idx": 1
96
+ },
97
+ {
98
+ "type": "text",
99
+ "text": "Various methods have since been proposed to tackle the problem of FSOD, including metalearning [13, 35, 32], metric learning [14], and fine-tuning [28, 31, 23]. Among them, fine-tuningbased methods are one of the dominating paradigms for few-shot object detection. [28] introduces a simple two-stage fine-tuning approach (TFA). MPSR [31] improves upon TFA [28] via alleviating the problem of scale variation. The recent state-of-the-art method FSCE [23] shows the classifier is more error-prone than the regressor, and introduces the contrastive-aware object proposal encodings to facilitate the classification of detected objects. All these works employ a holistic fine-tuning paradigm, where the model is first trained on all base classes with abundant samples, and then the pre-trained model is fine-tuned on novel classes. Although it exhibits a considerable performance advantage compared with the earlier meta-learning methods, this fine-tuning paradigm is still imperfect. To be specific, the current design of the fine-tuning stage directly extracts the feature representation of a novel class from the network pre-trained on base classes. Therefore, a novel class may exploit the knowledge of multiple similar base classes to construct the feature space of itself. As a result, the feature space of a novel class will have an incompact intra-class structure that scatters across feature spaces of other classes, breaking the inter-class separability, hence leading to classification confusion, as shown in Figure 1a. ",
100
+ "bbox": [
101
+ 174,
102
+ 429,
103
+ 825,
104
+ 648
105
+ ],
106
+ "page_idx": 1
107
+ },
108
+ {
109
+ "type": "text",
110
+ "text": "To overcome these obstacles, we propose a two-step fine-tuning framework, Few-shot object detection via Association and DIscrimination (FADI), which constructs a discriminable feature space for each novel class with two integral steps, association and discrimination. Specifically, in the association step, as shown in Figure 1b, to construct a compact intra-class structure, we associate each novel class with a well-trained base class based on their underlying semantic similarity. The novel class readily learns to align its feature space to the associated base class, thus naturally becomes separable from the remaining classes. In the discrimination step, as shown in Figure 1c, to ensure the separability between the novel classes and associated base classes, we disentangle the classification branches for base and novel classes to reduce the ambiguity in the feature space induced by the association step. To further enlarge the inter-class separability between all classes, a set-specialized margin loss is applied. To this end, the fine-tuning stage is divided into two dedicated steps, and together complement each other. ",
111
+ "bbox": [
112
+ 174,
113
+ 656,
114
+ 825,
115
+ 820
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "Extensive experimental results have validated the effectiveness of our approach. We gain significant performance improvements on the Pascal VOC [7] and COCO [18] benchmarks, especially on the extremely few-shot scenario. Specifically, without bells and whistles, FADI improves the TFA [28] baseline by a significant margin in any split and shot with up to $+ 1 8 . 7 \\mathrm { m A P } ,$ , and push the envelope of the state-of-the-art performance by 2.5, 4.3, 2.8 and 5.6, 7.8, 1.6 for shot $K = 1 , 2 , 3$ on novel split-1 and split-3 of Pascal VOC dataset, respectively. ",
122
+ "bbox": [
123
+ 174,
124
+ 828,
125
+ 823,
126
+ 911
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "2 Related Work ",
133
+ "text_level": 1,
134
+ "bbox": [
135
+ 174,
136
+ 89,
137
+ 321,
138
+ 106
139
+ ],
140
+ "page_idx": 2
141
+ },
142
+ {
143
+ "type": "text",
144
+ "text": "Few-Shot Classification Few-Shot Classification aims to recognize novel instances with abundant base samples and a few novel samples. Metric-based methods address the few-shot learning by learning to compare, different distance formulations [26, 22, 24] are adopted. Initialization-based methods [9, 15] learn a good weight initialization to promote the adaption to unseen samples more effectively. Hallucination-based methods introduce hallucination techniques [10, 29] to alleviate the shortage of novel data. Recently, researchers find out that the simple pre-training and fine-tuning framework [4, 6] can compare favorably against other complex algorithms. ",
145
+ "bbox": [
146
+ 174,
147
+ 119,
148
+ 825,
149
+ 218
150
+ ],
151
+ "page_idx": 2
152
+ },
153
+ {
154
+ "type": "text",
155
+ "text": "Few-Shot Object Detection As an emerging task, FSOD is less explored than few-shot classification. Early works mainly explore the line of meta-learning [13, 35, 32, 14, 36, 37, 8], where a meta-learner is introduced to acquire class agnostic meta knowledge that can be transferred to novel classes. Later, [28] introduces a simple two-stage fine-tuning approach (TFA), which significantly outperforms the earlier meta-learning methods. Following this framework, MPSR [31] enriches object scales by generating multi-scale positive samples to alleviate the inherent scale bias. Recently, FSCE [23] shows in FSOD, the classifier is more error-prone than the regressor and introduces the contrastive-aware object proposal encodings to facilitate the classification of detected objects. Similarly, FADI also aims to promote the discrimination capacity of the classifier. But unlike previous methods that directly learn the classifier by implicitly exploiting the base knowledge, motivated by the works of [34, 33], FADI explicitly associates each novel class with a semantically similar base class to learn a compact intra-class distribution. ",
156
+ "bbox": [
157
+ 174,
158
+ 232,
159
+ 825,
160
+ 398
161
+ ],
162
+ "page_idx": 2
163
+ },
164
+ {
165
+ "type": "text",
166
+ "text": "Margin Loss Loss function plays an important role in the field of recognition tasks. To enhance the discrimination power of traditional softmax loss, different kinds of margin loss are proposed. SphereFace [19] introduces a multiplicative margin constrain in a hypersphere manifold. However, the non-monotonicity of cosine function makes it difficult for stable optimization, CosFace [27] then proposed to further normalize the feature embedding and impose an additive margin in the cosine space. ArcFace [5] moves the additive cosine margin into the angular space to obtain a better discrimination power and more stable training. However, we find these margin losses are not directly applicable under data-scarce settings as they equally treat different kinds of samples but ignore the inherent bias of the classifier towards base classes. Hence we propose a set-specialized margin loss that takes the kind of samples into consideration which yields significantly better performance. ",
167
+ "bbox": [
168
+ 174,
169
+ 412,
170
+ 825,
171
+ 553
172
+ ],
173
+ "page_idx": 2
174
+ },
175
+ {
176
+ "type": "text",
177
+ "text": "3 Our Approach ",
178
+ "text_level": 1,
179
+ "bbox": [
180
+ 174,
181
+ 571,
182
+ 328,
183
+ 589
184
+ ],
185
+ "page_idx": 2
186
+ },
187
+ {
188
+ "type": "text",
189
+ "text": "In this section, we first review the preliminaries of few-shot object detection setting and the conventional two-stage fine-tuning framework. Then we introduce our method that tackles few-shot object detection via association and discrimination (FADI). ",
190
+ "bbox": [
191
+ 176,
192
+ 603,
193
+ 823,
194
+ 645
195
+ ],
196
+ "page_idx": 2
197
+ },
198
+ {
199
+ "type": "text",
200
+ "text": "3.1 Preliminaries ",
201
+ "text_level": 1,
202
+ "bbox": [
203
+ 174,
204
+ 661,
205
+ 307,
206
+ 676
207
+ ],
208
+ "page_idx": 2
209
+ },
210
+ {
211
+ "type": "text",
212
+ "text": "In few-shot detection, the training set is composed of a base set $D ^ { B } = \\{ x _ { i } ^ { B } , y _ { i } ^ { B } \\}$ with abundant data of classes $C ^ { B }$ , and a novel set $D ^ { N } = \\{ x _ { i } ^ { N } , y _ { i } ^ { N } \\}$ with few-shot data of classes $C ^ { N }$ , where $x _ { i }$ and $y _ { i }$ indicate training samples and labels, respectively. The number of objects for each class in $C ^ { N }$ is $K$ for $K$ -shot detection. The model is expected to detect objects in the test set with classes in $C ^ { B } \\cup C ^ { N }$ . ",
213
+ "bbox": [
214
+ 176,
215
+ 685,
216
+ 825,
217
+ 746
218
+ ],
219
+ "page_idx": 2
220
+ },
221
+ {
222
+ "type": "text",
223
+ "text": "Fine-tuning-based methods are the current one of the leading paradigms for few-shot object detection, which successfully adopt a simple two-stage training pipeline to leverage the knowledge of base classes. TFA [28] is a widely adopted baseline of fine-tuning-based few-shot detectors. In the base training stage, the model is trained on base classes with sufficient data to obtain a robust feature representation. In the novel fine-tuning stage, the pre-trained model on base classes is then fine-tuned on a balanced few-shot set which comprises both base and novel classes $( C _ { B } \\cup C _ { N } )$ . Aiming at preventing over-fitting during fine-tuning, only the box predictor, i.e., classifier and regressor, are updated to fit the few-shot set. While the feature extractor, i.e., other structures of the network, are frozen [28] to preserve the pre-trained knowledge on the abundant base classes. ",
224
+ "bbox": [
225
+ 174,
226
+ 752,
227
+ 825,
228
+ 877
229
+ ],
230
+ "page_idx": 2
231
+ },
232
+ {
233
+ "type": "text",
234
+ "text": "Although the current design of fine-tuning stage brings considerable gains on few-shot detection, we observe that it may induce a scattered feature space on novel class, which violates the inter-class separability and leads to confusion of classification. Towards this drawback, we proposes few-shot object detection via association and discrimination (FADI), which divides the fine-tuning stage of TFA into a two-step association and discrimination pipelines. In the association step (Sec. 3.2), to construct a compact intra-class distribution, we associate each novel class with a base class based on their underlying semantic similarity. The feature representation of the associated base class is explicitly learned by the novel class. In the discrimination step (Sec. 3.3), to ensure the inter-class separability, we disentangle the base and novel branches and impose a set-specialized margin loss to train a more discriminative classifier for each class. ",
235
+ "bbox": [
236
+ 174,
237
+ 883,
238
+ 820,
239
+ 911
240
+ ],
241
+ "page_idx": 2
242
+ },
243
+ {
244
+ "type": "image",
245
+ "img_path": "images/d8d782b260730e2288d414fa3700079df56df3e88309178a49b7c9cae34f29d7.jpg",
246
+ "image_caption": [
247
+ "Step1: Association ",
248
+ "Figure 2: Method overview. There are two steps in FADI: association and discrimination. To construct a compact intra-class structure, the association step aligns the feature distribution of each novel class with a well-learned base class based on their semantic similarity. To ensure inter-class separability, the discrimination step disentangles classification branches for base and novel classes and imposes a set-specialized margin loss. "
249
+ ],
250
+ "image_footnote": [],
251
+ "bbox": [
252
+ 173,
253
+ 107,
254
+ 825,
255
+ 339
256
+ ],
257
+ "page_idx": 3
258
+ },
259
+ {
260
+ "type": "text",
261
+ "text": "",
262
+ "bbox": [
263
+ 173,
264
+ 411,
265
+ 825,
266
+ 523
267
+ ],
268
+ "page_idx": 3
269
+ },
270
+ {
271
+ "type": "text",
272
+ "text": "3.2 Association Step ",
273
+ "text_level": 1,
274
+ "bbox": [
275
+ 174,
276
+ 539,
277
+ 326,
278
+ 554
279
+ ],
280
+ "page_idx": 3
281
+ },
282
+ {
283
+ "type": "text",
284
+ "text": "In the base training stage, the base model is trained on the abundant base data $D ^ { B }$ and its classifier learns a good decision boundary (see Figure 1) to separate the whole decision space into several subspaces that are occupied by different base classes. Therefore, if a novel class can align the feature distribution of a base class, it will fall into the intra-class distribution of the associated base class, and be naturally separable from the other base classes. And if two novel classes are assigned to different base classes, they will also become separable from each other. ",
285
+ "bbox": [
286
+ 173,
287
+ 564,
288
+ 825,
289
+ 647
290
+ ],
291
+ "page_idx": 3
292
+ },
293
+ {
294
+ "type": "text",
295
+ "text": "To achieve this goal, we introduce a new concept named association, which pairs each novel class to a similar base class by semantic similarity. After then, the feature distribution of the novel class is aligned with the associated base class via feature distribution alignment. ",
296
+ "bbox": [
297
+ 174,
298
+ 654,
299
+ 823,
300
+ 696
301
+ ],
302
+ "page_idx": 3
303
+ },
304
+ {
305
+ "type": "text",
306
+ "text": "Similarity Measurement In order to ease the difficulty of feature distribution alignment, given a novel class $C _ { i } ^ { N }$ and a set of base classes $C ^ { B }$ , we want to associate $C _ { i } ^ { N }$ to the most similar base class in $C ^ { B }$ . An intuitive way is to rely on visual similarity between feature embeddings. However, the embedding is not representative for novel classes under data-scarce scenarios. Thus, we adopt WordNet [20] as an auxiliary to describe the semantic similarity between classes. WordNet is an English vocabulary graph, where nodes represent lemmas or synsets and they are linked according to their relations. It incorporates rich lexical knowledge which benefits the association. Lin Similarity [16] is used to calculate the class-to-class similarity upon WordNet which is given by: ",
307
+ "bbox": [
308
+ 173,
309
+ 709,
310
+ 825,
311
+ 823
312
+ ],
313
+ "page_idx": 3
314
+ },
315
+ {
316
+ "type": "equation",
317
+ "img_path": "images/dae95fc534e88d7f11c57a7117222770a399ff6de292d32dec407ebaf2adee32.jpg",
318
+ "text": "$$\n\\sin ( \\boldsymbol { C } _ { i } ^ { N } , \\boldsymbol { C } _ { j } ^ { B } ) = \\frac { 2 \\cdot \\operatorname { I C } ( \\operatorname { L C S } ( \\boldsymbol { C } _ { i } ^ { N } , \\boldsymbol { C } _ { j } ^ { B } ) ) } { \\operatorname { I C } ( \\boldsymbol { C } _ { i } ^ { N } ) + \\operatorname { I C } ( \\boldsymbol { C } _ { j } ^ { B } ) } ,\n$$",
319
+ "text_format": "latex",
320
+ "bbox": [
321
+ 361,
322
+ 827,
323
+ 635,
324
+ 866
325
+ ],
326
+ "page_idx": 3
327
+ },
328
+ {
329
+ "type": "text",
330
+ "text": "where LCS denotes the lowest common subsumer of two classes in lexical structure of WordNet. IC, i.e., information content, is the probability to encounter a word in a specific corpus. SemCor Corpus is adopted to count the word frequency here. We take the maximum among all base classes to obtain ",
331
+ "bbox": [
332
+ 174,
333
+ 869,
334
+ 825,
335
+ 911
336
+ ],
337
+ "page_idx": 3
338
+ },
339
+ {
340
+ "type": "image",
341
+ "img_path": "images/f508b247c584df6cff5186b3cae68a85a793e40e1dd382621924009438be38df.jpg",
342
+ "image_caption": [
343
+ "Figure 3: t-SNE here shows the distribution of feature after $F C _ { 2 } / F C _ { 2 } ^ { \\prime }$ from 200 randomly selected images on PASCAL VOC, ‘horse’ and ‘dog’ are base classes, ‘cow’ and ‘bird’ are novel classes, respectively. The feature space learned by FADI has a more compact intra-class structure and larger inter-class separability. "
344
+ ],
345
+ "image_footnote": [],
346
+ "bbox": [
347
+ 186,
348
+ 101,
349
+ 812,
350
+ 229
351
+ ],
352
+ "page_idx": 4
353
+ },
354
+ {
355
+ "type": "text",
356
+ "text": "the associated base class $C _ { j i } ^ { B }$ where $j \\to i$ means the base class $C _ { j } ^ { B }$ is assigned to the novel class $C _ { i } ^ { N }$ . ",
357
+ "bbox": [
358
+ 173,
359
+ 292,
360
+ 823,
361
+ 325
362
+ ],
363
+ "page_idx": 4
364
+ },
365
+ {
366
+ "type": "equation",
367
+ "img_path": "images/232ff33c27a06260bf47b4dc985dbd98640d1ce5c4d2ca89098dbc6a94571744.jpg",
368
+ "text": "$$\nC _ { j \\to i } ^ { B } \\underset { j \\in | C ^ { B } | } { \\operatorname { a r g m a x } } \\sin ( C _ { i } ^ { N } , C _ { j } ^ { B } ) .\n$$",
369
+ "text_format": "latex",
370
+ "bbox": [
371
+ 388,
372
+ 333,
373
+ 607,
374
+ 363
375
+ ],
376
+ "page_idx": 4
377
+ },
378
+ {
379
+ "type": "text",
380
+ "text": "To this end, novel class set $C ^ { N }$ is associated with a subset of base class $C ^ { B \\to N } \\subset C ^ { B }$ . ",
381
+ "bbox": [
382
+ 173,
383
+ 375,
384
+ 743,
385
+ 391
386
+ ],
387
+ "page_idx": 4
388
+ },
389
+ {
390
+ "type": "text",
391
+ "text": "Feature Distribution Alignment After obtaining the associated base class for each novel class, given a sample $x _ { i } ^ { N }$ of novel class $C _ { i } ^ { N }$ , it is associated with a pseudo label $y _ { j } ^ { B }$ of the assigned base class $C _ { j i } ^ { B }$ . We design a pseudo label training mechanism to directly align the feature distribution of the novel class with the assigned base class, as follows. ",
392
+ "bbox": [
393
+ 173,
394
+ 411,
395
+ 826,
396
+ 470
397
+ ],
398
+ "page_idx": 4
399
+ },
400
+ {
401
+ "type": "equation",
402
+ "img_path": "images/b4b3a37377df167c33c2e489ed5fcf78fbec0d75ec55b979c92a6b4561e80950.jpg",
403
+ "text": "$$\n\\operatorname* { m i n } _ { \\mathcal { W } _ { a s s o } ^ { N } } \\mathcal { L } _ { c l s } ( y _ { j } ^ { B } , f ( \\mathbf { z } _ { i } ^ { N } ; \\widetilde { \\mathcal { W } } _ { c l s } ^ { B } ) ) , \\mathrm { ~ w h e r e ~ } \\mathbf { z } _ { i } ^ { N } = g ( \\phi ( x _ { i } ^ { N } ; \\widetilde { \\mathcal { W } } _ { p r e } ^ { B } ) ; \\mathcal { W } _ { a s s o } ^ { N } ) ,\n$$",
404
+ "text_format": "latex",
405
+ "bbox": [
406
+ 271,
407
+ 483,
408
+ 725,
409
+ 513
410
+ ],
411
+ "page_idx": 4
412
+ },
413
+ {
414
+ "type": "text",
415
+ "text": "where $\\widetilde { \\mathcal W }$ means the weights are frozen. Thus, $f ( \\cdot ; \\widetilde { \\mathcal { W } } _ { c l s } ^ { B } )$ and $\\phi ( \\cdot ; \\widetilde { \\mathcal { W } } _ { p r e } ^ { B } )$ indicate the classifier (one fc layer) and the feature extractor (main network structures) with frozen weights and are pre-trained on base classes, and $g ( \\cdot ; \\mathcal { W } _ { a s s o } ^ { N } )$ means an intermediate structure (one or more fc layers) to align the feature distribution via updating the weights . By assigning pseudo labels and freezing the classifier, this intermediate structure learns to align the feature distribution of the novel class to the associated base class. The main network structures $\\phi ( \\cdot ; \\widetilde { \\mathcal { W } } _ { p r e } ^ { B } )$ is also fixed to keep the pre-trained knowledge from base classes. ",
416
+ "bbox": [
417
+ 173,
418
+ 525,
419
+ 825,
420
+ 630
421
+ ],
422
+ "page_idx": 4
423
+ },
424
+ {
425
+ "type": "text",
426
+ "text": "As shown in Figure 2, we use the same RoI head structure of Faster R-CNN [21], but we remove the regressor to reduce it to a pure classification problem. During training, we freeze all parameters except the second linear layer $F C _ { 2 } ^ { ' }$ , which means $g ( \\cdot ; \\mathcal { W } _ { a s s o } ^ { N } )$ is a single fc layer. We then construct a balanced training set with $K$ shots per class. It is noted we discard the base classes that are associated with novel classes in this step. And the labels of novel classes are replaced by their assigned pseudo labels. As a result, the supervision will enforce the classifier to identify samples of the novel class $C _ { i } ^ { N }$ as the assigned base class $C _ { j i } ^ { B }$ , which means the feature representation of novel classes before the classifier gradually shifts toward their assigned base classes. As shown in Figure 3b, the t-SNE [25] visualization confirms the effectiveness of our distribution alignment. After the association step, the feature distribution of two associated pairs (\"bird\" and \"dog\"; \"cow\" and \"horse\") are well aligned. ",
427
+ "bbox": [
428
+ 173,
429
+ 635,
430
+ 826,
431
+ 777
432
+ ],
433
+ "page_idx": 4
434
+ },
435
+ {
436
+ "type": "text",
437
+ "text": "3.3 Discrimination Step ",
438
+ "text_level": 1,
439
+ "bbox": [
440
+ 174,
441
+ 799,
442
+ 351,
443
+ 815
444
+ ],
445
+ "page_idx": 4
446
+ },
447
+ {
448
+ "type": "text",
449
+ "text": "As shown in Figure 3b, after the association step, the feature distribution of each novel class is aligned with the associated base class. Therefore, this novel class will have a compact intra-class distribution and be naturally distinguishable from other classes. However, the association step inevitably leads to confusion between the novel class and its assigned base class. To tackle this problem, we introduce a discrimination step that disentangles the classification branches for base and novel classes. A set-specialized margin loss is further applied to enlarge the inter-class separability. ",
450
+ "bbox": [
451
+ 174,
452
+ 827,
453
+ 825,
454
+ 911
455
+ ],
456
+ "page_idx": 4
457
+ },
458
+ {
459
+ "type": "text",
460
+ "text": "Disentangling Given a training sample $x _ { i }$ with label $y _ { i }$ , we disentangle the classification branches for base and novel classes as follows, ",
461
+ "bbox": [
462
+ 173,
463
+ 90,
464
+ 823,
465
+ 119
466
+ ],
467
+ "page_idx": 5
468
+ },
469
+ {
470
+ "type": "equation",
471
+ "img_path": "images/8706731ae8464c1ef4beb2b1ec52c83f4c9991436572cc666c33f7c77844d2aa.jpg",
472
+ "text": "$$\n\\begin{array} { c } { \\displaystyle \\operatorname* { m i n } _ { \\mathcal { W } _ { c l s } ^ { B } , \\mathcal { W } _ { c l s } ^ { N } } \\mathcal { L } _ { c l s } ( y _ { i } , [ { \\mathbf { p } } ^ { B } , { \\mathbf { p } } ^ { N } ] ) , \\mathrm { ~ w h e r e ~ } } \\\\ { \\displaystyle { \\mathbf { p } ^ { B } = f ( g ( \\mathbf { q } ; \\widetilde { \\mathcal { W } } _ { o r i g i n } ^ { B } ) ; \\mathcal { W } _ { c l s } ^ { B } ) , \\mathbf { p } ^ { N } = f ( g ( \\mathbf { q } ; \\widetilde { \\mathcal { W } } _ { a s s o } ^ { N } ) ; \\mathcal { W } _ { c l s } ^ { N } ) , \\mathbf { q } = \\phi ( x _ { i } ; \\widetilde { \\mathcal { W } } _ { p r e } ^ { B } ) , } } \\end{array}\n$$",
473
+ "text_format": "latex",
474
+ "bbox": [
475
+ 235,
476
+ 123,
477
+ 759,
478
+ 176
479
+ ],
480
+ "page_idx": 5
481
+ },
482
+ {
483
+ "type": "text",
484
+ "text": "where $f ( \\cdot ; \\mathcal { W } _ { c l s } ^ { B } ) , f ( \\cdot ; \\mathcal { W } _ { c l s } ^ { N } )$ are the classifiers for base and novel classes, respectively. $g ( \\cdot , \\widetilde { \\mathcal { W } } _ { o r i g i n } ^ { B } )$ $g ( \\cdot , \\widetilde { \\mathcal { W } } _ { a s s o } ^ { N } )$ are the last fc layer with frozen weights for base and novel classes, respectively. As shown in Figunovel classes. we d and ngle the classifiers and thload the original weights layers that ar $F C _ { 2 }$ and train $F C _ { 2 } ^ { ' }$ ) for base andh base classes $F C _ { 2 }$ $F C _ { 2 } ^ { ' }$ $\\widetilde { \\mathcal { W } } _ { o r i g i n } ^ { B }$ and the weights $\\widetilde { \\mathcal W } _ { a s s o } ^ { N }$ after association step, respectively. They are frozen in the discrimination step to keep their specific knowledge for base and novel classes. Therefore, $F C _ { 2 }$ and $F C _ { 2 } ^ { ' }$ are suitable to deal with base classes and novel classes, respectively. We attach the base classifier $f ( \\cdot ; \\mathcal { W } _ { c l s } ^ { B } )$ to $F C _ { 2 }$ , and the novel classifier $f ( \\cdot ; \\mathcal { W } _ { c l s } ^ { N } )$ to $F C { _ 2 } ^ { \\prime }$ . The base classifier is a $| C _ { B } |$ -way classifier. The novel classifier is a $( | C _ { N } | + 1 )$ -way classifier since we empirically let the novel classifier be also responsible for recognizing background class $C _ { 0 }$ . The prediction $\\mathbf { p } ^ { B }$ and $\\mathbf { p } ^ { N }$ from these two branches will be concatenated to yield the final $( | C _ { B } | + | C _ { N } | + 1 )$ -way prediction $[ \\mathbf { p } ^ { B } , \\mathbf { p } ^ { N } ]$ . ",
485
+ "bbox": [
486
+ 173,
487
+ 183,
488
+ 826,
489
+ 353
490
+ ],
491
+ "page_idx": 5
492
+ },
493
+ {
494
+ "type": "text",
495
+ "text": "Set-Specialized Margin Loss Besides disentangling, we further propose a set-specialized margin loss to alleviate the confusion between different classes. Different from previous margin losses [19, 27, 5] that directly modify the original CE loss, we introduce a margin loss as an auxiliary loss for the classifier. Given an $i$ -th training sample of label $y _ { i }$ , we adopt cosine similarity to formulate the logits prediction, which follows the typical conventions in few-shot classification and face recognition [27]. ",
496
+ "bbox": [
497
+ 173,
498
+ 364,
499
+ 825,
500
+ 435
501
+ ],
502
+ "page_idx": 5
503
+ },
504
+ {
505
+ "type": "equation",
506
+ "img_path": "images/536c8ce9f1d8bd3890b59cd9ffe18a4ed63b6be51e55a6e422736a6db56fbd98.jpg",
507
+ "text": "$$\np _ { y _ { i } } = \\frac { \\tau \\cdot \\mathbf { x } ^ { T } \\mathcal { W } _ { y _ { i } } } { | | \\mathbf { x } | | \\cdot | | \\mathcal { W } _ { y _ { i } } | | } , s _ { y _ { i } } = \\frac { e ^ { p _ { y _ { i } } } } { \\sum _ { j = 1 } ^ { C } e ^ { p _ { j } } } ,\n$$",
508
+ "text_format": "latex",
509
+ "bbox": [
510
+ 361,
511
+ 440,
512
+ 635,
513
+ 481
514
+ ],
515
+ "page_idx": 5
516
+ },
517
+ {
518
+ "type": "text",
519
+ "text": "where $\\mathcal { W }$ is the weight of the classifier, $\\mathbf { x }$ is the input feature and $\\tau$ is the temperature factor. We try to maximize the margin of decision boundary between $C _ { y _ { i } }$ and any other class $C _ { j , j \\neq y _ { i } }$ , as follows, ",
520
+ "bbox": [
521
+ 173,
522
+ 484,
523
+ 823,
524
+ 515
525
+ ],
526
+ "page_idx": 5
527
+ },
528
+ {
529
+ "type": "equation",
530
+ "img_path": "images/bcf242b02bd85b08de90308a40de51c9244ea6490ab1134437e31a28255818f0.jpg",
531
+ "text": "$$\n\\mathcal { L } _ { m _ { i } } = \\sum _ { j = 1 , j \\neq y _ { i } } ^ { C } - \\log ( ( s _ { y _ { i } } - s _ { j } ) ^ { + } + \\epsilon ) ,\n$$",
532
+ "text_format": "latex",
533
+ "bbox": [
534
+ 364,
535
+ 520,
536
+ 632,
537
+ 566
538
+ ],
539
+ "page_idx": 5
540
+ },
541
+ {
542
+ "type": "text",
543
+ "text": "where $s _ { y _ { i } }$ and $s _ { j }$ are classification scores on class $C _ { y _ { i } }$ and $C _ { j , j \\neq y _ { i } }$ , and $\\epsilon$ is a small number $( 1 e ^ { - 7 } )$ to keep numerical stability. ",
544
+ "bbox": [
545
+ 173,
546
+ 571,
547
+ 823,
548
+ 601
549
+ ],
550
+ "page_idx": 5
551
+ },
552
+ {
553
+ "type": "text",
554
+ "text": "In the scenario of few-shot learning, there exists an inherent bias that the classifier tends to predict higher scores on base classes, which makes the optimization of margin loss on novel classes becomes more difficult. And the number of background (negative) samples dominates the training samples, thus we may suppress the margin loss on background class $C _ { 0 }$ . ",
555
+ "bbox": [
556
+ 173,
557
+ 606,
558
+ 825,
559
+ 662
560
+ ],
561
+ "page_idx": 5
562
+ },
563
+ {
564
+ "type": "text",
565
+ "text": "Towards the aforementioned problem, it is necessary to introduce the set-specialized handling of different set of classes into the margin loss. Thanks to adopting margin loss as an auxiliary benefit, our design can easily enable set-specialized handling of different sets of classes by simply re-weighting the margin loss value: ",
566
+ "bbox": [
567
+ 173,
568
+ 667,
569
+ 825,
570
+ 724
571
+ ],
572
+ "page_idx": 5
573
+ },
574
+ {
575
+ "type": "equation",
576
+ "img_path": "images/b1ec831d4bb17a95afdc8da428a620338b741b08c8d873b227e69dba989e382c.jpg",
577
+ "text": "$$\n{ \\mathcal { L } } _ { m } = \\sum _ { \\{ i | y _ { i } \\in C ^ { B } \\} } \\alpha \\cdot { \\mathcal { L } } _ { m _ { i } } + \\sum _ { \\{ i | y _ { i } \\in C ^ { N } \\} } \\beta \\cdot { \\mathcal { L } } _ { m _ { i } } + \\sum _ { \\{ i | y _ { i } = C ^ { 0 } \\} } \\gamma \\cdot { \\mathcal { L } } _ { m _ { i } } ,\n$$",
578
+ "text_format": "latex",
579
+ "bbox": [
580
+ 279,
581
+ 729,
582
+ 717,
583
+ 767
584
+ ],
585
+ "page_idx": 5
586
+ },
587
+ {
588
+ "type": "text",
589
+ "text": "where $\\alpha , \\beta , \\gamma$ are hyper-parameters controlling the margin of base samples, novel samples and negative samples, respectively. Intuitively, $\\beta$ is larger than $\\alpha$ because novel classes are more challenging, and $\\gamma$ is a much smaller value to balance the overwhelming negative samples. Finally, the loss function of the discrimination step is shown as in Eq. 8 ",
590
+ "bbox": [
591
+ 173,
592
+ 771,
593
+ 825,
594
+ 828
595
+ ],
596
+ "page_idx": 5
597
+ },
598
+ {
599
+ "type": "equation",
600
+ "img_path": "images/084199a1d9f72dc9b8501f43e21866ca06f5f533d8eb3edab2e8d6e8debef851.jpg",
601
+ "text": "$$\n\\mathcal { L } _ { f t } = \\mathcal { L } _ { c l s } + \\mathcal { L } _ { m } + 2 \\cdot \\mathcal { L } _ { r e g } ,\n$$",
602
+ "text_format": "latex",
603
+ "bbox": [
604
+ 400,
605
+ 833,
606
+ 598,
607
+ 851
608
+ ],
609
+ "page_idx": 5
610
+ },
611
+ {
612
+ "type": "text",
613
+ "text": "where $\\mathcal { L } _ { c l s }$ is a cross-entropy loss for classification, $\\mathcal { L } _ { \\boldsymbol { r } \\boldsymbol { e } \\boldsymbol { g } }$ is a smooth-L1 loss for regression, and ${ \\mathcal { L } } _ { m }$ is the proposed set-specialized margin loss. Since our margin loss increases the gradients on the classification branch, we scale $\\mathcal { L } _ { \\boldsymbol { r } \\boldsymbol { e } \\boldsymbol { g } }$ by a factor of 2 to keep the balance of the two tasks. The overall loss takes the form of multi-task learning to jointly optimize the model. ",
614
+ "bbox": [
615
+ 173,
616
+ 854,
617
+ 825,
618
+ 912
619
+ ],
620
+ "page_idx": 5
621
+ },
622
+ {
623
+ "type": "table",
624
+ "img_path": "images/71dc1e1bc0547982728e99d79deccfd73dd3d9ea5a3828473dfb7a2c1af1e537.jpg",
625
+ "table_caption": [
626
+ "Table 1: Performance (novel AP50) on PASCAL VOC dataset. $^ \\dagger$ denotes meta-learning-based methods. "
627
+ ],
628
+ "table_footnote": [],
629
+ "table_body": "<table><tr><td rowspan=\"2\">Method /Shot</td><td rowspan=\"2\">Backbone</td><td colspan=\"5\">Novel Split 1</td><td colspan=\"5\">Novel Split 2</td><td colspan=\"5\">Novel Split 3</td></tr><tr><td></td><td>2</td><td>3</td><td>5</td><td>10</td><td>1</td><td>2</td><td>3</td><td>5</td><td>10</td><td>1</td><td>2</td><td>3</td><td>5</td><td>10</td></tr><tr><td>LSTD [2]</td><td>VGG-16</td><td>8.2</td><td>1.0</td><td>12.4</td><td>29.1</td><td>38.5</td><td>11.4</td><td>3.8</td><td>5.0</td><td>15.7</td><td>31.0</td><td>12.6</td><td>8.5</td><td>15.0</td><td>27.3</td><td>36.3</td></tr><tr><td>YOLOv2-ft [30]</td><td>YOLO V2</td><td>6.6</td><td>10.7</td><td>12.5</td><td>24.8</td><td>38.6</td><td>12.5</td><td>4.2</td><td>11.6</td><td>16.1</td><td>33.9</td><td>13.0</td><td>15.9</td><td>15.0</td><td>32.2</td><td>38.4</td></tr><tr><td>fFSRW[13] tMetaDet [30]</td><td></td><td>14.8 17.1</td><td>15.5 19.1</td><td>26.7 28.9</td><td>33.9 35.0</td><td>47.2 48.8</td><td>15.7 18.2</td><td>15.3 20.6</td><td>22.7 25.9</td><td>30.1 30.6</td><td>40.5 41.5</td><td>21.3 20.1</td><td>25.6 22.3</td><td>28.4 27.9</td><td>42.8 41.9</td><td>45.9 42.9</td></tr><tr><td>tRepMet [14]</td><td>InceptionV3</td><td>26.1</td><td>32.9</td><td>34.4</td><td>38.6</td><td>41.3</td><td></td><td>22.1</td><td>23.4</td><td></td><td></td><td></td><td></td><td>31.5</td><td>34.4</td><td>37.2</td></tr><tr><td>FRCN-ft[30]</td><td></td><td>13.8</td><td>19.6</td><td></td><td></td><td></td><td>17.2</td><td></td><td></td><td>28.3</td><td>35.8</td><td>27.5</td><td>31.1</td><td></td><td></td><td>45.1</td></tr><tr><td>FRCN+FPN-ft [28]</td><td>FRCN-R101</td><td>8.2</td><td>20.3</td><td>32.8 29.0</td><td>41.5 40.1</td><td>45.6 45.5</td><td>7.9 13.4</td><td>15.3 20.6</td><td>26.2 28.6</td><td>31.6 32.4</td><td>39.1 38.8</td><td>9.8 19.6</td><td>11.3 20.8</td><td>19.1 28.7</td><td>35.0 42.2</td><td>42.1</td></tr><tr><td>+MetaDet [30]</td><td></td><td>18.9</td><td>20.6</td><td>30.2</td><td>36.8</td><td>49.6</td><td>21.8</td><td>23.1</td><td>27.8</td><td>31.7</td><td>43.0</td><td>20.6</td><td>23.9</td><td>29.4</td><td>43.9</td><td>44.1</td></tr><tr><td>tMeta R-CNN [35]</td><td></td><td>19.9</td><td>25.5</td><td>35.0</td><td>45.7</td><td>51.5</td><td>10.4</td><td>19.4</td><td>29.6</td><td>34.8</td><td>45.4</td><td>14.3</td><td>18.2</td><td>27.5</td><td>41.2</td><td>48.1</td></tr><tr><td>TFA w/fc [28]</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>TFA w/ cos [28]</td><td></td><td>36.8</td><td>29.1</td><td>43.6</td><td>55.7</td><td>57.0</td><td>18.2</td><td>29.0</td><td>33.4</td><td>35.5</td><td>39.0</td><td>27.7</td><td>33.6</td><td>42.5</td><td>48.7</td><td>50.2</td></tr><tr><td></td><td></td><td>39.8</td><td>36.1</td><td>44.7</td><td>55.7</td><td>56.0</td><td>23.5</td><td>26.9</td><td>34.1</td><td>35.1</td><td>39.1</td><td>30.8</td><td>34.8</td><td>42.8</td><td>49.5</td><td>49.8</td></tr><tr><td>MPSR [31]</td><td>FRCN-R101</td><td>41.7</td><td>-</td><td>51.4</td><td>55.2</td><td>61.8</td><td>24.4</td><td>-</td><td>39.2</td><td>39.9</td><td>47.8</td><td>35.6</td><td>-</td><td>42.3</td><td>48.0</td><td>49.7</td></tr><tr><td>SRR-FSD [38]</td><td></td><td>47.8</td><td>50.5</td><td>51.3</td><td>55.2</td><td>56.8</td><td>32.5</td><td>35.3</td><td>39.1</td><td>40.8</td><td>43.8</td><td>40.1</td><td>41.5</td><td>44.3</td><td>46.9</td><td>46.4</td></tr><tr><td>FSCE[23]</td><td></td><td>44.2</td><td>43.8</td><td>51.4</td><td>61.9</td><td>63.4</td><td>27.3</td><td>29.5</td><td>43.5</td><td>44.2</td><td>50.2</td><td>37.2</td><td>41.9</td><td>47.5</td><td>54.6</td><td>58.5</td></tr><tr><td>FADI(Ours)</td><td></td><td>50.3</td><td>54.8</td><td>54.2</td><td>59.3</td><td>63.2</td><td>30.6</td><td>35.0</td><td>40.3</td><td>42.8</td><td>48.0</td><td>45.7</td><td>49.7</td><td>49.1</td><td>55.0</td><td>59.6</td></tr></table>",
630
+ "bbox": [
631
+ 176,
632
+ 89,
633
+ 825,
634
+ 275
635
+ ],
636
+ "page_idx": 6
637
+ },
638
+ {
639
+ "type": "table",
640
+ "img_path": "images/324c5cdc5b1018c58225987f1ce999ec96fe061140c645914a887d401dda95b8.jpg",
641
+ "table_caption": [],
642
+ "table_footnote": [
643
+ "(a) Comparison with baseline TFA "
644
+ ],
645
+ "table_body": "<table><tr><td rowspan=\"2\">shot</td><td colspan=\"2\">nAP</td><td colspan=\"2\">nAP50</td><td colspan=\"2\">nAP75</td></tr><tr><td>TFA</td><td>FADI</td><td>TFA</td><td>FADI</td><td>TFA</td><td>FADI</td></tr><tr><td>1</td><td>3.4</td><td>5.7</td><td>5.8</td><td>10.4</td><td>3.8</td><td>6.0</td></tr><tr><td>2</td><td>4.6</td><td>7.0</td><td>8.3</td><td>13.1</td><td>4.8</td><td>7.0</td></tr><tr><td>3</td><td>6.6</td><td>8.6</td><td>12.1</td><td>15.8</td><td>6.5</td><td>8.3</td></tr><tr><td>5</td><td>8.3</td><td>10.1</td><td>15.3</td><td>18.6</td><td>8.0</td><td>9.7</td></tr><tr><td>10</td><td>10.0</td><td>12.2</td><td>19.1</td><td>22.7</td><td>9.3</td><td>11.9</td></tr><tr><td>30</td><td>13.7</td><td>16.1</td><td>24.9</td><td>29.1</td><td>13.4</td><td>15.8</td></tr></table>",
646
+ "bbox": [
647
+ 181,
648
+ 310,
649
+ 506,
650
+ 446
651
+ ],
652
+ "page_idx": 6
653
+ },
654
+ {
655
+ "type": "table",
656
+ "img_path": "images/0f00d28a74f4f857990555543d67b3e6aaaade80257fc73bd296c03517cff9ad.jpg",
657
+ "table_caption": [],
658
+ "table_footnote": [
659
+ "(b) Comparison with latest methods. ",
660
+ "Table 2: Performance on MS COCO dataset. $^ \\dagger$ denotes meta-learning-based methods. nAP means novel AP. "
661
+ ],
662
+ "table_body": "<table><tr><td rowspan=\"2\">Method</td><td colspan=\"2\">nAP</td><td rowspan=\"2\">nAP75 30</td></tr><tr><td>10</td><td>30 10</td></tr><tr><td>+FSRW [13]</td><td>5.6</td><td>9.1</td><td>4.6 7.6</td></tr><tr><td>+ MetaDet [30]</td><td>7.1</td><td>11.3</td><td>5.9 10.3</td></tr><tr><td>†Meta R-CNN [35]</td><td>8.7</td><td>12.4</td><td>6.6 10.8</td></tr><tr><td>MPSR [31]</td><td>9.8</td><td>14.1</td><td>9.7 14.2</td></tr><tr><td>SRR-FSD [38]</td><td>11.3</td><td>14.7</td><td>9.8 13.5</td></tr><tr><td>FSCE[23]</td><td>11.9</td><td>16.4</td><td>10.5 16.2</td></tr><tr><td>Ours (FADI)</td><td>12.2</td><td>16.1</td><td>11.9 15.8</td></tr></table>",
663
+ "bbox": [
664
+ 522,
665
+ 310,
666
+ 823,
667
+ 446
668
+ ],
669
+ "page_idx": 6
670
+ },
671
+ {
672
+ "type": "text",
673
+ "text": "4 Experiments ",
674
+ "text_level": 1,
675
+ "bbox": [
676
+ 174,
677
+ 497,
678
+ 312,
679
+ 515
680
+ ],
681
+ "page_idx": 6
682
+ },
683
+ {
684
+ "type": "text",
685
+ "text": "4.1 Datasets and Evaluation Protocols ",
686
+ "text_level": 1,
687
+ "bbox": [
688
+ 174,
689
+ 530,
690
+ 450,
691
+ 545
692
+ ],
693
+ "page_idx": 6
694
+ },
695
+ {
696
+ "type": "text",
697
+ "text": "We conduct experiments on both PASCAL VOC $( 0 7 + 1 2 )$ [7] and MS COCO [18] datasets. To ensure fair comparison, we strictly follow the data split construction and evaluation protocol used in [13, 28, 23]. PASCAL VOC contains 20 categories, and we consider the same 3 base/novel splits with TFA [28] and refer them as Novel Split 1, 2, 3. Each split contains 15 base categories with abundant data and 5 novel categories with $K$ annotated instances for $K = 1 , 2 , 3 , 5 , 1 0$ . We report AP50 of novel categories (nAP50) on VOC07 test set. For MS COCO, 20 classes that overlap with PASCAL VOC are selected as novel classes, and the remaining 60 classes are set as base ones. Similarly, we evaluate our method on shot 1, 2, 3, 5, 10, 30 and the standard COCO-style ap metric is adopted. ",
698
+ "bbox": [
699
+ 173,
700
+ 556,
701
+ 825,
702
+ 667
703
+ ],
704
+ "page_idx": 6
705
+ },
706
+ {
707
+ "type": "text",
708
+ "text": "4.2 Implementation Details ",
709
+ "text_level": 1,
710
+ "bbox": [
711
+ 176,
712
+ 686,
713
+ 377,
714
+ 702
715
+ ],
716
+ "page_idx": 6
717
+ },
718
+ {
719
+ "type": "text",
720
+ "text": "We implement our methods based on MMDetection [3]. Faster-RCNN [21] with Feature Pyramid Network [17] and ResNet-101 [12] are adopted as base model. Detailed settings are described in the supplementary material. ",
721
+ "bbox": [
722
+ 174,
723
+ 713,
724
+ 825,
725
+ 755
726
+ ],
727
+ "page_idx": 6
728
+ },
729
+ {
730
+ "type": "text",
731
+ "text": "4.3 Benchmarking Results ",
732
+ "text_level": 1,
733
+ "bbox": [
734
+ 176,
735
+ 773,
736
+ 370,
737
+ 789
738
+ ],
739
+ "page_idx": 6
740
+ },
741
+ {
742
+ "type": "text",
743
+ "text": "Comparison with Baseline Methods To show the effectiveness of our method, we first make a detailed comparison with TFA since our method is based on it. As shown in Table 1, FADI outperforms TFA by a large margin in any shot and split on PASCAL VOC benchmark. To be specific, FADI improves TFA by 10.5, 18.7, 9.5, 3.6, 7.2 and 7.1, 8.1, 6.2, 7.7, 8.9 and 14.9, 14.9, 6.3, 5.5, 9.8 for $K { = } 1$ , 2, 3, 5, 10 on Novel split1, split2 and split3. The lower the shot, the more difficult to learn a discriminative novel classifier. The significant performance gap reflects our FADI can effectively alleviate such problem even under low shot, i.e., $K < = 3$ . Similar improvements can be observed on the challenging COCO benchmark. As shown in Table 2, we boost TFA by 2.3, 2.4, 2.0, 1.8, 2.2, 2.4 for $K { = } 1$ , 2, 3, 5, 10, 30. Besides, we also report nAP50 and nAP75, a larger gap can be obtained under IoU threshold 0.5 which suggests FADI benefits more under lower IoU thresholds. ",
744
+ "bbox": [
745
+ 174,
746
+ 800,
747
+ 825,
748
+ 911
749
+ ],
750
+ "page_idx": 6
751
+ },
752
+ {
753
+ "type": "table",
754
+ "img_path": "images/55d52d8245b893f4df35a28c5762254da037c5c7d6977115f17ef14666c442fd.jpg",
755
+ "table_caption": [
756
+ "Table 3: Effectiveness of different components of FADI. "
757
+ ],
758
+ "table_footnote": [],
759
+ "table_body": "<table><tr><td>Association</td><td>Disentangling</td><td>Margin</td><td colspan=\"3\">nAP50</td></tr><tr><td></td><td></td><td></td><td>1</td><td>3</td><td>5</td></tr><tr><td></td><td></td><td></td><td>41.3</td><td>46.3</td><td>53.7</td></tr><tr><td></td><td></td><td></td><td>42.4</td><td>46.8</td><td>55.2</td></tr><tr><td></td><td></td><td></td><td>42.2 44.9</td><td>47.3</td><td>54.1</td></tr><tr><td></td><td></td><td></td><td>46.3</td><td>50.3 48.8</td><td>56.8 56.4</td></tr><tr><td>x&lt;x&lt;xv</td><td>xx&lt;&lt;x&gt;</td><td>xxxxν&gt;</td><td>50.3</td><td>54.2</td><td>59.3</td></tr></table>",
760
+ "bbox": [
761
+ 174,
762
+ 89,
763
+ 566,
764
+ 205
765
+ ],
766
+ "page_idx": 7
767
+ },
768
+ {
769
+ "type": "table",
770
+ "img_path": "images/88b540ca9c435e2bc5342ebf79e53ad50ff8b580bdeb5049b495e1458a768017.jpg",
771
+ "table_caption": [],
772
+ "table_footnote": [],
773
+ "table_body": "<table><tr><td>Margin</td><td>nAP50</td></tr><tr><td>TFA</td><td>41.3</td></tr><tr><td>CosFace [27]</td><td>38.9</td></tr><tr><td>ArcFace [5]</td><td>37.9</td></tr><tr><td>CosFace (novel)</td><td>44.2</td></tr><tr><td>ArcFace (novel)</td><td>44.3</td></tr><tr><td>Ours</td><td>46.3</td></tr></table>",
774
+ "bbox": [
775
+ 611,
776
+ 88,
777
+ 792,
778
+ 205
779
+ ],
780
+ "page_idx": 7
781
+ },
782
+ {
783
+ "type": "table",
784
+ "img_path": "images/5d2f66219d9a6a1969c9ecae8016fc9029908bc6b9c3cc6025d311e4f6189cdd.jpg",
785
+ "table_caption": [
786
+ "Table 4: Comparison of different margin loss on the TFA baseline model. "
787
+ ],
788
+ "table_footnote": [
789
+ "Table 5: Comparison of different assign policies. Set-specialized margin loss is not adopted in this table. "
790
+ ],
791
+ "table_body": "<table><tr><td>base /novel</td><td>bird</td><td>bus</td><td>cow</td><td>motorbike</td><td>sofa</td><td>nAP50</td></tr><tr><td>random</td><td>person</td><td>boat</td><td>horse</td><td>aeroplane</td><td>sheep</td><td>39.6</td></tr><tr><td>human</td><td>aeroplane</td><td>train</td><td>sheep</td><td>bicycle</td><td>chair</td><td>44.1</td></tr><tr><td>visual</td><td>dog</td><td>car</td><td>horse</td><td>person</td><td>chair</td><td>43.3</td></tr><tr><td>top2</td><td>dog</td><td>car</td><td>sheep</td><td>tv</td><td>diningtable</td><td>41.2</td></tr><tr><td>top1</td><td>horse</td><td>train</td><td>horse</td><td>bicycle</td><td>chair</td><td>44.3</td></tr><tr><td>top1 w/o dup</td><td>dog</td><td>train</td><td>horse</td><td>bicycle</td><td>chair</td><td>44.9</td></tr></table>",
792
+ "bbox": [
793
+ 225,
794
+ 246,
795
+ 772,
796
+ 359
797
+ ],
798
+ "page_idx": 7
799
+ },
800
+ {
801
+ "type": "text",
802
+ "text": "",
803
+ "bbox": [
804
+ 176,
805
+ 390,
806
+ 823,
807
+ 417
808
+ ],
809
+ "page_idx": 7
810
+ },
811
+ {
812
+ "type": "text",
813
+ "text": "Comparison with State-of-the-Art Methods Next, we compare with other latest few-shot methods. As shown in Table 1, our method pushes the envelope of current SOTA by a large margin in shot 1, 2, 3 for novel split 1 and 3. Specifically, we outperform current SOTA by 2.5, 4.3, 2.8 and 5.6, 7.8, 1.6 for $K = 1 , 2 , 3$ on novel split1 and 3, respectively. As the shot grows, the performance of FADI is slightly behind FSCE [23], we conjecture by unfreezing more layers in the feature extractor, the model can learn a more compact feature space for novel classes as it exploits less base knowledge, and it can better represent the real distribution than the distribution imitated by our association. However, it is not available when the shot is low as the learned distribution will over-fit training samples. ",
814
+ "bbox": [
815
+ 173,
816
+ 433,
817
+ 825,
818
+ 545
819
+ ],
820
+ "page_idx": 7
821
+ },
822
+ {
823
+ "type": "text",
824
+ "text": "4.4 Ablation Study ",
825
+ "text_level": 1,
826
+ "bbox": [
827
+ 174,
828
+ 561,
829
+ 316,
830
+ 577
831
+ ],
832
+ "page_idx": 7
833
+ },
834
+ {
835
+ "type": "text",
836
+ "text": "In this section, we conduct a thorough ablation study of each component of our method. We first analyze the performance contribution of each component, and then we show the effect of each component and why they work. Unless otherwise specified, all ablation results are reported on Novel Split 1 of Pascal VOC benchmark based on our implementation of TFA [28]. ",
837
+ "bbox": [
838
+ 174,
839
+ 588,
840
+ 825,
841
+ 643
842
+ ],
843
+ "page_idx": 7
844
+ },
845
+ {
846
+ "type": "text",
847
+ "text": "Component Analysis Table 3 shows the effectiveness of each component, i.e., Association, Disentangling, and Set-Specialized Margin Loss in our method. It is noted that when we study association without disentangling, we train a modified TFA model by replacing the $F C _ { 2 }$ with $\\bar { F C _ { 2 } } ^ { \\prime }$ after the association step. Since the association confuses the novel and its assigned base class, the performance of only applying association is not very significant. However, when equipped with disentangling, it can significantly boost the nAP50 by 3.6, 4.0, 3.1 for $K { = } 1$ , 3, 5, respectively. The set-specialized margin loss shows it is generally effective for both the baseline and the proposed ‘association $^ +$ disentangling’ framework. Applying margin loss improves ‘association $^ +$ disentangling’ by 5.4, 3,9, 2.5. With all 3 components, our method totally achieves a gain of 9.0, 7.9, 5.6. ",
848
+ "bbox": [
849
+ 174,
850
+ 660,
851
+ 825,
852
+ 785
853
+ ],
854
+ "page_idx": 7
855
+ },
856
+ {
857
+ "type": "text",
858
+ "text": "Semantic-Guided Association The assigning policy is a key component in the association step. To demonstrate the effectiveness of our semantic-guided assigning with WordNet [20], we explore different assign policies. The results are shown in Table 5. Random means we randomly assign a base class to a novel class. Human denotes manually assigning based on human knowledge. Visual denotes associating base and novel classes by visual similarity. Specifically, we regard the weights of the base classifier as prototype representations of base classes. As a result, the score prediction of novel instances on base classifier can be viewed as the visual similarity. Top1 and top2 mean the strategies that we assign each novel class to the most or second similar base classes by Eq. 1. In such cases, one base class may be assigned to two different novel classes (\"horse\" is assigned to \"bird\" and \"cow\"), we remove such duplication by taking the similarity as the priority of assigning. Specifically, the base and novel classes with the highest similarity will be associated, and they will be removed from the list of classes to be associated. Then we rank the similarity of the remaining classes and choose the new association. We can learn that top1 is better than random and top2 by 4.7 and 3.1, which suggests semantic similarity has a strong implication with performance. By removing the duplication, we further obtain a 0.6 gain. ",
859
+ "bbox": [
860
+ 174,
861
+ 800,
862
+ 825,
863
+ 911
864
+ ],
865
+ "page_idx": 7
866
+ },
867
+ {
868
+ "type": "image",
869
+ "img_path": "images/6935a5f1df078ac11d06c8d0fd5d7a255b940747b93f1d357f8dc4b0fc45a7e4.jpg",
870
+ "image_caption": [
871
+ "Figure 4: Score confusion matrices of different methods on Pascal VOC novel split1. The element in $_ { i }$ -th row, $j$ -th column represents for samples of novel class $i$ , the score prediction on class $j$ . Brighter colors indicate higher scores. If class $_ { i }$ and $j$ are the same, this indicates a more accurate score prediction. Otherwise, it indicates a heavier confusion. The font color of classes represents the association relations, e.g., the associated pairs ‘bird’ and ‘dog’ have the same font color blue. "
872
+ ],
873
+ "image_footnote": [],
874
+ "bbox": [
875
+ 204,
876
+ 92,
877
+ 794,
878
+ 267
879
+ ],
880
+ "page_idx": 8
881
+ },
882
+ {
883
+ "type": "table",
884
+ "img_path": "images/7e72fdcca12835663f3370c7c412e207de323c694ab49d7b270238b7813106a3.jpg",
885
+ "table_caption": [
886
+ "Table 6: Comparison of visual and semantic similarity. "
887
+ ],
888
+ "table_footnote": [],
889
+ "table_body": "<table><tr><td>Metric</td><td colspan=\"3\">Novel Split1</td><td colspan=\"3\">Novel Split2</td><td colspan=\"3\">Novel Split3</td></tr><tr><td></td><td>1</td><td>3</td><td>5</td><td>1</td><td>3</td><td>5</td><td>1</td><td>3</td><td>5</td></tr><tr><td>Visual Semantic</td><td>43.3 44.9</td><td>49.3 50.3</td><td>56.4 56.8</td><td>22.5 26.1</td><td>37.2 38.5</td><td>39.3 40.1</td><td>31.8 37.1</td><td>43.1 45.0</td><td>50.7 51.5</td></tr></table>",
890
+ "bbox": [
891
+ 174,
892
+ 352,
893
+ 611,
894
+ 411
895
+ ],
896
+ "page_idx": 8
897
+ },
898
+ {
899
+ "type": "image",
900
+ "img_path": "images/0c4a3a9bca601c8aa28deeefc6a5f2902047cc4f4cd9949c8f8e19616309d725.jpg",
901
+ "image_caption": [
902
+ "Figure 5: Examples of co-occurance "
903
+ ],
904
+ "image_footnote": [],
905
+ "bbox": [
906
+ 643,
907
+ 353,
908
+ 792,
909
+ 410
910
+ ],
911
+ "page_idx": 8
912
+ },
913
+ {
914
+ "type": "text",
915
+ "text": "",
916
+ "bbox": [
917
+ 173,
918
+ 448,
919
+ 825,
920
+ 545
921
+ ],
922
+ "page_idx": 8
923
+ },
924
+ {
925
+ "type": "text",
926
+ "text": "Set-Specialized Margin Loss Table 4 compares our margin loss with Arcface [5] and CosFace [27]. It can be shown that directly applying these two margin losses will harm the performance. But the degeneration of performance can be reserved by only applying to samples of novel classes. This rescues Arcface from 37.9 to 44.3, Cosface from 38.9 to 44.2. Nevertheless, they are still inferior to our margin loss by 2.0. Detailed hyper-parameter study is described in the supplementary materials. ",
927
+ "bbox": [
928
+ 174,
929
+ 560,
930
+ 825,
931
+ 631
932
+ ],
933
+ "page_idx": 8
934
+ },
935
+ {
936
+ "type": "text",
937
+ "text": "Complementarity between Association and Discrimination Figure 4 shows the score confusion matrices of different methods. We can see that there exists an inherent confusion between some novel and base classes, e.g. in the left top figure, \"cow\" is confused most with \"sheep\" and then \"horse\". However, our association biases such confusion and enforces \"cow\" to be confused with its more semantic similar class \"horse\", which demonstrates the association step can align the feature distribution of the associated pairs. On the other hand, thanks to the discrimination step, the confusion incurred by association is effectively alleviated and overall it shows less confusion than TFA (the second column of Figure 4). Moreover, our FADI yields significantly higher score predictions than TFA, which confirms the effectiveness of disentangling and set-specialized margin loss. ",
938
+ "bbox": [
939
+ 174,
940
+ 645,
941
+ 825,
942
+ 771
943
+ ],
944
+ "page_idx": 8
945
+ },
946
+ {
947
+ "type": "text",
948
+ "text": "Superiority of Semantic Similarity over Visual Similarity Table 5 demonstrates semantic similarity works better than visual similarity. Here the weights of the base classifier as prototype representations of base classes. Thus, we take the score prediction of novel instances on base classifier as the visual similarity. However, we find it sometimes can be misleading, especially when a novel instance co-occurrent with a base instance, e.g., ‘cat’ sits on a ‘chair’, ‘person’ rides a ‘bike’ as shown in Figure 5. Such co-occurrence deceives the base classifier that ‘cat’ is similar to ‘chair’ and ‘bike’ is similar to ‘person’, which makes the visual similarity not reliable under data scarcity scenarios. As shown in Table 6, when the shot grows, the performance gap between semantic and visual can be reduced by a more accurate visual similarity measurement. ",
949
+ "bbox": [
950
+ 174,
951
+ 786,
952
+ 825,
953
+ 911
954
+ ],
955
+ "page_idx": 8
956
+ },
957
+ {
958
+ "type": "text",
959
+ "text": "5 Conclusion ",
960
+ "text_level": 1,
961
+ "bbox": [
962
+ 174,
963
+ 89,
964
+ 299,
965
+ 106
966
+ ],
967
+ "page_idx": 9
968
+ },
969
+ {
970
+ "type": "text",
971
+ "text": "In this paper, we propose Few-shot object detection via Association and DIscrimination (FADI). In the association step, to learn a compact intra-class structure, we selectively associate each novel class with a well-trained base class based on their semantic similarity. The novel class readily learns to align its intra-class distribution to the associated base class. In the discrimination step, to ensure the inter-class separability, we disentangle the classification branches for base and novel classes, respectively. A set-specialized margin loss is further imposed to enlarge the inter-class distance. Experiments results demonstrate that FADI is a concise yet effective solution for FSOD. ",
972
+ "bbox": [
973
+ 174,
974
+ 122,
975
+ 825,
976
+ 219
977
+ ],
978
+ "page_idx": 9
979
+ },
980
+ {
981
+ "type": "text",
982
+ "text": "Acknowledgements. This research was conducted in collaboration with SenseTime. This work is supported by GRF 14203518, ITS/431/18FX, CUHK Agreement TS1712093, Theme-based Research Scheme 2020/21 (No. T41-603/20- R), NTU NAP, RIE2020 Industry Alignment Fund – Industry Collaboration Projects (IAF-ICP) Funding Initiative, and Shanghai Committee of Science and Technology, China (Grant No. 20DZ1100800). ",
983
+ "bbox": [
984
+ 174,
985
+ 226,
986
+ 826,
987
+ 295
988
+ ],
989
+ "page_idx": 9
990
+ },
991
+ {
992
+ "type": "text",
993
+ "text": "References ",
994
+ "text_level": 1,
995
+ "bbox": [
996
+ 174,
997
+ 316,
998
+ 266,
999
+ 333
1000
+ ],
1001
+ "page_idx": 9
1002
+ },
1003
+ {
1004
+ "type": "text",
1005
+ "text": "[1] Zhaowei Cai and Nuno Vasconcelos. Cascade r-cnn: Delving into high quality object detection. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. 1 \n[2] Hao Chen, Yali Wang, Guoyou Wang, and Yu Qiao. Lstd: A low-shot transfer detector for object detection. In AAAI Conference on Artificial Intelligence, 2018. 7 \n[3] Kai Chen, Jiaqi Wang, Jiangmiao Pang, Yuhang Cao, Yu Xiong, Xiaoxiao Li, Shuyang Sun, Wansen Feng, Ziwei Liu, Jiarui Xu, Zheng Zhang, Dazhi Cheng, Chenchen Zhu, Tianheng Cheng, Qijie Zhao, Buyu Li, Xin Lu, Rui Zhu, Yue Wu, Jifeng Dai, Jingdong Wang, Jianping Shi, Wanli Ouyang, Chen Change Loy, and Dahua Lin. MMDetection: Open mmlab detection toolbox and benchmark. arXiv preprint arXiv:1906.07155, 2019. 7, 12 \n[4] Wei-Yu Chen, Yen-Cheng Liu, Zsolt Kira, Yu-Chiang Frank Wang, and Jia-Bin Huang. A closer look at few-shot classification. In International Conference on Learning Representations, 2019. 3 \n[5] Jiankang Deng, Jia Guo, Niannan Xue, and Stefanos Zafeiriou. Arcface: Additive angular margin loss for deep face recognition. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. 3, 6, 8, 9 \n[6] Guneet S Dhillon, Pratik Chaudhari, Avinash Ravichandran, and Stefano Soatto. A baseline for few-shot image classification. arXiv preprint arXiv:1909.02729, 2019. 3 \n[7] M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The pascal visual object classes (voc) challenge. International Journal of Computer Vision, 88(2):303–338, June 2010. 2, 7, 12 \n[8] Qi Fan, Wei Zhuo, Chi-Keung Tang, and Yu-Wing Tai. Few-shot object detection with attention-rpn and multi-relation detector. In IEEE Conference on Computer Vision and Pattern Recognition, 2020. 3 \n[9] Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In International Conference on Machine Learning, 2017. 3 \n[10] Bharath Hariharan and Ross Girshick. Low-shot visual recognition by shrinking and hallucinating features. In IEEE International Conference on Computer Vision, 2017. 3 \n[11] Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross Girshick. Mask r-cnn. In IEEE International Conference on Computer Vision, 2017. 1 \n[12] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770–778, 2016. \n[13] Bingyi Kang, Zhuang Liu, Xin Wang, Fisher Yu, Jiashi Feng, and Trevor Darrell. Few-shot object detection via feature reweighting. In IEEE International Conference on Computer Vision, 2019. 2, 3, 7 \n[14] Leonid Karlinsky, Joseph Shtok, Sivan Harary, Eli Schwartz, Amit Aides, Rogerio Feris, Raja Giryes, and Alex M Bronstein. Repmet: Representative-based metric learning for classification and few-shot object detection. In IEEE International Conference on Computer Vision, 2019. 2, 3, 7 \n[15] Kwonjoon Lee, Subhransu Maji, Avinash Ravichandran, and Stefano Soatto. Meta-learning with differentiable convex optimization. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. 3 \n[16] Dekang Lin et al. An information-theoretic definition of similarity. In International Conference on Machine Learning, 1998. 4 \n[17] Tsung-Yi Lin, Piotr Dollár, Ross B Girshick, Kaiming He, Bharath Hariharan, and Serge J Belongie. Feature pyramid networks for object detection. In IEEE Conference on Computer Vision and Pattern Recognition, 2017. 7 \n[18] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In European Conference on Computer Vision, 2014. 2, 7, 12 \n[19] Weiyang Liu, Yandong Wen, Zhiding Yu, Ming Li, Bhiksha Raj, and Le Song. Sphereface: Deep hypersphere embedding for face recognition. In IEEE Conference on Computer Vision and Pattern Recognition, 2017. 3, 6 \n[20] George A Miller. Wordnet: a lexical database for english. Communications of the ACM. 4, 8 \n[21] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In Advances in Neural Information Processing Systems, 2015. 1, 5, 7 \n[22] Jake Snell, Kevin Swersky, and Richard S Zemel. Prototypical networks for few-shot learning. In Advances in Neural Information Processing Systems, 2017. 3 \n[23] Bo Sun, Banghuai Li, Shengcai Cai, Ye Yuan, and Chi Zhang. Fsce: Few-shot object detection via contrastive proposal encoding. In IEEE Conference on Computer Vision and Pattern Recognition, 2021. 2, 3, 7, 8 \n[24] Flood Sung, Yongxin Yang, Li Zhang, Tao Xiang, Philip HS Torr, and Timothy M Hospedales. Learning to compare: Relation network for few-shot learning. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. 3 \n[25] Laurens Van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of machine learning research, 2008. 5 \n[26] Oriol Vinyals, Charles Blundell, Timothy Lillicrap, Koray Kavukcuoglu, and Daan Wierstra. Matching networks for one shot learning. In Advances in Neural Information Processing Systems, 2016. 3 \n[27] Hao Wang, Yitong Wang, Zheng Zhou, Xing Ji, Dihong Gong, Jingchao Zhou, Zhifeng Li, and Wei Liu. Cosface: Large margin cosine loss for deep face recognition. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. 3, 6, 8, 9 \n[28] Xin Wang, Thomas E. Huang, Trevor Darrell, Joseph E Gonzalez, and Fisher Yu. Frustratingly simple few-shot object detection. In International Conference on Machine Learning, 2020. 2, 3, 7, 8 \n[29] Yu-Xiong Wang, Ross Girshick, Martial Hebert, and Bharath Hariharan. Low-shot learning from imaginary data. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. 3 \n[30] Yu-Xiong Wang, Deva Ramanan, and Martial Hebert. Meta-learning to detect rare objects. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. 7 \n[31] Jiaxi Wu, Songtao Liu, Di Huang, and Yunhong Wang. Multi-scale positive sample refinement for few-shot object detection. In European Conference on Computer Vision, 2020. 2, 3, 7 \n[32] Yang Xiao and Renaud Marlet. Few-shot object detection and viewpoint estimation for objects in the wild. In European Conference on Computer Vision, 2020. 2, 3 \n[33] Chen Xing, Negar Rostamzadeh, Boris Oreshkin, and Pedro O O Pinheiro. Adaptive cross-modal few-shot learning. Advances in Neural Information Processing Systems, 2019. 3 \n[34] Caixia Yan, Qinghua Zheng, Xiaojun Chang, Minnan Luo, Chung-Hsing Yeh, and Alexander G Hauptman. Semantics-preserving graph propagation for zero-shot object detection. IEEE Transactions on Image Processing, 2020. 3 \n[35] Xiaopeng Yan, Ziliang Chen, Anni Xu, Xiaoxi Wang, Xiaodan Liang, and Liang Lin. Meta r-cnn: Towards general solver for instance-level low-shot learning. In IEEE International Conference on Computer Vision, 2019. 2, 3, 7 \n[36] Yukuan Yang, Fangyu Wei, Miaojing Shi, and Guoqi Li. Restoring negative information in few-shot object detection. In Advances in Neural Information Processing Systems, 2020. 3 \n[37] Ze Yang, Yali Wang, Xianyu Chen, Jianzhuang Liu, and Yu Qiao. Context-transformer: tackling object confusion for few-shot detection. In AAAI Conference on Artificial Intelligence, 2020. 3 \n[38] Chenchen Zhu, Fangyi Chen, Uzair Ahmed, and Marios Savvides. Semantic relation reasoning for shotstable few-shot object detection. In IEEE Conference on Computer Vision and Pattern Recognition, 2021. 7 ",
1006
+ "bbox": [
1007
+ 173,
1008
+ 334,
1009
+ 826,
1010
+ 912
1011
+ ],
1012
+ "page_idx": 9
1013
+ },
1014
+ {
1015
+ "type": "text",
1016
+ "text": "",
1017
+ "bbox": [
1018
+ 171,
1019
+ 92,
1020
+ 826,
1021
+ 609
1022
+ ],
1023
+ "page_idx": 10
1024
+ },
1025
+ {
1026
+ "type": "text",
1027
+ "text": "Checklist ",
1028
+ "text_level": 1,
1029
+ "bbox": [
1030
+ 174,
1031
+ 635,
1032
+ 254,
1033
+ 651
1034
+ ],
1035
+ "page_idx": 10
1036
+ },
1037
+ {
1038
+ "type": "text",
1039
+ "text": "1. For all authors... ",
1040
+ "bbox": [
1041
+ 214,
1042
+ 660,
1043
+ 339,
1044
+ 674
1045
+ ],
1046
+ "page_idx": 10
1047
+ },
1048
+ {
1049
+ "type": "text",
1050
+ "text": "(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] \n(b) Did you describe the limitations of your work? [Yes] See Appendix 1. \n(c) Did you discuss any potential negative societal impacts of your work? [N/A] \n(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes] ",
1051
+ "bbox": [
1052
+ 238,
1053
+ 679,
1054
+ 825,
1055
+ 767
1056
+ ],
1057
+ "page_idx": 10
1058
+ },
1059
+ {
1060
+ "type": "text",
1061
+ "text": "2. If you are including theoretical results... ",
1062
+ "bbox": [
1063
+ 215,
1064
+ 771,
1065
+ 493,
1066
+ 785
1067
+ ],
1068
+ "page_idx": 10
1069
+ },
1070
+ {
1071
+ "type": "text",
1072
+ "text": "(a) Did you state the full set of assumptions of all theoretical results? [N/A] (b) Did you include complete proofs of all theoretical results? [N/A] ",
1073
+ "bbox": [
1074
+ 238,
1075
+ 789,
1076
+ 736,
1077
+ 819
1078
+ ],
1079
+ "page_idx": 10
1080
+ },
1081
+ {
1082
+ "type": "text",
1083
+ "text": "3. If you ran experiments... ",
1084
+ "bbox": [
1085
+ 212,
1086
+ 823,
1087
+ 393,
1088
+ 837
1089
+ ],
1090
+ "page_idx": 10
1091
+ },
1092
+ {
1093
+ "type": "text",
1094
+ "text": "(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [No] We will release the code to ensure strict reproducibility upon the paper accepted. \n(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] See Section 4.1, Appendix 2 and Appendix 3. \n(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [No] \n(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] See Appendix 2. ",
1095
+ "bbox": [
1096
+ 238,
1097
+ 840,
1098
+ 825,
1099
+ 911
1100
+ ],
1101
+ "page_idx": 10
1102
+ },
1103
+ {
1104
+ "type": "text",
1105
+ "text": "",
1106
+ "bbox": [
1107
+ 238,
1108
+ 92,
1109
+ 825,
1110
+ 150
1111
+ ],
1112
+ "page_idx": 11
1113
+ },
1114
+ {
1115
+ "type": "text",
1116
+ "text": "4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... ",
1117
+ "bbox": [
1118
+ 210,
1119
+ 154,
1120
+ 825,
1121
+ 169
1122
+ ],
1123
+ "page_idx": 11
1124
+ },
1125
+ {
1126
+ "type": "text",
1127
+ "text": "(a) If your work uses existing assets, did you cite the creators? [Yes] Pascal VOC [7], MS COCO [18], MMDetection [3] \n(b) Did you mention the license of the assets? [No] \n(c) Did you include any new assets either in the supplemental material or as a URL? [No] \n(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [No] \n(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [No] ",
1128
+ "bbox": [
1129
+ 238,
1130
+ 172,
1131
+ 825,
1132
+ 294
1133
+ ],
1134
+ "page_idx": 11
1135
+ },
1136
+ {
1137
+ "type": "text",
1138
+ "text": "5. If you used crowdsourcing or conducted research with human subjects... ",
1139
+ "bbox": [
1140
+ 214,
1141
+ 297,
1142
+ 705,
1143
+ 313
1144
+ ],
1145
+ "page_idx": 11
1146
+ },
1147
+ {
1148
+ "type": "text",
1149
+ "text": "(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A] \n(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A] \n(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A] ",
1150
+ "bbox": [
1151
+ 238,
1152
+ 316,
1153
+ 825,
1154
+ 406
1155
+ ],
1156
+ "page_idx": 11
1157
+ }
1158
+ ]
parse/train/XjIm8hOCxTm/XjIm8hOCxTm_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/XjIm8hOCxTm/XjIm8hOCxTm_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/qWtmNpgjD5K/qWtmNpgjD5K.md ADDED
@@ -0,0 +1,384 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Impossibility results for fair representations
2
+
3
+ Anonymous Author(s)
4
+ Affiliation
5
+ Address
6
+ email
7
+
8
+ # Abstract
9
+
10
+ 1 With the growing awareness to fairness in machine learning and the realization
11
+ 2 of the central role that data representation has in data processing tasks, there is
12
+ 3 an obvious interest in notions of fair data representations. We provide a formal
13
+ 4 framework for examining the fairness of data representations through the lens of
14
+ 5 their effect on decisions (mainly classification) made based on data represented that
15
+ 6 way. Using that framework, we prove that several desiderata for fair representations
16
+ 7 cannot be achieved. While some of our conclusions are intuitive, we formulate
17
+ 8 (and prove) crisp statements of such impossibilities, often contrasting impressions
18
+ 9 conveyed by many recent works on fair representations.
19
+
20
+ # 10 1 Introduction
21
+
22
+ 11 Automated decision making has become more and more successful over the last few decades and
23
+ 12 has therefore been used in an increasing number of domains, either as stand alone, or to support
24
+ 13 human decision makers. This includes many sensitive domains which significantly impact people’s
25
+ 14 livelihoods, such as loan applications, university admissions, recidivism predictions, or insurance rate
26
+ 15 settings. It has been found that many such decision tools have, often unintentionally, biases against
27
+ 16 minority groups, and therefore lead to discrimination. In response to these concerns, the machine
28
+ 17 learning research community has been devoting effort to developing clear notions of fair decision
29
+ 18 making, and coming up with algorithms for implementing fair machine learning.
30
+ 20 A common approach to address the important issue of fair algorithmic decision making is through fair
31
+ 21 data representation. The idea is that some regulator or a responsible data curator transforms collected
32
+ 22 data to a format (or representation), that can then be used for solving downstream classification tasks
33
+ 23 providing guarantees of fairness. This approach was proposed by the seminal paper of Zemel et
34
+ 24 al. [15]. In their words: "our intermediate representation can be used for other classification tasks
35
+ 25 (i.e., transfer learning is possible)"... "We further posit that such an intermediate representation is
36
+ 26 fundamental to progress in fairness in classification, since it is composable and not ad hoc; once
37
+ 27 such a representation is established, it can be used in a blackbox fashion to turn any classification
38
+ 28 algorithm into a fair classifier, by simply applying the classifer to the sanitized representation of
39
+ 29 the data". Many followup papers aim to realize this paradigm, solving technical and algorithmic
40
+ 30 issues [10, 6, 11, 14, 3] (to mention just a few). The main contribution of this paper is showing that,
41
+ 31 basically, it is impossible to achieve this goal. Namely, no data representation can guarantee that for
42
+ 32 every classification task a classifier trained on data under the given representation will be fair for
43
+ 33 that task. This impossibility applies even if one restricts the downstream tasks in question to share
44
+ 34 the same labeling rule, or for fairness notions like Odds Equality, to share the same marginal data
45
+ 35 distribution with the data on which the representation was trained. Our results answer negatively the
46
+ 36 main two questions posed in the discussion section of Creager et al. [3].
47
+ 37 While many papers in this domain propose algorithmic solutions to fairness related issues, the main
48
+ 38 contributions of this paper are conceptual. We believe that, to a much larger extent than many other
49
+ 39 facets of machine learning, fundamental concepts of fairness in machine learning require better
50
+ 40 understanding. Some basic questions are still far from being satisfactorily elucidated; What should
51
+ 41 be considered fair decision making? (various mutually incompatible notions have been proposed, but
52
+ 42 how to pick between them for a given real life application is far from being clarified). What is a fair
53
+ 43 data representation? To what extent should accuracy or other practical utilities be compromised for
54
+ 44 achieving fairness goals? and so on. The answers to these questions are not generic. They vary with
55
+ 45 the principles and the goals guiding the agents involved (decision makers, subjects of such a decision,
56
+ 46 policy regulators, etc.), as well as with what can be assumed regarding the underlying learning setup.
57
+ 47 We view these as the primary issues facing the field, deserving explicit research attention (in addition
58
+ 48 to the more commonly discussed algorithmic and optimization aspects). This is a theoretical work,
59
+ 49 our discussion is grounded in definitions and proofs rather than heuristics and experimental results.
60
+
61
+ # 50 1.1 What is fair representation?
62
+
63
+ 51 The term ‘fair data representation’ encompasses a wide range of different meanings. When word
64
+ 52 embeddings results in smaller distance between the vectors representing ‘woman’ and ‘nurse’ relative
65
+ 53 to the distance between the representations of ‘woman’ and ‘doctor’ and the other way around for
66
+ 54 ‘man’, is it an indication of bias in the representation or is it just a faithful reflection of a bias in
67
+ 55 society? Rather than delving into such issues, we discuss an arguably more concrete facet of data
68
+ 56 representation; We examine representation fairness from the perspective of its effect on the fairness
69
+ 57 of classification rules that agents using data represented that way may come up with. Such a view
70
+ 58 takes into consideration two setup characteristics:
71
+ 9 The objective of the agent using the data We distinguish three types of classification prediction
72
+ 0 agents (formal definitions of these aspects of fairness are provided in section 3.2):
73
+
74
+ Malicious - driven by a bias against a group of subjects. To protect against such an agent, a fair representation (or feature set) should be such that every classifier based on data represented that way is fair. This is apparently the most common approach to fair representations in the literature e.g., [15, 10].
75
+
76
+ Accuracy Driven - focusing on traditional measures of learning efficiency, ignoring fairness considerations. A representation is accuracy-driven fair if every loss minimizing classifier based on that representation is fair.
77
+
78
+ Fairness Driven - aiming to find a decision rule that is fair while maintaining meaningful accuracy. A representation is fairness-driven fair if there exists a loss minimizing (or an approximate minimizer) classifier based on that representation is fair.
79
+
80
+ 71 The notion of group fairness applied to the classification decisions The wide range of group fair
81
+ 72 ness notions (for classification) can be taxonomized along several dimensions: Does the
82
+ 73 notion depend on the ground truth classification or only on the agents decision (like demo
83
+ 74 graphic parity)? Is perfectly accurate decision (matching the ground truth classification)
84
+ 75 always considered fair (like in odds equality)? Does the fairness notion depend on unobserv
85
+ 76 able features (like intention or causality)? In this work we focus on fairness notions that
86
+ 77 are ground-truth-dependent, view the ground truth classification as fair and depend only on
87
+ 78 observable features. The decision which notion of fairness one wishes to abide by depends
88
+ 79 on societal goals and may vary from one task to another and is outside the scope of this
89
+ 80 paper. Just the same, let us briefly explain why the requirements listed above are natural in
90
+ 81 many situations.
91
+
92
+ The dependence on the ground truth classification is almost inevitable from a utilitarian perspective - taking into account the probability that a student succeed or fail when making acceptance decisions should not be considered unfair. Put more formally, whenever there is any correlation between membership and the ground truth classification, any classifier that is fair w.r.t. a notion that ignored the ground truth (like demographic parity) is bound to suffer prediction error proportional to that correlation.
93
+
94
+ Viewing perfectly accurate decisions as fair can be viewed as a distinction between notions that do or do not try to inflict affirmative action. It makes a lot of sense in tasks like conviction in a crime - if you convict all criminals and no one else, you should not be accused on unfairness.
95
+
96
+ Relying only on observable features fosters objectivity and allows scrutiny of the decisions made. Our running example of such a notion is odds equality [8], however our results hold as well for other common notions of fairness that meet the above conditions (like Calibrations Within Groups [9]).
97
+
98
+ # 1.2 Our results
99
+
100
+ We prove the following inherent limitations of notions of fair representations (under the above taxonomy):
101
+
102
+ 1. The impossibility to be task-independent. There is a host of literature proposing methods of coming up with data representation that guarantees the fairness of classifier based on that representation (e.g., [18, 3, 10, 12]). We elaborate on these works in our Previous Work section. Contrasting the impression conveyed by many such papers, we show that the ability to guarantee multi-task fairness is inherently limited. Much of that work addresses Demographic parity (DP). We prove that if two tasks have different marginal data distributions (that is, the distribution of unlabeled instances) and different success rates of the protected group, then no representation can guarantee that any non-trivial classifier trained on it satisfies DP for both. We show that the only classifiers that are guaranteed to satisfy any significant level of DP fairness w.r.t. all marginal distributions are the redundant constant functions. From a practical point of view, since DP fairness of some decision (say, acceptance to some university program) requires the ratio of positive decisions between groups to match the ratio of applicants from those groups, a representation that guarantees DP fairness cannot be a priory constructed - it must have access to the distribution of groups among applicants for that specific program. Furthermore, we prove that for every fixed marginal data distribution, if two ground truth classifications differ with non-zero probability over it, there can be no data representation that enjoys Odds Equality fairness and accuracy with respect to both tasks over that shared marginal distribution (except for the redundant case where the success rates of both groups are equal for both tasks). These results answer negatively the main two open problems posed in the Discussion section of [3].
103
+
104
+ 2. The impossibility to evaluate the fairness contribution of a given feature devoid of the other features used (again, for each agent objective and several common group fairness notions).
105
+
106
+ 3. The inherent dependence of the effect on fairness of adding/deleting a feature on the type of agent using the representation (on top of the above mentioned dependence on other features), even when the feature in question does not correlate with membership in the protected group.
107
+
108
+ (These come on top of the obvious dependence on the notion of fair classification sought).
109
+
110
+ Concerning potential negative societal impact: We cannot foresee any potential negative societal impact of our work. The main message of this paper is a cautionary statement. We alert potential users that approaches based on task independent fair representations cannot guarantee the fairness of arbitrary predictors based on them. As such, we are only guarding against potential negative impact of previously published work.
111
+
112
+ Our paper is organized as follows: Section 2 gives an overview of the related work. Section 3 introduces our setup including our taxonomy for fair representations. Section 4 contains our main results on the impossibility of generic fairness of a representation. Section 5 addressed the impossibility of defining the fairness effect of a single feature without considering the other components of a representation. Section 6 briefly shows the impossibility of having fair representations w.r.t. Predictive Rate Parity. Section 7 is our concluding remarks.
113
+
114
+ 136 We defer proofs to the appendix.
115
+
116
+ # 37 2 Related Work
117
+
118
+ Since our paper goes against messages conveyed by many previous papers, we wish to address in detail more related works than space here allows. We therefore provide a more elaborate section on previous work in the supplementary material.
119
+
120
+ Much of the recent work on fair representation for learning classifiers focuses on algorithms. (and demonstrating the viability of those algorithms though experimental results) [15, 10, 17, 1, 16]. As explained before, our focus is different. We discuss what should be considered fair representation in
121
+
122
+ 144 that context, what is the scope of such notions and what are the inherent limitations of defining such
123
+ 145 representations.
124
+ 146 Almost all the work on fair representations focuses on the demographic parity (DP) notion of fairness
125
+ 147 [6, 10, 15, 14]. Not having to take ground truth into account makes this notion independent of the
126
+ 148 classification task carrying both advantages and limitations. However, any positive result in these
127
+ 149 papers assumes that the marginal data distribution is available to the designer of the fair representation.
128
+ 150 Such an assumption severely restricts the applicability of such representations. To achieve DP fairness,
129
+ 151 a classifier has to induce success ratio between the two groups that match the ratio between these
130
+ 152 groups in the input data. However, that ratio, say a set of applicants for a bank loan or to some
131
+ 153 university program varies from one application to another and cannot be determined a priori. Our
132
+ 154 results on this inherent limitation of fair representation for DP (see section 4) do not seem to have
133
+ 155 been stated before.
134
+ 156 When the data marginal distribution is fixed, and available to the designer of a representation, DP
135
+ 157 fairness is possible. However, in such a setup, we show that fairness with respect to notions of fairness
136
+ 158 that do rely on the correct ground truth, such as equalized odds (EO) [8], cannot be guaranteed for
137
+ 159 arbitrary tasks (see Section 4). This fact also has not been explicitly stated (and proved) before,
138
+ 160 although it seems that some of the previous work worried about it. Instead, previous work either
139
+ 161 focus only on DP fairness, or, when it comes to discuss other notions of fairness, the algorithms that
140
+ 162 design the representations are assumed to have access to task specific labeled data (e.g. [16, 2, 14, 5],
141
+ 163 which defies the goal of having a fixed representation that guarantees fairness for many tasks.
142
+ 164 The effect of the motivation of the decision maker using the representation on the fairness of the
143
+ 165 resulting decision rule has been considered by Madras et al. [10] and Zhang et al. [16]. These papers
144
+ 166 identify two motivations. The first is malicious, which is the intent to discriminate without regard
145
+ 167 for accuracy. The second is accuracy-driven, which is the intent to maximize accuracy. We address
146
+ 168 these effects as part of our taxonomy of notions of fair representations. Additionally, we discuss
147
+ 169 fairness-driven agents that aim to achieve fairness while maintaining some level of accuracy.
148
+ 170 A natural question that arises in this context is about the inherent trade-offs between fairness and
149
+ 171 accuracy. When the notion of fairness is demographic parity, such trade-offs are clearly expected -
150
+ 172 they surface whenever there exists correlation between membership in the protected group and the
151
+ 173 ground truth classification. Zhao et al. [18] and Mcnamara et al. [11] analyze such scenarios and
152
+ 174 demonstrate situations in which there exists a more accurate and more fair classifier based on an
153
+ 175 original representation than any classifier built using a learnt representation.
154
+ 176 The question of feature deletion has also been considered in real world examples, such as in the "ban
155
+ 177 the box" policy which disallowed employers using criminal history in hiring decisions [4]. The effect
156
+ 178 of allowing or disallowing features on fairness has been studied before, for example in Grgic-Hlaca et
157
+ 179 al. [7]. However in previous works, the effect of a feature on fairness, has been discussed in isolation.
158
+ 180 In contrast, we show that fairness of a feature should not be considered in isolation, but should also
159
+ 181 take into account the remaining features available.
160
+
161
+ # 182 3 Formal Setup
162
+
163
+ 183 We consider a binary classification problem with label set $\{ 0 , 1 \}$ over a domain $X$ of instances we
164
+ 184 wish to classify, e.g. individuals applying for a loan. We assume the task to be given by some
165
+ 185 distribution $P$ over $X \times \{ 0 , 1 \}$ from which instances are sampled i.i.d. We denote the ground-truth
166
+ 186 labeling rule as $t : X \to [ 0 , 1 ]$ . We will think of the label 1 as denoting ‘qualified’ and the label 0 as
167
+ 187 ‘unqualified’ and $t ( x ) = P [ y = 1 | x ]$ . For concreteness, we focus here on the case of deterministic
168
+ 188 labeling (that is $t : X \{ 0 , 1 \}$ ). Most of our discussion can readily be extended to the probabilistic
169
+ 189 labeling case. In a slight abuse of notation we will sometimes use $t ( w )$ to indicate the label coordinate
170
+ 190 of an instance $w \in \bar { X } \times \{ 0 , 1 \}$
171
+
172
+ A data representation is determined by a mapping $F : X Z$ , for some set $Z$ , and the learner only sees $F ( x )$ for any instance $x$ (both in the training and the test/decision stages).We denote the hypothesis class of all feature based decision rules as $\mathcal { H } _ { F } = \{ h : Z \{ 0 , 1 \} \}$ . As a loss function we consider a weighted sum of false positives and false negatives, i.e.
173
+
174
+ $$
175
+ l ^ { \alpha } ( h , x , y ) = \left\{ { \begin{array} { l r } { \alpha , } & { i f h ( x ) = 0 , y = 1 } \\ { 1 - \alpha , } & { i f h ( x ) = 1 , y = 0 } \\ { 0 , } & { o t h e r w i s e } \end{array} } \right.
176
+ $$
177
+
178
+ for some weight 191 $\alpha \in ( 0 , 1 )$ . We denote the true risk with respect to this loss as $L _ { P } ^ { \alpha }$ and the empirical risk as 192 $L _ { S } ^ { \alpha }$ .
179
+
180
+ # 3.1 Notions of group fairness
181
+
182
+ For our fairness analysis we assume the population $X$ to be partitioned into two subpopulation $A$ and $D$ (namely, we restrict our discussion the case of one binary protected attribute). We sometimes use a function notation $G : X \{ A , D \}$ to indicate the group-membership of an instance. Of course in reality there are often many protected attributes with more than two values. However, as our goal is to show limitations and impossibility results for fair representation learning, it suffices to only consider one binary protected attribute – the same impossibilities readily follow for the more complex settings.
183
+
184
+ We now define two widely used notions of group-fairness that we will refer to throughout the paper, namely, equalized odds and demographic parity. In the following we will denote with $X _ { g , l }$ the subset of $X$ with label $l$ and group membership $g$ , i.e. $X _ { g , l } = X \cap t ^ { - 1 } ( l ) \cap G ^ { - 1 } ( g )$ .
185
+
186
+ 03 Definition 1 (Group fairness; Equalized odds) The notion of group-fairness we will focus on in
187
+ 204 this paper is the ground-truth-dependent notion of odds equality as introduced by $I ^ { g } { \cal I }$ .
188
+
189
+ A classifier h is considered fair w.r.t. to odds equality $( L ^ { E O } )$ and a distribution $P$ if for $x \sim P$ we have the statistical independence $h ( x ) \perp \perp G ( x ) | t ( x )$ . For $g \in \{ A , D \}$ let the false positive rate and the false negative rate be defined as $F P R _ { g } ( h , t , P ) = \mathbb { P } _ { x \sim P } [ h ( x ) = 1 | x \in X _ { g , 0 } ]$ and $F N R _ { g } ( h , t , P ) = \mathbb { P } _ { x \sim P } [ h ( x ) = 0 | x \in X _ { g , 1 } ]$ respectively. The $E O$ unfairness is given then by the sum of differences in false positive rate and false negative rate between groups:
190
+
191
+ $$
192
+ L _ { P } ^ { E O } ( h ) = \frac { 1 } { 2 } | F N R _ { A } - F N R _ { D } | + \frac { 1 } { 2 } | F P R _ { A } - F P R _ { D } | .
193
+ $$
194
+
195
+ 205 If we say a classifier is fair, without referring to any particular group-fairness notion, we mean
196
+ 206 fairness w.r.t. equalized odds.
197
+
198
+ Definition 2 (Demographic parity) $A$ classifier $h$ is considered fair w.r.t. to demographic parity $( L ^ { D P } )$ and a distribution $P$ if $h ( x )$ ⊥⊥ $G ( x )$ . The respective unfairness is given by difference in positive classification rates between groups
199
+
200
+ $$
201
+ \dot { L } _ { P } ^ { D P } ( h ) = | \bar { \mathbb { P } } _ { x \sim P } [ h ( x ) = 1 | G ( x ) = A ] \stackrel { \sim } { - } \mathbb { P } _ { x \sim P } [ h ( x ) = 1 | G ( x ) = D ] | .
202
+ $$
203
+
204
+ # 3.2 The role of the agent’s objective
205
+
206
+ We will phrase our definitions of representation fairness in terms of a general group fairness notion $L ^ { f a i r }$ with unfairness measure $L _ { P } ^ { f a \bar { i } r }$ .
207
+
208
+ We start by considering a malicious decision maker who tries to actively discriminate against one group. To protect against this kind of decision maker, we need to give a guarantee such that based on the feature set it is not possible to discriminate against one group. This corresponds to the notion of adversarial fairness.
209
+
210
+ Definition 3 (Adversarial fairness) A representation $F$ is considered to be adversarial fair w.r.t. the the adversarial unfairness of a representation distribution and group fairness objective $L ^ { f a i r }$ $F$ by , if every classifier $U _ { a d v } ( F ) = \operatorname* { m a x } _ { h \in \mathcal { H } _ { F } } L _ { P } ^ { f a i r } ( h )$ $h \in \mathcal { H } _ { F }$ is group-fair. We define .
211
+
212
+ Furthermore, we consider an accuracy-driven decision maker, who aims to label instances correctly and is agnostic about fairness. For this kind of decision maker, we only need to make sure that optimizing for correct classification results in a fair classifier. The following definition ensures that the Bayes optimal classifier for a representation is fair.
213
+
214
+ 225 Definition 4 (Accuracy-driven fairness) $A$ representation $F$ is considered to be accuracy-driven fair w.r.t. the fairness objective 226 $L ^ { f a i r }$ and distribution $P$ , if for every threshold $\alpha \in ( 0 , 1 )$ , every classifier 227 $h \in \mathcal { H } _ { F }$ with $\begin{array} { r } { L _ { P } ^ { \alpha } ( h ) = \operatorname* { m i n } _ { h \in \mathcal { H } _ { F } } L _ { P } ^ { \alpha } ( h ) } \end{array}$ is group-fair. The accuracy-driven unfairness for a par228 ticular threshold parameter $\alpha$ is given by $\begin{array} { r } { U _ { a c c } ^ { \alpha } ( \mathcal { F } ) = \operatorname* { m a x } \{ L _ { P } ^ { f a i r } ( h ) : h \in \arg \operatorname* { m i n } _ { h \in \mathcal { H } _ { F } } L _ { P } ^ { \alpha } ( h ) \} . } \end{array}$ 229 The general accuracy-driven unfairness is given by $U _ { a c c } ( \mathcal { F } ) = \operatorname* { m a x } _ { \alpha \in [ 0 , 1 ] } U _ { a c c } ^ { \alpha } ( \mathcal { F } )$ .
215
+
216
+ 230 We note that in cases where the decision maker does not have access to the distribution $P$ , but
217
+ 231 only to a labelled sample, this requirement is might not sufficient for guaranteeing that an accuracy
218
+ 232 driven decision maker arrives at a fair decision. In the Appendix we propose another fairness notion
219
+ 233 $\lambda$ -robustness) that formalizes the desired fairness guarantee for this scenario.
220
+
221
+ Lastly, we also consider a fairness-driven decision maker who actively tries to find a fair and 5 accurate decision rule, while maintaining some accuracy guarantees. For such a decision maker a representation should allow for fair and accurate decision rules. If a representation fulfills this requirement, we call it fairness-enabling.
222
+
223
+ Definition 5 $( \epsilon , \eta )$ -fairness-enabling representation) A representation $F$ is considered to be $( \epsilon , \eta )$ -fairness-enabling w.r.t. a fairness objective $L ^ { f a i r }$ , if there exists a classifier $\textit { h } \in \mathcal { H } _ { F }$ that such that $L _ { P } ^ { \alpha } ( h ) \leq \epsilon$ and $L _ { P } ^ { f a i r } ( h ) \leq \eta$ .
224
+
225
+ Our discussion focuses primarily on the case of malicious and indifferent decision makers. These notions of fair representation can be defined with respect to any group-fairness notion. In our paper we will mainly focus on the equalized odds notion of fairness [8]. We also note that all the above definitions can be given with respect to a fixed model $\mathcal { H }$ in a continuous space.
226
+
227
+ # 245 4 Can there be a generic fair representation?
228
+
229
+ 246 We address the existence of a multi-task fair representation. We prove that for the adversarial agent
230
+ 247 scenario (which is the setup that most fairness representation previous work is concerned with),
231
+ 48 it is impossible to have generic non-trivial fair representations - no useful representation can
232
+ 249 guarantee fairness for all "downstream" classification that are based on that representation (even if
233
+ 250 the ground truth classification remains unchanged and only the marginal may change between tasks).
234
+
235
+ We start by considering scenarios in which only the marginals shift between two tasks, e.g. two openings for different jobs, requiring similar skills, for which different pools of people would apply. Such a distribution shift can likely affect one group more than another and would thus affect the classification rates of both groups differently. We show that we cannot guarantee fairness of a fixed data presentation for general shifts of this kind, even for the simplest case of demographic parity.
236
+
237
+ Claim: 1 Pick any domain set $X$ and any partition of $X$ into non-empty subsets $A , D$ . For every non-constant function $f : X \{ 0 , 1 \}$ there exists a probability distribution $P$ over $X$ such that $f$ is arbitrarily $D P$ -unfair w.r.t. $P$ (say, $\tilde { L _ { P } ^ { D P } } ( h ) > 0 . 9 )$ .
238
+
239
+ In particular, when a shift in marginal occurs between tasks, fairness for previous tasks does not imply a fairness guarantee for a new task.
240
+
241
+ Proof: If $f$ is constant on any of the groups $A$ or $D$ then, since $f$ is not a constant over $X$ there is are points in the other group on which $f$ has the opposite value. Let $P$ assigns probability 0.5 to the group on which $f$ is constant and probability 0.5 to the set of points to which $f$ assigns the other value. Clearly $f$ fails $D P w . r . t .$ this $P$ . Otherwise, both values are assigned in both groups, so let $P$ assign probability 0.5 to $\{ x \in A : f ( x ) = 0 \}$ and probability 0.5 to $\{ x \in D : f ( x ) = 1 \}$ . Clearly, $f$ fails DP w.r.t. this $P$ .
242
+
243
+ Corollary 1 No data representation can guarantee the $D P$ fairness of any non-trivial classifier w.r.t. all possible data generating distributions (over any fixed domain set with any fixed partition into non-empty groups). That is, any non-constant representation $F ,$ cannot be adversarially fair with respect to $\check { L } ^ { D P }$ and any arbitrary task $P$ .
244
+
245
+ 271 Claim: 2 Pick any domain set $X$ and any partition of $X$ into non-empty subsets $A , D$ . For every
246
+ 272 non-constant function $f : X \to \{ 0 , 1 \}$ and every classifier $h : X \to \{ 0 , 1 \}$ such that $h \neq f$
247
+ 273 274 $L _ { P , f } ^ { E O } > 0 . 9$ a probability distribution . $P$ over $X$ such that $h$ is arbitrarily $E O$ -unfair w.r.t. $P , f$ , say
248
+
249
+ 275 Corollary 2 No data representation can guarantee EO fairness of any non-constant predictor based on that representation for all "downstream" classification learning tasks. That is, any non-constant representation $F ,$ cannot be adversarially fair with respect to $L ^ { E O }$ and any arbitrary task $P$ . This holds even if one restricts the claim to tasks sharing a fixed marginal data distribution.
250
+
251
+ We will now look at a slightly more restricted setting and analyse the case of multi-task learning, where instead of asking for a representation that is fair for every task, we only consider fairness with respect to a fixed (finite) set of tasks that we want to learn. We find that for the adversarial case, even this less ambitious goal is not achievable for generic tasks and the equalized odds notion of fairness.
252
+
253
+ We say a distribution 283 $P$ has equal success rates if $\begin{array} { r } { \frac { P ( X _ { A , 1 } ) } { P ( A ) } = \frac { P ( X _ { D , 1 } ) } { P ( D ) } } \end{array}$ .
254
+
255
+ Lemma 1 Let $P _ { 1 }$ and $P _ { 2 }$ be the distributions defining two different tasks with the same marginal $P _ { X } = P _ { 1 , X } = P _ { 2 , X }$ such that at least one of the tasks does not have equal success rates. Let $h _ { 1 } , h _ { 2 } : X \to \{ 0 , 1 \}$ be such that $L _ { P _ { 1 } } ( h _ { 1 } ) = \bar { L _ { P _ { 2 } } } ( h _ { 2 } ) = 0$ , and assume that tasks are non-negligibly different (namely, $\dot { L } _ { P _ { 1 } } ( h _ { 2 } ) \neq 0 ,$ ). Then, it cannot be the case that both $h _ { 1 }$ and $h _ { 2 }$ are $E O$ fair w.r.t. both $P _ { 1 }$ and $P _ { 2 }$ .
256
+
257
+ The proof (in the appendix) has a similar flavour as the proof of incompetability of different fairness notions of [9].
258
+
259
+ Theorem 1 There can be no data representation $F$ such that for some $P _ { 1 } , P _ { 2 }$ as above, the following criteria simultaneously hold:
260
+
261
+ 1. $\mathcal { F }$ is adversarially fair w.r.t. $P _ { 1 }$ and $E O$
262
+
263
+ 2. $\mathcal { F }$ is adversarially fair w.r.t. $P _ { 2 }$ and $E O$
264
+
265
+ 3. $\mathcal { F }$ allows for perfect accuracy w.r.t. to $P _ { 1 }$ and $P _ { 2 }$ , i.e. there are $h _ { 1 } , h _ { 2 }$ both expressible over the representation $F$ , such that $L _ { P _ { 1 } } ( h _ { 1 } ) = L _ { P _ { 2 } } ( h _ { 2 } ) = 0$ .
266
+
267
+ 7 This result follows directly from Lemma 1. Therefore, if the goal is to prevent discrimination from a possibly adversarial decision maker, while also enabling accurate prediction, each task requires its task-specific feature representation.
268
+
269
+ # 300 5 Fairness of a feature set vs. fairness of a feature
270
+
271
+ In this section we discuss feature deletion and its impact on the fairness of a representation. For this we assume our representation $F$ to consist of finitely many features $f _ { i } : X \to Y _ { i }$ i.e. for every $x \in X : F ( x ) \overset { \cdot } { = } \left( f _ { 1 } ( x ) , \ldots , f _ { n } ( x ) \right)$ and $Z = Y _ { 1 } \times \ldots \times Y _ { n }$ . We limit our discussion to cases where all $Y _ { i }$ are finite. While this assumption facilitates our analysis, we do not expect our results to be different in the cases of continuous features. We will denote the set of features as $F = \{ f _ { 1 } , \ldots , f _ { n } \}$ and will denote by $U _ { a d v } ( \mathcal { F } )$ and $U _ { a c c } ^ { \alpha } ( \mathcal { F } )$ the adversarial and accuracy-driven fairness of the representation induced by the feature set $\mathcal { F }$ respectively. We show that it is in general not possible to determine the effect a single feature has on the fairness of a representation without considering the full representation. This is the case even if our considered feature is not correlated with the protected attribute.
272
+
273
+ # 5.1 Opposing effects of a feature for accuracy-driven fairness of a representation
274
+
275
+ We start our discussion with accuracy-driven fairness w.r.t. equalized odds. In this case we show that the deletion of a feature $f$ can lead to an increase in accuracy-driven unfairness for some set of other given features $\mathcal { F }$ and that the deletion of the same feature $f$ can lead to a decrease in accuracy-driven unfairness for another set of other available features ${ \mathcal { F } } ^ { \prime }$ . This implies that the fairness of the feature $f$ cannot be evaluated without context. We show that this phenomena holds for a general class of 317 features that satisfy some non-triviality properties (That on the one hand do not reveal too much 318 information about group membership and labels (non-committing), and on the other hand does not 319 reveal identity when label and group information is given ( $k$ -anonymity [13])). The exact definitions 320 of these properties can be found in the appendix.
276
+
277
+ Theorem 2 (Context-relevance for fairness of features) For every 6-anonymous non-committing feature 322 $f$ , there exists a probability function $P$ over $X$ and feature sets $\mathcal { F }$ and ${ \mathcal { F } } ^ { \prime }$ such that:
278
+
279
+ • The accuracy-driven fairness w.r.t $L ^ { E O }$ , $P$ and $\alpha = 0 . 5$ of ${ \mathcal { F } } \cup \{ f \}$ is greater than that of $\mathcal { F }$ , i.e.
280
+
281
+ $$
282
+ U _ { a c c } ^ { \alpha } ( \mathcal { F } \cup \{ f \} ) < U _ { a c c } ^ { \alpha } ( \mathcal { F } )
283
+ $$
284
+
285
+ Thus, deleting $f$ in this context will increase unfairness.
286
+
287
+ • The accuracy-driven fairness w.r.t $L ^ { E O }$ , $P$ and $\alpha = 0 . 5$ of $\mathcal { F } ^ { \prime } \cup \{ f \}$ is less than that of ${ \mathcal { F } } ^ { \prime }$ , i.e.
288
+
289
+ $$
290
+ U _ { a c c } ^ { \alpha } ( { \mathcal { F } } ^ { \prime } \cup \{ f \} ) > U _ { a c c } ^ { \alpha } ( { \mathcal { F } } ^ { \prime } )
291
+ $$
292
+
293
+ Thus, deleting $f$ in this context will decrease unfairness.
294
+
295
+ This phenomenon can happen even if $\{ f \}$ is adversarially fair w.r.t. to $P$ and equalized odds.
296
+
297
+ # 5.2 The fairness of a feature for different notions of fairness
298
+
299
+ We will now briefly discuss the effect of a single feature on fairness for the cases of a malicious or a fairness-driven decision makers. In contrast to the accuracy-driven case, adding features has a monotone effect on the fairness of a fairness-driven and the malicious decision maker. As Theorem 3, adding any feature in the malicious case, will only give the decision maker more information and thus give the decision maker more chances of discrimination. Similarly in the fairness driven case, any feature will only give the decision maker another option for fair decision making (Theorem 4). However, the quantitative effect of adding a feature on the unfairness can still range from having no effect to achieving perfect fairness/unfairness for both the fairness-driven and the malicious case. As in the accuracy-driven case, we will show (Theorem 4 and Theorem 3) that it is impossible to evaluate the quantitative effect of a feature on the fairness of a representation without considering the context of other available features.
300
+
301
+ Theorem 3 1. For every distribution $P$ and feature $f$ , there exists a feature set $\mathcal { F }$ , such that adding $f$ will not impact the fairness of the distribution, e.g. $U _ { a d v } ( \mathcal { F } ) = U _ { a d v } ( \mathcal { F } \cup \{ f \} )$ .
302
+
303
+ 2. There exist distributions $P$ , features $f$ and ${ \mathcal { F } } ^ { \prime }$ , such that $U _ { a d v } ( \mathcal { F } ^ { \prime } ) = 0$ and $U _ { a d v } ( \{ f \} ) = 0$ but $U _ { a d v } ( { \mathcal { F } } ^ { \prime } \cup \{ f \} ) = 1$ .
304
+
305
+ Theorem 4 1. For any feature $f$ and any featureset $\mathcal { F }$ we have $U _ { a d v } ( \mathcal { F } ) \leq U _ { a d v } ( \mathcal { F } \cup \{ f \} )$ . Similarly, if the representation $\mathcal { F }$ is $( \epsilon , \eta )$ -fairness-enabling, the representation ${ \mathcal { F } } \cup \{ f \}$ is also $( \epsilon , \eta )$ -fairness-enabling.
306
+
307
+ 2. For every distribution $P$ and every feature $f$ , there exists a feature set $\mathcal { F }$ , such that ${ \mathcal { F } } \cup \{ f \}$ is $( \eta , \epsilon )$ -fairness-enabling, if and only if $\mathcal { F }$ is $( \epsilon , \eta )$ -fairness-enabling. Furthermore, there exists a distribution $P$ , a feature $f$ and $a$ feature set ${ \mathcal { F } } ^ { \prime }$ , such that both ${ \mathcal { F } } ^ { \prime }$ and $\{ f \}$ are not $( \epsilon , \eta )$ -fairness-enabling for any $\begin{array} { r } { \epsilon , \eta < \frac { 1 } { 2 } } \end{array}$ , but such that $\mathcal { F } ^ { \prime } \cup \{ f \}$ is $( 0 , 0 )$ -fairness-enabling.
308
+
309
+ While this section focused on fairness with respect to equalized odds, we note that many of these results can be replicated for other notions of fairness. For a more general version of Theorem 3, which takes into account other fairness notions, like demographic parity, we will refer the reader to the Appendix.
310
+
311
+ # 6 Impossibility of adversarially fair representations with respect to predictive rate parity
312
+
313
+ We now show that not all acceptable notions of group fairness always allow a adversarially fair representation, even in a single-task setting. One such notion is predictive rate parity.
314
+
315
+ Definition 6 (Predictive rate parity $( P R P ) ) A$ classifier $h$ is considered PRP fair w.r.t. to a marginal data distribution $P$ and true classification $t$ if the random variable $t ( x )$ is independent of the group membership, $G ( x )$ given the classification $h ( x )$ . We denote this fairness objective with $L ^ { P r e d }$ .
316
+
317
+ This theorem results from the fact that the classifier which maps every instance to label 1 is not fair w.r.t. to $L ^ { P r e d }$ if $P$ does not have equal success rates. The quantitative version of predictive rate parity as well as a more general version of Theorem 5, giving a characterization of adversarial fairness in the case of equal success rates can be found in the appendix.
318
+
319
+ # 370 7 Conclusion
320
+
321
+ In this paper we introduced a general taxonomy of notions of fair representation, taking into consideration both different objectives of decision makers using the representation, and different group fairness notions. Within this taxonomy we showed several impossibility results about fair representation learning.
322
+
323
+ Our main result addressed the existence of generic fair representations and of fair transfer learning. We show that even seemingly task-independent fairness notions like demographic parity are vulnerable to shifts in marginals between tasks. We conclude the impossibility of having generic data representations that guarantee (even just) DP fairness with respects to tasks whose marginal distributions are not considered when designing the representation. Furthermore, we show that it is impossible to have an adversarially fair representation with respect to several tasks and the equalized odds notion of fairness, if those tasks do not all fulfill statistical parity. These insights stand in contrast to the impression arising from recent papers [10] that claim to learned transferable fair decisions.
324
+
325
+ We also considered the question of "fairness of a feature", which has been used in legal scenarios. We showed that for notions of decision-making fairness other than demographic parity, the fairness of a single feature is an ill defined notion. Namely, the impact of a feature on the fairness of a decision cannot be determined without considering the other features of the representation.
326
+
327
+ Lastly, we show that some fairness notions, like predictive rate parity, do not always allow an adversarially fair representation, even if it is just for a single task.
328
+
329
+ # References
330
+
331
+ [1] Tameem Adel, Isabel Valera, Zoubin Ghahramani, and Adrian Weller. One-network adversarial fairness. In AAAI, 2019.
332
+ [2] Alex Beutel, Jilin Chen, Zhe Zhao, and Ed H. Chi. Data decisions and theoretical implications when adversarially learning fair representations. CoRR, abs/1707.00075, 2017.
333
+ [3] Elliot Creager, David Madras, Joern-Henrik Jacobsen, Marissa Weis, Kevin Swersky, Toniann Pitassi, and Richard Zemel. Flexibly fair representation learning by disentanglement. In ICML, 2019.
334
+ [4] Jennifer L Doleac and Benjamin Hansen. Does “ban the box” help or hurt low-skilled workers? statistical discrimination and employment outcomes when criminal histories are hidden. Technical report, National Bureau of Economic Research, 2016.
335
+ [5] Flávio du Pin Calmon, Dennis Wei, Bhanukiran Vinzamuri, Karthikeyan Natesan Ramamurthy, and Kush R. Varshney. Optimized pre-processing for discrimination prevention. In Advances in Neural Information Processing Systems 30.
336
+ [6] Harrison Edwards and Amos J. Storkey. Censoring representations with an adversary. In ICLR, 2016.
337
+ [7] Nina Grgic-Hlaca, Muhammad Bilal Zafar, Krishna P. Gummadi, and Adrian Weller. Beyond distributive fairness in algorithmic decision making: Feature selection for procedurally fair learning. In AAAI, 2018.
338
+ [8] Moritz Hardt, Eric Price, and Nathan Srebro. Equality of opportunity in supervised learning. In NIPS, 2016.
339
+ [9] Jon M. Kleinberg, Sendhil Mullainathan, and Manish Raghavan. Inherent trade-offs in the fair determination of risk scores. CoRR, abs/1609.05807, 2016.
340
+ [10] David Madras, Elliot Creager, Toniann Pitassi, and Richard Zemel. Learning adversarially fair and transferable representations. In ICML, 2018.
341
+ [11] Daniel McNamara, Cheng Soon Ong, and Robert C Williamson. Costs and benefits of fair representation learning. In Proceedings of the 2019 AAAI/ACM Conference on AI, Ethics, and Society, pages 263–270, 2019.
342
+ [12] Luca Oneto, Michele Donini, Andreas Maurer, and Massimiliano Pontil. Learning fair and transferable representations. arXiv preprint arXiv:1906.10673, 2019.
343
+ [13] Pierangela Samarati and Latanya Sweeney. Protecting privacy when disclosing information: k-anonymity and its enforcement through generalization and suppression. Technical report, 1998.
344
+ [14] Jiaming Song, Pratyusha Kalluri, Aditya Grover, Shengjia Zhao, and Stefano Ermon. Learning controllable fair representations. In The 22nd International Conference on Artificial Intelligence and Statistics, pages 2164–2173, 2019.
345
+ [15] Rich Zemel, Yu Wu, Kevin Swersky, Toni Pitassi, and Cynthia Dwork. Learning fair representations. In ICML, 2013.
346
+ [16] Brian Hu Zhang, Blake Lemoine, and Margaret Mitchell. Mitigating unwanted biases with adversarial learning. In AAAI/ACM Conference on AI, Ethics, and Society, 2018.
347
+ [17] Han Zhao, Amanda Coston, Tameem Adel, and Geoffrey J. Gordon. Conditional learning of fair representations. CoRR, abs/1910.07162, 2019.
348
+ [18] Han Zhao and Geoffrey J. Gordon. Inherent tradeoffs in learning fair representations. CoRR, abs/1906.08386, 2019.
349
+
350
+ # Checklist
351
+
352
+ 1. For all authors...
353
+
354
+ (a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] We provide theorems with proofs for all claims made in the introduction and appendix
355
+ (b) Did you describe the limitations of your work? [Yes] The introduction clearly details the scope of our paper
356
+ (c) Did you discuss any potential negative societal impacts of your work? [Yes] We discuss potential negative societal impacts at the end of the introduction.
357
+ (d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
358
+
359
+ 2. If you are including theoretical results...
360
+
361
+ (a) Did you state the full set of assumptions of all theoretical results? [Yes] Every result clearly states the assumptions used. In one instance (Theorem 2) we refer to a detailed definition of the assumptions in the appendix.
362
+ (b) Did you include complete proofs of all theoretical results? [Yes] Many of them were refered to the appendix
363
+
364
+ 3. If you ran experiments...
365
+
366
+ (a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [N/A]
367
+ (b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [N/A]
368
+ (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [N/A]
369
+
370
+ (d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [N/A]
371
+
372
+ 4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
373
+
374
+ (a) If your work uses existing assets, did you cite the creators? [N/A]
375
+ (b) Did you mention the license of the assets? [N/A]
376
+ (c) Did you include any new assets either in the supplemental material or as a URL? [N/A]
377
+ (d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
378
+ (e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
379
+
380
+ 5. If you used crowdsourcing or conducted research with human subjects...
381
+
382
+ (a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
383
+ (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
384
+ (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
parse/train/qWtmNpgjD5K/qWtmNpgjD5K_content_list.json ADDED
@@ -0,0 +1,1404 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Impossibility results for fair representations ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 230,
8
+ 122,
9
+ 766,
10
+ 147
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous Author(s) \nAffiliation \nAddress \nemail ",
17
+ "bbox": [
18
+ 423,
19
+ 200,
20
+ 580,
21
+ 256
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Abstract ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 462,
31
+ 292,
32
+ 535,
33
+ 309
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "1 With the growing awareness to fairness in machine learning and the realization \n2 of the central role that data representation has in data processing tasks, there is \n3 an obvious interest in notions of fair data representations. We provide a formal \n4 framework for examining the fairness of data representations through the lens of \n5 their effect on decisions (mainly classification) made based on data represented that \n6 way. Using that framework, we prove that several desiderata for fair representations \n7 cannot be achieved. While some of our conclusions are intuitive, we formulate \n8 (and prove) crisp statements of such impossibilities, often contrasting impressions \n9 conveyed by many recent works on fair representations. ",
40
+ "bbox": [
41
+ 150,
42
+ 321,
43
+ 766,
44
+ 448
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "10 1 Introduction ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 148,
54
+ 472,
55
+ 312,
56
+ 488
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "11 Automated decision making has become more and more successful over the last few decades and \n12 has therefore been used in an increasing number of domains, either as stand alone, or to support \n13 human decision makers. This includes many sensitive domains which significantly impact people’s \n14 livelihoods, such as loan applications, university admissions, recidivism predictions, or insurance rate \n15 settings. It has been found that many such decision tools have, often unintentionally, biases against \n16 minority groups, and therefore lead to discrimination. In response to these concerns, the machine \n17 learning research community has been devoting effort to developing clear notions of fair decision \n18 making, and coming up with algorithms for implementing fair machine learning. \n20 A common approach to address the important issue of fair algorithmic decision making is through fair \n21 data representation. The idea is that some regulator or a responsible data curator transforms collected \n22 data to a format (or representation), that can then be used for solving downstream classification tasks \n23 providing guarantees of fairness. This approach was proposed by the seminal paper of Zemel et \n24 al. [15]. In their words: \"our intermediate representation can be used for other classification tasks \n25 (i.e., transfer learning is possible)\"... \"We further posit that such an intermediate representation is \n26 fundamental to progress in fairness in classification, since it is composable and not ad hoc; once \n27 such a representation is established, it can be used in a blackbox fashion to turn any classification \n28 algorithm into a fair classifier, by simply applying the classifer to the sanitized representation of \n29 the data\". Many followup papers aim to realize this paradigm, solving technical and algorithmic \n30 issues [10, 6, 11, 14, 3] (to mention just a few). The main contribution of this paper is showing that, \n31 basically, it is impossible to achieve this goal. Namely, no data representation can guarantee that for \n32 every classification task a classifier trained on data under the given representation will be fair for \n33 that task. This impossibility applies even if one restricts the downstream tasks in question to share \n34 the same labeling rule, or for fairness notions like Odds Equality, to share the same marginal data \n35 distribution with the data on which the representation was trained. Our results answer negatively the \n36 main two questions posed in the discussion section of Creager et al. [3]. \n37 While many papers in this domain propose algorithmic solutions to fairness related issues, the main \n38 contributions of this paper are conceptual. We believe that, to a much larger extent than many other \n39 facets of machine learning, fundamental concepts of fairness in machine learning require better \n40 understanding. Some basic questions are still far from being satisfactorily elucidated; What should \n41 be considered fair decision making? (various mutually incompatible notions have been proposed, but \n42 how to pick between them for a given real life application is far from being clarified). What is a fair \n43 data representation? To what extent should accuracy or other practical utilities be compromised for \n44 achieving fairness goals? and so on. The answers to these questions are not generic. They vary with \n45 the principles and the goals guiding the agents involved (decision makers, subjects of such a decision, \n46 policy regulators, etc.), as well as with what can be assumed regarding the underlying learning setup. \n47 We view these as the primary issues facing the field, deserving explicit research attention (in addition \n48 to the more commonly discussed algorithmic and optimization aspects). This is a theoretical work, \n49 our discussion is grounded in definitions and proofs rather than heuristics and experimental results. ",
63
+ "bbox": [
64
+ 147,
65
+ 502,
66
+ 825,
67
+ 613
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "",
74
+ "bbox": [
75
+ 145,
76
+ 633,
77
+ 825,
78
+ 868
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "",
85
+ "bbox": [
86
+ 147,
87
+ 875,
88
+ 825,
89
+ 902
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "",
96
+ "bbox": [
97
+ 147,
98
+ 92,
99
+ 825,
100
+ 244
101
+ ],
102
+ "page_idx": 1
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "50 1.1 What is fair representation? ",
107
+ "text_level": 1,
108
+ "bbox": [
109
+ 148,
110
+ 260,
111
+ 401,
112
+ 273
113
+ ],
114
+ "page_idx": 1
115
+ },
116
+ {
117
+ "type": "text",
118
+ "text": "51 The term ‘fair data representation’ encompasses a wide range of different meanings. When word \n52 embeddings results in smaller distance between the vectors representing ‘woman’ and ‘nurse’ relative \n53 to the distance between the representations of ‘woman’ and ‘doctor’ and the other way around for \n54 ‘man’, is it an indication of bias in the representation or is it just a faithful reflection of a bias in \n55 society? Rather than delving into such issues, we discuss an arguably more concrete facet of data \n56 representation; We examine representation fairness from the perspective of its effect on the fairness \n57 of classification rules that agents using data represented that way may come up with. Such a view \n58 takes into consideration two setup characteristics: \n9 The objective of the agent using the data We distinguish three types of classification prediction \n0 agents (formal definitions of these aspects of fairness are provided in section 3.2): ",
119
+ "bbox": [
120
+ 147,
121
+ 285,
122
+ 825,
123
+ 396
124
+ ],
125
+ "page_idx": 1
126
+ },
127
+ {
128
+ "type": "text",
129
+ "text": "",
130
+ "bbox": [
131
+ 156,
132
+ 406,
133
+ 823,
134
+ 434
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "Malicious - driven by a bias against a group of subjects. To protect against such an agent, a fair representation (or feature set) should be such that every classifier based on data represented that way is fair. This is apparently the most common approach to fair representations in the literature e.g., [15, 10]. ",
141
+ "bbox": [
142
+ 232,
143
+ 439,
144
+ 823,
145
+ 494
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "Accuracy Driven - focusing on traditional measures of learning efficiency, ignoring fairness considerations. A representation is accuracy-driven fair if every loss minimizing classifier based on that representation is fair. ",
152
+ "bbox": [
153
+ 233,
154
+ 496,
155
+ 823,
156
+ 537
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "Fairness Driven - aiming to find a decision rule that is fair while maintaining meaningful accuracy. A representation is fairness-driven fair if there exists a loss minimizing (or an approximate minimizer) classifier based on that representation is fair. ",
163
+ "bbox": [
164
+ 228,
165
+ 540,
166
+ 820,
167
+ 580
168
+ ],
169
+ "page_idx": 1
170
+ },
171
+ {
172
+ "type": "text",
173
+ "text": "71 The notion of group fairness applied to the classification decisions The wide range of group fair \n72 ness notions (for classification) can be taxonomized along several dimensions: Does the \n73 notion depend on the ground truth classification or only on the agents decision (like demo \n74 graphic parity)? Is perfectly accurate decision (matching the ground truth classification) \n75 always considered fair (like in odds equality)? Does the fairness notion depend on unobserv \n76 able features (like intention or causality)? In this work we focus on fairness notions that \n77 are ground-truth-dependent, view the ground truth classification as fair and depend only on \n78 observable features. The decision which notion of fairness one wishes to abide by depends \n79 on societal goals and may vary from one task to another and is outside the scope of this \n80 paper. Just the same, let us briefly explain why the requirements listed above are natural in \n81 many situations. ",
174
+ "bbox": [
175
+ 147,
176
+ 585,
177
+ 825,
178
+ 737
179
+ ],
180
+ "page_idx": 1
181
+ },
182
+ {
183
+ "type": "text",
184
+ "text": "The dependence on the ground truth classification is almost inevitable from a utilitarian perspective - taking into account the probability that a student succeed or fail when making acceptance decisions should not be considered unfair. Put more formally, whenever there is any correlation between membership and the ground truth classification, any classifier that is fair w.r.t. a notion that ignored the ground truth (like demographic parity) is bound to suffer prediction error proportional to that correlation. ",
185
+ "bbox": [
186
+ 238,
187
+ 741,
188
+ 826,
189
+ 824
190
+ ],
191
+ "page_idx": 1
192
+ },
193
+ {
194
+ "type": "text",
195
+ "text": "Viewing perfectly accurate decisions as fair can be viewed as a distinction between notions that do or do not try to inflict affirmative action. It makes a lot of sense in tasks like conviction in a crime - if you convict all criminals and no one else, you should not be accused on unfairness. ",
196
+ "bbox": [
197
+ 238,
198
+ 827,
199
+ 823,
200
+ 881
201
+ ],
202
+ "page_idx": 1
203
+ },
204
+ {
205
+ "type": "text",
206
+ "text": "Relying only on observable features fosters objectivity and allows scrutiny of the decisions made. Our running example of such a notion is odds equality [8], however our results hold as well for other common notions of fairness that meet the above conditions (like Calibrations Within Groups [9]). ",
207
+ "bbox": [
208
+ 232,
209
+ 883,
210
+ 823,
211
+ 911
212
+ ],
213
+ "page_idx": 1
214
+ },
215
+ {
216
+ "type": "text",
217
+ "text": "",
218
+ "bbox": [
219
+ 264,
220
+ 92,
221
+ 823,
222
+ 119
223
+ ],
224
+ "page_idx": 2
225
+ },
226
+ {
227
+ "type": "text",
228
+ "text": "1.2 Our results ",
229
+ "text_level": 1,
230
+ "bbox": [
231
+ 165,
232
+ 137,
233
+ 294,
234
+ 150
235
+ ],
236
+ "page_idx": 2
237
+ },
238
+ {
239
+ "type": "text",
240
+ "text": "We prove the following inherent limitations of notions of fair representations (under the above taxonomy): ",
241
+ "bbox": [
242
+ 165,
243
+ 161,
244
+ 823,
245
+ 190
246
+ ],
247
+ "page_idx": 2
248
+ },
249
+ {
250
+ "type": "text",
251
+ "text": "1. The impossibility to be task-independent. There is a host of literature proposing methods of coming up with data representation that guarantees the fairness of classifier based on that representation (e.g., [18, 3, 10, 12]). We elaborate on these works in our Previous Work section. Contrasting the impression conveyed by many such papers, we show that the ability to guarantee multi-task fairness is inherently limited. Much of that work addresses Demographic parity (DP). We prove that if two tasks have different marginal data distributions (that is, the distribution of unlabeled instances) and different success rates of the protected group, then no representation can guarantee that any non-trivial classifier trained on it satisfies DP for both. We show that the only classifiers that are guaranteed to satisfy any significant level of DP fairness w.r.t. all marginal distributions are the redundant constant functions. From a practical point of view, since DP fairness of some decision (say, acceptance to some university program) requires the ratio of positive decisions between groups to match the ratio of applicants from those groups, a representation that guarantees DP fairness cannot be a priory constructed - it must have access to the distribution of groups among applicants for that specific program. Furthermore, we prove that for every fixed marginal data distribution, if two ground truth classifications differ with non-zero probability over it, there can be no data representation that enjoys Odds Equality fairness and accuracy with respect to both tasks over that shared marginal distribution (except for the redundant case where the success rates of both groups are equal for both tasks). These results answer negatively the main two open problems posed in the Discussion section of [3]. ",
252
+ "bbox": [
253
+ 212,
254
+ 202,
255
+ 825,
256
+ 477
257
+ ],
258
+ "page_idx": 2
259
+ },
260
+ {
261
+ "type": "text",
262
+ "text": "2. The impossibility to evaluate the fairness contribution of a given feature devoid of the other features used (again, for each agent objective and several common group fairness notions). ",
263
+ "bbox": [
264
+ 210,
265
+ 483,
266
+ 825,
267
+ 511
268
+ ],
269
+ "page_idx": 2
270
+ },
271
+ {
272
+ "type": "text",
273
+ "text": "3. The inherent dependence of the effect on fairness of adding/deleting a feature on the type of agent using the representation (on top of the above mentioned dependence on other features), even when the feature in question does not correlate with membership in the protected group. ",
274
+ "bbox": [
275
+ 210,
276
+ 515,
277
+ 826,
278
+ 558
279
+ ],
280
+ "page_idx": 2
281
+ },
282
+ {
283
+ "type": "text",
284
+ "text": "(These come on top of the obvious dependence on the notion of fair classification sought). ",
285
+ "bbox": [
286
+ 161,
287
+ 569,
288
+ 761,
289
+ 583
290
+ ],
291
+ "page_idx": 2
292
+ },
293
+ {
294
+ "type": "text",
295
+ "text": "Concerning potential negative societal impact: We cannot foresee any potential negative societal impact of our work. The main message of this paper is a cautionary statement. We alert potential users that approaches based on task independent fair representations cannot guarantee the fairness of arbitrary predictors based on them. As such, we are only guarding against potential negative impact of previously published work. ",
296
+ "bbox": [
297
+ 173,
298
+ 590,
299
+ 823,
300
+ 659
301
+ ],
302
+ "page_idx": 2
303
+ },
304
+ {
305
+ "type": "text",
306
+ "text": "Our paper is organized as follows: Section 2 gives an overview of the related work. Section 3 introduces our setup including our taxonomy for fair representations. Section 4 contains our main results on the impossibility of generic fairness of a representation. Section 5 addressed the impossibility of defining the fairness effect of a single feature without considering the other components of a representation. Section 6 briefly shows the impossibility of having fair representations w.r.t. Predictive Rate Parity. Section 7 is our concluding remarks. ",
307
+ "bbox": [
308
+ 142,
309
+ 665,
310
+ 825,
311
+ 750
312
+ ],
313
+ "page_idx": 2
314
+ },
315
+ {
316
+ "type": "text",
317
+ "text": "136 We defer proofs to the appendix. ",
318
+ "bbox": [
319
+ 143,
320
+ 756,
321
+ 387,
322
+ 770
323
+ ],
324
+ "page_idx": 2
325
+ },
326
+ {
327
+ "type": "text",
328
+ "text": "37 2 Related Work ",
329
+ "text_level": 1,
330
+ "bbox": [
331
+ 156,
332
+ 789,
333
+ 320,
334
+ 806
335
+ ],
336
+ "page_idx": 2
337
+ },
338
+ {
339
+ "type": "text",
340
+ "text": "Since our paper goes against messages conveyed by many previous papers, we wish to address in detail more related works than space here allows. We therefore provide a more elaborate section on previous work in the supplementary material. ",
341
+ "bbox": [
342
+ 143,
343
+ 820,
344
+ 825,
345
+ 863
346
+ ],
347
+ "page_idx": 2
348
+ },
349
+ {
350
+ "type": "text",
351
+ "text": "Much of the recent work on fair representation for learning classifiers focuses on algorithms. (and demonstrating the viability of those algorithms though experimental results) [15, 10, 17, 1, 16]. As explained before, our focus is different. We discuss what should be considered fair representation in ",
352
+ "bbox": [
353
+ 142,
354
+ 869,
355
+ 825,
356
+ 911
357
+ ],
358
+ "page_idx": 2
359
+ },
360
+ {
361
+ "type": "text",
362
+ "text": "144 that context, what is the scope of such notions and what are the inherent limitations of defining such \n145 representations. \n146 Almost all the work on fair representations focuses on the demographic parity (DP) notion of fairness \n147 [6, 10, 15, 14]. Not having to take ground truth into account makes this notion independent of the \n148 classification task carrying both advantages and limitations. However, any positive result in these \n149 papers assumes that the marginal data distribution is available to the designer of the fair representation. \n150 Such an assumption severely restricts the applicability of such representations. To achieve DP fairness, \n151 a classifier has to induce success ratio between the two groups that match the ratio between these \n152 groups in the input data. However, that ratio, say a set of applicants for a bank loan or to some \n153 university program varies from one application to another and cannot be determined a priori. Our \n154 results on this inherent limitation of fair representation for DP (see section 4) do not seem to have \n155 been stated before. \n156 When the data marginal distribution is fixed, and available to the designer of a representation, DP \n157 fairness is possible. However, in such a setup, we show that fairness with respect to notions of fairness \n158 that do rely on the correct ground truth, such as equalized odds (EO) [8], cannot be guaranteed for \n159 arbitrary tasks (see Section 4). This fact also has not been explicitly stated (and proved) before, \n160 although it seems that some of the previous work worried about it. Instead, previous work either \n161 focus only on DP fairness, or, when it comes to discuss other notions of fairness, the algorithms that \n162 design the representations are assumed to have access to task specific labeled data (e.g. [16, 2, 14, 5], \n163 which defies the goal of having a fixed representation that guarantees fairness for many tasks. \n164 The effect of the motivation of the decision maker using the representation on the fairness of the \n165 resulting decision rule has been considered by Madras et al. [10] and Zhang et al. [16]. These papers \n166 identify two motivations. The first is malicious, which is the intent to discriminate without regard \n167 for accuracy. The second is accuracy-driven, which is the intent to maximize accuracy. We address \n168 these effects as part of our taxonomy of notions of fair representations. Additionally, we discuss \n169 fairness-driven agents that aim to achieve fairness while maintaining some level of accuracy. \n170 A natural question that arises in this context is about the inherent trade-offs between fairness and \n171 accuracy. When the notion of fairness is demographic parity, such trade-offs are clearly expected - \n172 they surface whenever there exists correlation between membership in the protected group and the \n173 ground truth classification. Zhao et al. [18] and Mcnamara et al. [11] analyze such scenarios and \n174 demonstrate situations in which there exists a more accurate and more fair classifier based on an \n175 original representation than any classifier built using a learnt representation. \n176 The question of feature deletion has also been considered in real world examples, such as in the \"ban \n177 the box\" policy which disallowed employers using criminal history in hiring decisions [4]. The effect \n178 of allowing or disallowing features on fairness has been studied before, for example in Grgic-Hlaca et \n179 al. [7]. However in previous works, the effect of a feature on fairness, has been discussed in isolation. \n180 In contrast, we show that fairness of a feature should not be considered in isolation, but should also \n181 take into account the remaining features available. ",
363
+ "bbox": [
364
+ 150,
365
+ 92,
366
+ 825,
367
+ 119
368
+ ],
369
+ "page_idx": 3
370
+ },
371
+ {
372
+ "type": "text",
373
+ "text": "",
374
+ "bbox": [
375
+ 140,
376
+ 126,
377
+ 825,
378
+ 263
379
+ ],
380
+ "page_idx": 3
381
+ },
382
+ {
383
+ "type": "text",
384
+ "text": "",
385
+ "bbox": [
386
+ 140,
387
+ 270,
388
+ 825,
389
+ 382
390
+ ],
391
+ "page_idx": 3
392
+ },
393
+ {
394
+ "type": "text",
395
+ "text": "",
396
+ "bbox": [
397
+ 142,
398
+ 387,
399
+ 825,
400
+ 470
401
+ ],
402
+ "page_idx": 3
403
+ },
404
+ {
405
+ "type": "text",
406
+ "text": "",
407
+ "bbox": [
408
+ 142,
409
+ 477,
410
+ 825,
411
+ 560
412
+ ],
413
+ "page_idx": 3
414
+ },
415
+ {
416
+ "type": "text",
417
+ "text": "",
418
+ "bbox": [
419
+ 142,
420
+ 566,
421
+ 825,
422
+ 650
423
+ ],
424
+ "page_idx": 3
425
+ },
426
+ {
427
+ "type": "text",
428
+ "text": "182 3 Formal Setup",
429
+ "text_level": 1,
430
+ "bbox": [
431
+ 142,
432
+ 702,
433
+ 318,
434
+ 719
435
+ ],
436
+ "page_idx": 3
437
+ },
438
+ {
439
+ "type": "text",
440
+ "text": "183 We consider a binary classification problem with label set $\\{ 0 , 1 \\}$ over a domain $X$ of instances we \n184 wish to classify, e.g. individuals applying for a loan. We assume the task to be given by some \n185 distribution $P$ over $X \\times \\{ 0 , 1 \\}$ from which instances are sampled i.i.d. We denote the ground-truth \n186 labeling rule as $t : X \\to [ 0 , 1 ]$ . We will think of the label 1 as denoting ‘qualified’ and the label 0 as \n187 ‘unqualified’ and $t ( x ) = P [ y = 1 | x ]$ . For concreteness, we focus here on the case of deterministic \n188 labeling (that is $t : X \\{ 0 , 1 \\}$ ). Most of our discussion can readily be extended to the probabilistic \n189 labeling case. In a slight abuse of notation we will sometimes use $t ( w )$ to indicate the label coordinate \n190 of an instance $w \\in \\bar { X } \\times \\{ 0 , 1 \\}$ ",
441
+ "bbox": [
442
+ 140,
443
+ 751,
444
+ 825,
445
+ 864
446
+ ],
447
+ "page_idx": 3
448
+ },
449
+ {
450
+ "type": "text",
451
+ "text": "A data representation is determined by a mapping $F : X Z$ , for some set $Z$ , and the learner only sees $F ( x )$ for any instance $x$ (both in the training and the test/decision stages).We denote the hypothesis class of all feature based decision rules as $\\mathcal { H } _ { F } = \\{ h : Z \\{ 0 , 1 \\} \\}$ . As a loss function we consider a weighted sum of false positives and false negatives, i.e. ",
452
+ "bbox": [
453
+ 173,
454
+ 869,
455
+ 825,
456
+ 911
457
+ ],
458
+ "page_idx": 3
459
+ },
460
+ {
461
+ "type": "text",
462
+ "text": "",
463
+ "bbox": [
464
+ 171,
465
+ 90,
466
+ 629,
467
+ 106
468
+ ],
469
+ "page_idx": 4
470
+ },
471
+ {
472
+ "type": "equation",
473
+ "img_path": "images/2f51f3acf27eaf1e9a4b3a52121316d77c9235e39816aa19b49da6d70e242e7c.jpg",
474
+ "text": "$$\nl ^ { \\alpha } ( h , x , y ) = \\left\\{ { \\begin{array} { l r } { \\alpha , } & { i f h ( x ) = 0 , y = 1 } \\\\ { 1 - \\alpha , } & { i f h ( x ) = 1 , y = 0 } \\\\ { 0 , } & { o t h e r w i s e } \\end{array} } \\right.\n$$",
475
+ "text_format": "latex",
476
+ "bbox": [
477
+ 343,
478
+ 111,
479
+ 647,
480
+ 155
481
+ ],
482
+ "page_idx": 4
483
+ },
484
+ {
485
+ "type": "text",
486
+ "text": "for some weight 191 $\\alpha \\in ( 0 , 1 )$ . We denote the true risk with respect to this loss as $L _ { P } ^ { \\alpha }$ and the empirical risk as 192 $L _ { S } ^ { \\alpha }$ . ",
487
+ "bbox": [
488
+ 148,
489
+ 161,
490
+ 826,
491
+ 190
492
+ ],
493
+ "page_idx": 4
494
+ },
495
+ {
496
+ "type": "text",
497
+ "text": "3.1 Notions of group fairness ",
498
+ "text_level": 1,
499
+ "bbox": [
500
+ 166,
501
+ 205,
502
+ 387,
503
+ 220
504
+ ],
505
+ "page_idx": 4
506
+ },
507
+ {
508
+ "type": "text",
509
+ "text": "For our fairness analysis we assume the population $X$ to be partitioned into two subpopulation $A$ and $D$ (namely, we restrict our discussion the case of one binary protected attribute). We sometimes use a function notation $G : X \\{ A , D \\}$ to indicate the group-membership of an instance. Of course in reality there are often many protected attributes with more than two values. However, as our goal is to show limitations and impossibility results for fair representation learning, it suffices to only consider one binary protected attribute – the same impossibilities readily follow for the more complex settings. ",
510
+ "bbox": [
511
+ 173,
512
+ 229,
513
+ 825,
514
+ 315
515
+ ],
516
+ "page_idx": 4
517
+ },
518
+ {
519
+ "type": "text",
520
+ "text": "We now define two widely used notions of group-fairness that we will refer to throughout the paper, namely, equalized odds and demographic parity. In the following we will denote with $X _ { g , l }$ the subset of $X$ with label $l$ and group membership $g$ , i.e. $X _ { g , l } = X \\cap t ^ { - 1 } ( l ) \\cap G ^ { - 1 } ( g )$ . ",
521
+ "bbox": [
522
+ 173,
523
+ 320,
524
+ 825,
525
+ 366
526
+ ],
527
+ "page_idx": 4
528
+ },
529
+ {
530
+ "type": "text",
531
+ "text": "03 Definition 1 (Group fairness; Equalized odds) The notion of group-fairness we will focus on in \n204 this paper is the ground-truth-dependent notion of odds equality as introduced by $I ^ { g } { \\cal I }$ . ",
532
+ "bbox": [
533
+ 151,
534
+ 373,
535
+ 825,
536
+ 404
537
+ ],
538
+ "page_idx": 4
539
+ },
540
+ {
541
+ "type": "text",
542
+ "text": "A classifier h is considered fair w.r.t. to odds equality $( L ^ { E O } )$ and a distribution $P$ if for $x \\sim P$ we have the statistical independence $h ( x ) \\perp \\perp G ( x ) | t ( x )$ . For $g \\in \\{ A , D \\}$ let the false positive rate and the false negative rate be defined as $F P R _ { g } ( h , t , P ) = \\mathbb { P } _ { x \\sim P } [ h ( x ) = 1 | x \\in X _ { g , 0 } ]$ and $F N R _ { g } ( h , t , P ) = \\mathbb { P } _ { x \\sim P } [ h ( x ) = 0 | x \\in X _ { g , 1 } ]$ respectively. The $E O$ unfairness is given then by the sum of differences in false positive rate and false negative rate between groups: ",
543
+ "bbox": [
544
+ 173,
545
+ 407,
546
+ 825,
547
+ 479
548
+ ],
549
+ "page_idx": 4
550
+ },
551
+ {
552
+ "type": "equation",
553
+ "img_path": "images/de4253e73972d6210bb608606273d3d64285b69664f97e9448646f124e64b7ed.jpg",
554
+ "text": "$$\nL _ { P } ^ { E O } ( h ) = \\frac { 1 } { 2 } | F N R _ { A } - F N R _ { D } | + \\frac { 1 } { 2 } | F P R _ { A } - F P R _ { D } | .\n$$",
555
+ "text_format": "latex",
556
+ "bbox": [
557
+ 305,
558
+ 488,
559
+ 692,
560
+ 517
561
+ ],
562
+ "page_idx": 4
563
+ },
564
+ {
565
+ "type": "text",
566
+ "text": "205 If we say a classifier is fair, without referring to any particular group-fairness notion, we mean \n206 fairness w.r.t. equalized odds. ",
567
+ "bbox": [
568
+ 147,
569
+ 518,
570
+ 823,
571
+ 546
572
+ ],
573
+ "page_idx": 4
574
+ },
575
+ {
576
+ "type": "text",
577
+ "text": "Definition 2 (Demographic parity) $A$ classifier $h$ is considered fair w.r.t. to demographic parity $( L ^ { D P } )$ and a distribution $P$ if $h ( x )$ ⊥⊥ $G ( x )$ . The respective unfairness is given by difference in positive classification rates between groups ",
578
+ "bbox": [
579
+ 169,
580
+ 558,
581
+ 825,
582
+ 602
583
+ ],
584
+ "page_idx": 4
585
+ },
586
+ {
587
+ "type": "equation",
588
+ "img_path": "images/085800b9cfb6e7a93bd248af73705226f2fd553af69fd21d9c5c42b71551878c.jpg",
589
+ "text": "$$\n\\dot { L } _ { P } ^ { D P } ( h ) = | \\bar { \\mathbb { P } } _ { x \\sim P } [ h ( x ) = 1 | G ( x ) = A ] \\stackrel { \\sim } { - } \\mathbb { P } _ { x \\sim P } [ h ( x ) = 1 | G ( x ) = D ] | .\n$$",
590
+ "text_format": "latex",
591
+ "bbox": [
592
+ 169,
593
+ 598,
594
+ 650,
595
+ 616
596
+ ],
597
+ "page_idx": 4
598
+ },
599
+ {
600
+ "type": "text",
601
+ "text": "3.2 The role of the agent’s objective ",
602
+ "text_level": 1,
603
+ "bbox": [
604
+ 173,
605
+ 630,
606
+ 434,
607
+ 645
608
+ ],
609
+ "page_idx": 4
610
+ },
611
+ {
612
+ "type": "text",
613
+ "text": "We will phrase our definitions of representation fairness in terms of a general group fairness notion $L ^ { f a i r }$ with unfairness measure $L _ { P } ^ { f a \\bar { i } r }$ . ",
614
+ "bbox": [
615
+ 166,
616
+ 655,
617
+ 823,
618
+ 686
619
+ ],
620
+ "page_idx": 4
621
+ },
622
+ {
623
+ "type": "text",
624
+ "text": "We start by considering a malicious decision maker who tries to actively discriminate against one group. To protect against this kind of decision maker, we need to give a guarantee such that based on the feature set it is not possible to discriminate against one group. This corresponds to the notion of adversarial fairness. ",
625
+ "bbox": [
626
+ 173,
627
+ 691,
628
+ 825,
629
+ 748
630
+ ],
631
+ "page_idx": 4
632
+ },
633
+ {
634
+ "type": "text",
635
+ "text": "Definition 3 (Adversarial fairness) A representation $F$ is considered to be adversarial fair w.r.t. the the adversarial unfairness of a representation distribution and group fairness objective $L ^ { f a i r }$ $F$ by , if every classifier $U _ { a d v } ( F ) = \\operatorname* { m a x } _ { h \\in \\mathcal { H } _ { F } } L _ { P } ^ { f a i r } ( h )$ $h \\in \\mathcal { H } _ { F }$ is group-fair. We define . ",
636
+ "bbox": [
637
+ 169,
638
+ 758,
639
+ 823,
640
+ 805
641
+ ],
642
+ "page_idx": 4
643
+ },
644
+ {
645
+ "type": "text",
646
+ "text": "Furthermore, we consider an accuracy-driven decision maker, who aims to label instances correctly and is agnostic about fairness. For this kind of decision maker, we only need to make sure that optimizing for correct classification results in a fair classifier. The following definition ensures that the Bayes optimal classifier for a representation is fair. ",
647
+ "bbox": [
648
+ 171,
649
+ 815,
650
+ 825,
651
+ 872
652
+ ],
653
+ "page_idx": 4
654
+ },
655
+ {
656
+ "type": "text",
657
+ "text": "225 Definition 4 (Accuracy-driven fairness) $A$ representation $F$ is considered to be accuracy-driven fair w.r.t. the fairness objective 226 $L ^ { f a i r }$ and distribution $P$ , if for every threshold $\\alpha \\in ( 0 , 1 )$ , every classifier 227 $h \\in \\mathcal { H } _ { F }$ with $\\begin{array} { r } { L _ { P } ^ { \\alpha } ( h ) = \\operatorname* { m i n } _ { h \\in \\mathcal { H } _ { F } } L _ { P } ^ { \\alpha } ( h ) } \\end{array}$ is group-fair. The accuracy-driven unfairness for a par228 ticular threshold parameter $\\alpha$ is given by $\\begin{array} { r } { U _ { a c c } ^ { \\alpha } ( \\mathcal { F } ) = \\operatorname* { m a x } \\{ L _ { P } ^ { f a i r } ( h ) : h \\in \\arg \\operatorname* { m i n } _ { h \\in \\mathcal { H } _ { F } } L _ { P } ^ { \\alpha } ( h ) \\} . } \\end{array}$ 229 The general accuracy-driven unfairness is given by $U _ { a c c } ( \\mathcal { F } ) = \\operatorname* { m a x } _ { \\alpha \\in [ 0 , 1 ] } U _ { a c c } ^ { \\alpha } ( \\mathcal { F } )$ . ",
658
+ "bbox": [
659
+ 145,
660
+ 882,
661
+ 825,
662
+ 912
663
+ ],
664
+ "page_idx": 4
665
+ },
666
+ {
667
+ "type": "text",
668
+ "text": "",
669
+ "bbox": [
670
+ 142,
671
+ 90,
672
+ 826,
673
+ 137
674
+ ],
675
+ "page_idx": 5
676
+ },
677
+ {
678
+ "type": "text",
679
+ "text": "230 We note that in cases where the decision maker does not have access to the distribution $P$ , but \n231 only to a labelled sample, this requirement is might not sufficient for guaranteeing that an accuracy \n232 driven decision maker arrives at a fair decision. In the Appendix we propose another fairness notion \n233 $\\lambda$ -robustness) that formalizes the desired fairness guarantee for this scenario. ",
680
+ "bbox": [
681
+ 143,
682
+ 148,
683
+ 826,
684
+ 205
685
+ ],
686
+ "page_idx": 5
687
+ },
688
+ {
689
+ "type": "text",
690
+ "text": "Lastly, we also consider a fairness-driven decision maker who actively tries to find a fair and 5 accurate decision rule, while maintaining some accuracy guarantees. For such a decision maker a representation should allow for fair and accurate decision rules. If a representation fulfills this requirement, we call it fairness-enabling. ",
691
+ "bbox": [
692
+ 156,
693
+ 212,
694
+ 825,
695
+ 267
696
+ ],
697
+ "page_idx": 5
698
+ },
699
+ {
700
+ "type": "text",
701
+ "text": "Definition 5 $( \\epsilon , \\eta )$ -fairness-enabling representation) A representation $F$ is considered to be $( \\epsilon , \\eta )$ -fairness-enabling w.r.t. a fairness objective $L ^ { f a i r }$ , if there exists a classifier $\\textit { h } \\in \\mathcal { H } _ { F }$ that such that $L _ { P } ^ { \\alpha } ( h ) \\leq \\epsilon$ and $L _ { P } ^ { f a i r } ( h ) \\leq \\eta$ . ",
702
+ "bbox": [
703
+ 173,
704
+ 279,
705
+ 825,
706
+ 325
707
+ ],
708
+ "page_idx": 5
709
+ },
710
+ {
711
+ "type": "text",
712
+ "text": "Our discussion focuses primarily on the case of malicious and indifferent decision makers. These notions of fair representation can be defined with respect to any group-fairness notion. In our paper we will mainly focus on the equalized odds notion of fairness [8]. We also note that all the above definitions can be given with respect to a fixed model $\\mathcal { H }$ in a continuous space. ",
713
+ "bbox": [
714
+ 156,
715
+ 335,
716
+ 825,
717
+ 392
718
+ ],
719
+ "page_idx": 5
720
+ },
721
+ {
722
+ "type": "text",
723
+ "text": "245 4 Can there be a generic fair representation? ",
724
+ "text_level": 1,
725
+ "bbox": [
726
+ 151,
727
+ 411,
728
+ 563,
729
+ 429
730
+ ],
731
+ "page_idx": 5
732
+ },
733
+ {
734
+ "type": "text",
735
+ "text": "246 We address the existence of a multi-task fair representation. We prove that for the adversarial agent \n247 scenario (which is the setup that most fairness representation previous work is concerned with), \n48 it is impossible to have generic non-trivial fair representations - no useful representation can \n249 guarantee fairness for all \"downstream\" classification that are based on that representation (even if \n250 the ground truth classification remains unchanged and only the marginal may change between tasks). ",
736
+ "bbox": [
737
+ 148,
738
+ 443,
739
+ 825,
740
+ 512
741
+ ],
742
+ "page_idx": 5
743
+ },
744
+ {
745
+ "type": "text",
746
+ "text": "We start by considering scenarios in which only the marginals shift between two tasks, e.g. two openings for different jobs, requiring similar skills, for which different pools of people would apply. Such a distribution shift can likely affect one group more than another and would thus affect the classification rates of both groups differently. We show that we cannot guarantee fairness of a fixed data presentation for general shifts of this kind, even for the simplest case of demographic parity. ",
747
+ "bbox": [
748
+ 168,
749
+ 518,
750
+ 825,
751
+ 589
752
+ ],
753
+ "page_idx": 5
754
+ },
755
+ {
756
+ "type": "text",
757
+ "text": "Claim: 1 Pick any domain set $X$ and any partition of $X$ into non-empty subsets $A , D$ . For every non-constant function $f : X \\{ 0 , 1 \\}$ there exists a probability distribution $P$ over $X$ such that $f$ is arbitrarily $D P$ -unfair w.r.t. $P$ (say, $\\tilde { L _ { P } ^ { D P } } ( h ) > 0 . 9 )$ . ",
758
+ "bbox": [
759
+ 173,
760
+ 601,
761
+ 825,
762
+ 645
763
+ ],
764
+ "page_idx": 5
765
+ },
766
+ {
767
+ "type": "text",
768
+ "text": "In particular, when a shift in marginal occurs between tasks, fairness for previous tasks does not imply a fairness guarantee for a new task. ",
769
+ "bbox": [
770
+ 161,
771
+ 656,
772
+ 823,
773
+ 684
774
+ ],
775
+ "page_idx": 5
776
+ },
777
+ {
778
+ "type": "text",
779
+ "text": "Proof: If $f$ is constant on any of the groups $A$ or $D$ then, since $f$ is not a constant over $X$ there is are points in the other group on which $f$ has the opposite value. Let $P$ assigns probability 0.5 to the group on which $f$ is constant and probability 0.5 to the set of points to which $f$ assigns the other value. Clearly $f$ fails $D P w . r . t .$ this $P$ . Otherwise, both values are assigned in both groups, so let $P$ assign probability 0.5 to $\\{ x \\in A : f ( x ) = 0 \\}$ and probability 0.5 to $\\{ x \\in D : f ( x ) = 1 \\}$ . Clearly, $f$ fails DP w.r.t. this $P$ . ",
780
+ "bbox": [
781
+ 173,
782
+ 690,
783
+ 825,
784
+ 773
785
+ ],
786
+ "page_idx": 5
787
+ },
788
+ {
789
+ "type": "text",
790
+ "text": "Corollary 1 No data representation can guarantee the $D P$ fairness of any non-trivial classifier w.r.t. all possible data generating distributions (over any fixed domain set with any fixed partition into non-empty groups). That is, any non-constant representation $F ,$ cannot be adversarially fair with respect to $\\check { L } ^ { D P }$ and any arbitrary task $P$ . ",
791
+ "bbox": [
792
+ 173,
793
+ 786,
794
+ 825,
795
+ 843
796
+ ],
797
+ "page_idx": 5
798
+ },
799
+ {
800
+ "type": "text",
801
+ "text": "271 Claim: 2 Pick any domain set $X$ and any partition of $X$ into non-empty subsets $A , D$ . For every \n272 non-constant function $f : X \\to \\{ 0 , 1 \\}$ and every classifier $h : X \\to \\{ 0 , 1 \\}$ such that $h \\neq f$ \n273 274 $L _ { P , f } ^ { E O } > 0 . 9$ a probability distribution . $P$ over $X$ such that $h$ is arbitrarily $E O$ -unfair w.r.t. $P , f$ , say ",
802
+ "bbox": [
803
+ 143,
804
+ 854,
805
+ 825,
806
+ 912
807
+ ],
808
+ "page_idx": 5
809
+ },
810
+ {
811
+ "type": "text",
812
+ "text": "275 Corollary 2 No data representation can guarantee EO fairness of any non-constant predictor based on that representation for all \"downstream\" classification learning tasks. That is, any non-constant representation $F ,$ cannot be adversarially fair with respect to $L ^ { E O }$ and any arbitrary task $P$ . This holds even if one restricts the claim to tasks sharing a fixed marginal data distribution. ",
813
+ "bbox": [
814
+ 140,
815
+ 92,
816
+ 825,
817
+ 147
818
+ ],
819
+ "page_idx": 6
820
+ },
821
+ {
822
+ "type": "text",
823
+ "text": "We will now look at a slightly more restricted setting and analyse the case of multi-task learning, where instead of asking for a representation that is fair for every task, we only consider fairness with respect to a fixed (finite) set of tasks that we want to learn. We find that for the adversarial case, even this less ambitious goal is not achievable for generic tasks and the equalized odds notion of fairness. ",
824
+ "bbox": [
825
+ 142,
826
+ 160,
827
+ 826,
828
+ 217
829
+ ],
830
+ "page_idx": 6
831
+ },
832
+ {
833
+ "type": "text",
834
+ "text": "We say a distribution 283 $P$ has equal success rates if $\\begin{array} { r } { \\frac { P ( X _ { A , 1 } ) } { P ( A ) } = \\frac { P ( X _ { D , 1 } ) } { P ( D ) } } \\end{array}$ . ",
835
+ "bbox": [
836
+ 150,
837
+ 222,
838
+ 635,
839
+ 244
840
+ ],
841
+ "page_idx": 6
842
+ },
843
+ {
844
+ "type": "text",
845
+ "text": "Lemma 1 Let $P _ { 1 }$ and $P _ { 2 }$ be the distributions defining two different tasks with the same marginal $P _ { X } = P _ { 1 , X } = P _ { 2 , X }$ such that at least one of the tasks does not have equal success rates. Let $h _ { 1 } , h _ { 2 } : X \\to \\{ 0 , 1 \\}$ be such that $L _ { P _ { 1 } } ( h _ { 1 } ) = \\bar { L _ { P _ { 2 } } } ( h _ { 2 } ) = 0$ , and assume that tasks are non-negligibly different (namely, $\\dot { L } _ { P _ { 1 } } ( h _ { 2 } ) \\neq 0 ,$ ). Then, it cannot be the case that both $h _ { 1 }$ and $h _ { 2 }$ are $E O$ fair w.r.t. both $P _ { 1 }$ and $P _ { 2 }$ . ",
846
+ "bbox": [
847
+ 173,
848
+ 255,
849
+ 825,
850
+ 325
851
+ ],
852
+ "page_idx": 6
853
+ },
854
+ {
855
+ "type": "text",
856
+ "text": "The proof (in the appendix) has a similar flavour as the proof of incompetability of different fairness notions of [9]. ",
857
+ "bbox": [
858
+ 173,
859
+ 337,
860
+ 823,
861
+ 366
862
+ ],
863
+ "page_idx": 6
864
+ },
865
+ {
866
+ "type": "text",
867
+ "text": "Theorem 1 There can be no data representation $F$ such that for some $P _ { 1 } , P _ { 2 }$ as above, the following criteria simultaneously hold: ",
868
+ "bbox": [
869
+ 165,
870
+ 377,
871
+ 823,
872
+ 406
873
+ ],
874
+ "page_idx": 6
875
+ },
876
+ {
877
+ "type": "text",
878
+ "text": "1. $\\mathcal { F }$ is adversarially fair w.r.t. $P _ { 1 }$ and $E O$ ",
879
+ "bbox": [
880
+ 214,
881
+ 417,
882
+ 498,
883
+ 434
884
+ ],
885
+ "page_idx": 6
886
+ },
887
+ {
888
+ "type": "text",
889
+ "text": "2. $\\mathcal { F }$ is adversarially fair w.r.t. $P _ { 2 }$ and $E O$ ",
890
+ "bbox": [
891
+ 210,
892
+ 441,
893
+ 498,
894
+ 458
895
+ ],
896
+ "page_idx": 6
897
+ },
898
+ {
899
+ "type": "text",
900
+ "text": "3. $\\mathcal { F }$ allows for perfect accuracy w.r.t. to $P _ { 1 }$ and $P _ { 2 }$ , i.e. there are $h _ { 1 } , h _ { 2 }$ both expressible over the representation $F$ , such that $L _ { P _ { 1 } } ( h _ { 1 } ) = L _ { P _ { 2 } } ( h _ { 2 } ) = 0$ . ",
901
+ "bbox": [
902
+ 207,
903
+ 467,
904
+ 823,
905
+ 496
906
+ ],
907
+ "page_idx": 6
908
+ },
909
+ {
910
+ "type": "text",
911
+ "text": "7 This result follows directly from Lemma 1. Therefore, if the goal is to prevent discrimination from a possibly adversarial decision maker, while also enabling accurate prediction, each task requires its task-specific feature representation. ",
912
+ "bbox": [
913
+ 155,
914
+ 507,
915
+ 825,
916
+ 550
917
+ ],
918
+ "page_idx": 6
919
+ },
920
+ {
921
+ "type": "text",
922
+ "text": "300 5 Fairness of a feature set vs. fairness of a feature ",
923
+ "text_level": 1,
924
+ "bbox": [
925
+ 150,
926
+ 570,
927
+ 601,
928
+ 588
929
+ ],
930
+ "page_idx": 6
931
+ },
932
+ {
933
+ "type": "text",
934
+ "text": "In this section we discuss feature deletion and its impact on the fairness of a representation. For this we assume our representation $F$ to consist of finitely many features $f _ { i } : X \\to Y _ { i }$ i.e. for every $x \\in X : F ( x ) \\overset { \\cdot } { = } \\left( f _ { 1 } ( x ) , \\ldots , f _ { n } ( x ) \\right)$ and $Z = Y _ { 1 } \\times \\ldots \\times Y _ { n }$ . We limit our discussion to cases where all $Y _ { i }$ are finite. While this assumption facilitates our analysis, we do not expect our results to be different in the cases of continuous features. We will denote the set of features as $F = \\{ f _ { 1 } , \\ldots , f _ { n } \\}$ and will denote by $U _ { a d v } ( \\mathcal { F } )$ and $U _ { a c c } ^ { \\alpha } ( \\mathcal { F } )$ the adversarial and accuracy-driven fairness of the representation induced by the feature set $\\mathcal { F }$ respectively. We show that it is in general not possible to determine the effect a single feature has on the fairness of a representation without considering the full representation. This is the case even if our considered feature is not correlated with the protected attribute. ",
935
+ "bbox": [
936
+ 150,
937
+ 603,
938
+ 825,
939
+ 742
940
+ ],
941
+ "page_idx": 6
942
+ },
943
+ {
944
+ "type": "text",
945
+ "text": "5.1 Opposing effects of a feature for accuracy-driven fairness of a representation ",
946
+ "text_level": 1,
947
+ "bbox": [
948
+ 161,
949
+ 760,
950
+ 745,
951
+ 775
952
+ ],
953
+ "page_idx": 6
954
+ },
955
+ {
956
+ "type": "text",
957
+ "text": "We start our discussion with accuracy-driven fairness w.r.t. equalized odds. In this case we show that the deletion of a feature $f$ can lead to an increase in accuracy-driven unfairness for some set of other given features $\\mathcal { F }$ and that the deletion of the same feature $f$ can lead to a decrease in accuracy-driven unfairness for another set of other available features ${ \\mathcal { F } } ^ { \\prime }$ . This implies that the fairness of the feature $f$ cannot be evaluated without context. We show that this phenomena holds for a general class of 317 features that satisfy some non-triviality properties (That on the one hand do not reveal too much 318 information about group membership and labels (non-committing), and on the other hand does not 319 reveal identity when label and group information is given ( $k$ -anonymity [13])). The exact definitions 320 of these properties can be found in the appendix. ",
958
+ "bbox": [
959
+ 138,
960
+ 786,
961
+ 825,
962
+ 911
963
+ ],
964
+ "page_idx": 6
965
+ },
966
+ {
967
+ "type": "text",
968
+ "text": "Theorem 2 (Context-relevance for fairness of features) For every 6-anonymous non-committing feature 322 $f$ , there exists a probability function $P$ over $X$ and feature sets $\\mathcal { F }$ and ${ \\mathcal { F } } ^ { \\prime }$ such that: ",
969
+ "bbox": [
970
+ 148,
971
+ 92,
972
+ 825,
973
+ 119
974
+ ],
975
+ "page_idx": 7
976
+ },
977
+ {
978
+ "type": "text",
979
+ "text": "• The accuracy-driven fairness w.r.t $L ^ { E O }$ , $P$ and $\\alpha = 0 . 5$ of ${ \\mathcal { F } } \\cup \\{ f \\}$ is greater than that of $\\mathcal { F }$ , i.e. ",
980
+ "bbox": [
981
+ 214,
982
+ 128,
983
+ 825,
984
+ 159
985
+ ],
986
+ "page_idx": 7
987
+ },
988
+ {
989
+ "type": "equation",
990
+ "img_path": "images/ea7705a506fb1e996b7f490faf80ad569d0e470ab9d8e080c45195373f49a7d8.jpg",
991
+ "text": "$$\nU _ { a c c } ^ { \\alpha } ( \\mathcal { F } \\cup \\{ f \\} ) < U _ { a c c } ^ { \\alpha } ( \\mathcal { F } )\n$$",
992
+ "text_format": "latex",
993
+ "bbox": [
994
+ 436,
995
+ 159,
996
+ 619,
997
+ 176
998
+ ],
999
+ "page_idx": 7
1000
+ },
1001
+ {
1002
+ "type": "text",
1003
+ "text": "Thus, deleting $f$ in this context will increase unfairness. ",
1004
+ "bbox": [
1005
+ 230,
1006
+ 180,
1007
+ 598,
1008
+ 195
1009
+ ],
1010
+ "page_idx": 7
1011
+ },
1012
+ {
1013
+ "type": "text",
1014
+ "text": "• The accuracy-driven fairness w.r.t $L ^ { E O }$ , $P$ and $\\alpha = 0 . 5$ of $\\mathcal { F } ^ { \\prime } \\cup \\{ f \\}$ is less than that of ${ \\mathcal { F } } ^ { \\prime }$ , i.e. ",
1015
+ "bbox": [
1016
+ 217,
1017
+ 202,
1018
+ 825,
1019
+ 231
1020
+ ],
1021
+ "page_idx": 7
1022
+ },
1023
+ {
1024
+ "type": "equation",
1025
+ "img_path": "images/d5e453fe441e04ff7b10c77f15bd9ab89a31cded7cfdad2045108b5901a3d885.jpg",
1026
+ "text": "$$\nU _ { a c c } ^ { \\alpha } ( { \\mathcal { F } } ^ { \\prime } \\cup \\{ f \\} ) > U _ { a c c } ^ { \\alpha } ( { \\mathcal { F } } ^ { \\prime } )\n$$",
1027
+ "text_format": "latex",
1028
+ "bbox": [
1029
+ 431,
1030
+ 231,
1031
+ 624,
1032
+ 248
1033
+ ],
1034
+ "page_idx": 7
1035
+ },
1036
+ {
1037
+ "type": "text",
1038
+ "text": "Thus, deleting $f$ in this context will decrease unfairness. ",
1039
+ "bbox": [
1040
+ 230,
1041
+ 252,
1042
+ 601,
1043
+ 267
1044
+ ],
1045
+ "page_idx": 7
1046
+ },
1047
+ {
1048
+ "type": "text",
1049
+ "text": "This phenomenon can happen even if $\\{ f \\}$ is adversarially fair w.r.t. to $P$ and equalized odds. ",
1050
+ "bbox": [
1051
+ 168,
1052
+ 279,
1053
+ 781,
1054
+ 295
1055
+ ],
1056
+ "page_idx": 7
1057
+ },
1058
+ {
1059
+ "type": "text",
1060
+ "text": "5.2 The fairness of a feature for different notions of fairness ",
1061
+ "text_level": 1,
1062
+ "bbox": [
1063
+ 171,
1064
+ 310,
1065
+ 601,
1066
+ 325
1067
+ ],
1068
+ "page_idx": 7
1069
+ },
1070
+ {
1071
+ "type": "text",
1072
+ "text": "We will now briefly discuss the effect of a single feature on fairness for the cases of a malicious or a fairness-driven decision makers. In contrast to the accuracy-driven case, adding features has a monotone effect on the fairness of a fairness-driven and the malicious decision maker. As Theorem 3, adding any feature in the malicious case, will only give the decision maker more information and thus give the decision maker more chances of discrimination. Similarly in the fairness driven case, any feature will only give the decision maker another option for fair decision making (Theorem 4). However, the quantitative effect of adding a feature on the unfairness can still range from having no effect to achieving perfect fairness/unfairness for both the fairness-driven and the malicious case. As in the accuracy-driven case, we will show (Theorem 4 and Theorem 3) that it is impossible to evaluate the quantitative effect of a feature on the fairness of a representation without considering the context of other available features. ",
1073
+ "bbox": [
1074
+ 173,
1075
+ 337,
1076
+ 826,
1077
+ 489
1078
+ ],
1079
+ "page_idx": 7
1080
+ },
1081
+ {
1082
+ "type": "text",
1083
+ "text": "Theorem 3 1. For every distribution $P$ and feature $f$ , there exists a feature set $\\mathcal { F }$ , such that adding $f$ will not impact the fairness of the distribution, e.g. $U _ { a d v } ( \\mathcal { F } ) = U _ { a d v } ( \\mathcal { F } \\cup \\{ f \\} )$ . ",
1084
+ "bbox": [
1085
+ 174,
1086
+ 502,
1087
+ 823,
1088
+ 531
1089
+ ],
1090
+ "page_idx": 7
1091
+ },
1092
+ {
1093
+ "type": "text",
1094
+ "text": "2. There exist distributions $P$ , features $f$ and ${ \\mathcal { F } } ^ { \\prime }$ , such that $U _ { a d v } ( \\mathcal { F } ^ { \\prime } ) = 0$ and $U _ { a d v } ( \\{ f \\} ) = 0$ but $U _ { a d v } ( { \\mathcal { F } } ^ { \\prime } \\cup \\{ f \\} ) = 1$ . ",
1095
+ "bbox": [
1096
+ 205,
1097
+ 539,
1098
+ 825,
1099
+ 569
1100
+ ],
1101
+ "page_idx": 7
1102
+ },
1103
+ {
1104
+ "type": "text",
1105
+ "text": "Theorem 4 1. For any feature $f$ and any featureset $\\mathcal { F }$ we have $U _ { a d v } ( \\mathcal { F } ) \\leq U _ { a d v } ( \\mathcal { F } \\cup \\{ f \\} )$ . Similarly, if the representation $\\mathcal { F }$ is $( \\epsilon , \\eta )$ -fairness-enabling, the representation ${ \\mathcal { F } } \\cup \\{ f \\}$ is also $( \\epsilon , \\eta )$ -fairness-enabling. ",
1106
+ "bbox": [
1107
+ 176,
1108
+ 580,
1109
+ 826,
1110
+ 623
1111
+ ],
1112
+ "page_idx": 7
1113
+ },
1114
+ {
1115
+ "type": "text",
1116
+ "text": "2. For every distribution $P$ and every feature $f$ , there exists a feature set $\\mathcal { F }$ , such that ${ \\mathcal { F } } \\cup \\{ f \\}$ is $( \\eta , \\epsilon )$ -fairness-enabling, if and only if $\\mathcal { F }$ is $( \\epsilon , \\eta )$ -fairness-enabling. Furthermore, there exists a distribution $P$ , a feature $f$ and $a$ feature set ${ \\mathcal { F } } ^ { \\prime }$ , such that both ${ \\mathcal { F } } ^ { \\prime }$ and $\\{ f \\}$ are not $( \\epsilon , \\eta )$ -fairness-enabling for any $\\begin{array} { r } { \\epsilon , \\eta < \\frac { 1 } { 2 } } \\end{array}$ , but such that $\\mathcal { F } ^ { \\prime } \\cup \\{ f \\}$ is $( 0 , 0 )$ -fairness-enabling. ",
1117
+ "bbox": [
1118
+ 210,
1119
+ 632,
1120
+ 823,
1121
+ 690
1122
+ ],
1123
+ "page_idx": 7
1124
+ },
1125
+ {
1126
+ "type": "text",
1127
+ "text": "While this section focused on fairness with respect to equalized odds, we note that many of these results can be replicated for other notions of fairness. For a more general version of Theorem 3, which takes into account other fairness notions, like demographic parity, we will refer the reader to the Appendix. ",
1128
+ "bbox": [
1129
+ 142,
1130
+ 700,
1131
+ 825,
1132
+ 757
1133
+ ],
1134
+ "page_idx": 7
1135
+ },
1136
+ {
1137
+ "type": "text",
1138
+ "text": "6 Impossibility of adversarially fair representations with respect to predictive rate parity ",
1139
+ "text_level": 1,
1140
+ "bbox": [
1141
+ 174,
1142
+ 777,
1143
+ 745,
1144
+ 813
1145
+ ],
1146
+ "page_idx": 7
1147
+ },
1148
+ {
1149
+ "type": "text",
1150
+ "text": "We now show that not all acceptable notions of group fairness always allow a adversarially fair representation, even in a single-task setting. One such notion is predictive rate parity. ",
1151
+ "bbox": [
1152
+ 169,
1153
+ 827,
1154
+ 823,
1155
+ 854
1156
+ ],
1157
+ "page_idx": 7
1158
+ },
1159
+ {
1160
+ "type": "text",
1161
+ "text": "Definition 6 (Predictive rate parity $( P R P ) ) A$ classifier $h$ is considered PRP fair w.r.t. to a marginal data distribution $P$ and true classification $t$ if the random variable $t ( x )$ is independent of the group membership, $G ( x )$ given the classification $h ( x )$ . We denote this fairness objective with $L ^ { P r e d }$ . ",
1162
+ "bbox": [
1163
+ 173,
1164
+ 867,
1165
+ 825,
1166
+ 911
1167
+ ],
1168
+ "page_idx": 7
1169
+ },
1170
+ {
1171
+ "type": "text",
1172
+ "text": "This theorem results from the fact that the classifier which maps every instance to label 1 is not fair w.r.t. to $L ^ { P r e d }$ if $P$ does not have equal success rates. The quantitative version of predictive rate parity as well as a more general version of Theorem 5, giving a characterization of adversarial fairness in the case of equal success rates can be found in the appendix. ",
1173
+ "bbox": [
1174
+ 147,
1175
+ 132,
1176
+ 825,
1177
+ 188
1178
+ ],
1179
+ "page_idx": 8
1180
+ },
1181
+ {
1182
+ "type": "text",
1183
+ "text": "370 7 Conclusion ",
1184
+ "text_level": 1,
1185
+ "bbox": [
1186
+ 147,
1187
+ 208,
1188
+ 299,
1189
+ 224
1190
+ ],
1191
+ "page_idx": 8
1192
+ },
1193
+ {
1194
+ "type": "text",
1195
+ "text": "In this paper we introduced a general taxonomy of notions of fair representation, taking into consideration both different objectives of decision makers using the representation, and different group fairness notions. Within this taxonomy we showed several impossibility results about fair representation learning. ",
1196
+ "bbox": [
1197
+ 142,
1198
+ 239,
1199
+ 825,
1200
+ 296
1201
+ ],
1202
+ "page_idx": 8
1203
+ },
1204
+ {
1205
+ "type": "text",
1206
+ "text": "Our main result addressed the existence of generic fair representations and of fair transfer learning. We show that even seemingly task-independent fairness notions like demographic parity are vulnerable to shifts in marginals between tasks. We conclude the impossibility of having generic data representations that guarantee (even just) DP fairness with respects to tasks whose marginal distributions are not considered when designing the representation. Furthermore, we show that it is impossible to have an adversarially fair representation with respect to several tasks and the equalized odds notion of fairness, if those tasks do not all fulfill statistical parity. These insights stand in contrast to the impression arising from recent papers [10] that claim to learned transferable fair decisions. ",
1207
+ "bbox": [
1208
+ 171,
1209
+ 303,
1210
+ 825,
1211
+ 412
1212
+ ],
1213
+ "page_idx": 8
1214
+ },
1215
+ {
1216
+ "type": "text",
1217
+ "text": "We also considered the question of \"fairness of a feature\", which has been used in legal scenarios. We showed that for notions of decision-making fairness other than demographic parity, the fairness of a single feature is an ill defined notion. Namely, the impact of a feature on the fairness of a decision cannot be determined without considering the other features of the representation. ",
1218
+ "bbox": [
1219
+ 174,
1220
+ 419,
1221
+ 825,
1222
+ 474
1223
+ ],
1224
+ "page_idx": 8
1225
+ },
1226
+ {
1227
+ "type": "text",
1228
+ "text": "Lastly, we show that some fairness notions, like predictive rate parity, do not always allow an adversarially fair representation, even if it is just for a single task. ",
1229
+ "bbox": [
1230
+ 166,
1231
+ 481,
1232
+ 823,
1233
+ 510
1234
+ ],
1235
+ "page_idx": 8
1236
+ },
1237
+ {
1238
+ "type": "text",
1239
+ "text": "References ",
1240
+ "text_level": 1,
1241
+ "bbox": [
1242
+ 173,
1243
+ 530,
1244
+ 266,
1245
+ 546
1246
+ ],
1247
+ "page_idx": 8
1248
+ },
1249
+ {
1250
+ "type": "text",
1251
+ "text": "[1] Tameem Adel, Isabel Valera, Zoubin Ghahramani, and Adrian Weller. One-network adversarial fairness. In AAAI, 2019. \n[2] Alex Beutel, Jilin Chen, Zhe Zhao, and Ed H. Chi. Data decisions and theoretical implications when adversarially learning fair representations. CoRR, abs/1707.00075, 2017. \n[3] Elliot Creager, David Madras, Joern-Henrik Jacobsen, Marissa Weis, Kevin Swersky, Toniann Pitassi, and Richard Zemel. Flexibly fair representation learning by disentanglement. In ICML, 2019. \n[4] Jennifer L Doleac and Benjamin Hansen. Does “ban the box” help or hurt low-skilled workers? statistical discrimination and employment outcomes when criminal histories are hidden. Technical report, National Bureau of Economic Research, 2016. \n[5] Flávio du Pin Calmon, Dennis Wei, Bhanukiran Vinzamuri, Karthikeyan Natesan Ramamurthy, and Kush R. Varshney. Optimized pre-processing for discrimination prevention. In Advances in Neural Information Processing Systems 30. \n[6] Harrison Edwards and Amos J. Storkey. Censoring representations with an adversary. In ICLR, 2016. \n[7] Nina Grgic-Hlaca, Muhammad Bilal Zafar, Krishna P. Gummadi, and Adrian Weller. Beyond distributive fairness in algorithmic decision making: Feature selection for procedurally fair learning. In AAAI, 2018. \n[8] Moritz Hardt, Eric Price, and Nathan Srebro. Equality of opportunity in supervised learning. In NIPS, 2016. \n[9] Jon M. Kleinberg, Sendhil Mullainathan, and Manish Raghavan. Inherent trade-offs in the fair determination of risk scores. CoRR, abs/1609.05807, 2016. \n[10] David Madras, Elliot Creager, Toniann Pitassi, and Richard Zemel. Learning adversarially fair and transferable representations. In ICML, 2018. \n[11] Daniel McNamara, Cheng Soon Ong, and Robert C Williamson. Costs and benefits of fair representation learning. In Proceedings of the 2019 AAAI/ACM Conference on AI, Ethics, and Society, pages 263–270, 2019. \n[12] Luca Oneto, Michele Donini, Andreas Maurer, and Massimiliano Pontil. Learning fair and transferable representations. arXiv preprint arXiv:1906.10673, 2019. \n[13] Pierangela Samarati and Latanya Sweeney. Protecting privacy when disclosing information: k-anonymity and its enforcement through generalization and suppression. Technical report, 1998. \n[14] Jiaming Song, Pratyusha Kalluri, Aditya Grover, Shengjia Zhao, and Stefano Ermon. Learning controllable fair representations. In The 22nd International Conference on Artificial Intelligence and Statistics, pages 2164–2173, 2019. \n[15] Rich Zemel, Yu Wu, Kevin Swersky, Toni Pitassi, and Cynthia Dwork. Learning fair representations. In ICML, 2013. \n[16] Brian Hu Zhang, Blake Lemoine, and Margaret Mitchell. Mitigating unwanted biases with adversarial learning. In AAAI/ACM Conference on AI, Ethics, and Society, 2018. \n[17] Han Zhao, Amanda Coston, Tameem Adel, and Geoffrey J. Gordon. Conditional learning of fair representations. CoRR, abs/1910.07162, 2019. \n[18] Han Zhao and Geoffrey J. Gordon. Inherent tradeoffs in learning fair representations. CoRR, abs/1906.08386, 2019. ",
1252
+ "bbox": [
1253
+ 163,
1254
+ 554,
1255
+ 828,
1256
+ 912
1257
+ ],
1258
+ "page_idx": 8
1259
+ },
1260
+ {
1261
+ "type": "text",
1262
+ "text": "",
1263
+ "bbox": [
1264
+ 160,
1265
+ 92,
1266
+ 828,
1267
+ 503
1268
+ ],
1269
+ "page_idx": 9
1270
+ },
1271
+ {
1272
+ "type": "text",
1273
+ "text": "Checklist ",
1274
+ "text_level": 1,
1275
+ "bbox": [
1276
+ 173,
1277
+ 526,
1278
+ 254,
1279
+ 542
1280
+ ],
1281
+ "page_idx": 9
1282
+ },
1283
+ {
1284
+ "type": "text",
1285
+ "text": "1. For all authors... ",
1286
+ "bbox": [
1287
+ 214,
1288
+ 554,
1289
+ 339,
1290
+ 568
1291
+ ],
1292
+ "page_idx": 9
1293
+ },
1294
+ {
1295
+ "type": "text",
1296
+ "text": "(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] We provide theorems with proofs for all claims made in the introduction and appendix \n(b) Did you describe the limitations of your work? [Yes] The introduction clearly details the scope of our paper \n(c) Did you discuss any potential negative societal impacts of your work? [Yes] We discuss potential negative societal impacts at the end of the introduction. \n(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes] ",
1297
+ "bbox": [
1298
+ 238,
1299
+ 571,
1300
+ 825,
1301
+ 704
1302
+ ],
1303
+ "page_idx": 9
1304
+ },
1305
+ {
1306
+ "type": "text",
1307
+ "text": "2. If you are including theoretical results... ",
1308
+ "bbox": [
1309
+ 215,
1310
+ 709,
1311
+ 493,
1312
+ 723
1313
+ ],
1314
+ "page_idx": 9
1315
+ },
1316
+ {
1317
+ "type": "text",
1318
+ "text": "(a) Did you state the full set of assumptions of all theoretical results? [Yes] Every result clearly states the assumptions used. In one instance (Theorem 2) we refer to a detailed definition of the assumptions in the appendix. \n(b) Did you include complete proofs of all theoretical results? [Yes] Many of them were refered to the appendix ",
1319
+ "bbox": [
1320
+ 238,
1321
+ 728,
1322
+ 825,
1323
+ 800
1324
+ ],
1325
+ "page_idx": 9
1326
+ },
1327
+ {
1328
+ "type": "text",
1329
+ "text": "3. If you ran experiments... ",
1330
+ "bbox": [
1331
+ 214,
1332
+ 805,
1333
+ 393,
1334
+ 819
1335
+ ],
1336
+ "page_idx": 9
1337
+ },
1338
+ {
1339
+ "type": "text",
1340
+ "text": "(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [N/A] \n(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [N/A] \n(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [N/A] ",
1341
+ "bbox": [
1342
+ 238,
1343
+ 823,
1344
+ 825,
1345
+ 912
1346
+ ],
1347
+ "page_idx": 9
1348
+ },
1349
+ {
1350
+ "type": "text",
1351
+ "text": "(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [N/A] ",
1352
+ "bbox": [
1353
+ 236,
1354
+ 90,
1355
+ 823,
1356
+ 119
1357
+ ],
1358
+ "page_idx": 10
1359
+ },
1360
+ {
1361
+ "type": "text",
1362
+ "text": "4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... ",
1363
+ "bbox": [
1364
+ 212,
1365
+ 123,
1366
+ 823,
1367
+ 138
1368
+ ],
1369
+ "page_idx": 10
1370
+ },
1371
+ {
1372
+ "type": "text",
1373
+ "text": "(a) If your work uses existing assets, did you cite the creators? [N/A] \n(b) Did you mention the license of the assets? [N/A] \n(c) Did you include any new assets either in the supplemental material or as a URL? [N/A] \n(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A] \n(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A] ",
1374
+ "bbox": [
1375
+ 238,
1376
+ 142,
1377
+ 825,
1378
+ 265
1379
+ ],
1380
+ "page_idx": 10
1381
+ },
1382
+ {
1383
+ "type": "text",
1384
+ "text": "5. If you used crowdsourcing or conducted research with human subjects... ",
1385
+ "bbox": [
1386
+ 214,
1387
+ 268,
1388
+ 705,
1389
+ 282
1390
+ ],
1391
+ "page_idx": 10
1392
+ },
1393
+ {
1394
+ "type": "text",
1395
+ "text": "(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A] \n(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A] \n(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A] ",
1396
+ "bbox": [
1397
+ 238,
1398
+ 286,
1399
+ 825,
1400
+ 376
1401
+ ],
1402
+ "page_idx": 10
1403
+ }
1404
+ ]
parse/train/qWtmNpgjD5K/qWtmNpgjD5K_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/qWtmNpgjD5K/qWtmNpgjD5K_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/qrwe7XHTmYb/qrwe7XHTmYb.md ADDED
@@ -0,0 +1,480 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GSHARD: SCALING GIANT MODELS WITH CONDITIONAL COMPUTATION AND AUTOMATIC SHARDING
2
+
3
+ Dmitry Lepikhin lepikhin@google.com
4
+
5
+ HyoukJoong Lee hyouklee@google.com
6
+
7
+ Yuanzhong Xu yuanzx@google.com
8
+
9
+ Dehao Chen dehao@google.com
10
+
11
+ Orhan Firat orhanf@google.com
12
+
13
+ Yanping Huang huangyp@google.com
14
+
15
+ Maxim Krikun krikun@google.com
16
+
17
+ Noam Shazeer noam@google.com
18
+
19
+ Zhifeng Chen zhifengc@google.com
20
+
21
+ # ABSTRACT
22
+
23
+ Neural network scaling has been critical for improving the model quality in many real-world machine learning applications with vast amounts of training data and compute. Although this trend of scaling is affirmed to be a sure-fire approach for better model quality, there are challenges on the path such as the computation cost, ease of programming, and efficient implementation on parallel devices. In this paper we demonstrate conditional computation as a remedy to the above mentioned impediments, and demonstrate its efficacy and utility. We make extensive use of GShard, a module composed of a set of lightweight annotation APIs and an extension to the XLA compiler to enable large scale models with up to trillions of parameters. GShard and conditional computation enable us to scale up multilingual neural machine translation Transformer model with Sparsely-Gated Mixture-ofExperts. We demonstrate that such a giant model with 600 billion parameters can efficiently be trained on 2048 TPU v3 cores in 4 days to achieve far superior quality for translation from 100 languages to English compared to the prior art.
24
+
25
+ # 1 INTRODUCTION
26
+
27
+ Scaling neural networks brings dramatic quality gains over a wide array of machine learning problems such as computer vision, language understanding and neural machine translation (Devlin et al., 2018; Mahajan et al., 2018; Arivazhagan et al., 2019; Huang et al., 2019; Brown et al., 2020b). This general tendency motivated recent studies to scrutinize the factors playing a critical role in the success of scaling, including the amounts of training data, the model size, and the computation being utilized as found by past studies (Advani & Saxe, 2017; Hestness et al., 2019; Geiger et al., 2020). While the final model quality was found to have a power-law relationship with these factors (Hestness et al., 2017; Kaplan et al., 2020), the significant quality gains brought by larger models also came with various practical challenges. Training efficiency, which we define as the amount of compute and time used to achieve a superior model quality against the best system existed, is oftentimes left out.
28
+
29
+ In this study, we strive for improving the model quality while being training efficiently. We built a 600 billion parameters sequence-to-sequence Transformer model with Sparsely-Gated Mixture-of-Experts layers, which enjoys sub-linear computation cost and $O ( 1 )$ compilation time. We trained this model with 2048 TPU v3 devices for 4 days on a multilingual machine translation task and achieved far superior translation quality compared to prior art when translating 100 languages to English with a single non-ensemble model. We conducted experiments with various model sizes and found that the translation quality increases as the model gets bigger, yet the total wall-time to train only increases sub-linearly with respect to the model size, as illustrated in Figure 1. To train such an extremely large model, we relied on the following key design choices.
30
+
31
+ ![](images/581bc73b5466c437b728b5f28ece98aa3e409d086137120d64c6efda90b55fbd.jpg)
32
+ Figure 1: Multilingual translation quality (average $\Delta$ BLEU comparing to bilingual baselines) improved as MoE model size grows up to 600B, while the end-to-end training cost (in terms of TPU v3 core-year) only increased sublinearly. Increasing the model size from 37.5B to 600B (16x), results in computation cost increase from 6 to 22 years (3.6x). The 600B parameters model that achieved the best translation quality was trained with 2048 TPU v3 cores for 4 days, a total cost of 22 TPU v3 core-years. In contrast, training all 100 bilingual baseline models would have required 29 TPU v3 core-years. Our best quality dense single Transformer model (2.3B parameters) achieving $\Delta$ BLEU of 6.1, was trained with GPipe for a total of 235.5 TPU v3 core-years.
33
+
34
+ Conditional computation First, model architecture should be designed to keep the computation and communication requirements sublinear in the model capacity. Conditional computation enables us to satisfy training and inference efficiency by having a sub-network activated on the per-input basis. Shazeer et al. (2017) has shown that scaling RNN model capacity by adding Sparsely Gated Mixture-of-Experts (MoE) layers allowed to achieve improved results with sub-linear cost. We therefore present our approach to extend Transformer architecture with MoE layers in this study.
35
+
36
+ GShard Annotation Second, the model description should be separated from the partitioning implementation and optimization. This separation of concerns let model developers focus on the network architecture and flexibly change the partitioning strategy, while the underlying system applies semantic-preserving transformations and implements efficient parallel execution. To this end we propose a module, GShard, which only requires the user to annotate a few critical tensors in the model with partitioning policies. It consists of a set of simple APIs for annotations, and a compiler extension in XLA for automatic parallelization. Model developers write models as if there is a single device with huge memory and computation capacity, and the compiler automatically partitions the computation for the target based on the user annotations and their own heuristics.
37
+
38
+ # 2 MODEL
39
+
40
+ The Transformer (Vaswani et al., 2017) architecture has been widely used for natural language processing. We scale Transformer with conditional computation by replacing every other feedforward layer with a sparsely activated Position-wise Mixture of Experts (MoE) layer (Shazeer et al., 2017), with a variant of top-2 gating in both the encoder and the decoder (Figure 2). Each subword token in the training example activates a sub-network of the MoE Transformer during both training and inference. The size of the sub-network is roughly independent of the number of experts per MoE Layer, allowing sublinear scaling of the computation cost.
41
+
42
+ # 2.1 POSITION-WISE MIXTURE-OF-EXPERTS LAYER
43
+
44
+ The Mixture-of-Experts (MoE) layers used in our model differ from Shazeer et al. (2017)’s in the sparse gating function and the auxiliary loss being used. A MoE layer for Transformer consists of $E$ feed-forward networks $\mathrm { F F N } _ { 1 } \dots \mathrm { F F N } _ { E }$ , each of which outputs $w o _ { e } \cdot \mathrm { R e L U } ( w i _ { e } \cdot x _ { s } )$ , where $x _ { s }$ is the input token to the MoE layer, $w i$ and wo being the input and output projection matrices for the feed-forward layer (an expert) with shapes $[ M , H ]$ and $[ H , M ]$ , respectively. The output of a MoE layer is the combination of the expert outputs $\begin{array} { r } { \sum _ { e = 1 } ^ { E } \mathcal { G } _ { s , e } \cdot \mathrm { F F N } _ { e } ( x _ { s } ) } \end{array}$ , where the vector $\mathcal { G } _ { s , E }$ is computed by a gating function $\mathrm { G A T E } ( \cdot )$ . We choose to let each token dispatched to at most two experts. The corresponding gating entries $\mathcal { G } _ { s , e }$ become non-zeros, representing how much an expert contributes to the final network output.
45
+
46
+ ![](images/7177f066bf2743fda2daede5af9ea645b846f58091fa31efd75c0f1df16089d2.jpg)
47
+ Figure 2: Illustration of scaling of MoE Transformer Encoder Layers. Decoder modification is similar. (a) Standard Transformer. (b) Replacing every other feed forward layer with a MoE layer (c) The MoE layer is sharded across multiple devices, while all other layers are replicated.
48
+
49
+ The gating function $\mathrm { G A T E } ( \cdot )$ is critical to the MoE layer, which is modeled by a softmax activation function to indicate the weights of each expert in processing incoming tokens. We designed a novel efficient gating function with the following mechanisms (details illustrated in Algorithm 1).
50
+
51
+ Load balancing Naively picking top- $k$ experts from the softmax probability distribution leads to load imbalance problem for training as shown in Shazeer et al. (2017). Most tokens would have been dispatched to a small number of experts, leaving other experts insufficiently trained. To ensure the load is balanced, we enforce that the number of tokens processed by one expert is below some uniform threshold called expert capacity. Assuming $N$ total tokens in a batch and at most two experts per token, then the expert capacity $C$ is set to be $O ( N / E )$ . GATE(·) keeps a running counter $c _ { e }$ for how many tokens are dispatched to an expert. When both experts selected by a token already exceed their capacity, the token is considered as an overflowed token, where $\mathcal { G } _ { s , E }$ degenerates into a zero vector. Such tokens will be passed on to the next layer via residual connections. The introduction of the fixed expert capacity instead of loading balancing functions in Shazeer et al. (2017) allows us to run parallel execution of gating function as described blow.
52
+
53
+ Local dispatching for parallel gating Load balancing required the token assignments of one expert dependent on assignments of the other experts. The original gating function proposed by (Shazeer et al., 2017) had to be implemented sequentially, especially under the static shape constraints on TPUs. In our study, we distributed thousands of experts over thousands of devices, a sequential implementation of the gating function would keep most of the devices idle most of the time. Instead, we propose a new $\mathrm { G A T E } ( \cdot )$ function that partitions all tokens in a training batch evenly into $G$ local groups, i.e., each group contains $S = N / G$ tokens for local dispatching. All local groups are processed independently in parallel. Each group is given a fractional capacity of each expert, $C = 2 N / ( G \cdot E )$ , to ensure that at most this many tokens are dispatched to an expert. In general, increasing the expect capacity $C$ decreases the number of overflowed tokens thus improves the model quality. Since $G \times C$ is a constant, however, the higher capacity leads to smaller number of groups which hurts the training throughput by limiting the number of parallel gating execution. In this way, we can ensure that expert capacity is still enforced and the overall load is balanced. With fixed expert capacity and local dispatching, we are able to speed up the gating function by $O ( G )$ times.
54
+
55
+ Auxiliary loss Following Shazeer et al. (2017), we define a new differentiable auxiliary loss term $\ell _ { a u x }$ to enforce the load balancing. It is added to the overall loss function of the model $\mathcal { L } = \ell _ { o r i } + k * \ell _ { a u x }$ with a constant multiplier $k$ , where $\ell _ { a u x }$ is defined in line (13) of algorithm 1, and the term $c _ { e } / S$ represents the fraction of input routed to each expert. We replace the mean square $( c _ { e } / S ) ^ { 2 }$ with
56
+
57
+ # Algorithm 1: Group-level top-2 gating with auxiliary loss
58
+
59
+ Data: $x _ { S }$ , a group of tokens of size $S$ Data: $C$ , Expert capacity allocated to this group Result: $\mathcal { G } _ { S , E }$ , group combine weights Result: $\ell _ { a u x }$ , group auxiliary loss (1) for $e \gets 1$ to $E$ do (2) $\begin{array} { l } { c _ { e } \gets 0 } \\ { g _ { S , e } \gets s o f t m a x ( w g \cdot x _ { S } ) } \\ { m _ { e } \gets \frac { 1 } { S } \sum _ { s = 1 } ^ { S } g _ { s , e } } \end{array}$ $\triangleright$ gating decisions per expert (3) . gates per token per expert, wg are trainable weights (4) . mean gates per expert (5) end (6) for $s \gets 1$ to $S$ do (7) $| \begin{array} { l } { \begin{array} { l } { g 1 , e 1 , g 2 , e 2 = t o p _ { - } 2 ( \{ g _ { s , e } | e = 1 \cdots E \} ) } \\ { g 1 g 1 / ( g 1 + g 2 ) } \\ { c c _ { e 1 } } \\ { \mathbf { i f } c _ { e 1 } < C \mathbf { \ t h e n } } \\ { | \begin{array} { l } { \mathcal { G } _ { s , e 1 } g 1 } \\ { \mathbf { e n d } } \end{array} } \end{array} } \end{array} $ . top-2 gates and expert indices (8) . normalized $g 1$ (9) . position in e1 expert buffer (10) (11) . e1 expert combine weight for $x _ { s }$ (12) (13) $\triangleright$ incrementing e1 expert decisions count (14) end (15 ) $\begin{array} { r } { \ell _ { a u x } = \frac { 1 } { E } \sum _ { e = 1 } ^ { E } \frac { c _ { e } } { S } \cdot m _ { e } } \end{array}$ (16) for $s \gets 1$ to $S$ do (17) $\begin{array} { r l } { | } & { { } g 1 , e 1 , g 2 , e 2 = t o p _ { - } 2 ( \{ g _ { s , e } | e = 1 \cdots E \} ) } \end{array}$ . top-2 gates and expert indices (18) $g 2 g 2 / ( g 1 + g 2 )$ . normalized $g 2$ (19) rnd ← uniform(0, 1) . dispatch to second-best expert with probability $\propto 2 \cdot g 2$ (20) $c \gets c _ { e 2 }$ $\triangleright$ position in $e 2$ expert buffer (21) if $c < C \land 2 \cdot g 2 > r n d$ then (22) $| \quad g _ { s , e 2 } \gets g 2$ . $e 2$ expert combine weight for $x _ { s }$ (23) end (24) $c _ { e 2 } c + 1$ (25) end
60
+
61
+ differentiable approximation $m _ { e } ( c _ { e } / S )$ , which can provide better numerical stability since it can be optimized with gradient descent.
62
+
63
+ Random routing Intuitively, the output $y _ { s }$ is a weighted average of what selected experts return. If the weight for the 2nd expert is very small, we can simply ignore the 2nd expert to conserve the overall expert capacity. Hence, in addition to respecting the expert capacity constraint, GATE(·) dispatches to the 2nd-best expert with the probability proportional to its weight $g _ { 2 }$ . We observed much less overflowed tokens thus better accuracy with random routing for models at the small scale. We then adopted this approach for our experiments at large scales.
64
+
65
+ # 2.2 HIGHLY PARALLEL IMPLEMENTATION USING GSHARD
66
+
67
+ To implement the model in Section 2.1 efficiently on a cluster of devices, we first express the model in terms of linear algebra operations, which are highly tailored and optimized in our software stack TensorFlow (Abadi et al., 2016) and the hardware platform (TPU).
68
+
69
+ Our model implementation (Algorithm 2) views the whole accelerator cluster as a single device and expresses its core algorithm in a few tensor operations independent of the setup of the cluster. We extensively used tf.einsum, the Einstein summation notation (Einstein, 1923), to concisely express the model. Top2Gating in Algorithm 2 computes the union of all group-local $\mathcal { G } _ { S , E }$ described in the gating Algorithm 1. combine_weights is a 4-D tensor with shape $[ G , S , E , C ]$ , whose element value becomes non-zero when the input token $s$ in group $g$ is sent to expert $e$ at capacity buffer position $c$ For a specific $g$ and $s$ , a slice combine_weight[g, $s , : , : J$ contains at most two non-zero values. Binary dispatch_mask is produced from combine_weights by simply setting all non-zero values to 1.
70
+
71
+ To scale the computation to a cluster with $D$ devices, we choose the number of groups $G$ and the number of experts $E$ proportional to $D$ . With $C E = O ( 2 S )$ and the number of tokens per group $S$ independent of $D$ , the model dimension $M$ and the feed-forward hidden dimension $H$ , the total number of floating point operations (FLOPS) per device in Algorithm 2:
72
+
73
+ $$
74
+ \begin{array} { r l } & { \begin{array} { l l } { F L O P S _ { \mathrm { S o f m a x } } + F L O P S _ { \mathrm { T o p 2 G a t i n g } } + F L O P S _ { \mathrm { D i s p a t e h l C o m b i n e } } + F L O P S _ { \mathrm { F F N } } } \\ { = O ( G S M E ) / D + O ( G S E C ) / D } & { + O ( G S M E C ) / D } \\ { = O ( D M ) } & { + O ( 2 ) } \end{array} } & { \begin{array} { l l } { + O ( 2 M ) } & { } \\ { + O ( 2 M ) } & { + O ( 2 H M ) } \end{array} } \end{array}
75
+ $$
76
+
77
+ Algorithm 2: Forward pass of the Positions-wise MoE layer. The underscored letter (e.g., G and E) indicates the dimension along which a tensor will be partitioned.
78
+
79
+ 1 gates $=$ softmax(einsum("GSM,ME $- >$ GSE", inputs, wg))
80
+ 2 combine_weights, dispatch_mask $=$ Top2Gating(gates)
81
+ 3 dispatched_inputs $=$ einsum("GSEC,GSM->EGCM", dispatch_mask, inputs)
82
+ 4 $\mathrm { ~ \textit ~ { ~ h ~ } ~ } =$ einsum("EGCM,EMH->EGCH", dispatched_inputs, wi)
83
+ 5 $\mathrm { ~ \textit ~ { ~ h ~ } ~ } =$ relu(h)
84
+ 6 expert_outputs $=$ einsum("EGCH,EHM->GECM", h, wo)
85
+ 7 outputs $=$ einsum("GSEC,GECM->GSM", combine_weights, expert_outputs)
86
+
87
+ The per device flops for softmax is proportional to $D$ , but in our experiments $D \leq 2 H$ for up to 16K devices so it is less than that of FFN. Consequently the total per-device $F L O P S$ could be considered independent of $D$ , satisfying sublinear scaling design requirements. In addition to the computation cost, dispatching and combining token embedding using AllToAll operators consumed√ $O ( \sqrt { D } )$ cross-device communication cost on our 2D TPU cluster. We will discuss the cost analysis and micro-benchmarks for such communication overheads in Appendix section A.3.3.
88
+
89
+ Due to the daunting size and computation demand of tensors in Algorithm 1 when we scale the number of tokens $N$ to millions and the number of experts $E$ to thousands, we have to parallelize the algorithm over many devices. To express parallelism, tensors in the linear algebra computation are annotated with sharding information using GShard APIs to selectively specify how they should be partitioned across a cluster of devices. For example, the underscored letters in Algorithm 2 specified along which dimension the tensors are partitioned. This sharding information is propagated to the compiler so that the compiler can automatically apply transformations for parallel execution. Please refer to appendix A.2 for more detailed description of the GShard module.
90
+
91
+ We express the annotated version of Algorithm 2 as below. The input tensor is split along the first dimension and the gating weight tensor is replicated. After computing the dispatched expert inputs, we apply split to change the sharding from the group $( G )$ dimension to the expert $( E )$ dimension.
92
+
93
+ 1 # Partition inputs along the first (group G) dim across D devices.
94
+ 2 + inputs $=$ split(inputs, 0, D)
95
+ 3 # Replicate the gating weights across all devices
96
+ 4 + wg $=$ replicate(wg)
97
+ 5 gates $=$ softmax(einsum("GSM,ME $- >$ GSE", inputs, wg))
98
+ 6 combine_weights, dispatch_mask $=$ Top2Gating(gates)
99
+ 7 dispatched_inputs $=$ einsum("GSEC,GSM->EGCM", dispatch_mask, inputs)
100
+ 8 # Partition dispatched inputs along expert (E) dim.
101
+ 9 + dispatched_inputs $=$ split(dispatched_inputs, 0, D)
102
+ 10 $\mathrm { ~ \textit ~ { ~ h ~ } ~ } =$ einsum("EGCM,EMH->EGCH", dispatched_inputs, wi)
103
+
104
+ where split(tensor, $d , D )$ annotates tensor to be partitioned along the $d$ dimension over D devices, and replicate(tensor) annotates tensor to be replicated across partitions. The invocations of GShard APIs such as split or replicate only adds sharding information to the tensor and does not change its logical shape. Moreover, users are not required to annotate every tensor in the program. Annotations are typically only required on a few important operators like Einsums in our model and the compiler uses iterative data-flow analysis to infer sharding for the rest of the tensors.
105
+
106
+ # 3 MASSIVELY MULTILINGUAL, MASSIVE MACHINE TRANSLATION (M4)
107
+
108
+ We chose multilingual neural machine translation (MT) (Firat et al., 2016; Johnson et al., 2017; Aharoni et al., 2019) to validate our design for efficient training with GShard. Multilingual MT, which is an inherently multi-task learning problem, aims at building a single neural network for the goal of translating multiple language pairs simultaneously. This extends the line of work Huang et al. (2019); Arivazhagan et al. (2019); Shazeer et al. (2017) towards a universal machine translation model (Bapna & Firat, 2020), a single model that can translate between more than hundred languages.
109
+
110
+ In this section, we advocate how conditional computation (Bengio et al., 2013; Davis & Arel, 2013) with sparsely gated mixture of experts fits into the above detailed desiderata and show its efficacy by scaling neural machine translation models, while keeping the training time of such massive networks practical. E.g. a 600B GShard model for M4 can process 1T tokens (source side tokens after sub-word segmentation) in 250k training steps under 4 days. We experiment with increasing the model capacity by adding more layers and more experts into the model and study the factors playing role in convergence, model quality and training efficiency. Further, we demonstrate how conditional computation can speed up the training and how sparsely gating each token through the network can efficiently be learned without any prior knowledge on task or language relatedness, exemplifying the capability of learning the gating decision directly from the data.
111
+
112
+ We focus on improving the translation quality (measured in terms of BLEU score Papineni et al. (2002)) from all 100 languages to English. This resulted in approximately 13 billion training examples to be used for model training. Our baselines are separate bilingual Neural Machine Translation models for each language pair (e.g. a single model for German-to-English), tuned depending on the available training data per-language1. Rather than displaying individual BLEU scores for each language pair, we follow the convention of placing the baselines along the $x$ -axis at zero, and report the $\Delta$ BLEU trendline of each massively multilingual model trained with GShard (see Figure 3). The $x$ -axis in Figure 3 is sorted from left-to-right in the decreasing order of amount of available training data, where the left-most side corresponds to high-resourced languages, and low-resourced languages on the right-most side respectively. We also include a variant of dense 96 layer Transformer EncoderDecoder network T(96L) trained with GPipe pipeline parallelism on the same dataset as another baseline, which took over 6 weeks to convergence on 2048 TPU v3 cores 2.
113
+
114
+ We varied the depth of the transformer network (L) and the number of experts (E) to scale the model. For depth, we tested three different options, 12 (original Transformer depth, which consists of 6 encoder and 6 decoder layers), 36 and 60 layers. For the number of experts that replaces every other feed-forward layer, we also tested three options, namely 128, 512 and 2048 experts. Note that, the number of devices used for training, is fixed to be equal to the number of experts per-layer for simplicity. Please also see the detailed description in Table 1 for model configurations. During training, we use float32 for both model weights and activations in order to ensure training stability. We also ran additional scalability experiments with MoE(2048E, 60L) with bfloat16 activations with more than one trillion model weights. We are still working on the model convergence and hence did not include the results from this trillion weight model for the sake of reproducibility.
115
+
116
+ # 3.1 RESULTS
117
+
118
+ For each experiment (rows of the Table 1), we trained the corresponding MoE Transformer model until it has seen 1 trillion $( 1 0 ^ { 1 2 } )$ tokens. The model checkpoint at this point is used in the model evaluation. We did not observe any over-fitting patterns by this point in any experiment. Instead, we observed that the training loss continued to improve if we kept training longer. We evaluated BLEU scores that the models achieved for all language pairs on a held-out test set in Figure 3.
119
+
120
+ Here we discuss the implication of each experiment on languages that have large amounts of training data (high resourced), as well as languages with limited data (low-resource). In order to improve the quality for both high- and low-resource languages simultaneously within a single model, scaled models must mitigate capacity bottleneck issue by allocating enough capacity to high-resource tasks, while amplifying the positive transfer towards low-resource tasks by facilitating sufficient parameter sharing. We loosely relate the expected learning dynamics of such systems with the long-standing memorization and generalization dilemma, which is recently studied along the lines of width vs depth scaling efforts (Cheng et al., 2016). Not only do we expect our models to generalize better to the held-out test sets, we also expect them to exhibit high transfer capability across languages as another manifestation of generalization performance Lampinen & Ganguli (2018).
121
+
122
+ ![](images/debadfe4fa5a5487f8e19c6d10d59542321e449a018cd4fd51020ca039979bf9.jpg)
123
+ Figure 3: Translation quality comparison of multilingual MoE Transformer models trained with GShard and monolingual baselines. MoE(128E, 12L) represents the model with 12 layers and 128 experts per layer. Positions along the $x$ -axis represent languages, raging from high- to low-resource. $\Delta$ BLEU represents the quality gain of a single multilingual model compared to a monolingual Transformer model trained and tuned for a specific language. MoE Transformer models trained with GShard are reported with solid trend-lines. Dashed trend-line represents a single 96 layer multilingual Transformer model T(96L) trained with GPipe on same dataset. Each trend-line is smoothed by a sliding window of 10 for clarity. (Best seen in color)
124
+
125
+ Deeper Models Bring Consistent Quality Gains Across the Board. We first investigate the relationship between the model depth and the model quality for both high- and low-resource languages. With an increasing number of per-layer experts for each experiment (128, 512 and 2048), we tripled the depth of the network for each expert size, from 12 to 36. Fig. 3 show that when the number of experts per-layer is fixed, increasing the depth (L) alone brings consistent gains for both low and high resourced languages (upwards $\Delta$ shift along the $y$ -axis), almost with a constant additive factor every time we scale the depth from 12L to 36L (2-to-3 BLEU points on average in Table 1).
126
+
127
+ Relaxing the Capacity Bottleneck Grants Pronounced Quality Gains. We also consider three models with identical depths (12L), with increasing number of experts per-layer: 128, 512 and 2048. As we increase the number of experts per-layer from 128 to 512, we notice a large jump in model quality, $+ 3 . 3$ average BLEU score across 100 languages. However again by four folds scaling of the number of experts per-layer, from 512 to 2048, yields only $+ 1 . 3$ average BLEU scores. Despite the significant quality improvement, this drop in gains hints the emergence of diminishing returns.
128
+
129
+ Given the over 100 languages considered, the multilingual model has a clear advantage on improving the low-resource tasks. On the contrary, for high-resource languages the increased number of tasks limits per-task capacity within the model, resulting in lower translation quality compared to a models trained on a single language pair. We observed in our experiments that this capacity bottleneck on task interference for high resourced languages can be relaxed by increasing the number of experts per-layer,. Interestingly increasing the depth does not help as much if the capacity bottleneck is not relaxed. For 12 layer models increase in the expert number yields larger gains for high resourced languages as opposed to earlier revealed diminishing returns for low-resourced languages. While adding more experts relaxes the capacity bottleneck, at the same time it reduces the amount of transfer due to a reduction of the shared sub-networks. Notably, $\Delta$ BLEU gains for MoE(512E, 36L) exceed ones with higher capacity, but shallower MoE(2048E, 12L). While a comparison of proportionally smaller models, shows that MoE(128E, 36L) is suboptimal compared to MoE(512E, 12L). One can conclude that scaling depth brings most quality gains only after capacity bottleneck is resolved.
130
+
131
+ Deep-Dense Models are Better at Positive Transfer towards Low-Resource Tasks. Lastly we look into the impact of the depth on low-resourced tasks as a loose corollary to our previous experiment. We include a dense model with 96 layers T(96L) trained with GPipe on the same data into our analysis. We compare T(96L) with the shallow MoE(128E, 12L) model. While the gap between the two models measured to be almost constant for the majority of the high-to-mid resourced languages, the gap grows in favor of the dense-deep T(96L) model as we get into the low-resourced regime. Following our previous statement, as the proportion of the shared sub-networks across tasks increase, which is $100 \%$ for dense T(96L), the bandwidth for transfer gets maximized and results in a comparably better quality against its shallow counterpart. The same transfer quality to the low-resourced languages can be also achieved with MoE(128E, 36L) which has 37 billion parameters.
132
+
133
+ Table 1: Performance of MoE models with different number of experts and layers.
134
+
135
+ <table><tr><td rowspan=2 colspan=1>Model</td><td rowspan=2 colspan=1>Cores</td><td rowspan=2 colspan=1>Steps/sec.</td><td rowspan=2 colspan=1>Batch sz(Tokens)</td><td rowspan=2 colspan=1>TPU coreyears</td><td rowspan=2 colspan=1>Trainingdays</td><td rowspan=2 colspan=1>BLEUavg.</td><td rowspan=1 colspan=3>Billion tokens tocross-entropy of</td></tr><tr><td rowspan=1 colspan=1>0.7</td><td rowspan=1 colspan=1>0.6</td><td rowspan=1 colspan=1>0.5</td></tr><tr><td rowspan=5 colspan=1>MoE(2048E,36L)MoE(2048E,12L)MoE(512E,36L)MoE(512E,12L)MoE(128E,36L)MoE(128E,12L)</td><td rowspan=5 colspan=1>20482048512512128128</td><td rowspan=1 colspan=1>0.72</td><td rowspan=1 colspan=1>4M</td><td rowspan=1 colspan=1>22.4</td><td rowspan=1 colspan=1>4.0</td><td rowspan=1 colspan=1>44.3</td><td rowspan=1 colspan=1>82</td><td rowspan=1 colspan=1>175</td><td rowspan=1 colspan=1>542</td></tr><tr><td rowspan=4 colspan=1>2.151.053.280.672.16</td><td rowspan=4 colspan=1>4M1M1M1M1M</td><td rowspan=3 colspan=1>7.515.54.96.1</td><td rowspan=1 colspan=1>1.4</td><td rowspan=1 colspan=1>41.3</td><td rowspan=2 colspan=1>17666141</td><td rowspan=4 colspan=1>4841704861074-</td><td rowspan=2 colspan=1>17805671</td></tr><tr><td rowspan=2 colspan=1>11.03.517.3</td><td rowspan=1 colspan=1>43.740.0</td></tr><tr><td rowspan=1 colspan=1>39.0</td><td rowspan=2 colspan=1>321995</td><td rowspan=2 colspan=1>11</td></tr><tr><td rowspan=1 colspan=1>1.9</td><td rowspan=1 colspan=1>5.4</td><td rowspan=1 colspan=1>36.7</td></tr><tr><td rowspan=1 colspan=1>T(96L)</td><td rowspan=1 colspan=1>2048</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>4M</td><td rowspan=1 colspan=1>~235.5</td><td rowspan=1 colspan=1>~42</td><td rowspan=1 colspan=1>36.9</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>1</td></tr><tr><td rowspan=1 colspan=1>Bilingual Baseline</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>~29</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>30.8</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>-</td></tr></table>
136
+
137
+ We conjecture that, increasing the depth might potentially increase the extent of transfer to lowresource tasks hence generalize better along that axis. But we also want to highlight that the models in comparison have a disproportionate training resource requirements. We again want to promote the importance of training efficiency, which is the very topic we studied next.
138
+
139
+ # 3.2 TRAINING EFFICIENCY
140
+
141
+ To measure the training efficiency. we first keep track of the number of tokens being processed to reach a certain training loss and second we keep track of the wall-clock time for a model to process certain number of tokens. We focus on measuring the training time to fixed training loss targets3 while varying other factors. We left systems performance analysis in appendex A.3.
142
+
143
+ Deeper models converge faster with fewer examples. It has been shown that, deeper models are better at sample efficiency, reaching better training/test error given the same amount of training examples (Huang et al., 2019; Shoeybi et al., 2019), commonly attributed to the acceleration effect of over-parametrization (Arora et al., 2018). We empirically test the hypothesis again using GShard with MoE Transformers and share trade-offs for models that are not only deep, but also sparsely activated.
144
+
145
+ For this purpose, we compare number of tokens being processed by each model to reach a preset training loss. A general trend we observe from Table 1 is that, MoE Transformer models with 3 times the depth need 2 to 3 times fewer tokens to reach the preset training loss thresholds. For example MoE(128E, 12L) takes 3 times the number of tokens to reach 0.7 training cross-entropy compared to MoE(128E, 36L). We observe a similar trend for models with 512 and 2048 experts.
146
+
147
+ Another intriguing observation from Table 1, is again related to the presence of capacity bottleneck. Comparing the models with same depth, we notice a significant drop in the number of tokens required to reach training loss of 0.7, as we transition from 128 to 512 number of experts. Practically that is where we observed the capacity bottleneck was residing. After this phase shift, models with ample capacity tend to exhibit similar sample efficiency characteristics.
148
+
149
+ Model with 600B parameters trained under 4 days achieved the best quality. Next we delve deeper into the interaction between model size and wall-clock time spent for training. We monitor number of TPU cores being used, training steps per-second, total number of tokens per batch, TPU core years4, and actual wall-clock time spent in days for training (see Table 1 columns respectively). One of the largest models we trained, MoE(2048E, 36L) with 600 billion parameters, utilized 2048 TPU cores for 4 days. This model achieves the best translation quality in terms of average BLEU, but also takes a total of 22.4 TPU years to train. While we have not seen any signs that the quality improvements plateau as we scale up our models, we strive for finding cost-effective solutions for scaling. Results in Table 1 again validates scaling with conditional computation is way more practical compared to dense scaling. Given the same number of TPU cores used by MoE(2048E, 36L), the dense scaling variant, T(96L), appears to be taking more than ten times to train (235 TPU core years), while trailing behind in terms of model quality compared to models trained with GShard.
150
+
151
+ # 4 RELATED WORK
152
+
153
+ Model parallelism partitions computation of neural network to build very large models on a cluster of accelerators. For example, pipelining (Huang et al., 2019; Harlap et al., 2018) splits a large model’s layers into multiple stages, while operator-level partitioning (Shazeer et al., 2018; Jia et al., 2019) splits individual operators into smaller parallel operators. GShard used a type of operator-level partitioning to scale our model. Without the need to rewrite the model implementation on other frameworks, GShard only requires users to annotate how tensors are split on existing model code, while not worrying the correct reduction and data exchange over partitions, because that is handled by the compiler. GShard solved many practical problems when implementing SPMD transformation on a production compiler (XLA). For example, to our knowledge, it is the first work showing how we can partition unevenly-shaped, non-trivial ops that have spatial dimensions with complex static configurations (e.g., convolutions with static dilation and padding).
154
+
155
+ Conditional Computation Conditional computation (Bengio et al., 2015; Elbayad et al., 2020) postulates that examples should be routed within the network by activating an input dependent sub-network. Prior work (Bapna et al., 2020; Yang et al., 2019; Shazeer et al., 2017) have shown its promising applications in machine translation, language models and computer vision. The routing strategy can be any of the following: estimated difficulty of the example (Lugosch et al., 2020), available computation budget (Elbayad et al., 2020; Bapna et al., 2020), or more generally a learned criterion with sparsity induced mixture of experts (Shazeer et al., 2017). This paper extended sparsely gated mixture of experts to Transformers (Vaswani et al., 2017) and introduced novel gating function with efficient implementation on parallel devices.
156
+
157
+ Model scaling Within a single model family, simply making the network wider or deeper often improves the model quality empirically. E.g., deeper ResNets performed better (He et al., 2016b), bigger Transformer models achieved better translation quality (Vaswani et al., 2017), models with larger vocabulary, or embedding or feature crosses work better, too (Arivazhagan et al., 2019; Conneau et al., 2019). Across different model families, it has also been observed that bigger models with larger model capacities not only fit the training data better but also generalize better on test time (Zhang et al., 2017; Neyshabur et al., 2017; Huang et al., 2019). This observation motivated many research efforts to build much bigger neural networks than those typically used in deep learning research models or production models. Shazeer et al. (2017) showed that a recurrent language model with 69 billion parameters using mixture-of-expert layers achieved much lower test perplexity for the one billion words (LM1B) benchmark. Brown et al. (2020a) showed that a dense 175 billion parameters model is capable of exhibiting highly accurate few-shot performance on downstream NLP tasks.
158
+
159
+ # 5 CONCLUSION
160
+
161
+ Our results in this paper suggest that progressive scaling of neural networks yield consistent quality gains, validating that the quality improvements have not yet plateaued as we scale up our models. We applied GShard, a deep learning module that partitions computation at scale automatically, to scale up MoE Transformer with light weight sharding annotations in the model code. We demonstrated a 600B parameter multilingual neural machine translation model can efficiently be trained in 4 days achieving superior performance and quality compared to prior art when translating 100 languages to English with a single model. MoE Transformer models trained with GShard also excel at training efficiency, with a training cost of 22 TPU v3 core years compared to 29 TPU years used for training all 100 bilingual Transformer baseline models. Empirical results presented in this paper confirmed that scaling models by utilizing conditional computation not only improve the quality of real-world machine learning applications but also remained practical and sample efficient during training. Our proposed method presents a favorable scalability/cost trade-off and alleviates the need for modelspecific frameworks or tools for scaling giant neural networks.
162
+
163
+ # REFERENCES
164
+
165
+ 2019 recent trends in GPU price per FLOPS. https://aiimpacts.org/2019-recenttrends-in-gpu-price-per-flops/. Accessed: 2020-06-05.
166
+
167
+ ONNX: Open Neural Network Exchange. https://github.com/onnx/onnx, 2019. Online; accessed 1 June 2020.
168
+
169
+ XLA: Optimizing Compiler for TensorFlow. https://www.tensorflow.org/xla, 2019. Online; accessed 1 June 2020.
170
+
171
+ Martín Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, Michael Isard, et al. Tensorflow: a system for large-scale machine learning. In OSDI, volume 16, pp. 265–283, 2016.
172
+
173
+ Madhu S. Advani and Andrew M. Saxe. High-dimensional dynamics of generalization error in neural networks, 2017.
174
+
175
+ Roee Aharoni, Melvin Johnson, and Orhan Firat. Massively multilingual neural machine translation. CoRR, abs/1903.00089, 2019. URL http://arxiv.org/abs/1903.00089.
176
+
177
+ Naveen Arivazhagan, Ankur Bapna, Orhan Firat, Dmitry Lepikhin, Melvin Johnson, Maxim Krikun, Mia Xu Chen, Yuan Cao, George Foster, Colin Cherry, Wolfgang Macherey, Zhifeng Chen, and Yonghui Wu. Massively multilingual neural machine translation in the wild: Findings and challenges, 2019.
178
+
179
+ Sanjeev Arora, Nadav Cohen, and Elad Hazan. On the optimization of deep networks: Implicit acceleration by overparameterization. arXiv preprint arXiv:1802.06509, 2018.
180
+
181
+ Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014.
182
+
183
+ Ankur Bapna and Orhan Firat. Exploring massively multilingual, massive neural machine translation. https://ai.googleblog.com/2019/10/exploring-massivelymultilingual.html, 2020.
184
+
185
+ Ankur Bapna, Naveen Arivazhagan, and Orhan Firat. Controlling computation versus quality for neural sequence models, 2020.
186
+
187
+ Frédéric Bastien, Pascal Lamblin, Razvan Pascanu, James Bergstra, Ian Goodfellow, Arnaud Bergeron, Nicolas Bouchard, David Warde-Farley, and Yoshua Bengio. Theano: new features and speed improvements. arXiv preprint arXiv:1211.5590, 2012.
188
+
189
+ Emmanuel Bengio, Pierre-Luc Bacon, Joelle Pineau, and Doina Precup. Conditional computation in neural networks for faster models, 2015.
190
+
191
+ Yoshua Bengio, Nicholas Léonard, and Aaron Courville. Estimating or propagating gradients through stochastic neurons for conditional computation, 2013.
192
+
193
+ Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. arXiv preprint arXiv:2005.14165, 2020a.
194
+
195
+ Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. arXiv preprint arXiv:2005.14165, 2020b.
196
+
197
+ Lynn Elliot Cannon. A Cellular Computer to Implement the Kalman Filter Algorithm. PhD thesis, USA, 1969. AAI7010025.
198
+
199
+ William Chan, Navdeep Jaitly, Quoc Le, and Oriol Vinyals. Listen, attend and spell: A neural network for large vocabulary conversational speech recognition. In 2016 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 4960–4964. IEEE, 2016.
200
+
201
+ Heng-Tze Cheng, Mustafa Ispir, Rohan Anil, Zakaria Haque, Lichan Hong, Vihan Jain, Xiaobing Liu, Hemal Shah, Levent Koc, Jeremiah Harmsen, and et al. Wide and deep learning for recommender systems. Proceedings of the 1st Workshop on Deep Learning for Recommender Systems - DLRS 2016, 2016. doi: 10.1145/2988450.2988454. URL http://dx.doi.org/10.1145/ 2988450.2988454.
202
+
203
+ Chung-Cheng Chiu, Tara N Sainath, Yonghui Wu, Rohit Prabhavalkar, Patrick Nguyen, Zhifeng Chen, Anjuli Kannan, Ron J Weiss, Kanishka Rao, Ekaterina Gonina, et al. State-of-the-art speech recognition with sequence-to-sequence models. In 2018 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 4774–4778. IEEE, 2018.
204
+
205
+ Dan Claudiu Cire¸san, Ueli Meier, Luca Maria Gambardella, and Jürgen Schmidhuber. Deep, big, simple neural nets for handwritten digit recognition. Neural computation, 22(12):3207–3220, 2010.
206
+
207
+ Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzmán, Edouard Grave, Myle Ott, Luke Zettlemoyer, and Veselin Stoyanov. Unsupervised cross-lingual representation learning at scale, 2019.
208
+
209
+ Andrew Davis and Itamar Arel. Low-rank approximations for conditional feedforward computation in deep neural networks, 2013.
210
+
211
+ Jeffrey Dean, Greg Corrado, Rajat Monga, Kai Chen, Matthieu Devin, Mark Mao, Marc’aurelio Ranzato, Andrew Senior, Paul Tucker, Ke Yang, et al. Large scale distributed deep networks. In Advances in neural information processing systems, pp. 1223–1231, 2012.
212
+
213
+ 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.
214
+
215
+ Albert Einstein. Die grundlage der allgemeinen relativitätstheorie. In Das Relativitätsprinzip, pp. 81–124. Springer, 1923.
216
+
217
+ Maha Elbayad, Jiatao Gu, Edouard Grave, and Michael Auli. Depth-adaptive transformer. ArXiv, abs/1910.10073, 2020.
218
+
219
+ Orhan Firat, Kyunghyun Cho, and Yoshua Bengio. Multi-way, multilingual neural machine translation with a shared attention mechanism. Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, 2016. doi: 10.18653/v1/n16-1101. URL http://dx.doi.org/10.18653/v1/n16-1101.
220
+
221
+ Mario Geiger, Arthur Jacot, Stefano Spigler, Franck Gabriel, Levent Sagun, Stéphane d’ Ascoli, Giulio Biroli, Clément Hongler, and Matthieu Wyart. Scaling description of generalization with number of parameters in deep learning. Journal of Statistical Mechanics: Theory and Experiment, 2020(2):023401, Feb 2020. ISSN 1742-5468. doi: 10.1088/1742-5468/ab633c. URL http://dx.doi.org/10.1088/1742-5468/ab633c.
222
+
223
+ Aaron Harlap, Deepak Narayanan, Amar Phanishayee, Vivek Seshadri, Nikhil Devanur, Greg Ganger, and Phil Gibbons. Pipedream: Fast and efficient pipeline parallel dnn training. arXiv preprint arXiv:1806.03377, 2018.
224
+
225
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016a.
226
+
227
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In European conference on computer vision, pp. 630–645. Springer, 2016b.
228
+
229
+ Joel Hestness, Sharan Narang, Newsha Ardalani, Gregory Diamos, Heewoo Jun, Hassan Kianinejad, Md. Mostofa Ali Patwary, Yang Yang, and Yanqi Zhou. Deep learning scaling is predictable, empirically, 2017.
230
+
231
+ Joel Hestness, Newsha Ardalani, and Gregory Diamos. Beyond human-level accuracy. Proceedings of the 24th Symposium on Principles and Practice of Parallel Programming, Feb 2019. doi: 10.1145/3293883.3295710. URL http://dx.doi.org/10.1145/3293883.3295710.
232
+
233
+ Geoffrey Hinton, Li Deng, Dong Yu, George E Dahl, Abdel-rahman Mohamed, Navdeep Jaitly, Andrew Senior, Vincent Vanhoucke, Patrick Nguyen, Tara N Sainath, et al. Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal processing magazine, 29(6):82–97, 2012.
234
+
235
+ Yanping Huang, Youlong Cheng, Ankur Bapna, Orhan Firat, Dehao Chen, Mia Chen, HyoukJoong Lee, Jiquan Ngiam, Quoc V Le, Yonghui Wu, and Zhifeng Chen. Gpipe: Efficient training of giant neural networks using pipeline parallelism. Advances in Neural Information Processing Systems 32, pp. 103–112, 2019.
236
+
237
+ Paolo Ienne, Thierry Cornu, and Gary Kuhn. Special-purpose digital hardware for neural networks: An architectural survey. Journal of VLSI signal processing systems for signal, image and video technology, 13(1):5–25, 1996.
238
+
239
+ Zhihao Jia, Matei Zaharia, and Alex Aiken. Beyond Data and Model Parallelism for Deep Neural Networks. In Proceedings of the Conference on Systems and Machine Learning (SysML), Palo Alto, CA, 2019.
240
+
241
+ Melvin Johnson, Mike Schuster, Quoc V. Le, Maxim Krikun, Yonghui Wu, Zhifeng Chen, Nikhil Thorat, Fernanda Viégas, Martin Wattenberg, Greg Corrado, and et al. Google’s multilingual neural machine translation system: Enabling zero-shot translation. Transactions of the Association for Computational Linguistics, 5:339–351, Dec 2017. ISSN 2307-387X. doi: 10.1162/tacl_a_00065. URL http://dx.doi.org/10.1162/tacl_a_00065.
242
+
243
+ Norman P Jouppi, Cliff Young, Nishant Patil, David Patterson, Gaurav Agrawal, Raminder Bajwa, Sarah Bates, Suresh Bhatia, Nan Boden, Al Borchers, et al. In-datacenter performance analysis of a tensor processing unit. In Proceedings of the 44th Annual International Symposium on Computer Architecture, pp. 1–12, 2017.
244
+
245
+ Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. Scaling laws for neural language models. arXiv preprint arXiv:2001.08361, 2020.
246
+
247
+ Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. ImageNet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012.
248
+
249
+ Taku Kudo and John Richardson. Sentencepiece: A simple and language independent subword tokenizer and detokenizer for neural text processing. In EMNLP, 2018.
250
+
251
+ Andrew K. Lampinen and Surya Ganguli. An analytic theory of generalization dynamics and transfer learning in deep linear networks, 2018.
252
+
253
+ Loren Lugosch, Derek Nowrouzezahrai, and Brett H. Meyer. Surprisal-triggered conditional computation with neural networks, 2020.
254
+
255
+ Dhruv Mahajan, Ross Girshick, Vignesh Ramanathan, Kaiming He, Manohar Paluri, Yixuan Li, Ashwin Bharambe, and Laurens van der Maaten. Exploring the limits of weakly supervised pretraining. In Proceedings of the European Conference on Computer Vision (ECCV), pp. 181–196, 2018.
256
+
257
+ Behnam Neyshabur, Srinadh Bhojanapalli, David McAllester, and Nathan Srebro. Exploring generalization in deep learning, 2017.
258
+
259
+ John Nickolls, Ian Buck, Michael Garland, and Kevin Skadron. Scalable parallel programming with cuda. Queue, 6(2):40–53, 2008.
260
+
261
+ Aaron van den Oord, Sander Dieleman, Heiga Zen, Karen Simonyan, Oriol Vinyals, Alex Graves, Nal Kalchbrenner, Andrew Senior, and Koray Kavukcuoglu. Wavenet: A generative model for raw audio. arXiv preprint arXiv:1609.03499, 2016.
262
+
263
+ Shoumik Palkar and Matei Zaharia. Optimizing data-intensive computations in existing libraries with split annotations. In Proceedings of the 27th ACM Symposium on Operating Systems Principles, pp. 291–305, 2019.
264
+
265
+ Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th annual meeting on association for computational linguistics, pp. 311–318. Association for Computational Linguistics, 2002.
266
+
267
+ 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. 2017.
268
+
269
+ Rajat Raina, Anand Madhavan, and Andrew Y Ng. Large-scale deep unsupervised learning using graphics processors. In Proceedings of the 26th annual international conference on machine learning, pp. 873–880, 2009.
270
+
271
+ Samyam Rajbhandari, Jeff Rasley, Olatunji Ruwase, and Yuxiong He. Zero: Memory optimization towards training a trillion parameter models. arXiv preprint arXiv:1910.02054, 2019.
272
+
273
+ Jared Roesch, Steven Lyubomirsky, Logan Weber, Josh Pollock, Marisa Kirisame, Tianqi Chen, and Zachary Tatlock. Relay: a new ir for machine learning frameworks. Proceedings of the 2nd ACM SIGPLAN International Workshop on Machine Learning and Programming Languages - MAPL 2018, 2018. doi: 10.1145/3211346.3211348. URL http://dx.doi.org/10.1145/ 3211346.3211348.
274
+
275
+ Nadav Rotem, Jordan Fix, Saleem Abdulrasool, Garret Catron, Summer Deng, Roman Dzhabarov, Nick Gibson, James Hegeman, Meghan Lele, Roman Levenstein, Jack Montgomery, Bert Maher, Satish Nadathur, Jakob Olesen, Jongsoo Park, Artem Rakhov, Misha Smelyanskiy, and Man Wang. Glow: Graph lowering compiler techniques for neural networks, 2018.
276
+
277
+ Noam Shazeer. Fast transformer decoding: One write-head is all you need. arXiv preprint arXiv:1911.02150, 2019.
278
+
279
+ Noam Shazeer and Mitchell Stern. Adafactor: Adaptive learning rates with sublinear memory cost. ArXiv, abs/1804.04235, 2018.
280
+
281
+ Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc Le, Geoffrey Hinton, and Jeff Dean. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer. arXiv preprint arXiv:1701.06538, 2017.
282
+
283
+ Noam Shazeer, Youlong Cheng, Niki Parmar, Dustin Tran, Ashish Vaswani, Penporn Koanantakool, Peter Hawkins, HyoukJoong Lee, Mingsheng Hong, Cliff Young, et al. Mesh-tensorflow: Deep learning for supercomputers. In Advances in Neural Information Processing Systems, pp. 10414– 10423, 2018.
284
+
285
+ Jonathan Shen, Ruoming Pang, Ron J Weiss, Mike Schuster, Navdeep Jaitly, Zongheng Yang, Zhifeng Chen, Yu Zhang, Yuxuan Wang, Rj Skerrv-Ryan, et al. Natural tts synthesis by conditioning wavenet on mel spectrogram predictions. In 2018 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 4779–4783. IEEE, 2018.
286
+
287
+ Tianxiao Shen, Myle Ott, Michael Auli, and Marc’Aurelio Ranzato. Mixture models for diverse machine translation: Tricks of the trade. arXiv preprint arXiv:1902.07816, 2019.
288
+
289
+ Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper, and Bryan Catanzaro. Megatron-lm: Training multi-billion parameter language models using gpu model parallelism. arXiv preprint arXiv:1909.08053, 2019.
290
+
291
+ Yifan Sun, Nicolas Bohm Agostini, Shi Dong, and David Kaeli. Summarizing cpu and gpu design trends with product data. arXiv preprint arXiv:1911.11313, 2019.
292
+
293
+ Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In Advances in neural information processing systems, pp. 3104–3112, 2014.
294
+
295
+ Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1–9, 2015.
296
+
297
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need, 2017.
298
+
299
+ Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, et al. Google’s neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144, 2016.
300
+
301
+ Yuanzhong Xu, HyoukJoong Lee, Dehao Chen, Hongjun Choi, Blake Hechtman, and Shibo Wang. Automatic cross-replica sharding of weight update in data-parallel training, 2020.
302
+
303
+ Brandon Yang, Gabriel Bender, Quoc V Le, and Jiquan Ngiam. Condconv: Conditionally parameterized convolutions for efficient inference. In Advances in Neural Information Processing Systems, pp. 1307–1318, 2019.
304
+
305
+ Chris Ying, Sameer Kumar, Dehao Chen, Tao Wang, and Youlong Cheng. Image classification at supercomputer scale, 2018.
306
+
307
+ Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. 2017. URL https://arxiv.org/abs/ 1611.03530.
308
+
309
+ # A APPENDIX
310
+
311
+ # A.1 RELATED WORK
312
+
313
+ Neural networks Deep learning models have been very successful in advancing sub-fields of artificial intelligence. For years, the fields have been continuously reporting new state of the art results using varieties of model architectures for computer vision tasks (Krizhevsky et al., 2012; Szegedy et al., 2015; He et al., 2016a), for natural language understanding tasks (Sutskever et al., 2014; Bahdanau et al., 2014; Wu et al., 2016), for speech recognition and synthesis tasks (Hinton et al., 2012; Chan et al., 2016; Chiu et al., 2018; Oord et al., 2016; Shen et al., 2018). More recently, attention-based Transformer models further advanced state of the art of these fields (Vaswani et al., 2017; Devlin et al., 2018; Shen et al., 2019).
314
+
315
+ Hardware Neural networks demand non-negligible amounts of computation power. To address such a demand, special hardware (chips and networked machines) built for neural network training and inference can be dated back to 25 years ago (Ienne et al., 1996). Since late 2000s, researchers started to leverage GPUs to accelerate neural nets (Raina et al., 2009; Krizhevsky et al., 2012; Cire¸san et al., 2010). More recently, the industry also invested heavily in building more dedicated hardware systems chasing for more cost-effective neural network hardware (Jouppi et al., 2017). Because the core computation of neural networks (various forms of summation of multiplications: convolution, matrix multiplication, einsum) are highly parallelizable numerical calculations, these chips are equipped with huge number of floating processing units (FPUs). Hence, the compute power of these specially designed hardware grew dramatically. It is reported that GPU price per flops dropped a factor of ten in just the last 4 years (gpu) and flops per watts increased by 2 magnitude over the past 12 years (Sun et al., 2019). The widely available low-cost computation power is a major enabler for the success of neural networks.
316
+
317
+ Software Software systems supporting neural networks evolved together with the advancement of the underlying hardware (Dean et al., 2012; Bastien et al., 2012; Abadi et al., 2016; Paszke et al., 2017; Palkar & Zaharia, 2019). While the accelerators are highly parallel compute machines, they are significantly more difficult to program directly. The frameworks made building neural networks easier and abstracted away many hardware specific details from the practitioners. They in turn rely on lower-level libraries to drive special hardware (accelerators) efficiently. E.g., CUDA (Nickolls et al., 2008) for Nvidia’s GPUs, or XLA for Google’s TPUs (xla, 2019). These lower-level libraries are critical for achieving high efficiency using these special hardware.
318
+
319
+ Automated parallelism Because programming in a distributed heterogeneous environment is challenging, particularly for high-level practitioners, deep-learning frameworks attempt to alleviate the burden of their users from specifying how the distributed computation is done. For example, TensorFlow (Abadi et al., 2016) has support for data parallelism, and basic model parallelism with graph partitioning by per-node device assignment. Mesh TensorFlow (Shazeer et al., 2018) helps the user to build large models with SPMD-style per-operator partitioning, by rewriting the computation in a Python library on top of TensorFlow; in comparison, our approach partitions the graph in the compiler based on light-weight annotations without requiring the user to rewrite the model. FlexFlow (Jia et al., 2019) uses automated search to discover the optimal partition of operators in a graph for better performance; while it focuses on determining the partitioning policy, our SPMD partitioner focuses on the mechanisms to transform an annotated graph. Weight-update sharding (Xu et al., 2020) is another automatic parallelization transformation based on XLA, which mostly focuses on performance optimizations for TPU clusters, and conceptually can be viewed as a special case for GShard. Zero (Rajbhandari et al., 2019) presents a set of optimizations to reduce memory redundancy in parallel training devices, by partitioning weights, activations, and optimizer state separately, and it is able to scale models to 170 billion parameters; in comparison, GShard is more general in the sense that it does not distinguish these tensors, and all of those specific partitioning techniques can be supported by simply annotating the corresponding tensors, allowing us to scale to over 1 trillion parameters and explore more design choices.
320
+
321
+ # A.2 THE XLA SPMD PARTITIONER FOR GSHARD
322
+
323
+ This section describes the compiler infrastructure that automatically partitions a computation graph based on sharding annotations. Sharding annotations inform the compiler about how each tensor should be distributed across devices. The SPMD (Single Program Multiple Data) partitioner (or “partitioner” for simplicity) is a compiler component that transforms a computation graph into a single program to be executed on all devices in parallel. This makes the compilation time near constant regardless of the number of partitions, which allows us to scale to thousands of partitions. 5
324
+
325
+ We implemented the partitioner in the XLA compiler xla (2019). Multiple frontend frameworks including TensorFlow, JAX, PyTorch and Julia already have lowering logic to transform their graph representation to XLA HLO graph. XLA also has a much smaller set of operators compared to popular frontend frameworks like TensorFlow, which reduces the burden of implementing a partitioner without harming generality, because the existing lowering from frontends performs the heavy-lifting to make it expressive. Although we developed the infrastructure in XLA, the techniques we describe here can be applied to intermediate representations in other machine learning frameworks (e.g., ONNX onn (2019), TVM Relay Roesch et al. (2018), Glow IR Rotem et al. (2018)).
326
+
327
+ XLA models a computation as a dataflow graph where nodes are operators and edges are tensors flowing between operators. The core of the partitioner is per-operation handling that transforms a full-sized operator into a partition-sized operator according to the sharding specified on the input and output. When a computation is partitioned, various patterns of cross-device data transfers are introduced. In order to maximize the performance at large scale, it is essential to define a core set of communication primitives and optimize those for the target platform.
328
+
329
+ # A.2.1 SHARDING PROPAGATION
330
+
331
+ GShard only requires the user to annotate a few key tensors in the model, and the compiler will propagate them to all tensors on the graph in an optimization pass. This allows the user to reuse legacy model code by adding a small set of annotations.
332
+
333
+ The propagation pass is designed to be intuitive, and it mostly passes through shardings along shared dimensions between inputs and outputs. Typically, it requires annotations on model weights, and if sharding involves multiple dimensions, activations could also be annotated around core computation operators like Einsum which could have multiple possible outcomes of sharding propagation.
334
+
335
+ # A.2.2 PER-OPERATOR SPMD PARTITIONING
336
+
337
+ The core of the partitioner is the per-operator transformation from a full-sized operator into a partition-sized operator according to the specified sharding. While some operators (e.g., elementwise)
338
+
339
+ ![](images/9bf8081abe2d11fe7877f52dea27a7719d570bb078cd85dd428a60588f976119.jpg)
340
+ Figure 4: Comparison between MPMD and our proposed SPMD partitioning of a Dot operator $( [ M , K ] \times$ $[ K , N ] = [ M , { \bf \bar { N } } ] )$ across 4 devices. In this example, both operands are partitioned along the contracting dimension $K$ , where each device computes the local result and globally combines with an AllReduce. MPMD partitioning generates separate operators for each device, limiting its scalability, whereas SPMD partitioning generates one program to run on all devices. Note that the compilation time with our SPMD partitioning is not-dependent of the number of devices being used.
341
+
342
+ are trivial to support, we discuss several common cases where cross-partition communications are required.
343
+
344
+ To keep the discussion more relevant to the MoE model, this section focuses on Einsum partitioning to illustrate a few communication patterns. And to keep it simple for now, we assume that all tensors are evenly partitioned, which means the size of the dimension to partitition is a multiple of the partition count.
345
+
346
+ Einsum Case Study Einsum is the most critical operator in implementing the MoE model. They are represented as a Dot operation in XLA HLO, where each operand (LHS or RHS) consists of three types of dimensions:
347
+
348
+ • Batch dimensions are the embarrassingly parallel dimensions. The same set of batch dimensions must exist in all of LHS, RHS and the output, and each element in the output only depends on the corresponding batch in LHS and RHS. Contracting dimensions only exist in the operands. LHS and RHS must have the same set of contracting dimensions, and they are summed up and collapsed in the output. Non-contracting dimensions are also parallel dimensions that exist in one of the operands and the output. Each of LHS and RHS has its own set of non-contracting dimensions, which are inherited by the output.
349
+
350
+ Sharding propagation prioritizes choosing the same sharding on batch dimensions of LHS, RHS and output, because that would avoid any cross-partition communication. However, that is not always possible, and we need cross-partition communication in the following three cases.
351
+
352
+ • Resharding. In the MoE model we built, the expert dispatching logic (Line 3 in Algorithm 2) requires switching the partitioned dimension after an Einsum. Since resharding is efficient (Section A.3.2) with AllToAll, we first execute the Einsum locally, then reshard it to the desired dimension, as shown in Figure 5a.
353
+ • Accumulating partial results. If the inputs are partitioned along contracting dimensions, the local result is partial and we need to use an AllReduce to combine them and produce the final result, as shown in Figure 5b.
354
+ Slicing in a loop. For certain scenarios, we also implemented an algorithm similar to Cannon’s algorithm Cannon (1969), in order to limit the size of tensors on each partition. For example, if both operands are partitioned on a non-contracting dimension, we cannot compute the local Einsum directly since operands have different non-contracting dimensions.
355
+
356
+ ![](images/1daaa7c07fedddc7beac47dae31cfca8b0239dfa4c2e12a787c38135a589086d.jpg)
357
+ (a) A partitioned Einsum operator. Colored letters ( $G$ and $E$ ) represent the partitioned dimension of each tensor. The partitioner decides to first execute a batch-parallel Einsum along the $G$ dimension, then reshard the result to the $E$ dimension.
358
+
359
+ ![](images/cd596748a9d749136616cebc44915c8c02e9074263abb2187b010117b374bf2c.jpg)
360
+ (b) A simple Einsum (Matmul) partitioned on the contracting dimension.
361
+
362
+ ![](images/813c45505759ba7e88d4bb0daf172cb6eec557ecd805c0ff8fd3199db0e17bcb.jpg)
363
+ Figure 5: Examples of Einsum partitioning with cross-device communication.
364
+
365
+ (c) An Einsum (Matmul) where we use collective-permute in a loop to compute one slice at a time. There is no full-sized tensor during the entire process.
366
+
367
+ Replicating one of the operands would not cause redundant computation, but it requires the replicated operand to fit in device memory. Therefore, if the size of the operand is too large, we instead keep both operands partitioned and use a loop to iterate over each slice of the result, and use CollectivePermute to communicate the input slices (Figure 5c).
368
+
369
+ Compiler optimizations The SPMD partitioner creates various data formatting operators in order to perform slicing, padding, concatenation, masking and halo exchange. To address the issue, we leverage XLA’s fusion capabilities on TPU, as well as code motion optimizations for slicing and padding, to largely hide the overhead of data formatting. As a result, the run-time overhead is typically negligible, even for convolutional networks where masking and padding are heavily used.
370
+
371
+ # A.2.3 GENERAL SHARDING API
372
+
373
+ In addition to the two common APIs (replicate() and split()) for sharding listed in Section 2.2, users or the compiler may use a more advanced sharding strategy to minimize data transfers.
374
+
375
+ shard(tensor, device_assignment) annotates tensor to be partitioned with the provided device assignment, and returns the annotated tensor. We use device assignment, a multi-dimensional integer array, to represent how the split is done. device_assignment has the same rank as the data tensor; its element count is the total number of partitions, and each element is the ID of the device that occupies the corresponding data slice. For example, a 3D tensor with shape [256, 1024, 8192] with device assignment shape [2, 1, 4] will have partition shape [128, 1024, 2048], and the order of elements in device assignment determines which slice each partition occupies.
376
+
377
+ ![](images/5c6c74f2b6ab481f1b274bd40f9d9104599002409f39b3dcac9881a69ada6b6e.jpg)
378
+ Figure 6: An example of two different device assignments based on the device topology. A 2D tensor is split by 2x4 partitions and the communication pattern is between partitions along the rows of the tensor. The numbers represent device ids.
379
+
380
+ Since data movement across devices critically affects the parallel execution performance, it is important to consider the target device topology as well as the communication between partitions of the tensor when assigning device ids in the device assignment for maximum performance. Figure 6 shows two different device assignments based on the device topology and the row-wise communication pattern on the tensor.
381
+
382
+ # A.3 PERFORMANCE AND MEMORY CONSUMPTION
383
+
384
+ This section discusses how well GShard achieves computation and memory efficiency on the TPU platform. Our measurement and analysis show that the device memory consumption is roughly constant when we increase the number of devices and experts, and the step time grows sublinearly, i.e., $1 . 7 \mathrm { x }$ execution time increase when we scale the model by 16x from 128 devices to 2048 devices. We also provide microbenchmarks and analyses for a variety of partitioned operators, which could guide use cases beyond this paper.
385
+
386
+ # A.3.1 MEMORY EFFICIENCY AND SCALABILITY
387
+
388
+ In the GShard model, there are mainly three types of memory usage, all of which have constant per-device sizes after SPMD partitioning, when the number of experts increases.
389
+
390
+ • Replicated weights (e.g. transformer feed-forward layers).
391
+ • Distributed weights (MoE feed-forward layers6).
392
+ • Activations (output of each layer that is used in both forward and backward pass).
393
+
394
+ The $O ( 1 )$ memory scaling is demonstrated in Figure 7, which shows the per-device memory usage distribution for different models. With a fixed number of layers, both weight memory and activation memory stay constant when the number of experts increases.
395
+
396
+ On this other hand, weight memory and activation memory both scale linearly with the number of layers. When the memory requirement exceeds available memory on each device, compiler-based rematerialization will automatically recompute part of the activations in the backward pass in order to reduce peak activation memory. This is why the activation size for MoE(2048E, 60L) is smaller than MoE(2048E, 36L). The overhead of rematerialization is also optimized, e.g. only $28 \%$ and $34 \%$ of the total cycles are spent on recomputation for 36L and 60L models respectively, and $0 \%$ for 12L and 24L since they fit in device memory without rematerialization.
397
+
398
+ ![](images/d0740d6519e8490c04db3b03d3a2aecf6531d21635c9ca3e873b5618907d414e.jpg)
399
+ Figure 7: Per-device memory consumption in gigabytes.
400
+
401
+ ![](images/dc85e7ef6813af326ba372566dfad08b1b853004faee913b919fad612203a1c4.jpg)
402
+ Figure 8: Measured vs roofline execution time breakdown. Only the forward pass is shown, and the backward pass has similar breakdown. “MoE dispatch and combine” represents cross-partition communication with AllToAll.
403
+
404
+ # A.3.2 RUNTIME EFFICIENCY AND SCALABILITY
405
+
406
+ Figure 8 shows the breakdown of execution time for an MoE layer and its adjacent Transformer layer. It also compares the achieved performance to a roofline, which is estimated by assuming compute-, memory-, or communication-bounded operations can achieve $100 \%$ of the peak FLOPS, memory bandwidth, or interconnect bandwidth. This is a very optimistic estimate as many operators are bounded by a mixed set of resources. At a smaller scale (128 experts), our model can achieve $> 7 0 \%$ of the roofline performance. The device time increases by $1 . 7 \mathrm { x }$ when we scale the model to 16x larger (2048 experts), and can still achieve $48 \%$ of the roofline performance.
407
+
408
+ Transformer layers and MoE feed-forward layer These are the dense parts of the model, which are designed to achieve peak TPU utilization. On each device, these computations also have a constant cost when we scale to more experts. Feed-forward layers and Transformer projections are mainly large matrix multiplications that utilize the TPU’s matrix unit well. These operations have achieved $> 8 5 \%$ peak FLOPS in our experiment. The attention operations are composed of mainly batch matmuls, which are bounded by memory bandwidth when sequence lengths are small. As a result, in our experiments attention operations only achieved $> 3 0 \%$ peak FLOPS.
409
+
410
+ Gate computation In Figure 8, “Gate Einsum” represents the first two and the last Einsums in Algorithm 2. The first Einsum is the projection that calculates per-expert input to softmax. It has an $O ( D )$ cost, but it is a very small part of the layer. The other two Einsums are dispatching tokens and combining expert results. They effectively implement Gather with one-hot matrices, which are more expensive, but with constant $O ( G C ) = O ( 1 )$ cost that is independent from the number of experts. The execution time of these Einsums increases by around $2 \mathbf { x }$ when we scale from 128 to 2048 experts (16x).
411
+
412
+ The remaining per-device gating computation involves many general-purpose computations like ArgMax and Cumsum, which are either memory-bound or even sequential in nature, thus not designed to utilize TPUs well. The majority of the time is spent on sequential Cumsum operations to invert one-hot matrices that represent selected experts for each token to one-hot matrices that represent selected tokens for each expert. The linear complexity of Cumsum is demonstrated in Figure 8. This part of the gating computation also has an $O ( D )$ cost, but fortunately, similar to the Einsum before softmax, it has a very small constant factor. It has negligible execution time with 128 experts, and takes less than $10 \%$ of the total time spent in the MoE and Transformer layers with 2048 experts.
413
+
414
+ The most significant part of gating is communication, shown as “MoE dispatch and combine” in√ Figure 8. These are AllToAll operators, and as we will discuss in Section A.3.3, their cost is $O ( \sqrt { D } )$ . When the number experts grows 16x from 128 to 2048, the execution time increases by about $3 . 7 5 \mathrm { x }$ , and their proportion of execution time in the MoE and Transformer increases from $16 \%$ to $36 \%$ .
415
+
416
+ A.3.3 COMMUNICATION MICROBENCHMARKS AND PER-OPERATOR SCALABILITY
417
+
418
+ In this section, we measure and analyze the performance scalability of the SPMD partitioner for basic operators, which can be used to guide use cases beyond the MoE model presented in this paper.
419
+
420
+ Performance scaling of communication primitives Two critical collective communication operators in the MoE model are AllReduce and AllToAll. AllReduce is used in accumulating partial results, and AllToAll is used in resharding (Section A.2.2). Figure 9 shows their performance scalability from 16 to 2048 partitions. AllReduce on TPU has an execution time independent from the number of devices Ying et al. (2018). The variance in Figure 9 is due to specifics of each topology, e.g., whether it is a square or a rectangle, and whether it is a torus or a mesh.
421
+
422
+ AllToAll, on the other hand, gets more expensive as the number of partitions grows, but in a sublinear√ manner. On our 2D TPU cluster, AllToAll cost is roughly $O ( \sqrt { D } )$ , where $D$ is the number of partitions. This is because with a fixed amount of data each partition sends (8MB or 32MB in Figure 9), the total amount of data that all partitions send is $d = O ( D )$ . Meanwhile, each data piece needs to travel $h = O ( { \sqrt { D } } )$ hops on average, and there are overall $l = O ( D )$ device-to-device links in the network. Therefore, if it is bandwidth-bound, the execution time of an AllToAll is
423
+
424
+ $$
425
+ t = { \frac { d h } { l } } = O ( { \frac { D { \sqrt { D } } } { D } } ) = O ( { \sqrt { D } } ) .
426
+ $$
427
+
428
+ Even if it is latency-bound, the execution time will still be $O ( h ) = O ( { \sqrt { D } } )$ . Comparing 2048 partitions and 16 partitions, while $D$ grows by 128 times, the execution time of AllToAll only increases by 9 times. This enables us to use resharding to efficiently implement cross-partition dispatching (Figure 5a).
429
+
430
+ AllGather and CollectivePermute are easier to analyze. AllGather’s output is $D$ larger than the input, and if we fix input size, then its communication cost is $O ( D )$ . CollectivePermute has a one-to-one communication pattern, and with reasonable device arrangement where the source-destination pairs are close, its cost is $O ( 1 )$ for a fixed input size.
431
+
432
+ Partitioned operator scalability We summarize the performance scalability for common operators using GShard in Table 2. It contains the Einsum/Matmul examples in Section A.2.2, and also other common operators like Convolution and Reduce. The table includes the local compute on each partition, as well as the required communication based on our analysis above.
433
+
434
+ Most operators in Table 2 have sublinear scalability in terms of both compute and communication, which is consistent with our performance measurement of the MoE model. The $O ( 1 )$ scaling of spatially partitioned convolutions also demonstrates the efficiency of GShard for image partitioning.
435
+
436
+ However, the last two Matmul operators in Table 2 have $O ( D )$ scaling of per-partition compute and communication, where they have unmatched sharding in the operands. This is not due to inefficiency in the partitioning algorithm, but because the total compute in the full operator is very large $( O ( D ^ { 2 } ) )$ .
437
+
438
+ ![](images/177f013fb97a9c8109a359d2b1b4f00e33a7dfe1c3ec3c23d54e4a92b30c2c04.jpg)
439
+ Figure 9: Performance scaling of communication, AllReduce and AllToAll. Log scale on both axes. AllReduce√ cost is roughly $O ( 1 )$ , and AllToAll cost is roughly $O ( \sqrt { D } )$ , where $D$ is the number of partitions. We measure their performance with 8MB and 32MB data. For AllToAll, that means each partition initially has 8MB (or 32MB) data, then divides it to $D$ pieces, and sends each piece to a different receiving partition.
440
+
441
+ Table 2: Scalability of partitioned operators. Abbreviation for communication primitives: AR: AllReduce, AG: AllGather, $C P$ : CollectivePermute, AA: AllToAll. \*This is the dispatch Einsum in our model, where we set $C$ to $O ( 1 / D )$ . ${ } ^ { * * } I / O$ are the input/output feature dimensions, $B$ is the batch dimension, $X / Y$ are input spatial dimensions, and $x / y$ are the kernal spatial dimensions.
442
+
443
+ <table><tr><td rowspan=2 colspan=1></td><td rowspan=2 colspan=1>0(D)Dimensions</td><td rowspan=2 colspan=2>TotalCompute</td><td rowspan=1 colspan=2>Per-partition</td></tr><tr><td rowspan=1 colspan=1>Compute</td><td rowspan=1 colspan=1>Communication</td></tr><tr><td rowspan=1 colspan=1>Add(AA-&gt;A)</td><td rowspan=1 colspan=1>A</td><td rowspan=1 colspan=2>O(D)</td><td rowspan=1 colspan=1>0(1)</td><td rowspan=1 colspan=1>0</td></tr><tr><td rowspan=1 colspan=1>Matmul(AB,BC-&gt;AC)</td><td rowspan=1 colspan=1>B</td><td rowspan=1 colspan=2>0(D)</td><td rowspan=1 colspan=1>0(1)</td><td rowspan=1 colspan=1>O(1) AR</td></tr><tr><td rowspan=1 colspan=1>Matmul(AB,BC-&gt;AC)</td><td rowspan=1 colspan=1>A</td><td rowspan=1 colspan=2>0(D)</td><td rowspan=1 colspan=1>0(1)</td><td rowspan=1 colspan=1>0</td></tr><tr><td rowspan=1 colspan=1>Matmul(AB,BC-&gt;AC)</td><td rowspan=1 colspan=1>A,B</td><td rowspan=1 colspan=2>0(D)</td><td rowspan=1 colspan=1>0(D)</td><td rowspan=1 colspan=1>O(D)AG or CP</td></tr><tr><td rowspan=1 colspan=1>Matmul(AB,BC-&gt;AC)</td><td rowspan=1 colspan=1>AC</td><td rowspan=1 colspan=1>0(D²)</td><td rowspan=1 colspan=1>)</td><td rowspan=1 colspan=1>0(D)</td><td rowspan=1 colspan=1>O(D) AG or CP</td></tr><tr><td rowspan=1 colspan=1>Reduce(AB-&gt;A)</td><td rowspan=1 colspan=1>A</td><td rowspan=1 colspan=1>0(D)</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>0(1)</td><td rowspan=1 colspan=1>0</td></tr><tr><td rowspan=1 colspan=1>Reduce(AB-&gt;B)</td><td rowspan=1 colspan=1>A</td><td rowspan=1 colspan=1>O(D)</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>0(1)</td><td rowspan=1 colspan=1>O(1) AR</td></tr><tr><td rowspan=1 colspan=1>Einsum(GSEC,GSM-&gt;EGCM)</td><td rowspan=1 colspan=1>G,E *</td><td rowspan=1 colspan=1>O(D)</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>0(1)</td><td rowspan=1 colspan=1>O(√D) AA</td></tr><tr><td rowspan=1 colspan=1>Convolution(BIXY,xyIO-&gt;BOXY)</td><td rowspan=1 colspan=1>X**</td><td rowspan=1 colspan=1>O(D)</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>0(1)</td><td rowspan=1 colspan=1>O(1) CP</td></tr></table>
444
+
445
+ Different partitioning strategies can be used for these cases, producing different communication primitives: replicating one operand will result in AllGather (requiring the replicated operand to fit in device memory), while slicing in a loop (Figure 5c) will result in CollectivePermute.
446
+
447
+ # A.4 DENSE MODEL SCALABILITY AND BENCHMARKS
448
+
449
+ GShard is not limited to sparse models. In this subsection we applied GShard to build large dense transformer with up to trillions of parameters. We open sourced our example implementation and provided a step by step instruction how to train it on the public cloud provider (https://github. com/tensorflow/lingvo/tree/master/lingvo/tasks/lm). We included the model details and performance benchmarks in Table 3. To the best of our knowledge, we provide the only open source implementation that can train transformer models with trillions of parameters efficiently on public cloud. GShard allows tensor partitioning with more than one dimension. For example, we split the activation tensors along both the batch and the model dimensions. This allows input batches with long sequence length (1024 in the benchmark) and global batch size smaller than the number of devices. The performance scales linearly from 64B to 1T. The communication bottleneck started to dominate when scaling further to 4T as compute/communication ratio is lower due to small batch size. Larger batch size is possible by scaling out the model to more TPU cores, or by enabling gradient accumulation. For the purpose of apple-to-apple comparison to other models, we did not include the above optimizations in the 4T model.
450
+
451
+ <table><tr><td rowspan=2 colspan=1>#ofparams</td><td rowspan=2 colspan=1>#oflayers</td><td rowspan=2 colspan=1>modeldim</td><td rowspan=1 colspan=1>hidden</td><td rowspan=1 colspan=1>seq</td><td rowspan=2 colspan=1>batchsize</td><td rowspan=2 colspan=1>MXUutil</td><td rowspan=2 colspan=1>k-tokens/sec</td></tr><tr><td rowspan=1 colspan=1>dim</td><td rowspan=1 colspan=1>length</td></tr><tr><td rowspan=1 colspan=1>64B</td><td rowspan=1 colspan=1>32</td><td rowspan=1 colspan=1>8192</td><td rowspan=1 colspan=1>65536</td><td rowspan=1 colspan=1>1024</td><td rowspan=1 colspan=1>512</td><td rowspan=1 colspan=1>48.4%</td><td rowspan=1 colspan=1>150.7</td></tr><tr><td rowspan=1 colspan=1>128B</td><td rowspan=1 colspan=1>64</td><td rowspan=1 colspan=1>8192</td><td rowspan=1 colspan=1>65536</td><td rowspan=1 colspan=1>1024</td><td rowspan=1 colspan=1>512</td><td rowspan=1 colspan=1>48.5%</td><td rowspan=1 colspan=1>73.5</td></tr><tr><td rowspan=1 colspan=1>1T</td><td rowspan=1 colspan=1>128</td><td rowspan=1 colspan=1>16384</td><td rowspan=1 colspan=1>131072</td><td rowspan=1 colspan=1>1024</td><td rowspan=1 colspan=1>128</td><td rowspan=1 colspan=1>47.2%</td><td rowspan=1 colspan=1>9.23</td></tr><tr><td rowspan=1 colspan=1>4T</td><td rowspan=1 colspan=1>128</td><td rowspan=1 colspan=1>32768</td><td rowspan=1 colspan=1>262144</td><td rowspan=1 colspan=1>1024</td><td rowspan=1 colspan=1>32</td><td rowspan=1 colspan=1>28.8%</td><td rowspan=1 colspan=1>1.36</td></tr></table>
452
+
453
+ Table 3: Dense language models benchmarks on TPU v3-2048. The model parameters are sharded across 2048 TPU V3 cores. We measured the TPU matrix unit utilization and throughput for dense models with various configurations.
454
+
455
+ Details of dense Transformer sharding We use a 2D mesh of TPU devices of shape [X, Y]. X is used to shard the batch dimension of activation tensors, and Y is used to shard attention heads and the feed-forward hidden dimension. Activations’ head and hidden dimensions are sharded the same way along Y. To further reduce weight storage on each device, we additionally shard the model dimension of the weights along the X dimension. Weights will be partially unsharded on-demand with a subgrouped AllGather operator across devices along X. The parallelism pattern along $\mathbf { X }$ is conceptually equivalent to weight-update sharding Xu et al. (2020).
456
+
457
+ When we further increase the model size, activation storage becomes the bottleneck, because activations between transformer layers are only partially sharded in the device mesh on the batch dimension. So we further shard the model dimension of these activation tensors along Y, making them fully sharded across all devices. Such an activation tensor will be produced by a ReduceScatter operator, which is semantically AllReduce followed by a DynamicSlice but can be implemented more efficiently. The fully sharded activations will also be partially unsharded with AllGather in the next layer.
458
+
459
+ # A.5 DECODING WITH FLAT BEAM SEARCH
460
+
461
+ During decoding, we use beam search with length normalization similar to Wu et al. (2016). Decoding is auto-regressive and generates the target sequence one token at a time, so for an output of length $m$ the decoder layer stack is executed $m$ times, sequentially. In particular for each decoder MoE layer there are dispatch/combine operations, which require cross-device communication. Inference utilizes same cluster with same number of devices as training.
462
+
463
+ During beam search we flatten the beam hypotheses into a single sequence which contains all underlying tokens interleaved, and we modify decoder self-attention mask so that each hypothesis only has attention to appropriate positions in the joint flat sequence. We apply the same transformation to key/value tensors maintained by each decoder self-attention layer. This allows us to avoid reordering previously computed attention key/values after each beam expansion. Instead, we only reorder the $\bar { 0 } / 1$ mask representing the current active hypotheses. However, attention becomes $k$ times longer.
464
+
465
+ This trade-off can be positive or negative depending on implementation details. As explained in Shazeer (2019), memory bandwidth limits are important for incremental decoding with Transformer models. From this point of view, by flattening the beam we replace two operations with low compute/memory ratio (attention dot product and key/value reordering) with a single operation with a slightly higher compute/memory ratio (attention dot product over a longer sequence with more keys), but with the same total amount of memory it has to access.
466
+
467
+ # A.6 MACHINE TRANSLATION EXPERIMENTS DETAILS
468
+
469
+ In our Machine Translation experiments MoE Transformer models shared • Transformer model dimension $M = 1 0 2 4$ • Feed Forward and MoE hidden dimension $H = 8 1 9 2$ • Number of heads in multi-head attention $= 1 6$ • Attention key and value dimension $= 1 2 8$
470
+
471
+ ![](images/1c36647278d47b621fe4913d85e0ea2d4f1668971e8bdc2743832acc525335aa.jpg)
472
+ Figure 10: Training loss curves from different model scales under low (upper graph) and high (lower graph) compute budget. Lower loss can be obtained by growing the model capacity until some budget-dependent maximum size, which increased with higher training budget. Given the same five TPU core years training budget, we observed that the 150B model hits the lowest training loss. But with 30 TPU core years, 600B achieved the lowest loss.
473
+
474
+ • Input, residual and attention dropout rate $= 0 . 1$ • The number of groups $G = 2 D$ , twice the number of devices. • The expert capacity $\begin{array} { r } { C = 2 \propto \frac { B \times L } { D \times E } } \end{array}$ .
475
+
476
+ We used the Adafactor (Shazeer & Stern, 2018) optimizer with $a$ ) factored second-moment estimation; $^ b$ ) first moment decay $\beta _ { 1 } = 0 . 0 ; c ,$ ) second moment decay $\beta _ { 2 } = 0 . 9 9$ with $1 - t ^ { - 0 . 8 }$ schedule; $d$ ) clipping threshold of 1.0; and $e$ ) 1.0 learning rate with square root decay after 10k training steps.
477
+
478
+ We used SentencePiece Kudo & Richardson (2018) subword tokenizer with a single multilingual vocabulary for source-side spanning 102 languages of size 64000, and English-only target-side vocabulary of size 32000.
479
+
480
+ In Figure 10, we compare the achieved loss of each model at different preset training budgets. We observed that lower loss can be obtained by growing the model capacity until some budget-dependent maximum size, which increased with higher training budget. For example, with a relatively low training budget of 5 TPU core years training budget, we observed models with larger capacity lead to even lower training loss up to 150B parameters. But with a high training budget of 30 TPU core years, 600B achieved the lower cost.
parse/train/qrwe7XHTmYb/qrwe7XHTmYb_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/qrwe7XHTmYb/qrwe7XHTmYb_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/qrwe7XHTmYb/qrwe7XHTmYb_model.json ADDED
The diff for this file is too large to render. See raw diff