Datasets:
Add files using upload-large-folder tool
Browse files- parse/train/HygrdpVKvr/HygrdpVKvr.md +292 -0
- parse/train/HygrdpVKvr/HygrdpVKvr_model.json +0 -0
- parse/train/P9TYG0j-wtG/P9TYG0j-wtG.md +374 -0
- parse/train/P9TYG0j-wtG/P9TYG0j-wtG_content_list.json +0 -0
- parse/train/P9TYG0j-wtG/P9TYG0j-wtG_middle.json +0 -0
- parse/train/P9TYG0j-wtG/P9TYG0j-wtG_model.json +0 -0
- parse/train/SJxDDpEKvH/SJxDDpEKvH.md +547 -0
- parse/train/SJxDDpEKvH/SJxDDpEKvH_content_list.json +0 -0
- parse/train/SJxDDpEKvH/SJxDDpEKvH_middle.json +0 -0
- parse/train/SJxDDpEKvH/SJxDDpEKvH_model.json +0 -0
- parse/train/SksY3deAW/SksY3deAW.md +604 -0
- parse/train/SksY3deAW/SksY3deAW_content_list.json +0 -0
- parse/train/SksY3deAW/SksY3deAW_middle.json +0 -0
- parse/train/SksY3deAW/SksY3deAW_model.json +0 -0
- parse/train/rklz9iAcKQ/rklz9iAcKQ.md +413 -0
- parse/train/rklz9iAcKQ/rklz9iAcKQ_content_list.json +0 -0
- parse/train/zmbiQmdtg9/zmbiQmdtg9.md +235 -0
- parse/train/zmbiQmdtg9/zmbiQmdtg9_content_list.json +976 -0
- parse/train/zmbiQmdtg9/zmbiQmdtg9_middle.json +0 -0
- parse/train/zmbiQmdtg9/zmbiQmdtg9_model.json +0 -0
parse/train/HygrdpVKvr/HygrdpVKvr.md
ADDED
|
@@ -0,0 +1,292 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# NAS EVALUATION IS FRUSTRATINGLY HARD
|
| 2 |
+
|
| 3 |
+
Antoine Yang∗ Ecole Polytechnique ´ † France
|
| 4 |
+
|
| 5 |
+
Pedro M Esperanc¸a Huawei Noah’s Ark Lab London, UK
|
| 6 |
+
|
| 7 |
+
Fabio Maria Carlucci Huawei Noah’s Ark Lab London, UK
|
| 8 |
+
|
| 9 |
+
# ABSTRACT
|
| 10 |
+
|
| 11 |
+
Neural Architecture Search (NAS) is an exciting new field which promises to be as much as a game-changer as Convolutional Neural Networks were in 2012. Despite many great works leading to substantial improvements on a variety of tasks, comparison between different methods is still very much an open issue. While most algorithms are tested on the same datasets, there is no shared experimental protocol followed by all. As such, and due to the under-use of ablation studies, there is a lack of clarity regarding why certain methods are more effective than others. Our first contribution is a benchmark of 8 NAS methods on 5 datasets. To overcome the hurdle of comparing methods with different search spaces, we propose using a method’s relative improvement over the randomly sampled average architecture, which effectively removes advantages arising from expertly engineered search spaces or training protocols. Surprisingly, we find that many NAS techniques struggle to significantly beat the average architecture baseline. We perform further experiments with the commonly used DARTS search space in order to understand the contribution of each component in the NAS pipeline. These experiments highlight that: (i) the use of tricks in the evaluation protocol has a predominant impact on the reported performance of architectures; (ii) the cell-based search space has a very narrow accuracy range, such that the seed has a considerable impact on architecture rankings; (iii) the hand-designed macrostructure (cells) is more important than the searched micro-structure (operations); and (iv) the depth-gap is a real phenomenon, evidenced by the change in rankings between 8 and 20 cell architectures. To conclude, we suggest best practices, that we hope will prove useful for the community and help mitigate current NAS pitfalls, e.g. difficulties in reproducibility and comparison of search methods. The code used is available at https://github.com/antoyang/NAS-Benchmark.
|
| 12 |
+
|
| 13 |
+
# 1 INTRODUCTION
|
| 14 |
+
|
| 15 |
+
As the deep learning revolution helped us move away from hand crafted features (Krizhevsky et al., 2012) and reach new heights (He et al., 2016; Szegedy et al., 2017), so does Neural Architecture Search (NAS) hold the promise of freeing us from hand-crafted architectures, which requires tedious and expensive tuning for each new task or dataset. Identifying the optimal architecture is indeed a key pillar of any Automated Machine Learning (AutoML) pipeline. Research in the last two years has proceeded at a rapid pace and many search strategies have been proposed, from Reinforcement Learning (Zoph & Le, 2017; Pham et al., 2018), to Evolutionary Algorithms (Real et al., 2017), to Gradient-based methods (Liu et al., 2019; Liang et al., 2019). Still, it remains unclear which approach and search algorithm is preferable. Typically, methods have been evaluated on accuracy alone, even though accuracy is influenced by many other factors besides the search algorithm. Comparison between published search algorithms for NAS is therefore either very difficult (complex training protocols with no code available) or simply impossible (different search spaces), as previously pointed out (Li & Talwalkar, 2019; Sciuto et al., 2019; Lindauer & Hutter, 2019).
|
| 16 |
+
|
| 17 |
+
NAS methods have been typically decomposed into three components (Elsken et al., 2019; Li & Talwalkar, 2019): search space, search strategy and model evaluation strategy. This division is important to keep in mind, as an improvement in any of these elements will lead to a better final performance. But is a method with a more (manually) tuned search space a better AutoML algorithm? If the key idea behind NAS is to find the optimal architecture, without human intervention, why are we devoting so much energy to infuse expert knowledge into the pipeline? Furthermore, the lack of ablation studies in most works makes it harder to pinpoint which components are instrumental to the final performance, which can easily lead to Hypothesizing After the Results are Known (HARKing; Gencoglu et al., 2019).
|
| 18 |
+
|
| 19 |
+
Paradoxically, the huge effort invested in finding better search spaces and training protocols, has led to a situation in which any randomly sampled architecture performs almost as well as those obtained by the search strategies. Our findings suggest that most of the gains in accuracy in recent contributions to NAS have come from manual improvements in the training protocol, not in the search algorithms.
|
| 20 |
+
|
| 21 |
+
As a step towards understanding which methods are more effective, we have collected code for 8 reasonably fast (search time of less than 4 days) NAS algorithms, and benchmarked them on 5 well known CV datasets. Using a simple metric—the relative improvement over the average architecture of the search space—we find that most NAS methods perform very similarly and rarely substantially above this baseline. The methods used are DARTS, StacNAS, PDARTS, MANAS, CNAS, NSGANET, ENAS and NAO. The datasets used are CIFAR10, CIFAR100, SPORT8, MIT67 and FLOWERS102.
|
| 22 |
+
|
| 23 |
+
Through a number of additional experiments on the widely used DARTS search space (Liu et al., 2019), we will show that: (a) how you train your model has a much bigger impact than the actual architecture chosen; (b) different architectures from the same search space perform very similarly, so much so that (c) hyperparameters, like the number of cells, or the seed itself have a very significant effect on the ranking; and (d) the specific operations themselves have less impact on the final accuracy than the hand-designed macro-structure of the network. Notably, we find that the $2 0 0 +$ architectures sampled from this search space (available from the link in the abstract) are all within a range of one percentage point (top-1 accuracy) after a standard full training on CIFAR10. Finally, we include some observations on how to foster reproducibility and a discussion on how to potentially avoid some of the encountered pitfalls.
|
| 24 |
+
|
| 25 |
+
# 2 RELATED WORK
|
| 26 |
+
|
| 27 |
+
As mentioned, NAS methods have the potential to truly revolutionize the field, but to do so it is crucial that future research avoids common mistakes. Some of these concerns have been recently raised by the community.
|
| 28 |
+
|
| 29 |
+
For example, Li & Talwalkar (2019) highlight that most NAS methods a) fail to compare against an adequate baseline, such as a properly implemented random search strategy, b) are overly complex, with no ablation to properly assign credit to the important components, and c) fail to provide all details needed for successfully reproducing their results. In our paper we go one step further and argue that the relative improvement over the average (randomly sampled) architecture is an useful tool to quantify the effectiveness of a proposed solution and compare it with competing methods. To partly answer their second point, and understand how much the final accuracy depends on the specific architecture, we implement an in-depth study of the widely employed DARTS (Liu et al., 2019) search space and perform an ablation on the commonly used training techniques (e.g. Cutout, DropPath, AutoAugment).
|
| 30 |
+
|
| 31 |
+
In addition, Sciuto et al. (2019) also took the important step of systematically using fair baselines, and suggest random search with early stopping, averaged over multiple seeds, as an extremely competitive baseline. They find that the search spaces of three methods investigated (DARTS, ENAS, NAO) have been expertly engineered to the extent that any randomly selected architecture performs very well. In contrast, we show that even random sampling (without search) provides an incredibly competitive baseline. Our relative improvement metric allows us to isolate the contribution of the search strategy from the effects of the search space and training pipeline. Thus, we further confirm the authors’ claim, showing that indeed the average architecture performs extremely well and that how you train a model has more impact than any specific architecture.
|
| 32 |
+
|
| 33 |
+
# 3 NAS BENCHMARK
|
| 34 |
+
|
| 35 |
+
In this section we present a systematic evaluation of 8 methods on 5 datasets using a strategy that is designed to reveal the quality of each method’s search strategy, removing the effect of the manuallyengineered training protocol and search space. The goal is to find general trends and highlight common features rather than just pin-pointing the most accurate algorithm.
|
| 36 |
+
|
| 37 |
+
Understanding why methods are effective is not an easy task: most introduce variations to previous search spaces, search strategies, and training protocols—with ablations disentangling the contribution of each component often incomplete or missing. In other words, how can we be sure that a new state-of-the-art method is not so simply due to a better engineered search space or training protocol? To address this issue we compare a set of 8 methods with randomly sampled architectures from their respective search spaces, and trained with the same protocol as the searched architectures.
|
| 38 |
+
|
| 39 |
+
The ultimate goal behind NAS should be to return the optimal model for any dataset given, at least within the limits of a certain task, and we feel that the current practices of searching almost exclusively on CIFAR10 go against this principle. Indeed, to avoid the very concrete risk of overfitting to this set of data, NAS methods should be tested on a variety of tasks. For this reason we run experiments on 5 different datasets.
|
| 40 |
+
|
| 41 |
+
# 3.1 METHODOLOGY
|
| 42 |
+
|
| 43 |
+
Criteria for dataset selection. We selected datasets to cover a variety of subtasks within image classification. In addition to the standard CIFAR10 we select CIFAR100 for a more challenging object classification problem (Krizhevsky, 2009); SPORT8 for action classification (Li & Fei-Fei, 2007); MIT67 for scene classification (Quattoni & Torralba, 2009); and FLOWERS102 for finegrained object classification (Nilsback & Zisserman, 2008). More details are given in the Appendix.
|
| 44 |
+
|
| 45 |
+
Criteria for method selection. We selected methods which (a) have open-source code, or provided it upon request, and (b) have a reasonable running time, specifically a search time under 4 GPU-days on CIFAR10. The selected methods are: DARTS (Liu et al., 2019), StacNAS (Li et al., 2019), PDARTS (Xin Chen, 2019), MANAS (Carlucci et al., 2019), CNAS (Weng et al., 2019), NSGANET (Lu et al., 2018), ENAS (Pham et al., 2018), and NAO (Luo et al., 2018). With the exception of NAO and NSGANET, all methods are DARTS variants and use weight sharing.
|
| 46 |
+
|
| 47 |
+
Evaluation protocol. NAS algorithms usually consist of two phases: (i) search, producing the best architecture according to the search algorithm used; (ii) augmentation, consisting in training from scratch the best model found in the search phase. We evaluate methods as follows: 1. Sample 8 architectures from the search space, uniformly at random, and use the method’s code to augment these architectures (same augment seed for all); 2. Use the method’s code to search for 8 architectures and augment them (different search seed, same augment seed); 3. Report mean and standard deviation of the top-1 test accuracy, obtained at the end of the augmentation, for both the randomly sampled and the searched architectures;
|
| 48 |
+
|
| 49 |
+
Since both learned and randomly sampled architectures share the same search space and training protocol, calculating a relative improvement over this random baseline as $R I = 1 0 0 \times ( A c c _ { m } -$ $A c c _ { r } ) / A c c _ { r }$ can offer insights into the quality of the search strategy alone. $A c c _ { m }$ and $A c c _ { r }$ represent the top-1 accuracy of the search method and random sampling strategies, respectively. A good, general-purpose NAS method is expected to yield $R I > 0$ consistently over different searches and across different subtasks. We emphasize that the comparison is not against random search, but rather against random sampling, i.e., the average architecture of the search space. For example, in the DARTS search space, for each edge in the graph that defines a cell we select one out of eight possible operations (e.g. pooling or convolutions) with uniform probability $1 / 8$ .
|
| 50 |
+
|
| 51 |
+
Hyperparameters are optimized on CIFAR10, according to the values reported by the corresponding authors. Since most methods do not include their optimization as part of the search routine, we assumed them to be robust and generalizable to other tasks. As such, aside from scaling down the architecture depending on dataset size, experiments on other datasets use the same hyperparameters. Other training details and references are given in the Appendix.
|
| 52 |
+
|
| 53 |
+

|
| 54 |
+
Figure 1: Comparison of search methods and random sampling from their respective search spaces. Methods lying in the diagonal perform the same as the average architecture, while methods above the diagonal outperform it. See also Table 1.
|
| 55 |
+
|
| 56 |
+

|
| 57 |
+
Figure 2: Performance and computational cost of the search phase on CIFAR10.
|
| 58 |
+
|
| 59 |
+
Table 1: Relative improvement metric, $\begin{array} { r l } { R I } & { { } = } \end{array}$ $1 0 0 \times ( A c c _ { m } - A c c _ { r } ) / A c c _ { r }$ (in $\%$ ), where $A c c _ { m }$ and $A c c _ { r }$ are the accuracies of the search method and random sampling baseline, respectively.
|
| 60 |
+
|
| 61 |
+
<table><tr><td></td><td>C10</td><td>C100</td><td>S8</td><td>M67</td><td>F102</td></tr><tr><td>DARTS</td><td>0.32</td><td>0.23</td><td>-0.13</td><td>0.10</td><td>0.25</td></tr><tr><td>PDARTS</td><td>0.52</td><td>1.20</td><td>0.51</td><td>1.19</td><td>0.20</td></tr><tr><td>NSGANET</td><td>-0.48</td><td>1.37</td><td>0.43</td><td>2.00</td><td>1.47</td></tr><tr><td>ENAS</td><td>0.01</td><td>-3.44</td><td>0.67</td><td>0.13</td><td>0.47</td></tr><tr><td>CNAS</td><td>0.74</td><td>-0.89</td><td>-1.06</td><td>-0.66</td><td>-2.48</td></tr><tr><td>MANAS</td><td>0.18</td><td>-0.20</td><td>0.33</td><td>1.48</td><td>0.70</td></tr><tr><td>StacNAS NAO</td><td>0.43 0.44</td><td>2.87 -0.01</td><td>0.38 -2.05</td><td>0.05 -1.53</td><td>-0.16 -0.13</td></tr></table>
|
| 62 |
+
|
| 63 |
+
# 3.2 RESULTS
|
| 64 |
+
|
| 65 |
+
Figure 1 shows the evaluation results on the 5 datasets, from which we draw two main conclusions. First, the improvements over random sampling tend to be small. In some cases the average performance of a method is even below the average randomly sampled architecture, which suggests that the search methods are not converging to desirable architectures. Second, the small range of accuracies obtained hints at narrow search spaces, where even the worst architectures perform reasonably well. See Section 5 for more experiments corroborating this conclusion.
|
| 66 |
+
|
| 67 |
+
We observe also that, on CIFAR10, the top half of best-performing methods (PDARTS, MANAS, DARTS, StacNAS) all perform similarly and positively in relation to their respective search spaces, but more variance is seen on the other datasets. This could be explained by the fact that most methods’ hyperparameters have been optimized on CIFAR10 and might not generalize as well on different datasets. As a matter of fact, we found that all NAS methods neglect to report the time needed to optimize hyperparameters. In addition, Table 1 shows the relative improvement metric $R I$ (see intro to Section 3) for each method and dataset.
|
| 68 |
+
|
| 69 |
+
The computational cost of searching for architectures is a limiting factor in their applicability and, therefore, an important variable in the evaluation of NAS algorithms. Figure 2 shows the performance as well and the computational cost of the search phase on CIFAR10.
|
| 70 |
+
|
| 71 |
+
# 4 COMPARISON OF TRAINING PROTOCOLS
|
| 72 |
+
|
| 73 |
+
In this section we attempt to shed some light on the surprising results of the previous section. We noticed that there was a much larger differences between the random baselines of different methods than the actual increase in performance of each approach. We hypothesized that how a network is trained (the training protocol) has a larger impact on the final accuracy than which architecture is trained, for each search space. To test this, we performed sensitivity analysis using the most common performanceboosting training protocols.
|
| 74 |
+
|
| 75 |
+
# 4.1 METHODOLOGY
|
| 76 |
+
|
| 77 |
+
We decided to evaluate architectures from the commonly used DARTS search space (Liu et al., 2019) on the CIFAR10 dataset. We use the following process: 1) sample 8 random architectures, 2) train them with different training protocols (details below) and 3) report mean, standard deviation and maximum of the top-1 test accuracy at the end of the training process.
|
| 78 |
+
|
| 79 |
+

|
| 80 |
+
Figure 3: Comparison of different augmentation protocols for the DARTS search space on CIFAR10. Same colored dots represent minimum and maximum accuracies in the 8 runs.
|
| 81 |
+
|
| 82 |
+
Training protocols. The simplest training protocol, which we will call Base is similar to the one used in DARTS, but with all tricks disabled: the model is simply trained for 600 epochs. On the other extreme, our full protocol uses several tricks which have been used in recent works (Xie et al., 2019b; Nayman et al., 2019): Auxiliary Towers (A), DropPath (D; Larsson & Shakhnarovich, 2017), Cutout (C; DeVries & Taylor, 2017), AutoAugment (AA; Cubuk et al., 2018), extended training for 1500 epochs (1500E), and increased number of channels (50C). In between these two extremes, by selectively enabling and disabling each component, we evaluated a further 8 intermediate training protocols. When active, DropPath probability is 0.2, cutout length is 16, auxiliary tower weight is 0.4, and AutoAugment combined with Cutout are used after standard data pre-processing techniques previously described, as in Popien (2019).
|
| 83 |
+
|
| 84 |
+
# 4.2 RESULTS
|
| 85 |
+
|
| 86 |
+
As shown in Figure 3, a large difference of over 3 percentage points (p.p.) exists between the simplest and the most advanced training protocols. Indeed, this is much higher than any improvement over random sampling observed in the previous section: for example, on CIFAR10, the best improvement observed was 0.69 p.p. In other words, the training protocol is often far more important than the architecture used. Note that the best accuracy of the 8 random architectures training with the best protocol is $9 8 . 1 5 \%$ , which is only 0.25 p.p. below state-of-the-art (Nayman et al., 2019).
|
| 87 |
+
|
| 88 |
+
To summarize, it seems that most recent state-of-the-art results, though impressive, cannot always be attributed to superior search strategies. Rather, they are often the result of expert knowledge applied to the evaluation protocol. In Figure 10 (Appendix A.3.1) we show similar results when training a ResNet-50 (He et al., 2016) with the same protocols.
|
| 89 |
+
|
| 90 |
+

|
| 91 |
+
Figure 4: Training curves for the 214 randomly sampled architectures. Inset plot shows the histogram of accuracies at different epochs.
|
| 92 |
+
|
| 93 |
+

|
| 94 |
+
Figure 5: Correlation between accuracies at different epochs and final accuracy, using raw and smoothed accuracies over a window $w$ .
|
| 95 |
+
|
| 96 |
+
# 5 STUDY OF DARTS’ SEARCH SPACE
|
| 97 |
+
|
| 98 |
+
# 5.1 DISTRIBUTION OF THE RANDOM SAMPLING WITHIN DARTS SEARCH SPACE
|
| 99 |
+
|
| 100 |
+
To better understand the results from the previous section, we sampled a considerable number of architectures (214) from the most commonly used search space (Liu et al., 2019) and fully trained them with the matching training protocol (Cutout+DropPath+Auxiliary Towers). This allows us to get a sense of how much variance exists between the different models (training statistics are made available at the link in the abstract).
|
| 101 |
+
|
| 102 |
+
As we can observe from Figure 4, architectures sampled from this search space all perform similarly, with a mean of $9 7 . 0 3 \pm 0 . 2 3$ . The worst architecture we found had an accuracy of 96.18, while the best achieved 97.56.
|
| 103 |
+
|
| 104 |
+
To put this into perspective, many methods using the same training protocol, fall within (or very close to) the standard deviation of the average architecture. Furthermore, as we can observe in Figure 7, the number of cells (a human-picked hyperparameter) has a much larger impact on the final accuracy.
|
| 105 |
+
|
| 106 |
+
In Figure 5 we used the training statistics of the 214 models to plot the correlation between test accuracies at different epochs: it grows slowly in an almost linear fashion. We note that using the moving average of the accuracies yields a stronger correlation, which could be useful for methods using early stopping.
|
| 107 |
+
|
| 108 |
+
# 5.2 OPERATIONS
|
| 109 |
+
|
| 110 |
+
To test whether the results from the previous section were due to the choice of available operations, we developed an intentionally sub-optimal search space containing 4 plain convolutions $( 1 \times 1 , 3 \times 3$ , $7 \times 7 .$ , $1 1 \times 1 1$ ), 2 max pooling operators $( 3 \times 3 , 5 \times 5 )$ plus the none and skip connect operations. This proposed search space is clearly more parameter inefficient compared to the commonly used DARTS one (which uses both dilated and separable ones), and we expect it to perform worse.
|
| 111 |
+
|
| 112 |
+
We sampled 56 architectures from this new search space and trained them with the DARTS training protocol (Cutout $^ +$ DropPath $^ +$ Auxiliary Towers), for fair comparison with the results from the previous section. Figure 6 shows the resulting histogram, together with the one obtained from the classical DARTS space of operations. The two distributions are only shifted by 0.18 accuracy points. Given the minor difference in performance, the specific operations are not a key ingredient in the success of this search space. Very likely, it’s the well engineered cell structure that allows the model to perform as well as it does.
|
| 113 |
+
|
| 114 |
+

|
| 115 |
+
Figure 6: Histograms of the final accuracies (600 epochs) for architectures sampled from the DARTS search space (214 models) and our modified version (56 models).
|
| 116 |
+
|
| 117 |
+

|
| 118 |
+
Figure 7: Performance of 16 randomly sampled architectures with different numbers of cells. Error bars represent standard deviation.
|
| 119 |
+
|
| 120 |
+

|
| 121 |
+
Figure 8: Changes in the ranking of different architectures when trained with two different seeds (A and B).
|
| 122 |
+
|
| 123 |
+

|
| 124 |
+
Figure 9: Changes in the ranking of different architectures when trained with different numbers of cells (same seed).
|
| 125 |
+
|
| 126 |
+
# 5.3 DOES CHANGING SEED AND NUMBER OF CELLS AFFECT RANKING?
|
| 127 |
+
|
| 128 |
+
A necessary practice for many weight-sharing methods (Liu et al., 2019; Pham et al., 2018) is to restart the training from scratch after the search phase, with a different number of cells. Recent works have warned that this procedure might negatively affect ranking; similarly, the role of the seed has been previously recognized as as a fundamental element in reproducibility (Li & Talwalkar, 2019; Sciuto et al., 2019).
|
| 129 |
+
|
| 130 |
+
To test the impact of seed, we randomly sampled 32 architectures and trained them with two different seeds (Figure 8). Ranking is heavily influenced, as the Kendall tau correlation between the two sets of training is 0.48. On average, the test accuracy changes by $0 . 1 3 \% \pm 0 . 0 8$ (max change is $0 . 3 9 \%$ , which is substantial considering the small gap between random architectures and NAS methods.
|
| 131 |
+
|
| 132 |
+
To test the depth-gap we trained another 32 with different number of cells (Figure 9). The correlation between the two different depths is not very strong as measured by Kendall Tau (0.54), with architectures shifting up and down the rankings by up to 18 positions (out of 32). Methods employing weight sharing (WS) would see an even more pronounced effect as the architectures normally chosen at 8 cells would have been training sub-optimally due to the WS itself (Sciuto et al., 2019).
|
| 133 |
+
|
| 134 |
+
These findings point towards two issues. The first is that since the seed has such a large effect on ranking, it stands to reason that the final accuracy reported should be averaged over multiple seeds. The second is that, if the lottery ticket hypothesis holds—so that specific sub-networks are better mainly due to their lucky initialization; Frankle & Carbin., 2018—together with our findings, this could be an additional reason why methods searching on a different number of cells than the final model, struggle to significantly improve on the average randomly sampled architecture.
|
| 135 |
+
|
| 136 |
+
# 6 DISCUSSION AND BEST PRACTICES
|
| 137 |
+
|
| 138 |
+
In this section we offer some suggestions on how to mitigate the issues in NAS research.
|
| 139 |
+
|
| 140 |
+
Augmention tricks: while achieving higher accuracies is clearly a desirable goal, we have shown in section 4, that using well engineered training protocols can hide the contribution of the search algorithm. We therefore suggest that both results, with and without training tricks, should be reported. An example of best practice is found in Hundt et al. (2019).
|
| 141 |
+
|
| 142 |
+
Search Space: it is difficult to evaluate the effectiveness of any given proposed method without a measure of how good randomly sampled architectures are. This is not the same thing as performing a random search which is a search strategy in itself; random sampling is simply used to establish how good the average model is. A simple approach to measure the variability of any new given search space could be to randomly sample $k$ architectures and report mean and standard deviation. We hope that future works will attempt to develop more expressive search spaces, capable of producing both good and bad network designs. Restricted search spaces, while guaranteeing good performance and quick results, will inevitably be constrained by the bounds of expert knowledge (local optima) and will be incapable of reaching more truly innovative solutions (closer to the global optima). As our findings in section 5.2 suggest, the overall wiring (the macro-structure) is an extremely influential component in the final performance. As such, future research could investigate the optimal wiring at a global level: an interesting work in this direction is Xie et al. (2019a).
|
| 143 |
+
|
| 144 |
+
Multiple datasets: as the true goal of AutoML is to minimize the need for human experts, focusing the research efforts on a single dataset will inevitably lead to algorithmic overfitting and/or methods heavily dependent on hyperparameter tuning. The best solution for this is likely to test NAS algorithms on a battery of datasets, with different characteristics: image sizes, number of samples, class granularity and learning task.
|
| 145 |
+
|
| 146 |
+
Investigating hidden components: as our experiments in Sections 4 and 5.2 show, the DARTS search space is not only effective due to specific operations that are being chosen, but in greater part due to the overall macro-structure and the training protocol used. We suggest that proper ablation studies can lead to better understanding of the contributions of each element of the pipeline.
|
| 147 |
+
|
| 148 |
+
The importance of reproducibility: reproducibility is of extreme relevance in all sciences. To this end, it is very important that authors release not only their best found architecture but also the corresponding seed (if they did not average over multiple ones), as well as the code and the detailed training protocol (including hyperparameters). To this end, NAS-Bench-101 (Ying et al., 2019), a dataset mapping architectures to their accuracy, can be extremely useful, as it allows the quality of search strategies to be assessed in isolation from other NAS components (e.g. search space, training protocol) in a quick and reproducible fashion. The code for this paper is open-source (link in the abstract). We also open-source the 270 trained architectures used in Section 5.
|
| 149 |
+
|
| 150 |
+
Hyperparameter tuning cost: tuning hyperparameters in NAS is an extremely costly component. Therefore, we argue that either (i) hyperparameters are general enough so that they do not require tuning for further tasks, or (2) the cost is included in the search budget.
|
| 151 |
+
|
| 152 |
+
# 7 CONCLUSIONS
|
| 153 |
+
|
| 154 |
+
AutoML, and NAS in particular, have the potential to truly democratize the use of machine learning for all, and could bring forth very notable improvements on a variety of tasks. To truly step forward, a principled approach, with a focus on fairness and reproducibility is needed.
|
| 155 |
+
|
| 156 |
+
In this paper we have shown that, for many NAS methods, the search space has been engineered such that all architectures perform similarly well and that their relative ranking can easily shift. We have furthermore showed that the training protocol itself has a higher impact on the final accuracy than the actual network. Finally, we have provided some suggestions on how to make future research more robust to these issues.
|
| 157 |
+
|
| 158 |
+
We hope that our findings will help the community focus their efforts towards a more general approach to automated neural architecture design. Only then can we expect to learn from NASgenerated architectures as opposed to the current paradigm where search spaces are heavily influenced by our current (human) expert knowledge.
|
| 159 |
+
|
| 160 |
+
# REFERENCES
|
| 161 |
+
|
| 162 |
+
Fabio Carlucci, Pedro M. Esperanc¸a, Marco Singh, Antoine Yang, Victor Gabillon, Hang Xu, Zewei Chen, and Jun Wang. MANAS: Multi-Agent Neural Architecture Search. arxiv:1909.01051, 2019.
|
| 163 |
+
|
| 164 |
+
Ekin D Cubuk, Barret Zoph, Dandelion Mane, Vijay Vasudevan, and Quoc V Le. Autoaugment: Learning augmentation policies from data. arXiv:1805.09501, 2018.
|
| 165 |
+
|
| 166 |
+
Terrance DeVries and Graham W. Taylor. Improved regularization of convolutional neural networks with cutout. arXiv:1708.04552, 2017.
|
| 167 |
+
|
| 168 |
+
Thomas Elsken, Jan Hendrik Metzen, and Frank Hutter. Neural architecture search: A survey. Journal of Machine Learning Research, 20(55):1–21, 2019.
|
| 169 |
+
|
| 170 |
+
Jonathan Frankle and Michael Carbin. The lottery ticket hypothesis: Finding sparse, trainable neural networks. In arXiv:1803.03635, 2018.
|
| 171 |
+
|
| 172 |
+
Oguzhan Gencoglu, Mark van Gils, Esin Guldogan, Chamin Morikawa, Mehmet Suzen, Mathias ¨ Gruber, Jussi Leinonen, and Heikki Huttunen. Hark side of deep learning–from grad student descent to automated machine learning. arXiv:1904.07633, 2019.
|
| 173 |
+
|
| 174 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Computer Vision and Pattern Recognition (CVPR), pp. 770–778, 2016.
|
| 175 |
+
|
| 176 |
+
Zhang Xiangyu Rein Shaoqing He, Kaiming and Jian Sun. Delving deep into rectifiers: Surpassing human level performance on imagenet classification. In Computer Vision and Pattern Recognition (CVPR), 2015.
|
| 177 |
+
|
| 178 |
+
Gao Huang, Yu Sun, Zhuang Liu, Daniel Sedra, and Kilian Q Weinberger. Deep networks with stochastic depth. In European conference on computer vision, pp. 646–661. Springer, 2016.
|
| 179 |
+
|
| 180 |
+
Andrew Hundt, Varun Jain, and Gregory D. Hager. sharpDARTS: Faster and more accurate differentiable architecture search. arXiv:1903.09900, 2019.
|
| 181 |
+
|
| 182 |
+
Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, University of Toronto, 2009.
|
| 183 |
+
|
| 184 |
+
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.
|
| 185 |
+
|
| 186 |
+
Michael Maire Larsson, Gustav and Gregory Shakhnarovich. Fractalnet: Ultra-deep neural networks without residuals. In International Conference on Learning Representations (ICLR), 2017.
|
| 187 |
+
|
| 188 |
+
Guilin Li, Xing Zhang, Zitong Wang, Zhenguo Li, and Tong Zhang. StacNAS: Towards stable and consistent optimization for differentiable Neural Architecture Search. arXiv:1909.11926, 2019.
|
| 189 |
+
|
| 190 |
+
Li-Jia Li and Li Fei-Fei. What, where and who? classifying events by scene and object recognition. In International Conference on Computer Vision (ICCV), pp. 1–8, 2007.
|
| 191 |
+
|
| 192 |
+
Liam Li and Ameet Talwalkar. Random search and reproducibility for neural architecture search. arXiv:1902.07638, 2019.
|
| 193 |
+
|
| 194 |
+
Hanwen Liang, Shifeng Zhang, Jiacheng Sun, Xingqiu He, Weiran Huang, Kechen Zhuang, and Zhenguo Li. DARTS $^ +$ : Improved differentiable architecture search with early stopping. arXiv:1909.06035, 2019.
|
| 195 |
+
|
| 196 |
+
Marius Lindauer and Frank Hutter. Best practices for scientific research on neural architecture search. arXiv:1909.02453, 2019.
|
| 197 |
+
|
| 198 |
+
Hanxiao Liu, Karen Simonyan, and Yiming Yang. DARTS: Differentiable architecture search. In International Conference on Learning Representations (ICLR), 2019.
|
| 199 |
+
|
| 200 |
+
Ilya Loshchilov and Frank Hutter. Sgdr: Stochastic gradient descent with warm restarts. In International Conference on Learning Representations (ICLR), 2017.
|
| 201 |
+
|
| 202 |
+
Zhichao Lu, Ian Whalen, Vishnu Boddeti, Yashesh Dhebar, Kalyanmoy Deb, Erik Goodman, and Wolfgang Banzhaf. Nsga-net: a multi-objective genetic algorithm for neural architecture search. In GECCO-2019, 2018.
|
| 203 |
+
|
| 204 |
+
Renqian Luo, Fei Tian, Tao Qin, Enhong Chen, and Tie-Yan Liu. Neural architecture optimization. In Advances in Neural Information Processing Systems (NIPS), pp. 7816–7827, 2018.
|
| 205 |
+
|
| 206 |
+
Niv Nayman, Asaf Noy, Tal Ridnik, Itamar Friedman, Rong Jin, and Lihi Zelnik-Manor. Xnas: Neural architecture search with expert advice. arXiv:1906.08031, 2019.
|
| 207 |
+
|
| 208 |
+
Yurii E Nesterov. A method for solving the convex programming problem with convergence rate o (1/kˆ 2). In Dokl. akad. nauk Sssr, volume 269, pp. 543–547, 1983.
|
| 209 |
+
|
| 210 |
+
Maria-Elena Nilsback and Andrew Zisserman. Automated flower classification over a large number of classes. In Sixth Indian Conference on Computer Vision, Graphics & Image Processing, pp. 722–729, 2008.
|
| 211 |
+
|
| 212 |
+
Hieu Pham, Melody Guan, Barret Zoph, Quoc Le, and Jeff Dean. Efficient neural architecture search via parameter sharing. In International Conference on Machine Learning (ICML), pp. 4092–4101, 2018.
|
| 213 |
+
|
| 214 |
+
Philip Popien. AutoAugment. GitHub repository, https://github.com/DeepVoltaire/ AutoAugment, 2019.
|
| 215 |
+
|
| 216 |
+
Ariadna Quattoni and Antonio Torralba. Recognizing indoor scenes. In Computer Vision and Pattern Recognition (CVPR), pp. 413–420, 2009.
|
| 217 |
+
|
| 218 |
+
Esteban Real, Sherry Moore, Andrew Selle, Saurabh Saxena, Yutaka Leon Suematsu, Jie Tan, Quoc V Le, and Alexey Kurakin. Large-scale evolution of image classifiers. In International Conference on Machine Learning (ICML), pp. 2902–2911, 2017.
|
| 219 |
+
|
| 220 |
+
Christian Sciuto, Kaicheng Yu, Martin Jaggi, Claudiu Musat, and Mathieu Salzmann. Evaluating the search phase of neural architecture search. arXiv:1902.08142, 2019.
|
| 221 |
+
|
| 222 |
+
Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. The journal of machine learning research, 15(1):1929–1958, 2014.
|
| 223 |
+
|
| 224 |
+
Christian Szegedy, Sergey Ioffe, Vincent Vanhoucke, and Alexander A Alemi. Inception-v4, Inception-ResNet and the impact of residual connections on learning. In AAAI Conference on Artificial Intelligence, 2017.
|
| 225 |
+
|
| 226 |
+
Yu Weng, Tianbao Zhou, Lei Liu, and Chunlei Xia. Automatic convolutional neural architecture search for image classification under different scenes. IEEE Access, 7:38495–38506, 2019.
|
| 227 |
+
|
| 228 |
+
Saining Xie, Alexander Kirillov, Ross Girshick, and Kaiming He. Exploring randomly wired neural networks for image recognition. arXiv preprint arXiv:1904.01569, 2019a.
|
| 229 |
+
|
| 230 |
+
Sirui Xie, Hehui Zheng, Chunxiao Liu, and Liang Lin. SNAS: Stochastic neural architecture search. In International Conference on Learning Representations (ICLR), 2019b.
|
| 231 |
+
|
| 232 |
+
Jun Wu Qi Tian Xin Chen, Lingxi Xie. Progressive differentiable architecture search. In International Conference on Computer Vision (ICCV), 2019.
|
| 233 |
+
|
| 234 |
+
Chris Ying, Aaron Klein, Eric Christiansen, Esteban Real, Kevin Murphy, and Frank Hutter. NASBench-101: Towards reproducible neural architecture search. In International Conference on Machine Learning (ICML 2019), pp. 7105–7114, 2019.
|
| 235 |
+
|
| 236 |
+
Barret Zoph and Quoc Le. Neural architecture search with reinforcement learning. In International Conference on Learning Representations (ICLR), 2017.
|
| 237 |
+
|
| 238 |
+
Table 2: Hyperparameters for different NAS methods. “S” denotes search stage and “A” denotes augmentation stage. For learning rates, $a \downarrow b$ means cosine annealing from $a$ to $b$ .
|
| 239 |
+
|
| 240 |
+
<table><tr><td rowspan="2"></td><td colspan="5">Method</td></tr><tr><td>DARTS</td><td>StacNAS</td><td>PDARTS</td><td>MANAS</td><td>CNAS</td></tr><tr><td>batch size S</td><td>64</td><td>64</td><td>96</td><td>64</td><td>64</td></tr><tr><td>batch size A</td><td>96</td><td>96</td><td>128</td><td>128</td><td>64</td></tr><tr><td>init channels S</td><td>16</td><td>16</td><td>16</td><td>16</td><td>16</td></tr><tr><td>init channels A</td><td>36</td><td>36</td><td>36</td><td>36</td><td>36</td></tr><tr><td>epochs S</td><td>50</td><td>100+100</td><td>25+25+25</td><td>50</td><td>60</td></tr><tr><td>epochs A</td><td>600</td><td>600</td><td>600</td><td>600</td><td>200</td></tr><tr><td>optimizer S/A</td><td>SGD</td><td>SGD</td><td>SGD</td><td>SGD</td><td>Adam</td></tr><tr><td>learning rates S</td><td>.025↓.001</td><td>.025↓.001</td><td>.025↓.0</td><td>.025↓.001</td><td>.025-.003</td></tr><tr><td>learning rates A</td><td>.025↓.0</td><td>.025↓.0</td><td>.025↓.0</td><td>.025←.0</td><td>.025-.001</td></tr><tr><td>weight decay S/A</td><td>3 ×10-4</td><td>3×10-4</td><td>3×10-4</td><td>3×10-4</td><td>3×10-4</td></tr><tr><td>optimizer arch</td><td>Adam</td><td>Adam</td><td>Adam</td><td></td><td>Adam</td></tr><tr><td>learning rates arch</td><td>3×10-4</td><td>3×10-4</td><td>6×10-4</td><td></td><td>3×10-4</td></tr><tr><td>weight decay arch</td><td>10-3</td><td>10-3</td><td>10-3</td><td></td><td>10-3</td></tr><tr><td>nb cells S CIFAR</td><td>8</td><td>14/20</td><td>5/11/17</td><td>8</td><td>6</td></tr><tr><td>nb cells A CIFAR</td><td>20</td><td>20</td><td>20</td><td>20</td><td>20</td></tr><tr><td>nb cells S other datasets</td><td>8</td><td>8/8</td><td>8/8/8</td><td>8</td><td>6</td></tr><tr><td>nb cellsA other datasets</td><td>8</td><td>8</td><td>8</td><td>8</td><td>8</td></tr><tr><td>nb intermediate nodes</td><td>4</td><td>4</td><td>4</td><td>4</td><td>6</td></tr></table>
|
| 241 |
+
|
| 242 |
+
# A APPENDIX
|
| 243 |
+
|
| 244 |
+
This section details the datasets and the hyperparameters used for each method on each dataset. Search spaces were naturally left unchanged. Hyperparameters were chosen as close as possible to the original paper and occasionally updated to more recent implementations. The network size was tuned similarly for all methods for SPORT8, MIT67 and FLOWERS102. All experiments were run on NVIDIA Tesla V100 GPUs.
|
| 245 |
+
|
| 246 |
+
# A.1 METHODS AND HYPERPARAMETERS
|
| 247 |
+
|
| 248 |
+
During search, models are trained/validated on the training/validation subsets, respectively During the final evaluation, the model is trained on the training $^ +$ validation subsets and tested on the test subset.
|
| 249 |
+
|
| 250 |
+
Common hyperparameters. All 8 methods share a common number of hyperparameters precised here. When SGD optimizer is used, momentum is .9 while when Adam is used, momentum is $\beta = ( 0 . 5 , 0 . 9 9 9 )$ . Gradient clipping is set at 5.
|
| 251 |
+
|
| 252 |
+
DARTS, StacNAS, PDARTS, MANAS, CNAS common hyperparameters. These methods are inspired by DARTS code-wise and consequently share a common number of hyperparameters, which we precise in table 1.
|
| 253 |
+
|
| 254 |
+
DARTS. We used the following repository : https://github.com/khanrc/pt.darts. It notably updates the official implementation to a pytorch version posterior to 0.4. Additional enhancements include cutout of size 16 (DeVries & Taylor, 2017), path dropout of probability 0.2 (Larsson & Shakhnarovich, 2017), and auxiliary tower with weight 0.4.
|
| 255 |
+
|
| 256 |
+
StacNAS. We used an unofficial implementation provided by the authors. The search process consists of 2 stages, of which the details are given in table 1. Additional enhancements are the same as DARTS.
|
| 257 |
+
|
| 258 |
+
PDARTS. We used the official implementation $:$ https://github.com/chenxin061/pdarts. The search process consists of 3 stages, of which general details are given in table 1. At stage 1, 2 and 3 respectively, the number of operations decreases from 8 to 5 to 3, and the dropout probability on skip-connect increases from 0.0 to 0.4 to 0.7 for CIFAR10, SPORT8, MIT67 and FLOWERS102 (0.1 to 0.2 to 0.3 for CIFAR100). Discovered cells are restricted to keep at most 2 skip-connect operations. Additional enhancements include cutout of size 16 (DeVries & Taylor, 2017), DropPath of probability 0.3 (Larsson & Shakhnarovich, 2017) and auxiliary tower with weight 0.4.
|
| 259 |
+
|
| 260 |
+
MANAS. We used an unofficial implementation provided by the authors. The reward baseline is 5, gamma is 0.1 (0.07 for SPORT8, 0.05 for FLOWERS102, 0.01 for MIT67) and the Boltzmann temperature decays from 1000 to 200 (300 to 100 for SPORT8, 5000 to 2000 for MIT67). Additional enhancements are the same as DARTS.
|
| 261 |
+
|
| 262 |
+
CNAS. We used the official implementation : https://github.com/tianbaochou/CNAS. Label Smoothing is used with epsilon 0.1. Other additional enhancements include cutout of size 16 (DeVries & Taylor, 2017), DropPath of probability 0.25 (Larsson & Shakhnarovich, 2017).
|
| 263 |
+
|
| 264 |
+
NSGANET. We used the official implementation: https://github.com/ianwhale/nsga-net. The search is done in the micro search space (with 2 cells to search, 9 operations in the search space, 5 blocks in each cell) on 8 layers networks. The population size is 40, the number of generations is 30 and the number of offsprings created by generation is 20. Networks are trained for 20 epochs, with batch size 128, and the initial number of channels is 16. For architecture evaluation, the network is composed of 20 cells for CIFAR10 and CIFAR100, and 8 cells for SPORT8, MIT67 and FLOWERS102. The final selected models are trained for 600 epochs with batch size 96 and the initial number of channels 34. Momentum SGD is used with initial learning rate $\eta _ { w } = 0 . 0 2 5$ (annealed down to zero following a cosine schedule), and weight decay $3 \times 1 0 ^ { - \hat { 4 } }$ . The filter increment is set to 4, and squeeze and excitation is used. Additional enhancements include cutout of size 16 (DeVries & Taylor, 2017), DropPath of probability 0.2 (Larsson & Shakhnarovich, 2017) and auxiliary tower with weight 0.4.
|
| 265 |
+
|
| 266 |
+
NAO. We used the official Pytorch implementation: https://github.com/renqianluo/NAO pytorch. The LSTM model used to encode architecture has a token embedding size of 48 and a hidden state size of 96. The LSTM model used to decode architecture has a hidden state size of 96. The encoder and decoder are trained using Adam for 1000 epochs with a learning rate of 0.001. The trade-off parameters is $\lambda = 0 . 9$ . The step size to perform continuous optimization is $\eta = 1 0$ . The number of nodes is fixed to 5, normal cell is stacked 3 (2 for SPORT8, MIT67 and FLOWERS102) times to form the CNN architecture, which corresponds to a 11 (8 for SPORT8, MIT67 and FLOWERS102) cells network and the initial number of channels is 20. Networks are trained for 100 epochs with batch size 64 for training, and validated for 20 epochs with batch size 500. For architecture evaluation, the final CNN architecture is a 20 cells network (8 cells network). This network is trained for 600 epochs with batch size 128 for the training set (96 for both for SPORT8, MIT67 and FLOWERS102), 500 for the validation set (128 for both for SPORT8, MIT67 and FLOWERS102) and the initial number of channels is 36. Momentum SGD is used with initial learning rate $\eta _ { w } = 0 . 0 2 5$ (annealed down to zero following a cosine schedule) and weight decay $3 \times 1 0 ^ { - \overline { { 4 } } }$ . Additional enhancements include cutout of size 16 (DeVries & Taylor, 2017), DropPath of probability 0.2 (Larsson & Shakhnarovich, 2017), dropout of probability 0.4 (Srivastava et al., 2014), and auxiliary tower with weight 0.4.
|
| 267 |
+
|
| 268 |
+
ENAS. We used the official tensorflow implementation for experiments on CIFAR10 and CIFAR100: https://github.com/melodyguan/enas Experiments on SPORT8, MIT67 and FLOWERS102 are done using a more recent version in Pytorch for the search : https://github.com/MengTianjian/enas-pytorch. Because only the search process is implemented there, the evaluation code used is the same as DARTS. During the search, networks are composed of 8 cells. The shared parameters $w$ are trained with Nesterov momentum (Nesterov, 1983), weight decay $1 0 ^ { - 4 }$ , gradient clipping 5, batch size 160, 20 output filters, and a cosine learning rate schedule with $l _ { m } a x = 0 . 0 5$ , $l _ { m } i n = 0 . 0 0 1$ , $T _ { 0 } = 1 0$ , $T _ { m } u l = 2$ (Loshchilov & Hutter, 2017). Each architecture search is run for 150 epochs. $w$ are initialized with He initialization (He & Sun, 2015). The policy parameters $\theta$ are initialized uniformly in [-0.1, 0.1], and trained with Adam at a learning rate of 0.00035. A tanh constant of 1.10 and a temperature of 2.5 is applied to the controllers logits, and the controller entropy is added to the reward with weight 0.1. For the evaluation, the architecture searched is extended to 17 cells (8 for SPORT8, MIT67 and FLOWERS102), trained for 630 epochs, with batch size 144, and a cosine learning rate schedule with $l _ { \mathrm { m a x } } = 0 . 0 5$ , $l _ { \mathrm { m i n } } = 0 . 0 0 1$ , $T _ { 0 } = 1 0$ , $T _ { \mathrm { m u l } } = 2$ .
|
| 269 |
+
|
| 270 |
+
# A.2 DATASETS
|
| 271 |
+
|
| 272 |
+
We present here the datasets used and how they are pre-processed.
|
| 273 |
+
|
| 274 |
+
CIFAR10. The CIFAR10 dataset (Krizhevsky, 2009) is a dataset of 10 classes and consists of 50, 000 training images and 10, 000 test images of size $3 2 \times 3 2$ .
|
| 275 |
+
|
| 276 |
+
CIFAR100. The CIFAR100 dataset (Krizhevsky, 2009) is a dataset of 100 classes and consists of 50, 000 training images and 10, 000 test images of size $3 2 \times 3 2$ .
|
| 277 |
+
|
| 278 |
+
Each of these datasets is split into a training, validation and testing subsets of size 25, 000, 25, 000 and 10, 000 respectively. For both these datasets, we use standard data pre-processing and augmentation techniques, i.e. subtracting the channel mean and dividing by the channel standard deviation; centrally padding the training images to $4 0 \times 4 0$ and randomly cropping them back to $3 2 \times 3 2$ ; and randomly clipping them horizontally.
|
| 279 |
+
|
| 280 |
+
SPORT8. This is an action recognition dataset containing 8 sport event categories and a total of 1579 images (Li & Fei-Fei, 2007). The tiny size of this dataset stresses the generalization capabilities of any NAS method applied to it.
|
| 281 |
+
|
| 282 |
+
MIT67. This is a dataset of 67 classes representing different indoor scenes and consists of 15, 620 images of different sizes (Quattoni & Torralba, 2009).
|
| 283 |
+
|
| 284 |
+
FLOWERS102. This is a dataset of 102 classes representing different species of flowers and consists of 8, 189 images of different sizes (Nilsback & Zisserman, 2008).
|
| 285 |
+
|
| 286 |
+
Each of these datasets is split into a training, validation and testing subsets with proportions $4 0 / 4 0 / 2 0 \ ( \% )$ . For each one, we use use standard data pre-processing and augmentation techniques, i.e. subtracting the channel mean and dividing the channel standard deviation, cropping the training images to random size and aspect ratio, resizing them to $2 2 4 \times 2 2 4$ , and randomly changing their brightness, contrast, and saturation, while resizing test images to $2 5 6 \times 2 5 6$ and cropping them at the center.
|
| 287 |
+
|
| 288 |
+
# A.3 ADDITIONAL RESULTS
|
| 289 |
+
|
| 290 |
+

|
| 291 |
+
A.3.1 DIFFERENT TRAINING PROTOCOLS FOR RESNET-50
|
| 292 |
+
Figure 10: Extension of Figure 3, including results obtained by training a ResNet-50 on CIFAR10. Bars with darker shade are for ResNet-50 and bars with lighter shade are for DARTS (same as Figure 3). Result are for 8 runs of each training protocol. For ResNet-50, the auxiliary tower was added after layer 2. As DropPath (Larsson & Shakhnarovich, 2017) would not have been straightforward to apply, we instead implemented Stocastic Depth (Huang et al., 2016), to a similar effect.
|
parse/train/HygrdpVKvr/HygrdpVKvr_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/P9TYG0j-wtG/P9TYG0j-wtG.md
ADDED
|
@@ -0,0 +1,374 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Score-based Generative Modeling in Latent Space
|
| 2 |
+
|
| 3 |
+
Arash Vahdat∗ NVIDIA avahdat@nvidia.com
|
| 4 |
+
|
| 5 |
+
Karsten Kreis∗ NVIDIA kkreis@nvidia.com
|
| 6 |
+
|
| 7 |
+
Jan Kautz NVIDIA jkautz@nvidia.com
|
| 8 |
+
|
| 9 |
+
# Abstract
|
| 10 |
+
|
| 11 |
+
Score-based generative models (SGMs) have recently demonstrated impressive results in terms of both sample quality and distribution coverage. However, they are usually applied directly in data space and often require thousands of network evaluations for sampling. Here, we propose the Latent Score-based Generative Model (LSGM), a novel approach that trains SGMs in a latent space, relying on the variational autoencoder framework. Moving from data to latent space allows us to train more expressive generative models, apply SGMs to non-continuous data, and learn smoother SGMs in a smaller space, resulting in fewer network evaluations and faster sampling. To enable training LSGMs end-to-end in a scalable and stable manner, we (i) introduce a new score-matching objective suitable to the LSGM setting, (ii) propose a novel parameterization of the score function that allows SGM to focus on the mismatch of the target distribution with respect to a simple Normal one, and (iii) analytically derive multiple techniques for variance reduction of the training objective. LSGM obtains a state-of-the-art FID score of 2.10 on CIFAR-10, outperforming all existing generative results on this dataset. On CelebA-HQ-256, LSGM is on a par with previous SGMs in sample quality while outperforming them in sampling time by two orders of magnitude. In modeling binary images, LSGM achieves state-of-the-art likelihood on the binarized OMNIGLOT dataset. Our implementation is available at https://github.com/NVlabs/LSGM.
|
| 12 |
+
|
| 13 |
+
# 1 Introduction
|
| 14 |
+
|
| 15 |
+
The long-standing goal of likelihood-based generative learning is to faithfully learn a data distribution, while also generating high-quality samples. Achieving these two goals simultaneously is a tremendous challenge, which has led to the development of a plethora of different generative models. Recently, score-based generative models (SGMs) demonstrated astonishing results in terms of both high sample quality and likelihood [1, 2]. These models define a forward diffusion process that maps data to noise by gradually perturbing the input data. Generation corresponds to a reverse process that synthesizes novel data via iterative denoising, starting from random noise. The problem then reduces to learning the score function—the gradient of the log-density—of the perturbed data [3]. In a seminal work, Song et al. [2] show how this modeling approach is described with a stochastic differential equation (SDE) framework which can be converted to maximum likelihood training [4]. Variants of SGMs have been applied to images [1, 2, 5, 6], audio [7, 8, 9, 10], graphs [11] and point clouds [12, 13].
|
| 16 |
+
|
| 17 |
+
Albeit high quality, sampling from SGMs is computationally expensive. This is because generation amounts to solving a complex SDE, or equivalently ordinary differential equation (ODE) (denoted as the probability flow ODE in [2]), that maps a simple base distribution to the complex data distribution. The resulting differential equations are typically complex and solving them accurately requires numerical integration with very small step sizes, which results in thousands of neural network evaluations [1, 2, 6]. Furthermore, generation complexity is uniquely defined by the underlying data distribution and the forward SDE for data perturbation, implying that synthesis speed cannot be increased easily without sacrifices. Moreover, SDE-based generative models are currently defined for continuous data and cannot be applied effortlessly to binary, categorical, or graph-structured data.
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Figure 1: In our latent score-based generative model (LSGM), data is mapped to latent space via an encoder $q ( \mathbf { z } _ { 0 } | \mathbf { x } )$ and a diffusion process is applied in the latent space $( \mathbf { z } _ { 0 } \mathbf { z } _ { 1 } )$ ). Synthesis starts from the base distribution $p ( \mathbf { z } _ { 1 } )$ and generates samples in latent space via denoising $( \mathbf { z } _ { 0 } \mathbf { z } _ { 1 }$ ). Then, the samples are mapped from latent to data space using a decoder $p ( \mathbf { x } | \mathbf { z } _ { 0 } )$ . The model is trained end-to-end.
|
| 21 |
+
|
| 22 |
+
Here, we propose the Latent Score-based Generative Model (LSGM), a new approach for learning SGMs in latent space, leveraging a variational autoencoder (VAE) framework [14, 15]. We map the input data to latent space and apply the score-based generative model there. The score-based model is then tasked with modeling the distribution over the embeddings of the data set. Novel data synthesis is achieved by first generating embeddings via drawing from a simple base distribution followed by iterative denoising, and then transforming this embedding via a decoder to data space (see Fig. 1). We can consider this model a VAE with an SGM prior. Our approach has several key advantages:
|
| 23 |
+
|
| 24 |
+
Synthesis Speed: By pretraining the VAE with a Normal prior first, we can bring the marginal distribution over encodings (the aggregate posterior) close to the Normal prior, which is also the SGM’s base distribution. Consequently, the SGM only needs to model the remaining mismatch, resulting in a less complex model from which sampling becomes easier. Furthermore, we can tailor the latent space according to our needs. For example, we can use hierarchical latent variables and apply the diffusion model only over a subset of them, further improving synthesis speed.
|
| 25 |
+
|
| 26 |
+
Expressivity: Training a regular SGM can be considered as training a neural ODE directly on the data [2]. However, previous works found that augmenting neural ODEs [16, 17] and more generally generative models [18, 19, 20, 21] with latent variables improves their expressivity. Consequently, we expect similar performance gains from combining SGMs with a latent variable framework.
|
| 27 |
+
|
| 28 |
+
Tailored Encoders and Decoders: Since we use the SGM in latent space, we can utilize carefully designed encoders and decoders mapping between latent and data space, further improving expressivity. Additionally, the LSGM method can therefore be naturally applied to non-continuous data.
|
| 29 |
+
|
| 30 |
+
LSGMs can be trained end-to-end by maximizing the variational lower bound on the data likelihood. Compared to regular score matching, our approach comes with additional challenges, since both the score-based denoising model and its target distribution, formed by the latent space encodings, are learnt simultaneously. To this end, we make the following technical contributions: (i) We derive a new denoising score matching objective that allows us to efficiently learn the VAE model and the latent SGM prior at the same time. (ii) We introduce a new parameterization of the latent space score function, which mixes a Normal distribution with a learnable SGM, allowing the SGM to model only the mismatch between the distribution of latent variables and the Normal prior. (iii) We propose techniques for variance reduction of the training objective by designing a new SDE and by analytically deriving importance sampling schemes, allowing us to stably train deep LSGMs. Experimentally, we achieve state-of-the-art 2.10 FID on CIFAR-10 and ${ 7 . 2 2 } \mathrm { F I D }$ on CelebA-HQ-256, and significantly improve upon likelihoods of previous SGMs. On CelebA-HQ-256, we outperform previous SGMs in synthesis speed by two orders of magnitude. We also model binarized images, MNIST and OMNIGLOT, achieving state-of-the-art likelihood on the latter.
|
| 31 |
+
|
| 32 |
+
# 2 Background
|
| 33 |
+
|
| 34 |
+
Here, we review continuous-time score-based generative models (see [2] for an in-depth discussion). Consider a forward diffusion process $\scriptstyle \{ \mathbf { z } _ { t } \} _ { t = 0 } ^ { t = 1 }$ for continuous time variable $t \in [ 0 , 1 ]$ , where $\mathbf { z } _ { 0 }$ is the starting variable and $\mathbf { z } _ { t }$ its perturbation at time $t$ . The diffusion process is defined by an Itô SDE:
|
| 35 |
+
|
| 36 |
+
$$
|
| 37 |
+
\mathrm { d } \mathbf { z } = f ( t ) \mathbf { z } \mathrm { d } t + g ( t ) \mathrm { d } \mathbf { w }
|
| 38 |
+
$$
|
| 39 |
+
|
| 40 |
+
where $f : \mathbb { R } \to \mathbb { R }$ and $g : \mathbb { R } \mathbb { R }$ are scalar drift and diffusion coefficients, respectively, and w is the standard Wiener process. $f ( t )$ and $g ( t )$ can be designed such that $\mathbf { z } _ { 1 } \sim \mathcal { N } ( \mathbf { z } _ { 1 } ; \mathbf { 0 } , \mathbf { I } )$ follows a
|
| 41 |
+
|
| 42 |
+
Normal distribution at the end of the diffusion process.2 Song et al. [2] show that the SDE in Eq. 1 can be converted to a generative model by first sampling from $\mathbf { z } _ { 1 } \sim \mathcal { N } ( \mathbf { z } _ { 1 } ; \mathbf { 0 } , \mathbf { I } )$ and then running the reverse-time SDE $\mathrm { d } \mathbf { z } = [ f ( t ) \mathbf { z } - g ( t ) ^ { 2 } \nabla _ { \mathbf { z } } \log q _ { t } ( \mathbf { z } ) ] \mathrm { d } t + g ( t ) \mathrm { d } \bar { \mathbf { w } } ,$ , where $\bar { \bf w }$ is a reverse-time standard Wiener process and $\mathrm { d } t$ is an infinitesimal negative time step. The reverse SDE requires knowledge of $\nabla _ { \mathbf { z } _ { t } } \log \bar { q } _ { t } ( \mathbf { z } _ { t } )$ , the score function of the marginal distribution under the forward diffusion at time $t$ . One approach for estimating it is via the score matching objective3:
|
| 43 |
+
|
| 44 |
+
$$
|
| 45 |
+
\operatorname* { m i n } _ { \theta } \mathbb { E } _ { t \sim \mathcal { U } [ 0 , 1 ] } \left[ \lambda ( t ) \mathbb { E } _ { q ( \mathbf { z } _ { 0 } ) } \mathbb { E } _ { q ( \mathbf { z } _ { t } | \mathbf { z } _ { 0 } ) } [ | | \nabla _ { \mathbf { z } _ { t } } \log q ( \mathbf { z } _ { t } ) - \nabla _ { \mathbf { z } _ { t } } \log p _ { \theta } ( \mathbf { z } _ { t } ) | | _ { 2 } ^ { 2 } ] \right]
|
| 46 |
+
$$
|
| 47 |
+
|
| 48 |
+
that trains the parameteric score function $\nabla _ { \mathbf { z } _ { t } } \log p _ { \pmb { \theta } } ( \mathbf { z } _ { t } )$ at time $t \sim \mathcal { U } [ 0 , 1 ]$ for a given weighting coefficient $\lambda ( t )$ . $q ( \mathbf { z } _ { 0 } )$ is the $\mathbf { z } _ { 0 }$ -generating distribution and $q ( \mathbf { z } _ { t } | \mathbf { z } _ { 0 } )$ is the diffusion kernel, which is available in closed form for certain $f ( t )$ and $g ( t )$ . Since $\nabla _ { \mathbf { z } _ { t } } \log q ( \mathbf { z } _ { t } )$ is not analytically available, Song et al. [2] rely on denoising score matching [22] that converts the objective in Eq. 2 to:
|
| 49 |
+
|
| 50 |
+
$$
|
| 51 |
+
\operatorname* { m i n } _ { \theta } \mathbb { E } _ { t \sim \mathcal { U } [ 0 , 1 ] } \left[ \lambda ( t ) \mathbb { E } _ { q ( \mathbf { z } _ { 0 } ) } \mathbb { E } _ { q ( \mathbf { z } _ { t } | \mathbf { z } _ { 0 } ) } [ | | \nabla _ { \mathbf { z } _ { t } } \log q ( \mathbf { z } _ { t } | \mathbf { z } _ { 0 } ) - \nabla _ { \mathbf { z } _ { t } } \log p _ { \theta } ( \mathbf { z } _ { t } ) | | _ { 2 } ^ { 2 } ] \right] + C
|
| 52 |
+
$$
|
| 53 |
+
|
| 54 |
+
Vincent [22] show $; C = \mathbb { E } _ { t \sim \mathcal { U } [ 0 , 1 ] } [ \lambda ( t ) \mathbb { E } _ { q ( \mathbf { z } _ { 0 } ) } \mathbb { E } _ { q ( \mathbf { z } _ { t } | \mathbf { z } _ { 0 } ) } [ | | \nabla _ { \mathbf { z } _ { t } } \log q ( \mathbf { z } _ { t } ) | | _ { 2 } ^ { 2 } - | | \nabla _ { \mathbf { z } _ { t } } \log q ( \mathbf { z } _ { t } | \mathbf { z } _ { 0 } ) | | _ { 2 } ^ { 2 } ] ]$ is independent of $\pmb \theta$ , making the minimizations in Eq. 3 and Eq. 2 equivalent. Song et al. [4] show that for $\lambda ( t ) = g ( t ) ^ { 2 } / 2$ , the minimizations correspond to approximate maximum likelihood training based on an upper on the Kullback-Leibler (KL) divergence between the target distribution and the distribution defined by the reverse-time generative SDE with the learnt score function. In particular, the objective of Eq. 2 can then be written:
|
| 55 |
+
|
| 56 |
+
$$
|
| 57 |
+
\mathrm { K L } \left( q ( \mathbf { z } _ { 0 } ) | | p _ { \theta } ( \mathbf { z } _ { 0 } ) \right) \leq \mathbb { E } _ { t \sim \boldsymbol { U } [ 0 , 1 ] } \left[ \frac { g ( t ) ^ { 2 } } { 2 } \mathbb { E } _ { q ( \mathbf { z } _ { 0 } ) } \mathbb { E } _ { q ( \mathbf { z } _ { t } | \mathbf { z } _ { 0 } ) } \left[ | | \nabla _ { \mathbf { z } _ { t } } \log q ( \mathbf { z } _ { t } ) - \nabla _ { \mathbf { z } _ { t } } \log p _ { \theta } ( \mathbf { z } _ { t } ) | | _ { 2 } ^ { 2 } \right] \right]
|
| 58 |
+
$$
|
| 59 |
+
|
| 60 |
+
which can again be transformed into denoising score matching (Eq. 3) following Vincent [22].
|
| 61 |
+
|
| 62 |
+
# 3 Score-based Generative Modeling in Latent Space
|
| 63 |
+
|
| 64 |
+
The LSGM framework in Fig. 1 consists of the encoder $q _ { \phi } ( \mathbf { z } _ { 0 } | \mathbf { x } )$ , SGM prior $p _ { \pmb { \theta } } ( \mathbf { z } _ { 0 } )$ , and decoder $p _ { \psi } ( \mathbf { x } | \mathbf { z } _ { 0 } )$ . The SGM prior leverages a diffusion process as defined in Eq. 1 and diffuses ${ \bf z } _ { 0 } \sim q _ { \phi } ( { \bf z } _ { 0 } | { \bf x } )$ samples in latent space to the standard Normal distribution $p ( \mathbf { z } _ { 1 } ) = \bar { \mathcal { N } } ( \mathbf { z } _ { 1 } ; \mathbf { 0 } , \mathbf { I } )$ . Generation uses the reverse SDE to sample from $p _ { \pmb { \theta } } ( \mathbf { z } _ { 0 } )$ with time-dependent score function $\nabla _ { \mathbf { z } _ { t } } \log p _ { \pmb { \theta } } ( \mathbf { z } _ { t } )$ , and the decoder $p _ { \psi } ( \mathbf { x } | \mathbf { z } _ { 0 } )$ to map the synthesized encodings $\mathbf { z } _ { 0 }$ to data space. Formally, the generative process is written as $p ( \mathbf { z } _ { 0 } , \mathbf { x } ) = \bar { p } _ { \theta } ( \mathbf { z } _ { 0 } ) p _ { \psi } ( \mathbf { x } | \mathbf { z } _ { 0 } )$ . The goal of training is to learn $\{ \dot { \phi } , \pmb \theta , \pmb \psi \}$ , the parameters of the encoder $q _ { \phi } ( \mathbf { z } _ { 0 } | \mathbf { x } )$ , score function $\nabla _ { \mathbf { z } _ { t } } \log p _ { \pmb { \theta } } ( \mathbf { z } _ { t } )$ , and decoder $p _ { \psi } ( \mathbf { x } | \mathbf { z } _ { 0 } )$ , respectively.
|
| 65 |
+
|
| 66 |
+
We train LSGM by minimizing the variational upper bound on negative data log-likelihood $\log p ( \mathbf { x } )$
|
| 67 |
+
|
| 68 |
+
$$
|
| 69 |
+
\begin{array} { r l } & { \mathcal { L } ( \mathbf { x } , \phi , \theta , \psi ) = \mathbb { E } _ { q _ { \phi } ( \mathbf { z } _ { 0 } | \mathbf { x } ) } \left[ - \log p _ { \psi } ( \mathbf { x } | \mathbf { z } _ { 0 } ) \right] + \mathrm { K L } \left( q _ { \phi } ( \mathbf { z } _ { 0 } | \mathbf { x } ) | | p _ { \theta } ( \mathbf { z } _ { 0 } ) \right) } \\ & { \quad \quad \quad = \underbrace { \mathbb { E } _ { q _ { \phi } ( \mathbf { z } _ { 0 } | \mathbf { x } ) } \left[ - \log p _ { \psi } ( \mathbf { x } | \mathbf { z } _ { 0 } ) \right] } _ { \mathrm { r e c o n s t u c i o n t e m } } + \underbrace { \mathbb { E } _ { q _ { \phi } ( \mathbf { z } _ { 0 } | \mathbf { x } ) } \left[ \log q _ { \phi } ( \mathbf { z } _ { 0 } | \mathbf { x } ) \right] } _ { \mathrm { n e g a t i v e e n c o d e r e n t r o p y } } + \underbrace { \mathbb { E } _ { q _ { \phi } ( \mathbf { z } _ { 0 } | \mathbf { x } ) } \left[ - \log p _ { \theta } ( \mathbf { z } _ { 0 } ) \right] } _ { \mathrm { c r o s s e n t r o p y } } } \end{array}
|
| 70 |
+
$$
|
| 71 |
+
|
| 72 |
+
following a VAE approach [14, 15], where $q _ { \phi } ( \mathbf { z } _ { 0 } | \mathbf { x } )$ approximates the true posterior $p ( \mathbf { z } _ { 0 } \vert \mathbf { x } )$
|
| 73 |
+
|
| 74 |
+
In this paper, we use Eq. 6 with decomposed KL divergence into its entropy and cross entropy terms. The reconstruction and entropy terms are estimated easily for any explicit encoder as long as the reparameterization trick is available [14]. The challenging part in training LSGM is to train the cross entropy term that involves the SGM prior. We motivate and present our expression for the cross-entropy term in Sec. 3.1, the parameterization of the SGM prior in Sec. 3.2, different weighting mechanisms for the training objective in Sec. 3.3, and variance reduction techniques in Sec. 3.4.
|
| 75 |
+
|
| 76 |
+
# 3.1 The Cross Entropy Term
|
| 77 |
+
|
| 78 |
+
One may ask, why not train LSGM with Eq. 5 and rely on the KL in Eq. 4. Directly using the KL expression in Eq. 4 is not possible, as it involves the marginal score $\nabla _ { \mathbf { z } _ { t } } \log q ( \mathbf { z } _ { t } )$ , which is unavailable analytically for common non-Normal distributions $q ( \mathbf { z } _ { 0 } )$ such as Normalizing flows.
|
| 79 |
+
|
| 80 |
+
Transforming into denoising score matching does not help either, since in that case the problematic $\nabla _ { \mathbf { z } _ { t } } \log q ( \mathbf { z } _ { t } )$ term appears in the $C$ term (see Eq. 3). In contrast to previous works [2, 22], we cannot simply drop $C$ , since it is, in fact, not constant but depends on $q ( \mathbf { z } _ { t } )$ , which is trainable in our setup.
|
| 81 |
+
|
| 82 |
+
To circumvent this problem, we instead decompose the KL in Eq. 5 and rather work directly with the cross entropy between the encoder distribution $q ( \mathbf { z } _ { 0 } | \mathbf { x } )$ and the SGM prior $p ( \mathbf { z } _ { 0 } )$ . We show:
|
| 83 |
+
|
| 84 |
+
Theorem 1. Given two distributions $q ( \mathbf { z } _ { 0 } | \mathbf { x } )$ and $p ( \mathbf { z } _ { 0 } )$ , defined in the continuous space $\mathbb { R } ^ { D }$ , denote the marginal distributions of diffused samples under the SDE in Eq. 1 at time $t$ with $q ( \mathbf { z } _ { t } | \mathbf { x } )$ and $p ( \mathbf { z } _ { t } )$ . Assuming mild smoothness conditions on $\log q ( \mathbf { z } _ { t } | \mathbf { x } )$ and $\log \hat { p } ( { \mathbf z } _ { t } )$ , the cross entropy is:
|
| 85 |
+
|
| 86 |
+
$$
|
| 87 |
+
\Sigma E ( q ( \mathbf { z } _ { 0 } | \mathbf { x } ) | | p ( \mathbf { z } _ { 0 } ) ) = \mathbb { E } _ { t \sim \lambda / [ 0 , 1 ] } \left[ \frac { g ( t ) ^ { 2 } } { 2 } \mathbb { E } _ { q ( \mathbf { z } _ { t } , \mathbf { z } _ { 0 } | \mathbf { x } ) } \left[ | | \nabla _ { \mathbf { z } _ { t } } \log q ( \mathbf { z } _ { t } | \mathbf { z } _ { 0 } ) - \nabla _ { \mathbf { z } _ { t } } \log p ( \mathbf { z } _ { t } ) | | _ { 2 } ^ { 2 } \right] \right] + \frac { D } { 2 } \log \left( 2 \pi e \sigma _ { 0 } ^ { 2 } \right)
|
| 88 |
+
$$
|
| 89 |
+
|
| 90 |
+
with $q ( \mathbf { z } _ { t } , \mathbf { z } _ { 0 } | \mathbf { x } ) = q ( \mathbf { z } _ { t } | \mathbf { z } _ { 0 } ) q ( \mathbf { z } _ { 0 } | \mathbf { x } )$ and a Normal transition kernel $q ( \mathbf { z } _ { t } | \mathbf { z } _ { 0 } ) = \mathcal { N } ( \mathbf { z } _ { t } ; \pmb { \mu } _ { t } ( \mathbf { z } _ { 0 } ) , \sigma _ { t } ^ { 2 } \mathbf { I } )$ , where $\pmb { \mu } _ { t }$ and $\sigma _ { t } ^ { 2 }$ are obtained from $f ( t )$ and $g ( t )$ for a fixed initial variance $\sigma _ { 0 } ^ { 2 }$ at $t = 0$ .
|
| 91 |
+
|
| 92 |
+
A proof with generic expressions for $\pmb { \mu } _ { t }$ and $\sigma _ { t } ^ { 2 }$ as well as an intuitive interpretation are in App. A.
|
| 93 |
+
|
| 94 |
+
Importantly, unlike for the KL objective of Eq. 4, no problematic terms depending on the marginal score $\nabla _ { \mathbf { z } _ { t } } \log q ( \mathbf { z } _ { t } | \mathbf { x } )$ arise. This allows us to use this denoising score matching objective for the cross entropy term in Theorem 1 not only for optimizing $p ( \mathbf { z } _ { 0 } )$ (which is commonly done in the score matching literature), but also for the $q ( \mathbf { z } _ { 0 } | \mathbf { x } )$ encoding distribution. It can be used even with complex $\bar { q } ( { \bf z } _ { 0 } | { \bf x } )$ distributions, defined, for example, in a hierarchical fashion [20, 21] or via Normalizing flows [23, 24]. Our novel analysis shows that, for diffusion SDEs following Eq. 1, only the cross entropy can be expressed purely with $\nabla _ { \mathbf { z } _ { t } } \log q ( \mathbf { z } _ { t } \vert \mathbf { z } _ { 0 } )$ . Neither KL nor entropy in [4] can be expressed without the problematic term $\nabla _ { \mathbf { z } _ { t } } \log q ( \mathbf { z } _ { t } | \mathbf { x } )$ (details in the Appendix).
|
| 95 |
+
|
| 96 |
+
Note that in Theorem 1, the term $\nabla _ { \mathbf { z } _ { t } } \log p ( \mathbf { z } _ { t } )$ in the score matching expression corresponds to the score that originates from diffusing an initial $p ( \mathbf { z } _ { 0 } )$ distribution. In practice, we use the expression to learn an SGM prior $p _ { \pmb { \theta } } ( \mathbf { z } _ { 0 } )$ , which models $\nabla _ { \mathbf { z } _ { t } } \log p ( \mathbf { z } _ { t } )$ by a neural network. With the learnt score $\nabla _ { \mathbf { z } _ { t } } \log p _ { \pmb { \theta } } ( \mathbf { z } _ { t } )$ (here we explicitly indicate the parameters $\pmb \theta$ to clarify that this is the learnt model), the actual SGM prior is defined via the generative reverse-time SDE (or, alternatively, a closely-connected ODE, see Sec. 2 and App. D), which generally defines its own, separate marginal distribution $p _ { \pmb { \theta } } ( \mathbf { z } _ { 0 } )$ at $t = 0$ . Importantly, the learnt, approximate score $\nabla _ { \mathbf { z } _ { t } } \log p _ { \pmb { \theta } } ( \mathbf { z } _ { t } )$ is not necessarily the same as one would obtain when diffusing $p _ { \pmb { \theta } } ( \mathbf { z } _ { 0 } )$ . Hence, when considering the learnt score $\nabla _ { \mathbf { z } _ { t } } \log p _ { \pmb { \theta } } ( \mathbf { z } _ { t } )$ , the score matching expression in our Theorem only corresponds to an upper bound on the cross entropy between $q ( \mathbf { z } _ { 0 } | \mathbf { x } )$ and $p _ { \pmb { \theta } } ( \mathbf { z } _ { 0 } )$ defined by the generative reverse-time SDE. This is discussed in detail in concurrent works [4, 25]. Hence, from the perspective of the learnt SGM prior, we are training with an upper bound on the cross entropy (similar to the bound on the KL in Eq. 4), which can also be considered as the continuous version of the discretized variational objective derived by Ho et al. [1].
|
| 97 |
+
|
| 98 |
+
# 3.2 Mixing Normal and Neural Score Functions
|
| 99 |
+
|
| 100 |
+
In VAEs [14], $p ( \mathbf { z } _ { 0 } )$ is often chosen as a standard Normal $\mathcal { N } ( \mathbf { z } _ { 0 } ; \mathbf { 0 } , \mathbf { I } )$ . For recent hierarchical VAEs [20, 21], using the reparameterization trick, the prior can be converted to $\mathcal { N } ( \mathbf { z } _ { 0 } ; \mathbf { 0 } , \mathbf { I } )$ (App. E).
|
| 101 |
+
|
| 102 |
+
Considering a single dimensional latent space, we can assume that the prior at time $t$ is in the form of a geometric mixture $p ( z _ { t } ) \propto \mathcal { N } ( z _ { t } ; 0 , 1 ) ^ { 1 - \alpha } p _ { \theta } ^ { \prime } ( z _ { t } ) ^ { \alpha }$ where $p _ { \theta } ^ { \prime } ( z _ { t } )$ is a trainable SGM prior and $\alpha \in [ 0 , 1 ]$ is a learnable scalar mixing coefficient. Formulating the prior this way has crucial advantages: (i) We can pretrain LSGM’s autoencoder networks assuming $\alpha { = } 0$ , which corresponds to training the VAE with a standard Normal prior. This pretraining step will bring the distribution of latent variable close to $\mathcal { N } ( z _ { 0 } ; 0 , 1 )$ , allowing the SGM prior to learn a much simpler distribution in the following end-to-end training stage. (ii) The score function for this mixture is of the form $\nabla _ { z _ { t } } \log { p ( z _ { t } ) } = - ( 1 - \alpha ) z _ { t } + \alpha \nabla _ { z _ { t } } \log { p _ { \theta } ^ { \prime } ( z _ { t } ) } .$ . When the score function is dominated by the linear term, we expect that the reverse SDE can be solved faster, as its drift is dominated by this linear term.
|
| 103 |
+
|
| 104 |
+
For our multivariate latent space, we obtain diffused samples at time $t$ by sampling ${ \bf z } _ { t } \sim q ( { \bf z } _ { t } | { \bf z } _ { 0 } )$ with $\mathbf z _ { t } = \mu _ { t } ( \mathbf z _ { 0 } ) + \sigma _ { t } \epsilon$ , where $\epsilon \sim \mathcal { N } ( \epsilon ; \mathbf { 0 } , \mathbf { I } )$ . Since we have $\nabla _ { \mathbf { z } _ { t } } \log q ( \mathbf { z } _ { t } | \mathbf { z } _ { 0 } ) = - \pmb { \epsilon } / \sigma _ { t }$ , similar to [1], we parameterize the score function by $\nabla _ { \mathbf { z } _ { t } } \log p ( \mathbf { z } _ { t } ) : = - \epsilon _ { \theta } ( \mathbf { z } _ { t } , t ) / \sigma _ { t }$ , where $\mathbf { \epsilon } _ { \epsilon _ { \theta } } ( \mathbf { z } _ { t } , t ) : = \mathbf { \epsilon }$ $\sigma _ { t } ( 1 - \alpha ) \overset { \cdot } { \odot } \mathbf { z } _ { t } + \alpha \odot \epsilon _ { \theta } ^ { \prime } ( \mathbf { z } _ { t } , t )$ is defined by our mixed score parameterization that is applied elementwise to the components of the score. With this, we simplify the cross entropy expression to:
|
| 105 |
+
|
| 106 |
+
$$
|
| 107 |
+
\mathrm { C E } ( q _ { \phi } ( \mathbf { z } _ { 0 } | \mathbf { x } ) | | p _ { \theta } ( \mathbf { z } _ { 0 } ) ) = \mathbb { E } _ { t \sim \mathcal { U } [ 0 , 1 ] } \left[ \frac { w ( t ) } { 2 } \mathbb { E } _ { q _ { \phi } ( \mathbf { z } _ { t } , \mathbf { z } _ { 0 } | \mathbf { x } ) , \epsilon } \left[ | | \epsilon - \epsilon _ { \theta } ( \mathbf { z } _ { t } , t ) | | _ { 2 } ^ { 2 } \right] \right] + \frac { D } { 2 } \log \left( 2 \pi e \sigma _ { 0 } ^ { 2 } \right) ,
|
| 108 |
+
$$
|
| 109 |
+
|
| 110 |
+
where $w ( t ) = g ( t ) ^ { 2 } / \sigma _ { t } ^ { 2 }$ is a time-dependent weighting scalar.
|
| 111 |
+
|
| 112 |
+
# 3.3 Training with Different Weighting Mechanisms
|
| 113 |
+
|
| 114 |
+
Table 1: Weighting mechanisms
|
| 115 |
+
|
| 116 |
+
<table><tr><td>Mechanism Weights</td></tr><tr><td>Weighted wn(t)= g(t)²/² Unweighted wun(t) =1 Reweighted wre(t) = g(t)²</td></tr></table>
|
| 117 |
+
|
| 118 |
+
The weighting term $w ( t )$ in Eq. 7 trains the prior with maximum likelihood. Similar to [1, 2], we observe that when $w ( t )$ is dropped while training the SGM prior (i.e., $w ( t ) = 1 )$ ), LSGM often yields higher quality samples at a small cost in likelihood. However, in our case, we can only drop the weighting when training the prior. When updating the encoder parameters, we still need to use the maximum likelihood weighting to ensure that the encoder $q ( \mathbf { z } _ { 0 } | \mathbf { x } )$ is brought closer to the true posterior $p ( \mathbf { z } _ { 0 } \vert \mathbf { x } ) ^ { 4 }$ . Tab. 1 summarizes three weighting mechanisms we consider in this paper: $w _ { \parallel } ( t )$ corresponds to maximum likelihood, $w _ { \mathrm { u n } } ( t )$ is the unweighted objective used by [1, 2], and $w _ { \mathrm { r e } } ( t )$ is a variant obtained by dropping only $1 / \sigma _ { t } ^ { 2 }$ . This weighting mechanism has a similar affect on the sample quality as $w _ { \mathrm { u n } } ( t ) = 1$ ; however, in Sec. 3.4, we show that it is easier to define a variance reduction scheme for this weighting mechanism.
|
| 119 |
+
|
| 120 |
+
The following summarizes our training objectives (with $t \sim \mathcal { U } [ 0 , 1 ]$ and $\epsilon \sim \mathcal { N } ( \epsilon ; \mathbf { 0 } , \mathbf { I } ) ,$ ):
|
| 121 |
+
|
| 122 |
+
$$
|
| 123 |
+
\begin{array} { r l } & { \displaystyle \operatorname* { m i n } _ { \boldsymbol { \phi } , \boldsymbol { \phi } } \mathbb { E } _ { q _ { \boldsymbol { \phi } } ( \mathbf { z } _ { 0 } | \mathbf { x } ) } \left[ - \log p _ { \boldsymbol { \phi } } ( \mathbf { x } | \mathbf { z _ { 0 } } ) \right] + \mathbb { E } _ { q _ { \boldsymbol { \phi } } ( \mathbf { z } _ { 0 } | \mathbf { x } ) } \left[ \log q _ { \boldsymbol { \phi } } ( \mathbf { z } _ { 0 } | \mathbf { x } ) \right] + \mathbb { E } _ { t , \boldsymbol { \epsilon } , q ( \mathbf { z } _ { t } | \mathbf { z _ { 0 } } ) , q _ { \boldsymbol { \phi } } ( \mathbf { z } _ { 0 } | \mathbf { x } ) } \left[ { \frac { w _ { \mathrm { u } } ( t ) } { 2 } } | | \boldsymbol { \epsilon } - \boldsymbol { \epsilon } _ { \boldsymbol { \theta } } ( \mathbf { z } _ { t } , t ) | | _ { 2 } ^ { 2 } \right] } \\ & { \displaystyle \operatorname* { m i n } _ { \boldsymbol { \epsilon } , \boldsymbol { \epsilon } , q ( \mathbf { z } _ { t } | \mathbf { z _ { 0 } } ) , q _ { \boldsymbol { \phi } } ( \mathbf { z _ { 0 } } | \mathbf { x } ) } \left[ { \frac { w _ { \mathrm { 1 } } / \operatorname { s u p } / \operatorname { r e c } ( t ) } { 2 } } | | \boldsymbol { \epsilon } - \boldsymbol { \epsilon } _ { \boldsymbol { \theta } } ( \mathbf { z } _ { t } , t ) | | _ { 2 } ^ { 2 } \right] \quad \mathrm { ~ w i t h } \quad q ( \mathbf { z } _ { t } | \mathbf { z _ { 0 } } ) = \mathcal { N } ( \mathbf { z } _ { t } ; \mu _ { t } ( \mathbf { z } _ { 0 } ) , \sigma _ { t } ^ { 2 } \mathbf { I } ) , } \end{array}
|
| 124 |
+
$$
|
| 125 |
+
|
| 126 |
+
where Eq. 8 trains the VAE encoder and decoder parameters $\{ \phi , \psi \}$ using the variational bound $\mathcal { L } ( \mathbf { x } , \phi , \pmb \theta , \psi )$ from Eq. 6. Eq. 9 trains the prior with one of the three weighting mechanisms. Since the SGM prior participates in the objective only in the cross entropy term, we only consider this term when training the prior. Efficient algorithms for training with the objectives are presented in App. G.
|
| 127 |
+
|
| 128 |
+
# 3.4 Variance Reduction
|
| 129 |
+
|
| 130 |
+
The objectives in Eqs. 8 and 9 involve sampling of the time variable $t$ , which has high variance [26]. We introduce several techniques for reducing this variance for all three objective weightings. We focus on the “variance preserving” SDEs (VPSDEs) [2, 1, 27], defined by $\begin{array} { r } { \mathrm { d } \mathbf { z } = - \frac { 1 } { 2 } \beta ( t ) \mathbf { z } \mathrm { d } t + \sqrt { \beta ( t ) } \mathrm { d } } \end{array}$ w where $\beta ( t ) = \beta _ { 0 } + ( \beta _ { 1 } - \beta _ { 0 } ) t$ linearly interpolates in $[ \beta _ { 0 } , \beta _ { 1 } ]$ (other SDEs discussed in App. B).
|
| 131 |
+
|
| 132 |
+
We denote the marginal distribution of latent variables by $q ( \mathbf { z } _ { 0 } ) : = \mathbb { E } _ { p _ { \mathrm { d a t a } } ( \mathbf { x } ) } [ q ( \mathbf { z } _ { 0 } | \mathbf { x } ) ]$ . Here, we derive variance reduction techniques for $\mathrm { C E } ( q ( \mathbf { z } _ { 0 } ) | | p ( \mathbf { z } _ { 0 } ) )$ , assuming that both $q ( { \bf z } _ { 0 } ) = p ( { \bf z } _ { 0 } ) =$ $\mathcal { N } ( \mathbf { z } _ { 0 } ; \mathbf { 0 } , \mathbf { I } )$ . This is a reasonable simplification for our analysis because pretraining our LSGM model with a $\mathcal { N } ( \mathbf { \dot { z } } _ { 0 } ; \mathbf { 0 } , \mathbf { I } )$ prior brings $q ( \mathbf { z } _ { 0 } )$ close to $\mathcal { N } ( \mathbf { z } _ { 0 } ; \mathbf { 0 } , \mathbf { I } )$ and our SGM prior is often dominated by the fixed Normal mixture component. We empirically observe that the variance reduction techniques developed with this assumption still work well when $q ( \mathbf { z } _ { 0 } )$ and $p ( \mathbf { z } _ { 0 } )$ are not exactly $\mathcal { N } ( \mathbf { z } _ { 0 } ; \mathbf { 0 } , \bar { \mathbf { I } ) }$ .
|
| 133 |
+
|
| 134 |
+
Variance reduction for likelihood weighting: In App. B, for $q ( \mathbf { z } _ { 0 } ) = p ( \mathbf { z } _ { 0 } ) = \mathcal { N } ( \mathbf { z } _ { 0 } ; \mathbf { 0 } , \mathbf { I } )$ , we show $\mathrm { C E } ( q ( \mathbf { z } _ { 0 } ) | | p ( \mathbf { z } _ { 0 } ) )$ is given by $\begin{array} { r } { \frac { D } { 2 } \mathbb { E } _ { t \sim \mathcal { U } [ 0 , 1 ] } [ \mathrm { d } \log \sigma _ { t } ^ { 2 } / \mathrm { d } t ] + \mathrm { c o n s t } } \end{array}$ . We consider two approaches:
|
| 135 |
+
|
| 136 |
+
(1) Geometric VPSDE: To reduce the variance sampling uniformly from $t$ , we can design the SDE such $\mathrm { d } \log \sigma _ { t } ^ { 2 } / \mathrm { d } t$ is constvariance VPSDE $t \in [ 0 , 1 ]$ how in App. B that a satisfies this conditioyperparameters of the $\begin{array} { r } { \beta ( t ) = \log ( \sigma _ { \operatorname* { m a x } } ^ { - } / \sigma _ { \operatorname* { m i n } } ^ { 2 } ) \frac { \sigma _ { t } ^ { 2 } } { ( 1 - \sigma _ { t } ^ { 2 } ) } } \end{array}$ $\sigma _ { t } ^ { 2 } = \sigma _ { \mathrm { m i n } } ^ { 2 } ( \sigma _ { \mathrm { m a x } } ^ { 2 } / \sigma _ { \mathrm { m i n } } ^ { 2 } ) ^ { t }$
|
| 137 |
+
$\beta ( t )$ $\bar { \sigma } _ { \operatorname* { m i n } } ^ { 2 }$ $\sigma _ { \mathrm { m a x } } ^ { 2 }$ $0 < \sigma _ { \operatorname* { m i n } } ^ { 2 } < \sigma _ { \operatorname* { m a x } } ^ { 2 } < 1$
|
| 138 |
+
Although our geometric VPSDE has a geometric variance progression similar to the “variance
|
| 139 |
+
exploding” SDE (VESDE) [2], it still enjoys the “variance preserving” property of the VPSDE. In
|
| 140 |
+
App. B, we show that the VESDE does not come with a reduced variance for $t$ -sampling by default.
|
| 141 |
+
|
| 142 |
+
(2) Importance sampling (IS): We can keep $\beta ( t )$ and $\sigma _ { t } ^ { 2 }$ unchanged for the original linear VPSDE, and instead use IS to minimize variance. The theory of IS shows that the proposal $r ( t ) \propto \mathrm { d } \log \sigma _ { t } ^ { 2 } / \mathrm { d } t$ has minimum variance [28]. In App. B, we show that we can sample from $r ( t )$ using inverse transform sampling $t = \mathrm { v a r } ^ { - 1 } ( ( \sigma _ { 1 } ^ { 2 } ) ^ { \rho } ( \sigma _ { 0 } ^ { 2 } ) ^ { \bar { 1 } - \rho } )$ where var $^ { - 1 }$ is the inverse of $\sigma _ { t } ^ { 2 }$ and $\rho \sim \mathcal { U } [ 0 , 1 ]$ . This variance reduction technique is available for any VPSDE with arbitrary $\beta ( t )$ .
|
| 143 |
+
|
| 144 |
+
In Fig. 2, we train a small LSGM on CIFAR-10 with $w _ { \mathrm { l l } }$ weighting using (i) the original VPSDE with uniform $t$ sampling, (ii) the same SDE but with our IS from $t$ , and (iii) the proposed geometric
|
| 145 |
+
|
| 146 |
+
VPSDE. Note how both (ii) and (iii) significantly reduce the variance and allow us to monitor the progress of the training objective. In this case, (i) has difficulty minimizing the objective due to the high variance. In App. B, we show how IS proposals can be formed for other SDEs, including the VESDE and Sub-VPSDE from [2].
|
| 147 |
+
|
| 148 |
+
Variance reduction for unweighted and reweighted objectives: When training with $w _ { { \mathrm { u n } } }$ , analytically deriving IS proposal distributions for arbitrary $\beta ( t )$ is challenging. For linear VPSDEs, we provide a derivation in App. B to obtain the optimal IS distribution. In contrast, defining IS proposal distributions is easier when training with $w _ { \mathrm { r e } }$ . In App. B, we show that the optimal distribution is in the form $r ( t ) \propto \mathrm { d } \bar { \sigma } _ { t } ^ { 2 } / \mathrm { d } t$ which is sampled by $\scriptstyle t = \mathrm { v a r } ^ { - 1 } ( ( 1 - \rho ) \sigma _ { 0 } ^ { 2 } + \rho \sigma _ { 1 } ^ { 2 } )$ with $\rho \sim \mathcal { U } [ 0 , 1 ]$ . In Fig. 3, we visualize the IS distributions for the three weighting mechanisms for the linear VPSDE with the original $[ \beta _ { 0 } , \beta _ { 1 } ]$ parameters from [2]. $r ( t )$ for the likelihood weighting is more tilted towards $t = 0$ due to the $1 / \sigma _ { t } ^ { 2 }$ term in $w _ { \mathrm { I I } }$ .
|
| 149 |
+
|
| 150 |
+

|
| 151 |
+
Figure 2: Variance reduction
|
| 152 |
+
|
| 153 |
+
When using differently weighted objectives for training, we can either sample separate $t$ with different IS distributions for each objective, or use IS for the SGM objective (Eq. 9) and reweight the samples according to the likelihood objective for encoder training (Eq. 8). See App. G for details.
|
| 154 |
+
|
| 155 |
+

|
| 156 |
+
Figure 3: IS distributions
|
| 157 |
+
|
| 158 |
+
# 4 Related Work
|
| 159 |
+
|
| 160 |
+
Our work builds on score-matching [29, 30, 31, 32, 33, 34, 35, 36, 37], specifically denoising score matching [22], which makes our work related to recent generative models using denoising score matching- and denoising diffusion-based objectives [3, 38, 1, 2, 6]. Among those, [1, 6] use a discretized diffusion process with many noise scales, building on [27], while Song et al. [2] introduce the continuous time framework using SDEs. Experimentally, these works focus on image modeling and, contrary to us, work directly in pixel space. Various works recently tried to address the slow sampling of these types of models and further improve output quality. [39] add an adversarial objective, [5] introduce non-Markovian diffusion processes that allow to trade off synthesis speed, quality, and sample diversity, [40] learn a sequence of conditional energy-based models for denoising, [41] distill the iterative sampling process into single shot synthesis, and [42] learn an adaptive noise schedule, which is adjusted during synthesis to accelerate sampling. Further, [26] propose empirical variance reduction techniques for discretized diffusions and introduce a new, heuristically motivated, noise schedule. In contrast, our proposed noise schedule and our variance reduction techniques are analytically derived and directly tailored to our learning setting in the continuous time setup.
|
| 161 |
+
|
| 162 |
+
Recently, [11] presented a method to generate graphs using score-based models, relaxing the entries of adjacency matrices to continuous values. LSGM would allow to model graph data more naturally using encoders and decoders tailored to graphs [43, 44, 45, 46].
|
| 163 |
+
|
| 164 |
+
Since our model can be considered a VAE [14, 15] with score-based prior, it is related to approaches that improve VAE priors. For example, Normalizing flows and hierarchical distributions [23, 24, 47, 48, 20, 21], as well as energy-based models [49, 50, 51, 52, 53] have been proposed as VAE priors. Furthermore, classifiers [54, 55, 56], adversarial methods [57], and other techniques [58, 59] have been used to define prior distributions implicitly. In two-stage training, a separate generative model is trained in latent space as a new prior after training the VAE itself [60, 61, 62, 63, 64, 10]. Our work also bears a resemblance to recent methods on improving the sampling quality in generative adversarial networks using gradient flows in the latent space [65, 66, 67, 68], with the main difference that these prior works use a discriminator to update the latent variables, whereas we train an SGM.
|
| 165 |
+
|
| 166 |
+
Concurrent works: [10] proposed to learn a denoising diffusion model in the latent space of a VAE for symbolic music generation. This work does not introduce an end-to-end training framework of the combined VAE and denoising diffusion model and instead trains them in two separate stages. In contrast, concurrently with us [69] proposed an end-to-end training approach, and [70] combines contrastive learning with diffusion models in the latent space of VAEs for controllable generation. However, [10, 69, 70] consider the discretized diffusion objective [1], while we build on the continuous time framework. Also, these models are not equipped with the mixed score parameterization and variance reduction techniques, which we found crucial for the successful training of SGM priors.
|
| 167 |
+
|
| 168 |
+
Additionally, [71, 4, 25] concurrently with us proposed likelihood-based training of SGMs in data space5. [4] developed a bound for the data likelihood in their Theorem 3 of their second version, using a denoising score matching objective, closely related to our cross entropy expression. However, our cross entropy expression is much simpler as we show how several terms can be marginalized out analytically for the diffusion SDEs employed by us (see our proof in App. A). The same marginalization can be applied to Theorem 3 in [4] when the drift coefficient takes a special affine form (i.e., $\mathbf { f } ( \mathbf { z } , t ) = f ( t ) \mathbf { \bar { z } } )$ . Moreover, [25] discusses the likelihood-based training of SGMs from a fundamental perspective and shows how several score matching objectives become a variational bound on the data likelihood. [71] introduced a notion of signal-to-noise ratio (SNR) that results in a noise-invariant parameterization of time that depends only on the initial and final noise. Interestingly, our importance sampling distribution in Sec. 3.4 has a similar noise-invariant parameterization of time via $t = \mathrm { v a r } ^ { - 1 } ( \bar { ( \sigma _ { 1 } ^ { 2 } ) ^ { \bar { \rho } } } ( \sigma _ { 0 } ^ { 2 } ) ^ { 1 - \rho } )$ , which also depends only on the initial and final diffusion process variances. We additionally show that this time parameterization results in the optimal minimumvariance objective, if the distribution of latent variables follows a standard Normal distribution. Finally, [72] proposed a modified time parameterization that allows modeling unbounded data scores.
|
| 169 |
+
|
| 170 |
+
# 5 Experiments
|
| 171 |
+
|
| 172 |
+
Here, we examine the efficacy of LSGM in learning generative models for images.
|
| 173 |
+
|
| 174 |
+
Implementation details: We implement LSGM using the NVAE [20] architecture as VAE backbone and ${ \mathrm { N C S N } } { + + }$ [2] as SGM backbone. NVAE has a hierarchical latent structure. The diffusion process input $\mathbf { z } _ { 0 }$ is constructed by concatenating the latent variables from all groups in the channel dimension. For NVAEs with multiple spatial resolutions in latent groups, we only feed the smallest resolution groups to the SGM prior and assume that the remaining groups have a standard Normal distribution.
|
| 175 |
+
|
| 176 |
+
Sampling: To generate samples from LSGM at test time, we use a black-box ODE solver [73] to sample from the prior. Prior samples are then passed to the decoder to generate samples in data space.
|
| 177 |
+
|
| 178 |
+
Evaluation: We measure NELBO, an upper bound on negative log-likelihood (NLL), using Eq. 6. For estimating $\log p ( { \mathbf { z } } _ { 0 } )$ , we rely on the probability flow ODE [2], which provides an unbiased but stochastic estimation of $\log p ( { \mathbf { z } } _ { 0 } )$ . This stochasticity prevents us from performing an importance weighted estimation of NLL [74] (see App. F for details). For measuring sample quality, Fréchet inception distance (FID) [75] is evaluated with 50K samples. Implementation details in App. G.
|
| 179 |
+
|
| 180 |
+
# 5.1 Main Results
|
| 181 |
+
|
| 182 |
+
Unconditional color image generation: Here, we present our main results for unconditional image generation on CIFAR-10 [89] (Tab. 2) and CelebA-HQ-256 (5-bit quantized) [88] (Tab. 3). For CIFAR-10, we train 3 different models: LSGM (FID) and LSGM (balanced) both use the VPSDE with linear $\beta ( t )$ and $w _ { { \tt u n } }$ -weighting for the SGM prior in Eq. 9, while performing IS as derived in Sec. 3.4. They only differ in how the backbone VAE is trained. LSGM (NLL) is a model that is trained with our novel geometric VPSDE, using $w _ { \mathrm { I I } }$ -weighting in the prior objective (further details in App. G). When set up for high image quality, LSGM achieves a new state-of-the-art FID of 2.10. When tuned towards NLL, we achieve a NELBO of 2.87, which is significantly better than previous score-based models. Only autoregressive models, which come with very slow synthesis, and VDVAE [21] reach similar or higher likelihoods, but they usually have much poorer image quality.
|
| 183 |
+
|
| 184 |
+
For CelebA-HQ-256, we observe that when LSGM is trained with different SDE types and weighting mechanisms, it often obtains similar NELBO potentially due to applying the SGM prior only to small latent variable groups and using Normal priors at the larger groups. With $w _ { \mathrm { r e } }$ -weighting and linear VPSDE, LSGM obtains the state-of-the-art FID score of 7.22 on a par with the original SGM [2].
|
| 185 |
+
|
| 186 |
+
For both datasets, we also report results for the VAE backbone used in our LSGM. Although this baseline achieves competitive NLL, its sample quality is behind our LSGM and the original SGM.
|
| 187 |
+
|
| 188 |
+
Modeling binarized images: Next, we examine LSGM on dynamically binarized MNIST [93] and OMNIGLOT [74]. We apply LSGM to binary images using a decoder with pixel-wise independent Bernoulli distributions. For these datasets, we report both NELBO and NLL in nats in Tab. 4 and Tab. 5. On OMNIGLOT, LSGM achieves state-of-the-art likelihood of $\leq 8 7 . 7 9$ nat, outperforming previous models including VAEs with autoregressive decoders, and even when comparing its NELBO against importance weighted estimation of NLL for other methods. On MNIST, LSGM outperforms previous VAEs in NELBO, reaching a NELBO 1.09 nat lower than the state-of-the-art NVAE.
|
| 189 |
+
|
| 190 |
+
Table 2: Generative performance on CIFAR-10.
|
| 191 |
+
|
| 192 |
+
<table><tr><td></td><td>Method</td><td>NLL↓</td><td>FID↓</td></tr><tr><td rowspan="4">Ours</td><td>LSGM (FID)</td><td>≤3.43</td><td>2.10</td></tr><tr><td>LSGM (NLL)</td><td>≤2.87</td><td>6.89</td></tr><tr><td>LSGM (balanced)</td><td>≤2.95</td><td>2.17</td></tr><tr><td>VAE Backbone</td><td>2.96</td><td>43.18</td></tr><tr><td rowspan="6">VAEs</td><td>VDVAE [21]</td><td>2.87</td><td></td></tr><tr><td>NVAE [20]</td><td>2.91</td><td>23.49</td></tr><tr><td>VAEBM[76]</td><td>-</td><td>12.19</td></tr><tr><td>NCP-VAE [56]</td><td>■</td><td>24.08</td></tr><tr><td>BIVA [48]</td><td>3.08</td><td>■</td></tr><tr><td>DC-VAE[77]</td><td>-</td><td>17.90</td></tr><tr><td rowspan="7">Score</td><td>NCSN[3]</td><td>=</td><td>25.32</td></tr><tr><td>Rec.Likelihood [40]</td><td>3.18</td><td>9.36</td></tr><tr><td>DSM-ALS [39]</td><td>3.65</td><td>■</td></tr><tr><td>DDPM[1]</td><td>3.75</td><td>3.17</td></tr><tr><td>Improved DDPM[26]</td><td>2.94</td><td>11.47</td></tr><tr><td>SDE (DDPM++) [2]</td><td>2.99</td><td>2.92</td></tr><tr><td>SDE (NCSN++) [2]</td><td>-</td><td>2.20</td></tr><tr><td rowspan="2">Flows</td><td>VFlow [19]</td><td>2.98</td><td>-</td></tr><tr><td>ANF [18]</td><td>3.05</td><td>-</td></tr><tr><td rowspan="5">Aut. Reg.</td><td>DistAug aug [78]</td><td>2.53</td><td>42.90</td></tr><tr><td>Sp.Transformers [79]</td><td>2.80</td><td>-</td></tr><tr><td>δ-VAE [80]</td><td>2.83</td><td>■</td></tr><tr><td>PixelSNAIL [81]</td><td>2.85</td><td>=</td></tr><tr><td>PixelCNN++ [82]</td><td>2.92</td><td>-</td></tr><tr><td rowspan="2">GANs</td><td>AutoGAN [83]</td><td></td><td>12.42</td></tr><tr><td>StyleGAN2-ADA [84]</td><td>=</td><td>2.92</td></tr></table>
|
| 193 |
+
|
| 194 |
+
Table 4: Dyn. binarized OMNIGLOT results.
|
| 195 |
+
|
| 196 |
+
<table><tr><td></td><td>Method</td><td>NELBO↓</td><td>NLL↓</td></tr><tr><td>Ours</td><td>LSGM</td><td>87.79</td><td>≤87.79</td></tr><tr><td rowspan="4">VAEs</td><td>NVAE [20]</td><td>93.92</td><td>90.75</td></tr><tr><td>BIVA[48]</td><td>93.54</td><td>91.34</td></tr><tr><td>DVAE++ [51]</td><td>-</td><td>92.38</td></tr><tr><td>Ladder VAE [90]</td><td>-</td><td>102.11</td></tr><tr><td rowspan="3">Aut. Reg.</td><td>VLVAE [47]</td><td></td><td>89.83</td></tr><tr><td>VampPrior [59]</td><td></td><td>89.76</td></tr><tr><td>PixeiVAE++ [91]</td><td></td><td>88.29</td></tr></table>
|
| 197 |
+
|
| 198 |
+
Table 3: Generative results on CelebA-HQ-256.
|
| 199 |
+
|
| 200 |
+
<table><tr><td></td><td>Method</td><td>NLL↓</td><td>FID↓</td></tr><tr><td rowspan="2">Ours</td><td>LSGM</td><td>≤0.70</td><td>7.22</td></tr><tr><td>VAE Backbone</td><td>0.70</td><td>30.87</td></tr><tr><td rowspan="4">VAEs</td><td>NVAE [20]</td><td>0.70</td><td>29.76</td></tr><tr><td>VAEBM[76]</td><td>-</td><td>20.38</td></tr><tr><td>NCP-VAE [56]</td><td>-</td><td>24.79</td></tr><tr><td>DC-VAE [77]</td><td>-</td><td>15.80</td></tr><tr><td>Score</td><td>SDE [2]</td><td>-</td><td>7.23</td></tr><tr><td>Flows</td><td>GLOW [85]</td><td>1.03</td><td>68.93</td></tr><tr><td>Aut. Reg.</td><td>SPN [86]</td><td>0.61</td><td>-</td></tr><tr><td rowspan="3">GANs</td><td>Adv. LAE [87]</td><td>-</td><td>19.21</td></tr><tr><td>VQ-GAN [64]</td><td></td><td>10.70</td></tr><tr><td>PGGAN [88]</td><td></td><td>8.03</td></tr></table>
|
| 201 |
+
|
| 202 |
+

|
| 203 |
+
Figure 4: FID and number of function evaluations (NFEs) for different ODE solver error tolerances on CelebA-HQ-256. LSGM takes 4.15 sec. for sampling while the original SGM [2] takes $4 5 \mathrm { { m i n } }$ . with PC and $3 . 9 \mathrm { { m i n } }$ . with ODE-based sampling.
|
| 204 |
+
|
| 205 |
+
Table 5: Dynamically binarized MNIST results.
|
| 206 |
+
|
| 207 |
+
<table><tr><td></td><td>Method</td><td>NELBO↓</td><td>NLL↓</td></tr><tr><td>Ours</td><td>LSGM</td><td>78.47</td><td>≤78.47</td></tr><tr><td rowspan="4">VAEs</td><td>NVAE [20]</td><td>79.56</td><td>78.01</td></tr><tr><td>BIVA[ [48]</td><td>80.06</td><td>78.41</td></tr><tr><td>IAF-VAE [24]</td><td>80.80</td><td>79.10</td></tr><tr><td>DVAE++ [51]</td><td>-</td><td>78.49</td></tr><tr><td rowspan="3">Aut. Reg.</td><td>PixelVAE++ [91]</td><td></td><td>78.00</td></tr><tr><td>VampPrior[59]</td><td></td><td>78.45</td></tr><tr><td>MAE [92]</td><td></td><td>77.98</td></tr></table>
|
| 208 |
+
|
| 209 |
+
Qualitative results: We visualize qualitative results for all datasets in Fig. 5. On the complex multimodal CIFAR-10 dataset, LSGM generates sharp and high-quality images. On CelebA-HQ-256, LSGM generates diverse samples from different ethnicity and age groups with varying head poses and facial expressions. On MNIST and OMNIGLOT, the generated characters are sharp and high-contrast.
|
| 210 |
+
|
| 211 |
+
Sampling time: We compare LSGM against the original SGM [2] trained on the CelebA-HQ-256 dataset in terms of sampling time and number of function evaluations (NFEs) of the ODE solver. Song et al. [2] propose two main sampling techniques including predictor-corrector (PC) and probability flow ODE. PC sampling involves 4000 NFEs and takes $4 4 . 6 \ \mathrm { m i n }$ . on a Titan V for a batch of 16 images. It yields 7.23 FID score (see Tab. 3). ODE-based sampling from SGM takes $3 . 9 1 \ \mathrm { m i n }$ . with 335 NFEs, but it obtains a poor FID score of 128.13 with $1 0 ^ { - 5 }$ as ODE solver error tolerance6.
|
| 212 |
+
|
| 213 |
+
In a stark contrast, ODE-based sampling from our LSGM takes $0 . 0 7 \mathrm { m i n }$ . with average of 23 NFEs, yielding 7.22 FID score. LSGM is $6 3 7 \times$ and $5 6 \times$ faster than original SGM’s [2] PC and ODE sampling, respectively. In Fig. 4, we visualize FID scores and NFEs for different ODE solver error tolerances. Our LSGM achieves low FID scores for relatively large error tolerances.
|
| 214 |
+
|
| 215 |
+

|
| 216 |
+
Figure 5: Generated samples for different datasets. For binary datasets, we visualize the decoder mean. LSGM successfully generates sharp, high-quality, and diverse samples (additional samples in appendix).
|
| 217 |
+
|
| 218 |
+
Table 6: Ablations on SDEs, objectives, weighting mechanisms, and variance reduction. Details in App. G.
|
| 219 |
+
|
| 220 |
+
<table><tr><td colspan="2">SGM-obj.-weighting</td><td colspan="2">W1</td><td colspan="4">Wun</td><td colspan="4">Wre</td></tr><tr><td colspan="2">t-sampling (SGM-obj.)|u[0,1](t)</td><td colspan="2"></td><td colspan="2">u[0,1]</td><td colspan="2">run(t)</td><td colspan="2">u[0,1]</td><td colspan="2">re(t)</td></tr><tr><td colspan="2">t-sampling (q-obj.)</td><td>rew.</td><td>rew.</td><td>rew.</td><td>rm(t)</td><td>rew.</td><td>rn(t)|</td><td>rew.</td><td>r(t)</td><td>rew.</td><td>rn(t)</td></tr><tr><td rowspan="2">Geom.- VPSDE</td><td rowspan="2">FID NELBO↓</td><td>10.18 2.96</td><td>n/a</td><td>NaN</td><td>NaN</td><td>n/a</td><td>n/a</td><td>22.21</td><td>NaN</td><td>7.29</td><td>7.18</td></tr><tr><td></td><td>n/a</td><td>NaN</td><td>NaN</td><td>n/a</td><td>n/a</td><td>3.04</td><td>NaN</td><td>2.99</td><td>2.99</td></tr><tr><td rowspan="2">VPSDE</td><td rowspan="2">FID NELBO↓</td><td>6.15</td><td>8.00</td><td>NaN</td><td>NaN</td><td>5.39</td><td>5.39</td><td>NaN</td><td>4.99</td><td>15.12</td><td>6.19</td></tr><tr><td>2.97</td><td>2.97</td><td>NaN</td><td>NaN</td><td>2.98</td><td>2.98</td><td>NaN</td><td>2.99</td><td>3.03</td><td>2.99</td></tr></table>
|
| 221 |
+
|
| 222 |
+
We identify three main reasons for this significantly faster sampling from LSGM: (i) The SGM prior in our LSGM models latent variables with $3 2 \times 3 2$ spatial dim., whereas the original SGM [2] directly models $2 5 6 \times 2 5 6$ images. The larger spatial dimensions require a deeper network to achieve a large receptive field. (ii) Inspecting the SGM prior in our model suggests that the score function is heavily dominated by the linear term at the end of training, as the mixing coefficients $_ { \pmb { \alpha } }$ are all $< 0 . 0 2$ . This makes our SGM prior smooth and numerically faster to solve. (iii) Since SGM is formed in the latent space in our model, errors from solving the ODE can be corrected to some degree using the VAE decoder, while in the original SGM [2] errors directly translate to artifacts in pixel space.
|
| 223 |
+
|
| 224 |
+
# 5.2 Ablation Studies
|
| 225 |
+
|
| 226 |
+
SDEs, objective weighting mechanisms and variance reduction. In Tab. 6, we analyze the different weighting mechanisms and variance reduction techniques and compare the geometric VPSDE with the regular VPSDE with linear $\beta ( t )$ [1, 2]. In the table, SGM-obj.-weighting denotes the weighting mechanism used when training the SGM prior (via Eq. 9). $t$ -sampling (SGM-obj.) indicates the sampling approach for $t$ , where $r _ { \mathrm { l l } } ( t )$ , $r _ { \mathrm { u n } } ( t )$ and $r _ { \mathrm { r e } } ( t )$ denote the IS distributions for the weighted (likelihood), the unweighted, and the reweighted objective, respectively. For training the VAE encoder $q _ { \phi } ( \mathbf { z } _ { 0 } | \mathbf { x } )$ (last term in Eq. 8), we either sample a separate batch $t$ with importance sampling following $r _ { \parallel } ( t )$ (only necessary when the SGM prior is not trained with $w _ { \mathrm { I I } }$ itself), or we reweight the samples drawn for training the prior according to the likelihood objective (denoted by rew.). n/a indicates fields that do not apply: The geometric VPSDE has optimal variance for the weighted (likelihood) objective already with uniform sampling; there is no additional IS distribution. Also, we did not derive IS distributions for the geometric VPSDE for $w _ { \mathrm { u n } }$ . NaN indicates experiments that failed due to training instabilities. Previous work [20, 21] have reported instability in training large VAEs. We find that our method inherits similar instabilities from VAEs; however, importance sampling often stabilizes training our LSGM. As expected, we obtain the best NELBOs (red) when training with the weighted, maximum likelihood objective $( w _ { \mathrm { I I } } )$ . Importantly, our new geometric VPSDE achieves the best NELBO. Furthermore, the best FIDs (blue) are obtained either by unweighted $( w _ { \mathrm { u n } } )$ or reweighted $( w _ { \mathrm { r e } } )$ SGM prior training, with only slightly worse NELBOs. These experiments were run on the CIFAR10 dataset, using a smaller model than for our main results above (details in App. G).
|
| 227 |
+
|
| 228 |
+
End-to-end training. We proposed to train LSGM end-to-end, in contrast to [10]. Using a similar setup as above we compare end-to-end training of LSGM during the second stage with freezing the VAE encoder and decoder and only training the SGM prior in latent space during the second stage. When training the model end-to-end, we achieve an FID of 5.19 and NELBO of 2.98; when freezing the VAE networks during the second stage, we only get an FID of 9.00 and NELBO of 3.03. These results clearly motivate our end-to-end training strategy.
|
| 229 |
+
|
| 230 |
+
Mixing Normal and neural score functions. We generally found training LSGM without our proposed “mixed score” formulation (Sec. 3.2) to be unstable during end-to-end training, highlighting its importance. To quantify the contribution of the mixed score parametrization for a stable model, we train a small LSGM with only one latent variable group. In this case, without the mixed score, we reached an FID of 34.71 and NELBO of 3.39; with it, we got an FID of 7.60 and NELBO of 3.29. Without the inductive bias provided by the mixed score, learning that the marginal distribution is close to a Normal one for large $t$ purely from samples can be very hard in the high-dimensional latent space, where our diffusion is run. Furthermore, due to our importance sampling schemes, we tend to oversample small, rather than large $t$ . However, synthesizing high-quality images requires an accurate score function estimate for all $t$ . On the other hand, the log-likelihood of samples is highly sensitive to local image statistics and primarily determined at small t. It is plausible that we are still able to learn a reasonable estimate of the score function for these small $t$ even without the mixed score formulation. That may explain why log-likelihood suffers much less than sample quality, as estimated by FID, when we remove the mixed score parameterization.
|
| 231 |
+
|
| 232 |
+
Additional experiments and model samples are presented in App. H.
|
| 233 |
+
|
| 234 |
+
# 6 Conclusions
|
| 235 |
+
|
| 236 |
+
We proposed the Latent Score-based Generative Model, a novel framework for end-to-end training of score-based generative models in the latent space of a variational autoencoder. Moving from data to latent space allows us to form more expressive generative models, model non-continuous data, and reduce sampling time using smoother SGMs. To enable training latent SGMs, we made three core contributions: (i) we derived a simple expression for the cross entropy term in the variational objective, (ii) we parameterized the SGM prior by mixing Normal and neural score functions, and (iii) we proposed several techniques for variance reduction in the estimation of the training objective. Experimental results show that latent SGMs outperform recent pixel-space SGMs in terms of both data likelihood and sample quality, and they can also be applied to binary datasets. In large image generation, LSGM generates data several orders of magnitude faster than recent SGMs. Nevertheless, LSGM’s synthesis speed does not yet permit sampling at interactive rates, and our implementation of LSGM is currently limited to image generation. Therefore, future work includes further accelerating sampling, applying LSGMs to other data types, and designing efficient networks for LSGMs.
|
| 237 |
+
|
| 238 |
+
# 7 Broader Impact
|
| 239 |
+
|
| 240 |
+
Generating high-quality samples while fully covering the data distribution has been a long-standing challenge in generative learning. A solution to this problem will likely help reduce biases in generative models and lead to improving overall representation of minorities in the data distribution. SGMs are perhaps one of the first deep models that excel at both sample quality and distribution coverage. However, the high computational cost of sampling limits their widespread use. Our proposed LSGM reduces the sampling complexity of SGMs by a large margin and improves their expressivity further. Thus, in the long term, it can enable the usage of SGMs in practical applications.
|
| 241 |
+
|
| 242 |
+
Here, LSGM is examined on the image generation task which has potential benefits and risks discussed in [94, 95]. However, LSGM can be considered a generic framework that extends SGMs to non-continuous data types. In principle LSGM could be used to model, for example, language [96, 97], music [98, 10], or molecules [99, 100]. Furthermore, like other deep generative models, it can potentially be used also for non-generative tasks such as semi-supervised and representation learning [101, 102, 103]. This makes the long-term social impacts of LSGM dependent on the downstream applications.
|
| 243 |
+
|
| 244 |
+
# Funding Statement
|
| 245 |
+
|
| 246 |
+
All authors were funded by NVIDIA through full-time employment.
|
| 247 |
+
|
| 248 |
+
References
|
| 249 |
+
[1] Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising Diffusion Probabilistic Models. arXiv:2006.11239, 2020.
|
| 250 |
+
[2] Yang Song, Jascha Sohl-Dickstein, Diederik P Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole. Score-based generative modeling through stochastic differential equations. In International Conference on Learning Representations, 2021.
|
| 251 |
+
[3] Yang Song and Stefano Ermon. Generative Modeling by Estimating Gradients of the Data Distribution. In Advances in Neural Information Processing Systems 32, 2019.
|
| 252 |
+
[4] Yang Song, Conor Durkan, Iain Murray, and Stefano Ermon. Maximum likelihood training of score-based diffusion models. arXiv e-prints, 2021.
|
| 253 |
+
[5] Jiaming Song, Chenlin Meng, and Stefano Ermon. Denoising diffusion implicit models. In International Conference on Learning Representations, 2021. [6] Prafulla Dhariwal and Alex Nichol. Diffusion models beat gans on image synthesis. arXiv preprint arXiv:2105.05233, 2021. [7] Nanxin Chen, Yu Zhang, Heiga Zen, Ron J. Weiss, Mohammad Norouzi, and William Chan. WaveGrad: Estimating Gradients for Waveform Generation. arXiv:2009.00713, 2020. [8] Zhifeng Kong, Wei Ping, Jiaji Huang, Kexin Zhao, and Bryan Catanzaro. DiffWave: A Versatile Diffusion Model for Audio Synthesis. arXiv:2009.09761, 2020. [9] Myeonghun Jeong, Hyeongju Kim, Sung Jun Cheon, Byoung Jin Choi, and Nam Soo Kim. Diff-tts: A denoising diffusion model for text-to-speech. arXiv:2104.01409, 2021.
|
| 254 |
+
[10] Gautam Mittal, Jesse Engel, Curtis Hawthorne, and Ian Simon. Symbolic music generation with diffusion models. arXiv preprint arXiv:2103.16091, 2021.
|
| 255 |
+
[11] Chenhao Niu, Yang Song, Jiaming Song, Shengjia Zhao, Aditya Grover, and Stefano Ermon. Permutation invariant graph generation via score-based generative modeling. In The 23rd International Conference on Artificial Intelligence and Statistics, AISTATS 2020, 26-28 August 2020, Online [Palermo, Sicily, Italy], 2020.
|
| 256 |
+
[12] Ruojin Cai, Guandao Yang, Hadar Averbuch-Elor, Zekun Hao, Serge J. Belongie, Noah Snavely, and Bharath Hariharan. Learning gradient fields for shape generation. In Computer Vision - ECCV 2020 - 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part III, volume 12348 of Lecture Notes in Computer Science, pages 364–381. Springer, 2020.
|
| 257 |
+
[13] Shitong Luo and Wei Hu. Diffusion probabilistic models for 3d point cloud generation. arXiv:2103.01458, 2021.
|
| 258 |
+
[14] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. In The International Conference on Learning Representations (ICLR), 2014.
|
| 259 |
+
[15] Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In International Conference on Machine Learning, pages 1278–1286, 2014.
|
| 260 |
+
[16] Emilien Dupont, Arnaud Doucet, and Yee Whye Teh. Augmented neural ODEs. In Advances in Neural Information Processing Systems, pages 3140–3150, 2019.
|
| 261 |
+
[17] Zhifeng Kong and Kamalika Chaudhuri. The expressive power of a class of normalizing flow models. arXiv preprint arXiv:2006.00392, 2020.
|
| 262 |
+
[18] Chin-Wei Huang, Laurent Dinh, and Aaron Courville. Augmented normalizing flows: Bridging the gap between generative flows and latent variable models. arXiv preprint arXiv:2002.07101, 2020.
|
| 263 |
+
[19] Jianfei Chen, Cheng Lu, Biqi Chenli, Jun Zhu, and Tian Tian. Vflow: More expressive generative flows with variational data augmentation. arXiv preprint arXiv:2002.09741, 2020.
|
| 264 |
+
[20] Arash Vahdat and Jan Kautz. NVAE: A Deep Hierarchical Variational Autoencoder. arXiv:2007.03898, 2020.
|
| 265 |
+
[21] Rewon Child. Very deep VAEs generalize autoregressive models and can outperform them on images. In International Conference on Learning Representations, 2021.
|
| 266 |
+
|
| 267 |
+
[22] Pascal Vincent. A Connection between Score Matching and Denoising Autoencoders. Neural Computation, 23(7):1661–1674, 2011.
|
| 268 |
+
|
| 269 |
+
[23] Danilo Jimenez Rezende and Shakir Mohamed. Variational inference with normalizing flows. arXiv preprint arXiv:1505.05770, 2015.
|
| 270 |
+
|
| 271 |
+
[24] 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, pages 4743–4751, 2016.
|
| 272 |
+
|
| 273 |
+
[25] Chin-Wei Huang, Jae Hyun Lim, and Aaron Courville. A variational perspective on diffusion-based generative models and score matching. arXiv preprint arXiv:2106.02808, 2021.
|
| 274 |
+
|
| 275 |
+
[26] Alex Nichol and Prafulla Dhariwal. Improved denoising diffusion probabilistic models. arXiv preprint arXiv:2102.09672, 2021.
|
| 276 |
+
|
| 277 |
+
[27] Jascha Sohl-Dickstein, Eric A. Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep Unsupervised Learning Using Nonequilibrium Thermodynamics. In Proceedings of the 32nd International Conference on International Conference on Machine Learning - Volume 37, ICML’15, page 2256–2265. JMLR.org, 2015.
|
| 278 |
+
|
| 279 |
+
[28] c. Monte Carlo theory, methods and examples. 2013.
|
| 280 |
+
|
| 281 |
+
[29] Aapo Hyvärinen. Estimation of Non-Normalized Statistical Models by Score Matching. J. Mach. Learn. Res., 6:695–709, December 2005.
|
| 282 |
+
|
| 283 |
+
[30] Siwei Lyu. Interpretation and Generalization of Score Matching. In Proceedings of the Twenty-Fifth Conference on Uncertainty in Artificial Intelligence, UAI ’09, page 359–366, Arlington, Virginia, USA, 2009. AUAI Press.
|
| 284 |
+
|
| 285 |
+
[31] Durk P Kingma and Yann L. Cun. Regularized estimation of image statistics by Score Matching. In Advances in Neural Information Processing Systems 23, 2010.
|
| 286 |
+
|
| 287 |
+
[32] Yoshua Bengio, Li Yao, Guillaume Alain, and Pascal Vincent. Generalized Denoising Auto-Encoders as Generative Models. In Proceedings of the 26th International Conference on Neural Information Processing Systems, 2013.
|
| 288 |
+
|
| 289 |
+
[33] Krzysztof J. Geras and Charles A. Sutton. Scheduled denoising autoencoders. In 3rd International Conference on Learning Representations, ICLR, 2015.
|
| 290 |
+
|
| 291 |
+
[34] Saeed Saremi, Arash Mehrjou, Bernhard Schölkopf, and Aapo Hyvärinen. Deep Energy Estimator Networks. arXiv:1805.08306, 2018.
|
| 292 |
+
|
| 293 |
+
[35] Yang Song, Sahaj Garg, Jiaxin Shi, and Stefano Ermon. Sliced Score Matching: A Scalable Approach to Density and Score Estimation. In Proceedings of the Thirty-Fifth Conference on Uncertainty in Artificial Intelligence, UAI 2019, Tel Aviv, Israel, July 22-25, 2019, 2019.
|
| 294 |
+
|
| 295 |
+
[36] Zengyi Li, Yubei Chen, and Friedrich T. Sommer. Learning Energy-Based Models in High-Dimensional Spaces with Multi-scale Denoising Score Matching. arXiv:1910.07762, 2019.
|
| 296 |
+
|
| 297 |
+
[37] Tianyu Pang, Kun Xu, Chongxuan Li, Yang Song, Stefano Ermon, and Jun Zhu. Efficient Learning of Generative Models via Finite-Difference Score Matching. arXiv:2007.03317, 2020.
|
| 298 |
+
|
| 299 |
+
[38] Yang Song and Stefano Ermon. Improved Techniques for Training Score-Based Generative Models. arXiv:2006.09011, 2020.
|
| 300 |
+
|
| 301 |
+
[39] Alexia Jolicoeur-Martineau, Rémi Piché-Taillefer, Ioannis Mitliagkas, and Remi Tachet des Combes. Adversarial score matching and improved sampling for image generation. In International Conference on Learning Representations, 2021.
|
| 302 |
+
|
| 303 |
+
[40] Ruiqi Gao, Yang Song, Ben Poole, Ying Nian Wu, and Diederik P Kingma. Learning energy-based models by diffusion recovery likelihood. In International Conference on Learning Representations, 2021.
|
| 304 |
+
|
| 305 |
+
[41] Eric Luhman and Troy Luhman. Knowledge distillation in iterative generative models for improved sampling speed. arXiv preprint arXiv:2101.02388, 2021.
|
| 306 |
+
|
| 307 |
+
[42] Robin San-Roman, Eliya Nachmani, and Lior Wolf. Noise estimation for generative diffusion models. arXiv preprint arXiv:2104.02600, 2021.
|
| 308 |
+
|
| 309 |
+
[43] Martin Simonovsky and Nikos Komodakis. Graphvae: Towards generation of small graphs using variational autoencoders. arXiv:1802.03480, 2018.
|
| 310 |
+
[44] Wengong Jin, Regina Barzilay, and Tommi Jaakkola. Junction tree variational autoencoder for molecular graph generation. In Proceedings of the 35th International Conference on Machine Learning, 2018.
|
| 311 |
+
[45] Aditya Grover, Aaron Zweig, and Stefano Ermon. Graphite: Iterative generative modeling of graphs. In Proceedings of the 36th International Conference on Machine Learning, 2019.
|
| 312 |
+
[46] Renjie Liao, Yujia Li, Yang Song, Shenlong Wang, Will Hamilton, David K Duvenaud, Raquel Urtasun, and Richard Zemel. Efficient graph generation with graph recurrent attention networks. In Advances in Neural Information Processing Systems, 2019.
|
| 313 |
+
[47] Xi Chen, Diederik P Kingma, Tim Salimans, Yan Duan, Prafulla Dhariwal, John Schulman, Ilya Sutskever, and Pieter Abbeel. Variational lossy autoencoder. arXiv preprint arXiv:1611.02731, 2016.
|
| 314 |
+
[48] Lars Maaløe, Marco Fraccaro, Valentin Liévin, and Ole Winther. BIVA: A very deep hierarchy of latent variables for generative modeling. In Advances in neural information processing systems, pages 6548–6558, 2019.
|
| 315 |
+
[49] Jason Tyler Rolfe. Discrete variational autoencoders. arXiv preprint arXiv:1609.02200, 2016.
|
| 316 |
+
[50] Arash Vahdat, Evgeny Andriyash, and William G Macready. DVAE#: Discrete variational autoencoders with relaxed Boltzmann priors. In Neural Information Processing Systems, 2018.
|
| 317 |
+
[51] Arash Vahdat, William G. Macready, Zhengbing Bian, Amir Khoshaman, and Evgeny Andriyash. DVAE $^ { + + }$ : Discrete variational autoencoders with overlapping transformations. In International Conference on Machine Learning (ICML), 2018.
|
| 318 |
+
[52] Arash Vahdat, Evgeny Andriyash, and William G Macready. Undirected graphical models as approximate posteriors. In International Conference on Machine Learning (ICML), 2020.
|
| 319 |
+
[53] Bo Pang, Tian Han, Erik Nijkamp, Song-Chun Zhu, and Ying Nian Wu. Learning latent space energybased prior model. In H. Larochelle, M. Ranzato, R. Hadsell, M. F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, volume 33, pages 21994–22008. Curran Associates, Inc., 2020.
|
| 320 |
+
[54] Jesse Engel, Matthew Hoffman, and Adam Roberts. Latent constraints: Learning to generate conditionally from unconditional generative models. In International Conference on Learning Representations, 2018.
|
| 321 |
+
[55] Matthias Bauer and Andriy Mnih. Resampled priors for variational autoencoders. In Kamalika Chaudhuri and Masashi Sugiyama, editors, Proceedings of the Twenty-Second International Conference on Artificial Intelligence and Statistics, volume 89 of Proceedings of Machine Learning Research, pages 66–75. PMLR, 16–18 Apr 2019.
|
| 322 |
+
[56] Jyoti Aneja, Alexander Schwing, Jan Kautz, and Arash Vahdat. NCP-VAE: Variational autoencoders with noise contrastive priors. arXiv preprint arXiv:2010.02917, 2020.
|
| 323 |
+
[57] Alireza Makhzani, Jonathon Shlens, Navdeep Jaitly, Ian Goodfellow, and Brendan Frey. Adversarial autoencoders, 2016.
|
| 324 |
+
[58] Hiroshi Takahashi, Tomoharu Iwata, Yuki Yamanaka, Masanori Yamada, and Satoshi Yagi. Variational autoencoder with implicit optimal priors. Proceedings of the AAAI Conference on Artificial Intelligence, 33(01):5066–5073, Jul. 2019.
|
| 325 |
+
[59] Jakub Tomczak and Max Welling. Vae with a vampprior. In International Conference on Artificial Intelligence and Statistics, pages 1214–1223, 2018.
|
| 326 |
+
[60] Bin Dai and David Wipf. Diagnosing and enhancing VAE models. In International Conference on Learning Representations, 2019.
|
| 327 |
+
[61] Aaron van den Oord, Oriol Vinyals, and Koray Kavukcuoglu. Neural discrete representation learning. arXiv preprint arXiv:1711.00937, 2018.
|
| 328 |
+
[62] Ali Razavi, Aaron van den Oord, and Oriol Vinyals. Generating diverse high-fidelity images with vq-vae-2. In Advances in Neural Information Processing Systems, pages 14837–14847, 2019.
|
| 329 |
+
[63] Partha Ghosh, Mehdi S. M. Sajjadi, Antonio Vergari, Michael Black, and Bernhard Scholkopf. From variational to deterministic autoencoders. In International Conference on Learning Representations, 2020.
|
| 330 |
+
[64] Patrick Esser, Robin Rombach, and Björn Ommer. Taming transformers for high-resolution image synthesis. arXiv preprint arXiv:2012.09841, 2020.
|
| 331 |
+
[65] Abdul Fatir Ansari, Ming Liang Ang, and Harold Soh. Refining deep generative models via discriminator gradient flow. In International Conference on Learning Representations, 2021.
|
| 332 |
+
[66] Tong Che, Ruixiang ZHANG, Jascha Sohl-Dickstein, Hugo Larochelle, Liam Paull, Yuan Cao, and Yoshua Bengio. Your gan is secretly an energy-based model and you should use discriminator driven latent sampling. In Advances in Neural Information Processing Systems, 2020.
|
| 333 |
+
[67] Akinori Tanaka. Discriminator optimal transport. In Advances in Neural Information Processing Systems, 2019.
|
| 334 |
+
[68] Weili Nie, Arash Vahdat, and Anima Anandkumar. Controllable and compositional generation with latent-space energy-based models. In Neural Information Processing Systems (NeurIPS), 2021.
|
| 335 |
+
[69] Antoine Wehenkel and Gilles Louppe. Diffusion priors in variational autoencoders. In ICML Workshop on Invertible Neural Networks, Normalizing Flows, and Explicit Likelihood Models, 2021.
|
| 336 |
+
[70] Abhishek Sinha, Jiaming Song, Chenlin Meng, and Stefano Ermon. D2c: Diffusion-denoising models for few-shot conditional generation. arXiv preprint arXiv:2106.06819, 2021.
|
| 337 |
+
[71] Diederik P Kingma, Tim Salimans, Ben Poole, and Jonathan Ho. Variational diffusion models. arXiv preprint arXiv:2107.00630, 2021.
|
| 338 |
+
[72] Dongjun Kim, Seungjae Shin, Kyungwoo Song, Wanmo Kang, and Il-Chul Moon. Score matching model for unbounded data score. arXiv preprint arXiv:2106.05527, 2021.
|
| 339 |
+
[73] Ricky T. Q. Chen, Yulia Rubanova, Jesse Bettencourt, and David Duvenaud. Neural ordinary differential equations. Advances in Neural Information Processing Systems, 2018.
|
| 340 |
+
[74] Yuri Burda, Roger Grosse, and Ruslan Salakhutdinov. Importance weighted autoencoders. arXiv preprint arXiv:1509.00519, 2015.
|
| 341 |
+
[75] Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. In Advances in neural information processing systems, pages 6626–6637, 2017.
|
| 342 |
+
[76] Zhisheng Xiao, Karsten Kreis, Jan Kautz, and Arash Vahdat. VAEBM: A symbiosis between variational autoencoders and energy-based models. In International Conference on Learning Representations, 2021.
|
| 343 |
+
[77] Gaurav Parmar, Dacheng Li, Kwonjoon Lee, and Zhuowen Tu. Dual contradistinctive generative autoencoder. arXiv preprint arXiv:2011.10063, 2020.
|
| 344 |
+
[78] Heewoo Jun, Rewon Child, Mark Chen, John Schulman, Aditya Ramesh, Alec Radford, and Ilya Sutskever. Distribution augmentation for generative modeling. In International Conference on Machine Learning, pages 5006–5019. PMLR, 2020.
|
| 345 |
+
[79] Rewon Child, Scott Gray, Alec Radford, and Ilya Sutskever. Generating long sequences with sparse transformers. arXiv preprint arXiv:1904.10509, 2019.
|
| 346 |
+
[80] Ali Razavi, Aäron van den Oord, Ben Poole, and Oriol Vinyals. Preventing posterior collapse with delta-vaes. In The International Conference on Learning Representations (ICLR), 2019.
|
| 347 |
+
[81] XI Chen, Nikhil Mishra, Mostafa Rohaninejad, and Pieter Abbeel. PixelSNAIL: An improved autoregressive generative model. In International Conference on Machine Learning, 2018.
|
| 348 |
+
[82] Tim Salimans, Andrej Karpathy, Xi Chen, and Diederik P Kingma. PixelCNN $^ { + + }$ : Improving the pixelCNN with discretized logistic mixture likelihood and other modifications. arXiv preprint arXiv:1701.05517, 2017.
|
| 349 |
+
[83] Xinyu Gong, Shiyu Chang, Yifan Jiang, and Zhangyang Wang. Autogan: Neural architecture search for generative adversarial networks. In The IEEE International Conference on Computer Vision (ICCV), Oct 2019.
|
| 350 |
+
[84] Tero Karras, Miika Aittala, Janne Hellsten, Samuli Laine, Jaakko Lehtinen, and Timo Aila. Training generative adversarial networks with limited data. In NeurIPS, 2020.
|
| 351 |
+
[85] Durk P Kingma and Prafulla Dhariwal. Glow: Generative flow with invertible 1x1 convolutions. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, pages 10236–10245, 2018.
|
| 352 |
+
[86] Jacob Menick and Nal Kalchbrenner. Generating high fidelity images with subscale pixel networks and multidimensional upscaling. In International Conference on Learning Representations, 2019.
|
| 353 |
+
[87] Stanislav Pidhorskyi, Donald A Adjeroh, and Gianfranco Doretto. Adversarial latent autoencoders. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR), 2020.
|
| 354 |
+
[88] Tero Karras, Timo Aila, Samuli Laine, and Jaakko Lehtinen. Progressive growing of GANs for improved quality, stability, and variation. In International Conference on Learning Representations, 2018.
|
| 355 |
+
[89] Alex Krizhevsky et al. Learning multiple layers of features from tiny images, 2009.
|
| 356 |
+
[90] 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, pages 3738–3746, 2016.
|
| 357 |
+
[91] Hossein Sadeghi, Evgeny Andriyash, Walter Vinci, Lorenzo Buffoni, and Mohammad H Amin. Pixelvae++: Improved pixelvae with discrete prior. arXiv preprint arXiv:1908.09948, 2019.
|
| 358 |
+
[92] Xuezhe Ma, Chunting Zhou, and Eduard Hovy. MAE: Mutual posterior-divergence regularization for variational autoencoders. In The International Conference on Learning Representations (ICLR), 2019.
|
| 359 |
+
[93] Yann LeCun. The mnist database of handwritten digits. http://yann. lecun. com/exdb/mnist/, 1998.
|
| 360 |
+
[94] J. Bailey. The tools of generative art, from flash to neural networks. Art in America, 2020.
|
| 361 |
+
[95] Cristian Vaccari and Andrew Chadwick. Deepfakes and disinformation: Exploring the impact of synthetic political video on deception, uncertainty, and trust in news. Social Media+ Society, 6(1):2056305120903408, 2020.
|
| 362 |
+
[96] Samuel R Bowman, Luke Vilnis, Oriol Vinyals, Andrew Dai, Rafal Jozefowicz, and Samy Bengio. Generating sentences from a continuous space. In Proceedings of The 20th SIGNLL Conference on Computational Natural Language Learning, pages 10–21, 2016.
|
| 363 |
+
[97] Chunyuan Li, Xiang Gao, Yuan Li, Xiujun Li, Baolin Peng, Yizhe Zhang, and Jianfeng Gao. Optimus: Organizing sentences via pre-trained modeling of a latent space. In EMNLP, 2020.
|
| 364 |
+
[98] Prafulla Dhariwal, Heewoo Jun, Christine Payne, Jong Wook Kim, Alec Radford, and Ilya Sutskever. Jukebox: A generative model for music. arXiv preprint arXiv:2005.00341, 2020.
|
| 365 |
+
[99] Benjamin Sanchez-Lengeling and Alán Aspuru-Guzik. Inverse molecular design using machine learning: Generative models for matter engineering. Science, 361(6400):360–365, 2018.
|
| 366 |
+
[100] Zaccary Alperstein, Artem Cherkasov, and Jason Tyler Rolfe. All smiles variational autoencoder. arXiv preprint arXiv:1905.13343, 2019.
|
| 367 |
+
[101] Diederik P Kingma, Shakir Mohamed, Danilo Jimenez Rezende, and Max Welling. Semi-supervised learning with deep generative models. In Advances in Neural Information Processing Systems, pages 3581–3589, 2014.
|
| 368 |
+
[102] Augustus Odena. Semi-supervised learning with generative adversarial networks. arXiv preprint arXiv:1606.01583, 2016.
|
| 369 |
+
[103] Daiqing Li, Junlin Yang, Karsten Kreis, Antonio Torralba, and Sanja Fidler. Semantic segmentation with generative models: Semi-supervised learning and strong out-of-domain generalization. In Conference on Computer Vision and Pattern Recognition (CVPR), 2021.
|
| 370 |
+
[104] Simo Särkkä and Arno Solin. Applied Stochastic Differential Equations. Institute of Mathematical Statistics Textbooks. Cambridge University Press, United Kingdom, 2019.
|
| 371 |
+
[105] Brian D.O. Anderson. Reverse-time diffusion equation models. Stochastic Process. Appl., 12(3):313–326, 1982.
|
| 372 |
+
[106] Will Grathwohl, Ricky T. Q. Chen, Jesse Bettencourt, Ilya Sutskever, and David Duvenaud. Ffjord: Free-form continuous dynamics for scalable reversible generative models. International Conference on Learning Representations, 2019.
|
| 373 |
+
|
| 374 |
+
[107] Richard Zhang. Making convolutional networks shift-invariant again. In ICML, 2019. [108] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
parse/train/P9TYG0j-wtG/P9TYG0j-wtG_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/P9TYG0j-wtG/P9TYG0j-wtG_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/P9TYG0j-wtG/P9TYG0j-wtG_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/SJxDDpEKvH/SJxDDpEKvH.md
ADDED
|
@@ -0,0 +1,547 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# COUNTERFACTUALS UNCOVER THE MODULAR STRUCTURE OF DEEP GENERATIVE MODELS
|
| 2 |
+
|
| 3 |
+
Michel Besserve1,2,∗, Arash Mehrjou1,3, Remy´ $\mathbf { S u n ^ { 1 , 3 } }$ , Bernhard Scholkopf ¨ 1
|
| 4 |
+
|
| 5 |
+
1. MPI for Intelligent Systems, Tubingen, Germany. ¨
|
| 6 |
+
2. MPI for Biological Cybernetics, Tubingen, Germany. ¨
|
| 7 |
+
3. Department of Computer Science, ETH Zurich, Switzerland. ¨
|
| 8 |
+
4. ENS Rennes, France.
|
| 9 |
+
|
| 10 |
+
# ABSTRACT
|
| 11 |
+
|
| 12 |
+
Deep generative models can emulate the perceptual properties of complex image datasets, providing a latent representation of the data. However, manipulating such representation to perform meaningful and controllable transformations in the data space remains challenging without some form of supervision. While previous work has focused on exploiting statistical independence to disentangle latent factors, we argue that such requirement can be advantageously relaxed and propose instead a non-statistical framework that relies on identifying a modular organization of the network, based on counterfactual manipulations. Our experiments support that modularity between groups of channels is achieved to a certain degree on a variety of generative models. This allowed the design of targeted interventions on complex image datasets, opening the way to applications such as computationally efficient style transfer and the automated assessment of robustness to contextual changes in pattern recognition systems.
|
| 13 |
+
|
| 14 |
+

|
| 15 |
+
Figure 1: Counterfactual manipulation of samples of a BigGan trained on ImageNet (see section 4.2).
|
| 16 |
+
|
| 17 |
+
# 1 INTRODUCTION
|
| 18 |
+
|
| 19 |
+
Deep generative models, by learning a non-linear function mapping a latent space to a space of observations, have proven successful at designing realistic images in a variety of complex domains (objects, animals, human faces, interior scenes). In particular, two kinds of approaches emerged as state-of-the-art (SOTA): Generative Adversarial Networks (GAN) (Goodfellow et al., 2014), and Variational Autoencoders (VAE) (Kingma & Welling, 2013; Rezende et al., 2014).
|
| 20 |
+
|
| 21 |
+
Efforts have been made to have such models produce disentangled latent representations that can control interpretable properties of images (Kulkarni et al., 2015; Higgins et al., 2017). However, the resulting models are not necessarily mechanistic (or causal) in the sense that interpretable properties of an image cannot be ascribed to a particular part, a module, of the network architecture. Gaining access to a modular organization of generative models would benefit the interpretability and allow extrapolations, such as generating an object in a background that was not previously associated with this object, as illustrated in a preview of our experimental results in Fig. 1.
|
| 22 |
+
|
| 23 |
+
Such extrapolations are an integral part of human representational capabilities (consider common expressions such as ”like an elephant in a china shop”) and consistent with the modular organization of its visual system, comprising specialized regions encoding objects, faces and places (see e.g. GrillSpector & Malach (2004)). Extrapolations moreover likely support adaptability to environmental changes and robust decision making (Dvornik et al., 2018). How to leverage trained deep generative architectures to perform such extrapolations is an open problem, largely due to the non-linearities and high dimensionality that prevent interpretability of computations performed in successive layers.
|
| 24 |
+
|
| 25 |
+
In this paper, we propose a causal framework to explore modularity, which relates to the causal principle of Independent Mechanisms, stating that the causal mechanisms contributing to the overall generating process do not influence nor inform each other (Peters et al., 2017).1 We study the effect of direct interventions in the network from the point of view that the mechanisms involved in generating data can be modified individually without affecting each other. This principle can be applied to generative models to assess how well they capture a causal mechanism (Besserve et al., 2018a). Causality allows to assay how an outcome would have changed, had some variables taken different values, referred to as a counterfactual (Pearl, 2009; Imbens & Rubin, 2015). We use counterfactuals to assess the role of specific internal variables in the overall functioning of trained deep generative models, along with a rigorous definition of disentanglement in a causal framework. Then, we analyze this disentanglement in implemented models based on unsupervised counterfactual manipulations. We show empirically how VAEs and GANs trained on image databases exhibit modularity of their hidden units, encoding different features and allowing counterfactual editing of generated images.
|
| 26 |
+
|
| 27 |
+
Related work. Our work relates to the interpretability of convolutional neural networks, which has been intensively investigated in discriminative architectures (Zeiler & Fergus, 2014; Dosovitskiy & Brox, 2016; Fong & Vedaldi, 2017; Zhang et al., 2017b;a). Generative models require a different approach, as the downstream effect of changes in intermediate representations are high dimensional. InfoGANs. $\beta$ -VAEs and other works (Chen et al., 2016; Mathieu et al., 2016; Kulkarni et al., 2015; Higgins et al., 2017) address supervised or unsupervised disentanglement of latent variables related to what we formalize as extrinsic disentanglement of transformations acting on data points. We introduce the novel concept of intrinsic disentanglement to uncover the internal organization of networks, arguing that many interesting transformations are statistically dependent and are thus unlikely to be disentangled in the latent space. This relates to Bau et al. (2018) who proposed a framework based on interventions on internal variables of a GAN which, in contrast to our fully unsupervised approach, requires semantic information. Higgins et al. (2018) suggest a definition of disentanglement based on group representation theory. Compared to this proposal, our approach (introduced independently in (Besserve et al., 2018b)) is more flexible as it applies to arbitrary continuous transformations, free from the strong requirements of representation theory (see Appendix F). Finally, an interventional approach to disentanglement has also be taken by Suter et al. (2018), who focuses on extrinsic disentanglement in a classical graphical model setting and develop measures of interventional robustness based on labeled data.
|
| 28 |
+
|
| 29 |
+
# 2 FROM DISENTANGLEMENT TO COUNTERFACTUALS AND BACK
|
| 30 |
+
|
| 31 |
+
We introduce a general framework to formulate precisely the notion of disentanglement and bridge it to causal concepts. This theory section will be presented informally to ease high level understanding. Readers interested in the mathematical aspects can refer to Appendix A where we provide all details.
|
| 32 |
+
|
| 33 |
+
# 2.1 A CAUSAL GENERATIVE MODEL (CGM) FRAMEWORK
|
| 34 |
+
|
| 35 |
+
We consider a generative model $M$ that implements a function $g _ { M }$ , which maps a latent space $\mathcal { Z }$ to a manifold $\mathcal { V } _ { M }$ where the learned data points live, embedded in ambient Euclidean space $\mathcal { V }$ (Fig. 2a). A sample from the model is generated by drawing a realization $z$ from a prior latent variable distribution with mutually independent components, fully supported in $\mathcal { Z }$ . We will use the term representation to designate a mapping $r$ from $\mathcal { V } _ { M }$ to some representation space $\mathcal { R }$ (we also call $r ( y )$ the representation of a point $y \in \mathcal { P } _ { M }$ ). In particular, we will assume (see Def. 7 and Prop. 4, in Appendix A) that $g _ { M }$ is (left)-invertible, such that $g _ { M } ^ { - 1 }$ is a representation of the data, called the latent representation.
|
| 36 |
+
|
| 37 |
+
Assuming the generative model is implemented by a non-recurrent neural network, we can use a causal graphical model representation of the entailed computational graph implementing the mapping $g _ { M }$ through a succession of operations (called functional assignments in causal language), as illustrated in Fig. 2b, that we will call Causal Generative Model (CGM). In addition to the latent representation, we can then choose a collection of possibly multi-dimensional endogenous (internal) variables represented by nodes in the causal graph, such that the mapping $g _ { M }$ is computed by composing the endogenous variable assignment $v _ { M }$ with the endogenous mapping $\tilde { g } _ { M }$ according to the diagram
|
| 38 |
+
|
| 39 |
+

|
| 40 |
+
Figure 2: (a) Illustration of the generative mapping and a disentangled transformation. (b) Causal graph of an example CGM showing different types of independence between nodes. (c) Commutative diagram showing sparse transformation $T ^ { \prime }$ in latent space associated to a disentangled transformation $T$ . (d) Illustration of intrinsic disentanglement with $\bar { \mathcal { E } } = \{ 2 \}$ .
|
| 41 |
+
|
| 42 |
+
$$
|
| 43 |
+
\mathcal { Z } \stackrel { v _ { M } } { \to } \mathcal { V } _ { M } \stackrel { \widetilde g _ { M } } { \to } \mathcal { V } _ { M } .
|
| 44 |
+
$$
|
| 45 |
+
|
| 46 |
+
A paradigmatic choice for these variables is the collection of output activation maps of each channel in one hidden layer of a convolutional neural network, as illustrated in Fig. 2b. As for the latent case, we use mild conditions that guarantee $\tilde { g } _ { M }$ to be left-invertible, defining the internal representation of the network (see Def. 7 and Prop. 4 in Appendix A). Given the typical choice of dimensions for latent and endogenous variables, the $V _ { k }$ ’s are also constrained to take values in subsets $\nu _ { M } ^ { k }$ of smaller dimension than their Euclidean ambient space $\nu ^ { k }$ . As detailed in Appendix A, we introduce the endogenous image sets of the form $\begin{array} { r } { \pmb { \mathcal { V } } _ { M } ^ { \mathcal { E } } = \left\{ \pmb { v } \in \prod _ { k \in \mathcal { E } } \mathcal { V } ^ { k } \colon \pmb { v } = ( v _ { k } ( z ) ) _ { k \in \mathcal { E } } , \ z \in \mathcal { Z } \right\} } \end{array}$ for a subset of variables indexed by $\mathcal { E }$ (amounting to $\nu _ { M }$ when $\mathcal { E }$ includes all endogenous variables).
|
| 47 |
+
|
| 48 |
+
This CGM framework allows defining counterfactuals in the network following Pearl (2014).
|
| 49 |
+
|
| 50 |
+
Definition 1 (Unit level counterfactual, informal). Given CGM $M$ , the interventional model $M _ { h }$ is obtained by replacing assignments of the subset variables $\mathcal { E }$ and by the vector of assignments $^ { h }$ . Then for any latent input $_ { z }$ , called unit, the unit-level counterfactual is the output of $M _ { h }$ :
|
| 51 |
+
|
| 52 |
+
$$
|
| 53 |
+
Y _ { h } ^ { \mathcal { E } } = g _ { M _ { h } } ( z ) .
|
| 54 |
+
$$
|
| 55 |
+
|
| 56 |
+
Def. 1 is also in line with the concept of potential outcome (Imbens & Rubin, 2015). Importantly, counterfactuals induce a transformation of the output of the generative model.
|
| 57 |
+
|
| 58 |
+
Definition 2 (Counterfactual mapping). Given an embedded CGM, we call the transformation
|
| 59 |
+
|
| 60 |
+
$$
|
| 61 |
+
\stackrel { \wedge } { Y } _ { h } ^ { \mathcal { E } } : y \mapsto g _ { M _ { h } } \left( g _ { M } ^ { - 1 } ( y ) \right)
|
| 62 |
+
$$
|
| 63 |
+
|
| 64 |
+
the h-counterfactual mapping. We say it is faithful to $M$ whenever $\hat { \vec { Y } } _ { h } ^ { \varepsilon } [ \mathcal { V } _ { M } ] \subset \mathcal { V } _ { M }$ .
|
| 65 |
+
|
| 66 |
+
We introduce faithfulness of a counterfactual mapping to account for the fact that not all interventions on internal variables will result in an output that could have been generated by the original model. In the context of generative model, non-faithful counterfactuals generate examples that leave the support of the distribution learned from data, possibly resulting in an artifactual output (assigning a large value to a neuron may saturate downstream neurons), or allowing extrapolation to unseen data.
|
| 67 |
+
|
| 68 |
+
The classical notion of disentangled representation (e.g. Bengio et al. (2013); Kulkarni et al. (2015)), posits individual latent variables “sparsely encode real-world transformations”. Although the concept of real-world transformations remains elusive, this insight, agnostic to statistical concepts, has driven supervised approaches to disentangling representations, where relevant transformations are well-identified and manipulated explicitly using appropriate datasets and training procedures.
|
| 69 |
+
|
| 70 |
+
In contrast, unsupervised learning approaches to disentanglement need to learn such real-world transformations from unlabeled data. In order to address this challenge, SOTA approaches seek to encode such transformations by changes in individual latent factors, and resort to a statistical notion of disentanglement, enforcing conditional independence between latent factors (Higgins et al., 2017). This statistical approach leads to several issues:
|
| 71 |
+
|
| 72 |
+
• Independence is not necessary. The i.i.d. constraints on the latent variables’ prior impose statistical independence between disentangled factors for the data distribution. This is unlikely for many relevant properties, counfounded by factors of the true data generating mechanisms (e.g. skin and hair color).
|
| 73 |
+
• Independence is not sufficient to specify a disentangled representation, such that the problem remains ill-posed (Locatello et al., 2018). As a consequence, finding an appropriate inductive bias to learn a representation that benefits downstream tasks remains an open question.
|
| 74 |
+
• To date, SOTA unsupervised approaches are mostly demonstrated on synthetic datasets, and beyond MNIST disentangling complex real world data has been limited to the well-calibrated CelebA dataset. On complex real-world datasets, disentangled generative models exhibit visual sample quality far below non-disentangled SOTA (e.g. BigGAN exploited in our work (Brock et al., 2018)).
|
| 75 |
+
|
| 76 |
+
We propose an non-statistical definition of disentanglement by first phrasing mathematically the transformation-based insights (Bengio et al., 2013; Kulkarni et al., 2015). Consider a transformation $T$ acting on the data manifold ${ \mathcal { V } } _ { M }$ . As illustrated by the commutative diagram of Fig. 2c, disentanglement of such property then amounts to having $T$ correspond to a transformation $T ^ { \prime }$ of the latent space that would act only on a single variable $z _ { k }$ , using transformation $f$ , leaving the other latent variables available to encode other properties. More explicitly we have
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
T ^ { \prime } ( z ) : \left( z _ { 1 } , . . , z _ { k } , . . , z _ { K } \right) \mapsto \left( z _ { 1 } , . . , f ( z _ { k } ) , . . , z _ { K } \right) , \quad \mathrm { a n d } \quad T ( g _ { M } ( z ) ) = g _ { M } ( T ^ { \prime } ( z ) ) .
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
It is then natural to qualify two transformations $T _ { 1 }$ and $T _ { 2 }$ as disentangled (from each other), whenever they modify different components of the latent representation (see Def. 10 in Appendix F). This amounts to saying that the transformations follow the causal principle of independent mechanisms (Peters et al., 2017; Parascandolo et al., 2018).
|
| 83 |
+
|
| 84 |
+
Due to the fact that it relies on transformations of the latent representation, that are exogenous to the CGM, we call this notion extrinsic disentanglement. This “functional” definition has the benefit of being agnostic the the subjective choice of the property to disentangle, and to the statistical notion of independence. However, we can readily notice that, if applied to the latent space (where components are i.i.d. distributed), this functional notion of disentangled transformation still entails statistical independence between disentangled factors. We thus need to exploit a different representation to uncover possibly statistically related properties, but disentangled in the sense of our definition.
|
| 85 |
+
|
| 86 |
+
# 2.3 DISENTANGLING BY MANIPULATING INTERNAL REPRESENTATIONS
|
| 87 |
+
|
| 88 |
+
As illustrated in the CGM of Fig. 2b, in contrast to latent variables, properties encoded by endogenous variables of the graphical model are not necessarily statistically independent due to common latent causes $z _ { 1 }$ and $z _ { 2 }$ in the figure), but may still reflect interesting properties of the data that can be intervened on independently, following the principle of independence of mechanisms. We thus extend our definition of disentanglement to allow transformations of the internal variables of the network as follows.
|
| 89 |
+
|
| 90 |
+
Definition 3 (Intrinsic disentanglement, informal). In a CGM $M$ , a transformation $T : \mathcal { V } _ { M } \to$ $\mathcal { V } _ { M }$ is intrinsically disentangled with respect to a subset $\mathcal { E }$ of endogenous variables, if there is $a$ transformation $T ^ { \prime }$ acting on the internal representation space such that for any endogenous value $\pmb { v }$
|
| 91 |
+
|
| 92 |
+
$$
|
| 93 |
+
T ( \widetilde { g } _ { M } ( \pmb { v } ) ) = \widetilde { g } _ { M } ( T ^ { \prime } ( \pmb { v } ) )
|
| 94 |
+
$$
|
| 95 |
+
|
| 96 |
+

|
| 97 |
+
Figure 3: Generation of influence maps. (a) Principle of sample hybridization through counterfactuals. (b) Examples of EIM generated by a VAE on the CelebA dataset (lighter pixel indicate larger variance and thus stronger influence of the perturbations on that pixel).
|
| 98 |
+
|
| 99 |
+
where $T ^ { \prime } ( v )$ only affects the variables indexed by $\mathcal { E }$ .
|
| 100 |
+
|
| 101 |
+
Fig. 2d illustrates this second notion of disentanglement, where the split node indicates that the value of $V _ { 2 }$ is computed as in the original CGM (Fig. 2b) before applying transformation $T ^ { 2 }$ to the outcome. While the above definition applies to a single transformation, straightforward extensions of this concept to families of transformations are provided in Appendix F. Faithful counterfactuals represent examples of disentangled transformations:
|
| 102 |
+
|
| 103 |
+
Proposition 1 (Counterfactuals and disentanglement, informal). Consider an intervention on subset $\mathcal { E }$ , its associated counterfactual mapping is faithful if and only if it is disentangled. For interventions on variables that remain within the support of the original marginal distribution, it is sufficient that $\mathcal { E }$ and its complement $\bar { \mathcal { E } }$ do not have common latent ancestors.
|
| 104 |
+
|
| 105 |
+
This indicates that finding faithful counterfactuals can be used to learn disentangled transformations.
|
| 106 |
+
|
| 107 |
+
# 3 FINDING MODULARITY IN DEEP GENERATIVE MODELS
|
| 108 |
+
|
| 109 |
+
# 3.1 DEFINING MODULARITY
|
| 110 |
+
|
| 111 |
+
Building on Sec. 2, we define modularity as a structural property of the internal representation, allowing (with the immediately following Prop. 2) to implement arbitrary disentangled transformations.
|
| 112 |
+
|
| 113 |
+
Definition 4 (Modularity). A subset of endogenous variables $\mathcal { E }$ is called modular whenever $\nu _ { M }$ is the Cartesian product of $\nu _ { M } ^ { \varepsilon }$ by $\nu _ { { \scriptscriptstyle M } } ^ { \bar { \varepsilon } }$ .
|
| 114 |
+
|
| 115 |
+
Proposition 2 (Modularity implies disentanglement). If $\mathcal { E }$ is modular, then any transformation applied to it staying within its input domain is disentangled.
|
| 116 |
+
|
| 117 |
+
The proof is a natural extension of the proof of Proposition 1. Both the Definition and the Proposition have trivial extensions to multiple modules (along the line described in Appendix F). While we have founded this framework on a functional definition of disentanglement that applies to transformations, the link made here with an structural property of the trained network allows us to define a disentangled representation as follows.
|
| 118 |
+
|
| 119 |
+
Definition 5 (Disentangled representation). A disentangled representation is a partition of the endogenous variables in several modules, such that $\nu _ { M }$ is the Cartesian product of the corresponding endogenous image sets.
|
| 120 |
+
|
| 121 |
+
Then any transformation applied to a given module leads to a valid transformation in the data space (it is relatively disentangled following Def. 10 in Appendix F).
|
| 122 |
+
|
| 123 |
+
Interestingly, a disentangled representation is associated to a partition of the considered set of endogenous variables into modules. This extra requirement was not considered in classical approaches to disentanglement as it was assumed that each single scalar variables could be considered as an independent module. Our framework provides an insight relevant to artificial and biological systems: as the activity of multiple neurons can be strongly tied together, the concept of representation may not be meaningful at the ”atomic��� level of single neurons, but require to group them into modules forming a ”mesoscopic” level, at which each group can be intervened on independently.
|
| 124 |
+
|
| 125 |
+
# 3.2 HYBRIDIZATION AS A DISENTANGLED TRANSFORMATION
|
| 126 |
+
|
| 127 |
+
As stated in Sec. 2, a functional definition of disentanglement, leaves unanswered how to find relevant transformations. Prop. 1 and 2 provide the following hints: (1) Once a modular structure is found in the network, a broad class of disentangled transformations are available, (2) Transformations that stay within their input domain are good candidates of disentanglement, (3) Counterfactual interventions implicitly define transformations. We follow these guidelines by assigning a constant value $\pmb { v } _ { 0 }$ to a subset of endogenous variables $\mathcal { E }$ to define counterfactuals (i.e. $^ { h }$ is a constant function), aiming for faithful ones by constraining ${ \pmb v } _ { 0 }$ to belong to $\nu _ { M } ^ { \varepsilon }$ . To avoid characterizing $\nu _ { M } ^ { \varepsilon }$ , we rely on sampling from the (joint) marginal distribution of the variables in $\mathcal { E }$ .
|
| 128 |
+
|
| 129 |
+
To illustrate the procedure, we consider a standard feed-forward multilayer neural network and choose endogenous variables to be the collection of all output activations of channels of a given layer $\ell$ . Let $\mathcal { E }$ be a subset of these channels, the hybridization procedure, illustrated in Fig. 3a goes as follows. We take two independent examples of the latent variable $z _ { 1 }$ and $z _ { 2 }$ , that will generate two original examples of the output $( { \pmb y } _ { 1 } , { \pmb y } _ { 2 } ) ^ { - } = ( g _ { M } ( z _ { 1 } ) , g _ { M } ( z _ { 2 } ) )$ (that we call Original $^ { l }$ and Original 2). We also memorize the tuple $\pmb { v } ( z _ { 2 } )$ gathering values of variables indexed by $\mathcal { E }$ when generating Original 2, and $\widetilde { \pmb { v } } ( z _ { 1 } )$ the tuple of values taken by all other endogenous variables on this layer, but when egenerating Original 1. Assuming the choice of $\mathcal { E }$ identifies a modular structure, $\widetilde { \pmb { v } } ( \widetilde { \pmb { z } } _ { 1 } )$ and $\pmb { v } ( z _ { 2 } )$ ewould encode different aspects of their corresponding generated images, such that one can generate a hybrid example mixing these features by assigning the collection of output values of layer $\ell$ with the concatenated tuple $( \widetilde { \pmb { v } } ( \pmb { z } _ { 1 } ) , \pmb { v } ( \pmb { z } _ { 2 } ) )$ and feeding it to the downstream part of the generator network.
|
| 130 |
+
|
| 131 |
+
# 3.3 MEASURING CAUSAL EFFECTS
|
| 132 |
+
|
| 133 |
+
The above counterfactual hybridization framework allows assessing how a given module $\mathcal { E }$ affects the output of the generator. For this purpose we quantify its causal effect by repetitively generating pairs $( z _ { 1 } , z _ { 2 } )$ from the latent space, where both vectors are sampled independently of each other. We then generate and collect hybrid outputs following the above described procedure for a batch of samples and use them to estimate an influence map as the mean absolute effect:
|
| 134 |
+
|
| 135 |
+
$$
|
| 136 |
+
I M ( { \mathcal { E } } ) = \mathbb { E } _ { z _ { 2 } \sim P ( \mathbf { Z } ) } \mathbb { E } _ { z _ { 1 } \sim P ( \mathbf { Z } ) } \left| Y _ { v ( z _ { 2 } ) } ^ { \mathcal { E } } ( z _ { 1 } ) - Y ( z _ { 1 } ) \right|
|
| 137 |
+
$$
|
| 138 |
+
|
| 139 |
+
where $Y ( z _ { 1 } ) = g _ { M } ( z _ { 1 } )$ is the non-intervened output of the generator for latent input $z _ { 1 }$ . In eq. 2, the difference inside the absolute value can be interpreted as a unit-level causal effect in the potential outcome framework (Imbens $\&$ Rubin, 2015), and taking the expectation is analogous to computing the average treatment effect. Our approach has however two specificities: (1) we take the absolute value of the unit-level causal effects, as their sign may not be consistent across units, (2) the result is averaged over all interventions corresponding to possible values of $z _ { 2 }$ .
|
| 140 |
+
|
| 141 |
+
While IM has the same dimension as the output image, we then average it across color channels to get a single grayscale heat-map pixel map. We also define a scalar quantity to quantify the magnitude of the causal effect, the individual influence of module $\mathcal { E }$ , by averaging $I M$ across output pixels.
|
| 142 |
+
|
| 143 |
+
# 3.4 UNSUPERVISED DETECTION OF MODULES AND COUNTERFACTUAL IMAGES
|
| 144 |
+
|
| 145 |
+
A challenge with the hybridization approach is to select the subsets $\mathcal { E }$ to intervene on, especially with networks containing a large amount of units or channels per layer. We use a fine to coarse approach to extract such groups, that we will describe in the context of convolutional layers. First, we estimate elementary influence maps (EIM) associated to each individual output channel $c$ of each convolutional layer of the network (i.e. we set ${ \mathcal { E } } = \{ c \}$ in eq. (2)). Then influence maps are grouped by similarity to define modules at a coarser scale, as we will describe in detail below.
|
| 146 |
+
|
| 147 |
+
Representative EIMs for channels of convolutional layers of a VAE trained on the CelebA face dataset (see result section) are shown in Supplementary Fig. 3b and suggest channels are functionally segregated, with for example some influencing finer face feature (eyes, mouth,...) and others affecting the background of the image or the hair. This supports the idea that individual channels can be grouped into modules that are mostly dedicated to one particular aspect of the output.
|
| 148 |
+
|
| 149 |
+
In order to achieve this grouping in an unsupervised way, we perform clustering of channels using their EIMs as feature vectors as follows. We first pre-process each influence map by: (1) performing a local averaging with a small rectangular sliding window to smooth the maps spatially, (2) thresholding the resulting maps at the $7 5 \%$ percentile of the distribution of values over the image to get a binary image. After flattening image dimensions, we get a (channel $\times$ pixels) matrix S which is then fed to a Non-negative Matrix Factorization (NMF) algorithm with manually selected rank $K$ , leading to the factorization $\mathbf { S } = \mathbf { W } \mathbf { H }$ . From the two resulting factor matrices, we get the $K$ cluster template patterns (by reshaping each rows of $\mathbf { H }$ to image dimensions), and the weights representing the contribution of each of these pattern to individual maps (encoded in W). Each influence map is then ascribed a cluster based on which template pattern contributes to it with maximum weight. The choice of NMF is justified by its success in isolating meaningful parts of images in different components (Lee & Seung, 1999). However, we also compared our approach to the classical $\mathbf { k }$ -means clustering algorithm (see Supplementary Fig. 9). In order to further justify our NMF based approach, we also introduce a toy generative model.
|
| 150 |
+
|
| 151 |
+
Model 1. Consider $z$ a vector of $K$ i.i.d. uniformly distributed RVs. Assume a neural network with one hidden layers composed of m vector variables $V _ { k }$ such that
|
| 152 |
+
|
| 153 |
+
$$
|
| 154 |
+
V _ { k } = S ( { \cal H } _ { k } Z _ { k } ) ,
|
| 155 |
+
$$
|
| 156 |
+
|
| 157 |
+
with $H _ { k } \in \mathbb { R } ^ { n }$ , $n > 1$ and $S$ a strictly increasing activation function applied entry-wise to the components of each vector (e.g. a leaky ReLU). These endogenous variables are mapped to the output
|
| 158 |
+
|
| 159 |
+
$$
|
| 160 |
+
Y = \sum _ { k = 1 } ^ { K } W ^ { k } V _ { k } ,
|
| 161 |
+
$$
|
| 162 |
+
|
| 163 |
+
with matrices $W ^ { k } \in \mathbb { R } ^ { m \times n }$ , $m > n K$ . Assume additionally the following random choice for the model parameters: $( l )$ all coefficients of $\pmb { H } _ { k }$ ’s are sampled i.i.d. from an arbitrary distribution that has a density with respect to the Lebesgue measure, (2) there exists $K$ sets of indices $I _ { k }$ over $[ 1 , m ]$ each containing at least one element $l _ { k } \in I _ { k }$ such that for all $j \neq k , l _ { k } \notin I _ { j } ,$ (3) For a given column of $\pmb { W } ^ { k }$ , coefficient in $I _ { k }$ are sampled i.i.d. from an arbitrary distribution that has a density with respect to the Lebesgue measure, while the remaining coefficients are set to zero.
|
| 164 |
+
|
| 165 |
+
The specific condition on the $I _ { k }$ ’s enforced in (2) encodes the assumption that there is an area in the image that is only influenced by one of the modules. For example, assuming a simple background/object module pair, it encodes that the borders of the image never belong to the object while the center of the image never belong to background. For this model, we get the following identifiability result.
|
| 166 |
+
|
| 167 |
+
Proposition 3. For Model 1, with probability $I$ we have:
|
| 168 |
+
(1) The partition of the hidden layer entailed by the $K$ vectors $\{ V _ { k } \}$ corresponds to a disentangled representation (i.e. each vector is modular relatively to the others).
|
| 169 |
+
(2) Assume influence maps $I M ( i , k )$ of each component $i$ in each vector $V _ { k }$ are known and build the $( m \times n K )$ binary matrix $\textbf { { B } }$ by concatenating binary column vectors $B _ { i , k } = I M ( i , k ) > 0 .$ . Non-negative matrix factorization of $\textbf { { B } }$ is unique (up to trivial transformations) and identifies the subsets of endogenous variables associated to each $V _ { k }$ .
|
| 170 |
+
|
| 171 |
+
This justifies the use of NMF on a thresholded version of the matrix gathering all EIMs (to generate a binary matrix summarizing their significant influences on each output pixel). Moreover, the application of the sliding window is justified in order to enforce the similarity between the influence maps belonging to the same module, reflected by the condition on identical support $I _ { k }$ for all columns of $\dot { \boldsymbol { W } } ^ { k }$ in Model 1, and favoring low-rank matrix factorization.
|
| 172 |
+
|
| 173 |
+

|
| 174 |
+
Figure 4: Left: Clustering of influence maps for a BEGAN trained on the CelebA dataset (see text). Center: example EIM of each cluster. Right: samples of the hybridization procedure using as module all channels of the intermediate layer belonging to the cluster of corresponding row. See Fig. 12 for additional samples.
|
| 175 |
+
|
| 176 |
+
# 4 EXPERIMENTS
|
| 177 |
+
|
| 178 |
+
# 4.1 DCGAN, $\beta$ -VAE AND BEGAN ON THE CELEBA DATASET
|
| 179 |
+
|
| 180 |
+
We first investigated modularity of genrative models trained on the CelebFaces Attributes Dataset (CelebA)(Liu et al., 2015) and used a basic architecture: a plain $\beta$ -VAE 2 (Higgins et al., 2017). We ran the full procedure described in Sec. 3, comprised of EIM calculations, clustering of channels into modules, and hybridization of generator samples using these modules. Hybridization procedures were performed by intervening on the output of the intermediate convolutional layer (indicated in Supplemental Fig. 7). The results are summarized in Supplemental Fig. 8. We observed empirically that setting the number of clusters to 3 leads consistently to highly interpretable cluster templates as illustrated in the figure, with one cluster associated to the background, one to the face and one to the hair. This observation was confirmed by running the following cluster stability analysis: we partition at random the influence maps in 3 subsets, and we use this partition to run the clustering twice on two thirds of the data, both runs overlapping only on one third. The obtained clusters were then matched in order to maximize the label consistency (the proportion of influence maps assigned the same label by both runs) on the overlapping subset, and this maximum consistency was used to assess robustness of the clustering across the number of clusters. The consistency results are provided in Supplemental Fig. 9 and show 3 clusters is a reasonable choice as consistency is large $( > 9 0 \% )$ and drops considerably for 4 clusters. Moreover, these results also show that the NMF-based clustering outperforms clustering with the more standard $\mathbf { k }$ -means algorithm. In addition, we also assessed the robustness of the clustering by looking at the cosine distance between the templates associated to matching clusters, averaged across clusters. The results, also provided in Supplemental Fig. 9, are consistent with the above analysis with an average cosine similarity of .9 (scalar product between the normalized feature vectors) achieved with 3 clusters (maximum similarity is 1 for perfectly identical templates). Exemplary influence maps shown in Supplemental Fig. 8 (center panel) reflect also our general observation: some maps may spread over image locations reflecting different clusters.
|
| 181 |
+
|
| 182 |
+
Interestingly, applying the hybridization procedure to the resulting 3 modules obtained by clustering leads to a replacement of the features associated to the module we intervene on, as shown in Supplemental Fig. 8 (center panel), while respecting the overall structure of the image (no discontinuity introduced). For example, on the middle row we see the facial features of the Original 2 samples are inserted in the Original 1 image (shown on the left), while preserving the hair.
|
| 183 |
+
|
| 184 |
+
While the $\beta$ -VAE is designed for extrinsic disentanglement, further work has shown that it can prove suboptimal with respect to other approaches (Chen et al., 2018; Locatello et al., 2018) suggesting further work could investigate whether better extrinsic disentanglement could also favor intrinsic disentanglement. It is however important to investigate intrinsic disentanglement in models for which (extrinsic) disentanglement is not enforced explicitly. This is in particular the case of most GAN-like architectures, who typically outperform VAE-like approaches in terms of sample quality in complex image datasets. Interestingly, the above results could also be reproduced in the official tensorlayer DCGAN implementation3, equipped with a similar architecture (see Appendix E). This suggests that our approach can be applied to models that have not been optimized for disentanglement. After these experiments with basic models, we used an implementation4 of the Boundary Equilibrium GAN (BEGAN) (Berthelot et al., 2017), which used to set a milestone in visual quality for higher resolution face images. Most likely due to the increase in the number of layers, we observed that obtaining counterfactuals with noticeable effects required interventions on channels from the same cluster in two successive layers (see Appendix D). The results shown in Fig. 4, obtained by intervening on layers 5 and 6, reveal a clear selective transfer of features from Original 2 to Original 1. As the model was trained on face images cropped with a tighter frame than for the above models, leaving little room for the hair and background, we observe only one module associated to these features (Fig. 4, middle row) showing a clear hair transfer. The remaining two modules are now encoding different aspects of face features: eye contour/mouth/nose for the top row and eyelids/face shape for the bottom row module. We further evaluated the relative quality of the counterfactual images with respect to the original generated images using the Frechet Inception Distance (FID) (Heusel et al., 2017) (Table 2 in the appendix), supporting that the hybridization procedure only mildly affects the image quality, in comparison to the original samples.
|
| 185 |
+
|
| 186 |
+
# 4.2 BIGGAN ON THE IMAGENET DATASET
|
| 187 |
+
|
| 188 |
+
In order to check whether our approach could scale to high resolution generative models, and generalize to complex image datasets containing a variety of objects, we used the BigGAN-deep architecture (Brock et al., 2018), pretrained5 on the ImageNet dataset6. This is a conditional GAN architecture comprising 12 so-called Gblocks, each containing a cascade of 4 convolutional layers (see Appendix C for details). Each Gblock also receives direct input from the latent variables and the class label, and is bypassed by a skip connection. We then checked that we were able to generate hybrids by mixing the features of different classes. As for the case of BEGAN, intervening on two successive layers within a Gblock was more effective to generate counterfactuals (examples are provided for the 7th Gblock). Examples provided in Fig. 5 (cock-ostrich) show that it is possible to generate high quality counterfactuals with modified background while keeping a very similar object in the foreground. In a more challenging situation, with objects of different nature (Koala-teddy bear on the same figure), meaningful combinations of each original samples are still generated: e.g. a teddy bear in a tree (bottom row), or a “teddy-koala” merging teddy texture with the color of a koala on a uniform indoor background with a wooden texture (top row).
|
| 189 |
+
|
| 190 |
+
In order to investigate how the generated counterfactual images can be used to probe and improve the robustness of classifiers to contextual changes, we compared the ability of several SOTA pretrained classifier available on Tensorflow-hub (https://tfhub.dev/, see Appendix C for details) to recognize one of the original classes. Fig. 6 shows the average recognition rate of the most recognized original class (teddy-bear or koala), as a function of layer depth tends overall to increase. We first observe that high recognition rates are in line with the small pixel distance between hybrids and original when intervening at layers closest to the output (right panel). Interestingly, at intermediate blocks 5-6, there is a clear contrast between classifiers, with the Inception resnet performing better than the others. Interestingly, examples of non-consensual classification results in Supplementary Table 3, together with the associated hybrids (Supplementary Fig. 17) suggest different SOTA classifiers rely on different aspects of the image content to take their decision (e.g. background versus object).
|
| 191 |
+
|
| 192 |
+

|
| 193 |
+
Figure 5: Examples of BigGAN hybridizations across classes. Left: ostrich-cock, right: koala-teddy. See Figs. 13-15 for additional samples and Fig. 14-16 for entropy analysis.
|
| 194 |
+
|
| 195 |
+

|
| 196 |
+
Figure 6: Analysis of classifier robustness to counterfactual changes (bars indicate standard error).
|
| 197 |
+
|
| 198 |
+
# CONCLUSION
|
| 199 |
+
|
| 200 |
+
We introduced a mathematical definition of disentanglement, related it to the causal notion of counterfactual and used it for the unsupervised characterization of the representation encoded by different groups of channels in deep generative architectures. We found evidence for interpretable modules of internal variables in four different generative models trained on two complex real world datasets. Our framework opens a way to a better understanding of complex generative architectures and applications such as the style transfer (Gatys et al., 2015) of controllable properties of generated images at low computational cost (no further optimization is required), and the automated assessment of robustness of object recognition systems to contextual changes. From a broader perspective, this research direction contributes to a better exploitation of deep neural networks obtained by costly and highly energy-consuming training procedures, by (1) enhancing their interpretability and (2) allowing them to be used for tasks their where not trained for. This offers a perspective on how more sustainable research in Artificial Intelligence could be fostered in the future.
|
| 201 |
+
|
| 202 |
+
# 4.3 APPENDICES AND IMPLEMENTATIONS
|
| 203 |
+
|
| 204 |
+
Appendices and supplementary Figures and Tables are available online with the arXiv version of this paper (https://arxiv.org/abs/1812.03253). Implementations are available on the companion website https://gitlab.tuebingen.mpg.de/besserve/ deepcounterfactuals.
|
| 205 |
+
|
| 206 |
+
# REFERENCES
|
| 207 |
+
|
| 208 |
+
M. A. Armstrong. Basic topology. Springer Science & Business Media, 2013.
|
| 209 |
+
D. Bau, J.-Y. Zhu, H. Strobelt, B. Zhou, J. B. Tenenbaum, W. T. Freeman, and A. Torralba. Gan dissection: Visualizing and understanding generative adversarial networks. arXiv preprint arXiv:1811.10597, 2018.
|
| 210 |
+
Y Bengio, A Courville, and P Vincent. Representation learning: A review and new perspectives. IEEE transactions on pattern analysis and machine intelligence, 35(8):1798–1828, 2013.
|
| 211 |
+
|
| 212 |
+
D. Berthelot, T. Schumm, and L. Metz. Began: Boundary equilibrium generative adversarial networks. arXiv preprint arXiv:1703.10717, 2017.
|
| 213 |
+
|
| 214 |
+
M. Besserve, N. Shajarisales, B. Scholkopf, and D. Janzing. Group invariance principles for causal ¨ generative models. In AISTATS, 2018a.
|
| 215 |
+
|
| 216 |
+
M. Besserve, R. Sun, and B. Scholkopf. Intrinsic disentanglement: an invariance view for deep ¨ generative models. In Workshop on Theoretical Foundations and Applications of Deep Generative Models at ICML, 2018b.
|
| 217 |
+
|
| 218 |
+
A. Brock, J. Donahue, and K. Simonyan. Large scale GAN training for high fidelity natural image synthesis. arXiv preprint arXiv:1809.11096, 2018.
|
| 219 |
+
|
| 220 |
+
Tian Qi Chen, Xuechen Li, Roger B Grosse, and David K Duvenaud. Isolating sources of disentanglement in variational autoencoders. In Advances in Neural Information Processing Systems, pp. 2610–2620, 2018.
|
| 221 |
+
|
| 222 |
+
X. Chen, Y. Duan, R. Houthooft, J. Schulman, I. Sutskever, and P. Abbeel. Infogan: Interpretable representation learning by information maximizing generative adversarial nets. In Advances in Neural Information Processing Systems, pp. 2172–2180, 2016.
|
| 223 |
+
|
| 224 |
+
M. Diop, A. Larue, S. Miron, and D. Brie. A post-nonlinear mixture model approach to binary matrix factorization. In 25th European Signal Processing Conference (EUSIPCO), pp. 321–325. IEEE, 2017.
|
| 225 |
+
|
| 226 |
+
A. Dosovitskiy and T. Brox. Inverting visual representations with convolutional networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 4829–4837, 2016.
|
| 227 |
+
|
| 228 |
+
N. Dvornik, J. Mairal, and C. Schmid. Modeling visual context is key to augmenting object detection datasets. In Proceedings of the European Conference on Computer Vision (ECCV), pp. 364–380, 2018.
|
| 229 |
+
|
| 230 |
+
R. C. Fong and A. Vedaldi. Interpretable explanations of black boxes by meaningful perturbation. arXiv preprint arXiv:1704.03296, 2017.
|
| 231 |
+
|
| 232 |
+
L. A. Gatys, A. S. Ecker, and M. Bethge. A neural algorithm of artistic style. arXiv preprint arXiv:1508.06576, 2015.
|
| 233 |
+
|
| 234 |
+
I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. In Advances in neural information processing systems, pp. 2672–2680, 2014.
|
| 235 |
+
|
| 236 |
+
K. Grill-Spector and R. Malach. The human visual cortex. Annu. Rev. Neurosci., 27:649–677, 2004.
|
| 237 |
+
|
| 238 |
+
M. Heusel, H. Ramsauer, T. Unterthiner, B. Nessler, G. Klambauer, and S. Hochreiter. Gans trained by a two time-scale update rule converge to a nash equilibrium. arXiv preprint arXiv:1706.08500, 2017.
|
| 239 |
+
|
| 240 |
+
I. Higgins, L. Matthey, A. Pal, C. Burgess, X. Glorot, M. Botvinick, S. Mohamed, and A. Lerchner. beta-VAE: Learning basic visual concepts with a constrained variational framework. In ICLR 2017, 2017.
|
| 241 |
+
|
| 242 |
+
I. Higgins, D. Amos, D. Pfau, S. Racaniere, L. Matthey, D. Rezende, and A. Lerchner. Towards a definition of disentangled representations. arXiv preprint arXiv:1812.02230, 2018.
|
| 243 |
+
|
| 244 |
+
G. W. Imbens and D. B. Rubin. Causal inference in statistics, social, and biomedical sciences. Cambridge University Press, 2015.
|
| 245 |
+
|
| 246 |
+
D. P. Kingma and M. Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013.
|
| 247 |
+
|
| 248 |
+
T. D. Kulkarni, W. F. Whitney, P. Kohli, and J. Tenenbaum. Deep convolutional inverse graphics network. In NIPS, pp. 2539–2547, 2015.
|
| 249 |
+
|
| 250 |
+
D. D. Lee and H. S. Seung. Learning the parts of objects by non-negative matrix factorization. Nature, 401(6755):788–791, 1999.
|
| 251 |
+
|
| 252 |
+
Z. Liu, P. Luo, X. Wang, and X. Tang. Deep learning face attributes in the wild. In Proceedings of International Conference on Computer Vision (ICCV), 2015.
|
| 253 |
+
|
| 254 |
+
F. Locatello, S. Bauer, M. Lucic, S. Gelly, B. Scholkopf, and O. Bachem. Challenging com- ¨ mon assumptions in the unsupervised learning of disentangled representations. arXiv preprint arXiv:1811.12359, 2018.
|
| 255 |
+
|
| 256 |
+
M. F. Mathieu, J. J. Zhao, A. Ramesh, P. Sprechmann, and Y. LeCun. Disentangling factors of variation in deep representation using adversarial training. In Advances in Neural Information Processing Systems, pp. 5041–5049, 2016.
|
| 257 |
+
|
| 258 |
+
G. Parascandolo, N. Kilbertus, M. Rojas-Carulla, and B. Scholkopf. Learning independent causal ¨ mechanisms. In ICML, pp. 4036–4044, 2018.
|
| 259 |
+
|
| 260 |
+
J. Pearl. Causality. Cambridge university press, second edition, 2009.
|
| 261 |
+
|
| 262 |
+
J. Pearl. The causal foundations of structural equation modeling. In Rick H. Hoyle (ed.), Handbook of Structural Equation Modeling, chapter 5. Guilford Press, 2014.
|
| 263 |
+
|
| 264 |
+
J. Peters, D. Janzing, and B. Scholkopf. ¨ Elements of Causal Inference – Foundations and Learning Algorithms. MIT Press, 2017.
|
| 265 |
+
|
| 266 |
+
A. Radford, L. Metz, and S. Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015.
|
| 267 |
+
|
| 268 |
+
D. J. Rezende, S. Mohamed, and D. Wierstra. Stochastic backpropagation and approximate inference in deep generative models. arXiv preprint arXiv:1401.4082, 2014.
|
| 269 |
+
|
| 270 |
+
M. S. M. Sajjadi, O. Bachem, M. Lucic, O. Bousquet, and S. Gelly. Assessing generative models via precision and recall. arXiv preprint arXiv:1806.00035, 2018.
|
| 271 |
+
|
| 272 |
+
R. Suter, D. Miladinovic, B. Sch ´ olkopf, and S. Bauer. Robustly disentangled causal mechanisms: ¨ Validating deep representations for interventional robustness. arXiv preprint arXiv:1811.00007, 2018.
|
| 273 |
+
|
| 274 |
+
M. D. Zeiler and R. Fergus. Visualizing and understanding convolutional networks. In European conference on computer vision, pp. 818–833. Springer, 2014.
|
| 275 |
+
|
| 276 |
+
Q. Zhang, R. Cao, Y. Wu, and S. Zhu. Growing interpretable part graphs on convnets via multi-shot learning. In AAAI, pp. 2898–2906, 2017a.
|
| 277 |
+
|
| 278 |
+
Q. Zhang, W. Wang, and S. Zhu. Examining CNN representations with respect to dataset bias. arXiv preprint arXiv:1710.10577, 2017b.
|
| 279 |
+
|
| 280 |
+
# Supplementary information
|
| 281 |
+
|
| 282 |
+
APPENDIX A: FORMAL DEFINITIONS AND RESULTS FOR CAUSAL GENERATIVE MODELS (SECTION 2)
|
| 283 |
+
|
| 284 |
+
We rely on the assumption that a trained generator architecture can be exploited as a mechanistic model, such that parts of this model can be manipulated independently. A mathematical representation of such models can be given using structural causal models (SCMs, that rely on structural equations (SEs) of the form $Y : = f ( X _ { 1 } , X _ { 2 } , \cdots , X _ { N } , \epsilon )$ , denoting the assignment of a value to variable $Y$ , computed from the values of other variables $X _ { k }$ in the system under consideration, and of putative exogenous influences $\epsilon$ , imposed by factors outside the system under study. As in the above equation, we will use uppercase letters to indicate variables being the outcome of a structural assignment, while specific values taken by them will be lower case. SEs stay valid even if right-hand side variables undergo a change due to interventions (Pearl, 2009; Peters et al., 2017, e.g.), and can model the operations performed in computational graphs of modern neural network implementations. Such graphs then depict SCMs made of interdependent modules, for which assignments’ dependencies are represented by a directed acyclic graph $\mathcal { G }$ . Without loss of generality, we introduce a Causal Generative Model (CGM) $M$ capturing the computational relations between a selected subset of variables comprising: (1) the input latent variables $\left\{ z _ { k } \right\}$ , (2) the generator’s output $Y$ (typically multidimensional), and (3) a collection of possibly multi-dimensional endogenous (internal) variables forming an intermediate representation such that the generator’s output can be decomposed into two successive steps as $\{ \bar { Z _ { k } } \} \mapsto \{ V _ { k } \} \mapsto Y$ . In a feed-forward neural network, one $V _ { k }$ may for instance represent one channel of the output of a convolutional layer (e.g. after application of the ReLU non-linearity).
|
| 285 |
+
|
| 286 |
+
Definition 6 (Causal Generative Model (CGM)). Given $K$ real-valued latent variables $z = \left( z _ { k } \right)$ taking arbitrary values on domain $\begin{array} { r } { \mathcal { Z } = \prod _ { k = 1 } ^ { K } \mathcal { Z } _ { k } } \end{array}$ , where all $\mathcal { Z } _ { k }$ ’s are closed intervals, the CGM $M = \mathbb { G } ( \mathcal { Z } , S , \mathcal { G } )$ comprises a directed acyclic graph $\mathcal { G }$ and a set $s$ of $N + 1$ deterministic continuous structural equations that assign:
|
| 287 |
+
|
| 288 |
+
• $N$ endogenous variables $\{ V _ { k } : = f _ { k } ( \pmb { P } \pmb { a } _ { k } ) \} _ { k = 1 , . . N }$ taking values in Euclidean spaces $( \gamma ^ { k } ) _ { k = 1 \ldots N }$ based on their endogenous or latent parents $\mathbf { \mathit { P a } } _ { k }$ in $\mathcal { G }$ , 7 • one output $Y : = f _ { y } ( P a _ { y } )$ taking values in Euclidean space $\mathcal { V }$ , parents $P a _ { y }$ in $\mathcal { G }$ being endogenous.
|
| 289 |
+
|
| 290 |
+
Moreover, $z _ { k }$ ’s are the only sources and $Y$ is the only sink.8
|
| 291 |
+
|
| 292 |
+
The graph of an example CGM is exemplified on Fig. 2b, consisting of 3 endogenous variables, 2 latent inputs and the output. This aligns with the definition of a deterministic structural causal model by Pearl (2009, chapter 7), once our latent variables are identified with exogenous ones. CGMs have however specificities reflecting the structure of models encountered in practice. For instance, variable assignments may or may not involve latent/exogenous variables in their right-hand side, which is unusual in causal inference. This allows modeling feed-forward networks consisting in a first layer receiving latent inputs followed by a cascade of deterministic operations in downstream layers. The above definition guaranties several basic properties found in the computational graph of existing generative networks: (1) all endogenous variables $V _ { k }$ are unambiguously assigned once $_ z$ is chosen, (2) the output $Y$ is unambiguously assigned once either $_ z$ is chosen, or, alternatively, if an appropriate subset of $V _ { k }$ ’s, such as $\mathbf { P a } _ { y }$ , is assigned. This allows us to introduce several useful mappings.
|
| 293 |
+
|
| 294 |
+
In an ideal case, while the support of the latent distribution covers the whole latent space $\mathcal { Z }$ , internal variables and outputs typically live on manifolds of smaller dimension than their ambient space. These can be defined as the images9 of $\mathcal { Z }$ by operations of the graph: the output image $\mathcal { V } _ { M } ~ = ~ Y [ \mathcal { Z } ]$ , the endogenous images $\mathcal { V } _ { M } ^ { k } \ = \ V _ { k } [ \mathcal { Z } ]$ for a single variable, $\nu _ { M } ^ { \varepsilon } =$ $\begin{array} { r } { \left\{ \pmb { v } \in \prod _ { k \in \mathcal { E } } \mathcal { V } ^ { k } : \pmb { v } = ( v _ { k } ( z ) ) _ { k \in \mathcal { E } } , z \in \mathcal { Z } \right\} } \end{array}$ for a subset of variables indexed by $\mathcal { E }$ , and $\nu _ { M }$ when $\mathcal { E }$ includes all endogenous variables.
|
| 295 |
+
|
| 296 |
+
Functions assigning $Y$ from latent variables and from endogenous variables, respectively, are
|
| 297 |
+
|
| 298 |
+
$$
|
| 299 |
+
g _ { M } : \begin{array} { c c c c c c c c c } { \mathcal { Z } } & { \to } & { \mathcal { Y } _ { M } , } & & & & & { \mathcal { V } _ { M } } & { \to } & { \mathcal { Y } _ { M } , } \\ { \pmb { \mathscr { z } } } & { \mapsto } & { Y ( \pmb { \mathscr { z } } ) } & & { \mathrm { a n d } } & { \tilde { g } _ { M } : } & { \pmb { \mathscr { v } } } & { \mapsto } & { Y ( \pmb { \mathscr { v } } ) , } \end{array}
|
| 300 |
+
$$
|
| 301 |
+
|
| 302 |
+
and we call them latent and endogenous mappings, respectively. Given the typical choice of dimensions for latent and endogenous variables, the $V _ { k }$ ’s and $Y$ are constrained to take values in subsets of their euclidean ambient space. We will assume that $\tilde { g } _ { M }$ and $g _ { M }$ define proper embeddings, in particular implying that they are both invertible. We call a CGM satisfying these assumptions an embedded CGM.
|
| 303 |
+
|
| 304 |
+
With this vocabulary we can for example verify the example of Fig. 2b contains exactly two layers (in green). Note $g _ { M }$ and $\tilde { g } _ { M }$ are well defined because the output can be unambiguously computed from their inputs by successive assignments along $\mathcal { G }$ , and are both surjective due to appropriate choices for domains and codomains. All defined image sets ( $\nu _ { \ : M } ^ { \ell }$ , $\mathcal { D } _ { M } , . . . )$ are constrained by the parameters of $M$ , and are typically not easy to characterize. For example $\nu _ { M }$ is likely a strict subset of the Cartesian product $\Pi _ { k } \dot { \mathcal { V } } _ { M } ^ { k }$ .
|
| 305 |
+
|
| 306 |
+
Importantly, the image set ${ \mathcal { V } } _ { M }$ of a trained model is of particular significance, as it should approximate at best the support of the data distribution we want to model. Learning the generator parameters such that ${ \mathcal { V } } _ { M }$ precisely matches the support of the target data distribution is arguably a major goal for generative models (see e.g. Sajjadi et al. (2018)).
|
| 307 |
+
|
| 308 |
+
As we will manipulate properties of the output, we restrict ourselves to transformations that respect the topology of ${ \mathcal { V } } _ { M }$ , and use embeddings as the basic structure for it, allowing inversion of $g _ { M }$ .
|
| 309 |
+
|
| 310 |
+
Definition 7 (Embedded CGMs). If $f : X \to Y$ is a continuous injective function with continuous inverse $f ^ { - 1 } : f [ X ] \to Y$ , we call $f$ an embedding of $X$ in $Y$ . We say that a CGM M is embedded $i f$ $g _ { M }$ and $\tilde { g } _ { M }$ are respective embeddings of $\mathcal { Z }$ and $\nu _ { M }$ in $\mathcal { V }$ .
|
| 311 |
+
|
| 312 |
+
Since Definition 6 imposes continuous structural equations,which is satisfied for all operations in standard generative models, injectivity of $g _ { M }$ is the key additional requirement for embedded CGMs.
|
| 313 |
+
|
| 314 |
+
Proposition 4. If $\mathcal { Z }$ of CGM $M$ is compact (all $\mathcal { Z } _ { k }$ ’s are bounded), then $M$ is embedded if and only if gM is injective.
|
| 315 |
+
|
| 316 |
+
Proof is provided in Appendix B. This implies that generative models based on uniformly distributed latent variables (the case of many GANs), provided they are injective, are embedded CGMs. While VAEs’ latent space is typically not compact (due to the use of normally distributed latent variables), we argue that restricting it to a product of compact intervals (covering most of the probability mass) will result in an embedded CGM that approximates the original one for most samples.
|
| 317 |
+
|
| 318 |
+
Based on this precise framework, we can now provide the formal definitions and results described informally in main text.
|
| 319 |
+
|
| 320 |
+
The CGM framework allows defining counterfactuals in the network following Pearl (2014).
|
| 321 |
+
|
| 322 |
+
Definition 8 (Unit level counterfactual). Given CGM M, for a subset of endogenous variables $\boldsymbol { \mathcal { E } } ~ = ~ \{ e _ { 1 } , . . , e _ { n } \}$ , and assignment $^ { h }$ of these variables, we define the interventional CGM $M _ { h }$ obtained by replacing structural assignments for $\mathbf { V } _ { | \mathcal { E } }$ by assignments $\{ V _ { e _ { k } } : = h _ { k } ( z ) \} _ { e _ { k } \in \mathcal { E } }$ . Then for a given value $_ z$ of the latent variables, called unit, the unit-level counterfactual is the output of $M _ { h }$ : $Y _ { h } ^ { \overline { { \mathcal { E } } } } ( z ) = g _ { M _ { h } } ( z )$ .
|
| 323 |
+
|
| 324 |
+
Definition 8 is also in line with the concept of potential outcome (Imbens & Rubin, 2015). Importantly, conterfactuals induce a transformation of the output of the generative model.
|
| 325 |
+
|
| 326 |
+
Definition 2 (Counterfactual mapping). Given an embedded CGM, we call the continuous map
|
| 327 |
+
|
| 328 |
+
$$
|
| 329 |
+
\widehat { \cal Y } _ { h } ^ { \varepsilon } : y \mapsto { \cal Y } _ { h } ^ { \varepsilon } \left( g _ { M } ^ { - 1 } ( y ) \right)
|
| 330 |
+
$$
|
| 331 |
+
|
| 332 |
+
the $( \mathcal { E } , h )$ -counterfactual mapping. We say it is faithful to $M$ whenever $\hat { \mathcal { Y } } _ { h } ^ { \mathcal { E } } [ \mathcal { Y } _ { M } ] \subset \mathcal { Y } _ { M } .$ .
|
| 333 |
+
|
| 334 |
+
Our approach then relates counterfactuals to a form of disentanglement allowing transformations of the internal variables of the network as follows.
|
| 335 |
+
|
| 336 |
+
Definition 3 (Intrinsic disentanglement). In a CGM $M$ , endomorphism $T : \mathcal { V } _ { M } \to \mathcal { V } _ { M }$ is intrinsically disentangled with respect to a subset $\mathcal { E }$ of endogenous variables, if it exists a transformation $T ^ { \prime }$ of endogenous variables such that for any latent $z \in { \mathcal { Z } }$ , leading to the tuple of values $\pmb { v } \in \pmb { \nu } _ { M }$ ,
|
| 337 |
+
|
| 338 |
+
$$
|
| 339 |
+
T ( Y ( \pmb { v } ) ) = Y ( T ^ { \prime } ( \pmb { v } ) )
|
| 340 |
+
$$
|
| 341 |
+
|
| 342 |
+
where $T ^ { \prime } ( v )$ only affects the variables indexed by $\mathcal { E }$ .
|
| 343 |
+
|
| 344 |
+
In this definition, $Y ( v )$ corresponds to the unambiguous assignment of $Y$ based on endogenous values.10 Fig. 2d illustrates this second notion of disentanglement, where the split node indicates that the value of $V _ { 2 }$ is computed as in the original CGM (Fig. 2b) before applying transformation $T ^ { 2 }$ to the outcome.
|
| 345 |
+
|
| 346 |
+
Intrinsic disentanglement relates to a causal interpretation of the generative model’s structure in the sense that it expresses a form of robustness to perturbation of one of its subsystems. Counterfactuals represent examples of such perturbations, and as such, may be disentangled given their faithfulness.
|
| 347 |
+
|
| 348 |
+
Proposition 1 (Counterfactuals and disentanglement, formal). For an embedded CGM $M$ and yE
|
| 349 |
+
continuous assignment $^ { h }$ , the $( \mathcal { E } , h )$ -counterfactual mapping $Y _ { h }$ is faithful if and only if it is
|
| 350 |
+
intrinsically disentangled with respect to subset $\mathcal { E }$ . Moreover, i $f h [ \mathcal { Z } ] \subset \mathcal { V } _ { M } ^ { \mathcal { E } }$ , it is sufficient that $\mathcal { E }$
|
| 351 |
+
and $\bar { \mathcal { E } }$ do not have common latent ancestors for $\hat { \boldsymbol Y } _ { h } ^ { \varepsilon }$ to be faithful.
|
| 352 |
+
|
| 353 |
+
The proof is provided in Appendix B.
|
| 354 |
+
|
| 355 |
+
# APPENDIX B: ADDITIONAL DETAILS FOR SECTION 2 AND 3
|
| 356 |
+
|
| 357 |
+
TOPOLOGICAL CONCEPTS
|
| 358 |
+
|
| 359 |
+
Continuity. We recall the classical definition of continuity of $f : X \to Y$ . Given the respective topologies $\tau _ { X }$ and $\tau _ { Y }$ of domain and codomain (the sets of all open sets), $f$ is continuous whenever for all $A \in \tau _ { Y }$ , $f ^ { - 1 } ( A ) \in \tau _ { X }$ .
|
| 360 |
+
|
| 361 |
+
Euclidean topology. For defining continuity between Euclidean spaces, we rely on the Euclidean (or standard) topology naturally induced by the metric: as set is open if and only if it contains and open ball around each if its points.
|
| 362 |
+
|
| 363 |
+
Subset topology. When restricting the domain or codomain of a mapping to a subset A of the Euclidean space, we rely on the subspace topology, that consists in the intersection of A will all open sets.
|
| 364 |
+
|
| 365 |
+
# PROOF OF PROPOSITION 4
|
| 366 |
+
|
| 367 |
+
Following a result stated in Armstrong (2013), since $\mathcal { Z }$ is compact and the codomain of $g _ { M }$ is Hausdorff (because Euclidean), then a continuous (by definition) and injective $g _ { M }$ is an embedding. In addition, $g _ { M }$ injective implies $\tilde { g } _ { M } ^ { \ell }$ ’s are injective on their respective domains $\nu _ { \ : M } ^ { \ell }$ . Moreover, the $\nu _ { \ : M } ^ { \ell }$ ’s being image of a compact $\mathcal { Z }$ by a continuous mapping (by the CGM definition), they are compact, such that the respective $\tilde { g } _ { M } ^ { \ell }$ ’s are also embeddings.
|
| 368 |
+
|
| 369 |
+
PROOF OF PROPOSITION 1
|
| 370 |
+
|
| 371 |
+
Part 1: Proof of the equivalence between faithful and disentangled. One conditional is trivial: if a transformation is disentangled, it is by definition an endomorphism of ${ \mathcal { V } } _ { M }$ so the counterfactual mapping must be faithful.
|
| 372 |
+
|
| 373 |
+
For the second conditional, let us assume a faithful $\hat { \mathbf { \chi } } _ { h } ^ { \mathcal { E } }$ and denote the (unambiguous) map from $\nu$ to the output
|
| 374 |
+
|
| 375 |
+
$$
|
| 376 |
+
Y _ { M } : \begin{array} { c } { { \mathcal { V } } } \\ { { v } } \end{array} \to \begin{array} { l } { { y } } \\ { { Y ( v ) } } \end{array} .
|
| 377 |
+
$$
|
| 378 |
+
|
| 379 |
+
10Note the mapping ${ \pmb v } \mapsto { \pmb Y } ( { \pmb v } )$ differs from $\tilde { g } _ { M } ^ { \ell }$ because its domain is not restricted to the image set $\nu _ { \ : M } ^ { \ell }$
|
| 380 |
+
|
| 381 |
+
This map differs from $\tilde { g } _ { M }$ due to its broader domain and codomain, such that it is neither necessarily an injection nor a surjection, but they coincide on the image $\nu _ { M }$ . We can first notice (using Definition 8 and the embedding property) that the counterfactual mapping can be decomposed as
|
| 382 |
+
|
| 383 |
+
$$
|
| 384 |
+
\begin{array} { r l r l r l } & { \widehat { Y } _ { h } ^ { \mathcal { E } } = Y _ { M } \circ T ^ { \prime } \circ ( \tilde { g } _ { M } ) ^ { - 1 } , } & { \mathrm { w h e r e } } & { T ^ { \prime } : } & { \mathcal { V } ^ { \bar { \varepsilon } } \times \mathcal { V } ^ { \varepsilon } } & { } & { \mathcal { V } ^ { \bar { \varepsilon } } \times \mathcal { V } ^ { \varepsilon } } \\ & { } & { ( \tilde { v } , v ) } & { \mapsto } & { ( \tilde { v } , h ) } \end{array} .
|
| 385 |
+
$$
|
| 386 |
+
|
| 387 |
+
Since $Y _ { h }$ is faithful, it is then an endomorphism of it $\mathcal { V } _ { M }$ (continuity comes form the composition of continuous functions), as required by the definition of disentanglement.
|
| 388 |
+
|
| 389 |
+
For any $v \in \nu$ , consider then the quantity
|
| 390 |
+
|
| 391 |
+
$$
|
| 392 |
+
\widehat { \boldsymbol { Y } } _ { h } ^ { \varepsilon } ( \boldsymbol { Y } ( \pmb { v } ) ) = \widehat { \boldsymbol { Y } } _ { h } ^ { \varepsilon } \circ \widetilde { \boldsymbol { g } } _ { M } ( \pmb { v } ) ,
|
| 393 |
+
$$
|
| 394 |
+
|
| 395 |
+
using the above decomposition, we can rewrite it as
|
| 396 |
+
|
| 397 |
+
$$
|
| 398 |
+
\stackrel { \wedge } { Y } _ { h } ^ { \varepsilon } ( Y ( \pmb { v } ) ) = Y _ { M } \circ T ^ { \prime } \circ \left( \tilde { g } _ { M } \right) ^ { - 1 } \circ \tilde { g } _ { M } ( \pmb { v } ) = Y _ { M } \circ T ^ { \prime } ( \pmb { v } ) ,
|
| 399 |
+
$$
|
| 400 |
+
|
| 401 |
+
where $T ^ { \prime }$ is a transformation that only affects endogenous variables in $\mathcal { E }$ , demonstrating that $\scriptstyle \mathtt { \Gamma } \sim \varepsilon$
|
| 402 |
+
$Y _ { h } ( Y ( v ) )$ is disentangled with respect to $\mathcal { E }$ .
|
| 403 |
+
|
| 404 |
+
Part 2: Sufficient condition. This is a direct application of the following Proposition 5 after observing that in our case, the endomorphism $T ^ { \mathbb { E } }$ required in this proposition is the constant function with value $^ { h }$ .
|
| 405 |
+
|
| 406 |
+
Proposition 5. For embedded CGM $M$ , if a subset $\mathcal { E }$ of endogenous variables does not share common latent ancestors11 with the reminder of endogenous variables $\bar { \mathcal { E } }$ , then any endomorphism $T ^ { \varepsilon } : \mathcal { V } _ { M } ^ { \varepsilon } \to \mathcal { V } _ { M } ^ { \varepsilon }$ leads to a transformation
|
| 407 |
+
|
| 408 |
+
$$
|
| 409 |
+
T : y \mapsto \tilde { g } _ { M } \circ T ^ { \prime } \circ ( \tilde { g } _ { M } ) ^ { - 1 } ( y ) ,
|
| 410 |
+
$$
|
| 411 |
+
|
| 412 |
+
$$
|
| 413 |
+
\begin{array}{c} w i t h \quad T ^ { \prime } \colon \begin{array} { r c l } { \pmb { \nu } _ { M } ^ { \bar { \varepsilon } } \times \pmb { \nu } _ { M } ^ { \varepsilon } } & { } & { \pmb { \nu } _ { M } ^ { \bar { \varepsilon } } \times \pmb { \nu } _ { M } ^ { \varepsilon } , } \\ { \big ( \tilde { \pmb { v } } , \pmb { v } \big ) } & { \mapsto } & { \big ( \tilde { \pmb { v } } , T ^ { \mathcal { E } } ( \pmb { v } ) \big ) , } \end{array} \end{array}
|
| 414 |
+
$$
|
| 415 |
+
|
| 416 |
+
such that $T$ is disentangled with respect to $\mathcal { E }$ in $M$ .
|
| 417 |
+
|
| 418 |
+
Proof of Proposition 5. The absence of common latent ancestor between $\bar { \mathcal { E } }$ and $\mathcal { E }$ ensures that values in both subsets are unambiguously assigned by non-overlapping subsets of latent variables, $A$ and $B$ respectively, such that we can write
|
| 419 |
+
|
| 420 |
+
$$
|
| 421 |
+
\Big ( V _ { | \bar { \varepsilon } } , V _ { | \varepsilon } \Big ) = \big ( f _ { A } \big ( z _ { A } \big ) , f _ { B } \big ( z _ { B } \big ) \big )
|
| 422 |
+
$$
|
| 423 |
+
|
| 424 |
+
This implies that the image stwo subsets of variables, i.e. $\pmb { \nu } _ { M } = \pmb { \nu } _ { M } ^ { \bar { \varepsilon } } \times \pmb { \nu } _ { M } ^ { \varepsilon }$ covers t, and gu Cartesianties that $T ^ { \prime }$ oduct of the image sets ois and endomorphism of $\nu _ { M } ^ { \ell }$ for any choice of endomorphism $T ^ { \mathcal { E } }$ . This further implies $T$ is well defined and an endomorphism.
|
| 425 |
+
|
| 426 |
+
# PROOF SKETCH FOR PROPOSITION 3
|
| 427 |
+
|
| 428 |
+
Due to the i.i.d. assumption for components of $z$ and the structure following the sufficient condition of Prop. 1, it is clear that the subsets of endogenous variables associated to each $V _ { k }$ are modular and the associated partition of the hidden layer is a disentangled representation. The choice of increasing dimensions as well as the i.i.d. sampling of the model parameters from a distribution with a density make sure the resulting mapping is injective (and hence follow the embedded CGM assumptions of Def. 7) and that counterfactual hybridization of any component of $V _ { k }$ will result in an influence map whose support covers exactly $I _ { k }$ . Finally, the conditions on the $I _ { k }$ ’s and the thresholding approach guaranties a rank $K$ binary factorization of the matrix $B$ , with one factor gathering the indicator vectors associated to each $V _ { k }$ and the uniqueness of this factorization is guaranteed by classical NMF identifiability results, e.g. following (Diop et al., 2017)[Theorem III,1].
|
| 429 |
+
|
| 430 |
+
# APPENDIX C: ARCHITECTURE DETAILS
|
| 431 |
+
|
| 432 |
+
VANILLA $\beta$ -VAE AND DCGAN
|
| 433 |
+
|
| 434 |
+
The $\beta$ -VAE architecture is presented in Supplementary Fig. 7 and is very similar to the DCGAN architecture. Hyperparameters for both structures are specified in Table 1.
|
| 435 |
+
|
| 436 |
+
# BEGAN CELEBA
|
| 437 |
+
|
| 438 |
+
We used the method proposed in Berthelot et al. (2017) for CelebA dataset. We used the pre-trained model with the same architecture as was used in the paper. It consists of three blocks of convolutional layers each followed by an upsampling layer. The filter size of convolutional layers is $( 3 , 3 )$ all over the generator. There is also skip connections in the model that is argued to increase the sharpness of images. Consult (Berthelot et al., 2017, Figure 1) for architectural details.
|
| 439 |
+
|
| 440 |
+
# BIGGAN-DEEP-256 ARCHITECTURE DETAILS
|
| 441 |
+
|
| 442 |
+
The pretrained model is taken from Tensorflow-hub (https://tfhub.dev/, we summarize below the main aspects of the architectures. We used the BigGan-deep architecture of Brock et al. (2018) as a pre-trained model on $2 5 6 \times 2 5 6$ ImageNet. We did not retrain the model. The architecture consists of several ResBlocks which are the building block of the generator. Each ResBlock contains BatchNorm-ReLU-Conv Layers followed by upsampling transformations and augmented with skip connections that bring fresh signal from the input to every ResBlock. Consult Brock et al. (2018) for architectural details.
|
| 443 |
+
|
| 444 |
+
# CLASSIFIERS ARCHITECTURE DETAILS
|
| 445 |
+
|
| 446 |
+
All pretrained models are taken from Tensorflow-hub (https://tfhub.dev/, we summarize below the main aspects of the architectures.
|
| 447 |
+
|
| 448 |
+
INCEPTION RESNET V2
|
| 449 |
+
|
| 450 |
+
Inception ResNet V2 is a neural network architecture for image classification, originally published by
|
| 451 |
+
|
| 452 |
+
Christian Szegedy, Sergey Ioffe, Vincent Vanhoucke, Alex Alemi: ”Inception-v4, Inception-ResNet and the Impact of Residual Connections on Learning”, 2016.
|
| 453 |
+
|
| 454 |
+
# INCEPTION V3
|
| 455 |
+
|
| 456 |
+
Inception V3 is a neural network architecture for image classification, originally published by
|
| 457 |
+
|
| 458 |
+
Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jonathon Shlens, Zbigniew Wojna: ”Rethinking the Inception Architecture for Computer Vision”, 2015.
|
| 459 |
+
|
| 460 |
+
# NASNET LARGE
|
| 461 |
+
|
| 462 |
+
NASNet-A is a family of convolutional neural networks for image classification. The architecture of its convolutional cells (or layers) has been found by Neural Architecture Search (NAS). NAS and NASNet were originally published by
|
| 463 |
+
|
| 464 |
+
Barret Zoph, Quoc V. Le: ”Neural Architecture Search with Reinforcement Learning”, 2017. Barret Zoph, Vijay Vasudevan, Jonathon Shlens, Quoc V. Le: ”Learning Transferable Architectures for Scalable Image Recognition”, 2017.
|
| 465 |
+
|
| 466 |
+
NASNets come in various sizes. This TF-Hub module uses the TF-Slim implementation nasnet large of NASNet-A for ImageNet that uses 18 Normal Cells, starting with 168 convolutional filters (after the ”ImageNet stem”). It has an input size of 331x331 pixels.
|
| 467 |
+
|
| 468 |
+
# RESNET V2 50
|
| 469 |
+
|
| 470 |
+
ResNet V2 is a family of network architectures for image classification with a variable number of layers. It builds on the ResNet architecture originally published by
|
| 471 |
+
|
| 472 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun: ”Deep Residual Learning for Image Recognition”, 2015.
|
| 473 |
+
|
| 474 |
+
The full preactivation ’V2’ variant of ResNet used in this module was introduced by
|
| 475 |
+
|
| 476 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun: ”Identity Mappings in Deep Residual Networks”, 2016.
|
| 477 |
+
|
| 478 |
+
APPENDIX D: IMPLEMENTATION DETAILS.
|
| 479 |
+
|
| 480 |
+
The file influence.py provided at the link https://www.dropbox.com/sh/ 4qnjictmh4a2soq/AAAa5brzPDlt69QOc9n2K4uOa?dl $= 0$ contains key elements of the code for counterfactual analysis of generative models.
|
| 481 |
+
|
| 482 |
+
APPENDIX E: ADDITIONAL RESULTS
|
| 483 |
+
|
| 484 |
+
# INFLUENCE MAP CLUSTERING AND HYBRIDIZATION IN DCGANS
|
| 485 |
+
|
| 486 |
+
We replicated the above approach for GANs on the CelebA dataset. The result shown in Supplemental Fig. 11 summarize the main differences. First, the use of three clusters seemed again optimal according to the stability of the obtained cluster templates. However, we observed that the eyes and mouth location were associated with the top of the head in one cluster, while the rest of the face and the sides of the image (including hair and background) respectively form the two remaining clusters. In this sense, the GAN clusters are less aligned with high level concepts reflecting the causal structure of these images. However, such clustering still allows a good visual quality of hybrid samples.
|
| 487 |
+
|
| 488 |
+
APPENDIX F: ADDITIONAL DISCUSSION
|
| 489 |
+
|
| 490 |
+
EXTENSION AND RELATION TO OTHER FRAMEWORKS
|
| 491 |
+
|
| 492 |
+
While we defined disentanglement of transformations, this concept has been classically attributed to a representation, or factors of variation. Focusing on a transformation aligns to our aim of providing an agnostic definition, in the sense that it only relies on the generator architecture and a given transformation, but neither on data, nor on properties that are not stated explicitly in the definition. In contrast, disentangled representation is usually understood as intervening on meaningful/interpretable features in the image, which may be subjective, or at least referring to some external knowledge. Alternatively, one might expect that what should be disentangled is a property or a factor of variation (say “hair color”). We argue that we can state a property is disentangled by the generalizing our notion of disentanglement to a family of transformations as follows.
|
| 493 |
+
|
| 494 |
+
Definition 9 (Disentangled family). A family of transformations (possibly parametric) is disentangled if all members are disentangled with respect to the same $\mathcal { E }$ .
|
| 495 |
+
|
| 496 |
+
Then a property may be disentangled if the class of all transformations changing “only” the value of this specific property is disentangled according to Definition 9. Finally, one might also expect that several transformations (or families of transformations) should be disentangled with respect to each other, e.g. allowing to state that hair color should be disentangled from hair length. This relative disentanglement is easily defined based on our original definition.
|
| 497 |
+
|
| 498 |
+
Definition 10 (Relative disentanglement). The families of functions $( \mathcal { F } _ { i } ) _ { i \in 1 \ldots N }$ are called jointly disentangled whenever they are disentangled with respect to non-overlapping subsets of variables $( \mathcal { E } _ { i } ) _ { i \in 1 \ldots N }$ within a given layer.12
|
| 499 |
+
|
| 500 |
+
We argue that the notion introduced in Higgins et al. (2018) can be framed as a special case of Definition 10.
|
| 501 |
+
|
| 502 |
+
# SUPPLEMENTARY FIGURES AND TABLES
|
| 503 |
+
|
| 504 |
+
Table 1
|
| 505 |
+
|
| 506 |
+
<table><tr><td>Architecture</td><td>VAECelebA</td><td>GANCelebA</td></tr><tr><td>Nb. of deconv. layers/channels of generator Size of activation maps of generator</td><td>4/(64,64,32,16,3) (8,16,32,64)</td><td>4/(128,64,32,16,3) (4,8,16,32)</td></tr><tr><td>Latent space</td><td>128</td><td>150</td></tr><tr><td>Optimization algorithm</td><td>Adam (β= 0.5)</td><td>Adam (β= 0.5)</td></tr><tr><td>Minimized objective</td><td>VAE loss (Gaussian posteriors)</td><td>GAN loss</td></tr><tr><td>batch size</td><td>64</td><td></td></tr><tr><td>Beta parameter</td><td>0.0005</td><td>64 NA</td></tr></table>
|
| 507 |
+
|
| 508 |
+
Table 2: FID analysis of BEGAN hybrids. Distance between different pairs of classes (R: Real data, G: Generated data, Ck: Hybrids by intervention on cluster k). The distances are is computed for balanced number of examples (10k) for each class and normalized by the FID between the real data and the generated data. It can be seen in the table that Hybrids have a small distance to the generated and also to each other. This can be interpreted as closeness of the distribution of Hybrids to that of generated data suggesting that Hybridization produces visually plausible images.
|
| 509 |
+
|
| 510 |
+
<table><tr><td rowspan=1 colspan=1>G</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>0</td><td rowspan=3 colspan=3>00.096 0</td></tr><tr><td rowspan=1 colspan=1>CO</td><td rowspan=1 colspan=1>1.022</td><td rowspan=1 colspan=1>0.036</td><td rowspan=1 colspan=1>0</td></tr><tr><td rowspan=1 colspan=1>C1</td><td rowspan=1 colspan=1>1.143</td><td rowspan=1 colspan=1>0.093</td><td rowspan=1 colspan=1>0.096</td><td rowspan=1 colspan=1>0</td></tr><tr><td rowspan=1 colspan=1>C2</td><td rowspan=1 colspan=1>1.158</td><td rowspan=1 colspan=1>0.097</td><td rowspan=1 colspan=1>0.099</td><td rowspan=1 colspan=1>0.045</td><td rowspan=1 colspan=1>0</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>R</td><td rowspan=1 colspan=1>G</td><td rowspan=1 colspan=1>C0</td><td rowspan=1 colspan=1>C1</td><td rowspan=1 colspan=1>C2</td></tr></table>
|
| 511 |
+
|
| 512 |
+

|
| 513 |
+
Figure 7: VAE architecture. FC indicates a fully connected layer, $z$ is a 100-dimensional isotropic Gaussian vector, horizontal dimensions indicate the number of channels of each layer. The output image size is $6 4 \times 6 4$ (or $3 2 \times 3 2$ for cifar10) pixels and these dimensions drop by a factor 2 from layer to layer. (reproduced from (Radford et al., 2015).
|
| 514 |
+
|
| 515 |
+

|
| 516 |
+
Figure 8: Left: Clustering of influence maps for a VAE trained on the CelebA dataset (see text).. Center: samples of the hybridization procedure using as module all channels of the intermediate layer belonging to the cluster of corresponding row, top insets indicate the original ImageNet pictures use to produce both samples by feeding them to the VAE’s encoder. Right: magnitude of causal effects. (top: average influence of modules derived from clustering as a function of the number of clusters; bottom: individual influence of each modules, as a function of the number of channels they contain, dashed line indicate linear regression).
|
| 517 |
+
|
| 518 |
+

|
| 519 |
+
Figure 9: Label consistency (left) and cosine similarity (right) of the clustering of influence maps for the NMF and $\mathbf { k }$ -means algorithm. Errorbars indicate standard deviation across 20 repetitions.
|
| 520 |
+
|
| 521 |
+

|
| 522 |
+
Figure 10: Clustering of influence maps and generation of hybrid samples for a VAE trained on the CelebA dataset (see text).
|
| 523 |
+
|
| 524 |
+

|
| 525 |
+
Figure 11: Clustering of influence maps and generation of hybrid samples for a GAN trained on the CelebA dataset (see text).
|
| 526 |
+
|
| 527 |
+

|
| 528 |
+
Figure 12: Larger collection of hybrids for the BEGAN. Modules are fixed and extracted by the NMF algorithm using 3 clusters. For each three panel, the ”Original $2 ^ { \circ }$ sample used to perform the intervention is fixed (show in the top-left corner) while Original 1 varies along the columns.
|
| 529 |
+
|
| 530 |
+

|
| 531 |
+
Figure 13: Larger collection of hybrids for the BIGAN, between classes ”teddy” and ”koala”. Each panel corresponds to intervening on a different Gblock (from 4 to 7). Modules are fixed and extracted by the NMF algorithm using 3 clusters. Each row of hybrids corresponds to interventions on one of the extracted module, numbered on the right-hand side.
|
| 532 |
+
|
| 533 |
+

|
| 534 |
+
Figure 14: Histogram of the entropy of the resnet v2 50 classifier logits corresponding to the experiment of Fig. 13. Columns indicate intervened Gblock (from 4 to 7), rows indicate module (as ordered in Fig. 13). The entropy is computed using the probabilistic output for the 10 classes receiving top ranking across all hybrids, normalized to provide a total probability of 1. In particular for Gblock 6 (left column) we can see that the module with poorer quality leads to larger entropy values. Interestingly, entropy values are also much smaller for hybrids based on interventions on the (more abstract level) Gblock number 4. Overall, the results suggests that object texture, which is well rendered in hybrids generated from Gblock 4, is a key information for the classifier’s decision.
|
| 535 |
+
|
| 536 |
+

|
| 537 |
+
Figure 15: Larger collection of hybrids for the BIGAN, between classes ”cock” and ”ostrich”. Each panel corresponds to intervening on a different Gblock (from 4 to 7). Modules are fixed and extracted by the NMF algorithm using 3 clusters. Each row of hybrids corresponds to interventions on one of the extracted module, numbered on the right-hand side.
|
| 538 |
+
|
| 539 |
+

|
| 540 |
+
Figure 16: Histogram of the entropy of the resnet v2 50 classifier logits corresponding to the experiment of Fig. 15. Columns indicate intervened Gblock (from 4 to 7), rows indicate module (as ordered in Fig. 15). The entropy is computed using the probabilistic output for the 10 classes receiving top ranking across all hybrids, normalized to provide a total probability of 1. Interestingly, large entropy is obtained for first module of Gblock 5 (middle column), consistent with the fact the intervention generates a hybrid bird, mixing shape properties of both cock and ostrich.
|
| 541 |
+
|
| 542 |
+
<table><tr><td>Left Image</td><td>Model Output</td><td>resnet_v2_50 koala</td><td>inception_v3 koala</td><td>nasnet_large koala</td><td>inception_resnet_v2 koala</td></tr><tr><td>Middle Image</td><td>Model Output</td><td>resnet_v2_50 koala</td><td>inception_v3 koala</td><td>nasnet_large teddy</td><td>inception_resnet_v2 teddy</td></tr><tr><td>Right Image</td><td>Model Output</td><td>resnet_v2_50 koala</td><td>inception_v3 teddy</td><td>nasnet_large teddy</td><td>inception_resnet_v2 koala</td></tr></table>
|
| 543 |
+
|
| 544 |
+
Table 3: The classification outcome of several discriminative models for three randomly chosen koala+teddy hybrids (see Figure. 17). The purpose of this experiment is to investigate the use of the proposed intervention procedure for assessing robustness of classifiers. As can be seen in the following images, the resultant hybrids are roughly a teddy bear in a koala context. An ideal classifier must be sensitive to the object present in the scene not the contextual information. A teddy bear must still be classified as a teddy bear even if it appears on a tree which is the koala environment in most of the koala images in the ImageNet dataset. It can be seen in the following table that nasnet large is more robust to the change of context compared to other classifiers.
|
| 545 |
+
|
| 546 |
+

|
| 547 |
+
Figure 17: Three koala+teddy hybrids as the inputs to the classifiers of Table. 3
|
parse/train/SJxDDpEKvH/SJxDDpEKvH_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/SJxDDpEKvH/SJxDDpEKvH_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/SJxDDpEKvH/SJxDDpEKvH_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/SksY3deAW/SksY3deAW.md
ADDED
|
@@ -0,0 +1,604 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LEARNING DEEP RESNET BLOCKS SEQUENTIALLY USING BOOSTING THEORY
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
We prove a multiclass boosting theory for the ResNet architectures which simultaneously creates a new technique for multiclass boosting and provides a new algorithm for ResNet-style architectures. Our proposed training algorithm, BoostResNet, is particularly suitable in non-differentiable architectures. Our method only requires the relatively inexpensive sequential training of $T$ “shallow ResNets”. We prove that the training error decays exponentially with the depth $T$ if the weak module classifiers that we train perform slightly better than some weak baseline. In other words, we propose a weak learning condition and prove a boosting theory for ResNet under the weak learning condition. A generalization error bound based on margin theory is proved and suggests that ResNet could be resistant to overfitting using a network with $l _ { 1 }$ norm bounded weights.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Why do residual neural networks (ResNets) (He et al., 2016) and the related highway networks (Srivastava et al., 2015) work? And if we study closely why they work, can we come up with new understandings of how to train them and how to define working algorithms?
|
| 12 |
+
|
| 13 |
+
Deep neural networks have elicited breakthrough successes in machine learning, especially in image classification and object recognition (Krizhevsky et al., 2012; Sermanet et al., 2013; Simonyan & Zisserman, 2014; Zeiler & Fergus, 2014) in recent years. As the number of layers increases, the nonlinear network becomes more powerful, deriving richer features from input data. Empirical studies suggest that challenging tasks in image classification (He et al., 2015; Ioffe & Szegedy, 2015; Simonyan & Zisserman, 2014; Szegedy et al., 2015) and object recognition (Girshick, 2015; Girshick et al., 2014; He et al., 2014; Long et al., 2015; Ren et al., 2015) often require “deep” networks, consisting of tens or hundreds of layers. Theoretical analyses have further justified the power of deep networks (Mhaskar & Poggio, 2016) compared to shallow networks.
|
| 14 |
+
|
| 15 |
+
However, deep neural networks are difficult to train despite their intrinsic representational power. Stochastic gradient descent with back-propagation (BP) (LeCun et al., 1989) and its variants are commonly used to solve the non-convex optimization problems. A major challenge that exists for training both shallow and deep networks is vanishing or exploding gradients (Bengio et al., 1994; Glorot & Bengio, 2010). Recent works have proposed normalization techniques (Glorot & Bengio, 2010; LeCun et al., 2012; Ioffe & Szegedy, 2015; Saxe et al., 2013) to effectively ease the problem and achieve convergence. In training deep networks, however, a surprising training performance degradation is observed (He & Sun, 2015; Srivastava et al., 2015; He et al., 2016): the training performance degrades rapidly with increased network depth after some saturation point. This training performance degradation is representationally surprising as one can easily construct a deep network identical to a shallow network by forcing any part of the deep network to be the same as the shallow network with the remaining layers functioning as identity maps. He et al. (He et al., 2016) presented a residual network (ResNet) learning framework to ease the training of networks that are substantially deeper than those used previously. And they explicitly reformulate the layers as learning residual functions with reference to the layer inputs by adding identity loops to the layers. It is shown in (Hardt & Ma, 2016) that identity loops ease the problem of spurious local optima in shallow networks. Srivastava et al. (Srivastava et al., 2015) introduce a novel architecture that enables the optimization of networks with virtually arbitrary depth through the use of a learned gating mechanism for regulating information flow.
|
| 16 |
+
|
| 17 |
+
Empirical evidence overwhelmingly shows that these deep residual networks are easier to optimize than non-residual ones. Can we develop a theoretical justification for this observation? And does that justification point us towards new algorithms with better characteristics?
|
| 18 |
+
|
| 19 |
+
# 1.1 SUMMARY OF RESULTS
|
| 20 |
+
|
| 21 |
+
We propose a new framework, multi-channel telescoping sum boosting (defined in Section 4), to characterize a feed forward ResNet in Section 3. We show that the top level (final) output of a ResNet can be thought of as a layer-by-layer boosting method (defined in Section 2). Error bounds for telescoping sum boosting are provided.
|
| 22 |
+
|
| 23 |
+
We introduce a learning algorithm (BoostResNet) guaranteed to reduce error exponentially as depth increases so long as a weak learning assumption is obeyed. BoostResNet adaptively selects training samples or changes the cost function (Section 4 Theorem 4.2). In Section 4.4, we analyze the generalization error of BoostResNet and provide advice to avoid overfitting. The procedure trains each residual block sequentially, only requiring that each provides a better-than-a-weak-baseline in predicting labels.
|
| 24 |
+
|
| 25 |
+
BoostResNet requires radically lower computational complexity for training than end-to-end back propagation $( e 2 e B P )$ . Memorywise, BoostResNet requires only individual layers of the network to be in the graphics processing unit (GPU) while $e 2 e B P$ inevitably keeps all layers in the GPU. For example, in a state-of-the-art deep ResNet, this might reduce the RAM requirements for GPU by a factor of the depth of the network. Similar improvements in computation are observed since each $e 2 e B P$ step involves back propagating through the entire deep network.
|
| 26 |
+
|
| 27 |
+
Experimentally, we compare BoostResNet with $e 2 e B P$ over two types of feed-forward ResNets, multilayer perceptron residual network (MLP-ResNet) and convolutional neural network residual network (CNN-ResNet), on multiple datasets. BoostResNet shows substantial computational performance improvements and accuracy improvement under the MLP-ResNet architecture. Under CNN-ResNet, a faster convergence for BoostResNet is observed.
|
| 28 |
+
|
| 29 |
+
One of the hallmarks of our approach is to make an explicit distinction between the classes of the multiclass learning problem and channels that are constructed by the learning procedure. A channel here is essentially a scalar value modified by the rounds of boosting so as to implicitly minimize the multiclass error rate. Our multi-channel telescoping sum boosting learning framework is not limited to ResNet and can be extended to other, even non-differentiable, nonlinear hypothesis units, such as decision trees or tensor decompositions.
|
| 30 |
+
|
| 31 |
+
# 1.2 RELATED WORKS
|
| 32 |
+
|
| 33 |
+
Training deep neural networks has been an active research area in the past few years. The main optimization challenge lies in the highly non-convex nature of the loss function. There are two main ways to address this optimization problem: one is to select a loss function and network architecture that have better geometric properties (details refer to appendix A.1), and the other is to improve the network’s learning procedure (details refer to appendix A.2).
|
| 34 |
+
|
| 35 |
+
Many authors have previously looked into neural networks and boosting, each in a different way. Bengio et al. (2006) introduce single hidden layer convex neural networks, and propose a gradient boosting algorithm to learn the weights of the linear classifier. The approach has not been generalized to deep networks with more than one hidden layer. Shalev-Shwartz (2014) proposes a selfieBoost algorithm which boosts the accuracy of an entire network. Our algorithm is different as we instead construct ensembles of classifiers. Veit et al. (2016) interpret residual networks as a collection of many paths of differing length. Their empirical study shows that residual networks avoid the vanishing gradient problem by introducing short paths which can carry gradient throughout the extent of very deep networks. The authors of AdaNet (Cortes et al., 2016) consider ensembles of neural layers with a boosting-style algorithm and provide a method for structural learning of neural networks by optimizing over the generalization bound, which consists of the training error and the complexity of the AdaNet architecture. AdaNet uses the traditional boosting framework where weak classifiers are being boosted. Therefore, to obtain low training error guarantee, AdaNet maps the feature vectors (hidden layer representations) to a classifier space and boosts the weak classifiers. Our BoostResNet, instead, boosts representations (feature vectors) over multiple channels, and therefore produces a less “bushy” architecture. BoostResNet focuses on a ResNet architecture, provides a new training algorithm for ResNet, and proves a training error guarantee for deep ResNet architecture. A ResNet-style architecture is a special case of AdaNet, so AdaNet generalization guarantee applies here and our generalization analysis is built upon their work.
|
| 36 |
+
|
| 37 |
+
# 2 PRELIMINARIES
|
| 38 |
+
|
| 39 |
+
A residual neural network (ResNet) is composed of stacked entities referred to as residual blocks. Each residual block consists of a neural network module and an identity loop (shortcut). Commonly used modules include MLP and CNN. Throughout this paper, we consider training and test examples generated i.i.d. from some distribution $\mathcal { D }$ over $\mathcal { X } \times \mathcal { V }$ , where $\mathcal { X }$ is the input space and $\mathcal { V }$ is the label space. We denote by $S = ( ( x _ { 1 } , y _ { 1 } ) , ( { \bar { x } } _ { 2 } , { \bar { y _ { 2 } } } ) , \dots , ( x _ { m } , y _ { m } ) )$ a training set of $m$ examples drawn according to $\mathcal { D } ^ { m }$ .
|
| 40 |
+
|
| 41 |
+
A Residual Block of ResNet ResNet consists of residual blocks. Each residual block contains a module and an identity loop. Let each module map its input $\tilde { x }$ to $f _ { t } ( \tilde { x } )$ where $t$ denotes the level of the modules. Each module $f _ { t }$ is a nonlinear unit with $n$ channels, i.e., $f _ { t } ( \cdot ) \in \mathbb { R } ^ { n }$ . In multilayer perceptron residual network (MLPResNet), $f _ { t }$ is a shallow MLP, for instance, $f _ { t } ( \tilde { x } ) = \tilde { V } _ { t } ^ { \top } \sigma ( \tilde { W } _ { t } ^ { \top } \tilde { x } )$ where $\tilde { W } _ { t } \in \mathbb { R } ^ { n \times k }$ , $\tilde { V } _ { t } \in \mathbb { R } ^ { k \times n }$ and $\sigma$ is a nonlinear operator such as sigmoidal function or relu function. Similarly, in convolutional neural network residual network (CNN-ResNet), $f _ { t } ( \cdot )$ represents the $t$ -th convolutional module. Then the $t$ -th residual block outputs $g _ { t + 1 } ( x )$
|
| 42 |
+
|
| 43 |
+

|
| 44 |
+
Figure 1: The architecture of a residual network (ResNet).
|
| 45 |
+
|
| 46 |
+
$$
|
| 47 |
+
g _ { t + 1 } ( x ) = f _ { t } ( g _ { t } ( x ) ) + g _ { t } ( x ) ,
|
| 48 |
+
$$
|
| 49 |
+
|
| 50 |
+
where $x$ is the input fed to the ResNet. See Figure 1 for an illustration of a ResNet, which consists of stacked residual blocks (each residual block contains a nonlinear module and an identity loop).
|
| 51 |
+
|
| 52 |
+
Output of ResNet Due to the recursive relation specified in Equation (1), the output of the $T$ -th residual block is equal to the summation over lower module outputs, i.e., $g _ { T + 1 } ( x ) \stackrel { - } { = } f _ { T } ( g _ { T } ( x ) ) +$ $\begin{array} { r } { g _ { T } ( x ) = \sum _ { t = 1 } ^ { T } f _ { t } ( g _ { t } ( x ) ) } \end{array}$ , where $g _ { 1 } ( x ) = x$ . For binary classification tasks, the final output of a ResNet given input $x$ is rendered after a linear classifier $\mathbf { w } \in \mathbb { R } ^ { n }$ on representation $g _ { T + 1 } ( x )$ (In the multiclass setting, let $C$ be the number of classes; the linear classifier $\bar { W } \in \mathbb { R } ^ { n \times C }$ is a matrix instead of a vector.):
|
| 53 |
+
|
| 54 |
+
$$
|
| 55 |
+
\widehat { \boldsymbol { y } } = \widetilde { \sigma } \left( \boldsymbol { F } ( \boldsymbol { x } ) \right) = \widetilde { \sigma } ( \mathbf { w } ^ { \top } g _ { T + 1 } ( \boldsymbol { x } ) ) = \widetilde { \sigma } \left( \mathbf { w } ^ { \top } \sum _ { t = 1 } ^ { T } f _ { t } ( g _ { t } ( \boldsymbol { x } ) ) \right)
|
| 56 |
+
$$
|
| 57 |
+
|
| 58 |
+
where $F ( x ) \ = \ \mathbf { w } ^ { \top } g _ { T + 1 } ( x )$ and $\tilde { \sigma } ( \cdot )$ denotes a map from classifier outputs (scores) to labels. For instance $\tilde { \sigma } ( z ) = \mathfrak { s i g n } ( z )$ for binary classification $( \tilde { \sigma } ( z ) = \arg \operatorname* { m a x } _ { i }$ $z _ { i }$ for multiclass classification). The parameters of a depth- $\mathcal { T }$ ResNet are $\{ \mathbf { w } , \{ f _ { t } ( \cdot ) , \forall t \in T \} \}$ . A ResNet training involves training the classifier w and the weights of modules $f _ { t } ( \cdot ) \forall t \in [ T ]$ when training examples $( x _ { 1 } , y _ { 1 } ) , ( x _ { 2 } , y _ { 2 } ) , \dots , ( x _ { m } , y _ { m } )$ are available.
|
| 59 |
+
|
| 60 |
+
Boosting Boosting (Freund & Schapire, 1995) assumes the availability of a weak learning algorithm which, given labeled training examples, produces a weak classifier (a.k.a. base classifier). The goal of boosting is to improve the performance of the weak learning algorithm. The key idea behind boosting is to choose training sets for the weak classifier in such a fashion as to force it to infer something new about the data each time it is called. The weak learning algorithm will finally combine many weak classifiers into a single strong classifier whose prediction power is strong.
|
| 61 |
+
|
| 62 |
+
From empirical experience, ResNet remedies the problem of training error degradation (instability of solving non-convex optimization problem using SGD) in deeper neural networks. We are curious about whether there is a theoretical justification that identity loops help in training. More importantly, we are interested in proposing a new algorithm that avoids end-to-end back-propagation $( e 2 e B P )$ through the deep network and thus is immune to the instability of SGD for non-convex optimization of deep neural networks.
|
| 63 |
+
|
| 64 |
+
# 3 RESNET IN TELESCOPING SUM BOOSTING FRAMEWORK
|
| 65 |
+
|
| 66 |
+
As we recall from Equation (2), ResNet indeed has a similar form as the strong classifier in boosting. The key difference is that boosting is an ensemble of estimated hypotheses whereas ResNet is an
|
| 67 |
+
|
| 68 |
+
ensemble of estimated feature representations $\textstyle \sum _ { t = 1 } ^ { T } f _ { t } ( g _ { t } ( x ) )$ . To solve this problem, we introduce an auxiliary linear classifier $\mathbf { w } _ { t }$ on top of each residual block to construct a hypothesis module. Formally, a hypothesis module is defined as
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
o _ { t } ( x ) \overset { \mathrm { d e f } } { = } \mathbf { w } _ { t } ^ { \top } g _ { t } ( x ) \in \mathbb { R }
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+
in the binary classification setting. Therefore $o _ { t + 1 } ( x ) = \mathbf { w } _ { t + 1 } ^ { \top } [ f _ { t } ( g _ { t } ( x ) ) + g _ { t } ( x ) ]$ as $g _ { t + 1 } ( x ) =$ $f _ { t } ( g _ { t } ( x ) ) + g _ { t } ( x )$ . We emphasize that given $g _ { t } ( x )$ , we only need to train $f _ { t }$ and $\mathbf { w } _ { t + 1 }$ to train $o _ { t + 1 } ( x )$ . In other words, we feed the output of previous residual block $( g _ { t } ( x ) )$ to the current module and train the weights of current module $f _ { t } ( \cdot )$ and the auxiliary classifier $\mathbf { w } _ { t + 1 }$ .
|
| 75 |
+
|
| 76 |
+
Now the input, residual block. $g _ { t + 1 } ( x )$ , of tsult, $t + 1$ output, . In oth $f _ { t } ( g _ { t } ( x ) ) + g _ { t } ( x )$ , of the iliary li $t$ -thear $\begin{array} { r } { o _ { t } ( x ) = \sum _ { t ^ { \prime } = 1 } ^ { t - 1 } \mathbf { w } _ { t } ^ { \top } f _ { t ^ { \prime } } ( g _ { t ^ { \prime } } ( x ) ) } \end{array}$ classifier is common for all modules underneath. It would not be realistic to assume a common auxiliary linear classifier, as such an assumption prevents us from training the $T$ hypothesis module sequentially. We design a weak module classifier using the idea of telescoping sum as follows.
|
| 77 |
+
|
| 78 |
+
Definition 3.1. A weak module classifier is defined as
|
| 79 |
+
|
| 80 |
+
$$
|
| 81 |
+
h _ { t } ( x ) \stackrel { \mathrm { d e f } } { = } \alpha _ { t + 1 } o _ { t + 1 } ( x ) - \alpha _ { t } o _ { t } ( x )
|
| 82 |
+
$$
|
| 83 |
+
|
| 84 |
+
where $o _ { t } ( x ) \stackrel { \mathrm { d e f } } { = } \mathbf { w } _ { t } ^ { \top } g _ { t } ( x )$ is a hypothesis module, and $\alpha _ { t }$ is a scalar. We call it a “telescoping sum boosting” framework if the weak learners are restricted to the form of the weak module classifier.
|
| 85 |
+
|
| 86 |
+
ResNet: Ensemble of Weak Module Classifiers Recall that the $T$ -th residual block of a ResNet outputs $g _ { T + 1 } ( x )$ , which is fed to the top/final linear classifier for the final classification. We show that an ensemble of the weak module classifiers is equivalent to a ResNet’s final output. We state it formally in Lemma 3.2. For purposes of exposition, we will call $F ( x )$ the output of ResNet although a $\tilde { \sigma }$ function is applied on top of $F ( x )$ , mapping the output to the label space $\mathcal { V }$ .
|
| 87 |
+
|
| 88 |
+
Lemma 3.2. Let the input $g _ { t } ( x )$ of the $t$ -th module be the output of the previous module, i.e., $g _ { t + 1 } ( x ) = f _ { t } ( g _ { t } ( x ) ) + \bar { g _ { t } } ( x )$ . Then the summation of $T$ weak module classifiers divided by $\alpha _ { T + 1 }$ is identical to the output, $F ( x )$ , of the depth- $T$ ResNet,
|
| 89 |
+
|
| 90 |
+
$$
|
| 91 |
+
F ( x ) = { { \mathbf w } ^ { \top } } g _ { T + 1 } ( x ) \equiv \frac { 1 } { \alpha _ { T + 1 } } \sum _ { t = 1 } ^ { T } { h _ { t } ( x ) } ,
|
| 92 |
+
$$
|
| 93 |
+
|
| 94 |
+
where the weak module classifier $h _ { t } ( x )$ is defined in Equation (4).
|
| 95 |
+
|
| 96 |
+
See Appendix B for the proof. Overall, our proposed ensemble of weak module classifiers is a new framework that allows for sequential training of ResNet. Note that traditional boosting algorithm results do not apply here. We now analyze our telescoping sum boosting framework in Section 4. Our analysis applies to both binary and multiclass, but we will focus on the binary class for simplicity in the main text and defer the multiclass analysis to the Appendix F.
|
| 97 |
+
|
| 98 |
+
# 4 TELESCOPING SUM BOOSTING FOR BINARY CLASSIFICATION
|
| 99 |
+
|
| 100 |
+
Below, we propose a learning algorithm whose training error decays exponentially with the number of weak module classifiers $T$ under a weak learning condition. We restrict to bounded hypothesis modules, i.e., $| o _ { t } ( x ) | \leq 1$ .
|
| 101 |
+
|
| 102 |
+
# 4.1 WEAK LEARNING CONDITION
|
| 103 |
+
|
| 104 |
+
The weak module classifier involves the difference between (scaled version of) $o _ { t + 1 } ( x )$ and $o _ { t } ( x )$ . Let $\tilde { \gamma } _ { t } \ \stackrel { \mathrm { d e f } } { = } \ \mathbb { E } _ { i \sim D _ { t - 1 } } [ y _ { i } o _ { t } ( x _ { i } ) ] > 0$ be the edge of the hypothesis module $o _ { t } ( x )$ , where $D _ { t - 1 }$ is the weight of the examples. As the hypothesis module $o _ { t } ( x )$ is bounded by 1, we obtain $| \tilde { \gamma } _ { t } | \leq 1$ . So $\tilde { \gamma } _ { t }$ characterizes the performance of the hypothesis module $o _ { t } ( x )$ . A natural requirement would be that $o _ { t + 1 } ( x )$ improves slightly upon $o _ { t } ( x )$ , and thus $\tilde { \gamma } _ { t + 1 } - \tilde { \gamma } _ { t } \geq \gamma ^ { \prime } > 0$ could serve as a weak learning condition. However this weak learning condition is too strong: even when current hypothesis module is performing almost ideally $\tilde { \gamma } _ { t }$ is close to 1), we still seek a hypothesis module which performs consistently better than the previous one by $\gamma ^ { \prime }$ . Instead, we consider a much weaker learning condition, inspired by training error analysis, as follows.
|
| 105 |
+
|
| 106 |
+
Definition 4.1 $\langle \gamma$ -Weak Learning Condition). A weak module classifier $h _ { t } ( x ) = \alpha _ { t + 1 } o _ { t + 1 } - \alpha _ { t } o _ { t }$ satisfies the $\gamma$ -weak learning condition i $\begin{array} { r l r } { \textbf { { f } } \frac { \widetilde { \gamma } _ { t + 1 } ^ { 2 } - \widetilde { \gamma } _ { t } ^ { 2 } } { 1 - \widetilde { \gamma } _ { t } ^ { 2 } } } & { \ge } & { \gamma ^ { 2 } \ > \ 0 } \end{array}$ and the covariance between $\exp ( - y o _ { t + 1 } ( x ) )$ and $\exp ( y o _ { t } ( x ) )$ is non-positive.
|
| 107 |
+
|
| 108 |
+
The weak learning condition is motivated by the learning theory and it is met in practice (refer to Figure 4). Interpretation of weak learning condition For each weak module classifier $h _ { t } ( x ) , \ \gamma _ { t } \stackrel { \mathrm { ~ d ~ } } { = }$ $\begin{array} { r } { \sqrt { \frac { \tilde { \gamma } _ { t + 1 } ^ { 2 } - \tilde { \gamma } _ { t } ^ { 2 } } { 1 - \tilde { \gamma } _ { t } ^ { 2 } } } } \end{array}$ characterizes the normalized improvement of the correlation between the true labels $y$ and the hypothesis modules $o _ { t + 1 } ( x )$ over the correlation between the true labels $y$ and the hypothesis modules $o _ { t } ( x )$ . The condition specified in Definition 4.1 is mild as it requires the hypothesis module $o _ { t + 1 } ( x )$ to perform only slightly better than the previous hypothesis module $o _ { t } ( x )$ . In residual network, since $o _ { t + 1 } ( x )$ represents a depth- $( t + 1 )$ residual network which is a deeper counterpart of the depth- $\mathbf { \nabla } \cdot t$ residual network $o _ { t } ( x )$ , it is natural to assume that the deeper residual network improves slightly upon the shallower residual network. When $\tilde { \gamma } _ { t }$ is close to 1, $\tilde { \gamma } _ { t + 1 } ^ { 2 }$ only needs to be slightly better than $\tilde { \gamma } _ { t } ^ { 2 }$ as the denominator $1 - \tilde { \gamma } _ { t } ^ { 2 }$ is small. The assumption of the covariance between $\exp ( - y o _ { t + 1 } ( x ) )$ and $\exp ( y o _ { t } ( x ) )$ being non-positive is suggesting that the weak module classifiers should not be adversarial, which may be a reasonable assumption for ResNet.
|
| 109 |
+
|
| 110 |
+
# 4.2 BOOSTRESNET
|
| 111 |
+
|
| 112 |
+
We now propose a novel training algorithm for telescoping sum boosting under binary-class classification as in Algorithm 1. In particular, we introduce a training procedure for deep ResNet in Algorithm 1 & 2, BoostResNet, which only requires sequential training of shallow ResNets.
|
| 113 |
+
|
| 114 |
+
The training algorithm is a module-by-module procedure following a bottom-up fashion as the outputs of the $t$ -th module $g _ { t + 1 } ( x )$ are fed as the training examples to the next $t + 1$ -th module. Each of the shallow ResNet $f _ { t } ( g _ { t } ( x ) ) + g _ { t } ( x )$ is combined with an auxiliary linear classifier $\mathbf { w } _ { t + 1 }$ to form a hypothesis module $o _ { t + 1 } ( x )$ . The weights of the ResNet are trained on these shallow ResNets. The telescoping sum construction is the key for successful interpretation of ResNet as ensembles of weak module classifiers. The innovative introduction of the auxiliary linear classifiers $\left( \mathbf { w } _ { t + 1 } \right)$ is the key solution for successful multi-channel representation boosting with theoretical guarantees. Auxiliary linear classifiers are only used to guide training, and they are not included in the model (proved in Lemma 3.2). This is the fundamental difference between BoostResNet and AdaNet. AdaNet (Cortes et al., 2016) maps the feature vectors (hidden layer representations) to a classifier space and boosts the weak classifiers. Our framework is a multi-channel representation (or information) boosting rather than a traditional classifier boosting. Traditional boosting theory does not apply in our setting.
|
| 115 |
+
|
| 116 |
+
Input: $m$ labeled samples $[ ( x _ { i } , y _ { i } ) ] _ { m }$ where $y _ { i } \in \{ - 1 , + 1 \}$ and a threshold $\gamma$
|
| 117 |
+
Output: $\{ f _ { t } ( \cdot ) , \forall t \}$ and $\mathbf { w } _ { T + 1 }$ $\triangleright$ Discard $\mathbf { w } _ { t + 1 }$ , $\forall t \ne T$
|
| 118 |
+
1: Initialize $t \gets 0$ , $\tilde { \gamma _ { 0 } } \gets 0$ , $\alpha _ { 0 } \gets 0$ , $o _ { 0 } ( x ) \gets 0$
|
| 119 |
+
2: Initialize sample weights at round 0: $D _ { 0 } ( i ) \gets 1 / m , \forall i \in [ m ]$
|
| 120 |
+
3: while $\gamma _ { t } > \gamma$ do
|
| 121 |
+
4: $\begin{array} { r l r } & { \mathsf { \overline { { f } } } _ { t } ( \cdot ) , \alpha _ { t + 1 } , \mathsf { w } _ { t + 1 } , o _ { t + 1 } ( x ) \gets \mathsf { A l g o r i t h m } 2 ( g _ { t } ( x ) , D _ { t } , o _ { t } ( x ) , \alpha _ { t } ) } & \\ & { \mathsf { C o m p u t e } \gamma _ { t } \gets \sqrt { \frac { \tilde { \gamma } _ { t + 1 } ^ { 2 } - \tilde { \gamma } _ { t } ^ { 2 } } { 1 - \tilde { \gamma } _ { t } ^ { 2 } } } \qquad } & { \mathsf { s w h e r e } \tilde { \gamma } _ { t + 1 } \gets \mathbb { E } _ { i \sim D _ { t } } \bigl [ y _ { i } o _ { t + 1 } ( x _ { i } ) \bigr ] } & \\ & { \mathsf { U p d a t e } D _ { t + 1 } ( i ) \gets \frac { D _ { t } ( i ) \exp ( - y _ { i } h _ { t } ( x _ { i } ) ) } { \sum _ { t = 1 } ^ { m } D _ { t } ( i ) \exp [ - y _ { i } h _ { t } ( x _ { i } ) ] } \qquad } & { \mathsf { s w h e r e } h _ { t } ( x ) = \alpha _ { t + 1 } o _ { t + 1 } ( x ) - \alpha _ { t } o _ { t } ( x ) } \\ & { \cdot \qquad , \quad \cdot } & \end{array}$
|
| 122 |
+
5:
|
| 123 |
+
6:
|
| 124 |
+
7: t t + 1
|
| 125 |
+
8: end while
|
| 126 |
+
9: $T \gets t - 1$
|
| 127 |
+
|
| 128 |
+
$$
|
| 129 |
+
\operatorname* { P r } _ { i \sim S } \left( \tilde { \sigma } \left( \sum _ { t } h _ { t } \left( x _ { i } \right) \right) \neq y _ { i } \right) \leq e ^ { - \frac { 1 } { 2 } T \gamma ^ { 2 } }
|
| 130 |
+
$$
|
| 131 |
+
|
| 132 |
+
# Algorithm 2 BoostResNet: oracle implementation for training a ResNet module
|
| 133 |
+
|
| 134 |
+
$i f \forall t \in [ T ]$ the weak module classifier $h _ { t } ( x )$ satisfies the $\gamma$ -weak learning condition defined in Definition 4.1.
|
| 135 |
+
|
| 136 |
+
The training error of Algorithms 1 and 2 is guaranteed to decay exponentially with the ResNet depth even when each hypothesis module $o _ { t + 1 } ( x )$ performs slightly better than its previous hypothesis module $o _ { t } ( x )$ (i.e., $\gamma > 0$ ). Refer to Appendix $\mathrm { F }$ for the algorithm and theoretical guarantees for multiclass classification.
|
| 137 |
+
|
| 138 |
+
# 4.3 ORACLE IMPLEMENTATION FOR RESNET
|
| 139 |
+
|
| 140 |
+
In Algorithm 2, the implementation of the oracle at line 1 is equivalent to
|
| 141 |
+
|
| 142 |
+
$$
|
| 143 |
+
\left( f _ { t } , \alpha _ { t + 1 } , \mathbf { w } _ { t + 1 } \right) = \arg \operatorname* { m i n } _ { ( f , \alpha , \mathbf { v } ) } { \frac { 1 } { m } } \sum _ { i = 1 } ^ { m } \exp \left( { - y _ { i } \alpha \mathbf { v } ^ { \top } \left[ f \big ( { g _ { t } } ( x _ { i } ) \big ) + g _ { t } ( x _ { i } ) \right] } \right)
|
| 144 |
+
$$
|
| 145 |
+
|
| 146 |
+
The minimization problem over $f$ corresponds to finding the weights of the $t$ -th nonlinear module of the residual network. Auxiliary classifier $\mathbf { w } _ { t + 1 }$ is used to help solve this minimization problem with the guidance of training labels $y _ { i }$ . However, the final neural network model includes none of the auxiliary classifiers, and still follows a standard ResNet structure (proved in Lemma 3.2). In practice, there are various ways to implement Equation (6). For instance, Janzamin et. al. (Janzamin et al., 2015) propose a tensor decomposition technique which decomposes a tensor formed by some transformation of the features $x$ combined with labels $y$ and recovers the weights of a one-hidden layer neural network with guarantees. One can also use back-propagation as numerous works have shown that gradient based training are relatively stable on shallow networks with identity loops (Hardt & Ma, 2016; He et al., 2016).
|
| 147 |
+
|
| 148 |
+
Computational and Memory Efficiency It is worth noting that BoostResNet training is memory efficient as the training process only requires parameters of two consecutive residual blocks to be in memory. Given that the limited GPU memory being one of the main bottlenecks for computational efficiency, BoostResNet requires significantly less training time than $e 2 e B P$ in deep networks as a result of reduced communication overhead and the speed-up in shallow gradient forwarding and back-propagation. Let $M _ { 1 }$ be the memory required for one module, and $M _ { 2 }$ be the memory required for one linear classifier, the memory consumption is $M _ { 1 } + M _ { 2 }$ by BoostResNet and $M _ { 1 } T + M _ { 2 }$ by $e 2 e B P$ . Let the flops needed for gradient update over one module and one linear classifier be $C _ { 1 }$ and $C _ { 2 }$ respectively, the computation cost is $C _ { 1 } + C _ { 2 }$ by BoostResNet and $C _ { 1 } T + C _ { 2 }$ by $e 2 e B P$ .
|
| 149 |
+
|
| 150 |
+
# 4.4 GENERALIZATION ERROR ANALYSIS
|
| 151 |
+
|
| 152 |
+
In this section, we analyze the generalization error to understand the possibility of overfitting under Algorithm 1. The strong classifier or the ResNet is $\begin{array} { r } { F ( x ) = \frac { \sum _ { t } { h _ { t } ( \bar { x } ) } } { \alpha _ { T + 1 } } } \end{array}$ . Now we define the margin for example $( x , y )$ as $y F ( x )$ . For simplicity, we consider MLP-ResNet with $n$ multiple channels and assume that the weight vector connecting a neuron at layer $t$ with its preceding layer neurons is $l _ { 1 }$ norm bounded by $\Lambda _ { t , t - 1 }$ . Recall that there exists a linear classifier w on top, and we restrict to $l _ { 1 }$ norm bounded classifiers, i.e., $\| \mathbf { w } \| _ { 1 } \leq C _ { 0 } < \infty$ . The expected training examples are $l _ { \infty }$ norm bounded $r _ { \infty } \ { \stackrel { \mathrm { d e f } } { = } } \ \mathbb { E } _ { S \sim { \mathcal { D } } } \left[ \operatorname* { m a x } _ { i \in [ m ] } \| x _ { i } \| _ { \infty } \right] < \infty$ . We introduce Corollary 4.3 which follows directly from Lemma 2 of (Cortes et al., 2016).
|
| 153 |
+
|
| 154 |
+
Corollary 4.3. (Cortes et al., 2016) Let $\mathcal { D }$ be a distribution over $\mathcal { X } \times \mathcal { V }$ and $s$ be a sample of $m$ examples chosen independently at random according to $\mathcal { D }$ . With probability at least $1 - \delta$ , for $\theta > 0$
|
| 155 |
+
|
| 156 |
+
the strong classifier $F ( x )$ (ResNet) satisfies that
|
| 157 |
+
|
| 158 |
+
$$
|
| 159 |
+
\operatorname* { P r } _ { D } \left( y F ( x ) \leq 0 \right) \leq \operatorname* { P r } _ { S } \left( y F ( x ) \leq \theta \right) + \frac { 4 C _ { 0 } r _ { \infty } } { \theta } \sqrt { \frac { \log ( 2 n ) } { 2 m } } \sum _ { t = 1 } ^ { T } \Lambda _ { t } + \frac { 2 } { \theta } \sqrt { \frac { \log T } { m } } + \beta ( \theta , m , T , \delta )
|
| 160 |
+
$$
|
| 161 |
+
|
| 162 |
+
$$
|
| 163 |
+
\begin{array} { r } { \stackrel { \mathrm { f } } { = } \prod _ { t ^ { \prime } = 1 } ^ { t } 2 \Lambda _ { t ^ { \prime } , t ^ { \prime } - 1 } { a n d } \beta ( \theta , m , T , \delta ) \stackrel { \mathrm { d e f } } { = } \sqrt { \left\lceil \frac { 4 } { \theta ^ { 2 } } \log \left( \frac { \theta ^ { 2 } m } { \log T } \right) \right\rceil \frac { \log T } { m } + \frac { \log \frac { 2 } { \delta } } { 2 m } } . } \end{array}
|
| 164 |
+
$$
|
| 165 |
+
|
| 166 |
+
From Corollary 4.3, we obtain a generalization error bound in terms of margin bound $\operatorname* { P r } _ { S } \left( y F ( x ) \leq \theta \right)$ and network complexity $\begin{array} { r } { \frac { 4 C _ { 0 } r _ { \infty } } { \theta } \sqrt { \frac { \log ( 2 n ) } { 2 m } } \sum _ { t = 1 } ^ { T } \Lambda _ { t } + \frac { 2 } { \theta } \sqrt { \frac { \log T } { m } } + \beta ( \theta , m , T , \delta ) . } \end{array}$ . Larger margin bound (larger $\theta$ ) contributes positively to generalization accuracy, and $l _ { 1 }$ norm bounded weights (smaller $\Sigma _ { t = 1 } ^ { T } \Lambda _ { t } ~ )$ are beneficial to control network complexity and to avoid overfitting. The dominant term in the network complexity is $\begin{array} { r } { \frac { 4 C _ { 0 } r _ { \infty } } { \theta } \sqrt { \frac { \log ( 2 n ) } { 2 m } } \sum _ { t = 1 } ^ { T } \Lambda _ { t } } \end{array}$ ) PTt=1 Λt which scales as least linearly with the depth $T$ . See appendix $\mathrm { D }$ for the proof.
|
| 167 |
+
|
| 168 |
+
This corollary suggests that stronger weak module classifiers which produce higher accuracy predictions and larger edges, will yield larger margins and suffer less from overfitting. The larger the value of $\theta$ , the smaller the term $\begin{array} { r } { \frac { 4 C _ { 0 } r _ { \infty } } { \theta } \sqrt { \frac { \log ( 2 n ) } { 2 m } } \sum _ { t = 1 } ^ { T } \Lambda _ { t } + \frac { 2 } { \theta } \sqrt { \frac { \log T } { m } } + \beta ( \theta , m , T , \delta ) } \end{array}$ log Tm + β(θ, m, T, δ) is. With larger edges on the training set and when $\tilde { \gamma } _ { T + 1 } < 1$ , we are able to choose larger values of $\theta$ while keeping the error term zero or close to zero.
|
| 169 |
+
|
| 170 |
+
# 5 EXPERIMENTS
|
| 171 |
+
|
| 172 |
+
We compare our proposed BoostResNet algorithm with $e 2 e B P$ training a ResNet on the MNIST (LeCun et al., 1998), street view house numbers (SVHN) (Netzer et al., 2011), and CIFAR10 (Krizhevsky & Hinton, 2009) benchmark datasets. Two different types of architectures are tested: a ResNet where each module is a fully-connected multi-layer perceptron (MLP-ResNet) and a more common, convolutional neural network residual network (CNN-ResNet). In each experiment the architecture of both algorithms is identical, and they are both initialized with the same random seed. As a baseline, we also experiment with standard boosting (AdaBoost.MM Mukherjee & Schapire (2013)) of convolutional modules in appendix H.2 for SVHN and CIFAR-10 datasets. Our experiments are programmed in the Torch deep learning framework for Lua and executed on NVIDIA Tesla P100 GPUs. All models are trained using the Adam variant of SGD Kingma & Ba (2014).
|
| 173 |
+
|
| 174 |
+
MLP-ResNet on MNIST The MNIST database (LeCun et al., 1998) of handwritten digits has a training set of 60,000 examples, and a test set of 10,000 examples. The data contains ten classes. We test the performance of BoostResNet on MLP-ResNet using MNIST dataset, and compare it with $e 2 e B P$ baseline. Each residual block is composed of an MLP with a single, 1024-dimensional hidden layer. The training and test error between BoostResNet and $e 2 e B P$ is in Figure 2 as a function of depth. Surprisingly, we find that training error degrades for $e 2 e B P$ , although the ResNet’s identity loop is supposed to alleviate this problem. Our proposed sequential training procedure, BoostResNet, relieves gradient instability issues, and continues to perform well as depth increases.
|
| 175 |
+
|
| 176 |
+

|
| 177 |
+
Figure 2: Comparison of BoostResNet (ours, blue) and $e 2 e B P$ (baseline, red) on multilayer perceptron residual network on MNIST dataset.
|
| 178 |
+
|
| 179 |
+
CNN-ResNet on SVHN SVHN (Netzer et al., 2011) is a real-world image dataset, obtained from house numbers in Google Street View images. The dataset contains over 600,000 training images, and about 20,000 test images. We fit a 50-layer, 25-residual-block CNN-ResNet using both BoostResNet and $e 2 e B P$ (figure 3a). Each residual block is composed of a CNN using $1 5 \ 3 \ \times \ 3$ filters. We refine the result of BoostResNet by initializing the weights using the result of BoostResNet and run end-to-end back propagation (e2eBP). From figure 3a, our BoostResNet converges much faster (requires much fewer gradient updates) than $e 2 e B P$ . The test accuracy of BoostResNet is comparable with $e 2 e B P$ .
|
| 180 |
+
|
| 181 |
+

|
| 182 |
+
Figure 3: Convergence performance comparison between $e 2 e B P$ and BoostResNet on the SVHN and CIFAR-10 dataset. The vertical dotted line shows when BoostResNet training stopped, and we began refining the network with standard e2eBP training.
|
| 183 |
+
|
| 184 |
+
CNN-ResNet on CIFAR-10 The CIFAR-10 dataset is a benchmark dataset composed of 10 classes of small images, such as animals and vehicles. It consists of 50,000 training images and 10,000 test images. We again fit a 50-layer, 25-residual-block CNN-ResNet using both BoostResNet and $e 2 e B P$ (figure 3b). BoostResNet training converges to the optimal solution faster than $e 2 e B P$ . Unlike in the previous two datasets, the efficiency of BoostResNet comes at a cost when training with CIFAR-10. We find that the test accuracy of the $e 2 e B P$ refined BoostResNet to be slightly lower than that produced by $e 2 e B P$ .
|
| 185 |
+
|
| 186 |
+
Weak Learning Condition Check The weak learning condition (Definition 4.1) inspired by learning theory is checked in Figure 4. The required better than random guessing edge $\gamma _ { t }$ is depicted in Figure 4a, it is always greater than 0 and our weak learning condition is thus non-vacuous. In Figure 4b, the representations we learned using BoostResNet is increasingly better (for this classification task) as the depth increases.
|
| 187 |
+
|
| 188 |
+

|
| 189 |
+
Figure 4: Visualization of required larger than 0 edge $\gamma _ { t }$ and edge for each residual block $\tilde { \gamma } _ { t }$ . The $\mathbf { X }$ -axis represents depth, and the y-axis represents $\gamma _ { t }$ or $\tilde { \gamma } _ { t }$ values. The plots are for a convolutional network composed of 50 residual blocks and trained on the SVHN dataset.
|
| 190 |
+
|
| 191 |
+
# 6 CONCLUSIONS AND FUTURE WORKS
|
| 192 |
+
|
| 193 |
+
Our proposed BoostResNet algorithm achieves exponentially decaying (with the depth $T$ ) training error under the weak learning condition. BoostResNet is much more computationally efficient compared to end-to-end back-propagation in deep ResNet. More importantly, the memory required by BoostResNet is trivial compared to end-to-end back-propagation. It is particularly beneficial given the limited GPU memory and large network depth. Our learning framework is natural for nondifferentiable data. For instance, our learning framework is amenable to take weak learning oracles using tensor decomposition techniques. Tensor decomposition, a spectral learning framework with theoretical guarantees, is applied to learning one layer MLP in (Janzamin et al., 2015). We plan to extend our learning framework to non-differentiable data using general weak learning oracles.
|
| 194 |
+
|
| 195 |
+
# REFERENCES
|
| 196 |
+
|
| 197 |
+
David Balduzzi, Marcus Frean, Lennox Leary, JP Lewis, Kurt Wan-Duo Ma, and Brian McWilliams. The shattered gradients problem: If resnets are the answer, then what is the question? arXiv preprint arXiv:1702.08591, 2017.
|
| 198 |
+
|
| 199 |
+
Yoshua Bengio, Patrice Simard, and Paolo Frasconi. Learning long-term dependencies with gradient descent is difficult. IEEE transactions on neural networks, 5(2):157–166, 1994.
|
| 200 |
+
|
| 201 |
+
Yoshua Bengio, Nicolas Le Roux, Pascal Vincent, Olivier Delalleau, and Patrice Marcotte. Convex neural networks. Advances in neural information processing systems, 18:123, 2006.
|
| 202 |
+
|
| 203 |
+
Corinna Cortes, Mehryar Mohri, and Umar Syed. Deep boosting. In Proceedings of the 31st International Conference on Machine Learning (ICML-14), pp. 1179–1187, 2014.
|
| 204 |
+
|
| 205 |
+
Corinna Cortes, Xavi Gonzalvo, Vitaly Kuznetsov, Mehryar Mohri, and Scott Yang. Adanet: Adaptive structural learning of artificial neural networks. arXiv preprint arXiv:1607.01097, 2016.
|
| 206 |
+
|
| 207 |
+
John Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and stochastic optimization. Journal of Machine Learning Research, 12(Jul):2121–2159, 2011.
|
| 208 |
+
|
| 209 |
+
Yoav Freund and Robert E Schapire. A desicion-theoretic generalization of on-line learning and an application to boosting. In European conference on computational learning theory, pp. 23–37. Springer, 1995.
|
| 210 |
+
|
| 211 |
+
Ross Girshick. Fast r-cnn. In Proceedings of the IEEE International Conference on Computer Vision, pp. 1440–1448, 2015.
|
| 212 |
+
|
| 213 |
+
Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 580–587, 2014.
|
| 214 |
+
|
| 215 |
+
Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Aistats, volume 9, pp. 249–256, 2010.
|
| 216 |
+
|
| 217 |
+
Moritz Hardt and Tengyu Ma. Identity matters in deep learning. arXiv preprint arXiv:1611.04231, 2016.
|
| 218 |
+
|
| 219 |
+
Kaiming He and Jian Sun. Convolutional neural networks at constrained time cost. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 5353–5360, 2015.
|
| 220 |
+
|
| 221 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Spatial pyramid pooling in deep convolutional networks for visual recognition. In European Conference on Computer Vision, pp. 346–361. Springer, 2014.
|
| 222 |
+
|
| 223 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In Proceedings of the IEEE international conference on computer vision, pp. 1026–1034, 2015.
|
| 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, 2016.
|
| 226 |
+
|
| 227 |
+
Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015.
|
| 228 |
+
|
| 229 |
+
Majid Janzamin, Hanie Sedghi, and Anima Anandkumar. Beating the perils of non-convexity: Guaranteed training of neural networks using tensor methods. arXiv preprint arXiv:1506.08473, 2015.
|
| 230 |
+
|
| 231 |
+
Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 232 |
+
|
| 233 |
+
Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. 2009.
|
| 234 |
+
|
| 235 |
+
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.
|
| 236 |
+
|
| 237 |
+
Yann LeCun, Bernhard Boser, John S Denker, Donnie Henderson, Richard E Howard, Wayne Hubbard, and Lawrence D Jackel. Backpropagation applied to handwritten zip code recognition. Neural computation, 1(4):541–551, 1989.
|
| 238 |
+
|
| 239 |
+
Yann LeCun, L´eon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
|
| 240 |
+
|
| 241 |
+
Yann A LeCun, L´eon Bottou, Genevieve B Orr, and Klaus-Robert M ¨uller. Efficient backprop. In Neural networks: Tricks of the trade, pp. 9–48. Springer, 2012.
|
| 242 |
+
|
| 243 |
+
Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3431–3440, 2015.
|
| 244 |
+
|
| 245 |
+
Hrushikesh N Mhaskar and Tomaso Poggio. Deep vs. shallow networks: An approximation theory perspective. Analysis and Applications, 14(06):829–848, 2016.
|
| 246 |
+
|
| 247 |
+
Indraneel Mukherjee and Robert E Schapire. A theory of multiclass boosting. Journal of Machine Learning Research, 14(Feb):437–497, 2013.
|
| 248 |
+
|
| 249 |
+
Yurii Nesterov. A method for unconstrained convex minimization problem with the rate of convergence o (1/k2). In Doklady an SSSR, volume 269, pp. 543–547, 1983.
|
| 250 |
+
|
| 251 |
+
Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. In NIPS workshop on deep learning and unsupervised feature learning, volume 2011, pp. 5, 2011.
|
| 252 |
+
|
| 253 |
+
Ning Qian. On the momentum term in gradient descent learning algorithms. Neural networks, 12 (1):145–151, 1999.
|
| 254 |
+
|
| 255 |
+
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, pp. 91–99, 2015.
|
| 256 |
+
|
| 257 |
+
Reuven Y Rubinstein and Dirk P Kroese. The cross-entropy method: a unified approach to combinatorial optimization, Monte-Carlo simulation and machine learning. Springer Science & Business Media, 2013.
|
| 258 |
+
|
| 259 |
+
Andrew M Saxe, James L McClelland, and Surya Ganguli. Exact solutions to the nonlinear dynamics of learning in deep linear neural networks. arXiv preprint arXiv:1312.6120, 2013.
|
| 260 |
+
|
| 261 |
+
Pierre Sermanet, David Eigen, Xiang Zhang, Micha¨el Mathieu, Rob Fergus, and Yann LeCun. Overfeat: Integrated recognition, localization and detection using convolutional networks. arXiv preprint arXiv:1312.6229, 2013.
|
| 262 |
+
|
| 263 |
+
Shai Shalev-Shwartz. Selfieboost: A boosting algorithm for deep learning. arXiv preprint arXiv:1411.3436, 2014.
|
| 264 |
+
|
| 265 |
+
Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
|
| 266 |
+
|
| 267 |
+
Rupesh Kumar Srivastava, Klaus Greff, and J¨urgen Schmidhuber. Highway networks. arXiv preprint arXiv:1505.00387, 2015.
|
| 268 |
+
|
| 269 |
+
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.
|
| 270 |
+
|
| 271 |
+
Mark Tygert, Arthur Szlam, Soumith Chintala, Marc’Aurelio Ranzato, Yuandong Tian, and Wojciech Zaremba. Convolutional networks and learning invariant to homogeneous multiplicative scalings. arXiv preprint arXiv:1506.08230, 2015.
|
| 272 |
+
|
| 273 |
+
Andreas Veit, Michael J Wilber, and Serge Belongie. Residual networks behave like ensembles of relatively shallow networks. In Advances in Neural Information Processing Systems, pp. 550–558, 2016.
|
| 274 |
+
|
| 275 |
+
Matthew D Zeiler. Adadelta: an adaptive learning rate method. arXiv preprint arXiv:1212.5701, 2012.
|
| 276 |
+
|
| 277 |
+
Matthew D Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In European conference on computer vision, pp. 818–833. Springer, 2014.
|
| 278 |
+
|
| 279 |
+
# Appendix: Learning Deep ResNet Blocks Sequentially using Boosting Theory
|
| 280 |
+
|
| 281 |
+
# A RELATED WORKS
|
| 282 |
+
|
| 283 |
+
# A.1 LOSS FUNCTION AND ARCHITECTURE SELECTION
|
| 284 |
+
|
| 285 |
+
In neural network optimization, there are many commonly-used loss functions and criteria, e.g., mean squared error, negative log likelihood, margin criterion, etc. There are extensive works (Girshick, 2015; Rubinstein & Kroese, 2013; Tygert et al., 2015) on selecting or modifying loss functions to prevent empirical difficulties such as exploding/vanishing gradients or slow learning (Balduzzi et al., 2017). However, there are no rigorous principles for selecting a loss function in general. Other works consider variations of the multilayer perceptron (MLP) or convolutional neural network (CNN) by adding identity skip connections (He et al., 2016), allowing information to bypass particular layers. However, no theoretical guarantees on the training error are provided despite breakthrough empirical successes. Hardt et al. (Hardt & Ma, 2016) have shown the advantage of identity loops in linear neural networks with theoretical justifications; however the linear setting is unrealistic in practice.
|
| 286 |
+
|
| 287 |
+
# A.2 LEARNING ALGORITHM DESIGN
|
| 288 |
+
|
| 289 |
+
There have been extensive works on improving BP (LeCun et al., 1989). For instance, momentum (Qian, 1999), Nesterov accelerated gradient (Nesterov, 1983), Adagrad (Duchi et al., 2011) and its extension Adadelta (Zeiler, 2012). Most recently, Adaptive Moment Estimation (Adam) (Kingma & Ba, 2014), a combination of momentum and Adagrad, has received substantial success in practice. All these methods are modifications of stochastic gradient descent (SGD), but our method only requires an arbitrary oracle, which does not necessarily need to be an SGD solver, that solves a relatively simple shallow neural network.
|
| 290 |
+
|
| 291 |
+
# B PROOF FOR LEMMA 3.2: THE STRONG LEARNER IS A RESNET
|
| 292 |
+
|
| 293 |
+
Proof. In our algorithm, the input of the next module is the output of the current module
|
| 294 |
+
|
| 295 |
+
$$
|
| 296 |
+
g _ { t + 1 } ( x ) = f _ { t } ( g _ { t } ( x ) ) + g _ { t } ( x ) ,
|
| 297 |
+
$$
|
| 298 |
+
|
| 299 |
+
we thus obtain that each weak learning module is
|
| 300 |
+
|
| 301 |
+
$$
|
| 302 |
+
\begin{array} { r l } & { h _ { t } ( x ) = \alpha _ { t + 1 } \mathbf { w } _ { t + 1 } ^ { \top } \big ( f _ { t } ( g _ { t } ( x ) ) + g _ { t } ( x ) \big ) - \alpha _ { t } \mathbf { w } _ { t } ^ { \top } g _ { t } ( x ) } \\ & { \qquad = \alpha _ { t + 1 } \mathbf { w } _ { t + 1 } ^ { \top } g _ { t + 1 } ( x ) - \alpha _ { t } \mathbf { w } _ { t } ^ { \top } g _ { t } ( x ) , } \end{array}
|
| 303 |
+
$$
|
| 304 |
+
|
| 305 |
+
and similarly
|
| 306 |
+
|
| 307 |
+
$$
|
| 308 |
+
h _ { t + 1 } = \alpha _ { t + 2 } \mathbf { w } _ { t + 2 } ^ { \top } g _ { t + 2 } ( x ) - \alpha _ { t + 1 } \mathbf { w } _ { t + 1 } ^ { \top } g _ { t + 1 } ( x ) .
|
| 309 |
+
$$
|
| 310 |
+
|
| 311 |
+
Therefore the sum over $h _ { t } ( x )$ and $h _ { t + 1 } ( x )$ is
|
| 312 |
+
|
| 313 |
+
$$
|
| 314 |
+
h _ { t } ( x ) + h _ { t + 1 } ( x ) = \alpha _ { t + 2 } \mathbf { w } _ { t + 2 } ^ { \top } g _ { t + 2 } ( x ) - \alpha _ { t } \mathbf { w } _ { t } ^ { \top } g _ { t } ( x )
|
| 315 |
+
$$
|
| 316 |
+
|
| 317 |
+
And we further see that the weighted summation over all $h _ { t } ( x )$ is a telescoping sum
|
| 318 |
+
|
| 319 |
+
$$
|
| 320 |
+
\sum _ { t = 1 } ^ { T } h _ { t } ( x ) = \alpha _ { T + 1 } w _ { T + 1 } ^ { \top } g _ { T + 1 } ( x ) - \alpha _ { 1 } w _ { 1 } ^ { \top } g _ { 1 } ( x ) = \alpha _ { T + 1 } w _ { T + 1 } ^ { \top } g _ { T + 1 } ( x ) .
|
| 321 |
+
$$
|
| 322 |
+
|
| 323 |
+
# C PROOF FOR THEOREM 4.2: BINARY CLASS TELESCOPING SUM BOOSTING THEORY
|
| 324 |
+
|
| 325 |
+
Proof. We will use a 0-1 loss to measure the training error. In our analysis, the 0-1 loss is bounded by exponential loss.
|
| 326 |
+
|
| 327 |
+
The training error is therefore bounded by
|
| 328 |
+
|
| 329 |
+
$$
|
| 330 |
+
\begin{array} { r l } & { \frac { \displaystyle \sum _ { i = 0 } ^ { n } \left( p ( \alpha + \alpha + 1 ) \pi _ { i } ^ { \top } - 1 ( \alpha ^ { \top } ) + | \alpha | \right) ^ { 2 } } { \displaystyle \sum _ { i = 0 } ^ { n } \left( \alpha + 1 ) \pi _ { i } ^ { \top } - 1 ( \alpha ^ { \top } ) + | \alpha | \right) ^ { 2 } } \mathcal { H } | } \\ & { - \displaystyle \sum _ { i = 1 } ^ { n } \partial _ { 1 } \{ \beta ( \alpha ) ( 1 + \alpha ^ { \top } ) + | \alpha | \} \mathcal { H } ( \alpha \alpha + 1 ) \mathbb { Z } _ { 1 } | \mathcal { H } ( \alpha ) | } \\ & { = \displaystyle \sum _ { i = 1 } ^ { n } \partial _ { 1 } \{ \beta \} \Bigg \{ \tilde { \alpha } \left( \displaystyle \sum _ { i = 1 } ^ { n } \hat { \alpha } _ { i } ( \alpha ) \right) \mathcal { H } \} } \\ & { \leq \displaystyle \sum _ { i = 1 } ^ { n } D _ { 1 } \{ \beta \} \exp \left\{ - w \displaystyle \sum _ { i = 1 } ^ { n } h _ { i } ( \alpha ) \right\} } \\ & { = \displaystyle \sum _ { i = 1 } ^ { n } D _ { 1 } \gamma _ { i = 1 } ( \beta ) \displaystyle \prod _ { i = 1 } ^ { n } \left( \sum _ { i = 1 } ^ { n } \hat { \alpha } _ { i } ( \alpha ) \right) } \\ & { = \displaystyle \sum _ { i = 1 } ^ { n } D _ { 1 } \gamma _ { i = 1 } ( \beta ) \displaystyle \prod _ { i = 1 } ^ { n } \hat { \alpha } _ { i } } \\ & { = \displaystyle \frac { \prod _ { i = 1 } ^ { n } \chi _ { i } } { \displaystyle \sum _ { i = 1 } ^ { n } \chi _ { i } } , } \end{array}
|
| 331 |
+
$$
|
| 332 |
+
|
| 333 |
+
where $Z _ { t } = \sum _ { i = 1 } ^ { m } D _ { t } ( i ) \exp { ( - y _ { i } h _ { t } ( x _ { i } ) ) }$
|
| 334 |
+
|
| 335 |
+
We choose $\alpha _ { t + 1 }$ to minimize $Z _ { t }$ .
|
| 336 |
+
|
| 337 |
+
$$
|
| 338 |
+
\begin{array} { c l } { \displaystyle \frac { \partial Z _ { t } } { \partial \alpha _ { t + 1 } } = - \sum _ { i = 1 } ^ { m } D _ { t } ( i ) y _ { i } o _ { t + 1 } \exp \left( - y _ { i } h _ { t } ( x _ { i } ) \right) } \\ { \displaystyle = - Z _ { t } \sum _ { i = 1 } ^ { m } D _ { t + 1 } ( i ) y _ { i } o _ { t + 1 } ( i ) = 0 } \end{array}
|
| 339 |
+
$$
|
| 340 |
+
|
| 341 |
+
Furthermore each learning module is bounded as we see in the following analysis. We obtain
|
| 342 |
+
|
| 343 |
+
$$
|
| 344 |
+
\begin{array} { r l } & { \quad \sum _ { j = 1 } ^ { n } \hat { \rho } _ { j } ( q ) \gets \hat { \rho } _ { j } ( \hat { \rho } _ { j } ^ { ( 1 ) } , q ) \gets \hat { \rho } _ { j } ( \hat { \rho } _ { j } ^ { ( 1 ) } , q ) \gets \hat { \rho } _ { j } ( \hat { \rho } _ { j } ^ { ( 1 ) } , q ) } \\ & { = \sum _ { j = 1 } ^ { n } \hat { \rho } _ { j } ( q ) \gets \hat { \rho } _ { j } ( \hat { \rho } _ { j } ^ { ( 1 ) } , q ) \gets \hat { \rho } _ { j } ( \hat { \rho } _ { j } ^ { ( 1 ) } , q ) \gets \hat { \rho } _ { j } ( \hat { \rho } _ { j } ^ { ( 1 ) } , q ) } \\ & { \quad \sum _ { j = 1 } ^ { n } \hat { \rho } _ { j } ( \hat { \rho } _ { j } ^ { ( 1 ) } , q ) \gets \frac { \hat { \rho } _ { j } ( \hat { \rho } _ { j } ^ { ( 1 ) } , q ) } { \gets \hat { \rho } _ { j } ( \hat { \rho } _ { j } ^ { ( 1 ) } , q ) } \cdot \hat { \rho } _ { j } ( \hat { \rho } _ { j } ^ { ( 1 ) } , q ) \gets \hat { \rho } _ { j } ( \hat { \rho } _ { j } ^ { ( 1 ) } , q ) \cdot \hat { \rho } _ { j } ( \hat { \rho } _ { j } ^ { ( 1 ) } , q ) \cdot \hat { \rho } _ { j } ( \hat { \rho } _ { j } ^ { ( 1 ) } , q ) } \\ & { = \sum _ { j = 1 } ^ { n } \hat { \rho } _ { j } ( \hat { \rho } _ { j } ^ { ( 1 ) } , q ) \cdot \hat { \rho } _ { j } ( \hat { \rho } _ { j } ^ { ( 1 ) } , q ) \cdot \hat { \rho } _ { j } ( \hat { \rho } _ { j } ^ { ( 1 ) } , q ) \cdot \hat { \rho } _ { j } ( \hat { \rho } _ { j } ^ { ( 1 ) } , q ) \cdot \hat { \rho } _ { j } ( \hat { \rho } _ { j } ^ { ( 1 ) } , q ) \cdot \hat { \rho } _ { j } ( \hat { \rho } _ { j } ^ { ( 1 ) } , q ) \cdot \hat { \rho } _ { j } ( \hat { \rho } _ { j } ^ { ( 1 ) } , q ) } \\ & \quad \sum _ { j = 1 } ^ { n } \hat \rho \end{array}
|
| 345 |
+
$$
|
| 346 |
+
|
| 347 |
+
Equation (24) is due to the non-positive correlation between $\exp ( - y o _ { t + 1 } ( x ) )$ and $\exp ( y o _ { t } ( x ) )$ . Jensen’s inequality in Equation (27) holds only when $| y _ { i } o _ { t + 1 } ( x _ { i } ) | \le 1$ which is satisfied by the definition of the weak learning module.
|
| 348 |
+
|
| 349 |
+
The algorithm chooses $\alpha _ { t + 1 }$ to minimize $Z _ { t }$ . We achieve an upper bound on $Z _ { t }$ , $\begin{array} { r } { \sqrt { \frac { 1 - \tilde { \gamma } _ { t } ^ { 2 } } { 1 - \tilde { \gamma } _ { t - 1 } ^ { 2 } } } } \end{array}$ by minimizing the bound in Equation (30)
|
| 350 |
+
|
| 351 |
+
$$
|
| 352 |
+
\begin{array} { r l } & { Z _ { t } \leq \left( \frac { e ^ { - \alpha _ { t + 1 } } + e ^ { \alpha _ { t + 1 } } } { 2 } + \frac { e ^ { - \alpha _ { t + 1 } } - e ^ { \alpha _ { t + 1 } } } { 2 } \tilde { \gamma } _ { t } \right) \frac { e ^ { \alpha _ { t } } + e ^ { - \alpha _ { t } } } { 2 } \bigg | _ { \alpha _ { t + 1 } = \frac { 1 } { 2 } \ln \left( \frac { 1 + \tilde { \gamma } _ { t } } { 1 - \tilde { \gamma } _ { t } } \right) } } \\ & { \quad = \sqrt { \frac { 1 - \tilde { \gamma } _ { t } ^ { 2 } } { 1 - \tilde { \gamma } _ { t - 1 } ^ { 2 } } } = \sqrt { 1 - \gamma _ { t } ^ { 2 } } } \end{array}
|
| 353 |
+
$$
|
| 354 |
+
|
| 355 |
+
Therefore over the $T$ modules, the training error is upper bounded as follows
|
| 356 |
+
|
| 357 |
+
$$
|
| 358 |
+
\operatorname* { P r } _ { i \sim D } \left( p ( \alpha _ { T + 1 } w _ { T + 1 } ^ { \top } g _ { T + 1 } ( x _ { i } ) ) \right) \neq y _ { i } ) \leq \prod _ { t = 1 } ^ { T } \sqrt { 1 - \gamma _ { t } ^ { 2 } } \leq \prod _ { t = 1 } ^ { T } \sqrt { 1 - \gamma ^ { 2 } } = \exp \left( - \frac { 1 } { 2 } T \gamma ^ { 2 } \right)
|
| 359 |
+
$$
|
| 360 |
+
|
| 361 |
+
Overall, Algorithm 1 leads us to consistent learning of ResNet.
|
| 362 |
+
|
| 363 |
+
# D PROOF FOR COROLLARY 4.3: GENERALIZATION BOUND
|
| 364 |
+
|
| 365 |
+
Rademacher complexity technique is powerful for measuring the complexity of $\mathcal { H }$ any family of functions $h : \mathcal { X } \mathbb { R }$ , based on easiness of fitting any dataset using classifiers in $\mathcal { H }$ (where $\mathcal { X }$ is any space). Let $S = < x _ { 1 } , \dots , x _ { m } >$ be a sample of $m$ points in $\mathcal { X }$ . The empirical Rademacher complexity of $\mathcal { H }$ with respect to $S$ is defined to be
|
| 366 |
+
|
| 367 |
+
$$
|
| 368 |
+
\mathcal { R } _ { S } ( \mathcal { H } ) \stackrel { \mathrm { d e f } } { = } \mathbb { E } _ { \sigma } \left[ \operatorname* { s u p } _ { h \in \mathcal { H } } \frac { 1 } { m } \sum _ { i = 1 } ^ { m } \sigma _ { i } h ( x _ { i } ) \right]
|
| 369 |
+
$$
|
| 370 |
+
|
| 371 |
+
where $\sigma$ is the Rademacher variable. The Rademacher complexity on $m$ data points drawn from distribution $\mathcal { D }$ is defined by
|
| 372 |
+
|
| 373 |
+
$$
|
| 374 |
+
\mathcal { R } _ { m } ( \mathcal { H } ) = \mathbb { E } _ { S \sim \mathcal { D } } \left[ \mathcal { R } _ { S } ( \mathcal { H } ) \right] .
|
| 375 |
+
$$
|
| 376 |
+
|
| 377 |
+
Proposition D.1. (Theorem 1 Cortes et al. (2014)) Let $\mathcal { H }$ be a hypothesis set admitting a decomposition $\mathcal { H } = \cup _ { i = 1 } ^ { l } \mathcal { H } _ { i }$ for some $l > 1$ . $\mathcal { H } _ { i }$ are distinct hypothesis sets. Let $S$ be a random sequence of m points chosen independently from $\mathcal { X }$ according to some distribution $\mathcal { D }$ . For $\theta > 0$ and any $\begin{array} { r } { \dot { H } = \sum _ { t = 1 } ^ { T } h _ { t } } \end{array}$ , with probability at least $1 - \delta$ ,
|
| 378 |
+
|
| 379 |
+
$$
|
| 380 |
+
\begin{array} { c } { \displaystyle \operatorname* { P r } _ { \mathcal { D } } \left( y H ( x ) \leq 0 \right) \leq \operatorname* { P r } _ { S } \left( y H ( x ) \leq \theta \right) + \displaystyle \frac { 4 } { \theta } \sum _ { t = 1 } ^ { T } \mathcal { R } _ { m } ( \mathcal { H } _ { k _ { t } } ) + \frac { 2 } { \theta } \sqrt { \frac { \log l } { m } } } \\ { \displaystyle + \sqrt { \lceil \frac { 4 } { \theta ^ { 2 } } \log \left( \frac { \theta ^ { 2 } m } { \log l } \right) \rceil \frac { \log l } { m } + \frac { \log \frac { 2 } { \delta } } { 2 m } } } \end{array}
|
| 381 |
+
$$
|
| 382 |
+
|
| 383 |
+
for all $h _ { t } \in \mathcal { H } _ { k _ { t } }$
|
| 384 |
+
|
| 385 |
+
Lemma D.2. Let $\tilde { h } = \tilde { \mathbf { w } } ^ { \top } \tilde { \mathbf { f } }$ , where $\tilde { \mathbf { w } } \in \mathbb { R } ^ { n } , \tilde { \mathbf { f } } \in \mathbb { R } ^ { n }$ . Let $\tilde { \mathcal { H } }$ and $\tilde { \mathcal { F } }$ be two hypothesis sets, and $\tilde { h } \in \tilde { \mathcal { H } } , \tilde { \mathbf { f } } _ { j } \in \tilde { \mathcal { F } } , \forall j \in [ n ]$ . The Rademacher complexity of $\tilde { \mathcal { H } }$ and $\tilde { \mathcal { F } }$ with respect to m points from $\mathcal { D }$ are related as follows
|
| 386 |
+
|
| 387 |
+
$$
|
| 388 |
+
\mathcal { R } _ { m } ( \tilde { \mathcal { H } } ) = \| \tilde { \mathbf { w } } \| _ { 1 } \mathcal { R } _ { m } ( \tilde { \mathcal { F } } ) .
|
| 389 |
+
$$
|
| 390 |
+
|
| 391 |
+
# D.1 RESNET MODULE HYPOTHESIS SPACE
|
| 392 |
+
|
| 393 |
+
Let $n$ be the number of channels in ResNet, i.e., the number of input or output neurons in a module $\mathbf { f } _ { t } ( \mathbf { g } _ { t } ( x ) )$ . We have proved that ResNet is equivalent as
|
| 394 |
+
|
| 395 |
+
$$
|
| 396 |
+
F ( x ) = \mathbf { w } ^ { \top } \sum _ { t = 1 } ^ { T } \mathbf { f } ( \mathbf { g } _ { t } ( x ) )
|
| 397 |
+
$$
|
| 398 |
+
|
| 399 |
+
We define the family of functions that each neuron $f _ { t , j } , \forall j \in [ n ]$ belong to as
|
| 400 |
+
|
| 401 |
+
$$
|
| 402 |
+
\mathcal { F } _ { t } = \{ x \to \mathbf { u } _ { t - 1 , j } ( \sigma \circ \mathbf { f } _ { t - 1 } ) ( x ) : \mathbf { u } _ { t - 1 , j } \in \mathbb { R } ^ { n } , \| \mathbf { u } _ { t - 1 , j } \| _ { 1 } \leq \Lambda _ { t , t - 1 } , \mathbf { f } _ { t - 1 , i } \in \mathcal { F } _ { t - 1 } \}
|
| 403 |
+
$$
|
| 404 |
+
|
| 405 |
+
where $\mathbf { u } _ { t - 1 , j }$ denotes the vector of weights for connections from unit $j$ to a lower layer $t - 1$ , $\sigma \circ \mathbf { f } _ { t - 1 }$ denotes element-wise nonlinear transformation on $\mathbf { f } _ { t - 1 }$ . The output layer of each module is connected to the output layer of previous module. We consider 1-layer modules for convenience of analysis.
|
| 406 |
+
|
| 407 |
+
Therefore in ResNet with probability at least $1 - \delta$ ,
|
| 408 |
+
|
| 409 |
+
$$
|
| 410 |
+
\begin{array} { l } { \displaystyle \operatorname* { P r } _ { \mathcal { D } } \left( y F ( \boldsymbol { x } ) \leq 0 \right) \leq \operatorname* { P r } _ { S } \left( y F ( \boldsymbol { x } ) \leq \theta \right) + \frac { 4 } { \theta } \sum _ { t = 1 } ^ { T } \lVert \mathbf { w } \rVert _ { 1 } \mathcal { R } _ { m } ( \mathcal { F } _ { t } ) + \frac { 2 } { \theta } \sqrt { \frac { \log T } { m } } } \\ { \displaystyle \qquad + \sqrt { \lceil \frac { 4 } { \theta ^ { 2 } } \log \left( \frac { \theta ^ { 2 } m } { \log T } \right) \rceil \frac { \log T } { m } + \frac { \log \frac { 2 } { \delta } } { 2 m } } } \end{array}
|
| 411 |
+
$$
|
| 412 |
+
|
| 413 |
+
for all $f _ { t } \in \mathcal { F } _ { t }$
|
| 414 |
+
|
| 415 |
+
Define the maximum infinity norm over samples as $r _ { \infty } \stackrel { \mathrm { d e f } } { = } \mathbb { E } _ { S \sim \mathcal { D } } \left[ \operatorname* { m a x } _ { i \in [ m ] } \lVert x _ { i } \rVert _ { \infty } \right]$ and the product of $l _ { 1 }$ norm bound on weights as $\begin{array} { r } { \Lambda _ { t } \ \stackrel { \mathrm { d e f } } { = } \ \prod _ { t ^ { \prime } = 1 } ^ { t } 2 \Lambda _ { t ^ { \prime } , t ^ { \prime } - 1 } } \end{array}$ . According to lemma 2 of Cortes et al. (2016), the empirical Rademacher complexity is bounded as a function of $r _ { \infty }$ , $\Lambda _ { t }$ and $n$ :
|
| 416 |
+
|
| 417 |
+
$$
|
| 418 |
+
\mathcal { R } _ { m } ( \mathcal { F } _ { t } ) \leq r _ { \infty } \Lambda _ { t } \sqrt { \frac { \log ( 2 n ) } { 2 m } }
|
| 419 |
+
$$
|
| 420 |
+
|
| 421 |
+
Overall, with probability at least $1 - \delta$ ,
|
| 422 |
+
|
| 423 |
+
$$
|
| 424 |
+
\begin{array} { c } { { \displaystyle { \operatorname* { P r } _ { \mathcal { D } } \left( y F ( x ) \leq 0 \right) \leq \operatorname* { P r } _ { S } \left( y F ( x ) \leq \theta \right) + \frac { 4 \| \mathbf { w } \| _ { 1 } r _ { \infty } \sqrt { \frac { \log ( 2 n ) } { 2 m } } } { \theta } \sum _ { t = 1 } ^ { T } \Lambda _ { t } } } } \\ { { + \displaystyle { \frac { 2 } { \theta } \sqrt { \frac { \log T } { m } } + \sqrt { \lceil \frac { 4 } { \theta ^ { 2 } } \log \left( \frac { \theta ^ { 2 } m } { \log T } \right) \rceil \frac { \log T } { m } + \frac { \log \frac { 2 } { \delta } } { 2 m } } } } } \end{array}
|
| 425 |
+
$$
|
| 426 |
+
|
| 427 |
+
for all $f _ { t } \in \mathcal { F } _ { t }$ .
|
| 428 |
+
|
| 429 |
+
# E PROOF FOR THEOREM E: MARGIN AND GENERALIZATION BOUND
|
| 430 |
+
|
| 431 |
+
Theorem E.1. [ Generalization error bound ] Given algorithm 1, the fraction of training examples with margin at most $\theta$ is at most $\begin{array} { r } { ( 1 + \frac { \bar { 2 } } { \sqrt { \bar { \gamma } _ { T + 1 } } } ) ^ { \frac { \theta } { 2 } } \exp ( - \frac { 1 } { 2 } \gamma ^ { 2 } T ) } \end{array}$ . And the generalization error $\mathrm { P r } _ { D } ( y F ( x ) \leq 0 )$ satisfies
|
| 432 |
+
|
| 433 |
+
$$
|
| 434 |
+
\begin{array} { l } { \displaystyle \operatorname* { P r } _ { D } ( y F ( x ) \leq 0 ) \leq ( 1 + \frac { 2 } { \frac { 1 } { \overline { { \gamma } } _ { T + 1 } } - 1 } ) ^ { \frac { \theta } { 2 } } \exp ( - \frac { 1 } { 2 } \gamma ^ { 2 } T ) } \\ { \displaystyle \phantom { \frac { 1 } { \theta } } + \frac { 4 C _ { 0 } r _ { \infty } } { \theta } \sqrt { \frac { \log ( 2 n ) } { 2 m } } \sum _ { t = 1 } ^ { T } \Lambda _ { t } + \frac { 2 } { \theta } \sqrt { \frac { \log T } { m } } + \beta ( \theta , m , T , \delta ) } \end{array}
|
| 435 |
+
$$
|
| 436 |
+
|
| 437 |
+
Now the proof for Theorem $\mathrm { E }$ is the following.
|
| 438 |
+
|
| 439 |
+
Proof. The fraction of examples in sample set $S$ being smaller than $\theta$ is bounded
|
| 440 |
+
|
| 441 |
+
$$
|
| 442 |
+
\begin{array} { r l } { { \operatorname* { P r } ( y ^ { F } ( x ) \leq \theta ) \leq \frac { 1 } { m } \sum _ { i = 1 } ^ { m } \mathbf { 1 } \{ y _ { i } F ( x _ { i } ) \leq \theta \} } } \\ & { = \frac { 1 } { m } \sum _ { i = 1 } ^ { m } \mathbf { 1 } \{ y _ { i } ( x _ { i } ) \leq \theta \alpha _ { T + 1 } \} } \\ & { \leq \frac { 1 } { m } \sum _ { i = 1 } ^ { m } \exp ( - y _ { k } ) \sum _ { k \in \{ x _ { i } \} } \delta ( \alpha _ { T + 1 } ) + \theta \alpha _ { T + 1 } ) } \\ & { = \exp ( \theta \alpha _ { T + 1 } ) \displaystyle \frac { 1 } { m } \sum _ { i = 1 } ^ { m } \exp ( - y _ { k } ) \sum _ { \ell = 1 } ^ { T } h _ { \ell } ( x _ { i } ) \} } \\ & { = \exp ( \theta \alpha _ { T + 1 } ) \prod _ { i = 1 } ^ { m } z _ { i } } \\ & { = \exp ( \theta \alpha _ { T + 1 } ) \prod _ { i = 1 } ^ { T } z _ { i } } \end{array}
|
| 443 |
+
$$
|
| 444 |
+
|
| 445 |
+
To bound $\begin{array} { r } { \exp ( \theta \alpha _ { T + 1 } ) = \sqrt { ( \frac { 1 + \tilde { \gamma } _ { T + 1 } } { 1 - \tilde { \gamma } _ { T + 1 } } ) ^ { \theta } } } \end{array}$ , we first bound $\tilde { \gamma } _ { T + 1 }$ : We know that $\begin{array} { r } { \sum _ { t = 1 } ^ { T } \prod _ { t ^ { \prime } = t + 1 } ^ { T } ( 1 - } \end{array}$ $\gamma _ { t ^ { \prime } } ^ { 2 } ) \gamma _ { t } ^ { 2 } \leq ( 1 - \gamma ^ { 2 } ) ^ { T - t } \gamma ^ { 2 }$ for all $\forall \gamma _ { t } \geq \gamma ^ { 2 } + \epsilon$ if $\begin{array} { r } { \gamma ^ { 2 } \geq \frac { 1 - \epsilon } { 2 } } \end{array}$ . Therefore $\forall \gamma _ { t } \geq \gamma ^ { 2 } + \epsilon$ and $\begin{array} { r } { \gamma ^ { 2 } \geq \frac { 1 - \epsilon } { 2 } } \end{array}$
|
| 446 |
+
|
| 447 |
+
$$
|
| 448 |
+
\begin{array} { r l } & { \tilde { \gamma } _ { T + 1 } ^ { 2 } = ( 1 - \gamma _ { T } ^ { 2 } ) ^ { \tilde { \gamma } _ { T } ^ { 2 } } + \gamma _ { T } ^ { 2 } } \\ & { \quad = \displaystyle \sum _ { \lbrace t = 1 } ^ { T } \prod _ { \substack { v = t + 1 } } ^ { T } ( 1 - \gamma _ { t } ^ { 2 } ) \gamma _ { t } ^ { 2 } + \prod _ { t = 1 } ^ { T } ( 1 - \gamma _ { t } ^ { 2 } ) \tilde { \gamma } _ { 1 } ^ { 2 } } \\ & { \quad \le \displaystyle \sum _ { \lbrace t = 1 } ^ { T } ( 1 - \gamma ^ { 2 } ) ^ { T - t } \gamma ^ { 2 } + ( 1 - \gamma ^ { 2 } ) ^ { T } \tilde { \gamma } _ { 1 } ^ { 2 } } \\ & { \quad = \displaystyle \sum _ { t = 0 } ^ { T - 1 } ( 1 - \gamma ^ { 2 } ) ^ { t } \gamma ^ { 2 } + ( 1 - \gamma ^ { 2 } ) ^ { T } \tilde { \gamma } _ { 1 } ^ { 2 } } \\ & { \quad = 1 - ( 1 - \gamma ^ { 2 } ) ^ { T } + ( 1 - \gamma ^ { 2 } ) ^ { T } \tilde { \gamma } _ { 1 } ^ { 2 } } \\ & { \quad = 1 - ( 1 - \gamma ^ { 2 } ) ^ { T } + ( 1 - \gamma ^ { 2 } ) ^ { T } \tilde { \gamma } _ { 1 } ^ { 2 } } \\ & { \quad = 1 - ( 1 - \gamma _ { 1 } ^ { 2 } ) ( 1 - \gamma ^ { 2 } ) ^ { T } } \end{array}
|
| 449 |
+
$$
|
| 450 |
+
|
| 451 |
+
Therefore
|
| 452 |
+
|
| 453 |
+
$$
|
| 454 |
+
\begin{array} { r l } { { \operatorname* { P r } ( y \mid \boldsymbol { F } ( \boldsymbol { x } ) \leq \theta ) \leq \exp ( \theta \alpha _ { T + 1 } ) \sum _ { t = 1 } ^ { T } Z _ { t } } } \\ & { = ( \frac { 1 + \widetilde { \gamma } _ { T + 1 } } { 1 - \widetilde { \gamma } _ { T + 1 } } ) ^ { \frac { T } { 2 } } \prod _ { t } z _ { t } } \\ & { = ( \frac { 1 + \widetilde { \gamma } _ { T + 1 } } { 1 - \widetilde { \gamma } _ { T + 1 } } ) ^ { \frac { T } { 2 } } \prod _ { t = 1 } ^ { T } \sqrt { 1 - \gamma _ { t } ^ { 2 } } } \\ & { = ( 1 + \frac { 2 } { \frac { 2 } { \widetilde { \gamma } _ { T + 1 } } - 1 } ) ^ { \frac { T } { 2 } } \exp ( - \frac { 1 } { 2 } ) ^ { 2 } T ) } \\ & { \leq ( 1 + \frac { 2 } { \frac { 2 } { \widetilde { \gamma } _ { T + 1 } } ( 1 - \gamma _ { t } ^ { 2 } ) ( 1 - \gamma ^ { 2 } ) ^ { T } } - 1 ) ^ { \frac { 3 } { 6 } } \exp ( - \frac { 1 } { 2 } ) ^ { 2 } T ) } \end{array}
|
| 455 |
+
$$
|
| 456 |
+
|
| 457 |
+
As $T \to \infty$ , $\operatorname* { P r } s ( y F ( x ) \leq \theta ) \leq 0$ as $\exp ( - \frac { 1 } { 2 } \gamma ^ { 2 } T )$ decays faster than $\big ( 1 + \frac { 2 } { \sqrt { 1 - ( 1 - \tilde { \gamma } _ { 1 } ^ { 2 } ) ( 1 - \gamma ^ { 2 } ) ^ { T } } } - 1 \big ) ^ { \frac { 2 } { 2 } }$
|
| 458 |
+
|
| 459 |
+
# F TELESCOPING SUM BOOSTING FOR MULTI-CALSS CLASSIFICATION
|
| 460 |
+
|
| 461 |
+
Recall that the weak module classifier is defined as
|
| 462 |
+
|
| 463 |
+
$$
|
| 464 |
+
h _ { t } ( \boldsymbol { x } ) = \alpha _ { t + 1 } o _ { t + 1 } ( \boldsymbol { x } ) - \alpha _ { t } o _ { t } ( \boldsymbol { x } ) \in \mathbb { R } ^ { C } ,
|
| 465 |
+
$$
|
| 466 |
+
|
| 467 |
+
where $o _ { t } ( x ) \in \Delta ^ { C - 1 }$
|
| 468 |
+
|
| 469 |
+
The weak learning condition for multi-class classification is different from the binary classification stated in the previous section, although minimal demands placed on the weak module classifier require prediction better than random on any distribution over the training set intuitively.
|
| 470 |
+
|
| 471 |
+
We now define the weak learning condition. It is again inspired by the slightly better than random idea, but requires a more sophisticated analysis in the multi-class setting.
|
| 472 |
+
|
| 473 |
+
# F.1 COST MATRIX
|
| 474 |
+
|
| 475 |
+
In order to characterize the training error, we introduce the cost matrix $\mathbf { C } \in \mathbb { R } ^ { m \times C }$ where each row denote the cost incurred by classifying that example into one of the $C$ categories. We will bound the training error using exponential loss, and under the exponential loss function defined as in Definition G.1, the optimal cost function used for best possible training error is therefore determined.
|
| 476 |
+
|
| 477 |
+
Lemma F.1. The optimal cost function under the exponential loss is
|
| 478 |
+
|
| 479 |
+
$$
|
| 480 |
+
\mathbf { C } _ { t } ( i , l ) = \left\{ \begin{array} { l l } { \exp \left( s _ { t } ( x _ { i } , l ) - s _ { t } ( x _ { i } , y _ { i } ) \right) } & { i f l \neq y _ { i } } \\ { - \displaystyle \sum _ { l ^ { \prime } \neq y _ { i } } \exp \left( s _ { t } ( x _ { i } , l ^ { \prime } ) - s _ { t } ( x _ { i } , y _ { i } ) \right) } & { i f l = y _ { i } } \end{array} \right.
|
| 481 |
+
$$
|
| 482 |
+
|
| 483 |
+
where $s _ { t } ( x ) = \sum _ { \tau = 1 } ^ { t } h _ { \tau } ( x )$
|
| 484 |
+
|
| 485 |
+
# F.2 WEAK LEARNING CONDITION
|
| 486 |
+
|
| 487 |
+
Definition F.2. Let $\begin{array} { r } { \tilde { \gamma } _ { t + 1 } = \frac { - \displaystyle \sum _ { i = 1 } ^ { m } < { \bf C } _ { t } ( i , : ) , o _ { t + 1 } ( x _ { i } ) > } { \displaystyle \sum _ { i = 1 } ^ { m } \sum _ { l \ne y _ { i } } { \bf C } _ { t } ( i , l ) } } \end{array}$ and $\tilde { \gamma } _ { t } = \frac { - \sum _ { i = 1 } ^ { m } < { \bf C } _ { t - 1 } ( i , : ) , o _ { t } ( x _ { i } ) > } { \displaystyle \sum _ { i = 1 } ^ { m } \sum _ { l \ne y _ { i } } { \bf C } _ { t - 1 } ( i , l ) } $ . A multi-class weak module classifier $h _ { t } ( x ) = \alpha _ { t + 1 } o _ { t + 1 } ( x ) - \alpha _ { t } o _ { t } ( x )$ satisfies the $\gamma$ -weak learning condition if $\frac { \tilde { \gamma } _ { t + 1 } ^ { 2 } - \tilde { \gamma } _ { t } ^ { 2 } } { 1 - \tilde { \gamma } _ { t } ^ { 2 } } \geq \gamma ^ { 2 } > 0$ , and $C o v ( < \mathbf { C } _ { t } ( i , : ) , o _ { t + 1 } ( x _ { i } ) > , < \mathbf { C } _ { t } ( i , : ) , o _ { t + 1 } ( x _ { i } ) > ) \geq 0 .$
|
| 488 |
+
|
| 489 |
+
We propose a novel learning algorithm using the optimal edge-over-random cost function for training ResNet under multi-class classification task as in Algorithm 3.
|
| 490 |
+
|
| 491 |
+
Theorem F.3. The training error of a $T$ -module ResNet using Algorithm 3and 4 decays exponentially with the depth of the ResNet $T$ ,
|
| 492 |
+
|
| 493 |
+
$$
|
| 494 |
+
\frac { C - 1 } { m } \sum _ { i = 1 } ^ { m } L _ { \eta } ^ { e x p } ( s _ { T } ( x _ { i } ) ) \leq ( C - 1 ) e ^ { - \frac { 1 } { 2 } T \gamma ^ { 2 } }
|
| 495 |
+
$$
|
| 496 |
+
|
| 497 |
+
if the weak module classifier $h _ { t } ( x )$ satisfies the $\gamma$ -weak learning condition $\forall t \in [ T ]$ .
|
| 498 |
+
|
| 499 |
+
The exponential loss function defined as in Definition G.1
|
| 500 |
+
|
| 501 |
+
Input: Given $( x _ { 1 } , y _ { 1 } ) , \dotsc ( x _ { m } , y _ { m } )$ where $\overline { { y _ { i } \in \mathcal { Y } = \{ 1 , \dots , C \} } }$ and a threshold $\gamma$
|
| 502 |
+
Output: $\{ f _ { t } ( \cdot ) , \forall t \}$ and $W _ { T + 1 }$ $\triangleright$ Discard $\mathbf { w } _ { t + 1 }$ , $\forall t \ne T$
|
| 503 |
+
1: Initialize $t \gets 0$ , $\tilde { \gamma } _ { 0 } \gets 1$ , $\alpha _ { 0 } \gets 0$ , $o _ { 0 } \mathbf { 0 } \in \mathbb { R } ^ { C }$ , $s _ { 0 } ( x _ { i } , l ) = 0$ , $\forall i \in [ m ]$ , $l \in \mathcal { V }$
|
| 504 |
+
2: Initialize cost function $\mathbf { C } _ { 0 } ( i , l ) \gets \left\{ \begin{array} { l l } { 1 } & { \mathrm { ~ i f ~ } l \ne y _ { i } } \\ { 1 - C } & { \mathrm { ~ i f ~ } l = y _ { i } } \end{array} \right.$
|
| 505 |
+
3: while $\gamma _ { t } > \gamma$ do
|
| 506 |
+
$\begin{array} { r l r l } { { 4 } : \ } & { } & { f _ { t } ( \dot { \bf \bar { \bf \Phi } } ) , \ \alpha _ { t + 1 } , W _ { t + 1 } , o _ { t + 1 } ( x ) \gets \mathrm { A l g o r i t h m ~ } 4 ( g _ { t } ( x ) , { \bf C } _ { t } , o _ { t } ( x ) , \alpha _ { t } ) } \\ { \ } & { } & { \ \Sigma \cdot } & { \ \mathrm { C o m p u t e ~ } \gamma _ { t } \gets \sqrt { \frac { \bar { \bf \Phi } _ { t + 1 } ^ { 2 } - \bar { \bf \Phi } _ { t } ^ { 2 } } { 1 - \bar { \gamma } _ { t } ^ { 2 } } } \qquad } & { \mathrm { ~ \eq v ~ h e r e ~ } \tilde { \gamma } _ { t + 1 } \gets \frac { - \frac { m } { \frac { m } { \frac { m } { \mu - 1 } } } { 1 - \frac { m } { \mu - 1 } } { \Sigma \frac { \mu } { \mu - 1 } } { \Sigma \mu } { \bf C } _ { t } ( i , l ) } } \\ { \ } & { } & { \ \mathrm { t } \cdot } & { \ \mathrm { U p d a t e ~ } s _ { t + 1 } ( x _ { i } , l ) \gets s _ { t } ( x _ { i } , l ) + h _ { t } ( x _ { i } , l ) \mapsto \mathrm { w h e r e ~ } h _ { t } ( x _ { i } , l ) = \alpha _ { t + 1 } o _ { t + 1 } ( x _ { i } , l ) - \alpha _ { t } o _ { t } ( x _ { i } , l ) } \\ { \ } & { } & { \ \mathrm { U p d a t e ~ c o s t ~ f u n c t i o n ~ } { \bf C } _ { t + 1 } ( i , l ) \gets \left\{ \begin{array} { l l } { e ^ { s _ { t + 1 } ( x _ { i } , l ) - s _ { t + 1 } ( x _ { i } , y _ { i } ) } } & { \mathrm { ~ i f ~ } l \ne y _ { i } } \\ { - \displaystyle \sum _ { l ^ { \prime } \neq y _ { i } } e ^ { s _ { t + 1 } ( x _ { i } , l ^ { \prime } ) - s _ { t + 1 } ( x _ { i } , y _ { i } ) } } & { \mathrm { ~ i f ~ } l = y _ { i } } \end{array} \right. } \end{array}$
|
| 507 |
+
8: $t \gets t + 1$
|
| 508 |
+
9: end while
|
| 509 |
+
10: $T \gets t - 1$
|
| 510 |
+
|
| 511 |
+
Algorithm 4 BoostResNet: oracle implementation for training a ResNet module (multi-class)
|
| 512 |
+
|
| 513 |
+
# F.3 ORACLE IMPLEMENTATION
|
| 514 |
+
|
| 515 |
+
We implement an oracle to minimize $Z _ { t } \stackrel { \mathrm { d e f } } { = } \sum _ { i = 1 } ^ { m } \sum _ { l \neq y _ { i } } e ^ { s _ { t } ( x _ { i } , l ) - s _ { t } ( x _ { i } , y _ { i } ) } e ^ { h _ { t } ( x _ { i } , l ) - h _ { t } ( x _ { i } , y _ { i } ) }$ given current state $s _ { t }$ and hypothesis module $o _ { t } ( x )$ . Therefore minimizing $Z _ { t }$ is equivalent to the following.
|
| 516 |
+
|
| 517 |
+
$$
|
| 518 |
+
\begin{array} { l } { \displaystyle \operatorname* { m i n } _ { f , \alpha , V } \displaystyle \sum _ { i = 1 } ^ { m } \sum _ { l \neq y _ { i } } e ^ { s _ { t } \left( x _ { i } , l \right) - s _ { t } \left( x _ { i } , y _ { i } \right) } e ^ { - \alpha _ { t } \left( \sigma _ { t } \left( x _ { i } , l \right) - o _ { t } \left( x _ { i } , y _ { i } \right) \right) } e ^ { \alpha V ^ { \top } \left[ f \left( g _ { t } \left( x _ { i } \right) , l \right) - f \left( g _ { t } \left( x _ { i } \right) , y _ { i } \right) + g _ { t } \left( x _ { i } , l \right) - g _ { t } \left( x _ { i } , y _ { i } \right) \right] } } \\ { \displaystyle \equiv \operatorname* { m i n } _ { ( f , \alpha , V ) } \displaystyle \sum _ { i = 1 } ^ { m } \sum _ { l \neq y _ { i } } e ^ { \alpha V ^ { \top } \left[ f \left( g _ { t } \left( x _ { i } \right) , l \right) - f \left( g _ { t } \left( x _ { i } \right) , y _ { i } \right) + g _ { t } \left( x _ { i } , l \right) - g _ { t } \left( x _ { i } , y _ { i } \right) \right] } } \\ { \displaystyle \equiv \operatorname* { m i n } _ { \alpha , f , v } \displaystyle \sum _ { i = 1 } ^ { m } e ^ { - \alpha v ^ { \top } \left[ f \left( x _ { i } , y _ { i } \right) + g _ { t } \left( x _ { i } , y _ { i } \right) \right] } \sum _ { l \neq y _ { i } } e ^ { \alpha v ^ { \top } \left[ f \left( x _ { i } , l \right) + g _ { t } \left( x _ { i } , l \right) \right] } } & { \displaystyle ( 6 5 ) } \end{array}
|
| 519 |
+
$$
|
| 520 |
+
|
| 521 |
+
# G PROOF FOR THEOREM F.3 MULTICLASS BOOSTING THEORY
|
| 522 |
+
|
| 523 |
+
Proof. To characterize the training error, we use the exponential loss function
|
| 524 |
+
|
| 525 |
+
Definition G.1. Define loss function for a multiclass hypothesis $H ( x _ { i } )$ on a sample $( x _ { i } , y _ { i } )$ a s
|
| 526 |
+
|
| 527 |
+
$$
|
| 528 |
+
L _ { \eta } ^ { e x p } ( H ( x _ { i } ) , y _ { i } ) = \sum _ { l \neq y _ { i } } \exp ( ( H ( x _ { i } , l ) - H ( x _ { i } , y _ { i } ) ) ) .
|
| 529 |
+
$$
|
| 530 |
+
|
| 531 |
+
Define the accumulated weak learner $\begin{array} { r l r } { s _ { t } ( x _ { i } , l ) } & { { } = } & { \displaystyle \sum _ { t ^ { \prime } = 1 } ^ { t } h _ { t ^ { \prime } } ( x _ { i } , l ) } \end{array}$ and the loss $\begin{array} { r l } { Z _ { t } } & { { } = } \end{array}$ $\sum _ { i = 1 } ^ { m } \sum _ { l \neq y _ { i } } \exp \bigl ( s _ { t } \bigl ( x _ { i } , l \bigr ) - s _ { t } \bigl ( x _ { i } , y _ { i } \bigr ) \bigr ) \exp \bigl ( h _ { t } \bigl ( x _ { i } , l \bigr ) - h _ { t } \bigl ( x _ { i } , y _ { i } \bigr ) \bigr ) .$
|
| 532 |
+
|
| 533 |
+
Recall that $s _ { t } ( x _ { i } , l ) = \sum _ { t ^ { \prime } = 1 } ^ { t } h _ { t ^ { \prime } } ( x _ { i } , l ) = \alpha _ { t + 1 } W _ { t + 1 } ^ { \top } g _ { t + 1 } ( x _ { i } )$ , the loss for a $T$ -module multiclass ResNet is thus
|
| 534 |
+
|
| 535 |
+
$$
|
| 536 |
+
\begin{array} { r l } { \underset { i \sim D _ { 1 } } { \operatorname* { P r } } \left( p ( \alpha _ { T + 1 } W _ { T + 1 } ^ { \top } g _ { T + 1 } ( x _ { i } ) ) \neq y _ { i } \right) \leq \displaystyle \frac { 1 } { m } \sum _ { i = 1 } ^ { m } L _ { q } ^ { e x p } ( s _ { T } ( x _ { i } ) ) } & { } \\ & { \leq \displaystyle \frac { 1 } { m } \sum _ { i = 1 } ^ { m } \sum _ { l \neq y _ { i } } \exp \left( \eta ( s _ { T } ( x _ { i } , l ) - s _ { T } ( x _ { i } , y _ { i } ) ) \right) } \\ & { \leq \displaystyle \frac { 1 } { m } Z _ { T } } \\ & { = \displaystyle \prod _ { i = 1 } ^ { T } \frac { Z _ { t } } { Z _ { t - 1 } } } \end{array}
|
| 537 |
+
$$
|
| 538 |
+
|
| 539 |
+
Note that $\begin{array} { r } { Z _ { 0 } = \frac { 1 } { m } } \end{array}$ as the initial accumulated weak learners $s _ { 0 } ( x _ { i } , l ) = 0$
|
| 540 |
+
|
| 541 |
+
The loss fraction between module $t$ and $t - 1$ , $\frac { Z _ { t } } { Z _ { t - 1 } }$ , is related to $Z _ { t } - Z _ { t - 1 }$ as $\begin{array} { r } { \frac { Z _ { t } } { Z _ { t - 1 } } = \frac { Z _ { t } - Z _ { t - 1 } } { Z _ { t - 1 } } + 1 } \end{array}$
|
| 542 |
+
|
| 543 |
+
The $Z _ { t }$ is bounded
|
| 544 |
+
|
| 545 |
+
$$
|
| 546 |
+
\begin{array} { r l } { Z _ { t } } & { = \displaystyle \sum _ { i = 1 } ^ { m } \displaystyle \sum _ { j \neq j \neq i } \operatorname { C o p } \big ( s _ { i } ( x _ { i } , l ) - s _ { i } ( x _ { j } , l ) \big ) + h _ { t } \big ( x _ { i } , l \big ) - h _ { t } \big ( x _ { i } , y _ { i } \big ) \Big ) } \\ & { \le \displaystyle \sum _ { i = 1 } ^ { m } \displaystyle \sum _ { j \neq j \neq i } e ^ { s _ { i } ( x _ { i } , l ) - s _ { i } ( x _ { i } , y _ { i } ) } e ^ { s _ { i } ( x _ { i } , l ) + s _ { i } ( x _ { i } , l ) + s _ { i } ( x _ { i } , l ) - s _ { i + 1 } ( x _ { i } , y _ { i } ) } \displaystyle \sum _ { i = 1 } ^ { m } \displaystyle \sum _ { j \neq i } e ^ { s _ { i } ( x _ { i } , l ) - s _ { i } ( x _ { i } , y _ { i } ) } e ^ { - s _ { i } ( x _ { i } , y _ { i } ) } } \\ & { \qquad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \le \displaystyle \sum _ { i = 1 } ^ { m } \displaystyle \sum _ { j \neq i } e ^ { s _ { i } ( x _ { i } , l ) - s _ { i } ( x _ { i } , y _ { i } ) } ( e ^ { s - \ln ( x _ { i } , l ) + 1 } + e ^ { s _ { i } ( x _ { i } , l ) } + \displaystyle \frac { e ^ { - s _ { i } ( x _ { i } + 1 ) } - e ^ { \alpha _ { i + 1 } } } { 2 } ( \sigma _ { i + 1 } ( \sigma _ { i } , y _ { i } ) - \sigma _ { i + 1 } ( x _ { i } , l ) ) ) } \\ & \quad \displaystyle \sum _ { i = 1 } ^ { m } \displaystyle \sum _ { j \neq i } e ^ { s _ { i } ( x _ { i } , l ) - s _ { i } ( x _ { i } , l ) - s _ { i } ( x _ { j } , l ) } ( \displaystyle \frac { e ^ { \mu _ { i } ( x _ { i } , l ) + 1 } } { 2 } ( \sigma _ { i } ^ \end{array}
|
| 547 |
+
$$
|
| 548 |
+
|
| 549 |
+
$$
|
| 550 |
+
\leq ( \frac { e ^ { - \alpha _ { t + 1 } } + e ^ { \alpha _ { t + 1 } } - 2 } { 2 } Z _ { t - 1 } + \frac { e ^ { \alpha _ { t + 1 } } - e ^ { - \alpha _ { t + 1 } } } { 2 } \sum _ { i = 1 } ^ { m } < C _ { t } ( x _ { i } , : ) , U _ { \tilde { \gamma } _ { t } } ( x _ { i } , : ) > ) \left( \frac { e ^ { \alpha _ { t } } + e ^ { - \alpha _ { t } } } { 2 } \right)
|
| 551 |
+
$$
|
| 552 |
+
|
| 553 |
+
$$
|
| 554 |
+
= ( \frac { e ^ { - \alpha _ { t + 1 } } + e ^ { \alpha _ { t + 1 } } - 2 } { 2 } Z _ { t - 1 } + \frac { e ^ { \alpha _ { t + 1 } } - e ^ { - \alpha _ { t + 1 } } } { 2 } ( - \tilde { \gamma } _ { t } ) Z _ { t - 1 } ) \left( \frac { e ^ { \alpha _ { t } } + e ^ { - \alpha _ { t } } } { 2 } \right)
|
| 555 |
+
$$
|
| 556 |
+
|
| 557 |
+
Therefore
|
| 558 |
+
|
| 559 |
+
$$
|
| 560 |
+
\frac { Z _ { t } } { Z _ { t - 1 } } \leq \left( \frac { e ^ { - \alpha _ { t + 1 } } + e ^ { \alpha _ { t + 1 } } } { 2 } + \frac { e ^ { - \alpha _ { t + 1 } } - e ^ { \alpha _ { t + 1 } } } { 2 } \tilde { \gamma } _ { t } \right) \left( \frac { e ^ { \alpha _ { t } } + e ^ { - \alpha _ { t } } } { 2 } \right)
|
| 561 |
+
$$
|
| 562 |
+
|
| 563 |
+
The algorithm chooses $\alpha _ { t + 1 }$ to minimize $Z _ { t }$ . We achieve an upper bound on $Z _ { t }$ , $\begin{array} { r } { \sqrt { \frac { 1 - \tilde { \gamma } _ { t } ^ { 2 } } { 1 - \tilde { \gamma } _ { t - 1 ^ { 2 } } } } } \end{array}$
|
| 564 |
+
|
| 565 |
+
by minimizing the bound in Equation (77)
|
| 566 |
+
|
| 567 |
+
$$
|
| 568 |
+
\begin{array} { r l } & { Z _ { t } \leq \left( \frac { e ^ { - \alpha _ { t + 1 } } + e ^ { \alpha _ { t + 1 } } } { 2 } + \frac { e ^ { - \alpha _ { t + 1 } } - e ^ { \alpha _ { t + 1 } } } { 2 } \tilde { \gamma } _ { t } \right) \frac { e ^ { \alpha _ { t } } + e ^ { - \alpha _ { t } } } { 2 } \bigg | _ { \alpha _ { t + 1 } = \frac { 1 } { 2 } \ln \left( \frac { 1 + \tilde { \gamma } _ { t } } { 1 - \tilde { \gamma } _ { t } } \right) } } \\ & { \quad = \sqrt { \frac { 1 - \tilde { \gamma } _ { t } ^ { 2 } } { 1 - \tilde { \gamma } _ { t - 1 } ^ { 2 } } } = \sqrt { 1 - \gamma _ { t } ^ { 2 } } } \end{array}
|
| 569 |
+
$$
|
| 570 |
+
|
| 571 |
+
Therefore over the $T$ modules, the training error is upper bounded as follows
|
| 572 |
+
|
| 573 |
+
$$
|
| 574 |
+
\operatorname* { P r } _ { i \sim D } \left( p ( \alpha _ { T + 1 } w _ { T + 1 } ^ { \top } g _ { T + 1 } ( x _ { i } ) ) \right) \neq y _ { i } ) \leq \prod _ { t = 1 } ^ { T } \sqrt { 1 - \gamma _ { t } ^ { 2 } } \leq \prod _ { t = 1 } ^ { T } \sqrt { 1 - \gamma ^ { 2 } } = \exp \left( - \frac { 1 } { 2 } T \gamma ^ { 2 } \right)
|
| 575 |
+
$$
|
| 576 |
+
|
| 577 |
+
Overall, Algorithm 3 and 4 leads us to consistent learning of ResNet.
|
| 578 |
+
|
| 579 |
+
# H EXPERIMENTS
|
| 580 |
+
|
| 581 |
+
# H.1 TRAINING ERROR DEGRADATION OF E2EBP ON RESNET
|
| 582 |
+
|
| 583 |
+
We investigate e2eBP training performance on various depth ResNet. Surprisingly, we observe a training error degradation for $e 2 e B P$ although the ResNet’s identity loop is supposed to alleviate this problem. Despite the presence of identity loops, the $e 2 e B P$ eventually is susceptible to spurious local optima. This phenomenon is explored further in Figures 5a and 5b, which respectively show how training and test accuracies vary throughout the fitting process. Our proposed sequential training procedure, BoostResNet, relieves gradient instability issues, and continues to perform well as depth increases.
|
| 584 |
+
|
| 585 |
+

|
| 586 |
+
Figure 5: Convergence of $e 2 e B P$ (baseline) on multilayer perceptron residual network (of various depths) on MNIST dataset.
|
| 587 |
+
|
| 588 |
+
# H.2 SVHN AND CIFAR-10 PERFORMANCE RESULTS
|
| 589 |
+
|
| 590 |
+
Besides e2eBP, we also experiment with standard boosting (AdaBoost.MM Mukherjee & Schapire (2013)), as another baseline, of convolutional modules. In this experiment, each weak learner is a residual block of the ResNet, paired with a classification layer. We do 25 rounds of AdaBoost.MM and train each weak learner to convergence.
|
| 591 |
+
|
| 592 |
+
Table 1 and table 2 exhibit a comparison of BoostResNet, e2eBP and AdaBoost performance on SVHN and CIFAR-10 dataset respectively.
|
| 593 |
+
|
| 594 |
+
On SVHN dataset, the advantage of BoostResNet over e2eBP is obvious. Using $3 \times 1 0 ^ { 8 }$ number of gradient updates, BoostResNet achieves $9 3 . 8 \%$ test accuracy whereas e2eBP obtains a test accuracy of $8 3 \%$ . The training and test accuracies of SVHN are listed in Table 1. BoostResNet training allows the model to train much faster than end-to-end training, and still achieves the same test accuracy when refined with $e 2 e B P$ . To list the hyperparameters we use in our BoostResNet training after searching over candidate hyperparamters, we choose learning rate to be 0.004 with a $9 \times 1 0 ^ { - 5 }$ learning rate decay. The gamma threshold is set to be 0.001 and the initial gamma value on SVHN is 0.75.
|
| 595 |
+
|
| 596 |
+
On CIFAR-10 dataset, the main advantage of BoostResNet over e2eBP is the speed of training. BoostResNet refined with e2eBP obtains comparable results with e2eBP. This is because we are using a suboptimal architecture of ResNet which overfits the CIFAR-10 dataset. AdaBoost, on the other hand, is known to be resistant to overfitting. Therefore, AdaBoost achieves the highest test accuracy on CIFAR-10. To list the hyperparameters we use in our BoostResNet training after searching over candidate hyperparamters, we choose learning rate to be 0.014 with a $3 . 4 6 \times 1 0 ^ { - 5 }$ learning rate decay. The gamma threshold is set to be 0.007 and the initial gamma value on CIFAR10 is 0.93.
|
| 597 |
+
|
| 598 |
+
Table 1: Accuracies of SVHN task. NGU is the number of gradient updates taken by the algorithm in training.
|
| 599 |
+
|
| 600 |
+
<table><tr><td>TRAINING:</td><td>BOOSTRESNET</td><td>E2EBP</td><td>BOOSTRESNET+E2EBP</td><td>E2EBP</td><td>ADABOOST</td></tr><tr><td>NGU</td><td>3×108</td><td>3×108</td><td>2×1010</td><td>2×1010</td><td>1.5×109</td></tr><tr><td>TRAIN</td><td>96.9%</td><td>85%</td><td>98.8%</td><td>98.8%</td><td>95.6%</td></tr><tr><td>TEST</td><td>93.8%</td><td>83%</td><td>96.8%</td><td>96.8%</td><td>92.3%</td></tr></table>
|
| 601 |
+
|
| 602 |
+
<table><tr><td>TRAINING:</td><td>BOOSTRESNET</td><td>E2EBP</td><td>BOOSTRESNET+E2EBP</td><td>E2EBP</td><td>ADABOOST</td></tr><tr><td>NGU</td><td>3×109</td><td>3×109</td><td>1×1011</td><td>1 ×1011</td><td>1.5×1010</td></tr><tr><td>TRAIN</td><td>92.1%</td><td>82%</td><td>99.6%</td><td>99.7%</td><td>95.6%</td></tr><tr><td>TEST</td><td>82.1%</td><td>80%</td><td>88.1%</td><td>90.0%</td><td>92.3%</td></tr></table>
|
| 603 |
+
|
| 604 |
+
Table 2: Accuracies of CIFAR-10 task. NGU is the number of gradient updates taken by the algorithm in training.
|
parse/train/SksY3deAW/SksY3deAW_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/SksY3deAW/SksY3deAW_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/SksY3deAW/SksY3deAW_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/rklz9iAcKQ/rklz9iAcKQ.md
ADDED
|
@@ -0,0 +1,413 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# DEEP GRAPH INFOMAX
|
| 2 |
+
|
| 3 |
+
Petar Velickoviˇ c´∗
|
| 4 |
+
Department of Computer Science and Technology
|
| 5 |
+
University of Cambridge
|
| 6 |
+
petar.velickovic@cst.cam.ac.uk
|
| 7 |
+
William Fedus
|
| 8 |
+
Mila – Quebec Artificial Intelligence Institute ´
|
| 9 |
+
Google Brain
|
| 10 |
+
liamfedus@google.com
|
| 11 |
+
William L. Hamilton
|
| 12 |
+
Mila – Quebec Artificial Intelligence Institute ´
|
| 13 |
+
McGill University
|
| 14 |
+
wlh@cs.mcgill.ca
|
| 15 |
+
Pietro Lio\`
|
| 16 |
+
Department of Computer Science and Technology
|
| 17 |
+
University of Cambridge
|
| 18 |
+
pietro.lio@cst.cam.ac.uk
|
| 19 |
+
Yoshua Bengio†
|
| 20 |
+
Mila – Quebec Artificial Intelligence Institute ´
|
| 21 |
+
Universite de Montr´ eal´
|
| 22 |
+
yoshua.bengio@mila.quebec
|
| 23 |
+
R Devon Hjelm
|
| 24 |
+
Microsoft Research
|
| 25 |
+
Mila – Quebec Artificial Intelligence Institute ´
|
| 26 |
+
devon.hjelm@microsoft.com
|
| 27 |
+
|
| 28 |
+
# ABSTRACT
|
| 29 |
+
|
| 30 |
+
We present Deep Graph Infomax (DGI), a general approach for learning node representations within graph-structured data in an unsupervised manner. DGI relies on maximizing mutual information between patch representations and corresponding high-level summaries of graphs—both derived using established graph convolutional network architectures. The learnt patch representations summarize subgraphs centered around nodes of interest, and can thus be reused for downstream node-wise learning tasks. In contrast to most prior approaches to unsupervised learning with GCNs, DGI does not rely on random walk objectives, and is readily applicable to both transductive and inductive learning setups. We demonstrate competitive performance on a variety of node classification benchmarks, which at times even exceeds the performance of supervised learning.
|
| 31 |
+
|
| 32 |
+
# 1 INTRODUCTION
|
| 33 |
+
|
| 34 |
+
Generalizing neural networks to graph-structured inputs is one of the current major challenges of machine learning (Bronstein et al., 2017; Hamilton et al., 2017b; Battaglia et al., 2018). While significant strides have recently been made, notably with graph convolutional networks (Kipf & Welling, 2016a; Gilmer et al., 2017; Velickovi ˇ c et al., 2018), most successful methods use ´ supervised learning, which is often not possible as most graph data in the wild is unlabeled. In addition, it is often desirable to discover novel or interesting structure from large-scale graphs, and as such, unsupervised graph learning is essential for many important tasks.
|
| 35 |
+
|
| 36 |
+
Currently, the dominant algorithms for unsupervised representation learning with graph-structured data rely on random walk-based objectives (Grover & Leskovec, 2016; Perozzi et al., 2014; Tang et al., 2015; Hamilton et al., 2017a), sometimes further simplified to reconstruct adjacency information (Kipf & Welling, 2016b; Duran & Niepert, 2017). The underlying intuition is to train an encoder network so that nodes that are “close” in the input graph are also “close” in the representation space.
|
| 37 |
+
|
| 38 |
+
While powerful—and related to traditional metrics such as the personalized PageRank score (Jeh & Widom, 2003)—random walk methods suffer from known limitations. Most prominently, the random-walk objective is known to over-emphasize proximity information at the expense of structural information (Ribeiro et al., 2017), and performance is highly dependent on hyperparameter choice (Grover & Leskovec, 2016; Perozzi et al., 2014). Moreover, with the introduction of stronger encoder models based on graph convolutions (Gilmer et al., 2017), it is unclear whether randomwalk objectives actually provide any useful signal, as these encoders already enforce an inductive bias that neighboring nodes have similar representations.
|
| 39 |
+
|
| 40 |
+
In this work, we propose an alternative objective for unsupervised graph learning that is based upon mutual information, rather than random walks. Recently, scalable estimation of mutual information was made both possible and practical through Mutual Information Neural Estimation (MINE, Belghazi et al., 2018), which relies on training a statistics network as a classifier of samples coming from the joint distribution of two random variables and their product of marginals. Following on MINE, Hjelm et al. (2018) introduced Deep InfoMax (DIM) for learning representations of highdimensional data. DIM trains an encoder model to maximize the mutual information between a high-level “global” representation and “local” parts of the input (such as patches of an image). This encourages the encoder to carry the type of information that is present in all locations (and thus are globally relevant), such as would be the case of a class label.
|
| 41 |
+
|
| 42 |
+
DIM relies heavily on convolutional neural network structure in the context of image data, and to our knowledge, no work has applied mutual information maximization to graph-structured inputs. Here, we adapt ideas from DIM to the graph domain, which can be thought of as having a more general type of structure than the ones captured by convolutional neural networks. In the following sections, we introduce our method called Deep Graph Infomax (DGI). We demonstrate that the representation learned by DGI is consistently competitive on both transductive and inductive classification tasks, often outperforming both supervised and unsupervised strong baselines in our experiments.
|
| 43 |
+
|
| 44 |
+
# 2 RELATED WORK
|
| 45 |
+
|
| 46 |
+
Contrastive methods. An important approach for unsupervised learning of representations is to train an encoder to be contrastive between representations that capture statistical dependencies of interest and those that do not. For example, a contrastive approach may employ a scoring function, training the encoder to increase the score on “real” input (a.k.a, positive examples) and decrease the score on “fake” input (a.k.a., negative samples). Contrastive methods are central to many popular word-embedding methods (Collobert & Weston, 2008; Mnih & Kavukcuoglu, 2013; Mikolov et al., 2013), but they are found in many unsupervised algorithms for learning representations of graphstructured input as well. There are many ways to score a representation, but in the graph literature the most common techniques use classification (Perozzi et al., 2014; Grover & Leskovec, 2016; Kipf & Welling, 2016b; Hamilton et al., 2017b), though other scoring functions are used (Duran & Niepert, 2017; Bojchevski & Gunnemann, 2018). DGI is also contrastive in this respect, as our ¨ objective is based on classifying local-global pairs and negative-sampled counterparts.
|
| 47 |
+
|
| 48 |
+
Sampling strategies. A key implementation detail to contrastive methods is how to draw positive and negative samples. The prior work above on unsupervised graph representation learning relies on a local contrastive loss (enforcing proximal nodes to have similar embeddings). Positive samples typically correspond to pairs of nodes that appear together within short random walks in the graph—from a language modelling perspective, effectively treating nodes as words and random walks as sentences. Recent work by Bojchevski & Gunnemann (2018) uses node-anchored sam- ¨ pling as an alternative. The negative sampling for these methods is primarily based on sampling of random pairs, with recent work adapting this approach to use a curriculum-based negative sampling scheme (with progressively “closer” negative examples; Ying et al., 2018a) or introducing an adversary to select the negative examples (Bose et al., 2018).
|
| 49 |
+
|
| 50 |
+
Predictive coding. Contrastive predictive coding (CPC, Oord et al., 2018) is another method for learning deep representations based on mutual information maximization. Like the models above, CPC is also contrastive, in this case using an estimate of the conditional density (in the form of noise contrastive estimation, Gutmann & Hyvarinen, 2010) as the scoring function. However, unlike our ¨ approach, CPC and the graph methods above are all predictive: the contrastive objective effectively trains a predictor between structurally-specified parts of the input (e.g., between neighboring node pairs or between a node and its neighborhood). Our approach differs in that we contrast global / local parts of a graph simultaneously, where the global variable is computed from all local variables.
|
| 51 |
+
|
| 52 |
+
To the best of our knowledge, the sole prior works that instead focuses on contrasting “global” and “local” representations on graphs do so via (auto-)encoding objectives on the adjacency matrix (Wang et al., 2016) and incorporation of community-level constraints into node embeddings (Wang et al., 2017). Both methods rely on matrix factorization-style losses and are thus not scalable to larger graphs.
|
| 53 |
+
|
| 54 |
+
# 3 DGI METHODOLOGY
|
| 55 |
+
|
| 56 |
+
In this section, we will present the Deep Graph Infomax method in a top-down fashion: starting with an abstract overview of our specific unsupervised learning setup, followed by an exposition of the objective function optimized by our method, and concluding by enumerating all the steps of our procedure in a single-graph setting.
|
| 57 |
+
|
| 58 |
+
# 3.1 GRAPH-BASED UNSUPERVISED LEARNING
|
| 59 |
+
|
| 60 |
+
We assume a generic graph-based unsupervised machine learning setup: we are provided with a set of node features, $\mathbf { X } = \left\{ \hat { \vec { x } } _ { 1 } , \vec { x } _ { 2 } , \dots , \vec { x } _ { N } \right\}$ , where $N$ is the number of nodes in the graph and $\vec { x } _ { i } \in \mathbb { R } ^ { F }$ represents the features of node $i$ . We are also provided with relational information between these nodes in the form of an adjacency matrix, $\mathbf { A } \ { \bf \Sigma } \in \mathbb { R } ^ { N \times N }$ . While A may consist of arbitrary real numbers (or even arbitrary edge features), in all our experiments we will assume the graphs to be unweighted, i.e. $A _ { i j } = 1$ if there exists an edge $i j$ in the graph and $A _ { i j } = 0$ otherwise.
|
| 61 |
+
|
| 62 |
+
Our objective is to learn an encoder, $\mathcal { E } : \mathbb { R } ^ { N \times F } \times \mathbb { R } ^ { N \times N } \mathbb { R } ^ { N \times F ^ { \prime } }$ , such that $\begin{array} { r } { \mathcal { E } ( \mathbf { X } , \mathbf { A } ) = \mathbf { H } = } \end{array}$ $\{ \vec { h } _ { 1 } , \vec { h } _ { 2 } , \dots , \vec { h } _ { N } \}$ represents high-level representations $\vec { h } _ { i } \in \mathbb { R } ^ { F ^ { \prime } }$ for each node $i$ . These representations may then be retrieved and used for downstream tasks, such as node classification.
|
| 63 |
+
|
| 64 |
+
Here we will focus on graph convolutional encoders—a flexible class of node embedding architectures, which generate node representations by repeated aggregation over local node neighborhoods (Gilmer et al., 2017). A key consequence is that the produced node embeddings, $\vec { h } _ { i }$ , summarize $a$ patch of the graph centered around node $i$ rather than just the node itself. In what follows, we will often refer to $\vec { h } _ { i }$ as patch representations to emphasize this point.
|
| 65 |
+
|
| 66 |
+
# 3.2 LOCAL-GLOBAL MUTUAL INFORMATION MAXIMIZATION
|
| 67 |
+
|
| 68 |
+
Our approach to learning the encoder relies on maximizing local mutual information—that is, we seek to obtain node (i.e., local) representations that capture the global information content of the entire graph, represented by a summary vector, $\vec { s } ,$ .
|
| 69 |
+
|
| 70 |
+
In order to obtain the graph-level summary vectors, $\vec { s }$ , we leverage a readout function, $\mathcal { R } : \mathbb { R } ^ { N \times F } $ $\mathbb { R } ^ { F }$ , and use it to summarize the obtained patch representations into a graph-level representation; i.e., $\vec { s } = \mathcal { R } ( \mathcal { E } ( \mathbf { X } , \mathbf { A } ) )$ .
|
| 71 |
+
|
| 72 |
+
As a proxy for maximizing the local mutual information, we employ a discriminator, $\mathcal { D } : \mathbb { R } ^ { F } \times$ $\mathbb { R } ^ { F } \mathbb { R }$ , such that $\mathcal { D } ( \vec { h } _ { i } , \vec { s } )$ represents the probability scores assigned to this patch-summary pair (should be higher for patches contained within the summary).
|
| 73 |
+
|
| 74 |
+
Negative samples for $\mathcal { D }$ are provided by pairing the summary $\vec { s }$ from $( \mathbf { X } , \mathbf { A } )$ with patch representations $\vec { \tilde { h } } _ { j }$ of an alternative graph, $( \widetilde { \mathbf { X } } , \widetilde { \mathbf { A } } )$ . In a multi-graph setting, such graphs may be obtained as other elements of a training set. However, for a single graph, an explicit (stochastic) corruption function, $\mathcal { C } : \mathbb { R } ^ { N \times F } \times \mathbb { R } ^ { N \times \bar { N } } \to \mathbb { R } ^ { M \times F } \times \mathbb { R } ^ { M \times M }$ is required to obtain a negative example from the original graph, i.e. $( \widetilde { { \mathbf { X } } } , \widetilde { { \mathbf { A } } } ) = { \mathcal { C } } ( { \mathbf { X } } , { \mathbf { A } } )$ . The choice of the negative sampling procedure will govern the specific kinds of structural information that is desirable to be captured as a byproduct of this maximization.
|
| 75 |
+
|
| 76 |
+
For the objective, we follow the intuitions from Deep InfoMax (DIM, Hjelm et al., 2018) and use a noise-contrastive type objective with a standard binary cross-entropy (BCE) loss between the samples from the joint (positive examples) and the product of marginals (negative examples). Following
|
| 77 |
+
|
| 78 |
+
their work, we use the following objective1:
|
| 79 |
+
|
| 80 |
+
$$
|
| 81 |
+
\mathcal { L } = \frac { 1 } { N + M } \left( \sum _ { i = 1 } ^ { N } \mathbb { E } _ { ( \mathbf { X } , \mathbf { A } ) } \left[ \log \mathcal { D } \left( \vec { h } _ { i } , \vec { s } \right) \right] + \sum _ { j = 1 } ^ { M } \mathbb { E } _ { ( \widetilde { \mathbf { X } } , \widetilde { \mathbf { A } } ) } \left[ \log \left( 1 - \mathcal { D } \left( \vec { \tilde { h } } _ { j } , \vec { s } \right) \right) \right] \right)
|
| 82 |
+
$$
|
| 83 |
+
|
| 84 |
+
This approach effectively maximizes mutual information between $\vec { h } _ { i }$ and $\vec { s } ^ { \prime }$ , based on the JensenShannon divergence2 between the joint and the product of marginals.
|
| 85 |
+
|
| 86 |
+
As all of the derived patch representations are driven to preserve mutual information with the global graph summary, this allows for discovering and preserving similarities on the patch-level—for example, distant nodes with similar structural roles (which are known to be a strong predictor for many node classification tasks; Donnat et al., 2018). Note that this is a “reversed” version of the argument given by Hjelm et al. (2018): for node classification, our aim is for the patches to establish links to similar patches across the graph, rather than enforcing the summary to contain all of these similarities (however, both of these effects should in principle occur simultaneously).
|
| 87 |
+
|
| 88 |
+
# 3.3 THEORETICAL MOTIVATION
|
| 89 |
+
|
| 90 |
+
We now provide some intuition that connects the classification error of our discriminator to mutual information maximization on graph representations.
|
| 91 |
+
|
| 92 |
+
Lemma 1. Let $\{ \mathbf { X } ^ { ( k ) } \} _ { k = 1 } ^ { | \mathbf { X } | }$ be a set of node representations drawn from an empirical probability distribution of graphs, $p ( \mathbf { X } )$ , with finite number of elements, $| \mathbf { X } |$ , such that $p ( \mathbf { X } ^ { ( k ) } ) = p ( \mathbf { X } ^ { ( k ^ { \prime } ) } ) \forall k , k ^ { \prime }$ . Let $\mathcal { R } ( \cdot )$ be a deterministic readout function on graphs and $\vec { s } ^ { ( k ) } = \mathcal { R } ( \mathbf { X } ^ { ( k ) } )$ be the summary vector of the $k$ -th graph, with marginal distribution $p ( \vec { s } )$ . The optimal classifier between the joint distribution $p ( \mathbf { X } , \vec { s } )$ and the product of marginals $p ( \mathbf { X } ) p ( \vec { s } )$ , assuming class balance, has an error rate upper bounded by $\begin{array} { r } { \mathrm { E r r } ^ { * } = \frac { 1 } { 2 } \sum _ { k = 1 } ^ { | \mathbf { X } | } p ( \vec { s } ^ { ( k ) } ) ^ { 2 } } \end{array}$ . This upper bound is achieved if $\mathcal { R }$ is injective.
|
| 93 |
+
|
| 94 |
+
Proof. Denote by ${ \mathcal { Q } } ^ { ( k ) }$ the set of all graphs in the input set that are mapped to $\vec { s } ^ { ( k ) }$ by $\mathcal { R }$ , i.e. $\vec { \mathcal { Q } } ^ { ( k ) } = \{ \mathbf { X } ^ { ( j ) } \mid \mathcal { \bar { R } } ( \mathbf { X } ^ { ( j ) } ) = \vec { s } ^ { ( k ) } \}$ . As $\mathcal { R } ( \cdot )$ is deterministic, samples from the joint, $( \mathbf { X } ^ { ( k ) } , \vec { s } ^ { ( k ) } )$ are drawn from the product of marginals with probability $p ( \vec { s } ^ { ( k ) } ) p ( \mathbf { X } ^ { ( k ) } )$ , which decomposes into:
|
| 95 |
+
|
| 96 |
+
$$
|
| 97 |
+
p ( \vec { s } ^ { ( k ) } ) \sum _ { \vec { s } } p ( \mathbf { X } ^ { ( k ) } , \vec { s } ) = p ( \vec { s } ^ { ( k ) } ) p ( \mathbf { X } ^ { ( k ) } | \vec { s } ^ { ( k ) } ) p ( \vec { s } ^ { ( k ) } ) = \frac { p ( \mathbf { X } ^ { ( k ) } ) } { \sum _ { \mathbf { X } ^ { \prime } \in \mathcal { Q } ^ { ( k ) } } p ( \mathbf { X } ^ { \prime } ) } p ( \vec { s } ^ { ( k ) } ) ^ { 2 }
|
| 98 |
+
$$
|
| 99 |
+
|
| 100 |
+
For convenience, let p(X(k)P )X0∈Q(k) p(X0) . As, by definition, X(k) ∈ Q(k), it holds that ρ(k) ≤ 1. This probability ratio is maximized at 1 when ${ \mathcal { Q } } ^ { ( k ) } = \{ \mathbf { X } ^ { ( k ) } \}$ , i.e. when $\mathcal { R }$ is injective for $\mathbf { X } ^ { ( k ) }$ . The probability of drawing any sample of the joint from the product of marginals is then bounded above by $\scriptstyle \sum _ { k = 1 } ^ { | \mathbf { X } | } p ( { \vec { s } } ^ { ( k ) } ) ^ { 2 }$ . As the probability of drawing $( \mathbf { X } ^ { ( k ) } , \vec { s } ^ { ( k ) } )$ from the joint is $\rho ^ { ( k ) } p ( \vec { s } ^ { ( k ) } ) \geq$ $\rho ^ { ( k ) } p ( \vec { s } ^ { ( k ) } ) ^ { 2 }$ , we know that classifying these samples as coming from the joint has a lower error than classifying them as coming from the product of marginals. The error rate of such a classifier is then the probability of drawing a sample from the joint as a sample from product of marginals under the mixture probability, which we can bound by $\begin{array} { r } { \mathrm { E r r } \leq \frac { 1 } { 2 } \sum _ { k = 1 } ^ { | \mathbf { \bar { X } } | } p ( \bar { s } ^ { ( k ) } ) ^ { 2 } } \end{array}$ , with the upper bound achieved, as above, when $\mathcal { R } ( \cdot )$ is injective for all elements of $\{ \mathbf { X } ^ { ( k ) } \}$ . □
|
| 101 |
+
|
| 102 |
+
It may be useful to note that ${ \begin{array} { r } { { \frac { 1 } { 2 | \mathbf { X } | } } \leq \operatorname { E r r } ^ { * } \leq { \frac { 1 } { 2 } } } \end{array} }$ . The first result is obtained via a trivial application of Jensen’s inequality, while the other extreme is reached only in the edge case of a constant readout function (when every example from the joint is also an example from the product of marginals, so no classifier performs better than chance).
|
| 103 |
+
|
| 104 |
+
Corollary 1. From now on, assume that the readout function used, ${ \mathcal { R } } ,$ is injective. Assume the number of allowable states in the space of \~s, $| \vec { s } |$ , is greater than or equal to $| \mathbf { X } |$ . Then, for $\vec { s } ^ { \star }$ , the optimal summary under the classification error of an optimal classifier between the joint and the product of marginals, it holds that $| \vec { s } ^ { \star } | = | \mathbf { X } |$ .
|
| 105 |
+
|
| 106 |
+
Proof. By injectivity of $\mathcal { R }$ , we know that $\vec { s } ^ { \star } = \mathrm { a r g m i n } _ { \vec { s } } \mathrm { E r r } ^ { * }$ . As the upper error bound, $\mathrm { E r r } ^ { * }$ , is a simple geometric sum, we know that this is minimized when $p ( \vec { s } ^ { ( k ) } )$ is uniform. As $\mathcal { R } ( \cdot )$ is deterministic, this implies that each potential summary state would need to be used at least once. Combined with the condition $| \vec { s } | \geq | \bar { \bf X } |$ , we conclude that the optimum has $| \vec { s } ^ { * } | = | \mathbf { X } |$ . □
|
| 107 |
+
|
| 108 |
+
Theorem 1. $\vec { s } ^ { \star } = \mathrm { a r g m a x } _ { \vec { s } } \mathrm { M I } ( \mathbf { X } ; \vec { s } )$ , where MI is mutual information.
|
| 109 |
+
|
| 110 |
+
Proof. This follows from the fact that the mutual information is invariant under invertible transforms. As $| \vec { s } ^ { * } | = | \mathbf { X } |$ and $\mathcal { R }$ is injective, it has an inverse function, $\mathcal { R } ^ { - 1 }$ . It follows then that, for any ${ \vec { s } } .$ ${ \vec { \mathfrak { s } } } , \mathrm { M I } ( \mathbf { X } ; { \vec { \mathfrak { s } } } ) \leq H ( \mathbf { X } ) = \mathrm { M I } ( \mathbf { X } ; \mathbf { X } ) = \mathrm { M I } ( \mathbf { X } ; { \mathcal { R } } ( \mathbf { X } ) ) = \mathrm { M I } ( \mathbf { X } ; { \vec { \mathfrak { s } } } ^ { \star } )$ , where $H$ is entropy. 其□
|
| 111 |
+
|
| 112 |
+
Theorem 1 shows that for finite input sets and suitable deterministic functions, minimizing the classification error in the discriminator can be used to maximize the mutual information between the input and output. However, as was shown in Hjelm et al. (2018), this objective alone is not enough to learn useful representations. As in their work, we discriminate between the global summary vector and local high-level representations.
|
| 113 |
+
|
| 114 |
+
Theorem 2. Let $\mathbf { X } _ { i } ^ { ( k ) } = \{ \vec { x } _ { j } \} _ { j \in n ( \mathbf { X } ^ { ( k ) } , i ) }$ be the neighborhood of the node i in the $k$ -th graph that collectively maps to its high-level features, $\vec { h } _ { i } = \mathcal { E } ( \mathbf { X } _ { i } ^ { ( k ) } )$ , where n is the neighborhood function that returns the set of neighborhood indices of node $i$ for graph $\mathbf { X } ^ { ( k ) }$ , and $\mathcal { E }$ is a deterministic encoder function. Let us assume that $| \mathbf { X } _ { i } | = | \mathbf { X } | = | \vec { s } | \geq | \vec { h } _ { i } |$ . Then, the $\vec { h } _ { i }$ that minimizes the classification error between $p ( \vec { h } _ { i } , \vec { s } )$ and $p ( \vec { h } _ { i } ) p ( \vec { s } )$ also maximizes $\mathrm { M I } ( \mathbf { X } _ { i } ^ { ( k ) } ; \vec { h } _ { i } )$ .
|
| 115 |
+
|
| 116 |
+
Proof. Given our assumption of $\left| \mathbf { X } _ { i } \right| = \left| { \vec { s } } \right|$ , there exists an inverse $\mathbf { X } _ { i } = \mathcal { R } ^ { - 1 } ( \vec { s } )$ , and therefore $\vec { h } _ { i } = \mathcal { E } ( \mathcal { R } ^ { - 1 } ( \vec { s } ) )$ , i.e. there exists a deterministic function $( \mathcal E \circ \mathcal R ^ { - 1 } )$ mapping $\vec { s }$ to $\vec { h } _ { i }$ . The optimal classifier between the joint $p ( \vec { h } _ { i } , \vec { s } )$ and the product of marginals $p ( \vec { h } _ { i } ) p ( \vec { s } )$ then has (by Lemma 1) an error rate upper bound of $\begin{array} { r } { \mathrm { E r r } ^ { * } = \frac { 1 } { 2 } \sum _ { k = 1 } ^ { | \mathbf { X } | } p ( \vec { h } _ { i } ^ { ( k ) } ) ^ { 2 } } \end{array}$ . Therefore (as in Corollary 1), for the optimal $\vec { h } _ { i }$ , $| \vec { h } _ { i } | = | \mathbf { X } _ { i } |$ , which by the same arguments as in Theorem 1 maximizes the mutual information between the neighborhood and high-level features, $\mathrm { M I } ( \mathbf { X } _ { i } ^ { ( k ) } ; \vec { h } _ { i } )$ . □
|
| 117 |
+
|
| 118 |
+
This motivates our use of a classifier between samples from the joint and the product of marginals, and using the binary cross-entropy (BCE) loss to optimize this classifier is well-understood in the context of neural network optimization.
|
| 119 |
+
|
| 120 |
+
# 3.4 OVERVIEW OF DGI
|
| 121 |
+
|
| 122 |
+
Assuming the single-graph setup (i.e., $( \mathbf { X } , \mathbf { A } )$ provided as input), we will now summarize the steps of the Deep Graph Infomax procedure:
|
| 123 |
+
|
| 124 |
+
1. Sample a negative example by using the corruption function: $( \widetilde \mathbf { X } , \widetilde \mathbf { A } ) \sim { \mathcal { C } } ( \mathbf { X } , \mathbf { A } )$ .
|
| 125 |
+
2. Obtain patch representations, $\vec { h } _ { i }$ for the input graph by passing it through the encoder: $\mathbf { H } = \mathcal { E } ( \mathbf { \bar { X } } , \mathbf { A } ) = \{ \vec { h } _ { 1 } , \vec { h } _ { 2 } , \dots , \vec { h } _ { N } \}$ .
|
| 126 |
+
3. Obtain patch representations, $\vec { \tilde { h } } _ { j }$ for the negative example by passing it through the encoder: $\widetilde { \bf H } = \mathcal { E } ( \widetilde { \bf X } , \widetilde { \bf A } ) = \{ \vec { \widetilde { h } } _ { 1 } , \vec { \widetilde { h } } _ { 2 } , \dots , \vec { \widetilde { h } } _ { M } \} .$
|
| 127 |
+
4. Summarize the input graph by passing its patch representations through the readout function: $\vec { s } = \mathcal { R } ( \mathbf { H } )$ .
|
| 128 |
+
5. Update parameters of $\mathcal { E }$ , $\mathcal { R }$ and $\mathcal { D }$ by applying gradient descent to maximize Equation 1.
|
| 129 |
+
|
| 130 |
+
This algorithm is fully summarized by Figure 1.
|
| 131 |
+
|
| 132 |
+

|
| 133 |
+
Figure 1: A high-level overview of Deep Graph Infomax. Refer to Section 3.4 for more details.
|
| 134 |
+
|
| 135 |
+
Table 1: Summary of the datasets used in our experiments.
|
| 136 |
+
|
| 137 |
+
<table><tr><td>Dataset</td><td>Task</td><td>Nodes</td><td>Edges</td><td>Features</td><td>Classes</td><td>Train/Val/Test Nodes</td></tr><tr><td>Cora</td><td>Transductive</td><td>2,708</td><td>5,429</td><td>1,433</td><td>7</td><td>140/500/1,000</td></tr><tr><td>Citeseer</td><td>Transductive</td><td>3,327</td><td>4,732</td><td>3,703</td><td>6</td><td>120/500/1,000</td></tr><tr><td>Pubmed</td><td>Transductive</td><td>19,717</td><td>44,338</td><td>500</td><td>3</td><td>60/500/1,000</td></tr><tr><td>Reddit</td><td>Inductive</td><td>231,443</td><td>11,606,919</td><td>602</td><td>41</td><td>151,708/23,699/55,334</td></tr><tr><td>PPI</td><td>Inductive</td><td>56,944 (24 graphs)</td><td>818,716</td><td>50</td><td>121 (multilbl.)</td><td>44,906/6,514/5,524 (20/2/2 graphs)</td></tr></table>
|
| 138 |
+
|
| 139 |
+
# 4 CLASSIFICATION PERFORMANCE
|
| 140 |
+
|
| 141 |
+
We have assessed the benefits of the representation learnt by the DGI encoder on a variety of node classification tasks (transductive as well as inductive), obtaining competitive results. In each case, DGI was used to learn patch representations in a fully unsupervised manner, followed by evaluating the node-level classification utility of these representations. This was performed by directly using these representations to train and test a simple linear (logistic regression) classifier.
|
| 142 |
+
|
| 143 |
+
# 4.1 DATASETS
|
| 144 |
+
|
| 145 |
+
We follow the experimental setup described in Kipf & Welling (2016a) and Hamilton et al. (2017a) on the following benchmark tasks: (1) classifying research papers into topics on the Cora, Citeseer and Pubmed citation networks (Sen et al., 2008); (2) predicting the community structure of a social network modeled with Reddit posts; and (3) classifying protein roles within protein-protein interaction (PPI) networks (Zitnik & Leskovec, 2017), requiring generalisation to unseen networks.
|
| 146 |
+
|
| 147 |
+
Further information on the datasets may be found in Table 1 and Appendix A.
|
| 148 |
+
|
| 149 |
+
# 4.2 EXPERIMENTAL SETUP
|
| 150 |
+
|
| 151 |
+
For each of three experimental settings (transductive learning, inductive learning on large graphs, and multiple graphs), we employed distinct encoders and corruption functions appropriate to that setting (described below).
|
| 152 |
+
|
| 153 |
+
Transductive learning. For the transductive learning tasks (Cora, Citeseer and Pubmed), our encoder is a one-layer Graph Convolutional Network (GCN) model (Kipf & Welling, 2016a), with the following propagation rule:
|
| 154 |
+
|
| 155 |
+
$$
|
| 156 |
+
\mathcal { E } ( \mathbf { X } , \mathbf { A } ) = \sigma \left( \hat { \mathbf { D } } ^ { - \frac { 1 } { 2 } } \hat { \mathbf { A } } \hat { \mathbf { D } } ^ { - \frac { 1 } { 2 } } \mathbf { X } \Theta \right)
|
| 157 |
+
$$
|
| 158 |
+
|
| 159 |
+
where $\hat { \mathbf { A } } = \mathbf { A } + \mathbf { I } _ { N }$ is the adjacency matrix with inserted self-loops and $\hat { \bf D }$ is its corresponding degree matrix; i.e. $\begin{array} { r } { \hat { D } _ { i i } = \sum _ { j } \hat { A } _ { i j } } \end{array}$ . For the nonlinearity, $\sigma$ , we have applied the parametric ReLU (PReLU) function (He et al., 2015), and $\boldsymbol \Theta \in \mathbb { R } ^ { F \times F ^ { \prime } }$ is a learnable linear transformation applied to every node, with $F ^ { \prime } = 5 1 2 $ features being computed (specially, $F ^ { \prime } = 2 5 6$ on Pubmed due to memory limitations).
|
| 160 |
+
|
| 161 |
+

|
| 162 |
+
Figure 2: The DGI setup on large graphs (such as Reddit). Summary vectors, $\vec { s } ,$ , are obtained by combining several subsampled patch representations, $\vec { h } _ { i }$ (here obtained by sampling three and two neighbors in the first and second level, respectively).
|
| 163 |
+
|
| 164 |
+
The corruption function used in this setting is designed to encourage the representations to properly encode structural similarities of different nodes in the graph; for this purpose, $\mathcal { C }$ preserves the original adjacency matrix $\begin{array} { r } { \widetilde { \mathbf { A } } = \mathbf { A } } \end{array}$ ), whereas the corrupted features, $\widetilde { \mathbf { X } }$ , are obtained by row-wise shuffling of X. That is, the corrupted graph consists of exactly the same nodes as the original graph, but they are located in different places in the graph, and will therefore receive different patch representations. We demonstrate DGI is stable to other choices of corruption functions in Appendix C, but we find those that preserve the graph structure result in the strongest features.
|
| 165 |
+
|
| 166 |
+
Inductive learning on large graphs. For inductive learning, we may no longer use the GCN update rule in our encoder (as the learned filters rely on a fixed and known adjacency matrix); instead, we apply the mean-pooling propagation rule, as used by GraphSAGE-GCN (Hamilton et al., 2017a):
|
| 167 |
+
|
| 168 |
+
$$
|
| 169 |
+
\mathbf { M P } ( \mathbf { X } , \mathbf { A } ) = \hat { \mathbf { D } } ^ { - 1 } \hat { \mathbf { A } } \mathbf { X } \Theta
|
| 170 |
+
$$
|
| 171 |
+
|
| 172 |
+
with parameters defined as in Equation 3. Note that multiplying by $\hat { \bf D } ^ { - 1 }$ actually performs a normalized sum (hence the mean-pooling). While Equation 4 explicitly specifies the adjacency and degree matrices, they are not needed: identical inductive behaviour may be observed by a constant attention mechanism across the node’s neighbors, as used by the Const-GAT model (Velickovi ˇ c et al., 2018). ´
|
| 173 |
+
|
| 174 |
+
For Reddit, our encoder is a three-layer mean-pooling model with skip connections (He et al., 2016):
|
| 175 |
+
|
| 176 |
+
$$
|
| 177 |
+
\begin{array} { r } { \widetilde { \mathbf { M P } } ( \mathbf { X } , \mathbf { A } ) = \sigma \left( \mathbf { X } \mathbf { \Theta } \mathbf { \Theta } ^ { \prime } \| \mathbf { M P } ( \mathbf { X } , \mathbf { A } ) \right) \qquad \mathbf { \mathcal { E } } ( \mathbf { X } , \mathbf { A } ) = \widetilde { \mathbf { M P } } _ { 3 } ( \widetilde { \mathbf { M P } } _ { 2 } ( \widetilde { \mathbf { M P } } _ { 1 } ( \mathbf { X } , \mathbf { A } ) , \mathbf { A } ) , \mathbf { A } ) } \end{array}
|
| 178 |
+
$$
|
| 179 |
+
|
| 180 |
+
where $\parallel$ is featurewise concatenation (i.e. the central node and its neighborhood are handled separately). We compute $F ^ { \prime } = 5 1 2 $ features in each MP layer, with the PReLU activation for $\sigma$ .
|
| 181 |
+
|
| 182 |
+
Given the large scale of the dataset, it will not fit into GPU memory entirely. Therefore, we use the subsampling approach of Hamilton et al. (2017a), where a minibatch of nodes is first selected, and then a subgraph centered around each of them is obtained by sampling node neighborhoods with replacement. Specifically, we sample 10, 10 and 25 neighbors at the first, second and third level, respectively—thus, each subsampled patch has $1 + 1 0 + 1 0 0 + 2 5 0 0 = 2 6 1 1$ nodes. Only the computations necessary for deriving the central node $i$ ’s patch representation, $\vec { h } _ { i }$ , are performed. These representations are then used to derive the summary vector, $\vec { s } ^ { \prime }$ , for the minibatch (Figure 2). We used minibatches of 256 nodes throughout training.
|
| 183 |
+
|
| 184 |
+
To define our corruption function in this setting, we use a similar approach as in the transductive tasks, but treat each subsampled patch as a separate graph to be corrupted (i.e., we row-wise shuffle the feature matrices within a subsampled patch). Note that this may very likely cause the central node’s features to be swapped out for a sampled neighbor’s features, further encouraging diversity in the negative samples. The patch representation obtained in the central node is then submitted to the discriminator.
|
| 185 |
+
|
| 186 |
+
Inductive learning on multiple graphs. For the PPI dataset, inspired by previous successful supervised architectures (Velickovi ˇ c et al., 2018), our encoder is a three-layer mean-pooling model with ´ dense skip connections (He et al., 2016; Huang et al., 2017):
|
| 187 |
+
|
| 188 |
+
$$
|
| 189 |
+
\begin{array} { r } { \mathbf { H } _ { 1 } = \sigma \left( \mathbf { M P } _ { 1 } ( \mathbf { X } , \mathbf { A } ) \right) \quad \quad } \\ { \mathbf { H } _ { 2 } = \sigma \left( \mathbf { M P } _ { 2 } ( \mathbf { H } _ { 1 } + \mathbf { X W } _ { \mathrm { s k i p } } , \mathbf { A } ) \right) \quad \quad } \\ { \quad \quad \varepsilon ( \mathbf { X } , \mathbf { A } ) = \sigma \left( \mathbf { M P } _ { 3 } ( \mathbf { H } _ { 2 } + \mathbf { H } _ { 1 } + \mathbf { X W } _ { \mathrm { s k i p } } , \mathbf { A } ) \right) \quad } \end{array}
|
| 190 |
+
$$
|
| 191 |
+
|
| 192 |
+
where $\mathbf { W } _ { \mathrm { s k i p } }$ is a learnable projection matrix, and MP is as defined in Equation 4. We compute $F ^ { \prime } = 5 1 2$ features in each MP layer, using the PReLU activation for $\sigma$ .
|
| 193 |
+
|
| 194 |
+
In this multiple-graph setting, we opted to use randomly sampled training graphs as negative examples (i.e., our corruption function simply samples a different graph from the training set). We found this method to be the most stable, considering that over $40 \%$ of the nodes have all-zero features in this dataset. To further expand the pool of negative examples, we also apply dropout (Srivastava et al., 2014) to the input features of the sampled graph. We found it beneficial to standardize the learnt embeddings across the training set prior to providing them to the logistic regression model.
|
| 195 |
+
|
| 196 |
+
Readout, discriminator, and additional training details. Across all three experimental settings, we employed identical readout functions and discriminator architectures.
|
| 197 |
+
|
| 198 |
+
For the readout function, we use a simple averaging of all the nodes’ features:
|
| 199 |
+
|
| 200 |
+
$$
|
| 201 |
+
\mathcal { R } ( \mathbf { H } ) = \sigma \left( \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \vec { h } _ { i } \right)
|
| 202 |
+
$$
|
| 203 |
+
|
| 204 |
+
where $\sigma$ is the logistic sigmoid nonlinearity. While we have found this readout to perform the best across all our experiments, we assume that its power will diminish with the increase in graph size, and in those cases, more sophisticated readout architectures such as set2vec (Vinyals et al., 2015) or DiffPool (Ying et al., 2018b) are likely to be more appropriate.
|
| 205 |
+
|
| 206 |
+
The discriminator scores summary-patch representation pairs by applying a simple bilinear scoring function (similar to the scoring used by Oord et al. (2018)):
|
| 207 |
+
|
| 208 |
+
$$
|
| 209 |
+
\mathcal { D } ( \vec { h } _ { i } , \vec { s } ) = \sigma \left( \vec { h } _ { i } ^ { T } \mathbf { W } \vec { s } \right)
|
| 210 |
+
$$
|
| 211 |
+
|
| 212 |
+
Here, W is a learnable scoring matrix and $\sigma$ is the logistic sigmoid nonlinearity, used to convert scores into probabilities of $( \vec { h } _ { i } , \vec { s } )$ being a positive example.
|
| 213 |
+
|
| 214 |
+
All models are initialized using Glorot initialization (Glorot & Bengio, 2010) and trained to maximize the mutual information provided in Equation 1 on the available nodes (all nodes for the transductive, and training nodes only in the inductive setup) using the Adam SGD optimizer (Kingma & Ba, 2014) with an initial learning rate of 0.001 (specially, $1 0 ^ { - 5 }$ on Reddit). On the transductive datasets, we use an early stopping strategy on the observed training loss, with a patience of 20 epochs3. On the inductive datasets we train for a fixed number of epochs (150 on Reddit, 20 on PPI).
|
| 215 |
+
|
| 216 |
+
# 4.3 RESULTS
|
| 217 |
+
|
| 218 |
+
The results of our comparative evaluation experiments are summarized in Table 2.
|
| 219 |
+
|
| 220 |
+
For the transductive tasks, we report the mean classification accuracy (with standard deviation) on the test nodes of our method after 50 runs of training (followed by logistic regression), and reuse the metrics already reported in Kipf & Welling (2016a) for the performance of DeepWalk and GCN, as well as Label Propagation (LP) (Zhu et al., 2003) and Planetoid (Yang et al., 2016)—a representative supervised random walk method. Specially, we provide results for training the logistic regression on raw input features, as well as DeepWalk with the input features concatenated.
|
| 221 |
+
|
| 222 |
+
Table 2: Summary of results in terms of classification accuracies (on transductive tasks) or microaveraged $\mathrm { F _ { 1 } }$ scores (on inductive tasks). In the first column, we highlight the kind of data available to each method during training (X: features, A: adjacency matrix, Y: labels). “GCN” corresponds to a two-layer DGI encoder trained in a supervised manner.
|
| 223 |
+
Transductive
|
| 224 |
+
|
| 225 |
+
<table><tr><td>Available data</td><td>Method</td><td>Cora</td><td>Citeseer</td><td>Pubmed</td></tr><tr><td>X</td><td>Raw features</td><td>47.9 ± 0.4%</td><td>49.3 ± 0.2%</td><td>69.1 ± 0.3%</td></tr><tr><td>A,Y</td><td>LP (Zhu et al., 2003)</td><td>68.0%</td><td>45.3%</td><td>63.0%</td></tr><tr><td>A</td><td>DeepWalk (Perozzi et al.,2014)</td><td>67.2%</td><td>43.2%</td><td>65.3%</td></tr><tr><td>X,A</td><td>DeepWalk + features</td><td>70.7 ± 0.6%</td><td>51.4 ± 0.5%</td><td>74.3 ± 0.9%</td></tr><tr><td>X,A</td><td>Random-Init (ours)</td><td>69.3 ± 1.4%</td><td>61.9 ± 1.6%</td><td>69.6 ± 1.9%</td></tr><tr><td>X,A</td><td>DGI (ours)</td><td>82.3 ± 0.6%</td><td>71.8 ± 0.7%</td><td>76.8 ± 0.6%</td></tr><tr><td>X,A,Y</td><td>GCN (Kipf & Welling, 2016a)</td><td>81.5%</td><td>70.3%</td><td>79.0%</td></tr><tr><td>X,A,Y</td><td>Planetoid (Yang et al., 2016)</td><td>75.7%</td><td>64.7%</td><td>77.2%</td></tr></table>
|
| 226 |
+
|
| 227 |
+
Inductive
|
| 228 |
+
|
| 229 |
+
<table><tr><td>Available data</td><td>Method</td><td>Reddit</td><td>PPI</td></tr><tr><td>X</td><td>Raw features</td><td>0.585</td><td>0.422</td></tr><tr><td>A</td><td>DeepWalk (Perozzi et al., 2014)</td><td>0.324</td><td>一</td></tr><tr><td>X,A</td><td>DeepWalk + features</td><td>0.691</td><td>一</td></tr><tr><td>X,A</td><td>GraphSAGE-GCN (Hamilton et al., 2017a)</td><td>0.908</td><td>0.465</td></tr><tr><td>X,A</td><td>GraphSAGE-mean (Hamilton et al.,2017a)</td><td>0.897</td><td>0.486</td></tr><tr><td>X,A</td><td>GraphSAGE-LSTM (Hamilton et al., 2017a)</td><td>0.907</td><td>0.482</td></tr><tr><td>X,A</td><td>GraphSAGE-pool (Hamilton et al.,2017a)</td><td>0.892</td><td>0.502</td></tr><tr><td>X,A</td><td>Random-Init (ours)</td><td>0.933 ± 0.001</td><td>0.626 ± 0.002</td></tr><tr><td>X,A</td><td>DGI (ours)</td><td>0.940 ± 0.001</td><td>0.638 ± 0.002</td></tr><tr><td>X,A,Y</td><td>FastGCN (Chen et al., 2018)</td><td>0.937</td><td></td></tr><tr><td>X,A,Y</td><td>Avg. pooling (Zhang et al., 2018)</td><td>0.958 ± 0.001</td><td>0.969 ± 0.002</td></tr></table>
|
| 230 |
+
|
| 231 |
+
For the inductive tasks, we report the micro-averaged $\mathrm { F _ { 1 } }$ score on the (unseen) test nodes, averaged after 50 runs of training, and reuse the metrics already reported in Hamilton et al. (2017a) for the other techniques. Specifically, as our setup is unsupervised, we compare against the unsupervised GraphSAGE approaches. We also provide supervised results for two related architectures— FastGCN (Chen et al., 2018) and Avg. pooling (Zhang et al., 2018).
|
| 232 |
+
|
| 233 |
+
Our results demonstrate strong performance being achieved across all five datasets. We particularly note that the DGI approach is competitive with the results reported for the GCN model with the supervised loss, even exceeding its performance on the Cora and Citeseer datasets. We assume that these benefits stem from the fact that, indirectly, the DGI approach allows for every node to have access to structural properties of the entire graph, whereas the supervised GCN is limited to only two-layer neighborhoods (by the extreme sparsity of the training signal and the corresponding threat of overfitting). It should be noted that, while we are capable of outperforming equivalent supervised encoder architectures, our performance still does not surpass the current supervised transductive state of the art (which is held by methods such as GraphSGAN (Ding et al., 2018)). We further observe that the DGI method successfully outperformed all the competing unsupervised GraphSAGE approaches on the Reddit and PPI datasets—thus verifying the potential of methods based on local mutual information maximization in the inductive node classification domain. Our Reddit results are competitive with the supervised state of the art, whereas on PPI the gap is still large—we believe this can be attributed to the extreme sparsity of available node features (over $40 \%$ of the nodes having all-zero features), that our encoder heavily relies on.
|
| 234 |
+
|
| 235 |
+
We note that a randomly initialized graph convolutional network may already extract highly useful features and represents a strong baseline—a well-known fact, considering its links to the Weisfeiler
|
| 236 |
+
|
| 237 |
+

|
| 238 |
+
Figure 3: t-SNE embeddings of the nodes in the Cora dataset from the raw features (left), features from a randomly initialized DGI model (middle), and a learned DGI model (right). The clusters of the learned DGI model’s embeddings are clearly defined, with a Silhouette score of 0.234.
|
| 239 |
+
|
| 240 |
+
Lehman graph isomorphism test (Weisfeiler & Lehman, 1968), that have already been highlighted and analyzed by Kipf & Welling (2016a) and Hamilton et al. (2017a). As such, we also provide, as Random-Init, the logistic regression performance on embeddings obtained from a randomly initialized encoder. Besides demonstrating that DGI is able to further improve on this strong baseline, it particularly reveals that, on the inductive datasets, previous random walk-based negative sampling methods may have been ineffective for learning appropriate features for the classification task.
|
| 241 |
+
|
| 242 |
+
Lastly, it should be noted that deeper encoders correspond to more pronounced mixing between recovered patch representations, reducing the effective variability of our positive/negative examples’ pool. We believe that this is the reason why shallower architectures performed better on some of the datasets. While we cannot say that these trends will hold in general, with the DGI loss function we generally found benefits from employing wider, rather than deeper models.
|
| 243 |
+
|
| 244 |
+
# 5 QUALITATIVE ANALYSIS
|
| 245 |
+
|
| 246 |
+
We performed a diverse set of analyses on the embeddings learnt by the DGI algorithm in order to better understand the properties of DGI. We focus our analysis exclusively on the Cora dataset (as it has the smallest number of nodes, significantly aiding clarity).
|
| 247 |
+
|
| 248 |
+
A standard set of “evolving” t-SNE plots (Maaten & Hinton, 2008) of the embeddings is given in Figure 3. As expected given the quantitative results, the learnt embeddings’ 2D projections exhibit discernible clustering in the 2D projected space (especially compared to the raw features and Random-Init), which respects the seven topic classes of Cora. The projection obtains a Silhouette score (Rousseeuw, 1987) of 0.234, which compares favorably with the previous reported score of 0.158 for Embedding Propagation (Duran & Niepert, 2017).
|
| 249 |
+
|
| 250 |
+
We ran further analyses, revealing insights into DGI’s mechanism of learning, isolating biased embedding dimensions for pushing the negative example scores down and using the remainder to encode useful information about positive examples. We leverage these insights to retain competitive performance to the supervised GCN even after half the dimensions are removed from the patch representations provided by the encoder. These—and several other—qualitative and ablation studies can be found in Appendix B.
|
| 251 |
+
|
| 252 |
+
# 6 CONCLUSIONS
|
| 253 |
+
|
| 254 |
+
We have presented Deep Graph Infomax (DGI), a new approach for learning unsupervised representations on graph-structured data. By leveraging local mutual information maximization across the graph’s patch representations, obtained by powerful graph convolutional architectures, we are able to obtain node embeddings that are mindful of the global structural properties of the graph. This enables competitive performance across a variety of both transductive and inductive classification tasks, at times even outperforming relevant supervised architectures.
|
| 255 |
+
|
| 256 |
+
# ACKNOWLEDGMENTS
|
| 257 |
+
|
| 258 |
+
We would like to thank the developers of PyTorch (Paszke et al., 2017). PV and PL have received funding from the European Union’s Horizon 2020 research and innovation programme PROPAGAGEING under grant agreement No 634821. We specially thank Hugo Larochelle and Jian Tang for the extremely useful discussions, and Andreea Deac, Arantxa Casanova, Ben Poole, Graham Taylor, Guillem Cucurull, Justin Gilmer, Nithium Thain and Zhaocheng Zhu for reviewing the paper prior to submission.
|
| 259 |
+
|
| 260 |
+
# REFERENCES
|
| 261 |
+
|
| 262 |
+
Peter W Battaglia, Jessica B Hamrick, Victor Bapst, Alvaro Sanchez-Gonzalez, Vinicius Zambaldi, Mateusz Malinowski, Andrea Tacchetti, David Raposo, Adam Santoro, Ryan Faulkner, et al. Relational inductive biases, deep learning, and graph networks. arXiv preprint arXiv:1806.01261, 2018.
|
| 263 |
+
|
| 264 |
+
Ishmael Belghazi, Aristide Baratin, Sai Rajeswar, Sherjil Ozair, Yoshua Bengio, Aaron Courville, and R Devon Hjelm. Mine: mutual information neural estimation. arXiv preprint arXiv:1801.04062, ICML’2018, 2018.
|
| 265 |
+
|
| 266 |
+
Aleksandar Bojchevski and Stephan Gunnemann. Deep gaussian embedding of graphs: Unsuper-¨ vised inductive learning via ranking. In International Conference on Learning Representations, 2018. URL https://openreview.net/forum?id ${ . } = { }$ r1ZdKJ-0W.
|
| 267 |
+
|
| 268 |
+
Avishek Bose, Huan Ling, and Yanshuai Cao. Adversarial contrastive estimation. In ACL, 2018.
|
| 269 |
+
|
| 270 |
+
Michael M Bronstein, Joan Bruna, Yann LeCun, Arthur Szlam, and Pierre Vandergheynst. Geometric deep learning: going beyond euclidean data. IEEE Signal Processing Magazine, 34(4):18–42, 2017.
|
| 271 |
+
|
| 272 |
+
Jie Chen, Tengfei Ma, and Cao Xiao. Fastgcn: fast learning with graph convolutional networks via importance sampling. arXiv preprint arXiv:1801.10247, 2018.
|
| 273 |
+
|
| 274 |
+
Ronan Collobert and Jason Weston. A unified architecture for natural language processing: Deep neural networks with multitask learning. In Proceedings of the 25th international conference on Machine learning, pp. 160–167. ACM, 2008.
|
| 275 |
+
|
| 276 |
+
Ming Ding, Jie Tang, and Jie Zhang. Semi-supervised learning on graphs with generative adversarial nets. arXiv preprint arXiv:1809.00130, 2018.
|
| 277 |
+
|
| 278 |
+
Claire Donnat, Marinka Zitnik, David Hallac, and Jure Leskovec. Learning structural node embeddings via diffusion wavelets. In International ACM Conference on Knowledge Discovery and Data Mining (KDD), volume 24, 2018.
|
| 279 |
+
|
| 280 |
+
Alberto Garcia Duran and Mathias Niepert. Learning graph representations with embedding propagation. In Advances in Neural Information Processing Systems, pp. 5119–5130, 2017.
|
| 281 |
+
|
| 282 |
+
Justin Gilmer, Samuel S Schoenholz, Patrick F Riley, Oriol Vinyals, and George E Dahl. Neural message passing for quantum chemistry. arXiv preprint arXiv:1704.01212, 2017.
|
| 283 |
+
|
| 284 |
+
Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics, pp. 249–256, 2010.
|
| 285 |
+
|
| 286 |
+
Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pp. 2672–2680, 2014.
|
| 287 |
+
|
| 288 |
+
Aditya Grover and Jure Leskovec. node2vec: Scalable feature learning for networks. In Proceedings of the 22nd ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 855–864. ACM, 2016.
|
| 289 |
+
|
| 290 |
+
Michael Gutmann and Aapo Hyvarinen. Noise-contrastive estimation: A new estimation principle¨ for unnormalized statistical models. In Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics, pp. 297–304, 2010.
|
| 291 |
+
|
| 292 |
+
Will Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. In Advances in Neural Information Processing Systems, pp. 1024–1034, 2017a.
|
| 293 |
+
|
| 294 |
+
William L Hamilton, Rex Ying, and Jure Leskovec. Representation learning on graphs: Methods and applications. arXiv preprint arXiv:1709.05584, 2017b.
|
| 295 |
+
|
| 296 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In Proceedings of the IEEE international conference on computer vision, pp. 1026–1034, 2015.
|
| 297 |
+
|
| 298 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016.
|
| 299 |
+
|
| 300 |
+
R Devon Hjelm, Alex Fedorov, Samuel Lavoie-Marchildon, Karan Grewal, Adam Trischler, and Yoshua Bengio. Learning deep representations by mutual information estimation and maximization. arXiv preprint arXiv:1808.06670, 2018.
|
| 301 |
+
|
| 302 |
+
Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In CVPR, volume 1, pp. 3, 2017.
|
| 303 |
+
|
| 304 |
+
Glen Jeh and Jennifer Widom. Scaling personalized web search. In Proceedings of the 12th International Conference on the World Wide Web, pp. 271–279. Acm, 2003.
|
| 305 |
+
|
| 306 |
+
Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 307 |
+
|
| 308 |
+
Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907, 2016a.
|
| 309 |
+
|
| 310 |
+
Thomas N Kipf and Max Welling. Variational graph auto-encoders. arXiv preprint arXiv:1611.07308, 2016b.
|
| 311 |
+
|
| 312 |
+
Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of Machine Learning Research, 9(Nov):2579–2605, 2008.
|
| 313 |
+
|
| 314 |
+
Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. Distributed representations of words and phrases and their compositionality. In Advances in neural information processing systems, pp. 3111–3119, 2013.
|
| 315 |
+
|
| 316 |
+
Andriy Mnih and Koray Kavukcuoglu. Learning word embeddings efficiently with noise-contrastive estimation. In Advances in neural information processing systems, pp. 2265–2273, 2013.
|
| 317 |
+
|
| 318 |
+
Sebastian Nowozin, Botond Cseke, and Ryota Tomioka. f-gan: Training generative neural samplers using variational divergence minimization. In Advances in Neural Information Processing Systems, pp. 271–279, 2016.
|
| 319 |
+
|
| 320 |
+
Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018.
|
| 321 |
+
|
| 322 |
+
Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. In NIPS-W, 2017.
|
| 323 |
+
|
| 324 |
+
Jeffrey Pennington, Richard Socher, and Christopher Manning. Glove: Global vectors for word representation. In Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP), pp. 1532–1543, 2014.
|
| 325 |
+
|
| 326 |
+
Bryan Perozzi, Rami Al-Rfou, and Steven Skiena. Deepwalk: Online learning of social representations. In Proceedings of the 20th ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 701–710. ACM, 2014.
|
| 327 |
+
|
| 328 |
+
Leonardo FR Ribeiro, Pedro HP Saverese, and Daniel R Figueiredo. struc2vec: Learning node representations from structural identity. In Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 385–394. ACM, 2017.
|
| 329 |
+
|
| 330 |
+
Peter J Rousseeuw. Silhouettes: a graphical aid to the interpretation and validation of cluster analysis. Journal of computational and applied mathematics, 20:53–65, 1987.
|
| 331 |
+
|
| 332 |
+
Prithviraj Sen, Galileo Namata, Mustafa Bilgic, Lise Getoor, Brian Galligher, and Tina Eliassi-Rad. Collective classification in network data. AI magazine, 29(3):93, 2008.
|
| 333 |
+
|
| 334 |
+
Nitish Srivastava, Geoffrey E Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. Journal of machine learning research, 15(1):1929–1958, 2014.
|
| 335 |
+
|
| 336 |
+
Aravind Subramanian, Pablo Tamayo, Vamsi K Mootha, Sayan Mukherjee, Benjamin L Ebert, Michael A Gillette, Amanda Paulovich, Scott L Pomeroy, Todd R Golub, Eric S Lander, et al. Gene set enrichment analysis: a knowledge-based approach for interpreting genome-wide expression profiles. Proceedings of the National Academy of Sciences, 102(43):15545–15550, 2005.
|
| 337 |
+
|
| 338 |
+
Jian Tang, Meng Qu, Mingzhe Wang, Ming Zhang, Jun Yan, and Qiaozhu Mei. Line: Largescale information network embedding. In Proceedings of the 24th International Conference on World Wide Web, pp. 1067–1077. International World Wide Web Conferences Steering Committee, 2015.
|
| 339 |
+
|
| 340 |
+
Petar Velickovi ˇ c, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Li ´ o, and Yoshua \` Bengio. Graph Attention Networks. International Conference on Learning Representations, 2018. URL https://openreview.net/forum?id $=$ rJXMpikCZ.
|
| 341 |
+
|
| 342 |
+
Oriol Vinyals, Samy Bengio, and Manjunath Kudlur. Order matters: Sequence to sequence for sets. arXiv preprint arXiv:1511.06391, 2015.
|
| 343 |
+
|
| 344 |
+
Daixin Wang, Peng Cui, and Wenwu Zhu. Structural deep network embedding. In Proceedings of the 22nd ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 1225–1234. ACM, 2016.
|
| 345 |
+
|
| 346 |
+
Xiao Wang, Peng Cui, Jing Wang, Jian Pei, Wenwu Zhu, and Shiqiang Yang. Community preserving network embedding. In AAAI, pp. 203–209, 2017.
|
| 347 |
+
|
| 348 |
+
Boris Weisfeiler and AA Lehman. A reduction of a graph to a canonical form and an algebra arising during this reduction. Nauchno-Technicheskaya Informatsia, 2(9):12–16, 1968.
|
| 349 |
+
|
| 350 |
+
Zhilin Yang, William W Cohen, and Ruslan Salakhutdinov. Revisiting semi-supervised learning with graph embeddings. arXiv preprint arXiv:1603.08861, 2016.
|
| 351 |
+
|
| 352 |
+
Rex Ying, Ruining He, Kaifeng Chen, Pong Eksombatchai, William L Hamilton, and Jure Leskovec. Graph convolutional neural networks for web-scale recommender systems. arXiv preprint arXiv:1806.01973, 2018a.
|
| 353 |
+
|
| 354 |
+
Rex Ying, Jiaxuan You, Christopher Morris, Xiang Ren, William L Hamilton, and Jure Leskovec. Hierarchical graph representation learning with differentiable pooling. arXiv preprint arXiv:1806.08804, 2018b.
|
| 355 |
+
|
| 356 |
+
Jiani Zhang, Xingjian Shi, Junyuan Xie, Hao Ma, Irwin King, and Dit-Yan Yeung. Gaan: Gated attention networks for learning on large and spatiotemporal graphs. arXiv preprint arXiv:1803.07294, 2018.
|
| 357 |
+
|
| 358 |
+
Xiaojin Zhu, Zoubin Ghahramani, and John D Lafferty. Semi-supervised learning using gaussian fields and harmonic functions. In Proceedings of the 20th International conference on Machine learning (ICML-03), pp. 912–919, 2003.
|
| 359 |
+
|
| 360 |
+
Marinka Zitnik and Jure Leskovec. Predicting multicellular function through multi-layer tissue networks. Bioinformatics, 33(14):i190–i198, 2017.
|
| 361 |
+
|
| 362 |
+

|
| 363 |
+
Figure 4: Discriminator scores, $\mathcal { D } \left( \vec { h } _ { i } , \vec { s } \right)$ , attributed to each node in the Cora dataset shown over a t-SNE of the DGI algorithm. Shown for both the original graph (left) and a negative sample (right).
|
| 364 |
+
|
| 365 |
+
# A FURTHER DATASET DETAILS
|
| 366 |
+
|
| 367 |
+
Transductive learning. We utilize three standard citation network benchmark datasets—Cora, Citeseer and Pubmed (Sen et al., 2008)—and closely follow the transductive experimental setup of Yang et al. (2016). In all of these datasets, nodes correspond to documents and edges to (undirected) citations. Node features correspond to elements of a bag-of-words representation of a document. Each node has a class label. We allow for only 20 nodes per class to be used for training—however, honouring the transductive setup, the unsupervised learning algorithm has access to all of the nodes’ feature vectors. The predictive power of the learned representations is evaluated on 1000 test nodes.
|
| 368 |
+
|
| 369 |
+
Inductive learning on large graphs. We use a large graph dataset (231,443 nodes and 11,606,919 edges) of Reddit posts created during September 2014 (derived and preprocessed as in Hamilton et al. (2017a)). The objective is to predict the posts’ community (“subreddit”), based on the GloVe embeddings of their content and comments (Pennington et al., 2014), as well as metrics such as score or number of comments. Posts are linked together in the graph if the same user has commented on both. Reusing the inductive setup of Hamilton et al. (2017a), posts made in the first 20 days of the month are used for training, while the remaining posts are used for validation or testing and are invisible to the training algorithm.
|
| 370 |
+
|
| 371 |
+
Inductive learning on multiple graphs. We make use of a protein-protein interaction (PPI) dataset that consists of graphs corresponding to different human tissues (Zitnik & Leskovec, 2017). The dataset contains 20 graphs for training, 2 for validation and 2 for testing. Critically, testing graphs remain completely unobserved during training. To construct the graphs, we used the preprocessed data provided by Hamilton et al. (2017a). Each node has 50 features that are composed of positional gene sets, motif gene sets and immunological signatures. There are 121 labels for each node set from gene ontology, collected from the Molecular Signatures Database (Subramanian et al., 2005), and a node can possess several labels simultaneously.
|
| 372 |
+
|
| 373 |
+
# B FURTHER QUALITATIVE ANALYSIS
|
| 374 |
+
|
| 375 |
+
Visualizing discriminator scores. After obtaining the t-SNE visualizations, we turned our attention to the discriminator—and visualized the scores it attached to various nodes, for both the positive and a (randomly sampled) negative example (Figure 4). From here we can make an interesting observation—within the “clusters” of the learnt embeddings on the positive Cora graph, only a handful of “hot” nodes are selected to receive high discriminator scores. This suggests that there may be a clear distinction between embedding dimensions used for discrimination and classification, which we more thoroughly investigate in the next paragraph. In addition, we may observe that, as expected, the model is unable to find any strong structure within a negative example. Lastly, a few negative examples achieve high discriminator scores—a phenomenon caused by the existence of low-degree nodes in Cora (making the probability of a node ending up in an identical context it had in the positive graph non-negligible).
|
| 376 |
+
|
| 377 |
+

|
| 378 |
+
Figure 5: The learnt embeddings of the highest-scored positive examples (upper half ), and the lowest-scored negative examples (lower half ).
|
| 379 |
+
|
| 380 |
+

|
| 381 |
+
Figure 6: Classification performance (in terms of test accuracy of logistic regression; left) and discriminator performance (in terms of number of poorly discriminated positive/negative examples; right) on the learnt DGI embeddings, after removing a certain number of dimensions from the embedding—either starting with most distinguishing $( p \uparrow )$ or least distinguishing $( p \downarrow )$ .
|
| 382 |
+
|
| 383 |
+
Impact and role of embedding dimensions. Guided by the previous result, we have visualized the embeddings for the top-scoring positive and negative examples (Figure 5). The analysis revealed existence of distinct dimensions in which both the positive and negative examples are strongly biased. We hypothesize that, given the random shuffling, the average expected activation of a negative example is zero, and therefore strong biases are required to “push” the example down in the discriminator. The positive examples may then use the remaining dimensions to both counteract this bias and encode patch similarity. To substantiate this claim, we order the 512 dimensions based on how distinguishable the positive and negative examples are in them (using $p$ -values obtained from a t-test as a proxy). We then remove these dimensions from the embedding, respecting this order—either starting from the most distinguishable $( p \uparrow )$ or least distinguishable dimensions $( p \downarrow )$ —monitoring how this affects both classification and discriminator performance (Figure 6). The observed trends largely support our hypothesis: if we start by removing the biased dimensions first $( p \downarrow )$ , the classification performance holds up for much longer (allowing us to remove over half of the embedding dimensions while remaining competitive to the supervised GCN), and the positive examples mostly remain correctly discriminated until well over half the dimensions are removed.
|
| 384 |
+
|
| 385 |
+
# C ROBUSTNESS TO CHOICE OF CORRUPTION FUNCTION
|
| 386 |
+
|
| 387 |
+
Here, we consider alternatives to our corruption function, $\mathcal { C }$ , used to produce negative graphs. We generally find that, for the node classification task, DGI is stable and robust to different strategies. However, for learning graph features towards other kinds of tasks, the design of appropriate corruption strategies remains an area of open research.
|
| 388 |
+
|
| 389 |
+
Our corruption function described in Section 4.2 preserves the original adjacency matrix $( \widetilde { \mathbf { A } } \ =$ A) but corrupts the features, $\widetilde { \mathbf { X } }$ , via row-wise shuffling of $\mathbf { X }$ . In this case, the negative graph is constrained to be isomorphic to the positive graph, which should not have to be mandatory. We can instead produce a negative graph by directly corrupting the adjacency matrix.
|
| 390 |
+
|
| 391 |
+
Therefore, we first consider an alternative corruption function $\mathcal { C }$ which preserves the features $\widetilde { \mathbf { X } } = \mathbf { X } )$ ) but instead adds or removes edges from the adjacency matrix $\bar { \mathbf { A } } \neq \mathbf { A } \mathbf { ) }$ . This is done by sampling, i.i.d., a switch parameter $\Sigma _ { i j }$ , which determines whether to corrupt the adjacency matrix at position $( i , j )$ . Assuming a given corruption rate, $\rho$ , we may define $\mathcal { C }$ as performing the following operations:
|
| 392 |
+
|
| 393 |
+
$$
|
| 394 |
+
\begin{array} { c } { { \Sigma _ { i j } \sim \mathrm { B e r n o u l l i } ( \rho ) } } \\ { { \widetilde { \mathbf { A } } = \mathbf { A } \oplus \Sigma } } \end{array}
|
| 395 |
+
$$
|
| 396 |
+
|
| 397 |
+
where $\oplus$ is the XOR (exclusive OR) operation.
|
| 398 |
+
|
| 399 |
+
This alternative strategy produces a negative graph with the same features, but different connectivity. Here, the corruption rate of $\rho = 0$ corresponds to an unchanged adjacency matrix (i.e. the positive and negative graphs are identical in this case). In this regime, learning is impossible for the discriminator, and the performance of DGI is in line with a randomly initialized DGI model. At higher rates of noise, however, DGI produces competitive embeddings.
|
| 400 |
+
|
| 401 |
+
We also consider simultaneous feature shuffling $\widetilde { \mathbf { X } } \mathbf { \Lambda } \neq \mathbf { X } )$ and adjacency matrix perturbation $\widetilde { \mathbf { A } } \neq \mathbf { A } \}$ , both as described before. We find that DGI still learns useful features under this compound corruption strategy—as expected, given that feature shuffling is already equivalent to an (isomorphic) adjacency matrix perturbation.
|
| 402 |
+
|
| 403 |
+
From both studies, we may observe that a certain lower bound on the positive graph perturbation rate is required to obtain competitive node embeddings for the classification task on Cora. Furthermore, the features learned for downstream node classification tasks are most powerful when the negative graph has similar levels of connectivity to the positive graph.
|
| 404 |
+
|
| 405 |
+
The classification performance peaks when the graph is perturbed to a reasonably high level, but remains sparse; i.e. the mixing between the separate 1-step patches is not substantial, and therefore the pool of negative examples is still diverse enough. Classification performance is impacted only marginally at higher rates of corruption—corresponding to dense negative graphs, and thus a less rich negative example pool—but still considerably outperforming the unsupervised baselines we have considered. This could be seen as further motivation for relying solely on feature shuffling, without adjacency perturbations—given that feature shuffling is a trivial way to guarantee a diverse set of negative examples, without incurring significant computational costs per epoch.
|
| 406 |
+
|
| 407 |
+
The results of this study are visualized in Figures 7 and 8.
|
| 408 |
+
|
| 409 |
+

|
| 410 |
+
Figure 7: DGI also works under a corruption function that modifies only the adjacency matrix $\widetilde { \mathbf { A } } \neq \mathbf { A } \}$ on the Cora dataset. The left range $( \rho \ \to \ 0 )$ ) corresponds to no modifications of the adjacency matrix—therein, performance approaches that of the randomly initialized DGI model. As $\rho$ increases, DGI produces more useful features, but ultimately fails to outperform the featureshuffling corruption function. N.B. log scale used for $\rho$ .
|
| 411 |
+
|
| 412 |
+

|
| 413 |
+
Figure 8: DGI is stable and robust under a corruption function that modifies both the feature matrix $( \bar { \mathbf { X } } \neq \widetilde { \mathbf { X } } )$ and the adjacency matrix $\widetilde { \mathbf { A } } \neq \mathbf { A } )$ on the Cora dataset. Corruption functions that preserve sparsity $\begin{array} { r } { ( \rho \approx \frac { 1 } { N } ) } \end{array}$ ) perform the best. However, DGI still performs well even with large disruptions (where edges are added or removed with probabilities approaching 1). N.B. log scale used for $\rho$ .
|
parse/train/rklz9iAcKQ/rklz9iAcKQ_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/zmbiQmdtg9/zmbiQmdtg9.md
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Improved Transformer for High-Resolution GANs
|
| 2 |
+
|
| 3 |
+
Long Zhao1,∗ Zizhao Zhang2 1Rutgers University
|
| 4 |
+
|
| 5 |
+
Ting Chen3 Dimitris N. Metaxas1 Han Zhang3 2Google Cloud AI 3Google Research
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
Attention-based models, exemplified by the Transformer, can effectively model long range dependency, but suffer from the quadratic complexity of self-attention operation, making them difficult to be adopted for high-resolution image generation based on Generative Adversarial Networks (GANs). In this paper, we introduce two key ingredients to Transformer to address this challenge. First, in low-resolution stages of the generative process, standard global self-attention is replaced with the proposed multi-axis blocked self-attention which allows efficient mixing of local and global attention. Second, in high-resolution stages, we drop self-attention while only keeping multi-layer perceptrons reminiscent of the implicit neural function. To further improve the performance, we introduce an additional self-modulation component based on cross-attention. The resulting model, denoted as HiT, has a nearly linear computational complexity with respect to the image size and thus directly scales to synthesizing high definition images. We show in the experiments that the proposed HiT achieves state-of-the-art FID scores of 30.83 and 2.95 on unconditional ImageNet $1 2 8 \times 1 2 8$ and FFHQ $2 5 6 \times 2 5 6$ , respectively, with a reasonable throughput. We believe the proposed HiT is an important milestone for generators in GANs which are completely free of convolutions. Our code is made publicly available at https://github.com/google-research/hit-gan.
|
| 10 |
+
|
| 11 |
+
# 1 Introduction
|
| 12 |
+
|
| 13 |
+
Attention-based models demonstrate notable learning capabilities for both encoder-based and decoderbased architectures [66, 69] due to their self-attention operations which can capture long-range dependencies in data. Recently, Vision Transformer [12], one of the most powerful attention-based models, has achieved a great success on encoder-based vision tasks, specifically image classification [12, 60], segmentation [37, 64], and vision-language modeling [46]. However, applying the Transformer to image generation based on Generative Adversarial Networks (GANs) is still an open problem.
|
| 14 |
+
|
| 15 |
+
The main challenge of adopting the Transformer as a decoder/generator lies in two aspects. On one hand, the quadratic scaling problem brought by the self-attention operation becomes even worse when generating pixel-level details for high-resolution images. For example, synthesizing a high definition image with the resolution of $1 0 2 4 \times 1 0 2 4$ leads to a sequence containing around one million pixels in the final stage, which is unaffordable for the standard self-attention mechanism. On the other hand, generating images from noise inputs poses a higher demand for spatial coherency in structure, color, and texture than discriminative tasks, and hence a more powerful yet efficient self-attention mechanism is desired for decoding feature representations from inputs.
|
| 16 |
+
|
| 17 |
+
In view of these two key challenges, we propose a novel Transformer-based decoder/generator in GANs for high-resolution image generation, denoted as HiT. HiT employs a hierarchical structure of Transformers and divides the generative process into low-resolution and high-resolution stages, focusing on feature decoding and pixel-level generating, respectively. Specifically, its low-resolution stages follow the design of Nested Transformers [73] but enhanced by the proposed multi-axis blocked self-attention to better capture global information. Assuming that spatial features are well decoded after low-resolution stages, in high-resolution stages, we drop all self-attention operations in order to handle extremely long sequences for high definition image generation. The resulting high-resolution stages of HiT are built by multi-layer perceptrons (MLPs) which have a linear complexity with respect to the sequence length. Note that this design aligns with the recent findings [58, 59] that pure MLPs manage to learn favorable features for images, but it simply reduces to an implicit neural function [41, 42, 43] in the case of generative modeling. To further improve the performance, we present an additional cross-attention module that acts as a form of self-modulation [8]. In summary, this paper makes the following contributions:
|
| 18 |
+
|
| 19 |
+
• We propose HiT, a Transformer-based generator for high-fidelity image generation. Standard self-attention operations are removed in the high-resolution stages of HiT, reducing them to an implicit neural function. The resulting architecture easily scales to high definition image synthesis (with the resolution of $1 0 2 4 \times 1 0 2 4 )$ and has a comparable throughput to StyleGAN2 [28]. To tame the quadratic complexity and enhance the representation capability of self-attention operation in low-resolution stages, we present a new form of sparse self-attention operation, namely multi-axis blocked self-attention. It captures local and global dependencies within nonoverlapping image blocks in parallel by attending to a single axis of the input tensor at a time, each of which uses a half of attention heads. The proposed multi-axis blocked self-attention is efficient, simple to implement, and yields better performance than other popular self-attention operations [37, 62, 73] working on image blocks for generative tasks. In addition, we introduce a cross-attention module performing attention between the input and intermediate features. This module re-weights intermediate features of the model as a function of the input, playing a role as self-modulation [8], and provides important global information to high-resolution stages where self-attention operations are absent. The proposed HiT obtains competitive FID [16] scores of 30.83 and 2.95 on unconditional ImageNet [49] $1 2 8 \times 1 2 8$ and FFHQ [28] $2 5 6 \times 2 5 6$ , respectively, highly reducing the gap between ConvNet-based GANs and Transformer-based ones. We also show that HiT not only works for GANs but also can serve as a general decoder for other models such as VQ-VAE [61]. Moreover, we observe that the proposed HiT can obtain more performance improvement from regularization than its ConvNet-based counterparts. To the best of our knowledge, these are the best reported scores for an image generator that is completely free of convolutions, which is an important milestone towards adopting Transformers for high-resolution generative modeling.
|
| 20 |
+
|
| 21 |
+
# 2 Related work
|
| 22 |
+
|
| 23 |
+
Transformers for image generation. There are two main streams of image generation models built on Transformers [63] in the literature. One stream of them [14, 44] is inspired by auto-regressive models that learn the joint probability of the image pixels. The other stream focuses on designing Transformer-based architecture for generative adversarial networks (GANs) [15]. This work follows the spirit of the second stream. GANs have made great progress in various image generation tasks, such as image-to-image translation [57, 74, 75, 79] and text-to-image synthesis [70, 71], but most of them depend on ConvNet-based backbones. Recent attempts [23, 32] build a pure Transformer-based GAN by a careful design of attention hyper-parameters as well as upsampling layers. However, such a model is only validated on small scale datasets (e.g., CIFAR-10 [31] and STL-10 [10] consisting of $3 2 \times 3 2$ images) and does not scale to complex real-world data. To our best knowledge, no existing work has successfully applied a Transformer-based architecture completely free of convolutions for high-resolution image generation in GANs.
|
| 24 |
+
|
| 25 |
+
GANformer [21] leverages the Transformer as a plugin component to build the bipartite structure to allow long-range interactions during the generative process, but its main backbone is still a ConvNet based on StyleGAN [28]. GANformer and HiT are different in the goal of using attention modules. GANformer utilizes the attention mechanism to model the dependences of objects in a generated scene/image. Instead, HiT explores building efficient attention modules for synthesizing general objects. Our experiments demonstrate that even for simple face image datasets, incorporating the attention mechanism can still lead to performance improvement. We believe our work reconfirms the necessity of using attention modules for general image generation tasks, and more importantly, we present an efficient architecture for attention-based high-resolution generators which might benefit the design of future attention-based GANs.
|
| 26 |
+
|
| 27 |
+

|
| 28 |
+
Figure 1: HiT architecture. In each stage, input the feature is first organized into blocks (denoted as $\mathbf { B } _ { i }$ ). HiT’s low-resolution stages follow the decoder design of Nested Transformer [73] which is then enhanced by the proposed multi-axis blocked self-attention. We drop self-attention operations in the high-resolution stages, resulting in implicit neural functions. The model is further boosted by cross-attention modules which allow intermediate features to be modulated directly by the input latent code. The detailed algorithm can be found in the supplementary materials.
|
| 29 |
+
|
| 30 |
+
Attention models. Many efforts [2, 17, 65] have been made to reduce the quadratic complexity of self-attention operation. When handling vision tasks, some works [37, 62, 73] propose to compute local self-attention in blocked images which takes advantage of the grid structure of images. [6] also presents local self-attention within image blocks but it does not perform self-attention across blocks as in HiT. The most related works to the proposed multi-axis blocked self-attention are [17, 65] where they also compute attention along axes. But our work differs notably in that we compute different attentions within heads on blocked images. Some other works [7, 21, 22] avoid directly applying standard self-attention to the input pixels, and perform attention between the input and a small set of latent units. Our cross-attention module differs from them in that we apply cross-attention to generative modeling designed for pure Transformer-based architectures.
|
| 31 |
+
|
| 32 |
+
Implicit neural representations. The largest popularity of implicit neural representations/functions (INRs) is studied in 3D deep learning to represent a 3D shape in a cheap and continuous way [41, 42, 43]. Recent studies [1, 13, 34, 54] explore the idea of using INRs for image generation, where they learn a hyper MLP network to predict an RGB pixel value given its coordinates on the image grid. Among them, [1, 54] are closely related to our high-resolution stages of the generative process. One remarkable difference is that our model is driven by the cross-attention module and features generated in previous stages instead of the hyper-network presented in [1, 54].
|
| 33 |
+
|
| 34 |
+
# 3 Approach
|
| 35 |
+
|
| 36 |
+
# 3.1 Main Architecture
|
| 37 |
+
|
| 38 |
+
In the case of unconditional image generation, HiT takes a latent code $z \sim \mathcal { N } ( \mathbf { 0 } , I )$ as input and generates an image of the target resolution through a hierarchical structure. The latent code is first projected into an initial feature with the spatial dimension of $H _ { 0 } \times W _ { 0 }$ and channel dimension of $C _ { 0 }$ . During the generation process, we gradually increase the spatial dimension of the feature map while reducing the channel dimension in multiple stages. We divide the generation stages into low-resolution stages and high-resolution stages to balance feature dependency range in decoding and computation efficiency. The overview of the proposed method is illustrated in Figure 1.
|
| 39 |
+
|
| 40 |
+
In low-resolution stages, we allow spatial mixing of information by efficient attention mechanism. We follow the decoder form of Nested Transformer [73] where in each stage, the input feature is first divided into non-overlapping blocks where each block can be considered as a local patch. After being combined with learnable positional encoding, each block is processed independently via a shared attention module. We enhance the local self-attention of Nested Transformer by the proposed multiaxis blocked self-attention that can produce a richer feature representation by explicitly considering local (within blocks) as well as global (across blocks) relations. We denote the overall architecture of these stages as multi-axis Nested Transformer.
|
| 41 |
+
|
| 42 |
+

|
| 43 |
+
Figure 2: Multi-axis self-attention architecture. The different stages of multi-axis self-attention for a $[ 4 , 4 , C ]$ input with the block size of $b = 2$ . The input is first blocked into $2 \times 2$ non-overlapping $\left[ 2 , 2 , C \right]$ patches. Then regional and dilated self-attention operations are computed along two different axes, respectively, each of which uses a half of attention heads. The attention operations run in parallel for each of the tokens and their corresponding attention regions, illustrated with different colors. The spatial dimensions after attention are the same as the input image.
|
| 44 |
+
|
| 45 |
+
Assuming that spatial dependency is well modeled in the low-resolution stages, the high-resolution stages can focus on synthesizing pixel-level image details purely based on the local features. Thus in the high-resolution stage, we remove all self-attention modules and only maintain MLPs which can further reduce computation complexity. The resulting architecture in this stage can be viewed as an implicit neural function conditioned on the given latent feature as well as positional information.
|
| 46 |
+
|
| 47 |
+
We further enhance HiT by adding a cross-attention module at the beginning of each stage which allows the network to directly condition the intermediate features on the initial input latent code. This kind of self-modulation layer leads to improved generative performance, especially when selfattention modules are absent in high-resolution stages. In the following sections, we provided detailed descriptions for the two main architectural components of HiT: (i) multi-axis blocked self-attention module and (ii) cross-attention module, respectively.
|
| 48 |
+
|
| 49 |
+
# 3.2 Multi-Axis Blocked Self-Attention
|
| 50 |
+
|
| 51 |
+
Different from the blocked self-attention in Nested Transformer [73], the proposed multi-axis blocked self-attention performs attention on more than a single axis. The attentions performed in two axes correspond to two forms of sparse self-attention, namely regional attention and dilated attention. Regional attention follows the spirit of blocked local self-attention [37, 62] where tokens attend to their neighbours within non-overlapped blocks. To remedy the loss of global attention, dilated attention captures long-range dependencies between tokens across blocks: it subsamples attention regions in a manner similar to dilated convolutions with a fixed stride equal to the block size. Figure 2 illustrates an example of these two attentions.
|
| 52 |
+
|
| 53 |
+
To be specific, given an input of image with size $( H , W , C )$ , it is blocked into a tensor $X$ of the shape $\begin{array} { r } { ( \bar { b } \times b , \frac { H } { b } \times \frac { W } { b } , C ) } \end{array}$ representing $( b , b )$ non-overlapping blocks each with the size of $\textstyle { \left( { \frac { H } { b } } , { \frac { W } { b } } \right) }$ Dilated attention mixes information along the first axis of while keeping information along other axes independent; regional attention works in an analogous manner over the second axis of $X$ . They are straightforward to implement: attention over the $i$ -th axis of $X$ can be implemented by einsum operation which is available in most deep learning libraries.
|
| 54 |
+
|
| 55 |
+
We mix regional and dilated attention in a single layer by computing them in parallel, each of which uses a half of attention heads. Our method can be easily extended to model more than two axes by performing attention on each of the axis in parallel. Axial attention [17, 20, 65] can be viewed as a special case of our method, where the blocking operation before attention is removed. However, we find blocking is the key to achieve significant performance improvement in the experiment. This is because the blocked structure reveals a better inductive bias for images. Compared with [17, 37, 65] where different attention modules are interleaved in consecutive layers, our approach aggregates local and global information in a single round, which is not only more flexible for architecture design but also shown to yield better performance than interleaving in our experiment.
|
| 56 |
+
|
| 57 |
+
Balancing attention between axes. In each multi-axis blocked self-attention module, the input feature is blocked in a balanced way such that we have $\begin{array} { r } { b \times b \approx \frac { H } { b } \times \frac { W } { b } } \end{array}$ . This ensures that regional and dilated attention is computed on an input sequence of a similar length, avoiding half of the attention heads are attended to a too sparse region. In general, performing dot-product attention between two input sequences of length $N = H \times W$ requires a total of $\mathcal { O } ( \bar { N } ^ { 2 } )$ computation. When computing the balanced multi-axis blocked attention on an image with the block size of $S$ , i.e., $S = \sqrt { N }$ , we perform attention on $S$ sequences of length $S$ , which is a total of $\mathcal { O } ( S { \cdot } S ^ { 2 } ) = \mathcal { O } ( N \sqrt { N } )$ computation. This leads to an $\mathcal { O } ( \sqrt { N } )$ saving in computation over standard self-attention.
|
| 58 |
+
|
| 59 |
+
# 3.3 Cross-Attention for Self-Modulation
|
| 60 |
+
|
| 61 |
+
To further improve the global information flow, we propose to let the intermediate features of the model directly attend to a small tensor projected from the input latent code. This is implemented via a cross-attention operation and can be viewed as a form of self-modulation [8]. The proposed technique has two benefits. First, as shown in [8], self-modulation stabilizes the generator towards favorable conditioning values and also appears to improve mode coverage. Second, when self-attention modules are absent in high-resolution stages, attending to the input latent code provides an alternative way to capture global information when generating pixel-level details.
|
| 62 |
+
|
| 63 |
+
Formally, let $X _ { l }$ be the first-layer feature representation of the $l$ -th stage. The input latent code $z$ is first projected into a 2D spatial embedding $Z$ with the resolution of $H _ { Z } \times W _ { Z }$ and dimension of $C _ { Z }$ by a linear function. $X _ { l }$ is then treated as the query and $Z$ as the key and value. We compute their cross-attention following the update rule: $X _ { l } ^ { \prime } = \mathbf { M H A } ( X _ { l } , Z + P _ { Z } )$ , where MHA represents the standard mulit-head self-attention, $X _ { l } ^ { \prime }$ is the output, and $P _ { Z }$ is the learnable positional encoding having the same shape as $Z$ . Note that $Z$ is shared across all stages. For an input feature with the sequence length of $N$ , the embedding size is a pre-defined hyperparameter far less than $N$ (i.e., $H _ { Z } \times W _ { Z } \ll N )$ . Therefore, the resulting cross-attention operation has linear complexity $\mathcal { O } ( N )$ .
|
| 64 |
+
|
| 65 |
+
In our initial experiments, we find that compared with cross-attention, using AdaIN [19] and modulated layers [28] for Transformer-based generators requires much higher memory cost during model training, which usually leads to out-of-memory errors when the model is trained for generating highresolution images. As a result, related work like ViT-GAN [32], which uses AdaIN and modulated layers, can only produce images up to the resolution of $6 4 \times 6 4$ . Hence, we believe cross-attention is a better choice for high-resolution generators based on Transformers.
|
| 66 |
+
|
| 67 |
+
# 4 Experiments
|
| 68 |
+
|
| 69 |
+
# 4.1 Experiment Setup
|
| 70 |
+
|
| 71 |
+
Datasets. We validate the proposed method on three datasets: ImageNet [49], CelebA-HQ [25], and FFHQ [28]. ImageNet (LSVRC2012) [49] contains roughly 1.2 million images with 1000 distinct categories and we down-sample the images to $1 2 8 \times 1 2 8$ and $2 5 6 \times 2 5 6$ by bicubic interpolation. We use random crop for training and center crop for testing. This dataset is challenging for image generation since it contains samples with diverse object categories and textures. We also adopt ImageNet as the main test bed during the ablation study.
|
| 72 |
+
|
| 73 |
+
CelebA-HQ [25] is a high-quality version of the CelebA dataset [38] containing 30,000 of the facial images at $1 0 2 4 \times 1 0 2 4$ resolution. To align with [25], we use these images for both training and evaluation. FFHQ [28] includes vastly more variation than CelebA-HQ in terms of age, ethnicity and image background, and also has much better coverage of accessories such as eyeglasses, sunglasses, and hats. This dataset consists of 70,000 high-quality images at $1 0 2 4 \times 1 0 2 4$ resolution, out of which we use 50,000 images for testing and train models with all images following [28]. We synthesize images on these two datasets with the resolutions of $2 5 6 \times 2 5 6$ and $1 0 2 4 \times 1 0 2 4$ .
|
| 74 |
+
|
| 75 |
+
Evaluation metrics. We adopt the Inception Score (IS) [51] and the Fréchet Inception Distance (FID) [16] for quantitative evaluation. Both metrics are calculated based on a pre-trained Inception-v3 image classifier [56]. Inception score computes KL-divergence between the real image distribution and the generated image distribution given the pre-trained classifier. Higher inception scores mean better image quality. FID is a more principled and comprehensive metric, and has been shown to be more consistent with human judgments of realism [16, 70]. Lower FID values indicate closer distances between synthetic and real data distributions. In our experiments, 50,000 samples are randomly generated for each model to calculate the inception score and FID on ImageNet and FFHQ, while 30,000 samples are produced for comparison on CelebA-HQ. Note that we follow [51] to split the synthetic images into groups (5000 images per group) and report their averaged inception score.
|
| 76 |
+
|
| 77 |
+
# 4.2 Implementation Details
|
| 78 |
+
|
| 79 |
+
Architecture configuration. In our implementation, HiT starts from an initial feature of size $8 \times 8$ projected from the input latent code. We use pixel shuffle [53] for upsampling the output of each stage, as we find using nearest neighbors leads to model failure which aligns with the observation in Nested Transformer [73]. The number of low-resolution stages is fixed to be 4 as a good trade-off between computational speed and generative performance. For generating images larger than the resolution of $1 2 8 \times 1 2 8$ , we scale HiT to different model capacities – small, base, and large, denoted as HiT-{S, B, L}. We refer to the supplementary materials for their detailed architectures.
|
| 80 |
+
|
| 81 |
+
It is worth emphasizing that the flexibility of the proposed multi-axis blocked self-attention makes it possible for us to build smaller models than [37]. This is because they interleave different types of attention operations and thus require the number of attention blocks in a single stage to be even (at least 2). In contrast, our multi-axis blocked self-attention combines different attention outputs within heads which allows us to use an arbitrary number (e.g., 1) of attention blocks in a model.
|
| 82 |
+
|
| 83 |
+
Training details. In all the experiments, we use a ResNet-based discriminator following the architecture design of [28]. Our model is trained with a standard non-saturating logistic GAN loss with $R _ { 1 }$ gradient penalty [40] applied to the discriminator. $R _ { 1 }$ penalty penalizes the discriminator for deviating from the Nash-equilibrium by penalizing the gradient on real data alone. The gradient penalty weight is set to 10. Adam [29] is utilized for optimization with $\beta _ { 1 } = 0$ and $\beta _ { 2 } = 0 . 9 9$ The learning rate is 0.0001 for both the generator and discriminator. All the models are trained using TPU for one million iterations on ImageNet and 500,000 iterations on FFHQ and CelebA-HQ. We set the mini-batch size to 256 for the image resolution of $1 2 8 \times 1 2 8$ and $2 5 6 \times 2 5 6$ while to 32 for the resolution of $1 0 2 4 \times 1 0 2 4$ . To keep our setup simple, we do not employ any training tricks for GAN training, such as progressive growing, equalized learning rates, pixel normalization, noise injection, and mini-batch standard deviation that recent literature demonstrate to be cruicial for obtaining state-of-the-art results [25, 28]. When training on FFHQ and CelebA-HQ, we utilize balanced consistency regularization (bCR) [72, 77] for additional regularization where images are augmented by flipping, color, translation, and cutout as in [76]. bCR enforces that for both real and generated images, two sets of augmentations applied to the same input image should yield the same output. bCR is only added to the discriminator with the weight of 10. We also decrease the learning rate by half to stabilize the training process when bCR is used.
|
| 84 |
+
|
| 85 |
+
# 4.3 Results on ImageNet
|
| 86 |
+
|
| 87 |
+
Unconditional generation. We start by evaluating the proposed HiT on the ImageNet $1 2 8 \times 1 2 8$ dataset, targeting the unconditional image generation setting for simplicity. In addition to recently reported state-of-the-art GANs, we implement a ConvNet-based generator following the widely-used architecture from [69] while using the exactly same training setup of the proposed HiT (e.g., losses and $R _ { 1 }$ gradient penalty) denoted as ConvNet- $R _ { 1 }$ for a fair comparison. The results are shown in Table 1. We can see that HiT outperforms the previous ConvNet-based methods by a notable margin in terms of both IS and FID scores. Note that as reported in [11], BigGAN [4] achieves 30.91 FID on unconditional ImageNet, but its model is far larger (more than 70M parameters) than HiT (around 30M parameters). Therefore, the results are not directly comparable. Even though, HiT (30.83 FID)
|
| 88 |
+
|
| 89 |
+
Table 1: Comparison with the state-of-the-art methods on the ImageNet $1 2 8 \times 1 2 8$ dataset. † is based on a supervised pre-trained ImageNet classifier.
|
| 90 |
+
|
| 91 |
+
<table><tr><td>Method</td><td>FID↓</td><td>IS↑</td></tr><tr><td>Vanilla GAN [15]</td><td>54.17</td><td rowspan="3">14.01 13.50</td></tr><tr><td>PacGAN2 [35]</td><td>57.51</td></tr><tr><td>MGAN[18]</td><td>58.88 13.22</td></tr><tr><td>Logo-GAN-AE [50]</td><td>50.90 38.41</td><td rowspan="3">14.44 18.86</td></tr><tr><td>Logo-GAN-RC [50]t</td></tr><tr><td>SS-GAN (sBN) [9]</td></tr><tr><td>43.87 Self-Conditioned GAN [36]</td><td>40.30 15.82</td></tr><tr><td>ConvNet-R1</td><td>37.18 19.55</td></tr><tr><td>HiT (Ours)</td><td>30.83 21.64</td></tr></table>
|
| 92 |
+
|
| 93 |
+
Table 2: Reconstruction FID on the ImageNet $2 5 6 \times 2 5 6$ dataset. We note that VQVAE-2 utilizes a hierarchical organization of VQ-VAE and thus has two codebooks $\mathcal { Z }$ .
|
| 94 |
+
|
| 95 |
+
<table><tr><td rowspan=1 colspan=1>Method</td><td rowspan=1 colspan=1>Embeddingsize and |2</td><td rowspan=1 colspan=1>FID↓</td></tr><tr><td rowspan=1 colspan=1>VQ-VAE [61]DALL-E [47]</td><td rowspan=1 colspan=1>32,102432,8192</td><td rowspan=1 colspan=1>75.1934.30</td></tr><tr><td rowspan=1 colspan=1>VQ-VAE-2 [48]</td><td rowspan=1 colspan=1>64,51232, 512</td><td rowspan=1 colspan=1>10.00</td></tr><tr><td rowspan=1 colspan=1>VQGAN [14]</td><td rowspan=1 colspan=1>16,1024</td><td rowspan=1 colspan=1>8.00</td></tr><tr><td rowspan=1 colspan=1>VQ-HiT (Ours)</td><td rowspan=1 colspan=1>16,1024</td><td rowspan=1 colspan=1>6.37</td></tr></table>
|
| 96 |
+
|
| 97 |
+

|
| 98 |
+
Figure 3: Unconditional image generation results of HiT trained on ImageNet $1 2 8 \times 1 2 8$ .
|
| 99 |
+
|
| 100 |
+
is slightly better than BigGAN and achieves the state of the art among models with a similar capacity as shown in Table 1. We also note that [8, 36] leverage auxiliary regularization techniques and our method is complementary to them. Examples generated by HiT on ImageNet are shown in Figure 3, from which we observe nature visual details and diversity.
|
| 101 |
+
|
| 102 |
+
Reconstruction. We are also interested in the reconstruction ability of the proposed HiT and evaluate by employing it as a decoder for the vector quantised variational auto-encoder (VQ-VAE [61]), a state-of-the-art approach for visual representation learning. In addition to the reconstruction loss and adversarial loss, our HiT-based VQ-VAE variant, namely VQ-HiT, is also trained with the perceptual loss [24] following the setup of [14, 78]. Please refer to the supplementary materials for more details on the architecture design and model training. We evaluate the metric of reconstruction FID on ImageNet $2 5 6 \times 2 5 6$ and report the results in Table 2. Our VQ-HiT attains the best performance while providing significantly more compression (i.e., smaller embedding size and fewer number of codes in the codebook $\mathcal { Z }$ ) than [47, 48, 61].
|
| 103 |
+
|
| 104 |
+
# 4.4 Higher Resolution Generation
|
| 105 |
+
|
| 106 |
+
Baselines. To demonstrate the utility of our approach for high-fidelity images, we compare to stateof-the-art techniques for generating images on CelebA-HQ and FFHQ, focusing on two common resolutions of $2 5 6 \times 2 5 6$ and $1 0 2 4 \times 1 0 2 4$ . The main competing method of the proposed HiT is StyleGAN [27, 28] – a hypernetwork-based ConvNet archieving the best performance on these two datasets. On the FFHQ dataset, apart from our ConvNet-based counterparts, we also compare to the most recent INR-based methods including CIPS [1] and INR-GAN [54]. These two models are closely related to HiT as the high-resolution stages of our approach can be viewed as a form of INR. Following the protocol of [1], we report the results of StyleGAN2 [28] trained without style-mixing and path regularization of the generator on this dataset.
|
| 107 |
+
|
| 108 |
+
Table 3: Comparison with the state-of-the-art methods on CelebA-HQ (left) and FFHQ (right) with the resolutions of $2 5 6 \times 2 5 6$ and $1 0 2 4 \times 1 0 2 4$ . ? bCR is not applied at the $1 0 2 4 \times 1 0 2 4$ resolution.
|
| 109 |
+
|
| 110 |
+
<table><tr><td>Method</td><td>FID↓(CelebA-HQ) ×256 ×1024</td></tr><tr><td>VAEBM[68]</td><td>20.38</td></tr><tr><td>StyleALAE [45] 19.21</td><td>=</td></tr><tr><td>PG-GAN [25] 8.03</td><td>1 =</td></tr><tr><td>COCO-GAN [33]</td><td>9.49 =</td></tr><tr><td>VQGAN[14] 10.70</td><td>1</td></tr><tr><td>StyleGAN [27]</td><td>5.17 -</td></tr></table>
|
| 111 |
+
|
| 112 |
+
<table><tr><td>Method</td><td>FID↓(FFHQ) ×256 ×1024</td></tr><tr><td>U-Net GAN [52]</td><td>7.63 = 13.09</td></tr><tr><td>StyleALAE [45]</td><td>1</td></tr><tr><td>VQGAN[14]</td><td>11.40 =</td></tr><tr><td>INR-GAN [54]</td><td>9.57 16.32</td></tr><tr><td>CIPS [1]</td><td>4.38 10.07</td></tr><tr><td>StyleGAN2 [28] HiT-B (Ours)</td><td>3.83 4.41 2.95 6.37*</td></tr></table>
|
| 113 |
+
|
| 114 |
+
Table 4: Comparison with the main competing methods in terms of number of network parameters, throughput, and FID on FFHQ $2 5 6 \times 2 5 6$ . The throughput is measured on a single Tesla V100 GPU.
|
| 115 |
+
|
| 116 |
+
<table><tr><td>Architecture</td><td>Model</td><td>#params (million)</td><td>Throughput (images /sec)</td><td>FID← (FFHQ ×256)</td></tr><tr><td>ConvNet</td><td>StyleGAN2 [28]</td><td>30.03</td><td>95.79</td><td>3.83</td></tr><tr><td rowspan="2">INR</td><td>CIPS [1]</td><td>45.90</td><td>27.27</td><td>4.38</td></tr><tr><td>INR-GAN [54]</td><td>107.03</td><td>266.45</td><td>9.57</td></tr><tr><td rowspan="3">Transformer</td><td>HiT-S</td><td>38.01</td><td>86.64</td><td>3.06</td></tr><tr><td>HiT-B</td><td>46.22</td><td>52.09</td><td>2.95</td></tr><tr><td>HiT-L</td><td>97.46</td><td>20.67</td><td>2.58</td></tr></table>
|
| 117 |
+
|
| 118 |
+
Results. We report the results in Table 3. Impressively, the proposed HiT obtains the best FID scores at the resolution of $2 5 6 \times 2 5 6$ and sets the new state of the art on both datasets. Meanwhile, our performance is also competitive at the resolution of $1 0 2 4 \times 1 0 2 4$ but only slightly shy of StyleGAN. This is due to our finding that conventional regularization techniques such as [77] cannot be directly applied to Transformer-based architectures for synthesizing ultra high-resolution images. We believe this triggers a new research direction and will explore it as our future work. It is also worth mentioning that our method consistently outperforms INR-based models, which suggests the importance of involving the self-attention mechanism into image generation.
|
| 119 |
+
|
| 120 |
+
Table 4 provides a more detailed comparison to our main competing methods in terms of the number of parameters, throughput, and FID on FFHQ $2 5 6 \times 2 5 6$ . We find that the proposed HiT-S has a comparable runtime performance (throughput) with StyleGAN while yielding better generative results. More importantly, FID scores can be further improved when larger variants of HiT are employed. Figure 4 illustrates our synthetic face images on CelebA-HQ.
|
| 121 |
+
|
| 122 |
+
# 4.5 Ablation Study
|
| 123 |
+
|
| 124 |
+
We then evaluate the importance of different components of our model by its ablation on ImageNet $1 2 8 \times 1 2 8$ . A lighter-weight training configuration is employed in this study to reduce the training time. We start with a baseline architecture without any attention modules which reduces to a pure implicit neural function conditioned on the input latent code [3, 30]. We build upon this baseline by gradually incorporating cross-attention and self-attention modules. We compare the methods that perform attention without blocking (including standard self-attention [63], axial attention [17, 65]) and with blocking (including blocked local attention [62, 73]). We also compare a variant of our method where different types of attention are interleaved other than combined in attention heads.
|
| 125 |
+
|
| 126 |
+
The results are reported in Table 5. As we can see, the latent code conditional INR baseline cannot fit training data favourably since it lacks an efficient way to capture the latent code during the generative process. Interestingly, incorporating the proposed cross-attention module improves the baseline and achieves the state of the art, thanks to its function of self-modulation. More importantly, we find that blocking is vital for attention: performing different types of attention after blocking can all improve the performance by a notable margin while the axial attention cannot. This is due to the fact that the image structure after blocking introduces a better inductive bias for images. At last, we observe that the proposed multi-axis blocked self-attention yields better FID scores than interleaving different attention outputs, and it achieves the best performance after balancing the attention axes.
|
| 127 |
+
|
| 128 |
+

|
| 129 |
+
Figure 4: Synthetic face images by HiT-B trained on CelebA-HQ $1 0 2 4 \times 1 0 2 4$ and $2 5 6 \times 2 5 6$ .
|
| 130 |
+
|
| 131 |
+
Table 5: Ablation study. We start with the INR-based generator [3, 30] conditioned on the input latent code and gradually improve it with the proposed attention components and their variations. O/M denotes “out-of-memory” error: the model cannot be trained for the batch size of one.
|
| 132 |
+
|
| 133 |
+
<table><tr><td>Model configuration</td><td></td><td>#params (million)</td><td>Throughput (images /sec)</td><td>FID←</td><td>IS↑</td></tr><tr><td></td><td>Latent-code conditioned INR decoder [3,30]</td><td>42.68</td><td>110.39</td><td>56.33</td><td>16.19</td></tr><tr><td>+</td><td>Cross-attention for self-modulation</td><td>61.55</td><td>82.67</td><td>35.94</td><td>19.42</td></tr><tr><td rowspan="5">Jo əuo +</td><td>All-to-all self-attention [63]</td><td>67.60</td><td>1</td><td>O/M</td><td>O/M</td></tr><tr><td>Axial attention [17,20,65]</td><td>67.60</td><td>74.21</td><td>35.15</td><td>19.79</td></tr><tr><td>Blocked local attention [62, 73] Interleaving blocked regional and dilated attention</td><td>67.60</td><td></td><td>33.70</td><td>19.96</td></tr><tr><td>Multi-axis blocked self-attention (Ours)</td><td></td><td>75.54</td><td>32.96 32.23</td><td>20.75 20.96</td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr><tr><td>+</td><td>Balancing attention between axes (Full model)</td><td>67.60</td><td>75.33</td><td>31.87</td><td>21.32</td></tr></table>
|
| 134 |
+
|
| 135 |
+
In Table 6, we investigate another form of our variations, where we incorporate attention in different number of stages across the generator. We can see that the more in the stack the attention is applied (low-resolution stages), the better the model performance will be. This study provides a validation for the effectiveness of self-attention operation in generative modeling. However, for feature resolutions larger than $6 4 \times 6 4$ , we do not observe obvious performance gains brought by self-attention operations but a notable degradation in both training and inference time.
|
| 136 |
+
|
| 137 |
+
# 4.6 Effectiveness of Regularization
|
| 138 |
+
|
| 139 |
+
We further explore the effectiveness of regularization for the proposed Transformer-based generator. Note that different from the recent interest in training GANs in the few-shot scenarios [26, 76], we study the influence of regularization for ConvNet-based and Transformer-based generators in the fulldata regime. We use the whole training set of FFHQ $2 5 6 \times 2 5 6$ , and compare HiT-based variants with StyleGAN2 [26]. The regularization method is bCR [77]. As shown in Table 7, all variants of HiT achieve much larger margins of improvement than StyleGAN2. This confirms the finding [12, 23, 60] that Transformer-based architectures are much more data-hungry than ConvNets in both classification and generative modeling settings, and thus strong data augmentation and regularization techniques are crucial for training Transformer-based generators.
|
| 140 |
+
|
| 141 |
+
# 5 Conclusion
|
| 142 |
+
|
| 143 |
+
We present HiT, a novel Transformer-based generator for high-resolution image generation based on GANs. To address the quadratic scaling problem of Transformers, we structure the low-resolution stages of HiT following the design of Nested Transformer and enhance it by the proposed multi-axis blocked self-attention. In order to handle extremely long inputs in the high-resolution stages, we drop self-attention operations and reduce the model into implicit functions. We further improve the model performance by introducing a cross-attention module which plays a role of self-modulation. Our experiments demonstrate that HiT achieves highly competitive performance for high-resolution image generation compared with its ConvNet-based counterparts. For future work, we will investigate Transformer-based architectures for discriminators in GANs and efficient regularization techniques for Transformer-based generators to synthesize ultra high-resolution images.
|
| 144 |
+
|
| 145 |
+
Table 6: Performance as a function of the number of self-attention stages on ImageNet $1 2 8 \times 1 2 8$ The attention configuration is defined using the protocol $[ a , b ]$ , where $a$ and $b$ refer to the number of stages in the low-resolution and high-resolution stages of the model, respectively.
|
| 146 |
+
|
| 147 |
+
<table><tr><td>Attention configuration</td><td>[0,5]</td><td>[1,4]</td><td>[2,3]</td><td>[3,2]</td><td>[4,1]</td></tr><tr><td>#params (million)</td><td>61.55</td><td>66.01</td><td>67.19</td><td>67.52</td><td>67.60</td></tr><tr><td>Throughput (images / sec)</td><td>82.67</td><td>80.88</td><td>80.22</td><td>78.06</td><td>75.33</td></tr><tr><td>FID↓</td><td>35.94</td><td>34.16</td><td>33.69</td><td>32.72</td><td>31.87</td></tr></table>
|
| 148 |
+
|
| 149 |
+
Table 7: The effectiveness of bCR [77] on both StyleGAN2 and HiT-based variants. † indicates the results of StyleGAN2 are obtained from [26] which uses a lighter-weight configuration of [28].
|
| 150 |
+
|
| 151 |
+
<table><tr><td>+ bCR [77]</td><td>StyleGAN2 [28]†</td><td>HiT-S</td><td>HiT-B</td><td>HiT-L</td></tr><tr><td>X</td><td>5.28</td><td>6.07</td><td>5.30</td><td>5.13</td></tr><tr><td></td><td>3.91</td><td>3.06</td><td>2.95</td><td>2.58</td></tr><tr><td>△ FID</td><td>1.37</td><td>3.01</td><td>2.35</td><td>2.55</td></tr></table>
|
| 152 |
+
|
| 153 |
+
Ethics statement. We note that although this paper does not uniquely raise any new ethical challenges, image generation is a field with several ethical concerns worth acknowledging. For example, there are known issues around bias and fairness, either in the representation of generated images [39] or the implicit encoding of stereotypes [55]. Additionally, such algorithms are vulnerable to malicious use [5], mainly through the development of deepfakes and other generated media meant to deceive the public [67], or as an image denoising technique that could be used for privacy-invading surveillance or monitoring purposes. We also note that the synthetic image generation techniques have the potential to mitigate bias and privacy issues for data collection and annotation. However, such techniques could be misused to produce misleading information, and researchers should explore the techniques responsibly.
|
| 154 |
+
|
| 155 |
+
# Acknowledgements
|
| 156 |
+
|
| 157 |
+
We thank Chitwan Saharia, Jing Yu Koh, and Kevin Murphy for their feedback to the paper. We also thank Ashish Vaswani, Mohammad Taghi Saffar, and the Google Brain team for research discussions and technical assistance. This research has been partially funded by the following grants ARO MURI 805491, NSF IIS-1793883, NSF CNS-1747778, NSF IIS 1763523, DOD-ARO ACC-W911NF, NSF OIA-2040638 to Dimitris N. Metaxas.
|
| 158 |
+
|
| 159 |
+
# References
|
| 160 |
+
|
| 161 |
+
[1] Ivan Anokhin, Kirill Demochkin, Taras Khakhulin, Gleb Sterkin, Victor Lempitsky, and Denis Korzhenkov. Image generators with conditionally-independent pixel synthesis. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021.
|
| 162 |
+
[2] Iz Beltagy, Matthew E Peters, and Arman Cohan. Longformer: The long-document transformer. arXiv preprint arXiv:2004.05150, 2020.
|
| 163 |
+
[3] Tristan Bepler, Ellen D Zhong, Kotaro Kelley, Edward Brignole, and Bonnie Berger. Explicitly disentangling image content from translation and rotation with spatial-VAE. In Advances in Neural Information Processing Systems (NeurIPS), pages 15409–15419, 2019.
|
| 164 |
+
[4] Andrew Brock, Jeff Donahue, and Karen Simonyan. Large scale GAN training for high fidelity natural image synthesis. In Proceedings of the International Conference on Learning Representations (ICLR), 2019. [5] Miles Brundage, Shahar Avin, Jack Clark, Helen Toner, Peter Eckersley, Ben Garfinkel, Allan Dafoe, Paul Scharre, Thomas Zeitzoff, Bobby Filar, et al. The malicious use of artificial intelligence: Forecasting, prevention, and mitigation. arXiv preprint arXiv:1802.07228, 2018. [6] Jiezhang Cao, Yawei Li, Kai Zhang, and Luc Van Gool. Video Super-Resolution Transformer. arXiv preprint arXiv:2106.06847, 2021. [7] Chun-Fu Chen, Quanfu Fan, and Rameswar Panda. CrossViT: Cross-attention multi-scale vision transformer for image classification. arXiv preprint arXiv:2103.14899, 2021.
|
| 165 |
+
[8] Ting Chen, Mario Lucic, Neil Houlsby, and Sylvain Gelly. On self modulation for generative adversarial networks. In Proceedings of the International Conference on Learning Representations (ICLR), 2019. [9] Ting Chen, Xiaohua Zhai, Marvin Ritter, Mario Lucic, and Neil Houlsby. Self-supervised GANs via auxiliary rotation loss. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 12154–12163, 2019.
|
| 166 |
+
[10] Adam Coates, Andrew Ng, and Honglak Lee. An analysis of single-layer networks in unsupervised feature learning. In Proceedings of the International Conference on Artificial Intelligence and Statistics (AISTATS), pages 215–223, 2011.
|
| 167 |
+
[11] Jeff Donahue and Karen Simonyan. Large scale adversarial representation learning. In Advances in Neural Information Processing Systems (NeurIPS), 2019.
|
| 168 |
+
[12] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. In Proceedings of the International Conference on Learning Representations (ICLR), 2021.
|
| 169 |
+
[13] Emilien Dupont, Yee Whye Teh, and Arnaud Doucet. Generative models as distributions of functions. arXiv preprint arXiv:2102.04776, 2021.
|
| 170 |
+
[14] Patrick Esser, Robin Rombach, and Björn Ommer. Taming transformers for high-resolution image synthesis. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021.
|
| 171 |
+
[15] Ian J 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 (NeurIPS), 2014.
|
| 172 |
+
[16] Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. GANs trained by a two time-scale update rule converge to a local nash equilibrium. In Advances in Neural Information Processing Systems (NeurIPS), pages 6629–6640, 2017.
|
| 173 |
+
[17] Jonathan Ho, Nal Kalchbrenner, Dirk Weissenborn, and Tim Salimans. Axial attention in multidimensional transformers. arXiv preprint arXiv:1912.12180, 2019.
|
| 174 |
+
[18] Quan Hoang, Tu Dinh Nguyen, Trung Le, and Dinh Phung. MGAN: Training generative adversarial nets with multiple generators. In Proceedings of the International Conference on Learning Representations (ICLR), 2018.
|
| 175 |
+
[19] Xun Huang and Serge Belongie. Arbitrary style transfer in real-time with adaptive instance normalization. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 1501–1510, 2017.
|
| 176 |
+
[20] Zilong Huang, Xinggang Wang, Lichao Huang, Chang Huang, Yunchao Wei, and Wenyu Liu. CCNet: Criss-cross attention for semantic segmentation. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 603–612, 2019.
|
| 177 |
+
[21] Drew A Hudson and C Lawrence Zitnick. Generative adversarial transformers. In Proceedings of the International Conference on Machine Learning (ICML), 2021.
|
| 178 |
+
[22] Andrew Jaegle, Felix Gimeno, Andrew Brock, Andrew Zisserman, Oriol Vinyals, and Joao Carreira. Perceiver: General perception with iterative attention. arXiv preprint arXiv:2103.03206, 2021.
|
| 179 |
+
[23] Yifan Jiang, Shiyu Chang, and Zhangyang Wang. TransGAN: Two transformers can make one strong GAN. arXiv preprint arXiv:2102.07074, 2021.
|
| 180 |
+
[24] Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and superresolution. In Proceedings of the European Conference on Computer Vision (ECCV), pages 694–711, 2016.
|
| 181 |
+
[25] Tero Karras, Timo Aila, Samuli Laine, and Jaakko Lehtinen. Progressive growing of GANs for improved quality, stability, and variation. In Proceedings of the International Conference on Learning Representations (ICLR), 2018.
|
| 182 |
+
[26] Tero Karras, Miika Aittala, Janne Hellsten, Samuli Laine, Jaakko Lehtinen, and Timo Aila. Training generative adversarial networks with limited data. In Advances in Neural Information Processing Systems (NeurIPS), 2020.
|
| 183 |
+
[27] Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 4401–4410, 2019.
|
| 184 |
+
[28] Tero Karras, Samuli Laine, Miika Aittala, Janne Hellsten, Jaakko Lehtinen, and Timo Aila. Analyzing and improving the image quality of StyleGAN. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 8110–8119, 2020.
|
| 185 |
+
[29] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Proceedings of the International Conference on Learning Representations (ICLR), 2014.
|
| 186 |
+
[30] Marian Kleineberg, Matthias Fey, and Frank Weichert. Adversarial generation of continuous implicit shape representations. In Eurographics, 2020.
|
| 187 |
+
[31] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images, 2009.
|
| 188 |
+
[32] Kwonjoon Lee, Huiwen Chang, Lu Jiang, Han Zhang, Zhuowen Tu, and Ce Liu. ViTGAN: Training GANs with Vision Transformers. arXiv preprint arXiv:2107.04589, 2021.
|
| 189 |
+
[33] Chieh Hubert Lin, Chia-Che Chang, Yu-Sheng Chen, Da-Cheng Juan, Wei Wei, and Hwann-Tzong Chen. COCO-GAN: Generation by Parts via Conditional Coordinating. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 4512–4521, 2019.
|
| 190 |
+
[34] Chieh Hubert Lin, Hsin-Ying Lee, Yen-Chi Cheng, Sergey Tulyakov, and Ming-Hsuan Yang. InfinityGAN: Towards infinite-resolution image synthesis. arXiv preprint arXiv:2104.03963, 2021.
|
| 191 |
+
[35] Zinan Lin, Ashish Khetan, Giulia Fanti, and Sewoong Oh. PacGAN: The power of two samples in generative adversarial networks. In Advances in Neural Information Processing Systems (NeurIPS), 2018.
|
| 192 |
+
[36] Steven Liu, Tongzhou Wang, David Bau, Jun-Yan Zhu, and Antonio Torralba. Diverse image generation via self-conditioned GANs. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 14286–14295, 2020.
|
| 193 |
+
[37] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. arXiv preprint arXiv:2103.14030, 2021.
|
| 194 |
+
[38] Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep learning face attributes in the wild. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), 2015.
|
| 195 |
+
[39] Sachit Menon, Alexandru Damian, Shijia Hu, Nikhil Ravi, and Cynthia Rudin. PULSE: Self-supervised photo upsampling via latent space exploration of generative models. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2437–2445, 2020.
|
| 196 |
+
[40] Lars Mescheder, Andreas Geiger, and Sebastian Nowozin. Which training methods for GANs do actually converge? In Proceedings of the International Conference on Machine Learning (ICML), pages 3481–3490, 2018.
|
| 197 |
+
[41] Lars Mescheder, Michael Oechsle, Michael Niemeyer, Sebastian Nowozin, and Andreas Geiger. Occupancy networks: Learning 3D reconstruction in function space. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 4460–4470, 2019.
|
| 198 |
+
[42] Ben Mildenhall, Pratul P Srinivasan, Matthew Tancik, Jonathan T Barron, Ravi Ramamoorthi, and Ren Ng. NeRF: Representing scenes as neural radiance fields for view synthesis. In Proceedings of the European Conference on Computer Vision (ECCV), pages 405–421, 2020.
|
| 199 |
+
[43] Jeong Joon Park, Peter Florence, Julian Straub, Richard Newcombe, and Steven Lovegrove. DeepSDF: Learning continuous signed distance functions for shape representation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 165–174, 2019.
|
| 200 |
+
[44] Niki Parmar, Ashish Vaswani, Jakob Uszkoreit, Lukasz Kaiser, Noam Shazeer, Alexander Ku, and Dustin Tran. Image transformer. In Proceedings of the International Conference on Machine Learning (ICML), pages 4055–4064, 2018.
|
| 201 |
+
[45] Stanislav Pidhorskyi, Donald A Adjeroh, and Gianfranco Doretto. Adversarial latent autoencoders. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 14104–14113, 2020.
|
| 202 |
+
[46] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. arXiv preprint arXiv:2103.00020, 2021.
|
| 203 |
+
[47] Aditya Ramesh, Mikhail Pavlov, Gabriel Goh, Scott Gray, Chelsea Voss, Alec Radford, Mark Chen, and Ilya Sutskever. Zero-shot text-to-image generation. arXiv preprint arXiv:2102.12092, 2021.
|
| 204 |
+
[48] Ali Razavi, Aaron van den Oord, and Oriol Vinyals. Generating diverse high-fidelity images with VQVAE-2. In Advances in Neural Information Processing Systems (NeurIPS), 2019.
|
| 205 |
+
[49] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. ImageNet large scale visual recognition challenge. International Journal of Computer Vision, 115(3):211–252, 2015.
|
| 206 |
+
[50] Alexander Sage, Eirikur Agustsson, Radu Timofte, and Luc Van Gool. Logo synthesis and manipulation with clustered generative adversarial networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 5879–5888, 2018.
|
| 207 |
+
[51] Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, Xi Chen, and Xi Chen. Improved techniques for training GANs. In Advances in Neural Information Processing Systems (NeurIPS), 2016.
|
| 208 |
+
[52] Edgar Schonfeld, Bernt Schiele, and Anna Khoreva. A U-Net Based Discriminator for Generative Adversarial Networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 8207–8216, 2020.
|
| 209 |
+
[53] Wenzhe Shi, Jose Caballero, Ferenc Huszár, Johannes Totz, Andrew P Aitken, Rob Bishop, Daniel Rueckert, and Zehan Wang. Real-time single image and video super-resolution using an efficient sub-pixel convolutional neural network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1874–1883, 2016.
|
| 210 |
+
[54] Ivan Skorokhodov, Savva Ignatyev, and Mohamed Elhoseiny. Adversarial generation of continuous images. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021.
|
| 211 |
+
[55] Ryan Steed and Aylin Caliskan. Image representations learned with unsupervised pre-training contain human-like biases. In Proceedings of the 2021 ACM Conference on Fairness, Accountability, and Transparency, pages 701–713, 2021.
|
| 212 |
+
[56] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2818–2826, 2016.
|
| 213 |
+
[57] Yu Tian, Xi Peng, Long Zhao, Shaoting Zhang, and Dimitris N Metaxas. CR-GAN: Learning complete representations for multi-view generation. In Proceedings of the International Joint Conference on Artificial Intelligence (IJCAI), pages 942–948, 2018.
|
| 214 |
+
[58] Ilya Tolstikhin, Neil Houlsby, Alexander Kolesnikov, Lucas Beyer, Xiaohua Zhai, Thomas Unterthiner, Jessica Yung, Daniel Keysers, Jakob Uszkoreit, Mario Lucic, et al. MLP-Mixer: An all-MLP Architecture for Vision. arXiv preprint arXiv:2105.01601, 2021.
|
| 215 |
+
[59] Hugo Touvron, Piotr Bojanowski, Mathilde Caron, Matthieu Cord, Alaaeldin El-Nouby, Edouard Grave, Armand Joulin, Gabriel Synnaeve, Jakob Verbeek, and Hervé Jégou. ResMLP: Feedforward networks for image classification with data-efficient training. arXiv preprint arXiv:2105.03404, 2021.
|
| 216 |
+
[60] Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Hervé Jégou. Training data-efficient image transformers & distillation through attention. arXiv preprint arXiv:2012.12877, 2020.
|
| 217 |
+
[61] Aaron van den Oord, Oriol Vinyals, and Koray Kavukcuoglu. Neural discrete representation learning. In Advances in Neural Information Processing Systems (NeurIPS), pages 6309–6318, 2017.
|
| 218 |
+
[62] Ashish Vaswani, Prajit Ramachandran, Aravind Srinivas, Niki Parmar, Blake Hechtman, and Jonathon Shlens. Scaling local self-attention for parameter efficient visual backbones. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021.
|
| 219 |
+
[63] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems (NeurIPS), pages 6000–6010, 2017.
|
| 220 |
+
[64] Huiyu Wang, Yukun Zhu, Hartwig Adam, Alan Yuille, and Liang-Chieh Chen. MaX-DeepLab: End-to-end panoptic segmentation with mask transformers. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021.
|
| 221 |
+
[65] Huiyu Wang, Yukun Zhu, Bradley Green, Hartwig Adam, Alan Yuille, and Liang-Chieh Chen. AxialDeepLab: Stand-alone axial-attention for panoptic segmentation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 108–126, 2020.
|
| 222 |
+
[66] Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 7794– 7803, 2018.
|
| 223 |
+
[67] Mika Westerlund. The emergence of deepfake technology: A review. Technology Innovation Management Review, 9(11), 2019.
|
| 224 |
+
[68] Zhisheng Xiao, Karsten Kreis, Jan Kautz, and Arash Vahdat. VAEBM: A Symbiosis between Variational Autoencoders and Energy-based Models. In Proceedings of the International Conference on Learning Representations (ICLR), 2021.
|
| 225 |
+
[69] Han Zhang, Ian Goodfellow, Dimitris Metaxas, and Augustus Odena. Self-attention generative adversarial networks. In Proceedings of the International Conference on Machine Learning (ICML), pages 7354–7363, 2019.
|
| 226 |
+
[70] Han Zhang, Jing Yu Koh, Jason Baldridge, Honglak Lee, and Yinfei Yang. Cross-modal contrastive learning for text-to-image generation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021.
|
| 227 |
+
[71] Han Zhang, Tao Xu, Hongsheng Li, Shaoting Zhang, Xiaogang Wang, Xiaolei Huang, and Dimitris N Metaxas. StackGAN: Text to photo-realistic image synthesis with stacked generative adversarial networks. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 5907–5915, 2017.
|
| 228 |
+
[72] Han Zhang, Zizhao Zhang, Augustus Odena, and Honglak Lee. Consistency regularization for generative adversarial networks. In Proceedings of the International Conference on Learning Representations (ICLR), 2020.
|
| 229 |
+
[73] Zizhao Zhang, Han Zhang, Long Zhao, Ting Chen, and Tomas Pfister. Aggregating nested transformers. arXiv preprint arXiv:2105.12723, 2021.
|
| 230 |
+
[74] Long Zhao, Xi Peng, Yu Tian, Mubbasir Kapadia, and Dimitris Metaxas. Learning to forecast and refine residual motion for image-to-video generation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 387–403, 2018.
|
| 231 |
+
[75] Long Zhao, Xi Peng, Yu Tian, Mubbasir Kapadia, and Dimitris N Metaxas. Towards image-to-video translation: A structure-aware approach via multi-stage generative adversarial networks. International Journal of Computer Vision, 128(10):2514–2533, 2020.
|
| 232 |
+
[76] Shengyu Zhao, Zhijian Liu, Ji Lin, Jun-Yan Zhu, and Song Han. Differentiable augmentation for dataefficient gan training. In Advances in Neural Information Processing Systems (NeurIPS), 2020.
|
| 233 |
+
[77] Zhengli Zhao, Sameer Singh, Honglak Lee, Zizhao Zhang, Augustus Odena, and Han Zhang. Improved consistency regularization for GANs. In Proceedings of the AAAI Conference on Artificial Intelligence (AAAI), 2021.
|
| 234 |
+
[78] Jiapeng Zhu, Yujun Shen, Deli Zhao, and Bolei Zhou. In-domain GAN inversion for real image editing. In Proceedings of the European Conference on Computer Vision (ECCV), pages 592–608, 2020.
|
| 235 |
+
[79] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 2223–2232, 2017.
|
parse/train/zmbiQmdtg9/zmbiQmdtg9_content_list.json
ADDED
|
@@ -0,0 +1,976 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "Improved Transformer for High-Resolution GANs ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
191,
|
| 8 |
+
122,
|
| 9 |
+
803,
|
| 10 |
+
147
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Long Zhao1,∗ Zizhao Zhang2 1Rutgers University ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
204,
|
| 19 |
+
199,
|
| 20 |
+
423,
|
| 21 |
+
229
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "Ting Chen3 Dimitris N. Metaxas1 Han Zhang3 2Google Cloud AI 3Google Research ",
|
| 28 |
+
"bbox": [
|
| 29 |
+
441,
|
| 30 |
+
199,
|
| 31 |
+
795,
|
| 32 |
+
229
|
| 33 |
+
],
|
| 34 |
+
"page_idx": 0
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"type": "text",
|
| 38 |
+
"text": "Abstract ",
|
| 39 |
+
"text_level": 1,
|
| 40 |
+
"bbox": [
|
| 41 |
+
462,
|
| 42 |
+
265,
|
| 43 |
+
535,
|
| 44 |
+
281
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "Attention-based models, exemplified by the Transformer, can effectively model long range dependency, but suffer from the quadratic complexity of self-attention operation, making them difficult to be adopted for high-resolution image generation based on Generative Adversarial Networks (GANs). In this paper, we introduce two key ingredients to Transformer to address this challenge. First, in low-resolution stages of the generative process, standard global self-attention is replaced with the proposed multi-axis blocked self-attention which allows efficient mixing of local and global attention. Second, in high-resolution stages, we drop self-attention while only keeping multi-layer perceptrons reminiscent of the implicit neural function. To further improve the performance, we introduce an additional self-modulation component based on cross-attention. The resulting model, denoted as HiT, has a nearly linear computational complexity with respect to the image size and thus directly scales to synthesizing high definition images. We show in the experiments that the proposed HiT achieves state-of-the-art FID scores of 30.83 and 2.95 on unconditional ImageNet $1 2 8 \\times 1 2 8$ and FFHQ $2 5 6 \\times 2 5 6$ , respectively, with a reasonable throughput. We believe the proposed HiT is an important milestone for generators in GANs which are completely free of convolutions. Our code is made publicly available at https://github.com/google-research/hit-gan. ",
|
| 51 |
+
"bbox": [
|
| 52 |
+
233,
|
| 53 |
+
296,
|
| 54 |
+
766,
|
| 55 |
+
546
|
| 56 |
+
],
|
| 57 |
+
"page_idx": 0
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"type": "text",
|
| 61 |
+
"text": "1 Introduction ",
|
| 62 |
+
"text_level": 1,
|
| 63 |
+
"bbox": [
|
| 64 |
+
176,
|
| 65 |
+
570,
|
| 66 |
+
310,
|
| 67 |
+
588
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "Attention-based models demonstrate notable learning capabilities for both encoder-based and decoderbased architectures [66, 69] due to their self-attention operations which can capture long-range dependencies in data. Recently, Vision Transformer [12], one of the most powerful attention-based models, has achieved a great success on encoder-based vision tasks, specifically image classification [12, 60], segmentation [37, 64], and vision-language modeling [46]. However, applying the Transformer to image generation based on Generative Adversarial Networks (GANs) is still an open problem. ",
|
| 74 |
+
"bbox": [
|
| 75 |
+
174,
|
| 76 |
+
602,
|
| 77 |
+
825,
|
| 78 |
+
685
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "The main challenge of adopting the Transformer as a decoder/generator lies in two aspects. On one hand, the quadratic scaling problem brought by the self-attention operation becomes even worse when generating pixel-level details for high-resolution images. For example, synthesizing a high definition image with the resolution of $1 0 2 4 \\times 1 0 2 4$ leads to a sequence containing around one million pixels in the final stage, which is unaffordable for the standard self-attention mechanism. On the other hand, generating images from noise inputs poses a higher demand for spatial coherency in structure, color, and texture than discriminative tasks, and hence a more powerful yet efficient self-attention mechanism is desired for decoding feature representations from inputs. ",
|
| 85 |
+
"bbox": [
|
| 86 |
+
174,
|
| 87 |
+
691,
|
| 88 |
+
825,
|
| 89 |
+
803
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "text",
|
| 95 |
+
"text": "In view of these two key challenges, we propose a novel Transformer-based decoder/generator in GANs for high-resolution image generation, denoted as HiT. HiT employs a hierarchical structure of Transformers and divides the generative process into low-resolution and high-resolution stages, focusing on feature decoding and pixel-level generating, respectively. Specifically, its low-resolution stages follow the design of Nested Transformers [73] but enhanced by the proposed multi-axis blocked self-attention to better capture global information. Assuming that spatial features are well decoded after low-resolution stages, in high-resolution stages, we drop all self-attention operations in order to handle extremely long sequences for high definition image generation. The resulting high-resolution stages of HiT are built by multi-layer perceptrons (MLPs) which have a linear complexity with respect to the sequence length. Note that this design aligns with the recent findings [58, 59] that pure MLPs manage to learn favorable features for images, but it simply reduces to an implicit neural function [41, 42, 43] in the case of generative modeling. To further improve the performance, we present an additional cross-attention module that acts as a form of self-modulation [8]. In summary, this paper makes the following contributions: ",
|
| 96 |
+
"bbox": [
|
| 97 |
+
174,
|
| 98 |
+
809,
|
| 99 |
+
825,
|
| 100 |
+
864
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 0
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "text",
|
| 106 |
+
"text": "",
|
| 107 |
+
"bbox": [
|
| 108 |
+
174,
|
| 109 |
+
90,
|
| 110 |
+
825,
|
| 111 |
+
229
|
| 112 |
+
],
|
| 113 |
+
"page_idx": 1
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"type": "text",
|
| 117 |
+
"text": "• We propose HiT, a Transformer-based generator for high-fidelity image generation. Standard self-attention operations are removed in the high-resolution stages of HiT, reducing them to an implicit neural function. The resulting architecture easily scales to high definition image synthesis (with the resolution of $1 0 2 4 \\times 1 0 2 4 )$ and has a comparable throughput to StyleGAN2 [28]. To tame the quadratic complexity and enhance the representation capability of self-attention operation in low-resolution stages, we present a new form of sparse self-attention operation, namely multi-axis blocked self-attention. It captures local and global dependencies within nonoverlapping image blocks in parallel by attending to a single axis of the input tensor at a time, each of which uses a half of attention heads. The proposed multi-axis blocked self-attention is efficient, simple to implement, and yields better performance than other popular self-attention operations [37, 62, 73] working on image blocks for generative tasks. In addition, we introduce a cross-attention module performing attention between the input and intermediate features. This module re-weights intermediate features of the model as a function of the input, playing a role as self-modulation [8], and provides important global information to high-resolution stages where self-attention operations are absent. The proposed HiT obtains competitive FID [16] scores of 30.83 and 2.95 on unconditional ImageNet [49] $1 2 8 \\times 1 2 8$ and FFHQ [28] $2 5 6 \\times 2 5 6$ , respectively, highly reducing the gap between ConvNet-based GANs and Transformer-based ones. We also show that HiT not only works for GANs but also can serve as a general decoder for other models such as VQ-VAE [61]. Moreover, we observe that the proposed HiT can obtain more performance improvement from regularization than its ConvNet-based counterparts. To the best of our knowledge, these are the best reported scores for an image generator that is completely free of convolutions, which is an important milestone towards adopting Transformers for high-resolution generative modeling. ",
|
| 118 |
+
"bbox": [
|
| 119 |
+
191,
|
| 120 |
+
242,
|
| 121 |
+
826,
|
| 122 |
+
578
|
| 123 |
+
],
|
| 124 |
+
"page_idx": 1
|
| 125 |
+
},
|
| 126 |
+
{
|
| 127 |
+
"type": "text",
|
| 128 |
+
"text": "2 Related work ",
|
| 129 |
+
"text_level": 1,
|
| 130 |
+
"bbox": [
|
| 131 |
+
174,
|
| 132 |
+
597,
|
| 133 |
+
316,
|
| 134 |
+
613
|
| 135 |
+
],
|
| 136 |
+
"page_idx": 1
|
| 137 |
+
},
|
| 138 |
+
{
|
| 139 |
+
"type": "text",
|
| 140 |
+
"text": "Transformers for image generation. There are two main streams of image generation models built on Transformers [63] in the literature. One stream of them [14, 44] is inspired by auto-regressive models that learn the joint probability of the image pixels. The other stream focuses on designing Transformer-based architecture for generative adversarial networks (GANs) [15]. This work follows the spirit of the second stream. GANs have made great progress in various image generation tasks, such as image-to-image translation [57, 74, 75, 79] and text-to-image synthesis [70, 71], but most of them depend on ConvNet-based backbones. Recent attempts [23, 32] build a pure Transformer-based GAN by a careful design of attention hyper-parameters as well as upsampling layers. However, such a model is only validated on small scale datasets (e.g., CIFAR-10 [31] and STL-10 [10] consisting of $3 2 \\times 3 2$ images) and does not scale to complex real-world data. To our best knowledge, no existing work has successfully applied a Transformer-based architecture completely free of convolutions for high-resolution image generation in GANs. ",
|
| 141 |
+
"bbox": [
|
| 142 |
+
173,
|
| 143 |
+
628,
|
| 144 |
+
825,
|
| 145 |
+
792
|
| 146 |
+
],
|
| 147 |
+
"page_idx": 1
|
| 148 |
+
},
|
| 149 |
+
{
|
| 150 |
+
"type": "text",
|
| 151 |
+
"text": "GANformer [21] leverages the Transformer as a plugin component to build the bipartite structure to allow long-range interactions during the generative process, but its main backbone is still a ConvNet based on StyleGAN [28]. GANformer and HiT are different in the goal of using attention modules. GANformer utilizes the attention mechanism to model the dependences of objects in a generated scene/image. Instead, HiT explores building efficient attention modules for synthesizing general objects. Our experiments demonstrate that even for simple face image datasets, incorporating the attention mechanism can still lead to performance improvement. We believe our work reconfirms the necessity of using attention modules for general image generation tasks, and more importantly, we present an efficient architecture for attention-based high-resolution generators which might benefit the design of future attention-based GANs. ",
|
| 152 |
+
"bbox": [
|
| 153 |
+
174,
|
| 154 |
+
800,
|
| 155 |
+
825,
|
| 156 |
+
911
|
| 157 |
+
],
|
| 158 |
+
"page_idx": 1
|
| 159 |
+
},
|
| 160 |
+
{
|
| 161 |
+
"type": "image",
|
| 162 |
+
"img_path": "images/39c28959d0b2fbe7c30afeddca4ddd4d0355e5cb3846dc4d8fba0c4aa748b2a4.jpg",
|
| 163 |
+
"image_caption": [
|
| 164 |
+
"Figure 1: HiT architecture. In each stage, input the feature is first organized into blocks (denoted as $\\mathbf { B } _ { i }$ ). HiT’s low-resolution stages follow the decoder design of Nested Transformer [73] which is then enhanced by the proposed multi-axis blocked self-attention. We drop self-attention operations in the high-resolution stages, resulting in implicit neural functions. The model is further boosted by cross-attention modules which allow intermediate features to be modulated directly by the input latent code. The detailed algorithm can be found in the supplementary materials. "
|
| 165 |
+
],
|
| 166 |
+
"image_footnote": [],
|
| 167 |
+
"bbox": [
|
| 168 |
+
178,
|
| 169 |
+
88,
|
| 170 |
+
825,
|
| 171 |
+
296
|
| 172 |
+
],
|
| 173 |
+
"page_idx": 2
|
| 174 |
+
},
|
| 175 |
+
{
|
| 176 |
+
"type": "text",
|
| 177 |
+
"text": "",
|
| 178 |
+
"bbox": [
|
| 179 |
+
176,
|
| 180 |
+
424,
|
| 181 |
+
823,
|
| 182 |
+
452
|
| 183 |
+
],
|
| 184 |
+
"page_idx": 2
|
| 185 |
+
},
|
| 186 |
+
{
|
| 187 |
+
"type": "text",
|
| 188 |
+
"text": "Attention models. Many efforts [2, 17, 65] have been made to reduce the quadratic complexity of self-attention operation. When handling vision tasks, some works [37, 62, 73] propose to compute local self-attention in blocked images which takes advantage of the grid structure of images. [6] also presents local self-attention within image blocks but it does not perform self-attention across blocks as in HiT. The most related works to the proposed multi-axis blocked self-attention are [17, 65] where they also compute attention along axes. But our work differs notably in that we compute different attentions within heads on blocked images. Some other works [7, 21, 22] avoid directly applying standard self-attention to the input pixels, and perform attention between the input and a small set of latent units. Our cross-attention module differs from them in that we apply cross-attention to generative modeling designed for pure Transformer-based architectures. ",
|
| 189 |
+
"bbox": [
|
| 190 |
+
174,
|
| 191 |
+
458,
|
| 192 |
+
825,
|
| 193 |
+
597
|
| 194 |
+
],
|
| 195 |
+
"page_idx": 2
|
| 196 |
+
},
|
| 197 |
+
{
|
| 198 |
+
"type": "text",
|
| 199 |
+
"text": "Implicit neural representations. The largest popularity of implicit neural representations/functions (INRs) is studied in 3D deep learning to represent a 3D shape in a cheap and continuous way [41, 42, 43]. Recent studies [1, 13, 34, 54] explore the idea of using INRs for image generation, where they learn a hyper MLP network to predict an RGB pixel value given its coordinates on the image grid. Among them, [1, 54] are closely related to our high-resolution stages of the generative process. One remarkable difference is that our model is driven by the cross-attention module and features generated in previous stages instead of the hyper-network presented in [1, 54]. ",
|
| 200 |
+
"bbox": [
|
| 201 |
+
173,
|
| 202 |
+
603,
|
| 203 |
+
825,
|
| 204 |
+
700
|
| 205 |
+
],
|
| 206 |
+
"page_idx": 2
|
| 207 |
+
},
|
| 208 |
+
{
|
| 209 |
+
"type": "text",
|
| 210 |
+
"text": "3 Approach ",
|
| 211 |
+
"text_level": 1,
|
| 212 |
+
"bbox": [
|
| 213 |
+
174,
|
| 214 |
+
722,
|
| 215 |
+
287,
|
| 216 |
+
739
|
| 217 |
+
],
|
| 218 |
+
"page_idx": 2
|
| 219 |
+
},
|
| 220 |
+
{
|
| 221 |
+
"type": "text",
|
| 222 |
+
"text": "3.1 Main Architecture ",
|
| 223 |
+
"text_level": 1,
|
| 224 |
+
"bbox": [
|
| 225 |
+
174,
|
| 226 |
+
753,
|
| 227 |
+
341,
|
| 228 |
+
768
|
| 229 |
+
],
|
| 230 |
+
"page_idx": 2
|
| 231 |
+
},
|
| 232 |
+
{
|
| 233 |
+
"type": "text",
|
| 234 |
+
"text": "In the case of unconditional image generation, HiT takes a latent code $z \\sim \\mathcal { N } ( \\mathbf { 0 } , I )$ as input and generates an image of the target resolution through a hierarchical structure. The latent code is first projected into an initial feature with the spatial dimension of $H _ { 0 } \\times W _ { 0 }$ and channel dimension of $C _ { 0 }$ . During the generation process, we gradually increase the spatial dimension of the feature map while reducing the channel dimension in multiple stages. We divide the generation stages into low-resolution stages and high-resolution stages to balance feature dependency range in decoding and computation efficiency. The overview of the proposed method is illustrated in Figure 1. ",
|
| 235 |
+
"bbox": [
|
| 236 |
+
174,
|
| 237 |
+
779,
|
| 238 |
+
825,
|
| 239 |
+
877
|
| 240 |
+
],
|
| 241 |
+
"page_idx": 2
|
| 242 |
+
},
|
| 243 |
+
{
|
| 244 |
+
"type": "text",
|
| 245 |
+
"text": "In low-resolution stages, we allow spatial mixing of information by efficient attention mechanism. We follow the decoder form of Nested Transformer [73] where in each stage, the input feature is first divided into non-overlapping blocks where each block can be considered as a local patch. After being combined with learnable positional encoding, each block is processed independently via a shared attention module. We enhance the local self-attention of Nested Transformer by the proposed multiaxis blocked self-attention that can produce a richer feature representation by explicitly considering local (within blocks) as well as global (across blocks) relations. We denote the overall architecture of these stages as multi-axis Nested Transformer. ",
|
| 246 |
+
"bbox": [
|
| 247 |
+
174,
|
| 248 |
+
883,
|
| 249 |
+
821,
|
| 250 |
+
911
|
| 251 |
+
],
|
| 252 |
+
"page_idx": 2
|
| 253 |
+
},
|
| 254 |
+
{
|
| 255 |
+
"type": "image",
|
| 256 |
+
"img_path": "images/04e8517ff612583136650986bd402dda97a24dc74189853ffba02885d60e58d6.jpg",
|
| 257 |
+
"image_caption": [
|
| 258 |
+
"Figure 2: Multi-axis self-attention architecture. The different stages of multi-axis self-attention for a $[ 4 , 4 , C ]$ input with the block size of $b = 2$ . The input is first blocked into $2 \\times 2$ non-overlapping $\\left[ 2 , 2 , C \\right]$ patches. Then regional and dilated self-attention operations are computed along two different axes, respectively, each of which uses a half of attention heads. The attention operations run in parallel for each of the tokens and their corresponding attention regions, illustrated with different colors. The spatial dimensions after attention are the same as the input image. "
|
| 259 |
+
],
|
| 260 |
+
"image_footnote": [],
|
| 261 |
+
"bbox": [
|
| 262 |
+
171,
|
| 263 |
+
92,
|
| 264 |
+
823,
|
| 265 |
+
279
|
| 266 |
+
],
|
| 267 |
+
"page_idx": 3
|
| 268 |
+
},
|
| 269 |
+
{
|
| 270 |
+
"type": "text",
|
| 271 |
+
"text": "",
|
| 272 |
+
"bbox": [
|
| 273 |
+
174,
|
| 274 |
+
409,
|
| 275 |
+
825,
|
| 276 |
+
492
|
| 277 |
+
],
|
| 278 |
+
"page_idx": 3
|
| 279 |
+
},
|
| 280 |
+
{
|
| 281 |
+
"type": "text",
|
| 282 |
+
"text": "Assuming that spatial dependency is well modeled in the low-resolution stages, the high-resolution stages can focus on synthesizing pixel-level image details purely based on the local features. Thus in the high-resolution stage, we remove all self-attention modules and only maintain MLPs which can further reduce computation complexity. The resulting architecture in this stage can be viewed as an implicit neural function conditioned on the given latent feature as well as positional information. ",
|
| 283 |
+
"bbox": [
|
| 284 |
+
174,
|
| 285 |
+
498,
|
| 286 |
+
825,
|
| 287 |
+
569
|
| 288 |
+
],
|
| 289 |
+
"page_idx": 3
|
| 290 |
+
},
|
| 291 |
+
{
|
| 292 |
+
"type": "text",
|
| 293 |
+
"text": "We further enhance HiT by adding a cross-attention module at the beginning of each stage which allows the network to directly condition the intermediate features on the initial input latent code. This kind of self-modulation layer leads to improved generative performance, especially when selfattention modules are absent in high-resolution stages. In the following sections, we provided detailed descriptions for the two main architectural components of HiT: (i) multi-axis blocked self-attention module and (ii) cross-attention module, respectively. ",
|
| 294 |
+
"bbox": [
|
| 295 |
+
174,
|
| 296 |
+
574,
|
| 297 |
+
825,
|
| 298 |
+
659
|
| 299 |
+
],
|
| 300 |
+
"page_idx": 3
|
| 301 |
+
},
|
| 302 |
+
{
|
| 303 |
+
"type": "text",
|
| 304 |
+
"text": "3.2 Multi-Axis Blocked Self-Attention ",
|
| 305 |
+
"text_level": 1,
|
| 306 |
+
"bbox": [
|
| 307 |
+
176,
|
| 308 |
+
681,
|
| 309 |
+
449,
|
| 310 |
+
695
|
| 311 |
+
],
|
| 312 |
+
"page_idx": 3
|
| 313 |
+
},
|
| 314 |
+
{
|
| 315 |
+
"type": "text",
|
| 316 |
+
"text": "Different from the blocked self-attention in Nested Transformer [73], the proposed multi-axis blocked self-attention performs attention on more than a single axis. The attentions performed in two axes correspond to two forms of sparse self-attention, namely regional attention and dilated attention. Regional attention follows the spirit of blocked local self-attention [37, 62] where tokens attend to their neighbours within non-overlapped blocks. To remedy the loss of global attention, dilated attention captures long-range dependencies between tokens across blocks: it subsamples attention regions in a manner similar to dilated convolutions with a fixed stride equal to the block size. Figure 2 illustrates an example of these two attentions. ",
|
| 317 |
+
"bbox": [
|
| 318 |
+
174,
|
| 319 |
+
708,
|
| 320 |
+
825,
|
| 321 |
+
820
|
| 322 |
+
],
|
| 323 |
+
"page_idx": 3
|
| 324 |
+
},
|
| 325 |
+
{
|
| 326 |
+
"type": "text",
|
| 327 |
+
"text": "To be specific, given an input of image with size $( H , W , C )$ , it is blocked into a tensor $X$ of the shape $\\begin{array} { r } { ( \\bar { b } \\times b , \\frac { H } { b } \\times \\frac { W } { b } , C ) } \\end{array}$ representing $( b , b )$ non-overlapping blocks each with the size of $\\textstyle { \\left( { \\frac { H } { b } } , { \\frac { W } { b } } \\right) }$ Dilated attention mixes information along the first axis of while keeping information along other axes independent; regional attention works in an analogous manner over the second axis of $X$ . They are straightforward to implement: attention over the $i$ -th axis of $X$ can be implemented by einsum operation which is available in most deep learning libraries. ",
|
| 328 |
+
"bbox": [
|
| 329 |
+
174,
|
| 330 |
+
825,
|
| 331 |
+
825,
|
| 332 |
+
911
|
| 333 |
+
],
|
| 334 |
+
"page_idx": 3
|
| 335 |
+
},
|
| 336 |
+
{
|
| 337 |
+
"type": "text",
|
| 338 |
+
"text": "We mix regional and dilated attention in a single layer by computing them in parallel, each of which uses a half of attention heads. Our method can be easily extended to model more than two axes by performing attention on each of the axis in parallel. Axial attention [17, 20, 65] can be viewed as a special case of our method, where the blocking operation before attention is removed. However, we find blocking is the key to achieve significant performance improvement in the experiment. This is because the blocked structure reveals a better inductive bias for images. Compared with [17, 37, 65] where different attention modules are interleaved in consecutive layers, our approach aggregates local and global information in a single round, which is not only more flexible for architecture design but also shown to yield better performance than interleaving in our experiment. ",
|
| 339 |
+
"bbox": [
|
| 340 |
+
173,
|
| 341 |
+
90,
|
| 342 |
+
825,
|
| 343 |
+
215
|
| 344 |
+
],
|
| 345 |
+
"page_idx": 4
|
| 346 |
+
},
|
| 347 |
+
{
|
| 348 |
+
"type": "text",
|
| 349 |
+
"text": "Balancing attention between axes. In each multi-axis blocked self-attention module, the input feature is blocked in a balanced way such that we have $\\begin{array} { r } { b \\times b \\approx \\frac { H } { b } \\times \\frac { W } { b } } \\end{array}$ . This ensures that regional and dilated attention is computed on an input sequence of a similar length, avoiding half of the attention heads are attended to a too sparse region. In general, performing dot-product attention between two input sequences of length $N = H \\times W$ requires a total of $\\mathcal { O } ( \\bar { N } ^ { 2 } )$ computation. When computing the balanced multi-axis blocked attention on an image with the block size of $S$ , i.e., $S = \\sqrt { N }$ , we perform attention on $S$ sequences of length $S$ , which is a total of $\\mathcal { O } ( S { \\cdot } S ^ { 2 } ) = \\mathcal { O } ( N \\sqrt { N } )$ computation. This leads to an $\\mathcal { O } ( \\sqrt { N } )$ saving in computation over standard self-attention. ",
|
| 350 |
+
"bbox": [
|
| 351 |
+
173,
|
| 352 |
+
222,
|
| 353 |
+
826,
|
| 354 |
+
338
|
| 355 |
+
],
|
| 356 |
+
"page_idx": 4
|
| 357 |
+
},
|
| 358 |
+
{
|
| 359 |
+
"type": "text",
|
| 360 |
+
"text": "3.3 Cross-Attention for Self-Modulation ",
|
| 361 |
+
"text_level": 1,
|
| 362 |
+
"bbox": [
|
| 363 |
+
176,
|
| 364 |
+
356,
|
| 365 |
+
465,
|
| 366 |
+
371
|
| 367 |
+
],
|
| 368 |
+
"page_idx": 4
|
| 369 |
+
},
|
| 370 |
+
{
|
| 371 |
+
"type": "text",
|
| 372 |
+
"text": "To further improve the global information flow, we propose to let the intermediate features of the model directly attend to a small tensor projected from the input latent code. This is implemented via a cross-attention operation and can be viewed as a form of self-modulation [8]. The proposed technique has two benefits. First, as shown in [8], self-modulation stabilizes the generator towards favorable conditioning values and also appears to improve mode coverage. Second, when self-attention modules are absent in high-resolution stages, attending to the input latent code provides an alternative way to capture global information when generating pixel-level details. ",
|
| 373 |
+
"bbox": [
|
| 374 |
+
173,
|
| 375 |
+
381,
|
| 376 |
+
825,
|
| 377 |
+
479
|
| 378 |
+
],
|
| 379 |
+
"page_idx": 4
|
| 380 |
+
},
|
| 381 |
+
{
|
| 382 |
+
"type": "text",
|
| 383 |
+
"text": "Formally, let $X _ { l }$ be the first-layer feature representation of the $l$ -th stage. The input latent code $z$ is first projected into a 2D spatial embedding $Z$ with the resolution of $H _ { Z } \\times W _ { Z }$ and dimension of $C _ { Z }$ by a linear function. $X _ { l }$ is then treated as the query and $Z$ as the key and value. We compute their cross-attention following the update rule: $X _ { l } ^ { \\prime } = \\mathbf { M H A } ( X _ { l } , Z + P _ { Z } )$ , where MHA represents the standard mulit-head self-attention, $X _ { l } ^ { \\prime }$ is the output, and $P _ { Z }$ is the learnable positional encoding having the same shape as $Z$ . Note that $Z$ is shared across all stages. For an input feature with the sequence length of $N$ , the embedding size is a pre-defined hyperparameter far less than $N$ (i.e., $H _ { Z } \\times W _ { Z } \\ll N )$ . Therefore, the resulting cross-attention operation has linear complexity $\\mathcal { O } ( N )$ . ",
|
| 384 |
+
"bbox": [
|
| 385 |
+
174,
|
| 386 |
+
486,
|
| 387 |
+
825,
|
| 388 |
+
597
|
| 389 |
+
],
|
| 390 |
+
"page_idx": 4
|
| 391 |
+
},
|
| 392 |
+
{
|
| 393 |
+
"type": "text",
|
| 394 |
+
"text": "In our initial experiments, we find that compared with cross-attention, using AdaIN [19] and modulated layers [28] for Transformer-based generators requires much higher memory cost during model training, which usually leads to out-of-memory errors when the model is trained for generating highresolution images. As a result, related work like ViT-GAN [32], which uses AdaIN and modulated layers, can only produce images up to the resolution of $6 4 \\times 6 4$ . Hence, we believe cross-attention is a better choice for high-resolution generators based on Transformers. ",
|
| 395 |
+
"bbox": [
|
| 396 |
+
174,
|
| 397 |
+
602,
|
| 398 |
+
825,
|
| 399 |
+
685
|
| 400 |
+
],
|
| 401 |
+
"page_idx": 4
|
| 402 |
+
},
|
| 403 |
+
{
|
| 404 |
+
"type": "text",
|
| 405 |
+
"text": "4 Experiments ",
|
| 406 |
+
"text_level": 1,
|
| 407 |
+
"bbox": [
|
| 408 |
+
174,
|
| 409 |
+
707,
|
| 410 |
+
312,
|
| 411 |
+
724
|
| 412 |
+
],
|
| 413 |
+
"page_idx": 4
|
| 414 |
+
},
|
| 415 |
+
{
|
| 416 |
+
"type": "text",
|
| 417 |
+
"text": "4.1 Experiment Setup ",
|
| 418 |
+
"text_level": 1,
|
| 419 |
+
"bbox": [
|
| 420 |
+
174,
|
| 421 |
+
739,
|
| 422 |
+
339,
|
| 423 |
+
755
|
| 424 |
+
],
|
| 425 |
+
"page_idx": 4
|
| 426 |
+
},
|
| 427 |
+
{
|
| 428 |
+
"type": "text",
|
| 429 |
+
"text": "Datasets. We validate the proposed method on three datasets: ImageNet [49], CelebA-HQ [25], and FFHQ [28]. ImageNet (LSVRC2012) [49] contains roughly 1.2 million images with 1000 distinct categories and we down-sample the images to $1 2 8 \\times 1 2 8$ and $2 5 6 \\times 2 5 6$ by bicubic interpolation. We use random crop for training and center crop for testing. This dataset is challenging for image generation since it contains samples with diverse object categories and textures. We also adopt ImageNet as the main test bed during the ablation study. ",
|
| 430 |
+
"bbox": [
|
| 431 |
+
173,
|
| 432 |
+
766,
|
| 433 |
+
825,
|
| 434 |
+
849
|
| 435 |
+
],
|
| 436 |
+
"page_idx": 4
|
| 437 |
+
},
|
| 438 |
+
{
|
| 439 |
+
"type": "text",
|
| 440 |
+
"text": "CelebA-HQ [25] is a high-quality version of the CelebA dataset [38] containing 30,000 of the facial images at $1 0 2 4 \\times 1 0 2 4$ resolution. To align with [25], we use these images for both training and evaluation. FFHQ [28] includes vastly more variation than CelebA-HQ in terms of age, ethnicity and image background, and also has much better coverage of accessories such as eyeglasses, sunglasses, and hats. This dataset consists of 70,000 high-quality images at $1 0 2 4 \\times 1 0 2 4$ resolution, out of which we use 50,000 images for testing and train models with all images following [28]. We synthesize images on these two datasets with the resolutions of $2 5 6 \\times 2 5 6$ and $1 0 2 4 \\times 1 0 2 4$ . ",
|
| 441 |
+
"bbox": [
|
| 442 |
+
176,
|
| 443 |
+
856,
|
| 444 |
+
825,
|
| 445 |
+
911
|
| 446 |
+
],
|
| 447 |
+
"page_idx": 4
|
| 448 |
+
},
|
| 449 |
+
{
|
| 450 |
+
"type": "text",
|
| 451 |
+
"text": "",
|
| 452 |
+
"bbox": [
|
| 453 |
+
176,
|
| 454 |
+
92,
|
| 455 |
+
823,
|
| 456 |
+
132
|
| 457 |
+
],
|
| 458 |
+
"page_idx": 5
|
| 459 |
+
},
|
| 460 |
+
{
|
| 461 |
+
"type": "text",
|
| 462 |
+
"text": "Evaluation metrics. We adopt the Inception Score (IS) [51] and the Fréchet Inception Distance (FID) [16] for quantitative evaluation. Both metrics are calculated based on a pre-trained Inception-v3 image classifier [56]. Inception score computes KL-divergence between the real image distribution and the generated image distribution given the pre-trained classifier. Higher inception scores mean better image quality. FID is a more principled and comprehensive metric, and has been shown to be more consistent with human judgments of realism [16, 70]. Lower FID values indicate closer distances between synthetic and real data distributions. In our experiments, 50,000 samples are randomly generated for each model to calculate the inception score and FID on ImageNet and FFHQ, while 30,000 samples are produced for comparison on CelebA-HQ. Note that we follow [51] to split the synthetic images into groups (5000 images per group) and report their averaged inception score. ",
|
| 463 |
+
"bbox": [
|
| 464 |
+
174,
|
| 465 |
+
138,
|
| 466 |
+
825,
|
| 467 |
+
279
|
| 468 |
+
],
|
| 469 |
+
"page_idx": 5
|
| 470 |
+
},
|
| 471 |
+
{
|
| 472 |
+
"type": "text",
|
| 473 |
+
"text": "4.2 Implementation Details ",
|
| 474 |
+
"text_level": 1,
|
| 475 |
+
"bbox": [
|
| 476 |
+
176,
|
| 477 |
+
297,
|
| 478 |
+
377,
|
| 479 |
+
313
|
| 480 |
+
],
|
| 481 |
+
"page_idx": 5
|
| 482 |
+
},
|
| 483 |
+
{
|
| 484 |
+
"type": "text",
|
| 485 |
+
"text": "Architecture configuration. In our implementation, HiT starts from an initial feature of size $8 \\times 8$ projected from the input latent code. We use pixel shuffle [53] for upsampling the output of each stage, as we find using nearest neighbors leads to model failure which aligns with the observation in Nested Transformer [73]. The number of low-resolution stages is fixed to be 4 as a good trade-off between computational speed and generative performance. For generating images larger than the resolution of $1 2 8 \\times 1 2 8$ , we scale HiT to different model capacities – small, base, and large, denoted as HiT-{S, B, L}. We refer to the supplementary materials for their detailed architectures. ",
|
| 486 |
+
"bbox": [
|
| 487 |
+
174,
|
| 488 |
+
325,
|
| 489 |
+
825,
|
| 490 |
+
422
|
| 491 |
+
],
|
| 492 |
+
"page_idx": 5
|
| 493 |
+
},
|
| 494 |
+
{
|
| 495 |
+
"type": "text",
|
| 496 |
+
"text": "It is worth emphasizing that the flexibility of the proposed multi-axis blocked self-attention makes it possible for us to build smaller models than [37]. This is because they interleave different types of attention operations and thus require the number of attention blocks in a single stage to be even (at least 2). In contrast, our multi-axis blocked self-attention combines different attention outputs within heads which allows us to use an arbitrary number (e.g., 1) of attention blocks in a model. ",
|
| 497 |
+
"bbox": [
|
| 498 |
+
174,
|
| 499 |
+
428,
|
| 500 |
+
825,
|
| 501 |
+
497
|
| 502 |
+
],
|
| 503 |
+
"page_idx": 5
|
| 504 |
+
},
|
| 505 |
+
{
|
| 506 |
+
"type": "text",
|
| 507 |
+
"text": "Training details. In all the experiments, we use a ResNet-based discriminator following the architecture design of [28]. Our model is trained with a standard non-saturating logistic GAN loss with $R _ { 1 }$ gradient penalty [40] applied to the discriminator. $R _ { 1 }$ penalty penalizes the discriminator for deviating from the Nash-equilibrium by penalizing the gradient on real data alone. The gradient penalty weight is set to 10. Adam [29] is utilized for optimization with $\\beta _ { 1 } = 0$ and $\\beta _ { 2 } = 0 . 9 9$ The learning rate is 0.0001 for both the generator and discriminator. All the models are trained using TPU for one million iterations on ImageNet and 500,000 iterations on FFHQ and CelebA-HQ. We set the mini-batch size to 256 for the image resolution of $1 2 8 \\times 1 2 8$ and $2 5 6 \\times 2 5 6$ while to 32 for the resolution of $1 0 2 4 \\times 1 0 2 4$ . To keep our setup simple, we do not employ any training tricks for GAN training, such as progressive growing, equalized learning rates, pixel normalization, noise injection, and mini-batch standard deviation that recent literature demonstrate to be cruicial for obtaining state-of-the-art results [25, 28]. When training on FFHQ and CelebA-HQ, we utilize balanced consistency regularization (bCR) [72, 77] for additional regularization where images are augmented by flipping, color, translation, and cutout as in [76]. bCR enforces that for both real and generated images, two sets of augmentations applied to the same input image should yield the same output. bCR is only added to the discriminator with the weight of 10. We also decrease the learning rate by half to stabilize the training process when bCR is used. ",
|
| 508 |
+
"bbox": [
|
| 509 |
+
174,
|
| 510 |
+
505,
|
| 511 |
+
825,
|
| 512 |
+
739
|
| 513 |
+
],
|
| 514 |
+
"page_idx": 5
|
| 515 |
+
},
|
| 516 |
+
{
|
| 517 |
+
"type": "text",
|
| 518 |
+
"text": "4.3 Results on ImageNet ",
|
| 519 |
+
"text_level": 1,
|
| 520 |
+
"bbox": [
|
| 521 |
+
174,
|
| 522 |
+
760,
|
| 523 |
+
356,
|
| 524 |
+
773
|
| 525 |
+
],
|
| 526 |
+
"page_idx": 5
|
| 527 |
+
},
|
| 528 |
+
{
|
| 529 |
+
"type": "text",
|
| 530 |
+
"text": "Unconditional generation. We start by evaluating the proposed HiT on the ImageNet $1 2 8 \\times 1 2 8$ dataset, targeting the unconditional image generation setting for simplicity. In addition to recently reported state-of-the-art GANs, we implement a ConvNet-based generator following the widely-used architecture from [69] while using the exactly same training setup of the proposed HiT (e.g., losses and $R _ { 1 }$ gradient penalty) denoted as ConvNet- $R _ { 1 }$ for a fair comparison. The results are shown in Table 1. We can see that HiT outperforms the previous ConvNet-based methods by a notable margin in terms of both IS and FID scores. Note that as reported in [11], BigGAN [4] achieves 30.91 FID on unconditional ImageNet, but its model is far larger (more than 70M parameters) than HiT (around 30M parameters). Therefore, the results are not directly comparable. Even though, HiT (30.83 FID) ",
|
| 531 |
+
"bbox": [
|
| 532 |
+
174,
|
| 533 |
+
786,
|
| 534 |
+
825,
|
| 535 |
+
911
|
| 536 |
+
],
|
| 537 |
+
"page_idx": 5
|
| 538 |
+
},
|
| 539 |
+
{
|
| 540 |
+
"type": "table",
|
| 541 |
+
"img_path": "images/40e52b3480ec48a96af1d08835e861c59e738b27745c532c0cd1f8527125d62f.jpg",
|
| 542 |
+
"table_caption": [
|
| 543 |
+
"Table 1: Comparison with the state-of-the-art methods on the ImageNet $1 2 8 \\times 1 2 8$ dataset. † is based on a supervised pre-trained ImageNet classifier. "
|
| 544 |
+
],
|
| 545 |
+
"table_footnote": [],
|
| 546 |
+
"table_body": "<table><tr><td>Method</td><td>FID↓</td><td>IS↑</td></tr><tr><td>Vanilla GAN [15]</td><td>54.17</td><td rowspan=\"3\">14.01 13.50</td></tr><tr><td>PacGAN2 [35]</td><td>57.51</td></tr><tr><td>MGAN[18]</td><td>58.88 13.22</td></tr><tr><td>Logo-GAN-AE [50]</td><td>50.90 38.41</td><td rowspan=\"3\">14.44 18.86</td></tr><tr><td>Logo-GAN-RC [50]t</td></tr><tr><td>SS-GAN (sBN) [9]</td></tr><tr><td>43.87 Self-Conditioned GAN [36]</td><td>40.30 15.82</td></tr><tr><td>ConvNet-R1</td><td>37.18 19.55</td></tr><tr><td>HiT (Ours)</td><td>30.83 21.64</td></tr></table>",
|
| 547 |
+
"bbox": [
|
| 548 |
+
181,
|
| 549 |
+
137,
|
| 550 |
+
504,
|
| 551 |
+
297
|
| 552 |
+
],
|
| 553 |
+
"page_idx": 6
|
| 554 |
+
},
|
| 555 |
+
{
|
| 556 |
+
"type": "table",
|
| 557 |
+
"img_path": "images/cb612ec7388dcfbe56bbc5d95021c7c04adf66b7e7b73e473e06c2916a427549.jpg",
|
| 558 |
+
"table_caption": [
|
| 559 |
+
"Table 2: Reconstruction FID on the ImageNet $2 5 6 \\times 2 5 6$ dataset. We note that VQVAE-2 utilizes a hierarchical organization of VQ-VAE and thus has two codebooks $\\mathcal { Z }$ . "
|
| 560 |
+
],
|
| 561 |
+
"table_footnote": [],
|
| 562 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1>Method</td><td rowspan=1 colspan=1>Embeddingsize and |2</td><td rowspan=1 colspan=1>FID↓</td></tr><tr><td rowspan=1 colspan=1>VQ-VAE [61]DALL-E [47]</td><td rowspan=1 colspan=1>32,102432,8192</td><td rowspan=1 colspan=1>75.1934.30</td></tr><tr><td rowspan=1 colspan=1>VQ-VAE-2 [48]</td><td rowspan=1 colspan=1>64,51232, 512</td><td rowspan=1 colspan=1>10.00</td></tr><tr><td rowspan=1 colspan=1>VQGAN [14]</td><td rowspan=1 colspan=1>16,1024</td><td rowspan=1 colspan=1>8.00</td></tr><tr><td rowspan=1 colspan=1>VQ-HiT (Ours)</td><td rowspan=1 colspan=1>16,1024</td><td rowspan=1 colspan=1>6.37</td></tr></table>",
|
| 563 |
+
"bbox": [
|
| 564 |
+
535,
|
| 565 |
+
154,
|
| 566 |
+
823,
|
| 567 |
+
299
|
| 568 |
+
],
|
| 569 |
+
"page_idx": 6
|
| 570 |
+
},
|
| 571 |
+
{
|
| 572 |
+
"type": "image",
|
| 573 |
+
"img_path": "images/6d0a48fdde3319da9f1c017daa8c3a8399c9a0d780e2ce433300fb5f9344b729.jpg",
|
| 574 |
+
"image_caption": [
|
| 575 |
+
"Figure 3: Unconditional image generation results of HiT trained on ImageNet $1 2 8 \\times 1 2 8$ . "
|
| 576 |
+
],
|
| 577 |
+
"image_footnote": [],
|
| 578 |
+
"bbox": [
|
| 579 |
+
174,
|
| 580 |
+
319,
|
| 581 |
+
825,
|
| 582 |
+
487
|
| 583 |
+
],
|
| 584 |
+
"page_idx": 6
|
| 585 |
+
},
|
| 586 |
+
{
|
| 587 |
+
"type": "text",
|
| 588 |
+
"text": "is slightly better than BigGAN and achieves the state of the art among models with a similar capacity as shown in Table 1. We also note that [8, 36] leverage auxiliary regularization techniques and our method is complementary to them. Examples generated by HiT on ImageNet are shown in Figure 3, from which we observe nature visual details and diversity. ",
|
| 589 |
+
"bbox": [
|
| 590 |
+
174,
|
| 591 |
+
547,
|
| 592 |
+
825,
|
| 593 |
+
603
|
| 594 |
+
],
|
| 595 |
+
"page_idx": 6
|
| 596 |
+
},
|
| 597 |
+
{
|
| 598 |
+
"type": "text",
|
| 599 |
+
"text": "Reconstruction. We are also interested in the reconstruction ability of the proposed HiT and evaluate by employing it as a decoder for the vector quantised variational auto-encoder (VQ-VAE [61]), a state-of-the-art approach for visual representation learning. In addition to the reconstruction loss and adversarial loss, our HiT-based VQ-VAE variant, namely VQ-HiT, is also trained with the perceptual loss [24] following the setup of [14, 78]. Please refer to the supplementary materials for more details on the architecture design and model training. We evaluate the metric of reconstruction FID on ImageNet $2 5 6 \\times 2 5 6$ and report the results in Table 2. Our VQ-HiT attains the best performance while providing significantly more compression (i.e., smaller embedding size and fewer number of codes in the codebook $\\mathcal { Z }$ ) than [47, 48, 61]. ",
|
| 600 |
+
"bbox": [
|
| 601 |
+
174,
|
| 602 |
+
609,
|
| 603 |
+
825,
|
| 604 |
+
734
|
| 605 |
+
],
|
| 606 |
+
"page_idx": 6
|
| 607 |
+
},
|
| 608 |
+
{
|
| 609 |
+
"type": "text",
|
| 610 |
+
"text": "4.4 Higher Resolution Generation ",
|
| 611 |
+
"text_level": 1,
|
| 612 |
+
"bbox": [
|
| 613 |
+
176,
|
| 614 |
+
758,
|
| 615 |
+
423,
|
| 616 |
+
773
|
| 617 |
+
],
|
| 618 |
+
"page_idx": 6
|
| 619 |
+
},
|
| 620 |
+
{
|
| 621 |
+
"type": "text",
|
| 622 |
+
"text": "Baselines. To demonstrate the utility of our approach for high-fidelity images, we compare to stateof-the-art techniques for generating images on CelebA-HQ and FFHQ, focusing on two common resolutions of $2 5 6 \\times 2 5 6$ and $1 0 2 4 \\times 1 0 2 4$ . The main competing method of the proposed HiT is StyleGAN [27, 28] – a hypernetwork-based ConvNet archieving the best performance on these two datasets. On the FFHQ dataset, apart from our ConvNet-based counterparts, we also compare to the most recent INR-based methods including CIPS [1] and INR-GAN [54]. These two models are closely related to HiT as the high-resolution stages of our approach can be viewed as a form of INR. Following the protocol of [1], we report the results of StyleGAN2 [28] trained without style-mixing and path regularization of the generator on this dataset. ",
|
| 623 |
+
"bbox": [
|
| 624 |
+
174,
|
| 625 |
+
786,
|
| 626 |
+
825,
|
| 627 |
+
911
|
| 628 |
+
],
|
| 629 |
+
"page_idx": 6
|
| 630 |
+
},
|
| 631 |
+
{
|
| 632 |
+
"type": "table",
|
| 633 |
+
"img_path": "images/cb5b77384444d026de71f5f90a41de49d2ae1258e0df6d4c1a02c7ec267bc31d.jpg",
|
| 634 |
+
"table_caption": [
|
| 635 |
+
"Table 3: Comparison with the state-of-the-art methods on CelebA-HQ (left) and FFHQ (right) with the resolutions of $2 5 6 \\times 2 5 6$ and $1 0 2 4 \\times 1 0 2 4$ . ? bCR is not applied at the $1 0 2 4 \\times 1 0 2 4$ resolution. "
|
| 636 |
+
],
|
| 637 |
+
"table_footnote": [],
|
| 638 |
+
"table_body": "<table><tr><td>Method</td><td>FID↓(CelebA-HQ) ×256 ×1024</td></tr><tr><td>VAEBM[68]</td><td>20.38</td></tr><tr><td>StyleALAE [45] 19.21</td><td>=</td></tr><tr><td>PG-GAN [25] 8.03</td><td>1 =</td></tr><tr><td>COCO-GAN [33]</td><td>9.49 =</td></tr><tr><td>VQGAN[14] 10.70</td><td>1</td></tr><tr><td>StyleGAN [27]</td><td>5.17 -</td></tr></table>",
|
| 639 |
+
"bbox": [
|
| 640 |
+
183,
|
| 641 |
+
123,
|
| 642 |
+
477,
|
| 643 |
+
270
|
| 644 |
+
],
|
| 645 |
+
"page_idx": 7
|
| 646 |
+
},
|
| 647 |
+
{
|
| 648 |
+
"type": "table",
|
| 649 |
+
"img_path": "images/750939dddeda2819733a7fb1ddf97eb0fbd1e25cfb3990c74bf68a4c5ddcd347.jpg",
|
| 650 |
+
"table_caption": [],
|
| 651 |
+
"table_footnote": [],
|
| 652 |
+
"table_body": "<table><tr><td>Method</td><td>FID↓(FFHQ) ×256 ×1024</td></tr><tr><td>U-Net GAN [52]</td><td>7.63 = 13.09</td></tr><tr><td>StyleALAE [45]</td><td>1</td></tr><tr><td>VQGAN[14]</td><td>11.40 =</td></tr><tr><td>INR-GAN [54]</td><td>9.57 16.32</td></tr><tr><td>CIPS [1]</td><td>4.38 10.07</td></tr><tr><td>StyleGAN2 [28] HiT-B (Ours)</td><td>3.83 4.41 2.95 6.37*</td></tr></table>",
|
| 653 |
+
"bbox": [
|
| 654 |
+
539,
|
| 655 |
+
123,
|
| 656 |
+
795,
|
| 657 |
+
270
|
| 658 |
+
],
|
| 659 |
+
"page_idx": 7
|
| 660 |
+
},
|
| 661 |
+
{
|
| 662 |
+
"type": "table",
|
| 663 |
+
"img_path": "images/c597a709bf2604e96abec94aacbecffa3bc7f4b21923adca56b97efbcd5da383.jpg",
|
| 664 |
+
"table_caption": [
|
| 665 |
+
"Table 4: Comparison with the main competing methods in terms of number of network parameters, throughput, and FID on FFHQ $2 5 6 \\times 2 5 6$ . The throughput is measured on a single Tesla V100 GPU. "
|
| 666 |
+
],
|
| 667 |
+
"table_footnote": [],
|
| 668 |
+
"table_body": "<table><tr><td>Architecture</td><td>Model</td><td>#params (million)</td><td>Throughput (images /sec)</td><td>FID← (FFHQ ×256)</td></tr><tr><td>ConvNet</td><td>StyleGAN2 [28]</td><td>30.03</td><td>95.79</td><td>3.83</td></tr><tr><td rowspan=\"2\">INR</td><td>CIPS [1]</td><td>45.90</td><td>27.27</td><td>4.38</td></tr><tr><td>INR-GAN [54]</td><td>107.03</td><td>266.45</td><td>9.57</td></tr><tr><td rowspan=\"3\">Transformer</td><td>HiT-S</td><td>38.01</td><td>86.64</td><td>3.06</td></tr><tr><td>HiT-B</td><td>46.22</td><td>52.09</td><td>2.95</td></tr><tr><td>HiT-L</td><td>97.46</td><td>20.67</td><td>2.58</td></tr></table>",
|
| 669 |
+
"bbox": [
|
| 670 |
+
232,
|
| 671 |
+
318,
|
| 672 |
+
766,
|
| 673 |
+
458
|
| 674 |
+
],
|
| 675 |
+
"page_idx": 7
|
| 676 |
+
},
|
| 677 |
+
{
|
| 678 |
+
"type": "text",
|
| 679 |
+
"text": "Results. We report the results in Table 3. Impressively, the proposed HiT obtains the best FID scores at the resolution of $2 5 6 \\times 2 5 6$ and sets the new state of the art on both datasets. Meanwhile, our performance is also competitive at the resolution of $1 0 2 4 \\times 1 0 2 4$ but only slightly shy of StyleGAN. This is due to our finding that conventional regularization techniques such as [77] cannot be directly applied to Transformer-based architectures for synthesizing ultra high-resolution images. We believe this triggers a new research direction and will explore it as our future work. It is also worth mentioning that our method consistently outperforms INR-based models, which suggests the importance of involving the self-attention mechanism into image generation. ",
|
| 680 |
+
"bbox": [
|
| 681 |
+
173,
|
| 682 |
+
482,
|
| 683 |
+
825,
|
| 684 |
+
594
|
| 685 |
+
],
|
| 686 |
+
"page_idx": 7
|
| 687 |
+
},
|
| 688 |
+
{
|
| 689 |
+
"type": "text",
|
| 690 |
+
"text": "Table 4 provides a more detailed comparison to our main competing methods in terms of the number of parameters, throughput, and FID on FFHQ $2 5 6 \\times 2 5 6$ . We find that the proposed HiT-S has a comparable runtime performance (throughput) with StyleGAN while yielding better generative results. More importantly, FID scores can be further improved when larger variants of HiT are employed. Figure 4 illustrates our synthetic face images on CelebA-HQ. ",
|
| 691 |
+
"bbox": [
|
| 692 |
+
174,
|
| 693 |
+
599,
|
| 694 |
+
825,
|
| 695 |
+
670
|
| 696 |
+
],
|
| 697 |
+
"page_idx": 7
|
| 698 |
+
},
|
| 699 |
+
{
|
| 700 |
+
"type": "text",
|
| 701 |
+
"text": "4.5 Ablation Study ",
|
| 702 |
+
"text_level": 1,
|
| 703 |
+
"bbox": [
|
| 704 |
+
174,
|
| 705 |
+
685,
|
| 706 |
+
318,
|
| 707 |
+
700
|
| 708 |
+
],
|
| 709 |
+
"page_idx": 7
|
| 710 |
+
},
|
| 711 |
+
{
|
| 712 |
+
"type": "text",
|
| 713 |
+
"text": "We then evaluate the importance of different components of our model by its ablation on ImageNet $1 2 8 \\times 1 2 8$ . A lighter-weight training configuration is employed in this study to reduce the training time. We start with a baseline architecture without any attention modules which reduces to a pure implicit neural function conditioned on the input latent code [3, 30]. We build upon this baseline by gradually incorporating cross-attention and self-attention modules. We compare the methods that perform attention without blocking (including standard self-attention [63], axial attention [17, 65]) and with blocking (including blocked local attention [62, 73]). We also compare a variant of our method where different types of attention are interleaved other than combined in attention heads. ",
|
| 714 |
+
"bbox": [
|
| 715 |
+
173,
|
| 716 |
+
710,
|
| 717 |
+
825,
|
| 718 |
+
821
|
| 719 |
+
],
|
| 720 |
+
"page_idx": 7
|
| 721 |
+
},
|
| 722 |
+
{
|
| 723 |
+
"type": "text",
|
| 724 |
+
"text": "The results are reported in Table 5. As we can see, the latent code conditional INR baseline cannot fit training data favourably since it lacks an efficient way to capture the latent code during the generative process. Interestingly, incorporating the proposed cross-attention module improves the baseline and achieves the state of the art, thanks to its function of self-modulation. More importantly, we find that blocking is vital for attention: performing different types of attention after blocking can all improve the performance by a notable margin while the axial attention cannot. This is due to the fact that the image structure after blocking introduces a better inductive bias for images. At last, we observe that the proposed multi-axis blocked self-attention yields better FID scores than interleaving different attention outputs, and it achieves the best performance after balancing the attention axes. ",
|
| 725 |
+
"bbox": [
|
| 726 |
+
174,
|
| 727 |
+
828,
|
| 728 |
+
825,
|
| 729 |
+
911
|
| 730 |
+
],
|
| 731 |
+
"page_idx": 7
|
| 732 |
+
},
|
| 733 |
+
{
|
| 734 |
+
"type": "image",
|
| 735 |
+
"img_path": "images/71bb0711d458fbc2c852344034372a696a05937ee484acefc86ce4c277bdbecb.jpg",
|
| 736 |
+
"image_caption": [
|
| 737 |
+
"Figure 4: Synthetic face images by HiT-B trained on CelebA-HQ $1 0 2 4 \\times 1 0 2 4$ and $2 5 6 \\times 2 5 6$ . "
|
| 738 |
+
],
|
| 739 |
+
"image_footnote": [],
|
| 740 |
+
"bbox": [
|
| 741 |
+
174,
|
| 742 |
+
88,
|
| 743 |
+
823,
|
| 744 |
+
215
|
| 745 |
+
],
|
| 746 |
+
"page_idx": 8
|
| 747 |
+
},
|
| 748 |
+
{
|
| 749 |
+
"type": "table",
|
| 750 |
+
"img_path": "images/353ff12d2d369ba29a8e560aff4ca322578c1d9c477784a2cc89881984f20cde.jpg",
|
| 751 |
+
"table_caption": [
|
| 752 |
+
"Table 5: Ablation study. We start with the INR-based generator [3, 30] conditioned on the input latent code and gradually improve it with the proposed attention components and their variations. O/M denotes “out-of-memory” error: the model cannot be trained for the batch size of one. "
|
| 753 |
+
],
|
| 754 |
+
"table_footnote": [],
|
| 755 |
+
"table_body": "<table><tr><td>Model configuration</td><td></td><td>#params (million)</td><td>Throughput (images /sec)</td><td>FID←</td><td>IS↑</td></tr><tr><td></td><td>Latent-code conditioned INR decoder [3,30]</td><td>42.68</td><td>110.39</td><td>56.33</td><td>16.19</td></tr><tr><td>+</td><td>Cross-attention for self-modulation</td><td>61.55</td><td>82.67</td><td>35.94</td><td>19.42</td></tr><tr><td rowspan=\"5\">Jo əuo +</td><td>All-to-all self-attention [63]</td><td>67.60</td><td>1</td><td>O/M</td><td>O/M</td></tr><tr><td>Axial attention [17,20,65]</td><td>67.60</td><td>74.21</td><td>35.15</td><td>19.79</td></tr><tr><td>Blocked local attention [62, 73] Interleaving blocked regional and dilated attention</td><td>67.60</td><td></td><td>33.70</td><td>19.96</td></tr><tr><td>Multi-axis blocked self-attention (Ours)</td><td></td><td>75.54</td><td>32.96 32.23</td><td>20.75 20.96</td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr><tr><td>+</td><td>Balancing attention between axes (Full model)</td><td>67.60</td><td>75.33</td><td>31.87</td><td>21.32</td></tr></table>",
|
| 756 |
+
"bbox": [
|
| 757 |
+
183,
|
| 758 |
+
306,
|
| 759 |
+
813,
|
| 760 |
+
479
|
| 761 |
+
],
|
| 762 |
+
"page_idx": 8
|
| 763 |
+
},
|
| 764 |
+
{
|
| 765 |
+
"type": "text",
|
| 766 |
+
"text": "",
|
| 767 |
+
"bbox": [
|
| 768 |
+
174,
|
| 769 |
+
506,
|
| 770 |
+
825,
|
| 771 |
+
547
|
| 772 |
+
],
|
| 773 |
+
"page_idx": 8
|
| 774 |
+
},
|
| 775 |
+
{
|
| 776 |
+
"type": "text",
|
| 777 |
+
"text": "In Table 6, we investigate another form of our variations, where we incorporate attention in different number of stages across the generator. We can see that the more in the stack the attention is applied (low-resolution stages), the better the model performance will be. This study provides a validation for the effectiveness of self-attention operation in generative modeling. However, for feature resolutions larger than $6 4 \\times 6 4$ , we do not observe obvious performance gains brought by self-attention operations but a notable degradation in both training and inference time. ",
|
| 778 |
+
"bbox": [
|
| 779 |
+
174,
|
| 780 |
+
554,
|
| 781 |
+
825,
|
| 782 |
+
637
|
| 783 |
+
],
|
| 784 |
+
"page_idx": 8
|
| 785 |
+
},
|
| 786 |
+
{
|
| 787 |
+
"type": "text",
|
| 788 |
+
"text": "4.6 Effectiveness of Regularization ",
|
| 789 |
+
"text_level": 1,
|
| 790 |
+
"bbox": [
|
| 791 |
+
176,
|
| 792 |
+
654,
|
| 793 |
+
428,
|
| 794 |
+
669
|
| 795 |
+
],
|
| 796 |
+
"page_idx": 8
|
| 797 |
+
},
|
| 798 |
+
{
|
| 799 |
+
"type": "text",
|
| 800 |
+
"text": "We further explore the effectiveness of regularization for the proposed Transformer-based generator. Note that different from the recent interest in training GANs in the few-shot scenarios [26, 76], we study the influence of regularization for ConvNet-based and Transformer-based generators in the fulldata regime. We use the whole training set of FFHQ $2 5 6 \\times 2 5 6$ , and compare HiT-based variants with StyleGAN2 [26]. The regularization method is bCR [77]. As shown in Table 7, all variants of HiT achieve much larger margins of improvement than StyleGAN2. This confirms the finding [12, 23, 60] that Transformer-based architectures are much more data-hungry than ConvNets in both classification and generative modeling settings, and thus strong data augmentation and regularization techniques are crucial for training Transformer-based generators. ",
|
| 801 |
+
"bbox": [
|
| 802 |
+
173,
|
| 803 |
+
679,
|
| 804 |
+
825,
|
| 805 |
+
805
|
| 806 |
+
],
|
| 807 |
+
"page_idx": 8
|
| 808 |
+
},
|
| 809 |
+
{
|
| 810 |
+
"type": "text",
|
| 811 |
+
"text": "5 Conclusion ",
|
| 812 |
+
"text_level": 1,
|
| 813 |
+
"bbox": [
|
| 814 |
+
174,
|
| 815 |
+
823,
|
| 816 |
+
299,
|
| 817 |
+
840
|
| 818 |
+
],
|
| 819 |
+
"page_idx": 8
|
| 820 |
+
},
|
| 821 |
+
{
|
| 822 |
+
"type": "text",
|
| 823 |
+
"text": "We present HiT, a novel Transformer-based generator for high-resolution image generation based on GANs. To address the quadratic scaling problem of Transformers, we structure the low-resolution stages of HiT following the design of Nested Transformer and enhance it by the proposed multi-axis blocked self-attention. In order to handle extremely long inputs in the high-resolution stages, we drop self-attention operations and reduce the model into implicit functions. We further improve the model performance by introducing a cross-attention module which plays a role of self-modulation. Our experiments demonstrate that HiT achieves highly competitive performance for high-resolution image generation compared with its ConvNet-based counterparts. For future work, we will investigate Transformer-based architectures for discriminators in GANs and efficient regularization techniques for Transformer-based generators to synthesize ultra high-resolution images. ",
|
| 824 |
+
"bbox": [
|
| 825 |
+
174,
|
| 826 |
+
856,
|
| 827 |
+
823,
|
| 828 |
+
911
|
| 829 |
+
],
|
| 830 |
+
"page_idx": 8
|
| 831 |
+
},
|
| 832 |
+
{
|
| 833 |
+
"type": "table",
|
| 834 |
+
"img_path": "images/4f062a57aef369ecd49b6e05cc2c6ca10a58795e27b557b8c034fbbec5ec2aff.jpg",
|
| 835 |
+
"table_caption": [
|
| 836 |
+
"Table 6: Performance as a function of the number of self-attention stages on ImageNet $1 2 8 \\times 1 2 8$ The attention configuration is defined using the protocol $[ a , b ]$ , where $a$ and $b$ refer to the number of stages in the low-resolution and high-resolution stages of the model, respectively. "
|
| 837 |
+
],
|
| 838 |
+
"table_footnote": [],
|
| 839 |
+
"table_body": "<table><tr><td>Attention configuration</td><td>[0,5]</td><td>[1,4]</td><td>[2,3]</td><td>[3,2]</td><td>[4,1]</td></tr><tr><td>#params (million)</td><td>61.55</td><td>66.01</td><td>67.19</td><td>67.52</td><td>67.60</td></tr><tr><td>Throughput (images / sec)</td><td>82.67</td><td>80.88</td><td>80.22</td><td>78.06</td><td>75.33</td></tr><tr><td>FID↓</td><td>35.94</td><td>34.16</td><td>33.69</td><td>32.72</td><td>31.87</td></tr></table>",
|
| 840 |
+
"bbox": [
|
| 841 |
+
259,
|
| 842 |
+
137,
|
| 843 |
+
738,
|
| 844 |
+
208
|
| 845 |
+
],
|
| 846 |
+
"page_idx": 9
|
| 847 |
+
},
|
| 848 |
+
{
|
| 849 |
+
"type": "table",
|
| 850 |
+
"img_path": "images/6d19a9a0896fe5aca1d76df0f04192d94d50f4eba1f091f65da6e3709401ea19.jpg",
|
| 851 |
+
"table_caption": [
|
| 852 |
+
"Table 7: The effectiveness of bCR [77] on both StyleGAN2 and HiT-based variants. † indicates the results of StyleGAN2 are obtained from [26] which uses a lighter-weight configuration of [28]. "
|
| 853 |
+
],
|
| 854 |
+
"table_footnote": [],
|
| 855 |
+
"table_body": "<table><tr><td>+ bCR [77]</td><td>StyleGAN2 [28]†</td><td>HiT-S</td><td>HiT-B</td><td>HiT-L</td></tr><tr><td>X</td><td>5.28</td><td>6.07</td><td>5.30</td><td>5.13</td></tr><tr><td></td><td>3.91</td><td>3.06</td><td>2.95</td><td>2.58</td></tr><tr><td>△ FID</td><td>1.37</td><td>3.01</td><td>2.35</td><td>2.55</td></tr></table>",
|
| 856 |
+
"bbox": [
|
| 857 |
+
292,
|
| 858 |
+
258,
|
| 859 |
+
705,
|
| 860 |
+
338
|
| 861 |
+
],
|
| 862 |
+
"page_idx": 9
|
| 863 |
+
},
|
| 864 |
+
{
|
| 865 |
+
"type": "text",
|
| 866 |
+
"text": "",
|
| 867 |
+
"bbox": [
|
| 868 |
+
173,
|
| 869 |
+
363,
|
| 870 |
+
825,
|
| 871 |
+
446
|
| 872 |
+
],
|
| 873 |
+
"page_idx": 9
|
| 874 |
+
},
|
| 875 |
+
{
|
| 876 |
+
"type": "text",
|
| 877 |
+
"text": "Ethics statement. We note that although this paper does not uniquely raise any new ethical challenges, image generation is a field with several ethical concerns worth acknowledging. For example, there are known issues around bias and fairness, either in the representation of generated images [39] or the implicit encoding of stereotypes [55]. Additionally, such algorithms are vulnerable to malicious use [5], mainly through the development of deepfakes and other generated media meant to deceive the public [67], or as an image denoising technique that could be used for privacy-invading surveillance or monitoring purposes. We also note that the synthetic image generation techniques have the potential to mitigate bias and privacy issues for data collection and annotation. However, such techniques could be misused to produce misleading information, and researchers should explore the techniques responsibly. ",
|
| 878 |
+
"bbox": [
|
| 879 |
+
173,
|
| 880 |
+
453,
|
| 881 |
+
825,
|
| 882 |
+
592
|
| 883 |
+
],
|
| 884 |
+
"page_idx": 9
|
| 885 |
+
},
|
| 886 |
+
{
|
| 887 |
+
"type": "text",
|
| 888 |
+
"text": "Acknowledgements ",
|
| 889 |
+
"text_level": 1,
|
| 890 |
+
"bbox": [
|
| 891 |
+
176,
|
| 892 |
+
611,
|
| 893 |
+
338,
|
| 894 |
+
628
|
| 895 |
+
],
|
| 896 |
+
"page_idx": 9
|
| 897 |
+
},
|
| 898 |
+
{
|
| 899 |
+
"type": "text",
|
| 900 |
+
"text": "We thank Chitwan Saharia, Jing Yu Koh, and Kevin Murphy for their feedback to the paper. We also thank Ashish Vaswani, Mohammad Taghi Saffar, and the Google Brain team for research discussions and technical assistance. This research has been partially funded by the following grants ARO MURI 805491, NSF IIS-1793883, NSF CNS-1747778, NSF IIS 1763523, DOD-ARO ACC-W911NF, NSF OIA-2040638 to Dimitris N. Metaxas. ",
|
| 901 |
+
"bbox": [
|
| 902 |
+
174,
|
| 903 |
+
642,
|
| 904 |
+
825,
|
| 905 |
+
712
|
| 906 |
+
],
|
| 907 |
+
"page_idx": 9
|
| 908 |
+
},
|
| 909 |
+
{
|
| 910 |
+
"type": "text",
|
| 911 |
+
"text": "References ",
|
| 912 |
+
"text_level": 1,
|
| 913 |
+
"bbox": [
|
| 914 |
+
174,
|
| 915 |
+
731,
|
| 916 |
+
266,
|
| 917 |
+
746
|
| 918 |
+
],
|
| 919 |
+
"page_idx": 9
|
| 920 |
+
},
|
| 921 |
+
{
|
| 922 |
+
"type": "text",
|
| 923 |
+
"text": "[1] Ivan Anokhin, Kirill Demochkin, Taras Khakhulin, Gleb Sterkin, Victor Lempitsky, and Denis Korzhenkov. Image generators with conditionally-independent pixel synthesis. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021. \n[2] Iz Beltagy, Matthew E Peters, and Arman Cohan. Longformer: The long-document transformer. arXiv preprint arXiv:2004.05150, 2020. \n[3] Tristan Bepler, Ellen D Zhong, Kotaro Kelley, Edward Brignole, and Bonnie Berger. Explicitly disentangling image content from translation and rotation with spatial-VAE. In Advances in Neural Information Processing Systems (NeurIPS), pages 15409–15419, 2019. \n[4] Andrew Brock, Jeff Donahue, and Karen Simonyan. Large scale GAN training for high fidelity natural image synthesis. In Proceedings of the International Conference on Learning Representations (ICLR), 2019. [5] Miles Brundage, Shahar Avin, Jack Clark, Helen Toner, Peter Eckersley, Ben Garfinkel, Allan Dafoe, Paul Scharre, Thomas Zeitzoff, Bobby Filar, et al. The malicious use of artificial intelligence: Forecasting, prevention, and mitigation. arXiv preprint arXiv:1802.07228, 2018. [6] Jiezhang Cao, Yawei Li, Kai Zhang, and Luc Van Gool. Video Super-Resolution Transformer. arXiv preprint arXiv:2106.06847, 2021. [7] Chun-Fu Chen, Quanfu Fan, and Rameswar Panda. CrossViT: Cross-attention multi-scale vision transformer for image classification. arXiv preprint arXiv:2103.14899, 2021. \n[8] Ting Chen, Mario Lucic, Neil Houlsby, and Sylvain Gelly. On self modulation for generative adversarial networks. In Proceedings of the International Conference on Learning Representations (ICLR), 2019. [9] Ting Chen, Xiaohua Zhai, Marvin Ritter, Mario Lucic, and Neil Houlsby. Self-supervised GANs via auxiliary rotation loss. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 12154–12163, 2019. \n[10] Adam Coates, Andrew Ng, and Honglak Lee. An analysis of single-layer networks in unsupervised feature learning. In Proceedings of the International Conference on Artificial Intelligence and Statistics (AISTATS), pages 215–223, 2011. \n[11] Jeff Donahue and Karen Simonyan. Large scale adversarial representation learning. In Advances in Neural Information Processing Systems (NeurIPS), 2019. \n[12] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. In Proceedings of the International Conference on Learning Representations (ICLR), 2021. \n[13] Emilien Dupont, Yee Whye Teh, and Arnaud Doucet. Generative models as distributions of functions. arXiv preprint arXiv:2102.04776, 2021. \n[14] Patrick Esser, Robin Rombach, and Björn Ommer. Taming transformers for high-resolution image synthesis. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021. \n[15] Ian J 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 (NeurIPS), 2014. \n[16] Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. GANs trained by a two time-scale update rule converge to a local nash equilibrium. In Advances in Neural Information Processing Systems (NeurIPS), pages 6629–6640, 2017. \n[17] Jonathan Ho, Nal Kalchbrenner, Dirk Weissenborn, and Tim Salimans. Axial attention in multidimensional transformers. arXiv preprint arXiv:1912.12180, 2019. \n[18] Quan Hoang, Tu Dinh Nguyen, Trung Le, and Dinh Phung. MGAN: Training generative adversarial nets with multiple generators. In Proceedings of the International Conference on Learning Representations (ICLR), 2018. \n[19] Xun Huang and Serge Belongie. Arbitrary style transfer in real-time with adaptive instance normalization. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 1501–1510, 2017. \n[20] Zilong Huang, Xinggang Wang, Lichao Huang, Chang Huang, Yunchao Wei, and Wenyu Liu. CCNet: Criss-cross attention for semantic segmentation. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 603–612, 2019. \n[21] Drew A Hudson and C Lawrence Zitnick. Generative adversarial transformers. In Proceedings of the International Conference on Machine Learning (ICML), 2021. \n[22] Andrew Jaegle, Felix Gimeno, Andrew Brock, Andrew Zisserman, Oriol Vinyals, and Joao Carreira. Perceiver: General perception with iterative attention. arXiv preprint arXiv:2103.03206, 2021. \n[23] Yifan Jiang, Shiyu Chang, and Zhangyang Wang. TransGAN: Two transformers can make one strong GAN. arXiv preprint arXiv:2102.07074, 2021. \n[24] Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and superresolution. In Proceedings of the European Conference on Computer Vision (ECCV), pages 694–711, 2016. \n[25] Tero Karras, Timo Aila, Samuli Laine, and Jaakko Lehtinen. Progressive growing of GANs for improved quality, stability, and variation. In Proceedings of the International Conference on Learning Representations (ICLR), 2018. \n[26] Tero Karras, Miika Aittala, Janne Hellsten, Samuli Laine, Jaakko Lehtinen, and Timo Aila. Training generative adversarial networks with limited data. In Advances in Neural Information Processing Systems (NeurIPS), 2020. \n[27] Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 4401–4410, 2019. \n[28] Tero Karras, Samuli Laine, Miika Aittala, Janne Hellsten, Jaakko Lehtinen, and Timo Aila. Analyzing and improving the image quality of StyleGAN. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 8110–8119, 2020. \n[29] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Proceedings of the International Conference on Learning Representations (ICLR), 2014. \n[30] Marian Kleineberg, Matthias Fey, and Frank Weichert. Adversarial generation of continuous implicit shape representations. In Eurographics, 2020. \n[31] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images, 2009. \n[32] Kwonjoon Lee, Huiwen Chang, Lu Jiang, Han Zhang, Zhuowen Tu, and Ce Liu. ViTGAN: Training GANs with Vision Transformers. arXiv preprint arXiv:2107.04589, 2021. \n[33] Chieh Hubert Lin, Chia-Che Chang, Yu-Sheng Chen, Da-Cheng Juan, Wei Wei, and Hwann-Tzong Chen. COCO-GAN: Generation by Parts via Conditional Coordinating. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 4512–4521, 2019. \n[34] Chieh Hubert Lin, Hsin-Ying Lee, Yen-Chi Cheng, Sergey Tulyakov, and Ming-Hsuan Yang. InfinityGAN: Towards infinite-resolution image synthesis. arXiv preprint arXiv:2104.03963, 2021. \n[35] Zinan Lin, Ashish Khetan, Giulia Fanti, and Sewoong Oh. PacGAN: The power of two samples in generative adversarial networks. In Advances in Neural Information Processing Systems (NeurIPS), 2018. \n[36] Steven Liu, Tongzhou Wang, David Bau, Jun-Yan Zhu, and Antonio Torralba. Diverse image generation via self-conditioned GANs. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 14286–14295, 2020. \n[37] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. arXiv preprint arXiv:2103.14030, 2021. \n[38] Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep learning face attributes in the wild. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), 2015. \n[39] Sachit Menon, Alexandru Damian, Shijia Hu, Nikhil Ravi, and Cynthia Rudin. PULSE: Self-supervised photo upsampling via latent space exploration of generative models. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2437–2445, 2020. \n[40] Lars Mescheder, Andreas Geiger, and Sebastian Nowozin. Which training methods for GANs do actually converge? In Proceedings of the International Conference on Machine Learning (ICML), pages 3481–3490, 2018. \n[41] Lars Mescheder, Michael Oechsle, Michael Niemeyer, Sebastian Nowozin, and Andreas Geiger. Occupancy networks: Learning 3D reconstruction in function space. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 4460–4470, 2019. \n[42] Ben Mildenhall, Pratul P Srinivasan, Matthew Tancik, Jonathan T Barron, Ravi Ramamoorthi, and Ren Ng. NeRF: Representing scenes as neural radiance fields for view synthesis. In Proceedings of the European Conference on Computer Vision (ECCV), pages 405–421, 2020. \n[43] Jeong Joon Park, Peter Florence, Julian Straub, Richard Newcombe, and Steven Lovegrove. DeepSDF: Learning continuous signed distance functions for shape representation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 165–174, 2019. \n[44] Niki Parmar, Ashish Vaswani, Jakob Uszkoreit, Lukasz Kaiser, Noam Shazeer, Alexander Ku, and Dustin Tran. Image transformer. In Proceedings of the International Conference on Machine Learning (ICML), pages 4055–4064, 2018. \n[45] Stanislav Pidhorskyi, Donald A Adjeroh, and Gianfranco Doretto. Adversarial latent autoencoders. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 14104–14113, 2020. \n[46] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. arXiv preprint arXiv:2103.00020, 2021. \n[47] Aditya Ramesh, Mikhail Pavlov, Gabriel Goh, Scott Gray, Chelsea Voss, Alec Radford, Mark Chen, and Ilya Sutskever. Zero-shot text-to-image generation. arXiv preprint arXiv:2102.12092, 2021. \n[48] Ali Razavi, Aaron van den Oord, and Oriol Vinyals. Generating diverse high-fidelity images with VQVAE-2. In Advances in Neural Information Processing Systems (NeurIPS), 2019. \n[49] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. ImageNet large scale visual recognition challenge. International Journal of Computer Vision, 115(3):211–252, 2015. \n[50] Alexander Sage, Eirikur Agustsson, Radu Timofte, and Luc Van Gool. Logo synthesis and manipulation with clustered generative adversarial networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 5879–5888, 2018. \n[51] Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, Xi Chen, and Xi Chen. Improved techniques for training GANs. In Advances in Neural Information Processing Systems (NeurIPS), 2016. \n[52] Edgar Schonfeld, Bernt Schiele, and Anna Khoreva. A U-Net Based Discriminator for Generative Adversarial Networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 8207–8216, 2020. \n[53] Wenzhe Shi, Jose Caballero, Ferenc Huszár, Johannes Totz, Andrew P Aitken, Rob Bishop, Daniel Rueckert, and Zehan Wang. Real-time single image and video super-resolution using an efficient sub-pixel convolutional neural network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1874–1883, 2016. \n[54] Ivan Skorokhodov, Savva Ignatyev, and Mohamed Elhoseiny. Adversarial generation of continuous images. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021. \n[55] Ryan Steed and Aylin Caliskan. Image representations learned with unsupervised pre-training contain human-like biases. In Proceedings of the 2021 ACM Conference on Fairness, Accountability, and Transparency, pages 701–713, 2021. \n[56] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2818–2826, 2016. \n[57] Yu Tian, Xi Peng, Long Zhao, Shaoting Zhang, and Dimitris N Metaxas. CR-GAN: Learning complete representations for multi-view generation. In Proceedings of the International Joint Conference on Artificial Intelligence (IJCAI), pages 942–948, 2018. \n[58] Ilya Tolstikhin, Neil Houlsby, Alexander Kolesnikov, Lucas Beyer, Xiaohua Zhai, Thomas Unterthiner, Jessica Yung, Daniel Keysers, Jakob Uszkoreit, Mario Lucic, et al. MLP-Mixer: An all-MLP Architecture for Vision. arXiv preprint arXiv:2105.01601, 2021. \n[59] Hugo Touvron, Piotr Bojanowski, Mathilde Caron, Matthieu Cord, Alaaeldin El-Nouby, Edouard Grave, Armand Joulin, Gabriel Synnaeve, Jakob Verbeek, and Hervé Jégou. ResMLP: Feedforward networks for image classification with data-efficient training. arXiv preprint arXiv:2105.03404, 2021. \n[60] Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Hervé Jégou. Training data-efficient image transformers & distillation through attention. arXiv preprint arXiv:2012.12877, 2020. \n[61] Aaron van den Oord, Oriol Vinyals, and Koray Kavukcuoglu. Neural discrete representation learning. In Advances in Neural Information Processing Systems (NeurIPS), pages 6309–6318, 2017. \n[62] Ashish Vaswani, Prajit Ramachandran, Aravind Srinivas, Niki Parmar, Blake Hechtman, and Jonathon Shlens. Scaling local self-attention for parameter efficient visual backbones. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021. \n[63] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems (NeurIPS), pages 6000–6010, 2017. \n[64] Huiyu Wang, Yukun Zhu, Hartwig Adam, Alan Yuille, and Liang-Chieh Chen. MaX-DeepLab: End-to-end panoptic segmentation with mask transformers. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021. \n[65] Huiyu Wang, Yukun Zhu, Bradley Green, Hartwig Adam, Alan Yuille, and Liang-Chieh Chen. AxialDeepLab: Stand-alone axial-attention for panoptic segmentation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 108–126, 2020. \n[66] Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 7794– 7803, 2018. \n[67] Mika Westerlund. The emergence of deepfake technology: A review. Technology Innovation Management Review, 9(11), 2019. \n[68] Zhisheng Xiao, Karsten Kreis, Jan Kautz, and Arash Vahdat. VAEBM: A Symbiosis between Variational Autoencoders and Energy-based Models. In Proceedings of the International Conference on Learning Representations (ICLR), 2021. \n[69] Han Zhang, Ian Goodfellow, Dimitris Metaxas, and Augustus Odena. Self-attention generative adversarial networks. In Proceedings of the International Conference on Machine Learning (ICML), pages 7354–7363, 2019. \n[70] Han Zhang, Jing Yu Koh, Jason Baldridge, Honglak Lee, and Yinfei Yang. Cross-modal contrastive learning for text-to-image generation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021. \n[71] Han Zhang, Tao Xu, Hongsheng Li, Shaoting Zhang, Xiaogang Wang, Xiaolei Huang, and Dimitris N Metaxas. StackGAN: Text to photo-realistic image synthesis with stacked generative adversarial networks. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 5907–5915, 2017. \n[72] Han Zhang, Zizhao Zhang, Augustus Odena, and Honglak Lee. Consistency regularization for generative adversarial networks. In Proceedings of the International Conference on Learning Representations (ICLR), 2020. \n[73] Zizhao Zhang, Han Zhang, Long Zhao, Ting Chen, and Tomas Pfister. Aggregating nested transformers. arXiv preprint arXiv:2105.12723, 2021. \n[74] Long Zhao, Xi Peng, Yu Tian, Mubbasir Kapadia, and Dimitris Metaxas. Learning to forecast and refine residual motion for image-to-video generation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 387–403, 2018. \n[75] Long Zhao, Xi Peng, Yu Tian, Mubbasir Kapadia, and Dimitris N Metaxas. Towards image-to-video translation: A structure-aware approach via multi-stage generative adversarial networks. International Journal of Computer Vision, 128(10):2514–2533, 2020. \n[76] Shengyu Zhao, Zhijian Liu, Ji Lin, Jun-Yan Zhu, and Song Han. Differentiable augmentation for dataefficient gan training. In Advances in Neural Information Processing Systems (NeurIPS), 2020. \n[77] Zhengli Zhao, Sameer Singh, Honglak Lee, Zizhao Zhang, Augustus Odena, and Han Zhang. Improved consistency regularization for GANs. In Proceedings of the AAAI Conference on Artificial Intelligence (AAAI), 2021. \n[78] Jiapeng Zhu, Yujun Shen, Deli Zhao, and Bolei Zhou. In-domain GAN inversion for real image editing. In Proceedings of the European Conference on Computer Vision (ECCV), pages 592–608, 2020. \n[79] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 2223–2232, 2017. ",
|
| 924 |
+
"bbox": [
|
| 925 |
+
179,
|
| 926 |
+
756,
|
| 927 |
+
826,
|
| 928 |
+
910
|
| 929 |
+
],
|
| 930 |
+
"page_idx": 9
|
| 931 |
+
},
|
| 932 |
+
{
|
| 933 |
+
"type": "text",
|
| 934 |
+
"text": "",
|
| 935 |
+
"bbox": [
|
| 936 |
+
171,
|
| 937 |
+
65,
|
| 938 |
+
828,
|
| 939 |
+
917
|
| 940 |
+
],
|
| 941 |
+
"page_idx": 10
|
| 942 |
+
},
|
| 943 |
+
{
|
| 944 |
+
"type": "text",
|
| 945 |
+
"text": "",
|
| 946 |
+
"bbox": [
|
| 947 |
+
171,
|
| 948 |
+
87,
|
| 949 |
+
828,
|
| 950 |
+
917
|
| 951 |
+
],
|
| 952 |
+
"page_idx": 11
|
| 953 |
+
},
|
| 954 |
+
{
|
| 955 |
+
"type": "text",
|
| 956 |
+
"text": "",
|
| 957 |
+
"bbox": [
|
| 958 |
+
171,
|
| 959 |
+
65,
|
| 960 |
+
828,
|
| 961 |
+
917
|
| 962 |
+
],
|
| 963 |
+
"page_idx": 12
|
| 964 |
+
},
|
| 965 |
+
{
|
| 966 |
+
"type": "text",
|
| 967 |
+
"text": "",
|
| 968 |
+
"bbox": [
|
| 969 |
+
171,
|
| 970 |
+
90,
|
| 971 |
+
828,
|
| 972 |
+
523
|
| 973 |
+
],
|
| 974 |
+
"page_idx": 13
|
| 975 |
+
}
|
| 976 |
+
]
|
parse/train/zmbiQmdtg9/zmbiQmdtg9_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/zmbiQmdtg9/zmbiQmdtg9_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|