Datasets:
Add files using upload-large-folder tool
Browse files- parse/train/-b5OSCydOMe/-b5OSCydOMe.md +286 -0
- parse/train/-b5OSCydOMe/-b5OSCydOMe_content_list.json +1407 -0
- parse/train/-b5OSCydOMe/-b5OSCydOMe_middle.json +0 -0
- parse/train/-b5OSCydOMe/-b5OSCydOMe_model.json +0 -0
- parse/train/BJedHRVtPB/BJedHRVtPB.md +451 -0
- parse/train/BJedHRVtPB/BJedHRVtPB_content_list.json +0 -0
- parse/train/BJedHRVtPB/BJedHRVtPB_middle.json +0 -0
- parse/train/BJedHRVtPB/BJedHRVtPB_model.json +0 -0
- parse/train/HyBbjW-RW/HyBbjW-RW.md +238 -0
- parse/train/HyBbjW-RW/HyBbjW-RW_content_list.json +1241 -0
- parse/train/HyBbjW-RW/HyBbjW-RW_middle.json +0 -0
- parse/train/HyBbjW-RW/HyBbjW-RW_model.json +0 -0
- parse/train/rC8sJ4i6kaH/rC8sJ4i6kaH.md +0 -0
- parse/train/rC8sJ4i6kaH/rC8sJ4i6kaH_content_list.json +0 -0
- parse/train/rC8sJ4i6kaH/rC8sJ4i6kaH_middle.json +0 -0
- parse/train/rC8sJ4i6kaH/rC8sJ4i6kaH_model.json +0 -0
- parse/train/rJeIGkBKPS/rJeIGkBKPS.md +293 -0
- parse/train/rJeIGkBKPS/rJeIGkBKPS_content_list.json +1677 -0
- parse/train/rJeIGkBKPS/rJeIGkBKPS_middle.json +0 -0
- parse/train/rJeIGkBKPS/rJeIGkBKPS_model.json +0 -0
parse/train/-b5OSCydOMe/-b5OSCydOMe.md
ADDED
|
@@ -0,0 +1,286 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Sparse is Enough in Scaling Transformers
|
| 2 |
+
|
| 3 |
+
Sebastian Jaszczur∗ University of Warsaw
|
| 4 |
+
|
| 5 |
+
Aakanksha Chowdhery Google Research
|
| 6 |
+
|
| 7 |
+
Afroz Mohiuddin Google Research
|
| 8 |
+
|
| 9 |
+
Łukasz Kaiser∗ OpenAI
|
| 10 |
+
|
| 11 |
+
Wojciech Gajewski Google Research
|
| 12 |
+
|
| 13 |
+
Henryk Michalewski Google Research
|
| 14 |
+
|
| 15 |
+
Jonni Kanerva Google Research
|
| 16 |
+
|
| 17 |
+
# Abstract
|
| 18 |
+
|
| 19 |
+
Large Transformer models yield impressive results on many tasks, but are expensive to train, or even fine-tune, and so slow at decoding that their use and study becomes out of reach. We address this problem by leveraging sparsity. We study sparse variants for all layers in the Transformer and propose Scaling Transformers, a family of next generation Transformer models that use sparse layers to scale efficiently and perform unbatched decoding much faster than the standard Transformer as we scale up the model size. Surprisingly, the sparse layers are enough to obtain the same perplexity as the standard Transformer with the same number of parameters. We also integrate with prior sparsity approaches to attention and enable fast inference on long sequences even with limited memory. This results in performance competitive to the state-of-the-art on long text summarization.
|
| 20 |
+
|
| 21 |
+
# 1 Introduction
|
| 22 |
+
|
| 23 |
+
The field of natural language processing has seen dramatic improvements in recent years due to large neural networks based on the Transformer architecture. The original Transformer [42] significantly advanced state-of-the-art in machine translation. BERT [7] surpassed all previous methods on question answering, language inference and other NLP tasks and was followed by a line of models like T5 [30] that further improved these results. The GPT line of models [29, 3] elevated language generation to the point that GPT-2 was invited to write short passages for the Economist and GPT-3 created whole articles almost indistinguishable from human-written ones.
|
| 24 |
+
|
| 25 |
+
The benefits of this progress are undercut by the huge costs such models incur. Strubell et al. [36] estimate that training a single base BERT model costs $\$ 4 k -\$ 12 k$ and emits as much $\mathrm { C O _ { 2 } }$ as one passenger’s share of a 4-hour flight and later Patterson et al. [27] estimate that training GPT-3 has three times as much $\mathrm { t C O _ { 2 } e }$ (metric tons of $\mathrm { C O _ { 2 } }$ equivalent) emissions as a SF-NY round trip flight. Data and serving costs are also forbidding: a single training run of BERT, for example, processes 128B tokens, and Google Translate reportedly1 serves over 143B words per day.
|
| 26 |
+
|
| 27 |
+
With the growing popularity and size of these models, it is increasingly valuable to make them scale efficiently. In this work we propose Scaling Transformers with a separate sparse mechanism for the query, key, value and output layers (QKV layers for short) and combine it with sparse feedforward blocks to get a fully sparse Transformer architecture.
|
| 28 |
+
|
| 29 |
+
To quantify the computational complexity of inference in Transformer models, recall the architecture of a Transformer decoder block. It consists of three parts: a masked self-attention layer, an encoderdecoder attention layer and a feedforward block. The sizes of these layers are parameterized by $d _ { \mathrm { m o d e l } }$ and $d _ { \mathrm { f f } }$ . The base BERT model sets $d _ { \mathrm { m o d e l } } = 7 6 8$ , the large BERT has $d _ { \mathrm { m o d e l } } = 1 0 2 4$ , the largest
|
| 30 |
+
|
| 31 |
+
Table 1: Decoding speed (in seconds) of a single token. For Transformer model (equivalent to T5 large with approximately 800M parameters), Scaling Transformers with proposed sparsity mechanisms $( F F { + } Q K V )$ achieve up to $2 x$ speedup in decoding compared to baseline dense model and 20x speedup for $I 7 B$ param model.
|
| 32 |
+
|
| 33 |
+
<table><tr><td></td><td>Params</td><td>Dec. time</td><td>Dec.time per block</td></tr><tr><td>baseline Transf.</td><td>800M</td><td>0.160s</td><td>5.9ms</td></tr><tr><td>+ Sparse FF</td><td></td><td>0.093s</td><td>3.1ms</td></tr><tr><td>+ Sparse QKV</td><td></td><td>0.152s</td><td>6.2ms</td></tr><tr><td>+ Sparse FF+QKV</td><td></td><td>0.061s</td><td>1.9ms</td></tr><tr><td>Speedup</td><td></td><td>2.62x</td><td>3.05x</td></tr><tr><td>baseline Transf.</td><td>17B</td><td>3.690s</td><td>0.581s</td></tr><tr><td>+Sparse FF</td><td>■</td><td>1.595s</td><td>0.259s</td></tr><tr><td>+Sparse QKV</td><td></td><td>3.154s</td><td>0.554s</td></tr><tr><td>+Sparse FF+QKV</td><td>=</td><td>0.183s</td><td>0.014s</td></tr><tr><td>Speedup</td><td></td><td>20.0x</td><td>42.5x</td></tr></table>
|
| 34 |
+
|
| 35 |
+

|
| 36 |
+
Figure 1: Log-perplexity of Scaling Transformers (equivalent to T5 large with approximately 800M parameters) on $C 4$ dataset with proposed sparsity mechanisms (FF, QKV, $F F { + } Q K V )$ is similar to baseline dense model. Other models used in this paper are shown in grey lines; raw data is available in the appendix.
|
| 37 |
+
|
| 38 |
+
GPT-2 has $d _ { \mathrm { m o d e l } } = 1 6 0 0$ and GPT-3 reaches $d _ { \mathrm { m o d e l } } = 1 2 2 8 8$ . For both BERT and GPT models the authors use $d _ { \mathrm { f f } } = 4 d _ { \mathrm { m o d e l } }$ . While decoding a token, the self-attention layer needs to activate four matrices of size $d _ { \mathrm { m o d e l } } \times d _ { \mathrm { m o d e l } }$ : one each for the queries, keys and values input to the attention and one for merging the output. In the encoder-decoder attention, the keys and values may already be cached, so only two matrices of size $d _ { \mathrm { m o d e l } } \times d _ { \mathrm { m o d e l } }$ are activated. The feedforward block consists of twoup to: a sing $4 d _ { \mathrm { m o d e l } } ^ { 2 } + 2 d _ { \mathrm { m o d e l } } ^ { 2 } + 2 d _ { \mathrm { m o d e l } } d _ { \mathrm { f f } }$ $d _ { \mathrm { m o d e l } } \times d _ { \mathrm { f f } }$ mitting small additional contribution of biases. The total adds. This sum describes both the number of trainable weights of the number of floating-point operations needed for decoding a single token, except for the attention operations (discussed later). The complexity is quadratic in $d _ { \mathrm { m o d e l } }$ ; for example, as $d _ { \mathrm { m o d e l } }$ increases 16-fold from base BERT to GPT-3, the complexity of a single block grows 256-fold.
|
| 39 |
+
|
| 40 |
+
In comparison Scaling Transformers use only $2 d _ { \mathrm { m o d e l } } \sqrt { d _ { \mathrm { m o d e l } } } = 2 d _ { \mathrm { m o d e l } } ^ { 1 . 5 }$ parameters in QKV layers and yield results as good as the baseline (fully dense) Transformer with the same number of parameters and complexity: $\mathrm { \bar { 8 } } d _ { \mathrm { m o d e l } } ^ { 1 . 5 } + 4 d _ { \mathrm { m o d e l } } ^ { 1 . 5 } + 4 \dot { d } _ { \mathrm { m o d e l } } ^ { 1 . 5 }$ . We were surprised that the fully sparse Scaling Transformers are indeed enough to match the results of the baseline Transformer on the large C4 dataset [30] (Figure 1). The improvement in complexity holds not just asymptotically but yields over $2 . 6 \mathbf { x }$ speedup in wall-clock hed decoding time already for a model with 800M parameters and $2 0 \mathrm { x }$ improvement for a model with 17B parameters, as shown in Table 1.
|
| 41 |
+
|
| 42 |
+
To verify that Scaling Transformers can be used with other Transformer improvements on real tasks, we create Terraformer – a Transformer model that uses reversible layers for memory efficiency and sparse attention to handle long sequences. We pre-train Terraformer on the C4 dataset and fine-tune it on the challenging task of summarizing arxiv articles. Terraformer yields results competitive to the state-of-the-art BigBird-Pegasus without using the Pegasus loss in pre-training (Table 5).
|
| 43 |
+
|
| 44 |
+
# 2 Related Work
|
| 45 |
+
|
| 46 |
+
As discussed in the previous section, large Transformer models brings significant improvements in performance, as seen in models such as GPT-3 [3, 17] or T5 [44, 30]. Training and inference incur a high computational cost at the scale of hundreds of billions of parameters. Numerous techniques improve the efficiency of Transformer models, and Gupta and Agrawal [11] divide them into several classes, including pruning, knowledge distillation, quantization, parameter sharing, efficient attention, and efficient feedforward.
|
| 47 |
+
|
| 48 |
+
Model compression. Model pruning [24, 2] makes matrices smaller by removing unneeded weights after or during training, however, the gains in computational complexity on sparse matrices often do not result in inference speedups on actual hardware [9]. Structured pruning based approaches [47, 22, 43] account for this challenge by leveraging sparsity in hardware in CPU and GPU architectures [1]. Our paper is different from pruning approaches in that it relies on dynamic sparsity wherein the feedforward layer loads only a subset of weights in the layer for each token. Our approach is complementary to model quantization studies [35, 38, 28] that use fewer bits for the weights.
|
| 49 |
+
|
| 50 |
+
Model distillation. Several natural language models used for mobile inference [13, 39] rely on distillation [32] to speed up inference from the pretrained large models. For example, [18] pretrains a large model and uses knowledge distillation along with pruning to get more than 10x faster inference. Instead of distilling a large model, our approach speeds up inference by reducing the number of weights loaded in memory from the model.
|
| 51 |
+
|
| 52 |
+
Sparse attention. Sparse attention-based approaches have made the attention layer more efficient, especially for long sequences, by incorporating additional combinatorial mechanisms, as in [40], or selecting a subset of tokens this layer attends to [31, 5, 19, 37, 15, 4] or other approaches [12]. Our work is complementary to these approaches for sparse attention and reuses the advances on SOTA therein. Inference speedups in the attention layers also use bottleneck layers [39] or grouped convolutions [13]. Our work extends beyond the idea of grouped convolutions approach because each attention head is limited to using only a fixed part of the embedding while our work is able to permute the embeddings to improve model quality; see Section 3.2 for details.
|
| 53 |
+
|
| 54 |
+
Tensor Decomposition. The approaches discussed above significantly improve Transformer speed and handling of long sequences, however none of them addresses the fundamental scaling issue: even if we distill into a smaller model, quantize it and prune a percentage of the weights, the complexity still grows quadratically with $d _ { \mathrm { m o d e l } }$ . The final approach, which does attack this scaling issue, is called tensor decompositions in [11]. Unluckily, as the authors there note, the approach is most effective in dealing with large input and output embedding matrices and tends to produce lower performance than unstructured models if used inside the decoder block.
|
| 55 |
+
|
| 56 |
+
Sparse feedforward. Mixture of experts approaches have been shown to achieve computational efficiency in training [33, 21, 34], scaling up to a trillion parameters [8]. The key idea is to partition the $d _ { \mathrm { f f } }$ -sized dimension into parts (called experts) and retrieve only one part per token, which reduces the complexity of the feedforward block from $2 d _ { \mathrm { m o d e l } } d _ { \mathrm { f f } }$ to $2 d _ { \mathrm { m o d e l } } d _ { \mathrm { f f } } / n _ { \mathrm { e x p e r t s } }$ . These speedups are mostly measured in training speed, and the method focuses on feedforward blocks. In contrast to prior methods, we train a full weight matrix and then only activate specific parts of it for each input token during decoding; see Section 3.1.
|
| 57 |
+
|
| 58 |
+
# 3 Sparse is Enough
|
| 59 |
+
|
| 60 |
+
We study how to sparsify every part of the Transformer model—otherwise the non-sparse parts dominate decoding time and become a bottleneck. This means we need sparse equivalents for the feedforward blocks, for the dense Q, K, V and output layers in attention, and for the final dense layer before the softmax and loss.
|
| 61 |
+
|
| 62 |
+
# 3.1 Sparse Feedforward Layer
|
| 63 |
+
|
| 64 |
+
In a baseline Transformer, decoding speed is dominated by the execution cost of the feedforward block. Recall that this block consists of two fully-connected (dense) layers with a ReLU nonlinearity in between. The dimensionality of activation vectors between these 2 layers is usually denoted by $d _ { \mathrm { f f } }$ and is often 4 or 8 times larger than the dimensionality of the activations in other places $[ d _ { \mathrm { m o d e l } } ]$ ).
|
| 65 |
+
|
| 66 |
+
We make use of the structure of the feedforward block to sparsify it. One main observation is that the ReLU in the middle creates a lot of zeros2. We impose a fixed structure on this middle activation vector: only one float in every block of $N$ will be allowed to be non-zero. Prior techniques prune weights or blocks from weight matrices and can be referred to as static sparsity. Our proposed technique will train a full weight matrix but only activate specific parts of it for each input token during decoding. We call this dynamic sparsity, because the model dynamically selects only a fraction of its parameters, and the selection is independent for each token.
|
| 67 |
+
|
| 68 |
+

|
| 69 |
+
Figure 2: (a) Sparse Feedforward Layer only activates 1 in N rows/columns of each block to reduce the decoding time. Here only two rows/colums in blocks of size 4 are loaded while the weights in dark red are not loaded from memory during inference. (b) Sparse Feedforward Controller with the output of 2 blocks of size 4 (1 in 4 sparsity).
|
| 70 |
+
|
| 71 |
+
We train a controller to determine which activation in each block can be non-zero; the rest will be set to zero. This can be represented as
|
| 72 |
+
|
| 73 |
+
$$
|
| 74 |
+
\begin{array} { c } { Y _ { \mathrm { s p a r s e } } = \operatorname* { m a x } ( 0 , x W _ { 1 } + b _ { 1 } ) \odot \mathrm { C o n t r o l l e r } ( x ) } \\ { \mathrm { S p a r s e F F N } ( x ) = Y _ { \mathrm { s p a r s e } } W _ { 2 } + b _ { 2 } } \end{array}
|
| 75 |
+
$$
|
| 76 |
+
|
| 77 |
+
where $\odot$ is element-wise multiplication. Note that each activation in $Y _ { \mathrm { s p a r s e } }$ corresponds to a single column in $W _ { 1 }$ and a single row in $W _ { 2 }$ . Therefore, if we compute Controller $( x )$ output first, we don’t have to use any columns in $W _ { 1 }$ or any rows in $W _ { 2 }$ that correspond to an activation set to zero by the controller. This allows for much faster decoding, as we have to process only 1 in $N$ columns in $W _ { 1 }$ and rows in $W _ { 2 }$ (see Figure 2(a)).
|
| 78 |
+
|
| 79 |
+
To design the controller to be computationally inexpensive, we project the input using a low-rank bottleneck dense layer. Figure 2(b) illustrates the controller which produces the output as follows
|
| 80 |
+
|
| 81 |
+
$$
|
| 82 |
+
\operatorname { C o n t r o l l e r } ( x ) = \arg \operatorname* { m a x } ( \operatorname { R e s h a p e } ( x C _ { 1 } C _ { 2 } , ( - 1 , N ) ) )
|
| 83 |
+
$$
|
| 84 |
+
|
| 85 |
+
where $C _ { 1 } \in \mathbb { R } ^ { d _ { \mathrm { m o d e l } } \times d _ { \mathrm { l o w r a n k } } }$ and $C _ { 2 } \in \mathbb { R } ^ { d _ { \mathrm { l o w r a n k } } \times d _ { \mathrm { f f } } }$ , with $d _ { \mathrm { l o w r a n k } }$ usually set to $( d _ { \mathrm { m o d e l } } / N )$
|
| 86 |
+
|
| 87 |
+
During inference the controller uses a discrete argmax function, but during training the model uses a softmax to calculate and sample from a distribution. The model learns to select which row/column will be non-zero using the Gumbel-Softmax trick for discretization. To determine the active row/column in each block, we reparameterize sampling from a Bernoulli distribution by using the Gumbel-Softmax trick [25]. Instead of using the logits in each block to directly sample a binary value, we add independent noise from the Gumbel distribution to each of the logits, and then select the binary value with the highest logit (i.e., argmax) as the sample $z$ . The argmax operation is not differentiable, but it can be approximated by a softmax with annealing temperature. Therefore, on the forward pass, we use the argmax to obtain a binary one-hot vector for each block, while on the backward pass, we approximate it with softmax. This approach is known as the Straight-Through Gumbel-Softmax estimator [14].
|
| 88 |
+
|
| 89 |
+
Ablations. We investigate the impact of sparse FF on the model equivalent to T5-large with varying levels of sparsity, with $d _ { \mathrm { m o d e l } } = 1 0 2 4$ , $d _ { \mathrm { f f } } = 4 0 9 6$ , and 16 attention heads. When we set the sparsity level to $N$ (for e.g. $N = 6 4 ,$ ) then every block of size $N$ has one non-zero value activated for inference. During training, the controller uses the bottleneck layer with $d _ { \mathrm { l o w r a n k } } = 6 4$ and temperature of Gumbel softmax estimator set to 0.1. To improve training stability, the controller in the forward pass will use the output of argmax that is a binary one-hot vector for each block with a probability of $30 \%$ and otherwise it uses the output of softmax. Table 2 and Figure 3 show the perplexity and the decoding time of this model with varying levels of sparsity in feedforward layer. As the level of sparsity increases from 0 to 128, we observe a significant decrease in the decoding time, while the neg-log-perplexity of the model with $N = 6 4$ sparsity is comparable to the baseline.
|
| 90 |
+
|
| 91 |
+
Table 2: Decoding time of a singe token decreases with increasing level of sparsity in the FF layer.
|
| 92 |
+
|
| 93 |
+
<table><tr><td></td><td>Dec. time</td></tr><tr><td>baseline</td><td>0.160s</td></tr><tr><td>Sparse FF 64</td><td>0.093s</td></tr><tr><td>Sparse FF128</td><td>0.089s</td></tr></table>
|
| 94 |
+
|
| 95 |
+

|
| 96 |
+
Figure 3: Log-perplexity of Scaling Transformers with Sparse Feedforward layer is very similar to dense baseline for sparsity level $N = 6 4$ but degrades slightly for $N { = } I 2 8$ .
|
| 97 |
+
|
| 98 |
+
We also checked the performance of the feedforward block with Mixture-of-Experts [33] style sparsity. As expected, this technique achieved decoding time comparable to sparse FF – 0.11s instead of $0 . 0 9 s$ – but with its lack of granularity it achieved log-perplexity of 1.64, worse than both our method and the dense baseline.
|
| 99 |
+
|
| 100 |
+
# 3.2 Sparse QKV Layer
|
| 101 |
+
|
| 102 |
+
The decoding speed for a model with sparse feedforward blocks is dominated next by the query, key, value and output computation—the dense layers in attention, which we jointly call a QKV layer. Each of these dense layers has $d _ { \mathrm { m o d e l } } ^ { 2 }$ parameters and computation cost. Unfortunately, QKV layers don’t have ReLUs, so the method used above to sparsify feedforward blocks is not viable here.
|
| 103 |
+
|
| 104 |
+
To make QKV layers sparse, we subdivide the dimensionality of the layer, $d _ { \mathrm { m o d e l } }$ , into $S$ modules of size $M = d _ { \mathrm { m o d e l } } / S$ , similar to splitting an activation vector into multiple heads. These modules can be processed with a convolutional layer with fewer weights and faster computation. However, with na¨ıve design each module (and corresponding attention head) could access only a small part of a given token embedding. To alleviate that, we develop a multiplicative layer that can represent an arbitrary permutation and has fewer parameters and lower computation time than a dense layer. This multiplicative layer is inserted right before the convolutional layer, letting each head access any part of the embedding (see Figure 4(a)). This solution yields well-performing models that also decode fast.
|
| 105 |
+
|
| 106 |
+
Multiplicative dense layer. Our new multiplicative dense layer can represent an arbitrary permutation and has $d _ { \mathrm { m o d e l } } ^ { 2 } / S + \bar { d } _ { \mathrm { m o d e l } } S$ parameters, dependent on the sparsity hyperparameter $S$ . It processes an input vector $\mathbf { x } \in \mathbb { R } ^ { d _ { \mathrm { m o d e l } } }$ by splitting it into S “modules” of size $M = d _ { \mathrm { m o d e l } } / S$ . It produces output $\mathbf { y } \in \mathring { \mathbb { R } } ^ { S \times M }$ as follows
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\mathrm { y } _ { s , m } = \sum _ { i } \mathrm { x } _ { i } D _ { i , s } E _ { i , m }
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
where the two weight matrices are $D \in \mathbb { R } ^ { d _ { \mathrm { m o d e l } } \times S }$ , and $E \in \mathbb { R } ^ { d _ { \mathrm { m o d e l } } \times M }$ (see Figure 4(b)). This layer executes significantly faster during inference because of the decreased number of parameters which need to be loaded from memory. Unless stated otherwise, we use $S = 1 6$ .
|
| 113 |
+
|
| 114 |
+
The multiplicative layer is designed primarily to represent any permutation, so that each attention head can access information from any part of the embedding. We first verify that the multiplicative layer can indeed represent an arbitrary permutation (the proof is presented in the Appendix).
|
| 115 |
+
|
| 116 |
+
Theorem 1. For any bijective function $f : \{ 1 \cdots d _ { m o d e l } \} \Rightarrow \{ 1 \cdots S \} \times \{ 1 \cdots M \}$ there exists $a$ pair of weights of multiplicative layer $D$ , $E$ such that $x _ { i } = y _ { s , m }$ for $\{ s , m \} = f ( i )$ .
|
| 117 |
+
|
| 118 |
+
Convolutional layer. The output of the multiplicative layer is a tensor of type/shape $\in$ Rbatch×length×S×M . We process this tensor with a two-dimensional convolutional layer, treating the length dimension and number of modules $S$ like height and width of an image. This layer uses $M$ filters and a kernel size of $F \times F$ so that each filter looks at $F$ modules ( $\mathbf { \partial } ^ { \ast } \mathbf { S } ^ { \ast }$ axis) of the last $F$ tokens (‘length’ axis). Replacing the standard dense layer with such a convolution reduces the parameter count and computation time of the QKV layer. At the same time, by convolving over the ‘length’ axis, the model can incorporate more context into this computation [23].
|
| 119 |
+
|
| 120 |
+

|
| 121 |
+
Figure 4: (a) Multiplicative layer can represent an arbitrary permutation, but has fewer parameters and reduced computation time compared to a dense layer. (b) Sparse QKV layer replaces $Q , K ,$ , and $V$ dense layers by composing multiplicative and convolutional layers and reducing the number of parameters and decoding time.
|
| 122 |
+
|
| 123 |
+
The output of this layer has the same shape as the input. The optimal value of $S$ is less than $\sqrt { d _ { \mathrm { m o d e l } } }$ Empirically we set $F$ to 3, $S$ equal to the number of heads in the attention mechanism and $M$ to be the dimensionality of a single attention head. In this case, we can feed the output of the convolution directly to the attention mechanism without reshaping the output. This convolutional layer has fewer parameters $( 9 M ^ { 2 } + M = F ^ { 2 } ( d _ { \mathrm { m o d e l } } / S ) ^ { 2 } + ( \bar { d } _ { \mathrm { m o d e l } } / S ) )$ , and lower computational complexity $( O ( d _ { \mathrm { m o d e l } } ^ { 2 } / S ) )$ ). Unless stated otherwise, we use $S = 1 6$ and $F = 3$ .
|
| 124 |
+
|
| 125 |
+
Combining multiplicative and convolutional layers. There are four dense layers to replace in the original attention mechanism: Q, K, V, and output. As shown in Figure 4(b), we replace Q, K, and $\mathrm { v }$ dense layers by composing multiplicative and convolutional layers, but with a multiplicative layer shared across all three: $Q = \mathsf { c o n v } _ { Q } ( \mathsf { m u l t } ( x ) )$ , $K = \operatorname { c o n v } _ { K } ( \operatorname { m u l t } ( x ) )$ , $V = \mathrm { c o n v } _ { V } ( \bar { \mathrm { m u l t } } ( x ) )$ . We remove the output dense layer. Note that the combined multiplicative-convolutional variant has the output dense layer removed, while the other variants have it replaced with their respective sparse layers. Including this output layer negatively impacts decoding time. We can set the parameter √ $S$ to around $\sqrt { d _ { m o d e l } }$ , getting the number of layer parameters to scale proportionally to $d _ { m o d e l } ^ { 1 . 5 }$ compared to $d _ { m o d e l } ^ { 2 }$ of standard QKV layer.
|
| 126 |
+
|
| 127 |
+
Interpretation of QKV layer. Note that when parameter $S$ in convolutional layer is equal to the number of heads in the attention mechanism, which is the case in our experiments, then each of the S modules corresponds to a single attention head. Therefore, the model uses the convolution to process each head using the same linear projection. Without the multiplicative layer this projection would operate on a predetermined part of the embedding layer for each head. However, by adding it the model can perform arbitrary permutation of dimensions, so each head can have access to arbitrary subset of embedding dimensions, not a predetermined subset of them. This fact helps with keeping the expressibility of resulting QKV layer despite the reduced number of parameters.
|
| 128 |
+
|
| 129 |
+
Ablations. We investigate the impact of sparse QKV layers on the model equivalent to T5-large in Figure 5. We increase the value of $d _ { \mathrm { f f } }$ from 4096 to 6144 to preserve the number of parameters (see the next subsection for details). The decoding time with sparse QKV layer variants is similar to the baseline because it is dominated by the dense feedforward layer (details in appendix).
|
| 130 |
+
|
| 131 |
+
Combined feedforward and QKV sparsity. Sparse QKV layers lower the total number of model parameters. To keep the model size matched to the baseline, we increase $d _ { \mathrm { f f } }$ to keep the number of parameters similar across all models we compare. For the T5-Large equivalent model, we increase $d _ { \mathrm { f f } }$ from 4096 to 6144. With increased $d _ { \mathrm { f f } }$ , decoding time in the feedforward layer increases and thus, Sparse QKV layers alone do not speed up the model. However, when we combine Sparse QKV layers with sparse FF layers, we get a $3 . 0 5 \mathrm { x }$ speedup in decoding time of each decoding block with comparable perplexity (see Table 1 and Figure 1). While the baseline these is a vanilla Transformer, the decoding speed is almost the same for a Reformer model as well.
|
| 132 |
+
|
| 133 |
+

|
| 134 |
+
|
| 135 |
+
Figure 5: Log-perplexity of Scaling Transformers with Sparse QKV with different sparsity levels (S) and kernel sizes (F) is very similar to dense baseline within variance while multi-layer even improves perplexity.
|
| 136 |
+
Table 3: Accuracy of Scaling Transformer model and Terraformer model with sparse $Q K V + F F$ is comparable to the baseline Transformer within variance. The results are obtained by fine-tuning on selected downstream tasks from the GLUE dataset (validation split).
|
| 137 |
+
|
| 138 |
+
<table><tr><td></td><td>RTE</td><td>MRPC</td><td>SST-2</td><td>QNLI</td><td>MNLI-m</td><td>QQP</td></tr><tr><td>Baseline Transformer (dense)</td><td>70.1 ± 1.1</td><td>83.6±0.72</td><td>92.6±0.85</td><td>88.6±0.5</td><td>78.5 ± 0.41</td><td>85.2±0.6</td></tr><tr><td>Scaling Transformer (Sparse FF+QKV)</td><td>68.4</td><td>81.2</td><td>91.6</td><td>90.1</td><td>82.9</td><td>89.9</td></tr><tr><td>Terraformer (Sparse FF+QKV)</td><td>66.1</td><td>84.6</td><td>92.3</td><td>88.3</td><td>79.1</td><td>85.5</td></tr></table>
|
| 139 |
+
|
| 140 |
+
Table 3 shows the accuracy of fine-tuning the model for downstream tasks from the GLUE dataset.
|
| 141 |
+
Note that the model with sparseFF $^ +$ QKV achieves accuracy similar to the baseline.
|
| 142 |
+
|
| 143 |
+
# 3.3 Sparse loss layer.
|
| 144 |
+
|
| 145 |
+
A final dense layer maps the model embedding into vocabulary size to compute the loss. We can sparsify this part of the model by replacing the dense layer with a multiplicative layer similar to previous sections; this speeds up decoding time but may degrade perplexity. The results are presented in appendix.
|
| 146 |
+
|
| 147 |
+
# 4 Sparsity for Long Sequences
|
| 148 |
+
|
| 149 |
+
The above gains from sparsifying the dense layers are encouraging, but we omitted one fundamental issue. When applied to longer sequences, the gains would effectively be lost, as the decoding time will be dominated by attention operations. Luckily, a number of methods have been proposed to solve this problem for Transformers, see [41] for a survey. We focus on the LSH (Locality-Sensitive Hashing) attention from Reformer [19] and show how to integrate this sparse attention mechanism, as well as recurrent blocks, into a Scaling Transformer, yielding a Terraformer.
|
| 150 |
+
|
| 151 |
+
# 4.1 Architecture for Long Sequences
|
| 152 |
+
|
| 153 |
+
While integrating sparse attention layers into a Scaling Transformer, we notice that the architecture of the Transformer decoder block is suboptimal and can be redesigned to make a better use of these layers. In particular, separating decoder self-attention and encoder-decoder attention is not necessary any more from the perspective of efficiency. We therefore remove the encoder-decoder attention, but just concatenate the encoder representations before the decoder tokens. Doing this alone isn’t enough though, since we took away one attention mechanism (encoder-decoder attention). We remedy this by having two attention mechanisms before the feedforward block. This simple architecture is as fast as the baseline Transformer while giving better results.
|
| 154 |
+
|
| 155 |
+
Putting this together, if $v _ { e n c }$ are the encoder activations and $v _ { d e c }$ are the decoder embeddings, the input to the decoder block $x$ is their concatenation on the length axis, LengthConcat $( v _ { e n c } , v _ { d e c } )$
|
| 156 |
+
|
| 157 |
+

|
| 158 |
+
Figure 6: Reversible decoder block in Terraformer.
|
| 159 |
+
|
| 160 |
+
Each decoder block can be represented as:
|
| 161 |
+
|
| 162 |
+
$$
|
| 163 |
+
\begin{array} { r l } & { y _ { 1 } = \ x + \mathrm { D r o p o u t } ( \mathrm { A t t e n t i o n } ( \mathrm { L a y e r N o r m } ( x ) ) ) } \\ & { y _ { 2 } = y _ { 1 } + \mathrm { D r o p o u t } ( \mathrm { A t t e n t i o n } ( \mathrm { L a y e r N o r m } ( y _ { 1 } ) ) ) } \\ & { \ y = y _ { 2 } + \mathrm { F F N } ( y _ { 2 } ) } \end{array}
|
| 164 |
+
$$
|
| 165 |
+
|
| 166 |
+
where $y$ becomes the input to the next decoder layer. See the appendix for a full diagram of the resulting architecture.
|
| 167 |
+
|
| 168 |
+
# 4.2 Reversibility for Memory Efficiency
|
| 169 |
+
|
| 170 |
+
To enable training Terraformer with large batches, and to fine-tune even large models on single machines, we apply ideas from the Reformer [19], in particular, reversible layers for the encoder and decoder blocks.
|
| 171 |
+
|
| 172 |
+
The original Reformer decoder block contained feedforward and attention layers in a 1-1 ratio. In the Terraformer architecture, as described above, there are two attention layers in the decoder block, so there are three swaps in the reversible layers in the decoder block (see Figure 6). In our experiments, this significantly improved performance.
|
| 173 |
+
|
| 174 |
+
Another issue with reversibility is that it is only formally correct for continuous functions. We find that this is not just a formal issue, but an important problem in practice. To make reversible layers train well with sparsity, we need to store the discrete decisions—i.e., the integers saying which rows to select—and use them for reversing. Recalculating these decisions on the backwards pass leads to worse results.
|
| 175 |
+
|
| 176 |
+
# 4.3 Recurrence for Generalization
|
| 177 |
+
|
| 178 |
+
In addition to incorporating sparse attention and reversibility, we also add recurrence to the feedforward block of Terraformer. Recurrent layers allow information to propagate in time, even in a single decoder block. It is challenging though to use them without decreasing model speed, esp. in training. For that reason, we use simple recurrent units [20] which parallelize well during training.
|
| 179 |
+
|
| 180 |
+
SRUs contain dense layers, so their use could negate the benefits of sparsity elsewhere. We tried a few methods to alleviate that, but it turns out that simply reducing the dimensionality of the SRUs works. So we first project from $d _ { \mathrm { m o d e l } }$ to a small dimension (32 in our experiments), then apply the SRU, and then project back to $d _ { \mathrm { m o d e l } }$ and add the result to the feedforward block. This low-rank recurrence is in our experiments sufficient to transfer enough information through time for the network to generalize.
|
| 181 |
+
|
| 182 |
+
Since the effects of SRUs on C4 are minimal (as the training and evaluation data are very similar), we use synthetic tasks to investigate out-of-distribution generalization. We train the models on long addition and on the task of copying a decimal digit. We train on inputs with at most 128 digits and evaluate on inputs lengths from 256 to 300, so over $2 \mathbf { x }$ longer. As can be seen in the table below, the baseline Transformer does not generalize well, while Terraformer manages to get a large portion correctly, even if it is not perfect like the Neural GPU [16].
|
| 183 |
+
|
| 184 |
+
# 4.4 Experiments
|
| 185 |
+
|
| 186 |
+
We designed Terraformer so that the benefits from sparsity would not be lost on long sequences, nor on downstream finetuning tasks. To test this, we chose the task of summarizing scientific papers
|
| 187 |
+
|
| 188 |
+
Table 4: Comparison of out-of-distribution generalization for Terraformer and Transformer on two toy tasks, long addition and copying on decimal numbers. Under (seq) we report the number of fully correct sequences generated as answers.
|
| 189 |
+
|
| 190 |
+
<table><tr><td>Model</td><td>copy</td><td>copy (seq)</td><td>add</td><td>add (seq)</td></tr><tr><td>Transformer</td><td>79.8%</td><td>0%</td><td>36.4%</td><td>0%</td></tr><tr><td>Terraformer</td><td>99.9%</td><td>93.9%</td><td>86.9%</td><td>32.4%</td></tr></table>
|
| 191 |
+
|
| 192 |
+
<table><tr><td>Model</td><td>R-1</td><td>R-2</td><td>R-LSum</td><td>R-LSent</td></tr><tr><td>Terraformer</td><td>45.40</td><td>17.86</td><td>41.21</td><td>26.33</td></tr><tr><td>DANCERRUM</td><td>42.70</td><td>16.54</td><td>38.44</td><td>一</td></tr><tr><td>BIGBIRD-RoBERTa</td><td>41.22</td><td>16.43</td><td>36.96</td><td>1</td></tr><tr><td>Pegasus Large (C4)</td><td>44.21</td><td>16.95</td><td>38.83</td><td>25.67</td></tr><tr><td>DANCERPEGASUS</td><td>45.01</td><td>17.6</td><td>40.56</td><td>一</td></tr><tr><td>BIGBIRD-Pegasus</td><td>46.63</td><td>19.02</td><td>41.77</td><td></td></tr></table>
|
| 193 |
+
|
| 194 |
+
Table 5: Terraformer is competitive with strong baselines [46, 45, 10] on the ArXiv summarization task, without using the Pegasus loss and without beam search. On R-1, R-2 and R-LSum, Terraformer outperforms all previous models except for BigBird-Pegasus.
|
| 195 |
+
|
| 196 |
+
using the dataset of scientific papers from arXiv3[6]. In this task, the input is a whole paper—a long sequence—and the model is asked to output its abstract. Several recent papers studied this dataset and tasks and it has been shown [46, 45] that pretraining on C4 yields significant improvements on this task. We also pretrain Terraformer on C4 (like in all experiments in this paper) and fine-tuned it on the arXiv summarization task. We find that Terraformer is competitive with the above baselines, even though we mask single words (we do not use the Pegasus sentence loss) and decode the answers in a greedy way (no beam search). Note that ROUGE scores are computed using open-source scorer4 with the metrics described in its documentation5. We also observe certain confusion between ROUGE-L metrics reported. As noted in the open-source scorer, there are two versions of ROUGEL-SentenceLevel (R-LSent) and ROUGEL-Summary-Level (R-LSum). For clarity, we report both of these metrics. Furthermore we only report the F1 measure of any ROUGE metric. We include a few examples of the generated abstracts in the appendix.
|
| 197 |
+
|
| 198 |
+
We pretrained Terraformer in the same way as all other baselines reported in this paper with the same number of parameters (800M), the same dimensions as mentioned before, and loss sparsity 4 to get the fastest model. Compared to the sparse Transformer model from the previous section that achieves a decoding speed of 0.061s, Terraformer achieves a decoding speed of 0.086s with a similar performance in terms of perplexity (see appendix for details). We also observe that the Terraformer model achieves accuracy similar to the Transformer model in Table 3 for selected downstream tasks on GLUE dataset.
|
| 199 |
+
|
| 200 |
+
Table 6 shows the speedup in decoding with sparse layers when we scale up Terraformer to 17B parameters. Note that sparsifying all the layers gives us $3 7 \mathrm { x }$ speedup in decoding.
|
| 201 |
+
|
| 202 |
+
# 5 Conclusion
|
| 203 |
+
|
| 204 |
+
When starting to investigate sparse variants of Transformers, we assumed that there would be a price to pay for sparsity—that a sparse model would always underperform a dense one with the same number of parameters. To our surprise, this is not the case: sparse is enough!
|
| 205 |
+
|
| 206 |
+
In our experiments with large models on the C4 dataset, the sparse models match the performance of their dense counterparts while being many times faster at inference. And, when scaling the models up, the benefits of sparsity become even larger. This promises to put Transformers back on a sustainable track and make large models more useful.
|
| 207 |
+
|
| 208 |
+
Table 6: Decoding speed of a single token for Terraformer with 17B parameters is $3 7 x$ faster than a dense baseline model, requiring less than 100ms/token for inference. Here attention-sparsity $= ~ 6 4$ , $\mathcal { H }$ -sparsity $=$ 256, and loss-sparsity $= 4$ .
|
| 209 |
+
|
| 210 |
+
<table><tr><td>Terraformer</td><td>Dec. time</td><td>Speedup</td></tr><tr><td>dense</td><td>3.651s</td><td>1x</td></tr><tr><td>Sparse FF</td><td>1.595s</td><td>2.29x</td></tr><tr><td>SparseFF+QKV</td><td>0.183s</td><td>19.98x</td></tr><tr><td>SparseFF+QKV+loss</td><td>0.097s</td><td>37.64x</td></tr></table>
|
| 211 |
+
|
| 212 |
+
The current results have a number of limitations. For one, the practical speedups we see are only for inference, not at training time. Moreover, we consider unbatched inference on CPUs, while often inference is ran in batched mode on GPUs. We believe with more work sparsity can bring improvements in these settings too, as our fundamental result shows that the sparse models reach the same perplexity as their dense counterparts with the same number of parameters.
|
| 213 |
+
|
| 214 |
+
So while we demonstrate that Scaling Transformers are possible, we consider this paper as a
|
| 215 |
+
|
| 216 |
+
first step on the way to sustainable large models. There are numerous techniques for making models faster that could greatly benefit Terraformer and other Scaling Transformers. For example, we did not study quantization and we believe that it can make Scaling Transformers even faster. We also focused on inference speed and did not get improvements in training speed. The main reason is our use of Gumbel-Softmax when training the feedforward block (see Section 3.1). Fedus et al. [8] already provide a promising alternative, and we look forward to exploring it in future work.
|
| 217 |
+
|
| 218 |
+
Further, we hope that the community will take inspiration from Scaling Transformers and tune them for their needs. We ran experiments using layer sizes and hyperparameters borrowed from dense Transformers and they are most probably not optimal for Scaling Transformer. With proper tuning and further improvements we believe one could train a Scaling Transformer to match GPT-3 in accuracy but also run inference in reasonable time on a laptop. We put it as a fascinating challenge to the community, since such Scaling Transformers will not only be more sustainable but will also make large models accessible to everyone.
|
| 219 |
+
|
| 220 |
+
# References
|
| 221 |
+
|
| 222 |
+
[1] Nvidia Ampere Architecture. https://developer.nvidia.com/blog/nvidia-ampere-architecture-in-depth/.
|
| 223 |
+
[2] Christopher Brix, Parnia Bahar, and Hermann Ney. Successfully applying the stabilized lottery ticket hypothesis to the transformer architecture. arXiv preprint arXiv:2005.03454, 2020.
|
| 224 |
+
[3] Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. arXiv preprint arXiv:2005.14165, 2020.
|
| 225 |
+
[4] Rewon Child, Scott Gray, Alec Radford, and Ilya Sutskever. Generating long sequences with sparse transformers. arXiv preprint arXiv:1904.10509, 2019.
|
| 226 |
+
[5] Krzysztof Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Andreea Gane, Tamas Sarlos, Peter Hawkins, Jared Davis, Afroz Mohiuddin, Lukasz Kaiser, et al. Rethinking attention with performers. arXiv preprint arXiv:2009.14794, 2020.
|
| 227 |
+
[6] Arman Cohan, Franck Dernoncourt, Doo Soon Kim, Trung Bui, Seokhwan Kim, Walter Chang, and Nazli Goharian. A discourse-aware attention model for abstractive summarization of long documents. Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), 2018. doi: 10.18653/v1/n18-2097. URL http://dx.doi.org/10.18653/ v1/n18-2097.
|
| 228 |
+
[7] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018.
|
| 229 |
+
[8] William Fedus, Barret Zoph, and Noam Shazeer. Switch transformers: Scaling to trillion parameter models with simple and efficient sparsity. arXiv preprint arXiv:2101.03961, 2021.
|
| 230 |
+
[9] Trevor Gale, Erich Elsen, and Sara Hooker. The state of sparsity in deep neural networks. arXiv preprint arXiv:1902.09574, 2019.
|
| 231 |
+
[10] A. Gidiotis and G. Tsoumakas. A divide-and-conquer approach to the summarization of long documents. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 28: 3029–3040, 2020. doi: 10.1109/TASLP.2020.3037401.
|
| 232 |
+
[11] Manish Gupta and Puneet Agrawal. Compression of deep learning models for text: A survey. arXiv preprint arXiv:2008.05221, 2020.
|
| 233 |
+
[12] Tianyu He, Xu Tan, Yingce Xia, Di He, Tao Qin, Zhibo Chen, and Tie-Yan Liu. Layer-wise coordination between encoder and decoder for neural machine translation. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 31, 2018.
|
| 234 |
+
[13] Forrest N Iandola, Albert E Shaw, Ravi Krishna, and Kurt W Keutzer. Squeezebert: What can computer vision teach nlp about efficient neural networks? arXiv preprint arXiv:2006.11316, 2020.
|
| 235 |
+
[14] Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. arXiv preprint arXiv:1611.01144, 2016.
|
| 236 |
+
[15] Łukasz Kaiser and Samy Bengio. Discrete autoencoders for sequence models. arXiv preprint arXiv:1801.09797, 2018.
|
| 237 |
+
[16] Łukasz Kaiser and Ilya Sutskever. Neural gpus learn algorithms. arXiv preprint arXiv:1511.08228, 2015.
|
| 238 |
+
[17] Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. Scaling laws for neural language models. arXiv preprint arXiv:2001.08361, 2020.
|
| 239 |
+
[18] Young Jin Kim and Hany Hassan Awadalla. Fastformers: Highly efficient transformer models for natural language understanding. arXiv preprint arXiv:2010.13382, 2020.
|
| 240 |
+
[19] Nikita Kitaev, Łukasz Kaiser, and Anselm Levskaya. Reformer: The efficient transformer. arXiv preprint arXiv:2001.04451, 2020.
|
| 241 |
+
[20] Tao Lei, Yu Zhang, and Yoav Artzi. Training rnns as fast as cnns. CoRR, abs/1709.02755, 2017. URL http://arxiv.org/abs/1709.02755.
|
| 242 |
+
[21] Dmitry Lepikhin, HyoukJoong Lee, Yuanzhong Xu, Dehao Chen, Orhan Firat, Yanping Huang, Maxim Krikun, Noam Shazeer, and Zhifeng Chen. Gshard: Scaling giant models with conditional computation and automatic sharding. arXiv preprint arXiv:2006.16668, 2020.
|
| 243 |
+
[22] Bingbing Li, Zhenglun Kong, Tianyun Zhang, Ji Li, Zhengang Li, Hang Liu, and Caiwen Ding. Efficient transformer-based large scale language representations using hardware-friendly block structured pruning. arXiv preprint arXiv:2009.08065, 2020.
|
| 244 |
+
[23] Shiyang Li, Xiaoyong Jin, Yao Xuan, Xiyou Zhou, Wenhu Chen, Yu-Xiang Wang, and Xifeng Yan. Enhancing the locality and breaking the memory bottleneck of transformer on time series forecasting. arXiv preprint arXiv:1907.00235, 2019.
|
| 245 |
+
[24] Zhuohan Li, Eric Wallace, Sheng Shen, Kevin Lin, Kurt Keutzer, Dan Klein, and Joey Gonzalez. Train big, then compress: Rethinking model size for efficient training and inference of transformers. In International Conference on Machine Learning, pages 5958–5968. PMLR, 2020.
|
| 246 |
+
[25] Krzysztof Maziarz, Efi Kokiopoulou, Andrea Gesmundo, Luciano Sbaiz, Gabor Bartok, and Jesse Berent. Gumbel-matrix routing for flexible multi-task learning. arXiv preprint arXiv:1910.04915, 2019.
|
| 247 |
+
[26] Sharan Narang, Hyung Won Chung, Yi Tay, William Fedus, Thibault Fevry, Michael Matena, Karishma Malkan, Noah Fiedel, Noam Shazeer, Zhenzhong Lan, Yanqi Zhou, Wei Li, Nan Ding, Jake Marcus, Adam Roberts, and Colin Raffel. Do transformer modifications transfer across implementations and applications? arXiv preprint arXiv:2102.11972, 2021.
|
| 248 |
+
|
| 249 |
+
[27] David Patterson, Joseph Gonzalez, Quoc Le, Chen Liang, Lluis-Miquel Munguia, Daniel Rothchild, David So, Maud Texier, and Jeff Dean. Carbon emissions and large neural network training. arXiv preprint arXiv:2104.10350, 2021.
|
| 250 |
+
|
| 251 |
+
[28] Gabriele Prato, Ella Charlaix, and Mehdi Rezagholizadeh. Fully quantized transformer for machine translation. arXiv preprint arXiv:1910.10485, 2019.
|
| 252 |
+
|
| 253 |
+
[29] Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. 2019.
|
| 254 |
+
|
| 255 |
+
[30] Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21:1–67, 2020.
|
| 256 |
+
|
| 257 |
+
[31] Aurko Roy, Mohammad Saffar, Ashish Vaswani, and David Grangier. Efficient content-based sparse attention with routing transformers. arXiv preprint arXiv:2003.05997, 2020.
|
| 258 |
+
|
| 259 |
+
[32] Victor Sanh, Lysandre Debut, Julien Chaumond, and Thomas Wolf. Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108, 2019.
|
| 260 |
+
|
| 261 |
+
[33] Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc Le, Geoffrey Hinton, and Jeff Dean. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer. arXiv preprint arXiv:1701.06538, 2017.
|
| 262 |
+
|
| 263 |
+
[34] Noam Shazeer, Youlong Cheng, Niki Parmar, Dustin Tran, Ashish Vaswani, Penporn Koanantakool, Peter Hawkins, HyoukJoong Lee, Mingsheng Hong, Cliff Young, et al. Mesh-tensorflow: Deep learning for supercomputers. In Advances in Neural Information Processing Systems, pages 10414–10423, 2018.
|
| 264 |
+
|
| 265 |
+
[35] Sheng Shen, Zhen Dong, Jiayu Ye, Linjian Ma, Zhewei Yao, Amir Gholami, Michael W Mahoney, and Kurt Keutzer. Q-bert: Hessian based ultra low precision quantization of bert. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 8815–8821, 2020.
|
| 266 |
+
|
| 267 |
+
[36] Emma Strubell, Ananya Ganesh, and Andrew McCallum. Energy and policy considerations for deep learning in nlp. arXiv preprint arXiv:1906.02243, 2019.
|
| 268 |
+
|
| 269 |
+
[37] Sainbayar Sukhbaatar, Edouard Grave, Piotr Bojanowski, and Armand Joulin. Adaptive attention span in transformers. arXiv preprint arXiv:1905.07799, 2019.
|
| 270 |
+
|
| 271 |
+
[38] Xiao Sun, Jungwook Choi, Chia-Yu Chen, Naigang Wang, Swagath Venkataramani, Vijayalakshmi Viji Srinivasan, Xiaodong Cui, Wei Zhang, and Kailash Gopalakrishnan. Hybrid 8-bit floating point (hfp8) training and inference for deep neural networks. Advances in neural information processing systems, 32:4900–4909, 2019.
|
| 272 |
+
|
| 273 |
+
[39] Zhiqing Sun, Hongkun Yu, Xiaodan Song, Renjie Liu, Yiming Yang, and Denny Zhou. Mobilebert: a compact task-agnostic bert for resource-limited devices. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 2158–2170, 2020.
|
| 274 |
+
|
| 275 |
+
[40] Yi Tay, Dara Bahri, Liu Yang, Donald Metzler, and Da-Cheng Juan. Sparse sinkhorn attention, 2020.
|
| 276 |
+
|
| 277 |
+
[41] Yi Tay, Mostafa Dehghani, Dara Bahri, and Donald Metzler. Efficient transformers: A survey. arXiv preprint arXiv:2009.06732, 2020.
|
| 278 |
+
|
| 279 |
+
[42] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. arXiv preprint arXiv:1706.03762, 2017.
|
| 280 |
+
|
| 281 |
+
[43] Hanrui Wang, Zhanghao Wu, Zhijian Liu, Han Cai, Ligeng Zhu, Chuang Gan, and Song Han. Hat: Hardware-aware transformers for efficient natural language processing. arXiv preprint arXiv:2005.14187, 2020.
|
| 282 |
+
|
| 283 |
+
[44] Linting Xue, Noah Constant, Adam Roberts, Mihir Kale, Rami Al-Rfou, Aditya Siddhant, Aditya Barua, and Colin Raffel. mt5: A massively multilingual pre-trained text-to-text transformer, 2020.
|
| 284 |
+
[45] Manzil Zaheer, Guru Guruganesh, Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, et al. Big bird: Transformers for longer sequences. arXiv preprint arXiv:2007.14062, 2020.
|
| 285 |
+
[46] Jingqing Zhang, Yao Zhao, Mohammad Saleh, and Peter J. Liu. Pegasus: Pre-training with extracted gap-sentences for abstractive summarization, 2020.
|
| 286 |
+
[47] Aojun Zhou, Yukun Ma, Junnan Zhu, Jianbo Liu, Zhijie Zhang, Kun Yuan, Wenxiu Sun, and Hongsheng Li. Learning n:m fine-grained structured sparse neural networks from scratch. In International Conference on Learning Representations, 2021. URL https://openreview. net/forum?id=K9bw7vqp_s.
|
parse/train/-b5OSCydOMe/-b5OSCydOMe_content_list.json
ADDED
|
@@ -0,0 +1,1407 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "Sparse is Enough in Scaling Transformers ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
241,
|
| 8 |
+
122,
|
| 9 |
+
754,
|
| 10 |
+
147
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Sebastian Jaszczur∗ University of Warsaw ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
191,
|
| 19 |
+
202,
|
| 20 |
+
334,
|
| 21 |
+
228
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "Aakanksha Chowdhery Google Research ",
|
| 28 |
+
"bbox": [
|
| 29 |
+
359,
|
| 30 |
+
200,
|
| 31 |
+
524,
|
| 32 |
+
228
|
| 33 |
+
],
|
| 34 |
+
"page_idx": 0
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"type": "text",
|
| 38 |
+
"text": "Afroz Mohiuddin Google Research ",
|
| 39 |
+
"bbox": [
|
| 40 |
+
549,
|
| 41 |
+
202,
|
| 42 |
+
671,
|
| 43 |
+
228
|
| 44 |
+
],
|
| 45 |
+
"page_idx": 0
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"type": "text",
|
| 49 |
+
"text": "Łukasz Kaiser∗ OpenAI ",
|
| 50 |
+
"bbox": [
|
| 51 |
+
696,
|
| 52 |
+
202,
|
| 53 |
+
803,
|
| 54 |
+
229
|
| 55 |
+
],
|
| 56 |
+
"page_idx": 0
|
| 57 |
+
},
|
| 58 |
+
{
|
| 59 |
+
"type": "text",
|
| 60 |
+
"text": "Wojciech Gajewski Google Research ",
|
| 61 |
+
"bbox": [
|
| 62 |
+
235,
|
| 63 |
+
250,
|
| 64 |
+
369,
|
| 65 |
+
279
|
| 66 |
+
],
|
| 67 |
+
"page_idx": 0
|
| 68 |
+
},
|
| 69 |
+
{
|
| 70 |
+
"type": "text",
|
| 71 |
+
"text": "Henryk Michalewski Google Research ",
|
| 72 |
+
"bbox": [
|
| 73 |
+
434,
|
| 74 |
+
250,
|
| 75 |
+
583,
|
| 76 |
+
279
|
| 77 |
+
],
|
| 78 |
+
"page_idx": 0
|
| 79 |
+
},
|
| 80 |
+
{
|
| 81 |
+
"type": "text",
|
| 82 |
+
"text": "Jonni Kanerva Google Research ",
|
| 83 |
+
"bbox": [
|
| 84 |
+
650,
|
| 85 |
+
251,
|
| 86 |
+
764,
|
| 87 |
+
279
|
| 88 |
+
],
|
| 89 |
+
"page_idx": 0
|
| 90 |
+
},
|
| 91 |
+
{
|
| 92 |
+
"type": "text",
|
| 93 |
+
"text": "Abstract ",
|
| 94 |
+
"text_level": 1,
|
| 95 |
+
"bbox": [
|
| 96 |
+
462,
|
| 97 |
+
314,
|
| 98 |
+
535,
|
| 99 |
+
330
|
| 100 |
+
],
|
| 101 |
+
"page_idx": 0
|
| 102 |
+
},
|
| 103 |
+
{
|
| 104 |
+
"type": "text",
|
| 105 |
+
"text": "Large Transformer models yield impressive results on many tasks, but are expensive to train, or even fine-tune, and so slow at decoding that their use and study becomes out of reach. We address this problem by leveraging sparsity. We study sparse variants for all layers in the Transformer and propose Scaling Transformers, a family of next generation Transformer models that use sparse layers to scale efficiently and perform unbatched decoding much faster than the standard Transformer as we scale up the model size. Surprisingly, the sparse layers are enough to obtain the same perplexity as the standard Transformer with the same number of parameters. We also integrate with prior sparsity approaches to attention and enable fast inference on long sequences even with limited memory. This results in performance competitive to the state-of-the-art on long text summarization. ",
|
| 106 |
+
"bbox": [
|
| 107 |
+
232,
|
| 108 |
+
345,
|
| 109 |
+
766,
|
| 110 |
+
497
|
| 111 |
+
],
|
| 112 |
+
"page_idx": 0
|
| 113 |
+
},
|
| 114 |
+
{
|
| 115 |
+
"type": "text",
|
| 116 |
+
"text": "1 Introduction ",
|
| 117 |
+
"text_level": 1,
|
| 118 |
+
"bbox": [
|
| 119 |
+
174,
|
| 120 |
+
522,
|
| 121 |
+
310,
|
| 122 |
+
540
|
| 123 |
+
],
|
| 124 |
+
"page_idx": 0
|
| 125 |
+
},
|
| 126 |
+
{
|
| 127 |
+
"type": "text",
|
| 128 |
+
"text": "The field of natural language processing has seen dramatic improvements in recent years due to large neural networks based on the Transformer architecture. The original Transformer [42] significantly advanced state-of-the-art in machine translation. BERT [7] surpassed all previous methods on question answering, language inference and other NLP tasks and was followed by a line of models like T5 [30] that further improved these results. The GPT line of models [29, 3] elevated language generation to the point that GPT-2 was invited to write short passages for the Economist and GPT-3 created whole articles almost indistinguishable from human-written ones. ",
|
| 129 |
+
"bbox": [
|
| 130 |
+
174,
|
| 131 |
+
554,
|
| 132 |
+
825,
|
| 133 |
+
650
|
| 134 |
+
],
|
| 135 |
+
"page_idx": 0
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"type": "text",
|
| 139 |
+
"text": "The benefits of this progress are undercut by the huge costs such models incur. Strubell et al. [36] estimate that training a single base BERT model costs $\\$ 4 k -\\$ 12 k$ and emits as much $\\mathrm { C O _ { 2 } }$ as one passenger’s share of a 4-hour flight and later Patterson et al. [27] estimate that training GPT-3 has three times as much $\\mathrm { t C O _ { 2 } e }$ (metric tons of $\\mathrm { C O _ { 2 } }$ equivalent) emissions as a SF-NY round trip flight. Data and serving costs are also forbidding: a single training run of BERT, for example, processes 128B tokens, and Google Translate reportedly1 serves over 143B words per day. ",
|
| 140 |
+
"bbox": [
|
| 141 |
+
174,
|
| 142 |
+
657,
|
| 143 |
+
825,
|
| 144 |
+
741
|
| 145 |
+
],
|
| 146 |
+
"page_idx": 0
|
| 147 |
+
},
|
| 148 |
+
{
|
| 149 |
+
"type": "text",
|
| 150 |
+
"text": "With the growing popularity and size of these models, it is increasingly valuable to make them scale efficiently. In this work we propose Scaling Transformers with a separate sparse mechanism for the query, key, value and output layers (QKV layers for short) and combine it with sparse feedforward blocks to get a fully sparse Transformer architecture. ",
|
| 151 |
+
"bbox": [
|
| 152 |
+
174,
|
| 153 |
+
747,
|
| 154 |
+
825,
|
| 155 |
+
803
|
| 156 |
+
],
|
| 157 |
+
"page_idx": 0
|
| 158 |
+
},
|
| 159 |
+
{
|
| 160 |
+
"type": "text",
|
| 161 |
+
"text": "To quantify the computational complexity of inference in Transformer models, recall the architecture of a Transformer decoder block. It consists of three parts: a masked self-attention layer, an encoderdecoder attention layer and a feedforward block. The sizes of these layers are parameterized by $d _ { \\mathrm { m o d e l } }$ and $d _ { \\mathrm { f f } }$ . The base BERT model sets $d _ { \\mathrm { m o d e l } } = 7 6 8$ , the large BERT has $d _ { \\mathrm { m o d e l } } = 1 0 2 4$ , the largest ",
|
| 162 |
+
"bbox": [
|
| 163 |
+
174,
|
| 164 |
+
809,
|
| 165 |
+
825,
|
| 166 |
+
864
|
| 167 |
+
],
|
| 168 |
+
"page_idx": 0
|
| 169 |
+
},
|
| 170 |
+
{
|
| 171 |
+
"type": "table",
|
| 172 |
+
"img_path": "images/4f8e6f232736a9190cdd1fc301cf633567d9f8df294768d09d6afdb05349720b.jpg",
|
| 173 |
+
"table_caption": [
|
| 174 |
+
"Table 1: Decoding speed (in seconds) of a single token. For Transformer model (equivalent to T5 large with approximately 800M parameters), Scaling Transformers with proposed sparsity mechanisms $( F F { + } Q K V )$ achieve up to $2 x$ speedup in decoding compared to baseline dense model and 20x speedup for $I 7 B$ param model. "
|
| 175 |
+
],
|
| 176 |
+
"table_footnote": [],
|
| 177 |
+
"table_body": "<table><tr><td></td><td>Params</td><td>Dec. time</td><td>Dec.time per block</td></tr><tr><td>baseline Transf.</td><td>800M</td><td>0.160s</td><td>5.9ms</td></tr><tr><td>+ Sparse FF</td><td></td><td>0.093s</td><td>3.1ms</td></tr><tr><td>+ Sparse QKV</td><td></td><td>0.152s</td><td>6.2ms</td></tr><tr><td>+ Sparse FF+QKV</td><td></td><td>0.061s</td><td>1.9ms</td></tr><tr><td>Speedup</td><td></td><td>2.62x</td><td>3.05x</td></tr><tr><td>baseline Transf.</td><td>17B</td><td>3.690s</td><td>0.581s</td></tr><tr><td>+Sparse FF</td><td>■</td><td>1.595s</td><td>0.259s</td></tr><tr><td>+Sparse QKV</td><td></td><td>3.154s</td><td>0.554s</td></tr><tr><td>+Sparse FF+QKV</td><td>=</td><td>0.183s</td><td>0.014s</td></tr><tr><td>Speedup</td><td></td><td>20.0x</td><td>42.5x</td></tr></table>",
|
| 178 |
+
"bbox": [
|
| 179 |
+
183,
|
| 180 |
+
88,
|
| 181 |
+
490,
|
| 182 |
+
227
|
| 183 |
+
],
|
| 184 |
+
"page_idx": 1
|
| 185 |
+
},
|
| 186 |
+
{
|
| 187 |
+
"type": "image",
|
| 188 |
+
"img_path": "images/f2cbaf0f025de453a8ad2daeabffda720d97428674dd034d813ce5da11e3d960.jpg",
|
| 189 |
+
"image_caption": [
|
| 190 |
+
"Figure 1: Log-perplexity of Scaling Transformers (equivalent to T5 large with approximately 800M parameters) on $C 4$ dataset with proposed sparsity mechanisms (FF, QKV, $F F { + } Q K V )$ is similar to baseline dense model. Other models used in this paper are shown in grey lines; raw data is available in the appendix. "
|
| 191 |
+
],
|
| 192 |
+
"image_footnote": [],
|
| 193 |
+
"bbox": [
|
| 194 |
+
514,
|
| 195 |
+
101,
|
| 196 |
+
830,
|
| 197 |
+
223
|
| 198 |
+
],
|
| 199 |
+
"page_idx": 1
|
| 200 |
+
},
|
| 201 |
+
{
|
| 202 |
+
"type": "text",
|
| 203 |
+
"text": "GPT-2 has $d _ { \\mathrm { m o d e l } } = 1 6 0 0$ and GPT-3 reaches $d _ { \\mathrm { m o d e l } } = 1 2 2 8 8$ . For both BERT and GPT models the authors use $d _ { \\mathrm { f f } } = 4 d _ { \\mathrm { m o d e l } }$ . While decoding a token, the self-attention layer needs to activate four matrices of size $d _ { \\mathrm { m o d e l } } \\times d _ { \\mathrm { m o d e l } }$ : one each for the queries, keys and values input to the attention and one for merging the output. In the encoder-decoder attention, the keys and values may already be cached, so only two matrices of size $d _ { \\mathrm { m o d e l } } \\times d _ { \\mathrm { m o d e l } }$ are activated. The feedforward block consists of twoup to: a sing $4 d _ { \\mathrm { m o d e l } } ^ { 2 } + 2 d _ { \\mathrm { m o d e l } } ^ { 2 } + 2 d _ { \\mathrm { m o d e l } } d _ { \\mathrm { f f } }$ $d _ { \\mathrm { m o d e l } } \\times d _ { \\mathrm { f f } }$ mitting small additional contribution of biases. The total adds. This sum describes both the number of trainable weights of the number of floating-point operations needed for decoding a single token, except for the attention operations (discussed later). The complexity is quadratic in $d _ { \\mathrm { m o d e l } }$ ; for example, as $d _ { \\mathrm { m o d e l } }$ increases 16-fold from base BERT to GPT-3, the complexity of a single block grows 256-fold. ",
|
| 204 |
+
"bbox": [
|
| 205 |
+
174,
|
| 206 |
+
342,
|
| 207 |
+
825,
|
| 208 |
+
493
|
| 209 |
+
],
|
| 210 |
+
"page_idx": 1
|
| 211 |
+
},
|
| 212 |
+
{
|
| 213 |
+
"type": "text",
|
| 214 |
+
"text": "In comparison Scaling Transformers use only $2 d _ { \\mathrm { m o d e l } } \\sqrt { d _ { \\mathrm { m o d e l } } } = 2 d _ { \\mathrm { m o d e l } } ^ { 1 . 5 }$ parameters in QKV layers and yield results as good as the baseline (fully dense) Transformer with the same number of parameters and complexity: $\\mathrm { \\bar { 8 } } d _ { \\mathrm { m o d e l } } ^ { 1 . 5 } + 4 d _ { \\mathrm { m o d e l } } ^ { 1 . 5 } + 4 \\dot { d } _ { \\mathrm { m o d e l } } ^ { 1 . 5 }$ . We were surprised that the fully sparse Scaling Transformers are indeed enough to match the results of the baseline Transformer on the large C4 dataset [30] (Figure 1). The improvement in complexity holds not just asymptotically but yields over $2 . 6 \\mathbf { x }$ speedup in wall-clock hed decoding time already for a model with 800M parameters and $2 0 \\mathrm { x }$ improvement for a model with 17B parameters, as shown in Table 1. ",
|
| 215 |
+
"bbox": [
|
| 216 |
+
173,
|
| 217 |
+
500,
|
| 218 |
+
825,
|
| 219 |
+
598
|
| 220 |
+
],
|
| 221 |
+
"page_idx": 1
|
| 222 |
+
},
|
| 223 |
+
{
|
| 224 |
+
"type": "text",
|
| 225 |
+
"text": "To verify that Scaling Transformers can be used with other Transformer improvements on real tasks, we create Terraformer – a Transformer model that uses reversible layers for memory efficiency and sparse attention to handle long sequences. We pre-train Terraformer on the C4 dataset and fine-tune it on the challenging task of summarizing arxiv articles. Terraformer yields results competitive to the state-of-the-art BigBird-Pegasus without using the Pegasus loss in pre-training (Table 5). ",
|
| 226 |
+
"bbox": [
|
| 227 |
+
174,
|
| 228 |
+
603,
|
| 229 |
+
825,
|
| 230 |
+
674
|
| 231 |
+
],
|
| 232 |
+
"page_idx": 1
|
| 233 |
+
},
|
| 234 |
+
{
|
| 235 |
+
"type": "text",
|
| 236 |
+
"text": "2 Related Work ",
|
| 237 |
+
"text_level": 1,
|
| 238 |
+
"bbox": [
|
| 239 |
+
174,
|
| 240 |
+
695,
|
| 241 |
+
321,
|
| 242 |
+
712
|
| 243 |
+
],
|
| 244 |
+
"page_idx": 1
|
| 245 |
+
},
|
| 246 |
+
{
|
| 247 |
+
"type": "text",
|
| 248 |
+
"text": "As discussed in the previous section, large Transformer models brings significant improvements in performance, as seen in models such as GPT-3 [3, 17] or T5 [44, 30]. Training and inference incur a high computational cost at the scale of hundreds of billions of parameters. Numerous techniques improve the efficiency of Transformer models, and Gupta and Agrawal [11] divide them into several classes, including pruning, knowledge distillation, quantization, parameter sharing, efficient attention, and efficient feedforward. ",
|
| 249 |
+
"bbox": [
|
| 250 |
+
174,
|
| 251 |
+
727,
|
| 252 |
+
825,
|
| 253 |
+
810
|
| 254 |
+
],
|
| 255 |
+
"page_idx": 1
|
| 256 |
+
},
|
| 257 |
+
{
|
| 258 |
+
"type": "text",
|
| 259 |
+
"text": "Model compression. Model pruning [24, 2] makes matrices smaller by removing unneeded weights after or during training, however, the gains in computational complexity on sparse matrices often do not result in inference speedups on actual hardware [9]. Structured pruning based approaches [47, 22, 43] account for this challenge by leveraging sparsity in hardware in CPU and GPU architectures [1]. Our paper is different from pruning approaches in that it relies on dynamic sparsity wherein the feedforward layer loads only a subset of weights in the layer for each token. Our approach is complementary to model quantization studies [35, 38, 28] that use fewer bits for the weights. ",
|
| 260 |
+
"bbox": [
|
| 261 |
+
174,
|
| 262 |
+
816,
|
| 263 |
+
823,
|
| 264 |
+
845
|
| 265 |
+
],
|
| 266 |
+
"page_idx": 1
|
| 267 |
+
},
|
| 268 |
+
{
|
| 269 |
+
"type": "text",
|
| 270 |
+
"text": "",
|
| 271 |
+
"bbox": [
|
| 272 |
+
174,
|
| 273 |
+
92,
|
| 274 |
+
825,
|
| 275 |
+
160
|
| 276 |
+
],
|
| 277 |
+
"page_idx": 2
|
| 278 |
+
},
|
| 279 |
+
{
|
| 280 |
+
"type": "text",
|
| 281 |
+
"text": "Model distillation. Several natural language models used for mobile inference [13, 39] rely on distillation [32] to speed up inference from the pretrained large models. For example, [18] pretrains a large model and uses knowledge distillation along with pruning to get more than 10x faster inference. Instead of distilling a large model, our approach speeds up inference by reducing the number of weights loaded in memory from the model. ",
|
| 282 |
+
"bbox": [
|
| 283 |
+
174,
|
| 284 |
+
166,
|
| 285 |
+
825,
|
| 286 |
+
236
|
| 287 |
+
],
|
| 288 |
+
"page_idx": 2
|
| 289 |
+
},
|
| 290 |
+
{
|
| 291 |
+
"type": "text",
|
| 292 |
+
"text": "Sparse attention. Sparse attention-based approaches have made the attention layer more efficient, especially for long sequences, by incorporating additional combinatorial mechanisms, as in [40], or selecting a subset of tokens this layer attends to [31, 5, 19, 37, 15, 4] or other approaches [12]. Our work is complementary to these approaches for sparse attention and reuses the advances on SOTA therein. Inference speedups in the attention layers also use bottleneck layers [39] or grouped convolutions [13]. Our work extends beyond the idea of grouped convolutions approach because each attention head is limited to using only a fixed part of the embedding while our work is able to permute the embeddings to improve model quality; see Section 3.2 for details. ",
|
| 293 |
+
"bbox": [
|
| 294 |
+
173,
|
| 295 |
+
242,
|
| 296 |
+
825,
|
| 297 |
+
353
|
| 298 |
+
],
|
| 299 |
+
"page_idx": 2
|
| 300 |
+
},
|
| 301 |
+
{
|
| 302 |
+
"type": "text",
|
| 303 |
+
"text": "Tensor Decomposition. The approaches discussed above significantly improve Transformer speed and handling of long sequences, however none of them addresses the fundamental scaling issue: even if we distill into a smaller model, quantize it and prune a percentage of the weights, the complexity still grows quadratically with $d _ { \\mathrm { m o d e l } }$ . The final approach, which does attack this scaling issue, is called tensor decompositions in [11]. Unluckily, as the authors there note, the approach is most effective in dealing with large input and output embedding matrices and tends to produce lower performance than unstructured models if used inside the decoder block. ",
|
| 304 |
+
"bbox": [
|
| 305 |
+
174,
|
| 306 |
+
359,
|
| 307 |
+
825,
|
| 308 |
+
457
|
| 309 |
+
],
|
| 310 |
+
"page_idx": 2
|
| 311 |
+
},
|
| 312 |
+
{
|
| 313 |
+
"type": "text",
|
| 314 |
+
"text": "Sparse feedforward. Mixture of experts approaches have been shown to achieve computational efficiency in training [33, 21, 34], scaling up to a trillion parameters [8]. The key idea is to partition the $d _ { \\mathrm { f f } }$ -sized dimension into parts (called experts) and retrieve only one part per token, which reduces the complexity of the feedforward block from $2 d _ { \\mathrm { m o d e l } } d _ { \\mathrm { f f } }$ to $2 d _ { \\mathrm { m o d e l } } d _ { \\mathrm { f f } } / n _ { \\mathrm { e x p e r t s } }$ . These speedups are mostly measured in training speed, and the method focuses on feedforward blocks. In contrast to prior methods, we train a full weight matrix and then only activate specific parts of it for each input token during decoding; see Section 3.1. ",
|
| 315 |
+
"bbox": [
|
| 316 |
+
174,
|
| 317 |
+
463,
|
| 318 |
+
825,
|
| 319 |
+
560
|
| 320 |
+
],
|
| 321 |
+
"page_idx": 2
|
| 322 |
+
},
|
| 323 |
+
{
|
| 324 |
+
"type": "text",
|
| 325 |
+
"text": "3 Sparse is Enough ",
|
| 326 |
+
"text_level": 1,
|
| 327 |
+
"bbox": [
|
| 328 |
+
174,
|
| 329 |
+
580,
|
| 330 |
+
349,
|
| 331 |
+
598
|
| 332 |
+
],
|
| 333 |
+
"page_idx": 2
|
| 334 |
+
},
|
| 335 |
+
{
|
| 336 |
+
"type": "text",
|
| 337 |
+
"text": "We study how to sparsify every part of the Transformer model—otherwise the non-sparse parts dominate decoding time and become a bottleneck. This means we need sparse equivalents for the feedforward blocks, for the dense Q, K, V and output layers in attention, and for the final dense layer before the softmax and loss. ",
|
| 338 |
+
"bbox": [
|
| 339 |
+
174,
|
| 340 |
+
613,
|
| 341 |
+
825,
|
| 342 |
+
669
|
| 343 |
+
],
|
| 344 |
+
"page_idx": 2
|
| 345 |
+
},
|
| 346 |
+
{
|
| 347 |
+
"type": "text",
|
| 348 |
+
"text": "3.1 Sparse Feedforward Layer ",
|
| 349 |
+
"text_level": 1,
|
| 350 |
+
"bbox": [
|
| 351 |
+
176,
|
| 352 |
+
686,
|
| 353 |
+
398,
|
| 354 |
+
702
|
| 355 |
+
],
|
| 356 |
+
"page_idx": 2
|
| 357 |
+
},
|
| 358 |
+
{
|
| 359 |
+
"type": "text",
|
| 360 |
+
"text": "In a baseline Transformer, decoding speed is dominated by the execution cost of the feedforward block. Recall that this block consists of two fully-connected (dense) layers with a ReLU nonlinearity in between. The dimensionality of activation vectors between these 2 layers is usually denoted by $d _ { \\mathrm { f f } }$ and is often 4 or 8 times larger than the dimensionality of the activations in other places $[ d _ { \\mathrm { m o d e l } } ]$ ). ",
|
| 361 |
+
"bbox": [
|
| 362 |
+
174,
|
| 363 |
+
713,
|
| 364 |
+
825,
|
| 365 |
+
768
|
| 366 |
+
],
|
| 367 |
+
"page_idx": 2
|
| 368 |
+
},
|
| 369 |
+
{
|
| 370 |
+
"type": "text",
|
| 371 |
+
"text": "We make use of the structure of the feedforward block to sparsify it. One main observation is that the ReLU in the middle creates a lot of zeros2. We impose a fixed structure on this middle activation vector: only one float in every block of $N$ will be allowed to be non-zero. Prior techniques prune weights or blocks from weight matrices and can be referred to as static sparsity. Our proposed technique will train a full weight matrix but only activate specific parts of it for each input token during decoding. We call this dynamic sparsity, because the model dynamically selects only a fraction of its parameters, and the selection is independent for each token. ",
|
| 372 |
+
"bbox": [
|
| 373 |
+
173,
|
| 374 |
+
775,
|
| 375 |
+
825,
|
| 376 |
+
872
|
| 377 |
+
],
|
| 378 |
+
"page_idx": 2
|
| 379 |
+
},
|
| 380 |
+
{
|
| 381 |
+
"type": "image",
|
| 382 |
+
"img_path": "images/593137b37c83d7df86f494b50bcc2a998301a4b5b86badfe59a0fd29bcaaa3c8.jpg",
|
| 383 |
+
"image_caption": [
|
| 384 |
+
"Figure 2: (a) Sparse Feedforward Layer only activates 1 in N rows/columns of each block to reduce the decoding time. Here only two rows/colums in blocks of size 4 are loaded while the weights in dark red are not loaded from memory during inference. (b) Sparse Feedforward Controller with the output of 2 blocks of size 4 (1 in 4 sparsity). "
|
| 385 |
+
],
|
| 386 |
+
"image_footnote": [],
|
| 387 |
+
"bbox": [
|
| 388 |
+
181,
|
| 389 |
+
87,
|
| 390 |
+
789,
|
| 391 |
+
268
|
| 392 |
+
],
|
| 393 |
+
"page_idx": 3
|
| 394 |
+
},
|
| 395 |
+
{
|
| 396 |
+
"type": "text",
|
| 397 |
+
"text": "We train a controller to determine which activation in each block can be non-zero; the rest will be set to zero. This can be represented as ",
|
| 398 |
+
"bbox": [
|
| 399 |
+
174,
|
| 400 |
+
363,
|
| 401 |
+
823,
|
| 402 |
+
392
|
| 403 |
+
],
|
| 404 |
+
"page_idx": 3
|
| 405 |
+
},
|
| 406 |
+
{
|
| 407 |
+
"type": "equation",
|
| 408 |
+
"img_path": "images/258b63e35851013b6c8889410dc534e3a910a76688978c359a14b879a0ec28f0.jpg",
|
| 409 |
+
"text": "$$\n\\begin{array} { c } { Y _ { \\mathrm { s p a r s e } } = \\operatorname* { m a x } ( 0 , x W _ { 1 } + b _ { 1 } ) \\odot \\mathrm { C o n t r o l l e r } ( x ) } \\\\ { \\mathrm { S p a r s e F F N } ( x ) = Y _ { \\mathrm { s p a r s e } } W _ { 2 } + b _ { 2 } } \\end{array}\n$$",
|
| 410 |
+
"text_format": "latex",
|
| 411 |
+
"bbox": [
|
| 412 |
+
348,
|
| 413 |
+
398,
|
| 414 |
+
650,
|
| 415 |
+
440
|
| 416 |
+
],
|
| 417 |
+
"page_idx": 3
|
| 418 |
+
},
|
| 419 |
+
{
|
| 420 |
+
"type": "text",
|
| 421 |
+
"text": "where $\\odot$ is element-wise multiplication. Note that each activation in $Y _ { \\mathrm { s p a r s e } }$ corresponds to a single column in $W _ { 1 }$ and a single row in $W _ { 2 }$ . Therefore, if we compute Controller $( x )$ output first, we don’t have to use any columns in $W _ { 1 }$ or any rows in $W _ { 2 }$ that correspond to an activation set to zero by the controller. This allows for much faster decoding, as we have to process only 1 in $N$ columns in $W _ { 1 }$ and rows in $W _ { 2 }$ (see Figure 2(a)). ",
|
| 422 |
+
"bbox": [
|
| 423 |
+
174,
|
| 424 |
+
445,
|
| 425 |
+
825,
|
| 426 |
+
516
|
| 427 |
+
],
|
| 428 |
+
"page_idx": 3
|
| 429 |
+
},
|
| 430 |
+
{
|
| 431 |
+
"type": "text",
|
| 432 |
+
"text": "To design the controller to be computationally inexpensive, we project the input using a low-rank bottleneck dense layer. Figure 2(b) illustrates the controller which produces the output as follows ",
|
| 433 |
+
"bbox": [
|
| 434 |
+
173,
|
| 435 |
+
521,
|
| 436 |
+
825,
|
| 437 |
+
550
|
| 438 |
+
],
|
| 439 |
+
"page_idx": 3
|
| 440 |
+
},
|
| 441 |
+
{
|
| 442 |
+
"type": "equation",
|
| 443 |
+
"img_path": "images/3911bc8776a700476aaf11d9f08ad9adecb9d759dc7da64d599320fab7781467.jpg",
|
| 444 |
+
"text": "$$\n\\operatorname { C o n t r o l l e r } ( x ) = \\arg \\operatorname* { m a x } ( \\operatorname { R e s h a p e } ( x C _ { 1 } C _ { 2 } , ( - 1 , N ) ) )\n$$",
|
| 445 |
+
"text_format": "latex",
|
| 446 |
+
"bbox": [
|
| 447 |
+
312,
|
| 448 |
+
558,
|
| 449 |
+
683,
|
| 450 |
+
575
|
| 451 |
+
],
|
| 452 |
+
"page_idx": 3
|
| 453 |
+
},
|
| 454 |
+
{
|
| 455 |
+
"type": "text",
|
| 456 |
+
"text": "where $C _ { 1 } \\in \\mathbb { R } ^ { d _ { \\mathrm { m o d e l } } \\times d _ { \\mathrm { l o w r a n k } } }$ and $C _ { 2 } \\in \\mathbb { R } ^ { d _ { \\mathrm { l o w r a n k } } \\times d _ { \\mathrm { f f } } }$ , with $d _ { \\mathrm { l o w r a n k } }$ usually set to $( d _ { \\mathrm { m o d e l } } / N )$ ",
|
| 457 |
+
"bbox": [
|
| 458 |
+
171,
|
| 459 |
+
583,
|
| 460 |
+
740,
|
| 461 |
+
599
|
| 462 |
+
],
|
| 463 |
+
"page_idx": 3
|
| 464 |
+
},
|
| 465 |
+
{
|
| 466 |
+
"type": "text",
|
| 467 |
+
"text": "During inference the controller uses a discrete argmax function, but during training the model uses a softmax to calculate and sample from a distribution. The model learns to select which row/column will be non-zero using the Gumbel-Softmax trick for discretization. To determine the active row/column in each block, we reparameterize sampling from a Bernoulli distribution by using the Gumbel-Softmax trick [25]. Instead of using the logits in each block to directly sample a binary value, we add independent noise from the Gumbel distribution to each of the logits, and then select the binary value with the highest logit (i.e., argmax) as the sample $z$ . The argmax operation is not differentiable, but it can be approximated by a softmax with annealing temperature. Therefore, on the forward pass, we use the argmax to obtain a binary one-hot vector for each block, while on the backward pass, we approximate it with softmax. This approach is known as the Straight-Through Gumbel-Softmax estimator [14]. ",
|
| 468 |
+
"bbox": [
|
| 469 |
+
173,
|
| 470 |
+
604,
|
| 471 |
+
826,
|
| 472 |
+
757
|
| 473 |
+
],
|
| 474 |
+
"page_idx": 3
|
| 475 |
+
},
|
| 476 |
+
{
|
| 477 |
+
"type": "text",
|
| 478 |
+
"text": "Ablations. We investigate the impact of sparse FF on the model equivalent to T5-large with varying levels of sparsity, with $d _ { \\mathrm { m o d e l } } = 1 0 2 4$ , $d _ { \\mathrm { f f } } = 4 0 9 6$ , and 16 attention heads. When we set the sparsity level to $N$ (for e.g. $N = 6 4 ,$ ) then every block of size $N$ has one non-zero value activated for inference. During training, the controller uses the bottleneck layer with $d _ { \\mathrm { l o w r a n k } } = 6 4$ and temperature of Gumbel softmax estimator set to 0.1. To improve training stability, the controller in the forward pass will use the output of argmax that is a binary one-hot vector for each block with a probability of $30 \\%$ and otherwise it uses the output of softmax. Table 2 and Figure 3 show the perplexity and the decoding time of this model with varying levels of sparsity in feedforward layer. As the level of sparsity increases from 0 to 128, we observe a significant decrease in the decoding time, while the neg-log-perplexity of the model with $N = 6 4$ sparsity is comparable to the baseline. ",
|
| 479 |
+
"bbox": [
|
| 480 |
+
174,
|
| 481 |
+
772,
|
| 482 |
+
825,
|
| 483 |
+
911
|
| 484 |
+
],
|
| 485 |
+
"page_idx": 3
|
| 486 |
+
},
|
| 487 |
+
{
|
| 488 |
+
"type": "table",
|
| 489 |
+
"img_path": "images/59a0caa67c078970b8179c0f14bb2ee897f1f8f081bff91d7ce5c6341961d654.jpg",
|
| 490 |
+
"table_caption": [
|
| 491 |
+
"Table 2: Decoding time of a singe token decreases with increasing level of sparsity in the FF layer. "
|
| 492 |
+
],
|
| 493 |
+
"table_footnote": [],
|
| 494 |
+
"table_body": "<table><tr><td></td><td>Dec. time</td></tr><tr><td>baseline</td><td>0.160s</td></tr><tr><td>Sparse FF 64</td><td>0.093s</td></tr><tr><td>Sparse FF128</td><td>0.089s</td></tr></table>",
|
| 495 |
+
"bbox": [
|
| 496 |
+
232,
|
| 497 |
+
160,
|
| 498 |
+
433,
|
| 499 |
+
219
|
| 500 |
+
],
|
| 501 |
+
"page_idx": 4
|
| 502 |
+
},
|
| 503 |
+
{
|
| 504 |
+
"type": "image",
|
| 505 |
+
"img_path": "images/325586019a9397c4c24719cbbf8ae82f255474439f3841bab69231222830e4ce.jpg",
|
| 506 |
+
"image_caption": [
|
| 507 |
+
"Figure 3: Log-perplexity of Scaling Transformers with Sparse Feedforward layer is very similar to dense baseline for sparsity level $N = 6 4$ but degrades slightly for $N { = } I 2 8$ . "
|
| 508 |
+
],
|
| 509 |
+
"image_footnote": [],
|
| 510 |
+
"bbox": [
|
| 511 |
+
457,
|
| 512 |
+
89,
|
| 513 |
+
774,
|
| 514 |
+
217
|
| 515 |
+
],
|
| 516 |
+
"page_idx": 4
|
| 517 |
+
},
|
| 518 |
+
{
|
| 519 |
+
"type": "text",
|
| 520 |
+
"text": "We also checked the performance of the feedforward block with Mixture-of-Experts [33] style sparsity. As expected, this technique achieved decoding time comparable to sparse FF – 0.11s instead of $0 . 0 9 s$ – but with its lack of granularity it achieved log-perplexity of 1.64, worse than both our method and the dense baseline. ",
|
| 521 |
+
"bbox": [
|
| 522 |
+
173,
|
| 523 |
+
306,
|
| 524 |
+
825,
|
| 525 |
+
363
|
| 526 |
+
],
|
| 527 |
+
"page_idx": 4
|
| 528 |
+
},
|
| 529 |
+
{
|
| 530 |
+
"type": "text",
|
| 531 |
+
"text": "3.2 Sparse QKV Layer ",
|
| 532 |
+
"text_level": 1,
|
| 533 |
+
"bbox": [
|
| 534 |
+
174,
|
| 535 |
+
378,
|
| 536 |
+
346,
|
| 537 |
+
395
|
| 538 |
+
],
|
| 539 |
+
"page_idx": 4
|
| 540 |
+
},
|
| 541 |
+
{
|
| 542 |
+
"type": "text",
|
| 543 |
+
"text": "The decoding speed for a model with sparse feedforward blocks is dominated next by the query, key, value and output computation—the dense layers in attention, which we jointly call a QKV layer. Each of these dense layers has $d _ { \\mathrm { m o d e l } } ^ { 2 }$ parameters and computation cost. Unfortunately, QKV layers don’t have ReLUs, so the method used above to sparsify feedforward blocks is not viable here. ",
|
| 544 |
+
"bbox": [
|
| 545 |
+
174,
|
| 546 |
+
404,
|
| 547 |
+
825,
|
| 548 |
+
460
|
| 549 |
+
],
|
| 550 |
+
"page_idx": 4
|
| 551 |
+
},
|
| 552 |
+
{
|
| 553 |
+
"type": "text",
|
| 554 |
+
"text": "To make QKV layers sparse, we subdivide the dimensionality of the layer, $d _ { \\mathrm { m o d e l } }$ , into $S$ modules of size $M = d _ { \\mathrm { m o d e l } } / S$ , similar to splitting an activation vector into multiple heads. These modules can be processed with a convolutional layer with fewer weights and faster computation. However, with na¨ıve design each module (and corresponding attention head) could access only a small part of a given token embedding. To alleviate that, we develop a multiplicative layer that can represent an arbitrary permutation and has fewer parameters and lower computation time than a dense layer. This multiplicative layer is inserted right before the convolutional layer, letting each head access any part of the embedding (see Figure 4(a)). This solution yields well-performing models that also decode fast. ",
|
| 555 |
+
"bbox": [
|
| 556 |
+
173,
|
| 557 |
+
465,
|
| 558 |
+
825,
|
| 559 |
+
592
|
| 560 |
+
],
|
| 561 |
+
"page_idx": 4
|
| 562 |
+
},
|
| 563 |
+
{
|
| 564 |
+
"type": "text",
|
| 565 |
+
"text": "Multiplicative dense layer. Our new multiplicative dense layer can represent an arbitrary permutation and has $d _ { \\mathrm { m o d e l } } ^ { 2 } / S + \\bar { d } _ { \\mathrm { m o d e l } } S$ parameters, dependent on the sparsity hyperparameter $S$ . It processes an input vector $\\mathbf { x } \\in \\mathbb { R } ^ { d _ { \\mathrm { m o d e l } } }$ by splitting it into S “modules” of size $M = d _ { \\mathrm { m o d e l } } / S$ . It produces output $\\mathbf { y } \\in \\mathring { \\mathbb { R } } ^ { S \\times M }$ as follows ",
|
| 566 |
+
"bbox": [
|
| 567 |
+
173,
|
| 568 |
+
606,
|
| 569 |
+
825,
|
| 570 |
+
662
|
| 571 |
+
],
|
| 572 |
+
"page_idx": 4
|
| 573 |
+
},
|
| 574 |
+
{
|
| 575 |
+
"type": "equation",
|
| 576 |
+
"img_path": "images/eb159e5aed49b02bddd6780f75dd6142b4b72a37eb08c637a0ded94c55267520.jpg",
|
| 577 |
+
"text": "$$\n\\mathrm { y } _ { s , m } = \\sum _ { i } \\mathrm { x } _ { i } D _ { i , s } E _ { i , m }\n$$",
|
| 578 |
+
"text_format": "latex",
|
| 579 |
+
"bbox": [
|
| 580 |
+
418,
|
| 581 |
+
661,
|
| 582 |
+
576,
|
| 583 |
+
695
|
| 584 |
+
],
|
| 585 |
+
"page_idx": 4
|
| 586 |
+
},
|
| 587 |
+
{
|
| 588 |
+
"type": "text",
|
| 589 |
+
"text": "where the two weight matrices are $D \\in \\mathbb { R } ^ { d _ { \\mathrm { m o d e l } } \\times S }$ , and $E \\in \\mathbb { R } ^ { d _ { \\mathrm { m o d e l } } \\times M }$ (see Figure 4(b)). This layer executes significantly faster during inference because of the decreased number of parameters which need to be loaded from memory. Unless stated otherwise, we use $S = 1 6$ . ",
|
| 590 |
+
"bbox": [
|
| 591 |
+
174,
|
| 592 |
+
696,
|
| 593 |
+
825,
|
| 594 |
+
741
|
| 595 |
+
],
|
| 596 |
+
"page_idx": 4
|
| 597 |
+
},
|
| 598 |
+
{
|
| 599 |
+
"type": "text",
|
| 600 |
+
"text": "The multiplicative layer is designed primarily to represent any permutation, so that each attention head can access information from any part of the embedding. We first verify that the multiplicative layer can indeed represent an arbitrary permutation (the proof is presented in the Appendix). ",
|
| 601 |
+
"bbox": [
|
| 602 |
+
174,
|
| 603 |
+
747,
|
| 604 |
+
825,
|
| 605 |
+
790
|
| 606 |
+
],
|
| 607 |
+
"page_idx": 4
|
| 608 |
+
},
|
| 609 |
+
{
|
| 610 |
+
"type": "text",
|
| 611 |
+
"text": "Theorem 1. For any bijective function $f : \\{ 1 \\cdots d _ { m o d e l } \\} \\Rightarrow \\{ 1 \\cdots S \\} \\times \\{ 1 \\cdots M \\}$ there exists $a$ pair of weights of multiplicative layer $D$ , $E$ such that $x _ { i } = y _ { s , m }$ for $\\{ s , m \\} = f ( i )$ . ",
|
| 612 |
+
"bbox": [
|
| 613 |
+
173,
|
| 614 |
+
792,
|
| 615 |
+
821,
|
| 616 |
+
824
|
| 617 |
+
],
|
| 618 |
+
"page_idx": 4
|
| 619 |
+
},
|
| 620 |
+
{
|
| 621 |
+
"type": "text",
|
| 622 |
+
"text": "Convolutional layer. The output of the multiplicative layer is a tensor of type/shape $\\in$ Rbatch×length×S×M . We process this tensor with a two-dimensional convolutional layer, treating the length dimension and number of modules $S$ like height and width of an image. This layer uses $M$ filters and a kernel size of $F \\times F$ so that each filter looks at $F$ modules ( $\\mathbf { \\partial } ^ { \\ast } \\mathbf { S } ^ { \\ast }$ axis) of the last $F$ tokens (‘length’ axis). Replacing the standard dense layer with such a convolution reduces the parameter count and computation time of the QKV layer. At the same time, by convolving over the ‘length’ axis, the model can incorporate more context into this computation [23]. ",
|
| 623 |
+
"bbox": [
|
| 624 |
+
174,
|
| 625 |
+
842,
|
| 626 |
+
825,
|
| 627 |
+
911
|
| 628 |
+
],
|
| 629 |
+
"page_idx": 4
|
| 630 |
+
},
|
| 631 |
+
{
|
| 632 |
+
"type": "image",
|
| 633 |
+
"img_path": "images/ed65a04b556b2c7f59046221bc1abec14f54e58c97b0ccf5209a23b0145f85a8.jpg",
|
| 634 |
+
"image_caption": [
|
| 635 |
+
"Figure 4: (a) Multiplicative layer can represent an arbitrary permutation, but has fewer parameters and reduced computation time compared to a dense layer. (b) Sparse QKV layer replaces $Q , K ,$ , and $V$ dense layers by composing multiplicative and convolutional layers and reducing the number of parameters and decoding time. "
|
| 636 |
+
],
|
| 637 |
+
"image_footnote": [],
|
| 638 |
+
"bbox": [
|
| 639 |
+
181,
|
| 640 |
+
90,
|
| 641 |
+
802,
|
| 642 |
+
263
|
| 643 |
+
],
|
| 644 |
+
"page_idx": 5
|
| 645 |
+
},
|
| 646 |
+
{
|
| 647 |
+
"type": "text",
|
| 648 |
+
"text": "",
|
| 649 |
+
"bbox": [
|
| 650 |
+
174,
|
| 651 |
+
347,
|
| 652 |
+
821,
|
| 653 |
+
376
|
| 654 |
+
],
|
| 655 |
+
"page_idx": 5
|
| 656 |
+
},
|
| 657 |
+
{
|
| 658 |
+
"type": "text",
|
| 659 |
+
"text": "The output of this layer has the same shape as the input. The optimal value of $S$ is less than $\\sqrt { d _ { \\mathrm { m o d e l } } }$ Empirically we set $F$ to 3, $S$ equal to the number of heads in the attention mechanism and $M$ to be the dimensionality of a single attention head. In this case, we can feed the output of the convolution directly to the attention mechanism without reshaping the output. This convolutional layer has fewer parameters $( 9 M ^ { 2 } + M = F ^ { 2 } ( d _ { \\mathrm { m o d e l } } / S ) ^ { 2 } + ( \\bar { d } _ { \\mathrm { m o d e l } } / S ) )$ , and lower computational complexity $( O ( d _ { \\mathrm { m o d e l } } ^ { 2 } / S ) )$ ). Unless stated otherwise, we use $S = 1 6$ and $F = 3$ . ",
|
| 660 |
+
"bbox": [
|
| 661 |
+
174,
|
| 662 |
+
381,
|
| 663 |
+
825,
|
| 664 |
+
465
|
| 665 |
+
],
|
| 666 |
+
"page_idx": 5
|
| 667 |
+
},
|
| 668 |
+
{
|
| 669 |
+
"type": "text",
|
| 670 |
+
"text": "Combining multiplicative and convolutional layers. There are four dense layers to replace in the original attention mechanism: Q, K, V, and output. As shown in Figure 4(b), we replace Q, K, and $\\mathrm { v }$ dense layers by composing multiplicative and convolutional layers, but with a multiplicative layer shared across all three: $Q = \\mathsf { c o n v } _ { Q } ( \\mathsf { m u l t } ( x ) )$ , $K = \\operatorname { c o n v } _ { K } ( \\operatorname { m u l t } ( x ) )$ , $V = \\mathrm { c o n v } _ { V } ( \\bar { \\mathrm { m u l t } } ( x ) )$ . We remove the output dense layer. Note that the combined multiplicative-convolutional variant has the output dense layer removed, while the other variants have it replaced with their respective sparse layers. Including this output layer negatively impacts decoding time. We can set the parameter √ $S$ to around $\\sqrt { d _ { m o d e l } }$ , getting the number of layer parameters to scale proportionally to $d _ { m o d e l } ^ { 1 . 5 }$ compared to $d _ { m o d e l } ^ { 2 }$ of standard QKV layer. ",
|
| 671 |
+
"bbox": [
|
| 672 |
+
174,
|
| 673 |
+
482,
|
| 674 |
+
826,
|
| 675 |
+
609
|
| 676 |
+
],
|
| 677 |
+
"page_idx": 5
|
| 678 |
+
},
|
| 679 |
+
{
|
| 680 |
+
"type": "text",
|
| 681 |
+
"text": "Interpretation of QKV layer. Note that when parameter $S$ in convolutional layer is equal to the number of heads in the attention mechanism, which is the case in our experiments, then each of the S modules corresponds to a single attention head. Therefore, the model uses the convolution to process each head using the same linear projection. Without the multiplicative layer this projection would operate on a predetermined part of the embedding layer for each head. However, by adding it the model can perform arbitrary permutation of dimensions, so each head can have access to arbitrary subset of embedding dimensions, not a predetermined subset of them. This fact helps with keeping the expressibility of resulting QKV layer despite the reduced number of parameters. ",
|
| 682 |
+
"bbox": [
|
| 683 |
+
173,
|
| 684 |
+
626,
|
| 685 |
+
825,
|
| 686 |
+
737
|
| 687 |
+
],
|
| 688 |
+
"page_idx": 5
|
| 689 |
+
},
|
| 690 |
+
{
|
| 691 |
+
"type": "text",
|
| 692 |
+
"text": "Ablations. We investigate the impact of sparse QKV layers on the model equivalent to T5-large in Figure 5. We increase the value of $d _ { \\mathrm { f f } }$ from 4096 to 6144 to preserve the number of parameters (see the next subsection for details). The decoding time with sparse QKV layer variants is similar to the baseline because it is dominated by the dense feedforward layer (details in appendix). ",
|
| 693 |
+
"bbox": [
|
| 694 |
+
174,
|
| 695 |
+
755,
|
| 696 |
+
825,
|
| 697 |
+
810
|
| 698 |
+
],
|
| 699 |
+
"page_idx": 5
|
| 700 |
+
},
|
| 701 |
+
{
|
| 702 |
+
"type": "text",
|
| 703 |
+
"text": "Combined feedforward and QKV sparsity. Sparse QKV layers lower the total number of model parameters. To keep the model size matched to the baseline, we increase $d _ { \\mathrm { f f } }$ to keep the number of parameters similar across all models we compare. For the T5-Large equivalent model, we increase $d _ { \\mathrm { f f } }$ from 4096 to 6144. With increased $d _ { \\mathrm { f f } }$ , decoding time in the feedforward layer increases and thus, Sparse QKV layers alone do not speed up the model. However, when we combine Sparse QKV layers with sparse FF layers, we get a $3 . 0 5 \\mathrm { x }$ speedup in decoding time of each decoding block with comparable perplexity (see Table 1 and Figure 1). While the baseline these is a vanilla Transformer, the decoding speed is almost the same for a Reformer model as well. ",
|
| 704 |
+
"bbox": [
|
| 705 |
+
174,
|
| 706 |
+
827,
|
| 707 |
+
825,
|
| 708 |
+
911
|
| 709 |
+
],
|
| 710 |
+
"page_idx": 5
|
| 711 |
+
},
|
| 712 |
+
{
|
| 713 |
+
"type": "image",
|
| 714 |
+
"img_path": "images/d213ea3b0b9120e322632b738ce67e83f4326db02f5b68b218cc93b00f9e0dff.jpg",
|
| 715 |
+
"image_caption": [],
|
| 716 |
+
"image_footnote": [],
|
| 717 |
+
"bbox": [
|
| 718 |
+
308,
|
| 719 |
+
98,
|
| 720 |
+
691,
|
| 721 |
+
247
|
| 722 |
+
],
|
| 723 |
+
"page_idx": 6
|
| 724 |
+
},
|
| 725 |
+
{
|
| 726 |
+
"type": "table",
|
| 727 |
+
"img_path": "images/acdb8d778534c3dacf7860f8e945aa587869fa165f5ff181904a258d7e683be8.jpg",
|
| 728 |
+
"table_caption": [
|
| 729 |
+
"Figure 5: Log-perplexity of Scaling Transformers with Sparse QKV with different sparsity levels (S) and kernel sizes (F) is very similar to dense baseline within variance while multi-layer even improves perplexity. ",
|
| 730 |
+
"Table 3: Accuracy of Scaling Transformer model and Terraformer model with sparse $Q K V + F F$ is comparable to the baseline Transformer within variance. The results are obtained by fine-tuning on selected downstream tasks from the GLUE dataset (validation split). "
|
| 731 |
+
],
|
| 732 |
+
"table_footnote": [],
|
| 733 |
+
"table_body": "<table><tr><td></td><td>RTE</td><td>MRPC</td><td>SST-2</td><td>QNLI</td><td>MNLI-m</td><td>QQP</td></tr><tr><td>Baseline Transformer (dense)</td><td>70.1 ± 1.1</td><td>83.6±0.72</td><td>92.6±0.85</td><td>88.6±0.5</td><td>78.5 ± 0.41</td><td>85.2±0.6</td></tr><tr><td>Scaling Transformer (Sparse FF+QKV)</td><td>68.4</td><td>81.2</td><td>91.6</td><td>90.1</td><td>82.9</td><td>89.9</td></tr><tr><td>Terraformer (Sparse FF+QKV)</td><td>66.1</td><td>84.6</td><td>92.3</td><td>88.3</td><td>79.1</td><td>85.5</td></tr></table>",
|
| 734 |
+
"bbox": [
|
| 735 |
+
176,
|
| 736 |
+
305,
|
| 737 |
+
825,
|
| 738 |
+
352
|
| 739 |
+
],
|
| 740 |
+
"page_idx": 6
|
| 741 |
+
},
|
| 742 |
+
{
|
| 743 |
+
"type": "text",
|
| 744 |
+
"text": "",
|
| 745 |
+
"bbox": [
|
| 746 |
+
174,
|
| 747 |
+
428,
|
| 748 |
+
825,
|
| 749 |
+
457
|
| 750 |
+
],
|
| 751 |
+
"page_idx": 6
|
| 752 |
+
},
|
| 753 |
+
{
|
| 754 |
+
"type": "text",
|
| 755 |
+
"text": "Table 3 shows the accuracy of fine-tuning the model for downstream tasks from the GLUE dataset. \nNote that the model with sparseFF $^ +$ QKV achieves accuracy similar to the baseline. ",
|
| 756 |
+
"bbox": [
|
| 757 |
+
173,
|
| 758 |
+
463,
|
| 759 |
+
823,
|
| 760 |
+
491
|
| 761 |
+
],
|
| 762 |
+
"page_idx": 6
|
| 763 |
+
},
|
| 764 |
+
{
|
| 765 |
+
"type": "text",
|
| 766 |
+
"text": "3.3 Sparse loss layer. ",
|
| 767 |
+
"text_level": 1,
|
| 768 |
+
"bbox": [
|
| 769 |
+
174,
|
| 770 |
+
508,
|
| 771 |
+
330,
|
| 772 |
+
522
|
| 773 |
+
],
|
| 774 |
+
"page_idx": 6
|
| 775 |
+
},
|
| 776 |
+
{
|
| 777 |
+
"type": "text",
|
| 778 |
+
"text": "A final dense layer maps the model embedding into vocabulary size to compute the loss. We can sparsify this part of the model by replacing the dense layer with a multiplicative layer similar to previous sections; this speeds up decoding time but may degrade perplexity. The results are presented in appendix. ",
|
| 779 |
+
"bbox": [
|
| 780 |
+
174,
|
| 781 |
+
534,
|
| 782 |
+
825,
|
| 783 |
+
588
|
| 784 |
+
],
|
| 785 |
+
"page_idx": 6
|
| 786 |
+
},
|
| 787 |
+
{
|
| 788 |
+
"type": "text",
|
| 789 |
+
"text": "4 Sparsity for Long Sequences ",
|
| 790 |
+
"text_level": 1,
|
| 791 |
+
"bbox": [
|
| 792 |
+
174,
|
| 793 |
+
608,
|
| 794 |
+
442,
|
| 795 |
+
626
|
| 796 |
+
],
|
| 797 |
+
"page_idx": 6
|
| 798 |
+
},
|
| 799 |
+
{
|
| 800 |
+
"type": "text",
|
| 801 |
+
"text": "The above gains from sparsifying the dense layers are encouraging, but we omitted one fundamental issue. When applied to longer sequences, the gains would effectively be lost, as the decoding time will be dominated by attention operations. Luckily, a number of methods have been proposed to solve this problem for Transformers, see [41] for a survey. We focus on the LSH (Locality-Sensitive Hashing) attention from Reformer [19] and show how to integrate this sparse attention mechanism, as well as recurrent blocks, into a Scaling Transformer, yielding a Terraformer. ",
|
| 802 |
+
"bbox": [
|
| 803 |
+
174,
|
| 804 |
+
640,
|
| 805 |
+
825,
|
| 806 |
+
723
|
| 807 |
+
],
|
| 808 |
+
"page_idx": 6
|
| 809 |
+
},
|
| 810 |
+
{
|
| 811 |
+
"type": "text",
|
| 812 |
+
"text": "4.1 Architecture for Long Sequences ",
|
| 813 |
+
"text_level": 1,
|
| 814 |
+
"bbox": [
|
| 815 |
+
176,
|
| 816 |
+
739,
|
| 817 |
+
441,
|
| 818 |
+
755
|
| 819 |
+
],
|
| 820 |
+
"page_idx": 6
|
| 821 |
+
},
|
| 822 |
+
{
|
| 823 |
+
"type": "text",
|
| 824 |
+
"text": "While integrating sparse attention layers into a Scaling Transformer, we notice that the architecture of the Transformer decoder block is suboptimal and can be redesigned to make a better use of these layers. In particular, separating decoder self-attention and encoder-decoder attention is not necessary any more from the perspective of efficiency. We therefore remove the encoder-decoder attention, but just concatenate the encoder representations before the decoder tokens. Doing this alone isn’t enough though, since we took away one attention mechanism (encoder-decoder attention). We remedy this by having two attention mechanisms before the feedforward block. This simple architecture is as fast as the baseline Transformer while giving better results. ",
|
| 825 |
+
"bbox": [
|
| 826 |
+
173,
|
| 827 |
+
765,
|
| 828 |
+
825,
|
| 829 |
+
877
|
| 830 |
+
],
|
| 831 |
+
"page_idx": 6
|
| 832 |
+
},
|
| 833 |
+
{
|
| 834 |
+
"type": "text",
|
| 835 |
+
"text": "Putting this together, if $v _ { e n c }$ are the encoder activations and $v _ { d e c }$ are the decoder embeddings, the input to the decoder block $x$ is their concatenation on the length axis, LengthConcat $( v _ { e n c } , v _ { d e c } )$ ",
|
| 836 |
+
"bbox": [
|
| 837 |
+
173,
|
| 838 |
+
883,
|
| 839 |
+
823,
|
| 840 |
+
911
|
| 841 |
+
],
|
| 842 |
+
"page_idx": 6
|
| 843 |
+
},
|
| 844 |
+
{
|
| 845 |
+
"type": "image",
|
| 846 |
+
"img_path": "images/c33fc9a375a89405da213d5f7e099e81d61fcb06b416d970b6743d31d5fa33ad.jpg",
|
| 847 |
+
"image_caption": [
|
| 848 |
+
"Figure 6: Reversible decoder block in Terraformer. "
|
| 849 |
+
],
|
| 850 |
+
"image_footnote": [],
|
| 851 |
+
"bbox": [
|
| 852 |
+
274,
|
| 853 |
+
99,
|
| 854 |
+
714,
|
| 855 |
+
175
|
| 856 |
+
],
|
| 857 |
+
"page_idx": 7
|
| 858 |
+
},
|
| 859 |
+
{
|
| 860 |
+
"type": "text",
|
| 861 |
+
"text": "Each decoder block can be represented as: ",
|
| 862 |
+
"bbox": [
|
| 863 |
+
173,
|
| 864 |
+
231,
|
| 865 |
+
452,
|
| 866 |
+
246
|
| 867 |
+
],
|
| 868 |
+
"page_idx": 7
|
| 869 |
+
},
|
| 870 |
+
{
|
| 871 |
+
"type": "equation",
|
| 872 |
+
"img_path": "images/8792900ca13c55513b8088015fa99c740c6efdeac6dbaedfa5ff05d5be190eb1.jpg",
|
| 873 |
+
"text": "$$\n\\begin{array} { r l } & { y _ { 1 } = \\ x + \\mathrm { D r o p o u t } ( \\mathrm { A t t e n t i o n } ( \\mathrm { L a y e r N o r m } ( x ) ) ) } \\\\ & { y _ { 2 } = y _ { 1 } + \\mathrm { D r o p o u t } ( \\mathrm { A t t e n t i o n } ( \\mathrm { L a y e r N o r m } ( y _ { 1 } ) ) ) } \\\\ & { \\ y = y _ { 2 } + \\mathrm { F F N } ( y _ { 2 } ) } \\end{array}\n$$",
|
| 874 |
+
"text_format": "latex",
|
| 875 |
+
"bbox": [
|
| 876 |
+
336,
|
| 877 |
+
252,
|
| 878 |
+
658,
|
| 879 |
+
314
|
| 880 |
+
],
|
| 881 |
+
"page_idx": 7
|
| 882 |
+
},
|
| 883 |
+
{
|
| 884 |
+
"type": "text",
|
| 885 |
+
"text": "where $y$ becomes the input to the next decoder layer. See the appendix for a full diagram of the resulting architecture. ",
|
| 886 |
+
"bbox": [
|
| 887 |
+
176,
|
| 888 |
+
320,
|
| 889 |
+
821,
|
| 890 |
+
348
|
| 891 |
+
],
|
| 892 |
+
"page_idx": 7
|
| 893 |
+
},
|
| 894 |
+
{
|
| 895 |
+
"type": "text",
|
| 896 |
+
"text": "4.2 Reversibility for Memory Efficiency ",
|
| 897 |
+
"text_level": 1,
|
| 898 |
+
"bbox": [
|
| 899 |
+
176,
|
| 900 |
+
367,
|
| 901 |
+
462,
|
| 902 |
+
382
|
| 903 |
+
],
|
| 904 |
+
"page_idx": 7
|
| 905 |
+
},
|
| 906 |
+
{
|
| 907 |
+
"type": "text",
|
| 908 |
+
"text": "To enable training Terraformer with large batches, and to fine-tune even large models on single machines, we apply ideas from the Reformer [19], in particular, reversible layers for the encoder and decoder blocks. ",
|
| 909 |
+
"bbox": [
|
| 910 |
+
176,
|
| 911 |
+
393,
|
| 912 |
+
825,
|
| 913 |
+
434
|
| 914 |
+
],
|
| 915 |
+
"page_idx": 7
|
| 916 |
+
},
|
| 917 |
+
{
|
| 918 |
+
"type": "text",
|
| 919 |
+
"text": "The original Reformer decoder block contained feedforward and attention layers in a 1-1 ratio. In the Terraformer architecture, as described above, there are two attention layers in the decoder block, so there are three swaps in the reversible layers in the decoder block (see Figure 6). In our experiments, this significantly improved performance. ",
|
| 920 |
+
"bbox": [
|
| 921 |
+
174,
|
| 922 |
+
440,
|
| 923 |
+
825,
|
| 924 |
+
497
|
| 925 |
+
],
|
| 926 |
+
"page_idx": 7
|
| 927 |
+
},
|
| 928 |
+
{
|
| 929 |
+
"type": "text",
|
| 930 |
+
"text": "Another issue with reversibility is that it is only formally correct for continuous functions. We find that this is not just a formal issue, but an important problem in practice. To make reversible layers train well with sparsity, we need to store the discrete decisions—i.e., the integers saying which rows to select—and use them for reversing. Recalculating these decisions on the backwards pass leads to worse results. ",
|
| 931 |
+
"bbox": [
|
| 932 |
+
174,
|
| 933 |
+
502,
|
| 934 |
+
825,
|
| 935 |
+
573
|
| 936 |
+
],
|
| 937 |
+
"page_idx": 7
|
| 938 |
+
},
|
| 939 |
+
{
|
| 940 |
+
"type": "text",
|
| 941 |
+
"text": "4.3 Recurrence for Generalization ",
|
| 942 |
+
"text_level": 1,
|
| 943 |
+
"bbox": [
|
| 944 |
+
176,
|
| 945 |
+
590,
|
| 946 |
+
424,
|
| 947 |
+
606
|
| 948 |
+
],
|
| 949 |
+
"page_idx": 7
|
| 950 |
+
},
|
| 951 |
+
{
|
| 952 |
+
"type": "text",
|
| 953 |
+
"text": "In addition to incorporating sparse attention and reversibility, we also add recurrence to the feedforward block of Terraformer. Recurrent layers allow information to propagate in time, even in a single decoder block. It is challenging though to use them without decreasing model speed, esp. in training. For that reason, we use simple recurrent units [20] which parallelize well during training. ",
|
| 954 |
+
"bbox": [
|
| 955 |
+
174,
|
| 956 |
+
617,
|
| 957 |
+
826,
|
| 958 |
+
672
|
| 959 |
+
],
|
| 960 |
+
"page_idx": 7
|
| 961 |
+
},
|
| 962 |
+
{
|
| 963 |
+
"type": "text",
|
| 964 |
+
"text": "SRUs contain dense layers, so their use could negate the benefits of sparsity elsewhere. We tried a few methods to alleviate that, but it turns out that simply reducing the dimensionality of the SRUs works. So we first project from $d _ { \\mathrm { m o d e l } }$ to a small dimension (32 in our experiments), then apply the SRU, and then project back to $d _ { \\mathrm { m o d e l } }$ and add the result to the feedforward block. This low-rank recurrence is in our experiments sufficient to transfer enough information through time for the network to generalize. ",
|
| 965 |
+
"bbox": [
|
| 966 |
+
174,
|
| 967 |
+
679,
|
| 968 |
+
825,
|
| 969 |
+
750
|
| 970 |
+
],
|
| 971 |
+
"page_idx": 7
|
| 972 |
+
},
|
| 973 |
+
{
|
| 974 |
+
"type": "text",
|
| 975 |
+
"text": "Since the effects of SRUs on C4 are minimal (as the training and evaluation data are very similar), we use synthetic tasks to investigate out-of-distribution generalization. We train the models on long addition and on the task of copying a decimal digit. We train on inputs with at most 128 digits and evaluate on inputs lengths from 256 to 300, so over $2 \\mathbf { x }$ longer. As can be seen in the table below, the baseline Transformer does not generalize well, while Terraformer manages to get a large portion correctly, even if it is not perfect like the Neural GPU [16]. ",
|
| 976 |
+
"bbox": [
|
| 977 |
+
174,
|
| 978 |
+
755,
|
| 979 |
+
825,
|
| 980 |
+
839
|
| 981 |
+
],
|
| 982 |
+
"page_idx": 7
|
| 983 |
+
},
|
| 984 |
+
{
|
| 985 |
+
"type": "text",
|
| 986 |
+
"text": "4.4 Experiments ",
|
| 987 |
+
"text_level": 1,
|
| 988 |
+
"bbox": [
|
| 989 |
+
174,
|
| 990 |
+
856,
|
| 991 |
+
302,
|
| 992 |
+
871
|
| 993 |
+
],
|
| 994 |
+
"page_idx": 7
|
| 995 |
+
},
|
| 996 |
+
{
|
| 997 |
+
"type": "text",
|
| 998 |
+
"text": "We designed Terraformer so that the benefits from sparsity would not be lost on long sequences, nor on downstream finetuning tasks. To test this, we chose the task of summarizing scientific papers ",
|
| 999 |
+
"bbox": [
|
| 1000 |
+
174,
|
| 1001 |
+
883,
|
| 1002 |
+
821,
|
| 1003 |
+
911
|
| 1004 |
+
],
|
| 1005 |
+
"page_idx": 7
|
| 1006 |
+
},
|
| 1007 |
+
{
|
| 1008 |
+
"type": "table",
|
| 1009 |
+
"img_path": "images/5b402f71e1a8108260a392fd130b1cc89a4c8a8025c6a16fa6b1629bde782a15.jpg",
|
| 1010 |
+
"table_caption": [
|
| 1011 |
+
"Table 4: Comparison of out-of-distribution generalization for Terraformer and Transformer on two toy tasks, long addition and copying on decimal numbers. Under (seq) we report the number of fully correct sequences generated as answers. "
|
| 1012 |
+
],
|
| 1013 |
+
"table_footnote": [],
|
| 1014 |
+
"table_body": "<table><tr><td>Model</td><td>copy</td><td>copy (seq)</td><td>add</td><td>add (seq)</td></tr><tr><td>Transformer</td><td>79.8%</td><td>0%</td><td>36.4%</td><td>0%</td></tr><tr><td>Terraformer</td><td>99.9%</td><td>93.9%</td><td>86.9%</td><td>32.4%</td></tr></table>",
|
| 1015 |
+
"bbox": [
|
| 1016 |
+
299,
|
| 1017 |
+
88,
|
| 1018 |
+
694,
|
| 1019 |
+
133
|
| 1020 |
+
],
|
| 1021 |
+
"page_idx": 8
|
| 1022 |
+
},
|
| 1023 |
+
{
|
| 1024 |
+
"type": "table",
|
| 1025 |
+
"img_path": "images/385b7cb35fdaa484871228f77deeb89fed297e56fcc529694413f749e767a27e.jpg",
|
| 1026 |
+
"table_caption": [],
|
| 1027 |
+
"table_footnote": [],
|
| 1028 |
+
"table_body": "<table><tr><td>Model</td><td>R-1</td><td>R-2</td><td>R-LSum</td><td>R-LSent</td></tr><tr><td>Terraformer</td><td>45.40</td><td>17.86</td><td>41.21</td><td>26.33</td></tr><tr><td>DANCERRUM</td><td>42.70</td><td>16.54</td><td>38.44</td><td>一</td></tr><tr><td>BIGBIRD-RoBERTa</td><td>41.22</td><td>16.43</td><td>36.96</td><td>1</td></tr><tr><td>Pegasus Large (C4)</td><td>44.21</td><td>16.95</td><td>38.83</td><td>25.67</td></tr><tr><td>DANCERPEGASUS</td><td>45.01</td><td>17.6</td><td>40.56</td><td>一</td></tr><tr><td>BIGBIRD-Pegasus</td><td>46.63</td><td>19.02</td><td>41.77</td><td></td></tr></table>",
|
| 1029 |
+
"bbox": [
|
| 1030 |
+
300,
|
| 1031 |
+
205,
|
| 1032 |
+
696,
|
| 1033 |
+
299
|
| 1034 |
+
],
|
| 1035 |
+
"page_idx": 8
|
| 1036 |
+
},
|
| 1037 |
+
{
|
| 1038 |
+
"type": "text",
|
| 1039 |
+
"text": "Table 5: Terraformer is competitive with strong baselines [46, 45, 10] on the ArXiv summarization task, without using the Pegasus loss and without beam search. On R-1, R-2 and R-LSum, Terraformer outperforms all previous models except for BigBird-Pegasus. ",
|
| 1040 |
+
"bbox": [
|
| 1041 |
+
173,
|
| 1042 |
+
306,
|
| 1043 |
+
823,
|
| 1044 |
+
344
|
| 1045 |
+
],
|
| 1046 |
+
"page_idx": 8
|
| 1047 |
+
},
|
| 1048 |
+
{
|
| 1049 |
+
"type": "text",
|
| 1050 |
+
"text": "using the dataset of scientific papers from arXiv3[6]. In this task, the input is a whole paper—a long sequence—and the model is asked to output its abstract. Several recent papers studied this dataset and tasks and it has been shown [46, 45] that pretraining on C4 yields significant improvements on this task. We also pretrain Terraformer on C4 (like in all experiments in this paper) and fine-tuned it on the arXiv summarization task. We find that Terraformer is competitive with the above baselines, even though we mask single words (we do not use the Pegasus sentence loss) and decode the answers in a greedy way (no beam search). Note that ROUGE scores are computed using open-source scorer4 with the metrics described in its documentation5. We also observe certain confusion between ROUGE-L metrics reported. As noted in the open-source scorer, there are two versions of ROUGEL-SentenceLevel (R-LSent) and ROUGEL-Summary-Level (R-LSum). For clarity, we report both of these metrics. Furthermore we only report the F1 measure of any ROUGE metric. We include a few examples of the generated abstracts in the appendix. ",
|
| 1051 |
+
"bbox": [
|
| 1052 |
+
174,
|
| 1053 |
+
375,
|
| 1054 |
+
825,
|
| 1055 |
+
541
|
| 1056 |
+
],
|
| 1057 |
+
"page_idx": 8
|
| 1058 |
+
},
|
| 1059 |
+
{
|
| 1060 |
+
"type": "text",
|
| 1061 |
+
"text": "We pretrained Terraformer in the same way as all other baselines reported in this paper with the same number of parameters (800M), the same dimensions as mentioned before, and loss sparsity 4 to get the fastest model. Compared to the sparse Transformer model from the previous section that achieves a decoding speed of 0.061s, Terraformer achieves a decoding speed of 0.086s with a similar performance in terms of perplexity (see appendix for details). We also observe that the Terraformer model achieves accuracy similar to the Transformer model in Table 3 for selected downstream tasks on GLUE dataset. ",
|
| 1062 |
+
"bbox": [
|
| 1063 |
+
174,
|
| 1064 |
+
547,
|
| 1065 |
+
825,
|
| 1066 |
+
645
|
| 1067 |
+
],
|
| 1068 |
+
"page_idx": 8
|
| 1069 |
+
},
|
| 1070 |
+
{
|
| 1071 |
+
"type": "text",
|
| 1072 |
+
"text": "Table 6 shows the speedup in decoding with sparse layers when we scale up Terraformer to 17B parameters. Note that sparsifying all the layers gives us $3 7 \\mathrm { x }$ speedup in decoding. ",
|
| 1073 |
+
"bbox": [
|
| 1074 |
+
173,
|
| 1075 |
+
651,
|
| 1076 |
+
823,
|
| 1077 |
+
679
|
| 1078 |
+
],
|
| 1079 |
+
"page_idx": 8
|
| 1080 |
+
},
|
| 1081 |
+
{
|
| 1082 |
+
"type": "text",
|
| 1083 |
+
"text": "5 Conclusion ",
|
| 1084 |
+
"text_level": 1,
|
| 1085 |
+
"bbox": [
|
| 1086 |
+
174,
|
| 1087 |
+
703,
|
| 1088 |
+
299,
|
| 1089 |
+
719
|
| 1090 |
+
],
|
| 1091 |
+
"page_idx": 8
|
| 1092 |
+
},
|
| 1093 |
+
{
|
| 1094 |
+
"type": "text",
|
| 1095 |
+
"text": "When starting to investigate sparse variants of Transformers, we assumed that there would be a price to pay for sparsity—that a sparse model would always underperform a dense one with the same number of parameters. To our surprise, this is not the case: sparse is enough! ",
|
| 1096 |
+
"bbox": [
|
| 1097 |
+
174,
|
| 1098 |
+
736,
|
| 1099 |
+
825,
|
| 1100 |
+
779
|
| 1101 |
+
],
|
| 1102 |
+
"page_idx": 8
|
| 1103 |
+
},
|
| 1104 |
+
{
|
| 1105 |
+
"type": "text",
|
| 1106 |
+
"text": "In our experiments with large models on the C4 dataset, the sparse models match the performance of their dense counterparts while being many times faster at inference. And, when scaling the models up, the benefits of sparsity become even larger. This promises to put Transformers back on a sustainable track and make large models more useful. ",
|
| 1107 |
+
"bbox": [
|
| 1108 |
+
174,
|
| 1109 |
+
785,
|
| 1110 |
+
825,
|
| 1111 |
+
840
|
| 1112 |
+
],
|
| 1113 |
+
"page_idx": 8
|
| 1114 |
+
},
|
| 1115 |
+
{
|
| 1116 |
+
"type": "table",
|
| 1117 |
+
"img_path": "images/832a4fde51386ccebbdd0945dd7d0afffafeb70294fa0994b36e0b4c24bac53b.jpg",
|
| 1118 |
+
"table_caption": [
|
| 1119 |
+
"Table 6: Decoding speed of a single token for Terraformer with 17B parameters is $3 7 x$ faster than a dense baseline model, requiring less than 100ms/token for inference. Here attention-sparsity $= ~ 6 4$ , $\\mathcal { H }$ -sparsity $=$ 256, and loss-sparsity $= 4$ . "
|
| 1120 |
+
],
|
| 1121 |
+
"table_footnote": [],
|
| 1122 |
+
"table_body": "<table><tr><td>Terraformer</td><td>Dec. time</td><td>Speedup</td></tr><tr><td>dense</td><td>3.651s</td><td>1x</td></tr><tr><td>Sparse FF</td><td>1.595s</td><td>2.29x</td></tr><tr><td>SparseFF+QKV</td><td>0.183s</td><td>19.98x</td></tr><tr><td>SparseFF+QKV+loss</td><td>0.097s</td><td>37.64x</td></tr></table>",
|
| 1123 |
+
"bbox": [
|
| 1124 |
+
176,
|
| 1125 |
+
80,
|
| 1126 |
+
498,
|
| 1127 |
+
155
|
| 1128 |
+
],
|
| 1129 |
+
"page_idx": 9
|
| 1130 |
+
},
|
| 1131 |
+
{
|
| 1132 |
+
"type": "text",
|
| 1133 |
+
"text": "The current results have a number of limitations. For one, the practical speedups we see are only for inference, not at training time. Moreover, we consider unbatched inference on CPUs, while often inference is ran in batched mode on GPUs. We believe with more work sparsity can bring improvements in these settings too, as our fundamental result shows that the sparse models reach the same perplexity as their dense counterparts with the same number of parameters. ",
|
| 1134 |
+
"bbox": [
|
| 1135 |
+
514,
|
| 1136 |
+
92,
|
| 1137 |
+
825,
|
| 1138 |
+
229
|
| 1139 |
+
],
|
| 1140 |
+
"page_idx": 9
|
| 1141 |
+
},
|
| 1142 |
+
{
|
| 1143 |
+
"type": "text",
|
| 1144 |
+
"text": "So while we demonstrate that Scaling Transformers are possible, we consider this paper as a ",
|
| 1145 |
+
"bbox": [
|
| 1146 |
+
513,
|
| 1147 |
+
236,
|
| 1148 |
+
823,
|
| 1149 |
+
263
|
| 1150 |
+
],
|
| 1151 |
+
"page_idx": 9
|
| 1152 |
+
},
|
| 1153 |
+
{
|
| 1154 |
+
"type": "text",
|
| 1155 |
+
"text": "first step on the way to sustainable large models. There are numerous techniques for making models faster that could greatly benefit Terraformer and other Scaling Transformers. For example, we did not study quantization and we believe that it can make Scaling Transformers even faster. We also focused on inference speed and did not get improvements in training speed. The main reason is our use of Gumbel-Softmax when training the feedforward block (see Section 3.1). Fedus et al. [8] already provide a promising alternative, and we look forward to exploring it in future work. ",
|
| 1156 |
+
"bbox": [
|
| 1157 |
+
174,
|
| 1158 |
+
263,
|
| 1159 |
+
825,
|
| 1160 |
+
347
|
| 1161 |
+
],
|
| 1162 |
+
"page_idx": 9
|
| 1163 |
+
},
|
| 1164 |
+
{
|
| 1165 |
+
"type": "text",
|
| 1166 |
+
"text": "Further, we hope that the community will take inspiration from Scaling Transformers and tune them for their needs. We ran experiments using layer sizes and hyperparameters borrowed from dense Transformers and they are most probably not optimal for Scaling Transformer. With proper tuning and further improvements we believe one could train a Scaling Transformer to match GPT-3 in accuracy but also run inference in reasonable time on a laptop. We put it as a fascinating challenge to the community, since such Scaling Transformers will not only be more sustainable but will also make large models accessible to everyone. ",
|
| 1167 |
+
"bbox": [
|
| 1168 |
+
174,
|
| 1169 |
+
353,
|
| 1170 |
+
825,
|
| 1171 |
+
450
|
| 1172 |
+
],
|
| 1173 |
+
"page_idx": 9
|
| 1174 |
+
},
|
| 1175 |
+
{
|
| 1176 |
+
"type": "text",
|
| 1177 |
+
"text": "References ",
|
| 1178 |
+
"text_level": 1,
|
| 1179 |
+
"bbox": [
|
| 1180 |
+
174,
|
| 1181 |
+
469,
|
| 1182 |
+
266,
|
| 1183 |
+
486
|
| 1184 |
+
],
|
| 1185 |
+
"page_idx": 9
|
| 1186 |
+
},
|
| 1187 |
+
{
|
| 1188 |
+
"type": "text",
|
| 1189 |
+
"text": "[1] Nvidia Ampere Architecture. https://developer.nvidia.com/blog/nvidia-ampere-architecture-in-depth/. \n[2] Christopher Brix, Parnia Bahar, and Hermann Ney. Successfully applying the stabilized lottery ticket hypothesis to the transformer architecture. arXiv preprint arXiv:2005.03454, 2020. \n[3] Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. arXiv preprint arXiv:2005.14165, 2020. \n[4] Rewon Child, Scott Gray, Alec Radford, and Ilya Sutskever. Generating long sequences with sparse transformers. arXiv preprint arXiv:1904.10509, 2019. \n[5] Krzysztof Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Andreea Gane, Tamas Sarlos, Peter Hawkins, Jared Davis, Afroz Mohiuddin, Lukasz Kaiser, et al. Rethinking attention with performers. arXiv preprint arXiv:2009.14794, 2020. \n[6] Arman Cohan, Franck Dernoncourt, Doo Soon Kim, Trung Bui, Seokhwan Kim, Walter Chang, and Nazli Goharian. A discourse-aware attention model for abstractive summarization of long documents. Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), 2018. doi: 10.18653/v1/n18-2097. URL http://dx.doi.org/10.18653/ v1/n18-2097. \n[7] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018. \n[8] William Fedus, Barret Zoph, and Noam Shazeer. Switch transformers: Scaling to trillion parameter models with simple and efficient sparsity. arXiv preprint arXiv:2101.03961, 2021. \n[9] Trevor Gale, Erich Elsen, and Sara Hooker. The state of sparsity in deep neural networks. arXiv preprint arXiv:1902.09574, 2019. \n[10] A. Gidiotis and G. Tsoumakas. A divide-and-conquer approach to the summarization of long documents. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 28: 3029–3040, 2020. doi: 10.1109/TASLP.2020.3037401. \n[11] Manish Gupta and Puneet Agrawal. Compression of deep learning models for text: A survey. arXiv preprint arXiv:2008.05221, 2020. \n[12] Tianyu He, Xu Tan, Yingce Xia, Di He, Tao Qin, Zhibo Chen, and Tie-Yan Liu. Layer-wise coordination between encoder and decoder for neural machine translation. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 31, 2018. \n[13] Forrest N Iandola, Albert E Shaw, Ravi Krishna, and Kurt W Keutzer. Squeezebert: What can computer vision teach nlp about efficient neural networks? arXiv preprint arXiv:2006.11316, 2020. \n[14] Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. arXiv preprint arXiv:1611.01144, 2016. \n[15] Łukasz Kaiser and Samy Bengio. Discrete autoencoders for sequence models. arXiv preprint arXiv:1801.09797, 2018. \n[16] Łukasz Kaiser and Ilya Sutskever. Neural gpus learn algorithms. arXiv preprint arXiv:1511.08228, 2015. \n[17] Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. Scaling laws for neural language models. arXiv preprint arXiv:2001.08361, 2020. \n[18] Young Jin Kim and Hany Hassan Awadalla. Fastformers: Highly efficient transformer models for natural language understanding. arXiv preprint arXiv:2010.13382, 2020. \n[19] Nikita Kitaev, Łukasz Kaiser, and Anselm Levskaya. Reformer: The efficient transformer. arXiv preprint arXiv:2001.04451, 2020. \n[20] Tao Lei, Yu Zhang, and Yoav Artzi. Training rnns as fast as cnns. CoRR, abs/1709.02755, 2017. URL http://arxiv.org/abs/1709.02755. \n[21] Dmitry Lepikhin, HyoukJoong Lee, Yuanzhong Xu, Dehao Chen, Orhan Firat, Yanping Huang, Maxim Krikun, Noam Shazeer, and Zhifeng Chen. Gshard: Scaling giant models with conditional computation and automatic sharding. arXiv preprint arXiv:2006.16668, 2020. \n[22] Bingbing Li, Zhenglun Kong, Tianyun Zhang, Ji Li, Zhengang Li, Hang Liu, and Caiwen Ding. Efficient transformer-based large scale language representations using hardware-friendly block structured pruning. arXiv preprint arXiv:2009.08065, 2020. \n[23] Shiyang Li, Xiaoyong Jin, Yao Xuan, Xiyou Zhou, Wenhu Chen, Yu-Xiang Wang, and Xifeng Yan. Enhancing the locality and breaking the memory bottleneck of transformer on time series forecasting. arXiv preprint arXiv:1907.00235, 2019. \n[24] Zhuohan Li, Eric Wallace, Sheng Shen, Kevin Lin, Kurt Keutzer, Dan Klein, and Joey Gonzalez. Train big, then compress: Rethinking model size for efficient training and inference of transformers. In International Conference on Machine Learning, pages 5958–5968. PMLR, 2020. \n[25] Krzysztof Maziarz, Efi Kokiopoulou, Andrea Gesmundo, Luciano Sbaiz, Gabor Bartok, and Jesse Berent. Gumbel-matrix routing for flexible multi-task learning. arXiv preprint arXiv:1910.04915, 2019. \n[26] Sharan Narang, Hyung Won Chung, Yi Tay, William Fedus, Thibault Fevry, Michael Matena, Karishma Malkan, Noah Fiedel, Noam Shazeer, Zhenzhong Lan, Yanqi Zhou, Wei Li, Nan Ding, Jake Marcus, Adam Roberts, and Colin Raffel. Do transformer modifications transfer across implementations and applications? arXiv preprint arXiv:2102.11972, 2021. ",
|
| 1190 |
+
"bbox": [
|
| 1191 |
+
179,
|
| 1192 |
+
492,
|
| 1193 |
+
826,
|
| 1194 |
+
911
|
| 1195 |
+
],
|
| 1196 |
+
"page_idx": 9
|
| 1197 |
+
},
|
| 1198 |
+
{
|
| 1199 |
+
"type": "text",
|
| 1200 |
+
"text": "",
|
| 1201 |
+
"bbox": [
|
| 1202 |
+
171,
|
| 1203 |
+
79,
|
| 1204 |
+
828,
|
| 1205 |
+
922
|
| 1206 |
+
],
|
| 1207 |
+
"page_idx": 10
|
| 1208 |
+
},
|
| 1209 |
+
{
|
| 1210 |
+
"type": "text",
|
| 1211 |
+
"text": "[27] David Patterson, Joseph Gonzalez, Quoc Le, Chen Liang, Lluis-Miquel Munguia, Daniel Rothchild, David So, Maud Texier, and Jeff Dean. Carbon emissions and large neural network training. arXiv preprint arXiv:2104.10350, 2021. ",
|
| 1212 |
+
"bbox": [
|
| 1213 |
+
171,
|
| 1214 |
+
90,
|
| 1215 |
+
823,
|
| 1216 |
+
133
|
| 1217 |
+
],
|
| 1218 |
+
"page_idx": 11
|
| 1219 |
+
},
|
| 1220 |
+
{
|
| 1221 |
+
"type": "text",
|
| 1222 |
+
"text": "[28] Gabriele Prato, Ella Charlaix, and Mehdi Rezagholizadeh. Fully quantized transformer for machine translation. arXiv preprint arXiv:1910.10485, 2019. ",
|
| 1223 |
+
"bbox": [
|
| 1224 |
+
171,
|
| 1225 |
+
143,
|
| 1226 |
+
825,
|
| 1227 |
+
172
|
| 1228 |
+
],
|
| 1229 |
+
"page_idx": 11
|
| 1230 |
+
},
|
| 1231 |
+
{
|
| 1232 |
+
"type": "text",
|
| 1233 |
+
"text": "[29] Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. 2019. ",
|
| 1234 |
+
"bbox": [
|
| 1235 |
+
173,
|
| 1236 |
+
183,
|
| 1237 |
+
821,
|
| 1238 |
+
212
|
| 1239 |
+
],
|
| 1240 |
+
"page_idx": 11
|
| 1241 |
+
},
|
| 1242 |
+
{
|
| 1243 |
+
"type": "text",
|
| 1244 |
+
"text": "[30] Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21:1–67, 2020. ",
|
| 1245 |
+
"bbox": [
|
| 1246 |
+
173,
|
| 1247 |
+
222,
|
| 1248 |
+
823,
|
| 1249 |
+
265
|
| 1250 |
+
],
|
| 1251 |
+
"page_idx": 11
|
| 1252 |
+
},
|
| 1253 |
+
{
|
| 1254 |
+
"type": "text",
|
| 1255 |
+
"text": "[31] Aurko Roy, Mohammad Saffar, Ashish Vaswani, and David Grangier. Efficient content-based sparse attention with routing transformers. arXiv preprint arXiv:2003.05997, 2020. ",
|
| 1256 |
+
"bbox": [
|
| 1257 |
+
173,
|
| 1258 |
+
275,
|
| 1259 |
+
826,
|
| 1260 |
+
304
|
| 1261 |
+
],
|
| 1262 |
+
"page_idx": 11
|
| 1263 |
+
},
|
| 1264 |
+
{
|
| 1265 |
+
"type": "text",
|
| 1266 |
+
"text": "[32] Victor Sanh, Lysandre Debut, Julien Chaumond, and Thomas Wolf. Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108, 2019. ",
|
| 1267 |
+
"bbox": [
|
| 1268 |
+
171,
|
| 1269 |
+
314,
|
| 1270 |
+
825,
|
| 1271 |
+
344
|
| 1272 |
+
],
|
| 1273 |
+
"page_idx": 11
|
| 1274 |
+
},
|
| 1275 |
+
{
|
| 1276 |
+
"type": "text",
|
| 1277 |
+
"text": "[33] Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc Le, Geoffrey Hinton, and Jeff Dean. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer. arXiv preprint arXiv:1701.06538, 2017. ",
|
| 1278 |
+
"bbox": [
|
| 1279 |
+
174,
|
| 1280 |
+
353,
|
| 1281 |
+
825,
|
| 1282 |
+
396
|
| 1283 |
+
],
|
| 1284 |
+
"page_idx": 11
|
| 1285 |
+
},
|
| 1286 |
+
{
|
| 1287 |
+
"type": "text",
|
| 1288 |
+
"text": "[34] Noam Shazeer, Youlong Cheng, Niki Parmar, Dustin Tran, Ashish Vaswani, Penporn Koanantakool, Peter Hawkins, HyoukJoong Lee, Mingsheng Hong, Cliff Young, et al. Mesh-tensorflow: Deep learning for supercomputers. In Advances in Neural Information Processing Systems, pages 10414–10423, 2018. ",
|
| 1289 |
+
"bbox": [
|
| 1290 |
+
173,
|
| 1291 |
+
406,
|
| 1292 |
+
826,
|
| 1293 |
+
463
|
| 1294 |
+
],
|
| 1295 |
+
"page_idx": 11
|
| 1296 |
+
},
|
| 1297 |
+
{
|
| 1298 |
+
"type": "text",
|
| 1299 |
+
"text": "[35] Sheng Shen, Zhen Dong, Jiayu Ye, Linjian Ma, Zhewei Yao, Amir Gholami, Michael W Mahoney, and Kurt Keutzer. Q-bert: Hessian based ultra low precision quantization of bert. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 8815–8821, 2020. ",
|
| 1300 |
+
"bbox": [
|
| 1301 |
+
173,
|
| 1302 |
+
472,
|
| 1303 |
+
825,
|
| 1304 |
+
530
|
| 1305 |
+
],
|
| 1306 |
+
"page_idx": 11
|
| 1307 |
+
},
|
| 1308 |
+
{
|
| 1309 |
+
"type": "text",
|
| 1310 |
+
"text": "[36] Emma Strubell, Ananya Ganesh, and Andrew McCallum. Energy and policy considerations for deep learning in nlp. arXiv preprint arXiv:1906.02243, 2019. ",
|
| 1311 |
+
"bbox": [
|
| 1312 |
+
171,
|
| 1313 |
+
539,
|
| 1314 |
+
825,
|
| 1315 |
+
569
|
| 1316 |
+
],
|
| 1317 |
+
"page_idx": 11
|
| 1318 |
+
},
|
| 1319 |
+
{
|
| 1320 |
+
"type": "text",
|
| 1321 |
+
"text": "[37] Sainbayar Sukhbaatar, Edouard Grave, Piotr Bojanowski, and Armand Joulin. Adaptive attention span in transformers. arXiv preprint arXiv:1905.07799, 2019. ",
|
| 1322 |
+
"bbox": [
|
| 1323 |
+
173,
|
| 1324 |
+
578,
|
| 1325 |
+
825,
|
| 1326 |
+
608
|
| 1327 |
+
],
|
| 1328 |
+
"page_idx": 11
|
| 1329 |
+
},
|
| 1330 |
+
{
|
| 1331 |
+
"type": "text",
|
| 1332 |
+
"text": "[38] Xiao Sun, Jungwook Choi, Chia-Yu Chen, Naigang Wang, Swagath Venkataramani, Vijayalakshmi Viji Srinivasan, Xiaodong Cui, Wei Zhang, and Kailash Gopalakrishnan. Hybrid 8-bit floating point (hfp8) training and inference for deep neural networks. Advances in neural information processing systems, 32:4900–4909, 2019. ",
|
| 1333 |
+
"bbox": [
|
| 1334 |
+
173,
|
| 1335 |
+
617,
|
| 1336 |
+
826,
|
| 1337 |
+
674
|
| 1338 |
+
],
|
| 1339 |
+
"page_idx": 11
|
| 1340 |
+
},
|
| 1341 |
+
{
|
| 1342 |
+
"type": "text",
|
| 1343 |
+
"text": "[39] Zhiqing Sun, Hongkun Yu, Xiaodan Song, Renjie Liu, Yiming Yang, and Denny Zhou. Mobilebert: a compact task-agnostic bert for resource-limited devices. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 2158–2170, 2020. ",
|
| 1344 |
+
"bbox": [
|
| 1345 |
+
173,
|
| 1346 |
+
684,
|
| 1347 |
+
823,
|
| 1348 |
+
728
|
| 1349 |
+
],
|
| 1350 |
+
"page_idx": 11
|
| 1351 |
+
},
|
| 1352 |
+
{
|
| 1353 |
+
"type": "text",
|
| 1354 |
+
"text": "[40] Yi Tay, Dara Bahri, Liu Yang, Donald Metzler, and Da-Cheng Juan. Sparse sinkhorn attention, 2020. ",
|
| 1355 |
+
"bbox": [
|
| 1356 |
+
173,
|
| 1357 |
+
737,
|
| 1358 |
+
823,
|
| 1359 |
+
766
|
| 1360 |
+
],
|
| 1361 |
+
"page_idx": 11
|
| 1362 |
+
},
|
| 1363 |
+
{
|
| 1364 |
+
"type": "text",
|
| 1365 |
+
"text": "[41] Yi Tay, Mostafa Dehghani, Dara Bahri, and Donald Metzler. Efficient transformers: A survey. arXiv preprint arXiv:2009.06732, 2020. ",
|
| 1366 |
+
"bbox": [
|
| 1367 |
+
168,
|
| 1368 |
+
776,
|
| 1369 |
+
826,
|
| 1370 |
+
806
|
| 1371 |
+
],
|
| 1372 |
+
"page_idx": 11
|
| 1373 |
+
},
|
| 1374 |
+
{
|
| 1375 |
+
"type": "text",
|
| 1376 |
+
"text": "[42] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. arXiv preprint arXiv:1706.03762, 2017. ",
|
| 1377 |
+
"bbox": [
|
| 1378 |
+
171,
|
| 1379 |
+
815,
|
| 1380 |
+
825,
|
| 1381 |
+
858
|
| 1382 |
+
],
|
| 1383 |
+
"page_idx": 11
|
| 1384 |
+
},
|
| 1385 |
+
{
|
| 1386 |
+
"type": "text",
|
| 1387 |
+
"text": "[43] Hanrui Wang, Zhanghao Wu, Zhijian Liu, Han Cai, Ligeng Zhu, Chuang Gan, and Song Han. Hat: Hardware-aware transformers for efficient natural language processing. arXiv preprint arXiv:2005.14187, 2020. ",
|
| 1388 |
+
"bbox": [
|
| 1389 |
+
174,
|
| 1390 |
+
868,
|
| 1391 |
+
826,
|
| 1392 |
+
911
|
| 1393 |
+
],
|
| 1394 |
+
"page_idx": 11
|
| 1395 |
+
},
|
| 1396 |
+
{
|
| 1397 |
+
"type": "text",
|
| 1398 |
+
"text": "[44] Linting Xue, Noah Constant, Adam Roberts, Mihir Kale, Rami Al-Rfou, Aditya Siddhant, Aditya Barua, and Colin Raffel. mt5: A massively multilingual pre-trained text-to-text transformer, 2020. \n[45] Manzil Zaheer, Guru Guruganesh, Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, et al. Big bird: Transformers for longer sequences. arXiv preprint arXiv:2007.14062, 2020. \n[46] Jingqing Zhang, Yao Zhao, Mohammad Saleh, and Peter J. Liu. Pegasus: Pre-training with extracted gap-sentences for abstractive summarization, 2020. \n[47] Aojun Zhou, Yukun Ma, Junnan Zhu, Jianbo Liu, Zhijie Zhang, Kun Yuan, Wenxiu Sun, and Hongsheng Li. Learning n:m fine-grained structured sparse neural networks from scratch. In International Conference on Learning Representations, 2021. URL https://openreview. net/forum?id=K9bw7vqp_s. ",
|
| 1399 |
+
"bbox": [
|
| 1400 |
+
169,
|
| 1401 |
+
90,
|
| 1402 |
+
828,
|
| 1403 |
+
287
|
| 1404 |
+
],
|
| 1405 |
+
"page_idx": 12
|
| 1406 |
+
}
|
| 1407 |
+
]
|
parse/train/-b5OSCydOMe/-b5OSCydOMe_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/-b5OSCydOMe/-b5OSCydOMe_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/BJedHRVtPB/BJedHRVtPB.md
ADDED
|
@@ -0,0 +1,451 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# PSEUDO-LIDAR++: ACCURATE DEPTH FOR 3D OBJECT DETECTION IN AUTONOMOUS DRIVING
|
| 2 |
+
|
| 3 |
+
Yurong $\mathbf { V o u } ^ { * 1 }$ , Yan Wang∗1, Wei-Lun Chao∗2, Divyansh Garg1, Geoff Pleiss1, Bharath Hariharan1, Mark Campbell1, and Kilian Q. Weinberger1 1Cornell University, Ithaca, NY 2The Ohio State University, Columbus, OH {yy785, yw763, dg595, gp346, bh497, mc288, kqw4}@cornell.edu chao.209@osu.edu
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Detecting objects such as cars and pedestrians in 3D plays an indispensable role in autonomous driving. Existing approaches largely rely on expensive LiDAR sensors for accurate depth information. While recently pseudo-LiDAR has been introduced as a promising alternative, at a much lower cost based solely on stereo images, there is still a notable performance gap. In this paper we provide substantial advances to the pseudo-LiDAR framework through improvements in stereo depth estimation. Concretely, we adapt the stereo network architecture and loss function to be more aligned with accurate depth estimation of faraway objects — currently the primary weakness of pseudo-LiDAR. Further, we explore the idea to leverage cheaper but extremely sparse LiDAR sensors, which alone provide insufficient information for 3D detection, to de-bias our depth estimation. We propose a depthpropagation algorithm, guided by the initial depth estimates, to diffuse these few exact measurements across the entire depth map. We show on the KITTI object detection benchmark that our combined approach yields substantial improvements in depth estimation and stereo-based 3D object detection — outperforming the previous state-of-the-art detection accuracy for faraway objects by $4 0 \%$ . Our code is available at https://github.com/mileyan/Pseudo_Lidar_V2.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Safe driving in autonomous cars requires accurate 3D detection and localization of cars, pedestrians and other objects. This in turn requires accurate depth information, which can be obtained from LiDAR (Light Detection And Ranging) sensors. Although highly precise and reliable, LiDAR sensors are notoriously expensive: a 64-beam model can cost around $\$ 75,000$ (USD)1. The alternative is to measure depth through inexpensive commodity cameras. However, in spite of recent dramatic progress in stereo-based 3D object detection brought by pseudo-LiDAR (Wang et al., 2019a), a significant performance gap remains especially for faraway objects (which we want to detect early to allow time for reaction). The trade-off between affordability and safety creates an ethical dilemma.
|
| 12 |
+
|
| 13 |
+

|
| 14 |
+
Figure 1: An illustration of our proposed depth estimation and correction method. The green box is the ground truth location of the car in the KITTI dataset. The red points are obtained with a stereo disparity network. Purple points, obtained with our stereo depth network (SDN), are much closer to the truth. After depth propagation (blue points) with a few (yellow) LiDAR measurements the car is squarely inside the green box. (One floor square is $1 \mathrm { m } \times 1 \mathrm { m } .$ )
|
| 15 |
+
|
| 16 |
+
In this paper we propose a possible solution to this remaining challenge that combines insights from both perspectives. We observe that the higher 3D object localization error of stereo-based systems, compared to LiDAR-based ones, stems entirely from the higher error in depth estimation (after the 3D point cloud is obtained the two approaches are identical (Wang et al., 2019a)). Importantly, this error is not random but systematic: we observe that stereo methods do indeed detect objects with high reliability, yet they estimate the depth of the entire object as either too far or too close. See Figure 1 for an illustration: the red stereo points capture the car but are shifted by about $2 \mathrm { m }$ completely outside the ground-truth location (green box). If we can de-bias these depth estimates it should be possible to obtain accurate 3D localization even for distant objects without exorbitant costs.
|
| 17 |
+
|
| 18 |
+
We start by revisiting the depth estimation routine embedded at the heart of state-of-the-art stereobased 3D detection approach (Wang et al., 2019a). A major contributor to the systematic depth bias comes from the fact that depth is typically not computed directly. Instead, one first estimates the disparity — the horizontal shift of a pixel between the left and right images — and then inverts it to obtain pixel-wise depth. While the use of deep neural networks has largely improved disparity estimation (Chang & Chen, 2018; Cheng et al., 2018; Mayer et al., 2016; Wang et al., 2019b), designing and learning the networks to optimize the accuracy of disparity estimation simply overemphasizes nearby objects due to the reciprocal transformation. For instance, a unit disparity error (in pixels) for a 5-meter-away object means a $1 0 \mathrm { c m }$ error in depth: the length of a side mirror. The same disparity error for a 50-meter-away object, however, becomes a $5 . 8 \mathrm { { m } }$ error in depth: the length of an entire car. Penalizing both errors equally means that the network spends more time correcting subtle errors on nearby objects than gross errors on faraway objects, resulting in degraded depth estimates and ultimately poor detection and localization for faraway objects. We thus propose to adapt the stereo network architecture and loss function for direct depth estimation. Concretely, the cost volume that fuses the left-right images and the subsequent 3D convolutions are the key components in stereo networks. Taking the central assumption of convolutions — all neighborhoods can be operated in an identical manner — we propose to construct the cost volume on the grid of depth rather than disparity, enabling 3D convolutions and the loss function to perform exactly on the right scale for depth estimation. We refer to our network as stereo depth network (SDN). See Figure 1 for a comparison of 3D points obtained with SDN (purple) and disparity estimation (red).
|
| 19 |
+
|
| 20 |
+
Although our SDN improves the depth estimates significantly, stereo images are still inherently 2D and it is unclear if they can ever match the accuracy and reliability of a true 3D LiDAR sensor. Although LiDAR sensors with 32 or 64 beams are expensive, LiDAR sensors with only 4 beams are two orders of magnitude cheaper2 and thus easily affordable. The 4 laser beams are very sparse and ill-suited to capture 3D object shapes by themselves, but if paired with stereo images they become the ideal tool to de-bias our dense stereo depth estimates: a single high-precision laser beam may inform us how to correct the depth of an entire car or pedestrian in its path. To this end, we present a novel depth-propagation algorithm, inspired by graph-based manifold learning (Weinberger et al., 2005; Roweis & Saul, 2000; Xiaojin & Zoubin, 2002). In a nutshell, we connect our estimated 3D stereo point cloud locally by a nearest neighbor graph, such that points corresponding to the same object will share many local paths with each other. We match the few but exact LiDAR measurements first with pixels (irrespective of depth) and then with their corresponding 3D points to obtain accurate depth estimates for several nodes in the graph. Finally, we propagate this exact depth information along the graph using a label diffusion mechanism — resulting in a dense and accurate depth map at negligible cost. In Figure 1 we see that the few (yellow) LiDAR measurements are sufficient to position almost all final (blue) points of the entire car within the green ground truth box.
|
| 21 |
+
|
| 22 |
+
We conduct extensive empirical studies of our approaches on the KITTI object detection benchmark (Geiger et al., 2012; 2013) and achieve remarkable results. With solely stereo images, we outperform the previous state of the art (Wang et al., 2019a) by $1 0 \%$ . Further adding a cheap 4-beam LiDAR brings another $2 7 \%$ relative improvement — on some metrics, our approach is nearly on par with those based on a 64-beam LiDAR but can potentially save $9 5 \%$ in cost.
|
| 23 |
+
|
| 24 |
+
# 2 BACKGROUND
|
| 25 |
+
|
| 26 |
+
3D object detection. Most work on 3D object detection operates on 3D point clouds from LiDAR as input (Li, 2017; Li et al., 2016; Meyer et al., 2019b; Yang et al., 2018a; Du et al., 2018; Shi et al., 2019; Engelcke et al., 2017; Yan et al., 2018; Lang et al., 2019). Frustum PointNet (Qi et al., 2018) applies PointNet (Qi et al., 2017a;b) to the points directly, while Voxelnet (Zhou & Tuzel, 2018) quantizes them into 3D grids. For street scenes, several work finds that processing points from the bird’s-eye view can already capture object contours and locations (Chen et al., 2017; Yang et al., 2018b; Ku et al., 2018). Images have also been used, but mainly to supplement LiDAR (Meyer et al., 2019a; Xu et al., 2018; Liang et al., 2018; Chen et al., 2017; Ku et al., 2018). Early work based solely on images — mostly built on the 2D frontal-view detection pipeline (Ren et al., 2015; He et al., 2017; Lin et al., 2017) — fell far behind in localizing objects in 3D (Li et al., 2019a; Xiang et al., 2015; 2017; Chabot et al., 2017; Mousavian et al., 2017; Chen et al., 2015; Xu & Chen, 2018; Chen et al., 2016; Pham & Jeon, 2017; Chen et al., 2018)3.
|
| 27 |
+
|
| 28 |
+
Pseudo-LiDAR. This gap has been reduced significantly recently with the introduction of the pseudoLiDAR framework proposed in (Wang et al., 2019a). This framework applies a drastically different approach from previous image-based 3D object detectors. Instead of directly detecting the 3D bounding boxes from the frontal view of a scene, pseudo-LiDAR begins with image-based depth estimation, predicting the depth $Z ( u , v )$ of each image pixel $( u , v )$ . The resulting depth map $Z$ is then back-projected into a 3D point cloud: a pixel $( u , v )$ will be transformed to $( x , y , z )$ in 3D by
|
| 29 |
+
|
| 30 |
+
$$
|
| 31 |
+
\boldsymbol { z } = \boldsymbol { Z } ( \boldsymbol { u } , \boldsymbol { v } ) , \qquad \boldsymbol { x } = \frac { ( \boldsymbol { u } - \boldsymbol { c } _ { U } ) \times \boldsymbol { z } } { f _ { U } } , \qquad \boldsymbol { y } = \frac { ( \boldsymbol { v } - \boldsymbol { c } _ { V } ) \times \boldsymbol { z } } { f _ { V } } ,
|
| 32 |
+
$$
|
| 33 |
+
|
| 34 |
+
where $( c _ { U } , c _ { V } )$ is the camera center and $f _ { U }$ and $f _ { V }$ are the horizontal and vertical focal length. The 3D point cloud is then treated exactly as LiDAR signal — any LiDAR-based 3D detector can be applied seamlessly. By taking the state-of-the-art algorithms from both ends (Chang & Chen, 2018; Ku et al., 2018; Qi et al., 2018), pseudo-LiDAR obtains the highest image-based performance on the KITTI object detection benchmark (Geiger et al., 2012; 2013). Our work builds upon this framework.
|
| 35 |
+
|
| 36 |
+
Stereo disparity estimation. Pseudo-LiDAR relies heavily on the quality of depth estimation. Essentially, if the estimated pixel depths match those provided by LiDAR, pseudo-LiDAR with any LiDAR-based detector should be able to achieve the same performance as that obtained by applying the same detector to the LiDAR signal. According to (Wang et al., 2019a), depth estimation from stereo pairs of images (Mayer et al., 2016; Yamaguchi et al., 2014; Chang & Chen, 2018) are more accurate than that from monocular (i.e., single) images (Fu et al., 2018; Godard et al., 2017) for 3D object detection. We therefore focus on stereo depth estimation, which is routinely obtained from estimating disparity between images.
|
| 37 |
+
|
| 38 |
+
A disparity estimation algorithm takes a pair of left-right images $I _ { l }$ and $I _ { r }$ as input, captured from a pair of cameras with a horizontal offset (i.e., baseline) $b$ . Without loss of generality, we assume that the algorithm treats the left image, $I _ { l }$ , as reference and outputs a disparity map $D$ recording the horizontal disparity to $I _ { r }$ for each pixel $( u , v )$ . Ideally, $I _ { l } ( u , v )$ and $I _ { r } ( u , v + D ( u , v ) )$ will picture the same 3D location. We can therefore derive the depth map $Z$ via the following transform,
|
| 39 |
+
|
| 40 |
+
$$
|
| 41 |
+
Z ( u , v ) = \frac { f _ { U } \times b } { D ( u , v ) } ( f _ { U } \mathrm { : \ h o r i z o n t a l \ f o c a l \ l e n g t h } ) .
|
| 42 |
+
$$
|
| 43 |
+
|
| 44 |
+
A common pipeline of disparity estimation is to first construct a 4D disparity cost volume $C _ { \mathrm { d i s p } }$ in which $C _ { \mathrm { d i s p } } ( u , v , d , : )$ is a feature vector that captures the pixel difference between $I _ { l } ( u , v )$ and $I _ { r } ( u , v + d )$ . It then estimates the disparity $D ( u , v )$ for each pixel $( u , v )$ according to the cost volume $C _ { \mathrm { d i s p } }$ . One basic algorithm is to build a 3D cost volume with $C _ { \mathrm { d i s p } } ( u , v , d ) = \| I _ { l } ( u , v ) - I _ { r } ( u , v + d ) \| _ { 2 }$ and determine $D ( u , v )$ as ar $\begin{array} { r } { \operatorname* { m i n } _ { d } C _ { \mathrm { d i s p } } ( u , v , d ) } \end{array}$ . Advanced algorithms exploit more robust features in constructing $C _ { \mathrm { d i s p } }$ and perform structured prediction for $D$ . In what follows, we give an introduction of PSMNet (Chang & Chen, 2018), a state-of-the-art algorithm used in (Wang et al., 2019a).
|
| 45 |
+
|
| 46 |
+
PSMNet begins with extracting deep feature maps $h _ { l }$ and $h _ { r }$ from $I _ { l }$ and $I _ { r }$ , respectively. It then constructs $C _ { \mathrm { d i s p } } ( u , v , d , : )$ by concatenating features of $h _ { l } ( u , v )$ and $h _ { r } ( u , v + d )$ , followed by layers of 3D convolutions. The resulting 3D tensor $S _ { \mathrm { d i s p } }$ , with the feature channel size ending up being one, is then used to derive the pixel disparity via the following weighted combination,
|
| 47 |
+
|
| 48 |
+

|
| 49 |
+
Figure 3: Disparity cost volume (left) vs. depth cost volume (right). The figure shows the 3D points obtained from LiDAR (yellow) and stereo (purple) corresponding to a car in KITTI, seen from the bird’seye view (BEV). Points from the disparity cost volume are stretched out and noisy; while points from the depth cost volume capture the car contour faithfully.
|
| 50 |
+
|
| 51 |
+

|
| 52 |
+
Figure 4: Depth estimation errors. We compare depth estimation error on 3,769 KITTI validation images, taking 64-beam LiDAR depths as ground truths. We separate pixels according to their true depths (z). See the text and appendix for details.
|
| 53 |
+
|
| 54 |
+
$$
|
| 55 |
+
D ( u , v ) = \sum _ { d } \mathrm { s o f t m a x } ( - S _ { \mathrm { d i s p } } ( u , v , d ) ) \times d ,
|
| 56 |
+
$$
|
| 57 |
+
|
| 58 |
+
where softmax is performed along the $3 ^ { \mathrm { r d } }$ dimension of $S _ { \mathrm { d i s p } }$ . PSMNet can be learned end-to-end, including the image feature extractor and 3D convolution kernels, to minimize the disparity error
|
| 59 |
+
|
| 60 |
+
$$
|
| 61 |
+
\sum _ { ( u , v ) \in \mathcal { A } } \ell ( D ( u , v ) - D ^ { \star } ( u , v ) ) ,
|
| 62 |
+
$$
|
| 63 |
+
|
| 64 |
+
where $\ell$ is the smooth L1 loss, $D ^ { \star }$ is the ground truth map, and $\mathcal { A }$ contains pixels with ground truths.
|
| 65 |
+
|
| 66 |
+
# 3 STEREO DEPTH NETWORK (SDN)
|
| 67 |
+
|
| 68 |
+
A stereo network designed and learned to minimize the disparity error (cf. Equation 4) may over-emphasize nearby objects with smaller depths and therefore perform poorly in estimating depths for faraway objects. To see this, note that Equation 2 implies that for a given error in disparity $\delta D$ , the error in depth $\delta Z$ increases quadratically with depth:
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
Z \propto \frac { 1 } { D } \Rightarrow \delta Z \propto \frac { 1 } { D ^ { 2 } } \delta D \Rightarrow \delta Z \propto Z ^ { 2 } \delta D .
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+
The middle term is obtained by differentiating $Z ( D )$ w.r.t. $D$ . In particular, using the settings on the KITTI dataset (Geiger et al., 2012; 2013), a single pixel error in disparity implies only a $0 . 1 \mathrm { m }$ error in depth at a depth of 5 meters, but a $5 . 8 \mathrm { { m } }$ error at a depth of 50 meters. See Figure 2 for a mapping from disparity to depth.
|
| 75 |
+
|
| 76 |
+

|
| 77 |
+
Figure 2: The disparity-todepth transform. We set $f _ { U } =$ 721 (in pixels) and $b ~ = ~ 0 . 5 4$ (in meters) in Equation 2, which are the typical values used in the KITTI dataset.
|
| 78 |
+
|
| 79 |
+
Depth Loss. We propose two changes to adapt stereo networks for direct depth estimation. First, we learn stereo networks to directly optimize the depth loss
|
| 80 |
+
|
| 81 |
+
$$
|
| 82 |
+
\sum _ { ( u , v ) \in \mathcal { A } } \ell ( Z ( u , v ) - Z ^ { \star } ( u , v ) ) .
|
| 83 |
+
$$
|
| 84 |
+
|
| 85 |
+
$Z$ and $Z ^ { \star }$ can be obtained from $D$ and $D ^ { \star }$ using Equation 2. The change from the disparity loss to the depth loss corrects the disproportionally strong emphasis on tiny depth errors of nearby objects — a necessary but still insufficient change to overcome the problems of disparity estimation.
|
| 86 |
+
|
| 87 |
+
Depth Cost Volume. To facilitate accurate depth learning (rather than disparity) we need to further address the internals of the depth estimation pipeline. A crucial source of error is the 3D convolutions within the 4D disparity cost volume, where the same kernels are applied for the entire cost volume. This is highly problematic as it implicitly assumes that the effect of a convolution is homogeneous throughout — which is clearly violated by the reciprocal depth to disparity relation (Figure 2). For example, it may be completely appropriate to locally smooth two neighboring pixels with disparity 85 and 86 (changing the depth by a few cm to smooth out a surface), whereas applying the same kernel for two pixels with disparity 5 and 6 could easily move the 3D points by $1 0 \mathrm { m }$ or more.
|
| 88 |
+
|
| 89 |
+

|
| 90 |
+
Figure 5: The whole pipeline of improved stereo depth estimation: (top) the stereo depth network (SDN) constructs a depth cost volume from left-right images and is optimized for direct depth estimation; (bottom) the graph-based depth correction algorithm (GDC) refines the depth map by leveraging sparser LiDAR signal. The gray arrows indicates the observer’s view point. We superimpose the (green) ground-truth 3D box of a car, the same one in Figure 1. The corrected points (blue; bottom right) are perfectly located inside the ground truth box.
|
| 91 |
+
|
| 92 |
+
Taking this insight and the central assumption of convolutions — all neighborhoods can be operated upon in an identical manner — into account, we propose to instead construct the depth cost volume $C _ { \mathrm { d e p t h } }$ , in which $C _ { \mathrm { d e p t h } } ( u , v , z , : )$ will encode features describing how likely the depth $Z ( u , v )$ of pixel $( u , v )$ is $z$ . The subsequent 3D convolutions will then operate on the grid of depth, rather than disparity, affecting neighboring depths identically, independent of their location. The resulting 3D tensor $S _ { \mathrm { d e p t h } }$ is then used to predict the pixel depth similar to Equation 3
|
| 93 |
+
|
| 94 |
+
$$
|
| 95 |
+
Z ( u , v ) = \sum _ { z } \operatorname { s o f t m a x } ( - S _ { \mathrm { d e p t h } } ( u , v , z ) ) \times z .
|
| 96 |
+
$$
|
| 97 |
+
|
| 98 |
+
We construct the new depth volume, $C _ { \mathrm { d e p t h } }$ , based on the intuition that $C _ { \mathrm { d e p t h } } ( u , v , z , : )$ and $C _ { \mathrm { d i s p } } \left( \boldsymbol { u } , \boldsymbol { v } , \frac { f _ { U } \times \boldsymbol { b } } { z } , : \right)$ should lead to equivalent “cost”. To this end, we apply a bilinear interpolation to construct $C _ { \mathrm { d e p t h } }$ from $C _ { \mathrm { d i s p } }$ using the depth-to-disparity transform in Equation 2. Specifically, we consider disparity in the range of $[ 0 , 1 9 1 ]$ following PSMNet (Chang & Chen, 2018), and consider depth in the range of $[ 1 \mathrm { m } , 8 0 \mathrm { m } ]$ and set the grid of depth in $C _ { \mathrm { d e p t h } }$ to be 1m. Figure 5 (top) depicts our stereo depth network (SDN) pipeline. Crucially, all convolution operations are operated on $C _ { \mathrm { d e p t h } }$ exclusively. Figure 4 compares the median values of absolute depth estimation errors using the disparity cost volume (i.e., PSMNet) and the depth cost volume (SDN) (see subsection D.5 for detailed numbers). As expected, for faraway depth, SDN leads to drastically smaller errors with only marginal increases in the very near range (which disparity based methods over-optimize). See the appendix for the detailed setup and more discussions.
|
| 99 |
+
|
| 100 |
+
# 4 DEPTH CORRECTION
|
| 101 |
+
|
| 102 |
+
Our SDN significantly improves depth estimation and more precisely renders the object contours (see Figure 3). However, there is a fundamental limitation in stereo because of the discrete nature of pixels: the disparity, being the difference in the horizontal coordinate between corresponding pixels, has to be quantized at the level of individual pixels while the depth is continuous. Although the quantization error can be alleviated with higher resolution images, the computational depth prediction cost scales cubically with resolution— pushing the limits of GPUs in autonomous vehicles.
|
| 103 |
+
|
| 104 |
+
We therefore explore a hybrid approach by leveraging a cheap LiDAR with extremely sparse (e.g., 4 beams) but accurate depth measurements to correct this bias. We note that such sensors are too sparse to capture object shapes and cannot be used alone for detection. However, by projecting the LiDAR points into the image plane we obtain exact depths on a small portion of “landmark” pixels.
|
| 105 |
+
|
| 106 |
+
We present a graph-based depth correction (GDC) algorithm that effectively combines the dense stereo depth that has rendered object shapes and the sparse accurate LiDAR measurements. Conceptually, we expect the corrected depth map to have the following properties: globally, landmark pixels associated with LiDAR points should possess the exact depths; locally, object shapes captured by neighboring 3D points, back-projected from the input depth map (cf. Equation 1), should be preserved. Figure 5 (bottom) illustrates the algorithm.
|
| 107 |
+
|
| 108 |
+
Input Matching. We take as input the two point clouds from LiDAR (L) and Pseudo-LiDAR (PL) by stereo depth estimation. The latter is obtained by converting pixels $( u , v )$ with depth $z$ to 3D points $( x _ { u } , y _ { v } , z )$ . First, we characterize the local shapes by the directed K-nearest-neighbor (KNN) graph in the PL point cloud (using accelerated KD-Trees (Shevtsov et al., 2007)) that connects each 3D point to its KNNs with appropriate weights. Similarly, we can project the 3D LiDAR points onto pixel locations $( u , v )$ and match them to corresponding 3D stereo points. Without loss of generality, we assume that we are given “ground truth” LiDAR depth for the first $n$ points and no ground truth for the remaining $m$ points. We refer to the 3D stereo depth estimates as $Z \in \mathbb { R } ^ { n + m }$ and the LiDAR depth ground-truth as $G \in \mathbb { R } ^ { n }$ .
|
| 109 |
+
|
| 110 |
+
Edge weights. To construct the KNN graph in 3D we ignore the LiDAR information on the first $n$ points and only use their predicted stereo depth in $Z$ . Let ${ \mathcal { N } } _ { i }$ denote the set of $k$ neighbors of the $i ^ { t h }$ point. Further, let $\bar { W } \in \mathbb { R } ^ { ( n + m ) \times ( n + m ) }$ denote the weight matrix, where $W _ { i j }$ denotes the edge-weight between points $i$ and $j$ . Inspired by prior work in manifold learning (Roweis & Saul, 2000; Weinberger et al., 2005) we choose the weights to be the coefficients that reconstruct the depth of any point from the depths of its neighbors in ${ \mathcal { N } } _ { i }$ . We can solve for these weights with the following constrained quadratic optimization problem:
|
| 111 |
+
|
| 112 |
+
$$
|
| 113 |
+
W = \arg \operatorname* { m i n } _ { W } \| Z - W Z \| _ { 2 } ^ { 2 } , \qquad \mathrm { s . t . } \ W \mathbf { 1 } = \mathbf { 1 } \ \mathrm { a n d } \ W _ { i j } = 0 \ i \mathbf { f } \ j \not \in \mathcal { N } _ { i } .
|
| 114 |
+
$$
|
| 115 |
+
|
| 116 |
+
Here $\mathbf { 1 } \in \mathbb { R } ^ { n + m }$ denotes the all-ones vector. As long as we pick $k > 3$ and the points are in general position there are infinitely many solutions that satisfy $Z = W Z$ , and we pick the solution with the minimum $L _ { 2 }$ norm (obtained with slight $L _ { 2 }$ regularization).
|
| 117 |
+
|
| 118 |
+
Depth Correction. Let us denote the corrected depth values as $Z ^ { \prime } \in \mathbb { R } ^ { n + m }$ , with $Z ^ { \prime } = [ Z _ { L } ^ { \prime } ; Z _ { P L } ^ { \prime } ]$ and $Z _ { L } ^ { \prime } \in \mathbb { R } ^ { n }$ and $Z _ { P L } ^ { \prime } \in \mathbb { R } ^ { m }$ , where $Z _ { L } ^ { \prime }$ are the depth values of points with LiDAR ground-truth and $Z _ { P L } ^ { \prime }$ otherwise. For the $n$ points with LiDAR measurements we update the depth to the (ground truth) values $Z _ { L } ^ { \prime } = G$ . We then solve for $Z _ { P L } ^ { \prime }$ given $G$ and the weighted KNN graph encoded in $W$ Concretely, we update the remaining depths $Z _ { P L } ^ { \prime }$ such that the depth of any point $i$ can still be be reconstructed with high fidelity as a weighted sum of its KNNs’ depths using the learned weights $W$ ; i.e. if point $i : 1 \leq i \leq n$ is moved to its new depth $G _ { i }$ , then its neighbors in ${ \mathcal { N } } _ { i }$ must also be corrected such that $\begin{array} { r } { G _ { i } \approx \sum _ { j \in \mathcal { N } _ { i } } W _ { i j } Z _ { j } ^ { \prime } } \end{array}$ . Further, the neighbors’ neighbors must be corrected and the depth of the few $n$ points propagates across the entire graph. We can solve for the final $Z ^ { \prime }$ directly with another quadratic optimization:
|
| 119 |
+
|
| 120 |
+
$$
|
| 121 |
+
\begin{array} { r } { Z ^ { \prime } = \arg \operatorname* { m i n } _ { \boldsymbol { Z } ^ { \prime } } \| \boldsymbol { Z } ^ { \prime } - \boldsymbol { W } \boldsymbol { Z } ^ { \prime } \| ^ { 2 } , \qquad \mathrm { s . t . } \ : Z _ { 1 : n } ^ { \prime } = G . } \end{array}
|
| 122 |
+
$$
|
| 123 |
+
|
| 124 |
+
To illustrate the correction process, imagine the simplest case where the depth of only a single point $\ R = 1$ ) is updated to $G _ { 1 } = Z _ { 1 } + \delta$ . A new optimal depth for Equation 8 is to move all the remaining points similarly, i.e. $Z ^ { \prime } = Z + { \bf 1 } \delta$ : as $Z = W Z$ and $W \mathbf { 1 } = \mathbf { 1 }$ we must have $W ( Z + { \bf 1 } \delta ) = Z + { \bf 1 } \bar { \delta }$ In the setting with $n > 1$ , the least-squares loss ensures a soft diffusion between the different LiDAR depth estimates. Both optimization problems in Equation 7 and Equation 8 can be solved exactly and efficiently with sparse matrix solvers. We summarize the procedure as an algorithm in the appendix.
|
| 125 |
+
|
| 126 |
+
From the view of graph-based manifold learning, our GDC algorithm is reminiscent of locally linear embeddings (Roweis & Saul, 2000) with landmarks to guide the final solution (Weinberger et al., 2005). Figure 1 illustrates vividly how the initial 3D point cloud from SDN (purple) of a car in the KITTI dataset is corrected with a few sparse LiDAR measurements (yellow). The resulting points (blue) are right inside the ground-truth box and clearly show the contour of the car. Figure 4 shows the additional improvement from the GDC (blue) over the pure SDN depth estimates (see subsection D.5 for detailed numbers). The error (calculated only on non-landmark pixels) is corrected over the entire image where many regions have no LiDAR measurements. This is because that the pseudo-LiDAR point cloud is sufficiently dense and we choose $k$ to be large enough (in practice, we use $k = 1 0$ )
|
| 127 |
+
|
| 128 |
+
Table 1: 3D object detection results on KITTI validation. We report $\mathrm { A P _ { B E V } } / \mathrm { A P _ { 3 D } }$ (in $\%$ ) of the car category, corresponding to average precision of the bird’s-eye view and 3D object detection. We arrange methods according to the input signals: M for monocular images, S for stereo images, L for 64-beam LiDAR, and L# for sparse 4-beam LiDAR. PL stands for PSEUDO-LIDAR. Our PSEUDO-LIDAR $+ + \left( P L + + \right)$ with enhanced depth estimation — SDN and GDC— are in blue. Methods with 64-beam LiDAR are in gray. Best viewed in color.
|
| 129 |
+
|
| 130 |
+
<table><tr><td rowspan="2">Detection algo</td><td rowspan="2">Input</td><td colspan="3">IoU= 0.5</td><td colspan="3">IoU= 0.7</td></tr><tr><td>Easy</td><td>Moderate</td><td>Hard</td><td>Easy</td><td>Moderate</td><td>Hard</td></tr><tr><td>3DOP</td><td>S</td><td>55.0/46.0</td><td>41.3/34.6</td><td>34.6/30.1</td><td>12.6/6.6</td><td>9.5/5.1</td><td>7.6/4.1</td></tr><tr><td>MLF-STEREO</td><td>S</td><td>=</td><td>53.7 /47.4</td><td></td><td></td><td>19.5 /9.8</td><td>=</td></tr><tr><td>S-RCNN</td><td>S</td><td>87.1/ 85.8</td><td>74.1/ 66.3</td><td>58.9 /57.2</td><td>68.5 / 54.1</td><td>48.3 /36.7</td><td>41.5 /31.1</td></tr><tr><td>PL: AVOD</td><td>S</td><td>89.0 / 88.5</td><td>77.5 /76.4</td><td>68.7 /61.2</td><td>74.9 /61.9</td><td>56.8 /45.3</td><td>49.0/39.0</td></tr><tr><td>PL: PIXOR*</td><td>S</td><td>89.0/ -</td><td>75.2/-</td><td>67.3/-</td><td>73.9 /-</td><td>54.0/ -</td><td>46.9 / -</td></tr><tr><td>PL: P-RCNN</td><td>S</td><td>88.4/ 88.0</td><td>76.6 /73.7</td><td>69.0 / 67.8</td><td>73.4 / 62.3</td><td>56.0 /44.9</td><td>52.7 /41.6</td></tr><tr><td>PL++: AVOD</td><td>S</td><td>89.4/ 89.0</td><td>79.0 / 77.8</td><td>70.1/ 69.1</td><td>77.0 / 63.2</td><td>63.7 /46.8</td><td>56.0 / 39.8</td></tr><tr><td>PL++: PIXOR*</td><td>S</td><td>89.9 / -</td><td>78.4/ -</td><td>74.7/ -</td><td>79.7/-</td><td>61.1/ -</td><td>54.5/ -</td></tr><tr><td>PL++: P-RCNN</td><td>S</td><td>89.8 / 89.7</td><td>83.8 / 78.6</td><td>77.5 / 75.1</td><td>82.0 / 67.9</td><td>64.0 / 50.1</td><td>57.3 / 45.3</td></tr><tr><td>PL++: AVOD</td><td>L#+ S</td><td>90.2/90.1</td><td>87.7 / 86.9</td><td>79.8 / 79.2</td><td>86.8 / 70.7</td><td>76.6 / 56.2</td><td>68.7 / 53.4</td></tr><tr><td>PL++: PIXOR*</td><td>L#+S</td><td>95.1/ -</td><td>85.1/ -</td><td>78.3/ -</td><td>84.0/ -</td><td>71.0/ -</td><td>65.2/-</td></tr><tr><td>PL++: P-RCNN</td><td>L#+S</td><td>90.3 / 90.3</td><td>87.7 /86.9</td><td>84.6 / 84.2</td><td>88.2 / 75.1</td><td>76.9 / 63.8</td><td>73.4 / 57.4</td></tr><tr><td>AVOD</td><td>L+M</td><td>90.5/90.5</td><td>89.4/89.2</td><td>88.5/88.2</td><td>89.4/82.8</td><td>86.5/73.5</td><td>79.3/67.1</td></tr><tr><td>PIXOR*</td><td>L+M</td><td>94.2/-</td><td>86.7/-</td><td>86.1/-</td><td>85.2/-</td><td>81.2/-</td><td>76.1/-</td></tr><tr><td>P-RCNN</td><td>L</td><td>97.3/97.3</td><td>89.9 / 89.8</td><td>89.4 /89.3</td><td>90.2 /89.2</td><td>87.9 /78.9</td><td>85.5/77.9</td></tr></table>
|
| 131 |
+
|
| 132 |
+
such that the KNN graph is typically connected (or consists of few large connected components). See subsection D.6 for more analysis. For objects such as cars the improvements through GDC are far more pronounced, as these typically are touched by the four LiDAR beams and can be corrected effectively.
|
| 133 |
+
|
| 134 |
+
# 5 EXPERIMENTS
|
| 135 |
+
|
| 136 |
+
# 5.1 SETUP
|
| 137 |
+
|
| 138 |
+
We refer to our combined method (SDN and GDC) for 3D object detection as PSEUDO-LIDAR $^ { + + }$ $( { \mathrm { P L } } + +$ in short). To analyze the contribution of each component, we evaluate SDN and GDC independently and jointly across several settings. For GDC we set $k = 1 0$ and consider adding signal from a (simulated) 4-beam LiDAR, unless stated otherwise.
|
| 139 |
+
|
| 140 |
+
Dataset, Metrics, and Baselines. We evaluate on the KITTI dataset (Geiger et al., 2013; 2012), which contains 7,481 and 7,518 images for training and testing. We follow (Chen et al., 2015) to separate the 7,481 images into 3,712 for training and 3,769 validation. For each (left) image, KITTI provides the corresponding right image, the 64-beam Velodyne LiDAR point cloud, the camera calibration matrices, and the bounding boxes. We focus on 3D object detection and bird’s-eye-view (BEV) localization and report results on the validation set. Specifically, we focus on the “car” category, following Chen et al. (2017) and Xu et al. (2018). We report average precision (AP) with IoU (Intersection over Union) thresholds at 0.5 and 0.7. We denote AP for the 3D and BEV tasks by $\mathrm { A P } _ { 3 \mathrm { D } }$ and $\mathsf { A P } _ { \mathrm { B E V } }$ . KITTI defines the easy, moderate, and hard settings, in which objects with 2D box heights smaller than or occlusion/truncation levels larger than certain thresholds are disregarded. We compare to four stereo-based detectors: PSEUDO-LIDAR (PL in short) (Wang et al., 2019a), 3DOP (Chen et al., 2015), S-RCNN (Li et al., 2019b), and MLF-STEREO (Xu & Chen, 2018).
|
| 141 |
+
|
| 142 |
+
Stereo depth network (SDN). We use PSMNET (Chang & Chen, 2018) as the backbone for our stereo depth estimation network (SDN). We follow Wang et al. (2019a) to pre-train SDN on the synthetic Scene Flow dataset (Mayer et al., 2016) and fine-tune it on the 3,712 training images of KITTI. We obtain the depth ground truth by projecting the corresponding LiDAR points onto images. We also train a PSMNET in the same way for comparison, which minimizes disparity error.
|
| 143 |
+
|
| 144 |
+
3D object detection. We apply three algorithms: AVOD (Ku et al., 2018), PIXOR (Yang et al., 2018b), and P-RCNN (Shi et al., 2019). All utilize information from LiDAR and/or monocular images. We use the released implementations of AVOD (specifically, AVOD-FPN) and P-RCNN. We implement PIXOR ourselves with a slight modification to include visual information (denoted as $\mathrm { P I X O R } ^ { \star }$ ). We train all models on the 3,712 training data from scratch by replacing the LiDAR points with pseudo-LiDAR data generated from stereo depth estimation. See the appendix for details.
|
| 145 |
+
|
| 146 |
+
Table 2: Results on the car category on the test set. We compare $\mathrm { P L } { + } { + }$ (blue) and 64-beam LiDAR (gray), using P-RCNN, and report $\mathsf { A P } _ { \mathrm { B E V } }$ / $\mathsf { A P } _ { 3 \mathrm { D } }$ at $\mathrm { I o U } { = } 0 . 7$ .
|
| 147 |
+
|
| 148 |
+
<table><tr><td>Input signal</td><td>Easy</td><td>Moderate</td><td>Hard</td></tr><tr><td>PL++ (SDN)</td><td>75.5/60.4</td><td>57.2/44.6</td><td>53.4/38.5</td></tr><tr><td>PL++ (SDN + GDC)</td><td>83.8/68.5</td><td>73.5/54.7</td><td>66.5 /51.2</td></tr><tr><td>LiDAR</td><td>89.5 / 85.9</td><td>85.7/75.8</td><td>79.1/68.3</td></tr></table>
|
| 149 |
+
|
| 150 |
+
Table 3: Ablation study on depth estimation. We report APBEV / $\mathsf { A P } _ { 3 \mathrm { D } }$ (in $\%$ ) of the car category at $\mathrm { I o U } { = } 0 . 7$ on KITTI validation. DL: depth loss.
|
| 151 |
+
|
| 152 |
+
<table><tr><td rowspan=1 colspan=1>Stereo depth</td><td rowspan=1 colspan=1>Easy</td><td rowspan=1 colspan=1>Moderate</td><td rowspan=1 colspan=1>Hard</td></tr><tr><td rowspan=1 colspan=1>PSMNETPSMNET+DLSDN</td><td rowspan=1 colspan=1>73.4/62.380.1/ 65.582.0 / 67.9</td><td rowspan=1 colspan=1>56.0/44.961.9 /46.864.0 / 50.1</td><td rowspan=1 colspan=1>52.7/41.656.0/43.057.3 /45.3</td></tr></table>
|
| 153 |
+
|
| 154 |
+
Table 4: Ablation study on leveraging sparse LiDAR. We report $\mathsf { A P } _ { \mathrm { B E V } }$ / $\mathsf { A P } _ { 3 \mathrm { D } }$ (in $\%$ ) of the car category at $\mathrm { I o U } { = } 0 . 7$ on KITTI validation. L#: 4-beam LiDAR signal alone. $\mathrm { S D N + L \# } .$ : pseudo-LiDAR with depths of landmark pixels replaced by 4-beam LiDAR. The best result of each column is in bold font.
|
| 155 |
+
|
| 156 |
+
<table><tr><td>Stereo depth</td><td>Easy</td><td>Moderate</td><td>Hard</td></tr><tr><td>SDN L#</td><td>82.0/67.9 73.2 /56.1</td><td>64.0/50.1 71.3 /53.1</td><td>57.3/45.3 70.5 / 51.5</td></tr><tr><td>SDN +L#</td><td>86.3 /72.0</td><td>73.0 /56.1</td><td>67.4 / 54.1</td></tr><tr><td>SDN +GDC</td><td>88.2 /75.1</td><td>76.9 / 63.8</td><td>73.4 / 57.4</td></tr></table>
|
| 157 |
+
|
| 158 |
+
Table 5: Results of pedestrians (top) and cyclists (bottom) on KITTI validation. We apply FPOINTNET Qi et al. (2018) and report $\mathsf { A P } _ { \mathrm { B E V } }$ / $\mathrm { A P } _ { 3 \mathrm { D } }$ (in $\%$ ) at $\mathrm { I o U } { = } 0 . 5$ , following Wang et al. (2019a).
|
| 159 |
+
|
| 160 |
+
<table><tr><td>Stereo depth</td><td>Easy</td><td>Moderate</td><td>Hard</td></tr><tr><td>PSMNET SDN SDN +GDC</td><td>41.3/33.8 48.7 /40.9 63.7 / 53.6</td><td>34.9/27.4 40.4 /32.9 53.8 /44.4</td><td>30.1/24.0 34.9 /28.8 46.8 /38.1</td></tr><tr><td>PSMNET SDN SDN +GDC</td><td>47.6/41.3 49.3/44.6 65.7 / 60.8</td><td>29.9/25.2 30.4 /28.7 45.8 /40.8</td><td>27.0/24.9 28.6 /26.4 42.8 /38.0</td></tr></table>
|
| 161 |
+
|
| 162 |
+
Sparser LiDAR. We simulate sparser LiDAR signal with fewer beams by first projecting the 64-beam LiDAR points onto a 2D plane of horizontal and vertical angles. We quantize the vertical angles into 64 levels with an interval of $0 . 4 ^ { \circ }$ , which is close to the SPEC of the 64-beam LiDAR. We keep points fallen into a subset of beams to mimic the sparser signal. See the appendix for details.
|
| 163 |
+
|
| 164 |
+
# 5.2 EXPERIMENTAL RESULTS
|
| 165 |
+
|
| 166 |
+
Results on the KITTI val set. We summarize the main results on KITTI object detection in Table 1. Several important trends can be observed: 1) Our $\mathrm { P L } { + + }$ with enhanced depth estimations by SDN and GDC yields consistent improvement over PL across all settings; 2) $\mathrm { P L } { + + }$ with GDC refinement of 4-beam LiDAR (Input: $\mathrm { L } \# + \mathrm { S } $ ) performs significantly better than $\mathrm { P L } { + + }$ with only stereo inputs (Input: S); 3) PL experiences a substantial drop in accuracy from IoU at 0.5 to 0.7 for the hard setting. This suggests that while PL detects faraway objects, it mislocalizes them, likely placing them at the wrong depth. This causes the object to be considered a missed detection at higher overlap thresholds. Interestingly, here is where we experience the largest gain — from PL: P-RCNN $( \mathrm { A P _ { B E V } = 5 2 . 7 } )$ ) to $\mathrm { P L } { + + }$ : P-RCNN $\langle \mathrm { A P } _ { \mathrm { B E V } } = 7 3 . 4 )$ with input as $\mathrm { L } \# + \mathrm { S }$ . Note that the majority of the gain comes from GDC, as $\mathrm { P L } { + + }$ with the stereo-only version only improving the score to $5 7 . 3 \mathrm { A P } _ { \mathrm { B E V } }$ . 4) The gap between $\mathrm { P L } { + + }$ and LiDAR is at most $1 3 \%$ $\mathsf { A P } _ { \mathrm { B E V } }$ , even at the hard setting under IoU at 0.7. 5) For IoU at 0.5, with the aid of only 4 LiDAR beams, $\mathrm { P L } { + + }$ $\mathrm { S D N + G D C ) }$ achieves results comparable to models with 64-beam LiDAR signals.
|
| 167 |
+
|
| 168 |
+
Results on the KITTI test set. Table 2 summarizes results on the car category on the KITTI test set. We see a similar gap between our methods and LiDAR as on the validation set, suggesting that our improvement is not particular to the validation data. Our approach without LiDAR refinement (pure SDN) is placed at the top position among all the image-based algorithms on the KITTI leaderboard.
|
| 169 |
+
|
| 170 |
+
In the following, we conduct a series of experiments to analyze the performance gain by our approaches and discuss several key observations. We mainly experiment with P-RCNN: we find that the results with AVOD and $\mathrm { P I X O R ^ { \star } }$ follow similar trends and thus include them in the appendix.
|
| 171 |
+
|
| 172 |
+
Depth loss and depth cost volume. To turn a disparity network (e.g., PSMNET) into SDN, there are two changes: 1) change the disparity loss into the depth loss; 2) change the disparity cost volume into the depth cost volume. In Table 3, we uncover the effect of these two changes separately. On the $\mathrm { A P _ { B E V } / A P _ { 3 D } }$ (moderate) metric, the depth loss gives us a $6 \% / 2 \%$ improvement and the depth cost volume brings another $2 \sim 3 \%$ gain4.
|
| 173 |
+
|
| 174 |
+
Impact of sparse LiDAR beams. We leverage 4-beam LiDAR to correct stereo depth using GDC. However, it is possible that gains in 3D object detection come entirely from the new LiDAR sensor and that the stereo estimates are immaterial. In Table 4, we study this question by comparing the detection results against those of models using 1) sole 4-beam LiDAR point clouds and 2) pseudo-LiDAR point clouds with depths of landmark pixels replaced by 4-beam LiDAR: i.e., in depth correction, we only correct depths of the landmark pixels without propagation. It can be seen that 4-beam LiDAR itself performs fairly well on locating faraway objects but cannot capture nearby objects precisely, while simply replacing pseudo-LiDAR with LiDAR at the landmark pixels prevents the model from detecting faraway object accurately. In contrast, our proposed GDC method effectively combines the merits of the two signals, achieving superior performance than using them alone.
|
| 175 |
+
|
| 176 |
+
Pedestrian and cyclist detection. For a fair comparison to (Wang et al., 2019a), we apply FPOINTNET (Qi et al., 2018) for detecting pedestrians and cyclists. Table 5 shows the results: our methods significantly boosts the performance.
|
| 177 |
+
|
| 178 |
+

|
| 179 |
+
Figure 6: Qualitative Comparison. We show the detection results on a KITTI validation scene by P-RCNN with different input point clouds. We visualize them from both frontal-view images and bird’s-eye view (BEV) point maps. Ground-truth boxes are in green and predicted bounding boxes are in red. The observer is at the left-hand side of the BEV map looking to the right. In other words, ground truth boxes on the right are more faraway (i.e., deeper) from the observer, and hence hard to localize. Best viewed in color.
|
| 180 |
+
|
| 181 |
+
Qualitative visualization. In Figure 6, we show an qualitative comparison of detection results on a randomly chosen scene in the KITTI object validation set, using P-RCNN (with confidence $> 0 . 9 5 ,$ ) with different input signals. Specifically, we show the results from the frontal-view images and the bird’s-eye view (BEV) point clouds. In the BEV map, the observer is on the left-hand side looking to the right. It can be seen that the point clouds generated by PSEUDO-LIDAR $^ { + + }$ (SDN alone or SDN $+ \mathrm { G D C } )$ align better with LiDAR than that generated by PSEUDO-LIDAR (PSMNET). For nearby objects (i.e., bounding boxes close to the left in the BEV map), we see that P-RCNN with any point cloud performs fairly well in localization. However, for faraway objects (i.e., bounding boxes close to the right), PSEUDO-LIDAR with depth estimated from PSMNET predicts objects (red boxes) that are deviated from the ground truths (green boxes). Moreover, the noisy PSMNET points also leads to false negatives. In contrast, the detected boxes by our PSEUDO-LIDAR $^ { + + }$ , either with SDN alone or with SDN $+ \mathrm { G D C }$ , align pretty well with the ground truth boxes, justifying our targeted improvement in estimating faraway depths.
|
| 182 |
+
|
| 183 |
+
Additional results, analyses, qualitative visualization and discussions. We provide results of PSEUDO-LIDAR $^ { + + }$ with fewer LiDAR beams, comparisons to depth completion methods, analysis on depth quality and detection accuracy, run time, failure cases, and more qualitative results in the appendix. With simple optimizations, GDC runs in 90 ms/frame using a single GPU (7.7 ms for KD-tree construction and search).
|
| 184 |
+
|
| 185 |
+
# 6 CONCLUSION
|
| 186 |
+
|
| 187 |
+
In this paper we made two contributions to improve the 3D object detection in autonomous vehicles without expensive LiDAR. First, we identify the disparity estimation as a main source of error for stereo-based systems and propose a novel approach to learn depth directly end-to-end instead of through disparity estimates. Second, we advocate that one should not use expensive LiDAR sensors to learn the local structure and depth of objects. Instead one can use commodity stereo cameras for the former and a cheap sparse LiDAR to correct the systematic bias in the resulting depth estimates. We provide a novel graph propagation algorithm that integrates the two data modalities and propagates the sparse yet accurate depth estimates using two sparse matrix solvers. The resulting system, PSEUDO-LIDAR $^ { + + }$ $\mathbf { \nabla } \cdot ( \mathbf { S } \mathbf { D } \mathbf { N } + \mathbf { G } \mathbf { D } \mathbf { C } )$ , performs almost on par with 64-beam LiDAR systems for $\$ 75,000$ but only requires 4 beams and two commodity cameras, which could be obtained with a total cost of less than $\$ 1,000$ .
|
| 188 |
+
|
| 189 |
+
# ACKNOWLEDGMENTS
|
| 190 |
+
|
| 191 |
+
This research is supported by grants from the National Science Foundation NSF (III-1618134, III1526012, IIS-1149882, IIS-1724282, and TRIPODS-1740822), the Office of Naval Research DOD (N00014-17-1-2175), the Bill and Melinda Gates Foundation, and the Cornell Center for Materials Research with funding from the NSF MRSEC program (DMR-1719875). We are thankful for generous support by Zillow and SAP America Inc.
|
| 192 |
+
|
| 193 |
+
# REFERENCES
|
| 194 |
+
|
| 195 |
+
Florian Chabot, Mohamed Chaouch, Jaonary Rabarisoa, Céline Teulière, and Thierry Chateau. Deep manta: A coarse-to-fine many-task network for joint 2d and 3d vehicle analysis from monocular image. In CVPR, 2017.
|
| 196 |
+
|
| 197 |
+
Jia-Ren Chang and Yong-Sheng Chen. Pyramid stereo matching network. In CVPR, 2018.
|
| 198 |
+
|
| 199 |
+
Xiaozhi Chen, Kaustav Kundu, Yukun Zhu, Andrew G Berneshawi, Huimin Ma, Sanja Fidler, and Raquel Urtasun. 3d object proposals for accurate object class detection. In NIPS, 2015.
|
| 200 |
+
|
| 201 |
+
Xiaozhi Chen, Kaustav Kundu, Ziyu Zhang, Huimin Ma, Sanja Fidler, and Raquel Urtasun. Monocular 3d object detection for autonomous driving. In CVPR, 2016.
|
| 202 |
+
|
| 203 |
+
Xiaozhi Chen, Huimin Ma, Ji Wan, Bo Li, and Tian Xia. Multi-view 3d object detection network for autonomous driving. In CVPR, 2017.
|
| 204 |
+
|
| 205 |
+
Xiaozhi Chen, Kaustav Kundu, Yukun Zhu, Huimin Ma, Sanja Fidler, and Raquel Urtasun. 3d object proposals using stereo imagery for accurate object class detection. IEEE TPAMI, 40(5):1259–1272, 2018.
|
| 206 |
+
|
| 207 |
+
Xinjing Cheng, Peng Wang, and Ruigang Yang. Depth estimation via affinity learned with convolutional spatial propagation network. In ECCV, 2018.
|
| 208 |
+
|
| 209 |
+
Xinxin Du, Marcelo H Ang Jr, Sertac Karaman, and Daniela Rus. A general pipeline for 3d detection of vehicles. In ICRA, 2018.
|
| 210 |
+
|
| 211 |
+
Martin Engelcke, Dushyant Rao, Dominic Zeng Wang, Chi Hay Tong, and Ingmar Posner. Vote3deep: Fast object detection in 3d point clouds using efficient convolutional neural networks. In ICRA, 2017.
|
| 212 |
+
|
| 213 |
+
Huan Fu, Mingming Gong, Chaohui Wang, Kayhan Batmanghelich, and Dacheng Tao. Deep ordinal regression network for monocular depth estimation. In CVPR, pp. 2002–2011, 2018.
|
| 214 |
+
|
| 215 |
+
Andreas Geiger, Philip Lenz, and Raquel Urtasun. Are we ready for autonomous driving? the kitti vision benchmark suite. In CVPR, 2012.
|
| 216 |
+
|
| 217 |
+
Andreas Geiger, Philip Lenz, Christoph Stiller, and Raquel Urtasun. Vision meets robotics: The kitti dataset. The International Journal of Robotics Research, 32(11):1231–1237, 2013.
|
| 218 |
+
|
| 219 |
+
Clément Godard, Oisin Mac Aodha, and Gabriel J Brostow. Unsupervised monocular depth estimation with left-right consistency. In CVPR, 2017.
|
| 220 |
+
|
| 221 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016.
|
| 222 |
+
|
| 223 |
+
Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross Girshick. Mask r-cnn. In ICCV, 2017.
|
| 224 |
+
|
| 225 |
+
Jason Ku, Melissa Mozifian, Jungwook Lee, Ali Harakeh, and Steven Waslander. Joint 3d proposal generation and object detection from view aggregation. In IROS, 2018.
|
| 226 |
+
|
| 227 |
+
Alex H Lang, Sourabh Vora, Holger Caesar, Lubing Zhou, Jiong Yang, and Oscar Beijbom. Pointpillars: Fast encoders for object detection from point clouds. In CVPR, 2019.
|
| 228 |
+
|
| 229 |
+
Bo Li. 3d fully convolutional network for vehicle detection in point cloud. In IROS, 2017.
|
| 230 |
+
|
| 231 |
+
Bo Li, Tianlei Zhang, and Tian Xia. Vehicle detection from 3d lidar using fully convolutional network. In Robotics: Science and Systems, 2016.
|
| 232 |
+
|
| 233 |
+
Buyu Li, Wanli Ouyang, Lu Sheng, Xingyu Zeng, and Xiaogang Wang. Gs3d: An efficient 3d object detection framework for autonomous driving. In CVPR, 2019a.
|
| 234 |
+
|
| 235 |
+
Peiliang Li, Xiaozhi Chen, and Shaojie Shen. Stereo r-cnn based 3d object detection for autonomous driving. In CVPR, 2019b.
|
| 236 |
+
|
| 237 |
+
Ming Liang, Bin Yang, Shenlong Wang, and Raquel Urtasun. Deep continuous fusion for multi-sensor 3d object detection. In ECCV, 2018.
|
| 238 |
+
|
| 239 |
+
Tsung-Yi Lin, Piotr Dollár, Ross B Girshick, Kaiming He, Bharath Hariharan, and Serge J Belongie. Feature pyramid networks for object detection. In CVPR, volume 1, pp. 4, 2017.
|
| 240 |
+
|
| 241 |
+
Fangchang Ma, Guilherme Venturelli Cavalheiro, and Sertac Karaman. Self-supervised sparse-todense: self-supervised depth completion from lidar and monocular camera. In ICRA, 2019.
|
| 242 |
+
|
| 243 |
+
Nikolaus Mayer, Eddy Ilg, Philip Hausser, Philipp Fischer, Daniel Cremers, Alexey Dosovitskiy, and Thomas Brox. A large dataset to train convolutional networks for disparity, optical flow, and scene flow estimation. In CVPR, 2016.
|
| 244 |
+
|
| 245 |
+
Gregory P Meyer, Jake Charland, Darshan Hegde, Ankit Laddha, and Carlos Vallespi-Gonzalez. Sensor fusion for joint 3d object detection and semantic segmentation. arXiv preprint arXiv:1904.11466, 2019a.
|
| 246 |
+
|
| 247 |
+
Gregory P Meyer, Ankit Laddha, Eric Kee, Carlos Vallespi-Gonzalez, and Carl K Wellington. Lasernet: An efficient probabilistic 3d object detector for autonomous driving. In CVPR, 2019b.
|
| 248 |
+
|
| 249 |
+
Arsalan Mousavian, Dragomir Anguelov, John Flynn, and Jana Košecká. 3d bounding box estimation using deep learning and geometry. In CVPR, 2017.
|
| 250 |
+
|
| 251 |
+
Cuong Cao Pham and Jae Wook Jeon. Robust object proposals re-ranking for object detection in autonomous driving using convolutional neural networks. Signal Processing: Image Communication, 53:110–122, 2017.
|
| 252 |
+
|
| 253 |
+
Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. In CVPR, 2017a.
|
| 254 |
+
|
| 255 |
+
Charles R Qi, Wei Liu, Chenxia Wu, Hao Su, and Leonidas J Guibas. Frustum pointnets for 3d object detection from rgb-d data. In CVPR, 2018.
|
| 256 |
+
|
| 257 |
+
Charles Ruizhongtai Qi, Li Yi, Hao Su, and Leonidas J Guibas. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. In NIPS, 2017b.
|
| 258 |
+
|
| 259 |
+
Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In NIPS, 2015.
|
| 260 |
+
|
| 261 |
+
Sam T Roweis and Lawrence K Saul. Nonlinear dimensionality reduction by locally linear embedding. science, 2000.
|
| 262 |
+
|
| 263 |
+
Maxim Shevtsov, Alexei Soupikov, and Alexander Kapustin. Highly parallel fast kd-tree construction for interactive ray tracing of dynamic scenes. In Computer Graphics Forum, volume 26, pp. 395–404. Wiley Online Library, 2007.
|
| 264 |
+
|
| 265 |
+
Shaoshuai Shi, Xiaogang Wang, and Hongsheng Li. Pointrcnn: 3d object proposal generation and detection from point cloud. In CVPR, 2019.
|
| 266 |
+
|
| 267 |
+
Siddharth Srivastava, Frederic Jurie, and Gaurav Sharma. Learning 2d to 3d lifting for object detection in 3d for autonomous vehicles. In IROS, 2019.
|
| 268 |
+
|
| 269 |
+
Paden Tomasello, Sammy Sidhu, Anting Shen, Matthew W Moskewicz, Nobie Redmon, Gataryi Joshi, Romi Phadte, Paras Jain, and Forrest Iandola. Dscnet: Replicating lidar point clouds with deep sensor cloning. arXiv preprint arXiv:1811.07070, 2018.
|
| 270 |
+
|
| 271 |
+
Luz Abril Torres-Mendez and Gregory Dudek. Statistical inference and synthesis in the image domain for mobile robot environment modeling. In IROS, 2004.
|
| 272 |
+
|
| 273 |
+
Tsun-Hsuan Wang, Fu-En Wang, Juan-Ting Lin, Yi-Hsuan Tsai, Wei-Chen Chiu, and Min Sun. Plugand-play: Improve depth estimation via sparse data propagation. arXiv preprint arXiv:1812.08350, 2018.
|
| 274 |
+
|
| 275 |
+
Yan Wang, Wei-Lun Chao, Divyansh Garg, Bharath Hariharan, Mark Campbell, and Kilian Q. Weinberger. Pseudo-lidar from visual depth estimation: Bridging the gap in 3d object detection for autonomous driving. In CVPR, 2019a.
|
| 276 |
+
|
| 277 |
+
Yan Wang, Zihang Lai, Gao Huang, Brian H Wang, Laurens van der Maaten, Mark Campbell, and Kilian Q Weinberger. Anytime stereo image depth estimation on mobile devices. In ICRA, 2019b.
|
| 278 |
+
|
| 279 |
+
Kilian Q. Weinberger, Benjamin Packer, and Lawrence K. Saul. Nonlinear dimensionality reduction by semidefinite programming and kernel matrix factorization. In AISTATS, 2005.
|
| 280 |
+
|
| 281 |
+
Yu Xiang, Wongun Choi, Yuanqing Lin, and Silvio Savarese. Data-driven 3d voxel patterns for object category recognition. In CVPR, 2015.
|
| 282 |
+
|
| 283 |
+
Yu Xiang, Wongun Choi, Yuanqing Lin, and Silvio Savarese. Subcategory-aware convolutional neural networks for object proposals and detection. In WACV, 2017.
|
| 284 |
+
|
| 285 |
+
Zhu Xiaojin and Ghahramani Zoubin. Learning from labeled and unlabeled data with label propagation. Tech. Rep., Technical Report CMU-CALD-02–107, Carnegie Mellon University, 2002.
|
| 286 |
+
|
| 287 |
+
Bin $\mathrm { X u }$ and Zhenzhong Chen. Multi-level fusion based 3d object detection from monocular images. In CVPR, 2018.
|
| 288 |
+
|
| 289 |
+
Danfei Xu, Dragomir Anguelov, and Ashesh Jain. Pointfusion: Deep sensor fusion for 3d bounding box estimation. In CVPR, 2018.
|
| 290 |
+
|
| 291 |
+
Koichiro Yamaguchi, David McAllester, and Raquel Urtasun. Efficient joint segmentation, occlusion labeling, stereo and flow estimation. In ECCV, 2014.
|
| 292 |
+
|
| 293 |
+
Yan Yan, Yuxing Mao, and Bo Li. Second: Sparsely embedded convolutional detection. Sensors, 18 (10):3337, 2018.
|
| 294 |
+
|
| 295 |
+
Bin Yang, Ming Liang, and Raquel Urtasun. Hdnet: Exploiting hd maps for 3d object detection. In Conference on Robot Learning, pp. 146–155, 2018a.
|
| 296 |
+
|
| 297 |
+
Bin Yang, Wenjie Luo, and Raquel Urtasun. Pixor: Real-time 3d object detection from point clouds. In CVPR, 2018b.
|
| 298 |
+
|
| 299 |
+
Yanchao Yang, Alex Wong, and Stefano Soatto. Dense depth posterior (ddp) from single image and sparse range. In CVPR, 2019.
|
| 300 |
+
|
| 301 |
+
Yin Zhou and Oncel Tuzel. Voxelnet: End-to-end learning for point cloud based 3d object detection. In CVPR, 2018.
|
| 302 |
+
|
| 303 |
+
# Appendix
|
| 304 |
+
|
| 305 |
+
We provide details omitted in the main text.
|
| 306 |
+
|
| 307 |
+
• Appendix A: details on constructing the depth cost volume (section 3 of the main paper).
|
| 308 |
+
• Appendix B: detailed implementation of the GDC algorithm (section 4 of the main paper).
|
| 309 |
+
• Appendix C: additional details of experimental setups (subsection 5.1 of the main paper).
|
| 310 |
+
• Appendix D: additional results, analyses, and discussions (subsection 5.2 of the main paper).
|
| 311 |
+
|
| 312 |
+
# A DEPTH COST VOLUME
|
| 313 |
+
|
| 314 |
+
With Equation 2, we know where each grid $( u , v , z )$ in $C _ { \mathrm { d e p t h } }$ corresponds to in $C _ { \mathrm { d i s p } }$ (may not be on a grid). We can then obtain features for each grid in $\dot { C } _ { \mathrm { d e p t h } }$ (i.e., $C _ { \mathrm { d e p t h } } ( u , v , z , : ) )$ by bilinear interpolation over features on grids of $C _ { \mathrm { d i s p } }$ around the non-grid location (i.e., $\left( u , v , { \frac { f _ { U } \times b } { z } } \right) )$ . We applied the “grid_sample” function in PyTorch for bilinear interpolation.
|
| 315 |
+
|
| 316 |
+
We use PSMNET (Chang & Chen, 2018) as the backbone for our stereo depth estimation network (SDN). The only change is to construct the depth cost volume before performing 3D convolutions.
|
| 317 |
+
|
| 318 |
+
# B GRAPH-BASED DEPTH CORRECTION (GDC) ALGORITHM
|
| 319 |
+
|
| 320 |
+
Here we present the GDC algorithm in detail (see algorithm 1). The two steps described in the main paper can be easily turned into two (sparse) linear systems and then solved by using Lagrange multipliers. For the first step (i.e., Equation 7), we solve the same problem as in the main text but we switch the objective to minimizing the $L _ { 2 }$ -norm of $W$ and set $Z - W Z = 0$ as a constraint5. For the second step (i.e., Equation 8), we use the Conjugate Gradient (CG) to iteratively solve the sparse linear system.
|
| 321 |
+
|
| 322 |
+
Algorithm 1: Graph-based depth correction (GDC). “;” stands for column-wise concatenation.
|
| 323 |
+
|
| 324 |
+
Input: Stereo depth map $Z \in \mathbb { R } ^ { ( n + m ) \times 1 }$ , the corresponding pseudo-LiDAR (PL) point cloud $P \in \mathbb { R } ^ { ( n + m ) \times 3 }$ , and LiDAR depths $G \in \mathbb { R } ^ { n \times 1 }$ on the first the $n$ pixels.
|
| 325 |
+
Output: Corrected depth map $Z ^ { \prime } \in \mathbb { R } ^ { ( n + m ) \times 1 }$
|
| 326 |
+
function $\mathrm { G D C } ( Z , P , { \bar { G } } , K )$ Solve: $W = \mathop { \mathrm { a r g } } \operatorname* { m i n } _ { W \in \mathbb { R } ^ { ( n + m ) \times ( n + m ) } } \| W \| ^ { 2 }$ s.t. $Z - W \cdot Z = 0 $ , $W _ { i j } = 0$ if $j \notin \mathcal { N } _ { i }$ (i.e., the set of neighbors of the $i ^ { t h }$ point) according to $P$ , $\textstyle \sum _ { j } W _ { i j } = 1$ for $\forall i = 1 , \ldots , n + m$ . Solve: $\begin{array} { r } { Z _ { P L } ^ { \prime } = \arg \operatorname* { m i n } _ { Z _ { P L } ^ { \prime } \in \mathbb { R } ^ { m \times 1 } } \| [ G ; Z _ { P L } ^ { \prime } ] - W [ G ; Z _ { P L } ^ { \prime } ] \| ^ { 2 } } \end{array}$ return $[ G ; Z _ { P L } ^ { \prime } ]$
|
| 327 |
+
end
|
| 328 |
+
|
| 329 |
+
# C EXPERIMENTAL SETUP
|
| 330 |
+
|
| 331 |
+
# C.1 SPARSE LIDAR GENERATION
|
| 332 |
+
|
| 333 |
+
In this section, we explain how we generate sparser LiDAR with fewer beams from a 64-beam LiDAR point cloud from KITTI dataset in detail. For every point $( x _ { i } , y _ { i } , z _ { i } ) \in \mathbb { R } ^ { 3 }$ of the point cloud in one
|
| 334 |
+
|
| 335 |
+
scene (in LiDAR coordinate system ( $x$ : front, $y$ : left, $z .$ : up, and $( 0 , 0 , 0 )$ is the location of the LiDAR sensor)), we compute the elevation angle $\theta _ { i }$ to the LiDAR sensor as
|
| 336 |
+
|
| 337 |
+
$$
|
| 338 |
+
\theta _ { i } = \arg \cos \left( \frac { \sqrt { x _ { i } ^ { 2 } + y _ { i } ^ { 2 } } } { \sqrt { x _ { i } ^ { 2 } + y _ { i } ^ { 2 } + z _ { i } ^ { 2 } } } \right) .
|
| 339 |
+
$$
|
| 340 |
+
|
| 341 |
+
We order the points by their elevation angles and slice them into separate lines by step $0 . 4 ^ { \circ }$ , starting from $- 2 3 . 6 ^ { \circ }$ (close to the Velodyne 64-beam LiDAR SPEC). We select LiDAR points whose elevation angles fall within $[ - 2 . 4 ^ { \circ } , - 2 . 0 ^ { \circ } ) \cup [ - 0 . 8 ^ { \circ } , - 0 . 4 ^ { \circ } )$ to be the 2-beam LiDAR signal, and similarly $\left[ - 2 . 4 ^ { \circ } , - 2 . 0 ^ { \circ } \right) \cup \left[ - 1 . 6 ^ { \circ } , - 1 . 2 ^ { \circ } \right) \cup \left[ - 0 . 8 ^ { \circ } , - 0 . 4 ^ { \circ } \right) \cup \left[ 0 . 0 ^ { \circ } , 0 . 4 ^ { \circ } \right)$ to be the 4-beam LiDAR signal. We choose them in such a way that consecutive lines has a $0 . 8 ^ { \circ }$ interval, following the SPEC of the “cheap” 4-beam LiDAR ScaLa. We visualize these sparsified LiDAR point clouds from the bird’s-eye view on one example scene in Figure 7.
|
| 342 |
+
|
| 343 |
+

|
| 344 |
+
Figure 7: Bird’s-eye views of sparsified LiDAR on an example scene. The observer is on the bottom side looking up. We filter out points invisible from the left image. (One floor square is $1 0 \mathrm { m } \times 1 0 \mathrm { m } .$ )
|
| 345 |
+
|
| 346 |
+
# C.2 3D OBJECT DETECTION ALGORITHMS
|
| 347 |
+
|
| 348 |
+
In this section, we provide more details about the way we train 3D object detection models on pseudo-LiDAR point clouds. For AVOD, we use the same model as in (Wang et al., 2019a). For P-RCNN, we use the implementation provided by the authors. Since the P-RCNN model exploits the sparse nature of LiDAR point clouds, when training it with pseudo-LiDAR input, we will first sparsify the point clouds into 64 beams using the method described in subsection C.1. For $\mathrm { P I X O R ^ { \star } }$ , we implement the same base model structure and data augmentation specified by Yang et al. (2018b), but without the “decode fine-tune” step and focal loss. Inspired by the trick in (Liang et al., 2018), we add another image feature (ResNet-18 by He et al. (2016)) branch along the LiDAR branch, and concatenate the corresponding image features onto the LiDAR branch at each stage. We train $\mathrm { P I X O R ^ { \star } }$ using RMSProp with momentum 0.9, learning rate $1 0 ^ { - 5 }$ (decay by 10 after 50 and 80 epochs) for 90 epochs. The BEV evaluation results are similar to the reported results (see Table 1).
|
| 349 |
+
|
| 350 |
+
D ADDITIONAL RESULTS, ANALYSES, AND DISCUSSIONS
|
| 351 |
+
|
| 352 |
+
# D.1 ABLATION STUDY
|
| 353 |
+
|
| 354 |
+
In Table 6 and Table 7 we provide more experimental results aligned with experiments in subsection 5.2 of the main paper. We conduct the same experiments on two other models, AVOD and $\mathrm { P I X O R ^ { \star } }$ , and observe similar trends of improvements brought by learning with the depth loss (from PSMNET to PSMNET $+ \mathrm { D L }$ ), constructing the depth cost volume (from PSMNET $+ \mathrm { D L }$ to SDN), and applying GDC to correct the bias in stereo depth estimation (comparing SDN $\mathrm { \Omega } + \mathrm { G D C }$ with SDN).
|
| 355 |
+
|
| 356 |
+
We note that, in Table 7, results of AVOD (or $\mathrm { P I X O R } ^ { \star }$ ) with $\mathrm { S D N + L \# }$ are worse than those with L# at the moderate and hard settings. This observation is different from that in Table 4, where P-RCNN with $\mathrm { S D N + L \# }$ outperforms P-RCNN with L# in 5 out of 6 comparisons. We hypothesize that this is because P-RCNN takes sparsified inputs (see subsection C.2) while AVOD and $\mathrm { P I X O R } ^ { \star }$ take dense inputs. In the later case, the four replaced LiDAR beams in $\mathrm { S D N + L \# }$ will be dominated by the dense stereo depths so that $\mathrm { S D N + L \# }$ is worse than L#.
|
| 357 |
+
|
| 358 |
+
# D.2 USING FEWER LIDAR BEAMS
|
| 359 |
+
|
| 360 |
+
In $\mathrm { P L } { + + }$ (i.e., $\mathrm { S D N + G D C } )$ , we use 4-beam LiDAR to correct the predicted point cloud. In Table 8, we investigate using fewer (and also potentially cheaper) LiDAR beams for depth correction. We observe that even with 2 beams, GDC can already manage to combine the two signals and yield a better performance than using 2-beam LiDAR or pseudo-LiDAR alone.
|
| 361 |
+
|
| 362 |
+
Table 6: Ablation study on stereo depth estimation. We report APBEV / $\mathrm { A P } _ { 3 \mathrm { D } }$ (in $\%$ ) of the car category at $\mathrm { I o U } { = } 0 . 7$ on the KITTI validation set. DL stands for depth loss.
|
| 363 |
+
|
| 364 |
+
<table><tr><td rowspan="2">Depth Estimation</td><td colspan="3">PIXOR*</td><td colspan="3">AVOD</td></tr><tr><td>Easy</td><td>Moderate</td><td>Hard</td><td>Easy</td><td>Moderate</td><td>Hard</td></tr><tr><td>PSMNET PSMNET+DL SDN</td><td>73.9/- 75.8/ - 79.7/-</td><td>54.0/- 56.2/ - 61.1/-</td><td>46.9/- 51.9 / - 54.5/ -</td><td>74.9 / 61.9 75.7 / 60.5 77.0/ 63.2 63.7 /46.8</td><td>56.8 /45.3 57.1/ 44.8</td><td>49.0/39.0 49.2 /38.4 56.0 /39.8</td></tr></table>
|
| 365 |
+
|
| 366 |
+
Table 7: Ablation study on leveraging sparse LiDAR. We report $\mathsf { A P } _ { \mathrm { B E V } }$ / $\mathsf { A P } _ { 3 \mathrm { D } }$ (in $\%$ ) of the car category at $\mathrm { I o U } { = } 0 . 7$ on the KITTI validation set. L# stands for 4-beam LiDAR signal. SDN +L# means we replace the depth of a portion of pseudo-LiDAR points (i.e., landmark pixels) by L#.
|
| 367 |
+
|
| 368 |
+
<table><tr><td rowspan="2">Depth Estimation</td><td colspan="3">PIXOR*</td><td colspan="3">AVOD</td></tr><tr><td>Easy</td><td>Moderate</td><td>Hard</td><td>Easy</td><td>Moderate</td><td>Hard</td></tr><tr><td>SDN</td><td>79.7/-</td><td>61.1/-</td><td>54.5/ -</td><td>77.0/63.2</td><td>63.7 /46.8</td><td>56.0/39.8</td></tr><tr><td>L#</td><td>72.0 / -</td><td>64.7 / -</td><td>63.6 / -</td><td>77.0 / 62.1</td><td>68.8/54.7</td><td>67.1/ 53.0</td></tr><tr><td>SDN +L#</td><td>75.6/ -</td><td>59.4 / -</td><td>53.2 / -</td><td>84.1/66.0</td><td>67.0 / 53.1</td><td>58.8 /46.4</td></tr><tr><td>SDN +GDC</td><td>84.0 /-</td><td>71.0 / -</td><td>65.2 / -</td><td>86.8/70.7</td><td>76.6/56.2</td><td>68.7 /53.4</td></tr></table>
|
| 369 |
+
|
| 370 |
+
Table 8: Ablation study on the sparsity of LiDAR. We report APBEV / $\mathrm { A P } _ { 3 \mathrm { D } }$ (in $\%$ ) of the car category at $\mathrm { I o U } { = } 0 . 7$ on the KITTI validation set. L# stands for using sparse LiDAR signal alone. The number in brackets indicates the number of beams in use.
|
| 371 |
+
|
| 372 |
+
<table><tr><td rowspan=2 colspan=1>Depth Estimation</td><td rowspan=1 colspan=3>P-RCNN</td><td rowspan=1 colspan=3>PIXOR*</td></tr><tr><td rowspan=1 colspan=1>Easy</td><td rowspan=1 colspan=1>Moderate</td><td rowspan=1 colspan=1>Hard</td><td rowspan=1 colspan=1>Easy</td><td rowspan=1 colspan=1>Moderate</td><td rowspan=1 colspan=1>Hard</td></tr><tr><td rowspan=1 colspan=1>SDN</td><td rowspan=1 colspan=1>82.0/ 67.9</td><td rowspan=1 colspan=1>64.0/50.1</td><td rowspan=1 colspan=1>57.3/45.3</td><td rowspan=1 colspan=1>79.77-</td><td rowspan=1 colspan=1>61.1/-</td><td rowspan=1 colspan=1>54.5/ -</td></tr><tr><td rowspan=1 colspan=1>L# (2)L#(4)</td><td rowspan=1 colspan=1>69.2/46.373.2 / 56.1</td><td rowspan=1 colspan=1>62.8/41.971.3 / 53.1</td><td rowspan=1 colspan=1>61.3/40.070.5 / 51.5</td><td rowspan=1 colspan=1>66.8/-72.0/-</td><td rowspan=1 colspan=1>55.5/ -64.7/-</td><td rowspan=1 colspan=1>53.3/ -63.6/-</td></tr><tr><td rowspan=1 colspan=1>SDN + GDC (2)SDN + GDC (4)</td><td rowspan=1 colspan=1>87.2/73.388.2/75.1</td><td rowspan=1 colspan=1>72.0 / 56.676.9 / 63.8</td><td rowspan=1 colspan=1>67.1/ 54.173.4 /57.4</td><td rowspan=1 colspan=1>82.0/-84.0/-</td><td rowspan=1 colspan=1>65.3/-71.0/-</td><td rowspan=1 colspan=1>61.7/-65.2/ -</td></tr></table>
|
| 373 |
+
|
| 374 |
+
Table 9: Comparison of GDC and PNP for 3D object detection. We report $\mathsf { A P } _ { \mathrm { B E V } }$ / $\mathsf { A P } _ { 3 \mathrm { D } }$ (in $\%$ ) of the car category at $\mathrm { I o U } { = } 0 . 7$ on the KITTI validation set, using SDN $^ +$ PNP or $\mathrm { S D N + G D C }$ for depth estimation and P-RCNN or $\mathrm { P I X O R } ^ { \star }$ for detection.
|
| 375 |
+
|
| 376 |
+
<table><tr><td rowspan="2">Input signal</td><td colspan="3">P-RCNN</td><td colspan="3">PIXOR*</td></tr><tr><td>Easy</td><td>Moderate</td><td>Hard</td><td>Easy</td><td>Moderate</td><td>Hard</td></tr><tr><td>SDN+PNP</td><td>86.3/72.1</td><td>73.3/ 58.9</td><td>67.2/54.2</td><td>79.1/-</td><td>64.2/-</td><td>54.0/-</td></tr><tr><td>SDN +GDC</td><td>88.2 /75.1</td><td>76.9 / 63.8</td><td>73.4/57.4</td><td>84.0/-</td><td>71.0 / -</td><td>65.2/ -</td></tr></table>
|
| 377 |
+
|
| 378 |
+
# D.3 DEPTH CORRECTION VS. DEPTH COMPLETION
|
| 379 |
+
|
| 380 |
+
We compare our GDC algorithm for depth correction to depth completion algorithms, which aim to “densify” LiDAR data beyond the beam lines (Wang et al., 2018; Tomasello et al., 2018; Ma et al., 2019; Yang et al., 2019; Cheng et al., 2018; Torres-Mendez & Dudek, $2 0 0 4 ) ^ { 6 }$ . We note that most depth completion approaches take as input a 64-beam LiDAR and a single image, while our focus is on fusing a much sparser 4-beam LiDAR and stereo depths. As such, the two problems are not
|
| 381 |
+
|
| 382 |
+

|
| 383 |
+
Figure 8: Comparison of GDC and PNP for depth correction. We report the median of absolute errors on the KITTI validation set. See text for details.
|
| 384 |
+
|
| 385 |
+

|
| 386 |
+
Figure 9: Median depth estimation errors w.r.t. the shortest distances to 4-beam LiDAR points on KITTI validation set.
|
| 387 |
+
|
| 388 |
+
Table 10: Comparison of 3D object detection using the naive and optimized implementation of GDC. We report $\mathsf { A P } _ { \mathrm { B E V } }$ / $\mathsf { A P } _ { 3 \mathrm { D } }$ (in $\%$ ) of the car category at $\mathrm { I o U } { = } 0 . 7$ on the KITTI validation set, using P-RCNN for detection.
|
| 389 |
+
|
| 390 |
+
<table><tr><td></td><td>Easy</td><td>Moderate</td><td>Hard</td></tr><tr><td>Naive</td><td>88.2/75.1</td><td>76.9 / 63.8</td><td>73.4 / 57.4</td></tr><tr><td>Optimized</td><td>87.6 /75.0</td><td>76.3 / 63.4</td><td>73.1 / 57.0</td></tr></table>
|
| 391 |
+
|
| 392 |
+
commensurate. Also, our GDC algorithm is a general, simple, inference-time approach that requires no training, unlike prior learning-based approaches to depth completion.
|
| 393 |
+
|
| 394 |
+
Here we empirically compare to PNP (Wang et al., 2018), a recently proposed depth completion algorithm compatible with any (even stereo) depth estimation network, similar to GDC. We use SDN for initial depth estimation, and evaluate GDC and PNP by randomly selecting a fraction of LiDAR points as provided ground truths and calculating the median absolute depth errors on the remaining LiDAR points. As shown in Figure 8, GDC outperforms PNP by a large margin. Table 9 shows a further comparison to PNP on 3D object detection. We apply PNP and GDC respectively to correct the depth estimates obtained from SDN, train a P-RCNN or $\mathrm { P I X O R } ^ { \star }$ using the resulting pseudo-LiDAR points on the KITTI training set, and compare the detection results on the KITTI validation set. In either case, $\mathrm { S D N + G D C }$ outperforms $\mathrm { S D N + P N P }$ by a notable margin.
|
| 395 |
+
|
| 396 |
+
# D.4 RUN TIME
|
| 397 |
+
|
| 398 |
+
With the following optimizations for implementation,
|
| 399 |
+
|
| 400 |
+
1. Sub-sampling pseudo-LiDAR points: keeping at most one point within a cubic of size $0 . 1 \mathrm { m ^ { 3 } }$
|
| 401 |
+
2. Limiting the pseudo-LiDAR points for depth correction: keeping only those whose elevation angles are within $[ - 3 . 0 ^ { \circ } , 0 . \bar { 4 } ^ { \circ } )$ (the range of 4-beam LiDAR plus $0 . 6 ^ { \circ }$ ; see subsection C.1 for details)
|
| 402 |
+
3. After performing GDC for depth correction, combining the corrected pseudo-LiDAR points with those outsides the elevation angles of $[ - 3 . 0 ^ { \circ } , 0 . \bar { 4 ^ { \circ } } )$
|
| 403 |
+
|
| 404 |
+
GDC runs in 90 ms/frame using a single GPU (7.7ms for KD-tree construction and search, $4 6 . 5 \mathrm { m s }$ for solving $W$ , and $2 6 . 9 \mathrm { m s }$ for solving $Z _ { P L } ^ { \prime } )$ with negligible performance difference (see Table 10). For consistency, all results reported in the main paper are based on the naive implementation. Further speedups can be achieved by CUDA programming for GPUs.
|
| 405 |
+
|
| 406 |
+
# D.5 STEREO DEPTH VS. DETECTION
|
| 407 |
+
|
| 408 |
+
We quantitatively evaluate the stereo depths by median errors in Figure 4 of the main text (numerical values are listed in Table 11). In Table 12 we further show mean errors with standard deviation (the large standard deviation likely results from outliers such as occluded pixels around object boundaries).
|
| 409 |
+
|
| 410 |
+
Table 11: Median depth estimation errors over various depth ranges (numerical values of Figure 4).
|
| 411 |
+
|
| 412 |
+
<table><tr><td rowspan="2">Signal</td><td colspan="7">range (m)</td></tr><tr><td>0-10</td><td>10-20</td><td>20-30</td><td>30-40</td><td>40-50</td><td>50-60</td><td>60-70</td></tr><tr><td>PSMNet</td><td>0.04</td><td>0.11</td><td>0.36</td><td>0.83</td><td>1.24</td><td>1.98</td><td>2.43</td></tr><tr><td>SDN</td><td>0.07</td><td>0.12</td><td>0.30</td><td>0.60</td><td>0.89</td><td>1.31</td><td>1.73</td></tr><tr><td>SDN + GDC</td><td>0.07</td><td>0.12</td><td>0.27</td><td>0.51</td><td>0.74</td><td>1.03</td><td>1.53</td></tr></table>
|
| 413 |
+
|
| 414 |
+
Table 12: Mean depth estimation errors (with standard deviation) over various depth ranges.
|
| 415 |
+
|
| 416 |
+
<table><tr><td rowspan="2">Signal</td><td colspan="7">range (m)</td></tr><tr><td>0-10</td><td>10-20</td><td>20-30</td><td>30-40</td><td>40-50</td><td>50-60</td><td>60-70</td></tr><tr><td>PSMNet</td><td>0.18±0.93</td><td>0.36±1.20</td><td>0.97±2.32</td><td>2.02±4.05</td><td>2.94±5.64</td><td>4.61±8.03</td><td>6.03±10.32</td></tr><tr><td>SDN</td><td>0.21±0.89</td><td>0.35±1.16</td><td>0.87±2.31</td><td>1.80±4.22</td><td>2.67±6.00</td><td>4.27±8.78</td><td>5.82±11.23</td></tr><tr><td>SDN + GDC</td><td>0.21±0.90</td><td>0.35±1.17</td><td>0.84±2.34</td><td>1.74±4.27</td><td>2.59±6.06</td><td>4.14±8.85</td><td>5.72±11.29</td></tr></table>
|
| 417 |
+
|
| 418 |
+
For both tables, we divide pixels into beams according to their truth depths, and evaluate on pixels not on the 4-beam LiDAR. The improvement of SDN $^ +$ GDC) over PSMNET becomes larger as we consider pixels farther away. Table 13 further demonstrates the relationship between depth quality and detection accuracy: SDN $( + \mathrm { G D C } )$ significantly outperforms PSMNET for detecting faraway cars. We note that, for very faraway cars (i.e., $5 0 \mathrm { - } 7 0 \mathrm { m } )$ ), the number of training object instances are extremely small, which suggests that the very poor performance might partially cause by over-fitting.
|
| 419 |
+
|
| 420 |
+
Further, we apply the same evaluation procedure but group the errors by the shortest distance between each PSEUDO-LIDAR point and the 4-beam LiDAR points in Figure 9. We can see that the closer the PSEUDO-LIDAR points are to the 4-beam LiDAR points, the bigger improvement GDC can bring.
|
| 421 |
+
|
| 422 |
+
D.6 CONNECTED COMPONENTS IN KNN GRAPHS OF PSEUDO-LIDAR POINTS BY SDN
|
| 423 |
+
|
| 424 |
+
Here, we provide empirical analysis on the relationship between the $k$ we choose in building the Knearest-neighbor graph of PSEUDO-LIDAR points by SDN and the number of connected components of that graph. We show the results on KITTI validation set in Figure 11. It can be seen that with $k \geq 9$ , the average number of connected components in the graph is smaller than 2.
|
| 425 |
+
|
| 426 |
+
# D.7 FAILURE CASES AND WEAKNESS
|
| 427 |
+
|
| 428 |
+
There is still a gap between our approach and LiDAR for faraway objects (see Table 13). We further analyze $\mathsf { A P } _ { \mathrm { B E V } }$ at different IoU in Figure 10. For low IoU (0.2-0.5), SDN $( + \mathrm { G D C } )$ is on par with LiDAR, but the gap increases significantly at high IoU thresholds. This suggests that the predominant gap between our approach and LiDAR is because of mislocalization, perhaps due to residual inaccuracies in depth.
|
| 429 |
+
|
| 430 |
+

|
| 431 |
+
Figure 10: IoU vs. $\mathbf { A P _ { B E V } }$ on KITTI validation set on the car category (moderate).
|
| 432 |
+
|
| 433 |
+

|
| 434 |
+
Figure 11: $k$ vs. average number of connected components in KNN graphs of PSEUDO-LIDAR points by SDN.
|
| 435 |
+
|
| 436 |
+
Table 13: 3D object detection at various depth ranges. We compare different input signals. We report $\mathrm { A P _ { B E V } } \ I$ $\mathsf { A P } _ { 3 \mathrm { D } }$ (in $\%$ ) of the car category at $\mathrm { I o U } { = } 0 . 7$ on the KITTI validation set, using P-RCNN for detection. In the last two rows we show the number of car objects in KITTI object train and validation sets within different ranges.
|
| 437 |
+
|
| 438 |
+
<table><tr><td rowspan=1 colspan=1>Input signal</td><td rowspan=1 colspan=1>0-30 m</td><td rowspan=1 colspan=1>30-50 m</td><td rowspan=1 colspan=1>50-70 m</td></tr><tr><td rowspan=1 colspan=1>PSMNETSDNSDN +GDCLIDAR</td><td rowspan=1 colspan=1>65.6/54.068.6 / 56.784.7 /67.888.5 /84.0</td><td rowspan=1 colspan=1>15.8/ 6.927.4 / 11.349.9 / 31.569.9 / 51.5</td><td rowspan=1 colspan=1>0.0/0.00.7/0.02.5 /1.08.9/3.4</td></tr><tr><td rowspan=1 colspan=1>#OBJECTS-TRAIN# OBJECTS-VAL</td><td rowspan=1 colspan=1>69037379</td><td rowspan=1 colspan=1>37683542</td><td rowspan=1 colspan=1>7639</td></tr></table>
|
| 439 |
+
|
| 440 |
+
# D.8 QUALITATIVE RESULTS
|
| 441 |
+
|
| 442 |
+
In Figure 6,12,13 and Figure 14, we show detection results using P-RCNN (with confidence $> 0 . 9 5$ ) with different input signals on four randomly chosen scenes in the KITTI object validation set. Specifically, we show the results from the frontal-view images and the bird’s-eye view (BEV) point clouds. In the BEV map, the observer is on the left-hand side looking to the right. It can be seen that the point clouds generated by PSEUDO-LIDAR $^ { + + }$ (SDN alone or $\mathrm { 5 D N + G D C }$ ) align better with LiDAR than those generated by PSEUDO-LIDAR (PSMNET). For nearby objects (i.e., bounding boxes close to the left in the BEV map), we see that P-RCNN with any point cloud performs fairly well in localization. However, for faraway objects (i.e., bounding boxes close to the right), PSEUDO-LIDAR with depth estimated from PSMNET predicts objects (red boxes) deviated from the ground truths (green boxes). Moreover, the noisy PSMNET points also leads to several false positives or negatives. In contrast, the detected boxes by our PSEUDO-LIDAR $^ { + + }$ , either with SDN alone or with SDN $+ \mathrm { G D C }$ , align pretty well with the ground truth boxes, justifying our targeted improvement in estimating faraway depths. In Figure 12, we see one failure case for both PSEUDO-LIDAR and PSEUDO-LIDAR $^ { + + }$ : the most faraway car is missed, while LiDAR signal can still detect it, suggesting that for very faraway objects stereo-based methods may still have limitation.
|
| 443 |
+
|
| 444 |
+

|
| 445 |
+
Figure 12: Qualitative Comparison. We show the detection results on a KITTI validation scene by P-RCNN with different input point clouds. We visualize them from both frontal-view images and bird’s-eye view (BEV) point maps. Ground-truth boxes are in green and predicted bounding boxes are in red. The observer is at the left-hand side of the BEV map looking to the right. In other words, ground truth boxes on the right are more faraway (i.e., deeper) from the observer, and hence hard to localize. Best viewed in color.
|
| 446 |
+
|
| 447 |
+

|
| 448 |
+
Figure 13: Qualitative Comparison $\cdot$ another example. The same setup as in Figure 12
|
| 449 |
+
|
| 450 |
+

|
| 451 |
+
Figure 14: Qualitative Comparison $\cdot$ another example. The same setup as in Figure 12
|
parse/train/BJedHRVtPB/BJedHRVtPB_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/BJedHRVtPB/BJedHRVtPB_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/BJedHRVtPB/BJedHRVtPB_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/HyBbjW-RW/HyBbjW-RW.md
ADDED
|
@@ -0,0 +1,238 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# OPEN LOOP HYPERPARAMETER OPTIMIZATIONAND DETERMINANTAL POINT PROCESSES
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Driven by the need for parallelizable hyperparameter optimization methods, this paper studies open loop search methods in the sense that the sequence is predetermined and can be generated before a single configuration is evaluated. Examples include grid search, uniform random search, low discrepancy sequences, and other sampling distributions. In particular, we propose the use of $k$ -determinantal point processes in hyperparameter optimization via random search. Compared to conventional uniform random search where hyperparameter settings are sampled independently, a $k$ -DPP promotes diversity. We describe an approach that transforms hyperparameter search spaces for efficient use with a $k$ -DPP. In addition, we introduce a novel Metropolis-Hastings algorithm which can sample from $k$ - DPPs defined over spaces with a mixture of discrete and continuous dimensions. Our experiments show significant benefits over uniform random search in realistic scenarios with a limited budget for training supervised learners, whether in serial or parallel.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Hyperparameter values—regularization strength, model family choices like depth of a neural network or which nonlinear functions to use, procedural elements like dropout rates, stochastic gradient descent step sizes, and data preprocessing choices—can make the difference between a successful application of machine learning and a wasted effort. To search among many hyperparameter values requires repeated execution of often-expensive learning algorithms, creating a major obstacle for practitioners and researchers alike.
|
| 12 |
+
|
| 13 |
+
In general, on request/iteration $k$ , a hyperparameter searcher suggests a hyperparameter configuration $x _ { k }$ , a worker trains a model using $x _ { k }$ , and returns a validation loss of $y _ { k }$ computed on a hold out set. In this work we say a hyperparameter searcher is open loop if $x _ { k }$ depends only on $\{ x _ { i } \} _ { i = 1 } ^ { k - 1 }$ ; examples include choosing $x _ { k }$ uniformly at random (Bergstra et al., 2011a), or $x _ { k }$ coming from a low-discrepancy sequence (c.f., Iaco (2015)). We say a searcher is \` closed loop if $x _ { k }$ depends on both the past configurations and validation losses $\{ ( \stackrel { \cdot } { x } _ { i } , y _ { i } ) \} _ { i = 1 } ^ { k - 1 }$ ; examples include Bayesian optimization (Snoek et al., 2012) and recent reinforcement learning methods (Zoph & Le, 2016). Note that open loop methods can draw an infinite sequence of configurations before training a single model, whereas closed loop methods rely on validation loss feedback in order to make suggestions.
|
| 14 |
+
|
| 15 |
+
While sophisticated closed loop selection methods have been shown to empirically identify good hyperparameter configurations faster (i.e., with fewer iterations) than open loop methods like random search, two trends have rekindled interest in embarrassingly parallel open loop methods: 1) modern deep learning models can take days or weeks to train with no signs of efficiency breakthroughs, and 2) the rise of cloud resources available to anyone that charge not by the number of machines, but by the number of CPU-hours used so that 10 machines for 100 hours costs the same as 1000 machines for 1 hour.
|
| 16 |
+
|
| 17 |
+
This paper explores the landscape of open loop methods, identifying tradeoffs that are rarely considered, if at all acknowledged. While random search is arguably the most popular open loop method and chooses each uniform random s $x _ { k }$ independently of ch is the least inter $\{ x _ { i } \} _ { i = 1 } ^ { k - 1 }$ , it is by no means the only choice. In many ways the methods we will discuss because we will advocate for methods where $x _ { k }$ depends on $\{ x _ { i } \} _ { i = 1 } ^ { k - 1 }$ to promote diversity. In particular, we will focus on drawing $\{ x _ { i } \} _ { i = 1 } ^ { k }$ from a $k$ -determinantal point process (DPP) (Kulesza et al., 2012). DPPs support real, integer, and categorical dimensions—any of which may have a tree structure—and have computationally efficient methods of drawing samples.
|
| 18 |
+
|
| 19 |
+
Experimentally, we explore the use of our diversity-promoting open-loop hyperparameter optimization method based on $k$ -DPP random search. We find that it significantly outperforms uniform random search in cases where the hyperparameter values have a large effect on performance.
|
| 20 |
+
|
| 21 |
+
Open source implementations of both our hyperparameter optimization algorithm (as an extension to the hyperopt package (Bergstra et al., 2013)) and the MCMC algorithm introduced in Algorithm 2 will be released upon publication.
|
| 22 |
+
|
| 23 |
+
# 2 RELATED WORK
|
| 24 |
+
|
| 25 |
+
While this work focuses on open loop methods, the vast majority of recent work on hyperparameter tuning has been on closed loop methods, which we briefly review.
|
| 26 |
+
|
| 27 |
+
# 2.1 CLOSED LOOP METHODS
|
| 28 |
+
|
| 29 |
+
Much attention has been paid to sequential model-based optimization techniques such as Bayesian optimization (Snoek et al., 2012; Bergstra et al., 2011b), which sample hyperparameter spaces adaptively. These techniques first choose a point in the space of hyperparameters, then train and evaluate a model with the hyperparameter values represented by that point, then sample another point based on how well previous point(s) performed. These methods can become complicated, and while they can lead to improved performance, the differences are frequently small. In addition, it has recently been observed that many Bayesian optimization methods, when run for $k$ iterations, are outperformed by sampling $2 k$ points uniformly at random (Li et al., 2017). Parallelizing Bayesian optimization methods has proven to be nontrivial, and while a number of algorithms exist which sample more than one point at each iteration (Contal et al., 2013; Desautels et al., 2014; Gonzalez ´ et al., 2016), none can achieve the parallelization that grid search, sampling uniformly, or sampling according to a DPP allow.
|
| 30 |
+
|
| 31 |
+
One recent line of research has examined the use of DPPs for optimizing hyperparameters, in the context of parallelizing Bayesian optimization (Kathuria et al., 2016; Wang et al., 2017). At each iteration within one trial of Bayesian optimization, instead of drawing a single new point to evaluate from the posterior, they define a DPP over a small region of the space and sample a set of diverse points. While this can lead to easy parallelization within one iteration of Bayesian optimization, the overall algorithms are still sequential. Additionally, their approach requires discretizing the hyperparameter space, a drawback which we circumvent.
|
| 32 |
+
|
| 33 |
+
So-called configuration evaluation methods have been shown to perform well by adaptively allocating resources to different hyperparameter settings (Swersky et al., 2014; Li et al., 2017). They initially choose a set of hyperparameters to evaluate (often uniformly), then partially train a set of models for these hyperparameters. After some fixed training budget (e.g. time, or number of training examples observed), they compare the partially trained models against one another and allocate more resources to those which perform best. Eventually, these algorithms produce one (or a small number) of fully trained, high-quality models. In some sense, these approaches are orthogonal to open vs. closed loop methods since both can be applied with these methods.
|
| 34 |
+
|
| 35 |
+
# 2.2 OPEN LOOP METHODS
|
| 36 |
+
|
| 37 |
+
As discussed above, recent trends have renewed interest in open loop methods. And recently, random search was shown to be competitive with sophisticated closed loop methods for modern hyperparameter optimization tasks like deep networks (Li et al., 2017), inspiring other works to explain the phenomenon (Ahmed et al., 2016). Bergstra & Bengio (2012) offer one of the most comprehensive studies of open loop methods to date, and focus attention on comparing random search and grid search. A main takeaway of the paper is that uniform random sampling is generally preferred to grid search1 due to the frequent observation that some hyperparameters have little impact on performance, and random search promotes more diversity in the dimensions that matter. Essentially, if points are drawn uniformly at random in $d$ dimensions but only $d ^ { \prime } < d$ dimensions are relevant, those same points are uniformly distributed (and just as diverse) in $d ^ { \prime }$ dimensions. Grid search, on the other hand, distributes configurations aligned with the axes so if only $d ^ { \prime } < d$ dimensions are relevant, many configurations are essentially duplicates.
|
| 38 |
+
|
| 39 |
+
However, grid search does have one favorable property that is clear in just one dimension. If $k$ points are distributed on [0, 1] on a grid, the maximum spacing between points is equal to $\frac { 1 } { k - 1 }$ . But if points are uniformly at random drawn on [0, 1], the expected largest gap between points scales as √ k . If you are unlucky enough to have your minimum located in this largest gap, this difference could be considerable. The phenomenon generalizes to higher dimensions but grid search’s advantage does not for the reasons above. This is an important concept in numerical integration and one way to quantify this property of a sequence $\mathbf { x } = ( x _ { 1 } , x _ { 2 } , \ldots , x _ { k } )$ is known as star discrepancy:
|
| 40 |
+
|
| 41 |
+
$$
|
| 42 |
+
D _ { k } ( \mathbf x ) = \operatorname* { s u p } _ { u _ { 1 } , \dots , u _ { d } \in [ 0 , 1 ] } \left| { \frac { 1 } { k } } \sum _ { i = 1 } ^ { k } \mathbf 1 \left\{ x _ { i } \in \prod _ { j = 1 } ^ { d } [ 0 , u _ { j } ) \right\} - \prod _ { j = 1 } ^ { d } u _ { j } \right|
|
| 43 |
+
$$
|
| 44 |
+
|
| 45 |
+
One can interpret the star discrepancy as a multidimensional version of the Kolmogorov-Smirnov statistic between the sequence $\mathbf { x }$ and the uniform measure. It is well-known that a sequence chosen uniformly at random from $[ 0 , 1 ] ^ { d }$ has an expected star discrepancy of at least $\scriptstyle { \sqrt { \frac { 1 } { k } } }$ (and is no greater than $\sqrt { \frac { d \log ( d ) } { k } } )$ (Devroye et al., 2013, Corollary 12.5) whereas sequences are known to exist with star discrepancy less than log(k)dk Sobol’ (1967), where both bounds depend on absolute constants. These low-discrepancy sequences, as they are known, include the Sobol sequence, which was also given brief mention in (Bergstra & Bengio, 2012) and shown to outperform random search and grid search. We also note that the Sobol sequence is also used as an initialization procedure for some Bayesian Optimization schemes Snoek et al. (2012). However, the Sobol sequence is only defined for continuous spaces, so for hyperparameter search which involves discrete dimensions it is not appropriate.
|
| 46 |
+
|
| 47 |
+
The final open loop method we study is the DPP, which has been given considerably less attention in the hyperparameter optimization literature. Comparing the star discrepancy of uniform at random and Sobol, one observes that as $d$ grows large relative to $k$ , Sobol starts to suffer. Indeed, Bardenet & Hardy (2016) notes that the Sobol rate is not even valid until $k = \Omega ( 2 ^ { d } )$ which motivates them to study a formulation of a DPP that has a star discrepancy between Sobol and random and holds for all $k$ , small and large. They primarily approached this problem from a theoretical perspective, and didn’t include experimental results. Their work, in part, motivates us to look at DPPs as a solution for hyperparameter optimization.
|
| 48 |
+
|
| 49 |
+
# 3 COMPARISON OF OPEN LOOP METHODS
|
| 50 |
+
|
| 51 |
+
Optimization performance–how close a point in our sequence is to the true, fixed minimum–is our goal, not a sequence with low discrepancy. However, as Bergstra & Bengio (2012) observed, the rare “large gap” that can occur in random sequences without the low discrepancy property can affect optimization performance, on average. One natural surrogate of average optimization performance is to define a hyperparameter space on $[ 0 , 1 ] ^ { d }$ and measure the distance from a fixed point, say ${ \frac { 1 } { 2 } } \mathbf { 1 } = { \bigl ( } { \frac { 1 } { 2 } } , \ldots , { \frac { 1 } { 2 } } { \bigr ) }$ , to the nearest point in the length $k$ sequence in the Euclidean norm squared: $\operatorname* { m i n } _ { i = 1 , \ldots , k } | | x _ { i } - { \textstyle \frac { 1 } { 2 } } \mathbf { 1 } | | _ { 2 } ^ { 2 }$ . The Euclidean norm (squared) is motivated by a quadratic Taylor series approximation around the minimum of the hypothetical function we wish to minimize. The first question we wish to answer is: is low discrepancy a surrogate for optimization performance? In the first and second columns of Figure 1 we plot the star discrepancy and smallest distance from the center ${ \textstyle \frac { 1 } { 2 } } \mathbf { 1 }$ , respectively, as a function of the length of the sequence, with each row representing dimensions $ \bar { \mathrm { d } } = 2 , 3 , 4$ , for the Sobol sequence, uniform at random, and a DPP (see the next section for details). We observe that the Sobol sequence is clearly superior in terms of star discrepancy, with the DPP having a slight edge over Uniform. However, all methods appear comparable when it comes to distance to the center.
|
| 52 |
+
|
| 53 |
+

|
| 54 |
+
Figure 1: Comparison of the Sobol sequence (with uniform noise), samples a from $k$ -DPP, and uniform random for three metrics of interest.
|
| 55 |
+
|
| 56 |
+
Acknowledging the fact that practitioners define the search space themselves more often than not, we realize that if the search space bounds are too small, the optimal solution often is found on the edge, or in a corner of the hypercube. Thus, in some situations it makes sense to bias the sequence towards the edges and the corners, the very opposite of what low discrepancy sequences attempt to do. While Sobol and uniformly random sequences will not bias themselves towards the corners, a DPP does. This happens because points from a DPP are sampled according to how distant they are from the existing points; this tends to favor points in the corners. This same behavior of sampling in the corners is also very common for Bayesian optimization schemes, which is not surprise due to the known connections between sampling from a DPP and gaussian process (see Section 4.5). In the third column of Figure 1 we plot the distance to the origin which is just an arbitrarily chosen corner of hypercube. As expected, we observe that the DPP tends to outperform uniform at random and Sobol in this metric. In what follows, we study the DPP in more depth and how it performs on real-world hyperparameter tuning problems.
|
| 57 |
+
|
| 58 |
+
# 4 METHOD
|
| 59 |
+
|
| 60 |
+
We begin by reviewing determinantal point processes (DPPs) and $k$ -DPPs.
|
| 61 |
+
|
| 62 |
+
Let $\boldsymbol { B }$ be a domain of values from which we would like to sample a finite subset. (In our use of DPPs, this is the set of hyperparameter settings.) In general, $\boldsymbol { B }$ could be discrete or continuous; here we assume it is discrete with $N$ values, and we define $\mathcal { Y } = \{ 1 , \ldots , N \}$ to be a a set which indexes $\boldsymbol { B }$ (this will be particularly useful in Algorithm 1). In Section 4.2 we address when $\boldsymbol { B }$ has continuous dimensions. A DPP defines a probability distribution over $2 ^ { y }$ (all subsets of $\mathcal { V }$ ) with the property that two elements of $\mathcal { V }$ are more (less) likely to both be chosen the more dissimilar (similar) they are. Let random variable $\mathbf { Y }$ range over finite subsets of $\mathcal { V }$ .
|
| 63 |
+
|
| 64 |
+
There are several ways to define the parameters of a DPP. We focus on $\mathbf { L }$ -ensembles, which define the probability that a specific subset is drawn (i.e., $P ( \mathbf { \boldsymbol { Y } } = \mathcal { A } )$ for some $\mathcal { A } \subset \mathcal { V }$ ) as:
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
P ( \mathbf { } Y = \mathcal { A } ) = \frac { \operatorname* { d e t } ( \mathbf { L } _ { \mathcal { A } } ) } { \operatorname* { d e t } ( \mathbf { L } + I ) } .
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
As shown in Kulesza et al. (2012), this definition of $\mathbf { L }$ admits a decomposition to terms representing the quality and diversity of the elements of $\mathcal { V }$ . For any $y _ { i } , y _ { j } \in \mathcal { D }$ , let:
|
| 71 |
+
|
| 72 |
+
$$
|
| 73 |
+
{ \bf L } _ { i , j } = q _ { i } q _ { j } \mathcal { K } ( \phi _ { i } , \phi _ { j } ) ,
|
| 74 |
+
$$
|
| 75 |
+
|
| 76 |
+
where $q _ { i } > 0$ is the quality of $y _ { i }$ $, \phi _ { i } \in R ^ { d }$ is a featurized representation of $y _ { i }$ , and ${ \boldsymbol { \mathcal { K } } } : R ^ { d } \times R ^ { d } \to$ $[ 0 , 1 ]$ is a similarity kernel (e.g. cosine distance). (We will discuss how to featurize hyperparameter settings in Section 4.3.)
|
| 77 |
+
|
| 78 |
+
Here, we fix all $q _ { i } = 1$ ; in future work, closed loop methods might make use of $q _ { i }$ to encode evidence about the quality of particular hyperparameter settings to adapt the DPP’s distribution over time.
|
| 79 |
+
|
| 80 |
+
# 4.1 SAMPLING FROM A $k$ -DPP
|
| 81 |
+
|
| 82 |
+
DPPs have support over all subsets of $\mathcal { V }$ , including $\varnothing$ and $\mathcal { V }$ itself. In many practical settings, one may have a fixed budget that allows running the training algorithm $k$ times, so we require precisely $k$ elements of $\mathcal { V }$ for evaluation. $k$ -DPPs are distributions over subsets of $\mathcal { V }$ of size $k$ . Thus,
|
| 83 |
+
|
| 84 |
+
$$
|
| 85 |
+
P ( \mathbf { Y } = A \mid \mid \mathbf { \boldsymbol { Y } } | = k ) = \frac { \operatorname* { d e t } ( \mathbf { L } _ { A } ) } { \sum _ { \mathbf { \boldsymbol { A } } ^ { \prime } \subset \mathcal { V } , \mid \mathbf { \boldsymbol { A } } ^ { \prime } \mid = k } \operatorname* { d e t } ( \mathbf { L } _ { A ^ { \prime } } ) } .
|
| 86 |
+
$$
|
| 87 |
+
|
| 88 |
+
# 4.2 NEW MCMC ALGORITHM
|
| 89 |
+
|
| 90 |
+
Kulesza et al. (2012) give an algorithm for sampling exactly from $k$ -DPPs, though it runs in $O ( N ^ { 3 } )$ ; a Metropolis-Hastings algorithm presented by Anari et al. (2016) is a simple and fast alternative (included here as Algorithm 1). Both of these sampling algorithms assume the DPP is defined over a finite number of items; they are restricted to discrete domains. We propose a generalization of the MCMC algorithm which preserves relevant computations while allowing sampling from base sets with discrete dimensions, continuous dimensions, or some continuous and some discrete dimensions (Algorithm 2). To the best of our knowledge, this is the first algorithm which allows for sampling from a $k$ -DPP defined over mixed discrete and continuous spaces.
|
| 91 |
+
|
| 92 |
+
Algorithm 1 proceeds as follows: First, initialize a set $\mathbf { Y }$ with $k$ indices of $\mathbf { L }$ , drawn uniformly. Then, at each iteration, sample two indices of $\mathbf { L }$ (one within and one outside of the set $\mathbf { Y }$ ), and with some probability replace the item in $\mathbf { Y }$ with the other.
|
| 93 |
+
|
| 94 |
+
When we have continuous dimensions in the base set, however, we can’t define the matrix $\mathbf { L }$ , so sampling indices from it is not possible. We propose Algorithm 2, which samples points directly from the base set $\boldsymbol { B }$ instead (assuming continuous dimensions are bounded), and computes only the principal minors of $\mathbf { L }$ needed for the relevant computations on the fly.
|
| 95 |
+
|
| 96 |
+
Even in the case where the dimensions of $\boldsymbol { B }$ are discrete, Algorithm 2 requires less computation and space than Algorithm 1 (assuming the quality and similarity scores are stored once computed, and retrieved when needed). Previous analyses claimed that Algorithm 1 should be run for ${ \cal O } ( \bar { N } \log ( N ) )$
|
| 97 |
+
|
| 98 |
+
Algorithm 1 Drawing a sample from a discrete $k$ -DPP
|
| 99 |
+
|
| 100 |
+
Input: L, a symmetric, $N \times N$ matrix where ${ \bf L } _ { i , j } = q _ { i } q _ { j } K ( \phi _ { i } , \phi _ { j } )$ which defines a DPP over a finite base set of items $\boldsymbol { B }$ , and $\mathcal { Y } = \{ 1 , \ldots , N \}$ , where $\mathcal { \mathrm { V } } _ { i }$ indexes a row or column of $\mathbf { L }$
|
| 101 |
+
|
| 102 |
+
Output: $B _ { \mathbf { Y } }$ (the points in $\boldsymbol { B }$ indexed by $\mathbf { Y }$ )
|
| 103 |
+
|
| 104 |
+
1: Initialize $\mathbf { Y }$ to $k$ elements sampled from $\mathcal { V }$ uniformly
|
| 105 |
+
2: while not mixed do
|
| 106 |
+
3: uniformly sample $u \in \mathbf { Y } , v \in \mathcal { Y } \setminus \mathbf { Y }$
|
| 107 |
+
4: set $\mathbf { Y } ^ { \prime } = \mathbf { Y } \cup \{ v \} \setminus \{ u \}$
|
| 108 |
+
5: $\begin{array} { r } { p \gets \frac { 1 } { 2 } m i n \big ( 1 , \frac { \operatorname* { d e t } ( \mathbf { L } _ { \mathbf { Y } ^ { \prime } } ) } { \operatorname* { d e t } ( \mathbf { L } _ { \mathbf { Y } } ) } \big ) } \end{array}$
|
| 109 |
+
6: with probability $p$ : $\mathbf { Y } = \mathbf { Y } ^ { \prime }$
|
| 110 |
+
|
| 111 |
+
7: Return $B _ { \mathbf { Y } }$
|
| 112 |
+
|
| 113 |
+
Algorithm 2 Drawing a sample from a $k$ -DPP defined over a space with continuous and discrete dimensions
|
| 114 |
+
|
| 115 |
+
Input: A base set $\boldsymbol { B }$ with some continuous and some discrete dimensions, a quality function $\Psi$ : $\mathbf { Y } _ { i } \to q _ { i }$ , a feature function $\Phi : \mathbf { Y } _ { i } \phi _ { i }$
|
| 116 |
+
|
| 117 |
+
Output: $\beta$ , a set of $k$ points in $\boldsymbol { B }$
|
| 118 |
+
|
| 119 |
+
1: Initialize $\beta$ to $k$ points sampled from $\boldsymbol { B }$ uniformly
|
| 120 |
+
2: while not mixed do
|
| 121 |
+
3: uniformly sample $u \in \beta , v \in B \setminus \beta$
|
| 122 |
+
4: set $\beta ^ { \prime } = \mathsf { \bar { \beta } } \cup \bar { \{ v \} } \setminus \{ u \}$
|
| 123 |
+
5: compute the quality score for each item, $q _ { i } = \Psi ( \beta _ { i } ) , \forall i$ , and $\boldsymbol { q } _ { i } ^ { \prime } = \boldsymbol { \Psi } ( \beta _ { i } ^ { \prime } ) , \forall i$
|
| 124 |
+
6: construct $\mathbf { L } _ { \beta } = [ q _ { i } q _ { j } K ( \Phi ( \beta _ { i } ) , \Phi ( \beta _ { j } ) ) ] , \forall i , j$
|
| 125 |
+
7: construct ${ \bf L } _ { \beta ^ { \prime } } = [ q _ { i } ^ { \prime } q _ { j } ^ { \prime } \mathcal { K } ( \Phi ( \beta _ { i } ^ { \prime } ) , \Phi ( \beta _ { j } ^ { \prime } ) ) ] , \forall i , j$
|
| 126 |
+
8: $\begin{array} { r } { p \gets \frac { 1 } { 2 } m i n ( 1 , \frac { \operatorname* { d e t } ( \mathbf { L } _ { \beta ^ { \prime } } ) } { \operatorname* { d e t } ( \mathbf { L } _ { \beta } ) } ) } \end{array}$
|
| 127 |
+
9: with probability $p$ : $\beta = \beta ^ { \prime }$
|
| 128 |
+
10: Return $\beta$
|
| 129 |
+
|
| 130 |
+
steps. There are $O ( N ^ { 2 } )$ computations required to compute the full matrix $L$ , and at each iteration we will compute at most $O ( k )$ new elements of $L$ , so even in the worst case we will save space and computation whenever $k \log ( N ) < N$ . In expectation, we will save significantly more.
|
| 131 |
+
|
| 132 |
+
# 4.3 CONSTRUCTING L FOR HYPERPARAMETER OPTIMIZATION
|
| 133 |
+
|
| 134 |
+
The vector $\phi _ { i }$ will encode $y _ { i }$ (an element of $\mathcal { V }$ ), which in its most general form is an attribute-value mapping assigning values to different hyperparameters.
|
| 135 |
+
|
| 136 |
+
Let $\phi _ { i }$ be a feature vector for $y _ { i } \in \mathcal { V }$ , a modular encoding of the attribute-value mapping, in which fixed segments of the vector are assigned to each hyperparameter attribute (e.g., the dropout rate, the choice of nonlinearity, etc.). For a hyperparameter that takes a numerical value in range $[ h _ { \operatorname* { m i n } } , h _ { \operatorname* { m a x } } ]$ , we encode value $h$ using one dimension $( j )$ of $\phi$ and project into the range $[ 0 , 1 ]$ :
|
| 137 |
+
|
| 138 |
+
$$
|
| 139 |
+
\phi [ j ] = \frac { h - h _ { \operatorname* { m i n } } } { h _ { \operatorname* { m a x } } - h _ { \operatorname* { m i n } } }
|
| 140 |
+
$$
|
| 141 |
+
|
| 142 |
+
This rescaling prevents hyperparameters with greater dynamic range from dominating the similarity calculations. A categorical-valued hyperparameter attribute that takes $m$ values is given $m$ elements of $\mathbf { r }$ and a one-hot encoding. We then compute similarity using an RBF kernel, $\begin{array} { r } { { \cal K } = \exp \left( - \frac { | | \phi _ { i } - \phi _ { j } | | ^ { 2 } } { 2 \sigma ^ { 2 } } \right) } \end{array}$ and hence label our approach $k$ -DPP-RBF. Values for $\sigma ^ { 2 }$ lead to models with different properties; when $\sigma ^ { 2 }$ is small, points that are spread out have little impact, and when $\sigma ^ { 2 }$ is large, the increased repulsion between the points encourages them to be as far apart as possible. This tradeoff is represented in Figure 1.
|
| 143 |
+
|
| 144 |
+
# 4.4 TREE-STRUCTURED HYPERPARAMETERS
|
| 145 |
+
|
| 146 |
+
Many real-world hyperparameter search spaces are tree-structured. For example, the number of layers in a neural network is a hyperparameter, and each additional layer adds at least one new hyperparameter which ought to be tuned (the number of nodes in that layer). For a binary hyperparameter like whether or not to use regularization, we use a one-hot encoding. When this hyperparameter is “on,” we set the associated regularization strength as above, and when it is “off” we set it to zero. Intuitively, with all other hyperparameter settings equal, this causes the off-setting to be closest to the least strong regularization. One can also treat higher-level design decisions as hyperparameters (Komer et al., 2014), such as whether to train a logistic regression classifier, a convolutional neural network, or a recurrent neural network. In this construction, the type of model would be a categorical variable (and thus get a one-hot encoding), and all child hyperparameters for an “off” model setting (such as the convergence tolerance for logistic regression, when training a recurrent neural network) would be set to zero.
|
| 147 |
+
|
| 148 |
+
# 4.5 CONNECTION TO GAUSSIAN PROCESSES
|
| 149 |
+
|
| 150 |
+
Gaussian processes are used widely in hyperparameter optimization algorithms. Hennig & Garnett (2016) claim that sampling from a DPP with kernel $\kappa$ is equivalent to sequentially sampling proportional to the posterior variance of a GP defined with covariance kernel $\kappa$ . Since the entropy of a Gaussian is proportional to the log determinant of the covariance matrix, points drawn from a DPP have probability proportional to exp(information gain), and the most probable set from the DPP is the set which maximizes the information gain.
|
| 151 |
+
|
| 152 |
+
# 5 HYPERPARAMETER OPTIMIZATION EXPERIMENTS
|
| 153 |
+
|
| 154 |
+
In this section we present our hyperparameter optimization experiments. We compare $k$ -DPP-RBF, uniform sampling, and a Bayesian optimization algorithm in Section 5.1. We compare samples drawn using Algorithm 1 (which necessitates discretizing the hyperparameter space) and Algorithm 2 against samples drawn uniformly at random in Section 5.2. It is worth noting that as $k$ increases, all sampling methods approach the true optimum.
|
| 155 |
+
|
| 156 |
+
# 5.1 CONVOLUTIONAL NEURAL NETWORKS FOR TEXT CLASSIFICATION
|
| 157 |
+
|
| 158 |
+
Our experiments consider a setting where hyperparameters have a large effect on performance: a convolutional neural network for text classification (Kim, 2014). The task is binary sentiment analysis on the Stanford sentiment treebank (Socher et al., 2013). On this balanced dataset, random guessing leads to $50 \%$ accuracy. We use the CNN-non-static model from Kim (2014), with word2vec (Mikolov et al., 2013) vectors. The model architecture consists of a convolutional layer, a max-over-time pooling layer, then a fully connected layer leading to a softmax.
|
| 159 |
+
|
| 160 |
+
We begin with a search over three hyperparameters, assuming a budget of $k = 2 0$ repetitions of training the convolutional neural net. $L _ { 2 }$ regularization strengths in the range $[ e ^ { - 5 } , \dot { e } ^ { - 1 } ]$ (or no regularization) and dropout rates in $[ 0 . 0 , 0 . 7 ]$ are considered. We consider three increasingly “easy” ranges for the learning rate:
|
| 161 |
+
|
| 162 |
+
• Hard: $[ e ^ { - 5 } , e ^ { 5 } ]$ , where the majority of the range leads to accuracy no better than chance.
|
| 163 |
+
• Medium: $[ e ^ { - 5 } , e ^ { - 1 } ]$ , where half of the range leads to accuracy no better than chance.
|
| 164 |
+
• Easy: $[ e ^ { - 1 0 } , e ^ { - 3 } ]$ , where the entire range leads to models that beat chance.
|
| 165 |
+
|
| 166 |
+
Figure 2 shows the accuracy (averaged over 50 runs) of the best model found after exploring $1 , 2 , \ldots$ , $k$ hyperparameter settings. We see that $k$ -DPP-RBF finds better models with fewer iterations necessary than the other approaches, especially in the most difficult case. Figure 2 compares the sampling methods against a Bayesian optimization technique using a tree-structured Parzen estimator (BOTPE; Bergstra et al., 2011b). This technique evaluates points sequentially, allowing the model to choose the next point based on how well previous points performed (a closed loop approach). It is state-of-the-art on tree-structured search spaces (though its sequential nature limits parallelization). Surprisingly, we find it performs the worst, even though it takes advantage of additional information.
|
| 167 |
+
|
| 168 |
+

|
| 169 |
+
Figure 2: Average best-found model accuracy by iteration when training a convolutional neural network on three hyperparameter search spaces (defined in Section 5.1), averaged across 50 trials of hyperparameter optimization, with $k = 2 0$ .
|
| 170 |
+
|
| 171 |
+
We hypothesize that the exploration/exploitation tradeoff in BO-TPE causes it to commit to more local search before exploring the space fully, thus not finding hard-to-reach global optima.
|
| 172 |
+
|
| 173 |
+
Note that when considering points sampled uniformly or from a DPP, the order of the $k$ hyperparameter settings in one trial is arbitrary (though this is not the case with BO-TPE as it is an iterative algorithm). The variance of the $k$ -DPP methods (not shown for clarity) tends to be high in early iterations, simply because the $k$ samples from a $k$ -DPP are likely to be more diverse than those sampled uniformly, but in all cases the variance of the best of the $k$ points is lower than when sampled uniformly.
|
| 174 |
+
|
| 175 |
+
# 5.2 OPTIMIZING WITHIN RANGES KNOWN TO BE GOOD
|
| 176 |
+
|
| 177 |
+
Zhang & Wallace (2015) analyzed the stability of convolutional neural networks for sentence classification with respect to a large set of hyperparameters, and found a set of six which they claimed had the largest impact: the number of kernels, the difference in size between the kernels, the size of each kernel, dropout, regularization strength, and the number of filters. We optimized over their prescribed “Stable” ranges; average accuracies across 50 trials of hyperparameter optimization are shown in Figure 3, across $k = 2 0$ iterations, with each dimension discretized to five values (for the discretized experiments). For both uniform sampling and sampling using $k$ -DPP-RBF, discretizing the search space hurts performance, thus motivating the use of Algorithm 2. Additionally, we find that even in this case where every value gives reasonable performance, $k$ -DPP-RBF sampling outperforms uniform sampling.
|
| 178 |
+
|
| 179 |
+
Our experiments reveal that, while the hyperparameters proposed by Zhang & Wallace (2015), can have an effect, the learning rate, which they don’t analyze, is at least as impactful.
|
| 180 |
+
|
| 181 |
+
# 6 CONCLUSIONS
|
| 182 |
+
|
| 183 |
+
We have explored open loop hyperparameter optimization built on sampling from $k$ -DPPs. We described how to construct $k$ -DPPs over hyperparameter search spaces, and showed that sampling from these retains the attractive parallelization capabilities of random search. Our experiments demonstrate that, under a limited computation budget, on a number of realistic hyperparameter optimization problems, these approaches perform better than sampling uniformly at random. As we increase the difficulty of our hyperparameter optimization problem (i.e., as values which lead to good model evaluations become more scarce) the improvement over sampling uniformly at random increases. An open-source implementation of our method is available.2
|
| 184 |
+
|
| 185 |
+

|
| 186 |
+
Figure 3: Average best-found model accuracy by iteration when training a convolutional neural network on the “Stable” search space (defined in Section 5.2), averaged across 50 trials of hyperparameter optimization, with $k =$ 20. Discretizing the space reduces the accuracy found for both uniform sampling and $k$ -DPP-RBF, but in both cases $k$ -DPP-RBF finds better optima than uniform sampling.
|
| 187 |
+
|
| 188 |
+
# REFERENCES
|
| 189 |
+
|
| 190 |
+
Mohamed Osama Ahmed, Bobak Shahriari, and Mark Schmidt. Do we need harmless bayesian optimization and first-order bayesian optimization? NIPS BayesOpt, 2016.
|
| 191 |
+
|
| 192 |
+
Nima Anari, Shayan Oveis Gharan, and Alireza Rezaei. Monte carlo markov chain algorithms for sampling strongly rayleigh distributions and determinantal point processes. In Proceedings of the 29th Conference on Learning Theory, COLT 2016, New York, USA, June 23-26, 2016, pp. 103–115, 2016. URL http: //jmlr.org/proceedings/papers/v49/anari16.html.
|
| 193 |
+
|
| 194 |
+
Rmi Bardenet and Adrien Hardy. Monte carlo with determinantal point processes. In arXiv preprint arXiv:arXiv:1605.00361, 2016.
|
| 195 |
+
|
| 196 |
+
James Bergstra and Yoshua Bengio. Random search for hyper-parameter optimization. Journal of Machine Learning Research, 13:281–305, 2012.
|
| 197 |
+
|
| 198 |
+
James Bergstra, Remi Bardenet, Yoshua Bengio, and Balazs Kegl. Algorithms for hyper-parameter optimization. In Proc. of NIPS, 2011a.
|
| 199 |
+
|
| 200 |
+
James Bergstra, Daniel Yamins, and David D Cox. Making a science of model search: Hyperparameter optimization in hundreds of dimensions for vision architectures. In Proceedings of the 30th International Conference on Machine Learning (ICML-13), pp. 115–123, 2013.
|
| 201 |
+
|
| 202 |
+
James S Bergstra, Remi Bardenet, Yoshua Bengio, and Bal ´ azs K ´ egl. Algorithms for hyper-parameter optimiza-´ tion. In Advances in Neural Information Processing Systems, pp. 2546–2554, 2011b.
|
| 203 |
+
|
| 204 |
+
Emile Contal, David Buffoni, Alexandre Robicquet, and Nicolas Vayatis. Parallel gaussian process optimization with upper confidence bound and pure exploration. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pp. 225–240. Springer, 2013.
|
| 205 |
+
|
| 206 |
+
Thomas Desautels, Andreas Krause, and Joel W Burdick. Parallelizing exploration-exploitation tradeoffs in gaussian process bandit optimization. Journal of Machine Learning Research, 15(1):3873–3923, 2014.
|
| 207 |
+
|
| 208 |
+
Luc Devroye, Laszl ´ o Gy ´ orfi, and G ¨ abor Lugosi. ´ A probabilistic theory of pattern recognition, volume 31. Springer Science & Business Media, 2013.
|
| 209 |
+
|
| 210 |
+
Javier Gonzalez, Zhenwen Dai, Philipp Hennig, and Neil Lawrence. Batch bayesian optimization via local ´ penalization. In Artificial Intelligence and Statistics, pp. 648–657, 2016.
|
| 211 |
+
|
| 212 |
+
Maria Rita Iaco. Low discrepancy sequences: Theory and applications. \` arXiv preprint arXiv:1502.04897, 2015.
|
| 213 |
+
|
| 214 |
+
Tarun Kathuria, Amit Deshpande, and Pushmeet Kohli. Batched gaussian process bandit optimization via determinantal point processes. In Advances in Neural Information Processing Systems, pp. 4206–4214, 2016.
|
| 215 |
+
|
| 216 |
+
Yoon Kim. Convolutional neural networks for sentence classification. EMNLP 2014, 2014.
|
| 217 |
+
|
| 218 |
+
Brent Komer, James Bergstra, and Chris Eliasmith. Hyperopt-sklearn: automatic hyperparameter configuration for scikit-learn. In ICML workshop on AutoML. Citeseer, 2014.
|
| 219 |
+
|
| 220 |
+
Alex Kulesza, Ben Taskar, et al. Determinantal point processes for machine learning. Foundations and Trend $\textsuperscript { \textregistered }$ in Machine Learning, 5(2–3):123–286, 2012.
|
| 221 |
+
|
| 222 |
+
Lisha Li, Kevin Jamieson, Giulia DeSalvo, Afshin Rostamizadeh, and Ameet Talwalkar. Hyperband: Banditbased configuration evaluation for hyperparameter optimization. Proc. of ICLR, 17, 2017.
|
| 223 |
+
|
| 224 |
+
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.
|
| 225 |
+
|
| 226 |
+
Jasper Snoek, Hugo Larochelle, and Ryan P Adams. Practical bayesian optimization of machine learning algorithms. In Advances in neural information processing systems, pp. 2951–2959, 2012.
|
| 227 |
+
|
| 228 |
+
Il’ya Meerovich Sobol’. On the distribution of points in a cube and the approximate evaluation of integrals. Zhurnal Vychislitel’noi Matematiki i Matematicheskoi Fiziki, 7(4):784–802, 1967.
|
| 229 |
+
|
| 230 |
+
Richard Socher, Alex Perelygin, Jean Y Wu, Jason Chuang, Christopher D Manning, Andrew Y Ng, Christopher Potts, et al. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the conference on empirical methods in natural language processing (EMNLP), volume 1631, pp. 1642. Citeseer, 2013.
|
| 231 |
+
|
| 232 |
+
Kevin Swersky, Jasper Snoek, and Ryan Prescott Adams. Freeze-thaw bayesian optimization. arXiv preprint arXiv:1406.3896, 2014.
|
| 233 |
+
|
| 234 |
+
Zi Wang, Chengtao Li, Stefanie Jegelka, and Pushmeet Kohli. Batched high-dimensional bayesian optimization via structural kernel learning. In International Conference on Machine Learning (ICML), 2017.
|
| 235 |
+
|
| 236 |
+
Ye Zhang and Byron Wallace. A sensitivity analysis of (and practitioners’ guide to) convolutional neural networks for sentence classification. arXiv preprint arXiv:1510.03820, 2015.
|
| 237 |
+
|
| 238 |
+
Barret Zoph and Quoc V Le. Neural architecture search with reinforcement learning. arXiv preprint arXiv:1611.01578, 2016.
|
parse/train/HyBbjW-RW/HyBbjW-RW_content_list.json
ADDED
|
@@ -0,0 +1,1241 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "OPEN LOOP HYPERPARAMETER OPTIMIZATIONAND DETERMINANTAL POINT PROCESSES",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
176,
|
| 8 |
+
98,
|
| 9 |
+
745,
|
| 10 |
+
146
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Anonymous authors Paper under double-blind review ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
183,
|
| 19 |
+
171,
|
| 20 |
+
398,
|
| 21 |
+
198
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "ABSTRACT ",
|
| 28 |
+
"text_level": 1,
|
| 29 |
+
"bbox": [
|
| 30 |
+
454,
|
| 31 |
+
236,
|
| 32 |
+
544,
|
| 33 |
+
251
|
| 34 |
+
],
|
| 35 |
+
"page_idx": 0
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"type": "text",
|
| 39 |
+
"text": "Driven by the need for parallelizable hyperparameter optimization methods, this paper studies open loop search methods in the sense that the sequence is predetermined and can be generated before a single configuration is evaluated. Examples include grid search, uniform random search, low discrepancy sequences, and other sampling distributions. In particular, we propose the use of $k$ -determinantal point processes in hyperparameter optimization via random search. Compared to conventional uniform random search where hyperparameter settings are sampled independently, a $k$ -DPP promotes diversity. We describe an approach that transforms hyperparameter search spaces for efficient use with a $k$ -DPP. In addition, we introduce a novel Metropolis-Hastings algorithm which can sample from $k$ - DPPs defined over spaces with a mixture of discrete and continuous dimensions. Our experiments show significant benefits over uniform random search in realistic scenarios with a limited budget for training supervised learners, whether in serial or parallel. ",
|
| 40 |
+
"bbox": [
|
| 41 |
+
233,
|
| 42 |
+
267,
|
| 43 |
+
764,
|
| 44 |
+
460
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "1 INTRODUCTION ",
|
| 51 |
+
"text_level": 1,
|
| 52 |
+
"bbox": [
|
| 53 |
+
176,
|
| 54 |
+
488,
|
| 55 |
+
336,
|
| 56 |
+
503
|
| 57 |
+
],
|
| 58 |
+
"page_idx": 0
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "text",
|
| 62 |
+
"text": "Hyperparameter values—regularization strength, model family choices like depth of a neural network or which nonlinear functions to use, procedural elements like dropout rates, stochastic gradient descent step sizes, and data preprocessing choices—can make the difference between a successful application of machine learning and a wasted effort. To search among many hyperparameter values requires repeated execution of often-expensive learning algorithms, creating a major obstacle for practitioners and researchers alike. ",
|
| 63 |
+
"bbox": [
|
| 64 |
+
174,
|
| 65 |
+
520,
|
| 66 |
+
825,
|
| 67 |
+
603
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "In general, on request/iteration $k$ , a hyperparameter searcher suggests a hyperparameter configuration $x _ { k }$ , a worker trains a model using $x _ { k }$ , and returns a validation loss of $y _ { k }$ computed on a hold out set. In this work we say a hyperparameter searcher is open loop if $x _ { k }$ depends only on $\\{ x _ { i } \\} _ { i = 1 } ^ { k - 1 }$ ; examples include choosing $x _ { k }$ uniformly at random (Bergstra et al., 2011a), or $x _ { k }$ coming from a low-discrepancy sequence (c.f., Iaco (2015)). We say a searcher is \\` closed loop if $x _ { k }$ depends on both the past configurations and validation losses $\\{ ( \\stackrel { \\cdot } { x } _ { i } , y _ { i } ) \\} _ { i = 1 } ^ { k - 1 }$ ; examples include Bayesian optimization (Snoek et al., 2012) and recent reinforcement learning methods (Zoph & Le, 2016). Note that open loop methods can draw an infinite sequence of configurations before training a single model, whereas closed loop methods rely on validation loss feedback in order to make suggestions. ",
|
| 74 |
+
"bbox": [
|
| 75 |
+
174,
|
| 76 |
+
611,
|
| 77 |
+
825,
|
| 78 |
+
739
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "While sophisticated closed loop selection methods have been shown to empirically identify good hyperparameter configurations faster (i.e., with fewer iterations) than open loop methods like random search, two trends have rekindled interest in embarrassingly parallel open loop methods: 1) modern deep learning models can take days or weeks to train with no signs of efficiency breakthroughs, and 2) the rise of cloud resources available to anyone that charge not by the number of machines, but by the number of CPU-hours used so that 10 machines for 100 hours costs the same as 1000 machines for 1 hour. ",
|
| 85 |
+
"bbox": [
|
| 86 |
+
174,
|
| 87 |
+
746,
|
| 88 |
+
825,
|
| 89 |
+
843
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "text",
|
| 95 |
+
"text": "This paper explores the landscape of open loop methods, identifying tradeoffs that are rarely considered, if at all acknowledged. While random search is arguably the most popular open loop method and chooses each uniform random s $x _ { k }$ independently of ch is the least inter $\\{ x _ { i } \\} _ { i = 1 } ^ { k - 1 }$ , it is by no means the only choice. In many ways the methods we will discuss because we will advocate for methods where $x _ { k }$ depends on $\\{ x _ { i } \\} _ { i = 1 } ^ { k - 1 }$ to promote diversity. In particular, we will focus on drawing $\\{ x _ { i } \\} _ { i = 1 } ^ { k }$ from a $k$ -determinantal point process (DPP) (Kulesza et al., 2012). DPPs support real, integer, and categorical dimensions—any of which may have a tree structure—and have computationally efficient methods of drawing samples. ",
|
| 96 |
+
"bbox": [
|
| 97 |
+
174,
|
| 98 |
+
849,
|
| 99 |
+
823,
|
| 100 |
+
924
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 0
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "text",
|
| 106 |
+
"text": "",
|
| 107 |
+
"bbox": [
|
| 108 |
+
178,
|
| 109 |
+
103,
|
| 110 |
+
821,
|
| 111 |
+
146
|
| 112 |
+
],
|
| 113 |
+
"page_idx": 1
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"type": "text",
|
| 117 |
+
"text": "Experimentally, we explore the use of our diversity-promoting open-loop hyperparameter optimization method based on $k$ -DPP random search. We find that it significantly outperforms uniform random search in cases where the hyperparameter values have a large effect on performance. ",
|
| 118 |
+
"bbox": [
|
| 119 |
+
176,
|
| 120 |
+
152,
|
| 121 |
+
821,
|
| 122 |
+
195
|
| 123 |
+
],
|
| 124 |
+
"page_idx": 1
|
| 125 |
+
},
|
| 126 |
+
{
|
| 127 |
+
"type": "text",
|
| 128 |
+
"text": "Open source implementations of both our hyperparameter optimization algorithm (as an extension to the hyperopt package (Bergstra et al., 2013)) and the MCMC algorithm introduced in Algorithm 2 will be released upon publication. ",
|
| 129 |
+
"bbox": [
|
| 130 |
+
176,
|
| 131 |
+
202,
|
| 132 |
+
821,
|
| 133 |
+
244
|
| 134 |
+
],
|
| 135 |
+
"page_idx": 1
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"type": "text",
|
| 139 |
+
"text": "2 RELATED WORK ",
|
| 140 |
+
"text_level": 1,
|
| 141 |
+
"bbox": [
|
| 142 |
+
176,
|
| 143 |
+
273,
|
| 144 |
+
344,
|
| 145 |
+
290
|
| 146 |
+
],
|
| 147 |
+
"page_idx": 1
|
| 148 |
+
},
|
| 149 |
+
{
|
| 150 |
+
"type": "text",
|
| 151 |
+
"text": "While this work focuses on open loop methods, the vast majority of recent work on hyperparameter tuning has been on closed loop methods, which we briefly review. ",
|
| 152 |
+
"bbox": [
|
| 153 |
+
176,
|
| 154 |
+
310,
|
| 155 |
+
823,
|
| 156 |
+
338
|
| 157 |
+
],
|
| 158 |
+
"page_idx": 1
|
| 159 |
+
},
|
| 160 |
+
{
|
| 161 |
+
"type": "text",
|
| 162 |
+
"text": "2.1 CLOSED LOOP METHODS ",
|
| 163 |
+
"text_level": 1,
|
| 164 |
+
"bbox": [
|
| 165 |
+
176,
|
| 166 |
+
364,
|
| 167 |
+
392,
|
| 168 |
+
378
|
| 169 |
+
],
|
| 170 |
+
"page_idx": 1
|
| 171 |
+
},
|
| 172 |
+
{
|
| 173 |
+
"type": "text",
|
| 174 |
+
"text": "Much attention has been paid to sequential model-based optimization techniques such as Bayesian optimization (Snoek et al., 2012; Bergstra et al., 2011b), which sample hyperparameter spaces adaptively. These techniques first choose a point in the space of hyperparameters, then train and evaluate a model with the hyperparameter values represented by that point, then sample another point based on how well previous point(s) performed. These methods can become complicated, and while they can lead to improved performance, the differences are frequently small. In addition, it has recently been observed that many Bayesian optimization methods, when run for $k$ iterations, are outperformed by sampling $2 k$ points uniformly at random (Li et al., 2017). Parallelizing Bayesian optimization methods has proven to be nontrivial, and while a number of algorithms exist which sample more than one point at each iteration (Contal et al., 2013; Desautels et al., 2014; Gonzalez ´ et al., 2016), none can achieve the parallelization that grid search, sampling uniformly, or sampling according to a DPP allow. ",
|
| 175 |
+
"bbox": [
|
| 176 |
+
174,
|
| 177 |
+
395,
|
| 178 |
+
825,
|
| 179 |
+
560
|
| 180 |
+
],
|
| 181 |
+
"page_idx": 1
|
| 182 |
+
},
|
| 183 |
+
{
|
| 184 |
+
"type": "text",
|
| 185 |
+
"text": "One recent line of research has examined the use of DPPs for optimizing hyperparameters, in the context of parallelizing Bayesian optimization (Kathuria et al., 2016; Wang et al., 2017). At each iteration within one trial of Bayesian optimization, instead of drawing a single new point to evaluate from the posterior, they define a DPP over a small region of the space and sample a set of diverse points. While this can lead to easy parallelization within one iteration of Bayesian optimization, the overall algorithms are still sequential. Additionally, their approach requires discretizing the hyperparameter space, a drawback which we circumvent. ",
|
| 186 |
+
"bbox": [
|
| 187 |
+
174,
|
| 188 |
+
569,
|
| 189 |
+
825,
|
| 190 |
+
665
|
| 191 |
+
],
|
| 192 |
+
"page_idx": 1
|
| 193 |
+
},
|
| 194 |
+
{
|
| 195 |
+
"type": "text",
|
| 196 |
+
"text": "So-called configuration evaluation methods have been shown to perform well by adaptively allocating resources to different hyperparameter settings (Swersky et al., 2014; Li et al., 2017). They initially choose a set of hyperparameters to evaluate (often uniformly), then partially train a set of models for these hyperparameters. After some fixed training budget (e.g. time, or number of training examples observed), they compare the partially trained models against one another and allocate more resources to those which perform best. Eventually, these algorithms produce one (or a small number) of fully trained, high-quality models. In some sense, these approaches are orthogonal to open vs. closed loop methods since both can be applied with these methods. ",
|
| 197 |
+
"bbox": [
|
| 198 |
+
174,
|
| 199 |
+
672,
|
| 200 |
+
825,
|
| 201 |
+
784
|
| 202 |
+
],
|
| 203 |
+
"page_idx": 1
|
| 204 |
+
},
|
| 205 |
+
{
|
| 206 |
+
"type": "text",
|
| 207 |
+
"text": "2.2 OPEN LOOP METHODS ",
|
| 208 |
+
"text_level": 1,
|
| 209 |
+
"bbox": [
|
| 210 |
+
176,
|
| 211 |
+
810,
|
| 212 |
+
372,
|
| 213 |
+
824
|
| 214 |
+
],
|
| 215 |
+
"page_idx": 1
|
| 216 |
+
},
|
| 217 |
+
{
|
| 218 |
+
"type": "text",
|
| 219 |
+
"text": "As discussed above, recent trends have renewed interest in open loop methods. And recently, random search was shown to be competitive with sophisticated closed loop methods for modern hyperparameter optimization tasks like deep networks (Li et al., 2017), inspiring other works to explain the phenomenon (Ahmed et al., 2016). Bergstra & Bengio (2012) offer one of the most comprehensive studies of open loop methods to date, and focus attention on comparing random search and grid search. A main takeaway of the paper is that uniform random sampling is generally preferred to grid search1 due to the frequent observation that some hyperparameters have little impact on performance, and random search promotes more diversity in the dimensions that matter. Essentially, if points are drawn uniformly at random in $d$ dimensions but only $d ^ { \\prime } < d$ dimensions are relevant, those same points are uniformly distributed (and just as diverse) in $d ^ { \\prime }$ dimensions. Grid search, on the other hand, distributes configurations aligned with the axes so if only $d ^ { \\prime } < d$ dimensions are relevant, many configurations are essentially duplicates. ",
|
| 220 |
+
"bbox": [
|
| 221 |
+
174,
|
| 222 |
+
840,
|
| 223 |
+
823,
|
| 224 |
+
924
|
| 225 |
+
],
|
| 226 |
+
"page_idx": 1
|
| 227 |
+
},
|
| 228 |
+
{
|
| 229 |
+
"type": "text",
|
| 230 |
+
"text": "",
|
| 231 |
+
"bbox": [
|
| 232 |
+
174,
|
| 233 |
+
103,
|
| 234 |
+
825,
|
| 235 |
+
188
|
| 236 |
+
],
|
| 237 |
+
"page_idx": 2
|
| 238 |
+
},
|
| 239 |
+
{
|
| 240 |
+
"type": "text",
|
| 241 |
+
"text": "However, grid search does have one favorable property that is clear in just one dimension. If $k$ points are distributed on [0, 1] on a grid, the maximum spacing between points is equal to $\\frac { 1 } { k - 1 }$ . But if points are uniformly at random drawn on [0, 1], the expected largest gap between points scales as √ k . If you are unlucky enough to have your minimum located in this largest gap, this difference could be considerable. The phenomenon generalizes to higher dimensions but grid search’s advantage does not for the reasons above. This is an important concept in numerical integration and one way to quantify this property of a sequence $\\mathbf { x } = ( x _ { 1 } , x _ { 2 } , \\ldots , x _ { k } )$ is known as star discrepancy: ",
|
| 242 |
+
"bbox": [
|
| 243 |
+
173,
|
| 244 |
+
194,
|
| 245 |
+
825,
|
| 246 |
+
299
|
| 247 |
+
],
|
| 248 |
+
"page_idx": 2
|
| 249 |
+
},
|
| 250 |
+
{
|
| 251 |
+
"type": "equation",
|
| 252 |
+
"img_path": "images/567a7a2758a736d4f6d6f64dae106aaa83e23e254abcca9af3d220092ed7a395.jpg",
|
| 253 |
+
"text": "$$\nD _ { k } ( \\mathbf x ) = \\operatorname* { s u p } _ { u _ { 1 } , \\dots , u _ { d } \\in [ 0 , 1 ] } \\left| { \\frac { 1 } { k } } \\sum _ { i = 1 } ^ { k } \\mathbf 1 \\left\\{ x _ { i } \\in \\prod _ { j = 1 } ^ { d } [ 0 , u _ { j } ) \\right\\} - \\prod _ { j = 1 } ^ { d } u _ { j } \\right|\n$$",
|
| 254 |
+
"text_format": "latex",
|
| 255 |
+
"bbox": [
|
| 256 |
+
289,
|
| 257 |
+
305,
|
| 258 |
+
710,
|
| 259 |
+
354
|
| 260 |
+
],
|
| 261 |
+
"page_idx": 2
|
| 262 |
+
},
|
| 263 |
+
{
|
| 264 |
+
"type": "text",
|
| 265 |
+
"text": "One can interpret the star discrepancy as a multidimensional version of the Kolmogorov-Smirnov statistic between the sequence $\\mathbf { x }$ and the uniform measure. It is well-known that a sequence chosen uniformly at random from $[ 0 , 1 ] ^ { d }$ has an expected star discrepancy of at least $\\scriptstyle { \\sqrt { \\frac { 1 } { k } } }$ (and is no greater than $\\sqrt { \\frac { d \\log ( d ) } { k } } )$ (Devroye et al., 2013, Corollary 12.5) whereas sequences are known to exist with star discrepancy less than log(k)dk Sobol’ (1967), where both bounds depend on absolute constants. These low-discrepancy sequences, as they are known, include the Sobol sequence, which was also given brief mention in (Bergstra & Bengio, 2012) and shown to outperform random search and grid search. We also note that the Sobol sequence is also used as an initialization procedure for some Bayesian Optimization schemes Snoek et al. (2012). However, the Sobol sequence is only defined for continuous spaces, so for hyperparameter search which involves discrete dimensions it is not appropriate. ",
|
| 266 |
+
"bbox": [
|
| 267 |
+
173,
|
| 268 |
+
358,
|
| 269 |
+
825,
|
| 270 |
+
539
|
| 271 |
+
],
|
| 272 |
+
"page_idx": 2
|
| 273 |
+
},
|
| 274 |
+
{
|
| 275 |
+
"type": "text",
|
| 276 |
+
"text": "The final open loop method we study is the DPP, which has been given considerably less attention in the hyperparameter optimization literature. Comparing the star discrepancy of uniform at random and Sobol, one observes that as $d$ grows large relative to $k$ , Sobol starts to suffer. Indeed, Bardenet & Hardy (2016) notes that the Sobol rate is not even valid until $k = \\Omega ( 2 ^ { d } )$ which motivates them to study a formulation of a DPP that has a star discrepancy between Sobol and random and holds for all $k$ , small and large. They primarily approached this problem from a theoretical perspective, and didn’t include experimental results. Their work, in part, motivates us to look at DPPs as a solution for hyperparameter optimization. ",
|
| 277 |
+
"bbox": [
|
| 278 |
+
173,
|
| 279 |
+
544,
|
| 280 |
+
825,
|
| 281 |
+
656
|
| 282 |
+
],
|
| 283 |
+
"page_idx": 2
|
| 284 |
+
},
|
| 285 |
+
{
|
| 286 |
+
"type": "text",
|
| 287 |
+
"text": "3 COMPARISON OF OPEN LOOP METHODS ",
|
| 288 |
+
"text_level": 1,
|
| 289 |
+
"bbox": [
|
| 290 |
+
174,
|
| 291 |
+
676,
|
| 292 |
+
540,
|
| 293 |
+
693
|
| 294 |
+
],
|
| 295 |
+
"page_idx": 2
|
| 296 |
+
},
|
| 297 |
+
{
|
| 298 |
+
"type": "text",
|
| 299 |
+
"text": "Optimization performance–how close a point in our sequence is to the true, fixed minimum–is our goal, not a sequence with low discrepancy. However, as Bergstra & Bengio (2012) observed, the rare “large gap” that can occur in random sequences without the low discrepancy property can affect optimization performance, on average. One natural surrogate of average optimization performance is to define a hyperparameter space on $[ 0 , 1 ] ^ { d }$ and measure the distance from a fixed point, say ${ \\frac { 1 } { 2 } } \\mathbf { 1 } = { \\bigl ( } { \\frac { 1 } { 2 } } , \\ldots , { \\frac { 1 } { 2 } } { \\bigr ) }$ , to the nearest point in the length $k$ sequence in the Euclidean norm squared: $\\operatorname* { m i n } _ { i = 1 , \\ldots , k } | | x _ { i } - { \\textstyle \\frac { 1 } { 2 } } \\mathbf { 1 } | | _ { 2 } ^ { 2 }$ . The Euclidean norm (squared) is motivated by a quadratic Taylor series approximation around the minimum of the hypothetical function we wish to minimize. The first question we wish to answer is: is low discrepancy a surrogate for optimization performance? In the first and second columns of Figure 1 we plot the star discrepancy and smallest distance from the center ${ \\textstyle \\frac { 1 } { 2 } } \\mathbf { 1 }$ , respectively, as a function of the length of the sequence, with each row representing dimensions $ \\bar { \\mathrm { d } } = 2 , 3 , 4$ , for the Sobol sequence, uniform at random, and a DPP (see the next section for details). We observe that the Sobol sequence is clearly superior in terms of star discrepancy, with the DPP having a slight edge over Uniform. However, all methods appear comparable when it comes to distance to the center. ",
|
| 300 |
+
"bbox": [
|
| 301 |
+
173,
|
| 302 |
+
707,
|
| 303 |
+
825,
|
| 304 |
+
885
|
| 305 |
+
],
|
| 306 |
+
"page_idx": 2
|
| 307 |
+
},
|
| 308 |
+
{
|
| 309 |
+
"type": "image",
|
| 310 |
+
"img_path": "images/5ec05ad7b7b8c59a3dff8c3095b7cf9c099d9721429fb4245b960bd9dc82ce93.jpg",
|
| 311 |
+
"image_caption": [
|
| 312 |
+
"Figure 1: Comparison of the Sobol sequence (with uniform noise), samples a from $k$ -DPP, and uniform random for three metrics of interest. "
|
| 313 |
+
],
|
| 314 |
+
"image_footnote": [],
|
| 315 |
+
"bbox": [
|
| 316 |
+
179,
|
| 317 |
+
103,
|
| 318 |
+
813,
|
| 319 |
+
609
|
| 320 |
+
],
|
| 321 |
+
"page_idx": 3
|
| 322 |
+
},
|
| 323 |
+
{
|
| 324 |
+
"type": "text",
|
| 325 |
+
"text": "",
|
| 326 |
+
"bbox": [
|
| 327 |
+
174,
|
| 328 |
+
694,
|
| 329 |
+
825,
|
| 330 |
+
736
|
| 331 |
+
],
|
| 332 |
+
"page_idx": 3
|
| 333 |
+
},
|
| 334 |
+
{
|
| 335 |
+
"type": "text",
|
| 336 |
+
"text": "Acknowledging the fact that practitioners define the search space themselves more often than not, we realize that if the search space bounds are too small, the optimal solution often is found on the edge, or in a corner of the hypercube. Thus, in some situations it makes sense to bias the sequence towards the edges and the corners, the very opposite of what low discrepancy sequences attempt to do. While Sobol and uniformly random sequences will not bias themselves towards the corners, a DPP does. This happens because points from a DPP are sampled according to how distant they are from the existing points; this tends to favor points in the corners. This same behavior of sampling in the corners is also very common for Bayesian optimization schemes, which is not surprise due to the known connections between sampling from a DPP and gaussian process (see Section 4.5). In the third column of Figure 1 we plot the distance to the origin which is just an arbitrarily chosen corner of hypercube. As expected, we observe that the DPP tends to outperform uniform at random and Sobol in this metric. In what follows, we study the DPP in more depth and how it performs on real-world hyperparameter tuning problems. ",
|
| 337 |
+
"bbox": [
|
| 338 |
+
174,
|
| 339 |
+
743,
|
| 340 |
+
825,
|
| 341 |
+
924
|
| 342 |
+
],
|
| 343 |
+
"page_idx": 3
|
| 344 |
+
},
|
| 345 |
+
{
|
| 346 |
+
"type": "text",
|
| 347 |
+
"text": "4 METHOD ",
|
| 348 |
+
"text_level": 1,
|
| 349 |
+
"bbox": [
|
| 350 |
+
174,
|
| 351 |
+
102,
|
| 352 |
+
282,
|
| 353 |
+
118
|
| 354 |
+
],
|
| 355 |
+
"page_idx": 4
|
| 356 |
+
},
|
| 357 |
+
{
|
| 358 |
+
"type": "text",
|
| 359 |
+
"text": "We begin by reviewing determinantal point processes (DPPs) and $k$ -DPPs. ",
|
| 360 |
+
"bbox": [
|
| 361 |
+
176,
|
| 362 |
+
132,
|
| 363 |
+
661,
|
| 364 |
+
148
|
| 365 |
+
],
|
| 366 |
+
"page_idx": 4
|
| 367 |
+
},
|
| 368 |
+
{
|
| 369 |
+
"type": "text",
|
| 370 |
+
"text": "Let $\\boldsymbol { B }$ be a domain of values from which we would like to sample a finite subset. (In our use of DPPs, this is the set of hyperparameter settings.) In general, $\\boldsymbol { B }$ could be discrete or continuous; here we assume it is discrete with $N$ values, and we define $\\mathcal { Y } = \\{ 1 , \\ldots , N \\}$ to be a a set which indexes $\\boldsymbol { B }$ (this will be particularly useful in Algorithm 1). In Section 4.2 we address when $\\boldsymbol { B }$ has continuous dimensions. A DPP defines a probability distribution over $2 ^ { y }$ (all subsets of $\\mathcal { V }$ ) with the property that two elements of $\\mathcal { V }$ are more (less) likely to both be chosen the more dissimilar (similar) they are. Let random variable $\\mathbf { Y }$ range over finite subsets of $\\mathcal { V }$ . ",
|
| 371 |
+
"bbox": [
|
| 372 |
+
173,
|
| 373 |
+
154,
|
| 374 |
+
825,
|
| 375 |
+
253
|
| 376 |
+
],
|
| 377 |
+
"page_idx": 4
|
| 378 |
+
},
|
| 379 |
+
{
|
| 380 |
+
"type": "text",
|
| 381 |
+
"text": "There are several ways to define the parameters of a DPP. We focus on $\\mathbf { L }$ -ensembles, which define the probability that a specific subset is drawn (i.e., $P ( \\mathbf { \\boldsymbol { Y } } = \\mathcal { A } )$ for some $\\mathcal { A } \\subset \\mathcal { V }$ ) as: ",
|
| 382 |
+
"bbox": [
|
| 383 |
+
173,
|
| 384 |
+
258,
|
| 385 |
+
821,
|
| 386 |
+
287
|
| 387 |
+
],
|
| 388 |
+
"page_idx": 4
|
| 389 |
+
},
|
| 390 |
+
{
|
| 391 |
+
"type": "equation",
|
| 392 |
+
"img_path": "images/f9b4096bb46966f867c024802657ced7fe84e63864ff7c220f6de13207ffdf95.jpg",
|
| 393 |
+
"text": "$$\nP ( \\mathbf { } Y = \\mathcal { A } ) = \\frac { \\operatorname* { d e t } ( \\mathbf { L } _ { \\mathcal { A } } ) } { \\operatorname* { d e t } ( \\mathbf { L } + I ) } .\n$$",
|
| 394 |
+
"text_format": "latex",
|
| 395 |
+
"bbox": [
|
| 396 |
+
408,
|
| 397 |
+
295,
|
| 398 |
+
589,
|
| 399 |
+
329
|
| 400 |
+
],
|
| 401 |
+
"page_idx": 4
|
| 402 |
+
},
|
| 403 |
+
{
|
| 404 |
+
"type": "text",
|
| 405 |
+
"text": "As shown in Kulesza et al. (2012), this definition of $\\mathbf { L }$ admits a decomposition to terms representing the quality and diversity of the elements of $\\mathcal { V }$ . For any $y _ { i } , y _ { j } \\in \\mathcal { D }$ , let: ",
|
| 406 |
+
"bbox": [
|
| 407 |
+
169,
|
| 408 |
+
342,
|
| 409 |
+
825,
|
| 410 |
+
372
|
| 411 |
+
],
|
| 412 |
+
"page_idx": 4
|
| 413 |
+
},
|
| 414 |
+
{
|
| 415 |
+
"type": "equation",
|
| 416 |
+
"img_path": "images/1ecbc529913eaf255109f5c0040af2799496cb12ff08fab900fbc7288dafb913.jpg",
|
| 417 |
+
"text": "$$\n{ \\bf L } _ { i , j } = q _ { i } q _ { j } \\mathcal { K } ( \\phi _ { i } , \\phi _ { j } ) ,\n$$",
|
| 418 |
+
"text_format": "latex",
|
| 419 |
+
"bbox": [
|
| 420 |
+
423,
|
| 421 |
+
377,
|
| 422 |
+
573,
|
| 423 |
+
397
|
| 424 |
+
],
|
| 425 |
+
"page_idx": 4
|
| 426 |
+
},
|
| 427 |
+
{
|
| 428 |
+
"type": "text",
|
| 429 |
+
"text": "where $q _ { i } > 0$ is the quality of $y _ { i }$ $, \\phi _ { i } \\in R ^ { d }$ is a featurized representation of $y _ { i }$ , and ${ \\boldsymbol { \\mathcal { K } } } : R ^ { d } \\times R ^ { d } \\to$ $[ 0 , 1 ]$ is a similarity kernel (e.g. cosine distance). (We will discuss how to featurize hyperparameter settings in Section 4.3.) ",
|
| 430 |
+
"bbox": [
|
| 431 |
+
174,
|
| 432 |
+
404,
|
| 433 |
+
825,
|
| 434 |
+
446
|
| 435 |
+
],
|
| 436 |
+
"page_idx": 4
|
| 437 |
+
},
|
| 438 |
+
{
|
| 439 |
+
"type": "text",
|
| 440 |
+
"text": "Here, we fix all $q _ { i } = 1$ ; in future work, closed loop methods might make use of $q _ { i }$ to encode evidence about the quality of particular hyperparameter settings to adapt the DPP’s distribution over time. ",
|
| 441 |
+
"bbox": [
|
| 442 |
+
173,
|
| 443 |
+
454,
|
| 444 |
+
823,
|
| 445 |
+
483
|
| 446 |
+
],
|
| 447 |
+
"page_idx": 4
|
| 448 |
+
},
|
| 449 |
+
{
|
| 450 |
+
"type": "text",
|
| 451 |
+
"text": "4.1 SAMPLING FROM A $k$ -DPP ",
|
| 452 |
+
"text_level": 1,
|
| 453 |
+
"bbox": [
|
| 454 |
+
176,
|
| 455 |
+
500,
|
| 456 |
+
400,
|
| 457 |
+
513
|
| 458 |
+
],
|
| 459 |
+
"page_idx": 4
|
| 460 |
+
},
|
| 461 |
+
{
|
| 462 |
+
"type": "text",
|
| 463 |
+
"text": "DPPs have support over all subsets of $\\mathcal { V }$ , including $\\varnothing$ and $\\mathcal { V }$ itself. In many practical settings, one may have a fixed budget that allows running the training algorithm $k$ times, so we require precisely $k$ elements of $\\mathcal { V }$ for evaluation. $k$ -DPPs are distributions over subsets of $\\mathcal { V }$ of size $k$ . Thus, ",
|
| 464 |
+
"bbox": [
|
| 465 |
+
173,
|
| 466 |
+
525,
|
| 467 |
+
825,
|
| 468 |
+
568
|
| 469 |
+
],
|
| 470 |
+
"page_idx": 4
|
| 471 |
+
},
|
| 472 |
+
{
|
| 473 |
+
"type": "equation",
|
| 474 |
+
"img_path": "images/7898b7269fda6dfb1ebb471159193e4a90ce7f19b2f716d08b26333b9335030e.jpg",
|
| 475 |
+
"text": "$$\nP ( \\mathbf { Y } = A \\mid \\mid \\mathbf { \\boldsymbol { Y } } | = k ) = \\frac { \\operatorname* { d e t } ( \\mathbf { L } _ { A } ) } { \\sum _ { \\mathbf { \\boldsymbol { A } } ^ { \\prime } \\subset \\mathcal { V } , \\mid \\mathbf { \\boldsymbol { A } } ^ { \\prime } \\mid = k } \\operatorname* { d e t } ( \\mathbf { L } _ { A ^ { \\prime } } ) } .\n$$",
|
| 476 |
+
"text_format": "latex",
|
| 477 |
+
"bbox": [
|
| 478 |
+
330,
|
| 479 |
+
573,
|
| 480 |
+
666,
|
| 481 |
+
611
|
| 482 |
+
],
|
| 483 |
+
"page_idx": 4
|
| 484 |
+
},
|
| 485 |
+
{
|
| 486 |
+
"type": "text",
|
| 487 |
+
"text": "4.2 NEW MCMC ALGORITHM ",
|
| 488 |
+
"text_level": 1,
|
| 489 |
+
"bbox": [
|
| 490 |
+
176,
|
| 491 |
+
625,
|
| 492 |
+
398,
|
| 493 |
+
640
|
| 494 |
+
],
|
| 495 |
+
"page_idx": 4
|
| 496 |
+
},
|
| 497 |
+
{
|
| 498 |
+
"type": "text",
|
| 499 |
+
"text": "Kulesza et al. (2012) give an algorithm for sampling exactly from $k$ -DPPs, though it runs in $O ( N ^ { 3 } )$ ; a Metropolis-Hastings algorithm presented by Anari et al. (2016) is a simple and fast alternative (included here as Algorithm 1). Both of these sampling algorithms assume the DPP is defined over a finite number of items; they are restricted to discrete domains. We propose a generalization of the MCMC algorithm which preserves relevant computations while allowing sampling from base sets with discrete dimensions, continuous dimensions, or some continuous and some discrete dimensions (Algorithm 2). To the best of our knowledge, this is the first algorithm which allows for sampling from a $k$ -DPP defined over mixed discrete and continuous spaces. ",
|
| 500 |
+
"bbox": [
|
| 501 |
+
173,
|
| 502 |
+
650,
|
| 503 |
+
825,
|
| 504 |
+
763
|
| 505 |
+
],
|
| 506 |
+
"page_idx": 4
|
| 507 |
+
},
|
| 508 |
+
{
|
| 509 |
+
"type": "text",
|
| 510 |
+
"text": "Algorithm 1 proceeds as follows: First, initialize a set $\\mathbf { Y }$ with $k$ indices of $\\mathbf { L }$ , drawn uniformly. Then, at each iteration, sample two indices of $\\mathbf { L }$ (one within and one outside of the set $\\mathbf { Y }$ ), and with some probability replace the item in $\\mathbf { Y }$ with the other. ",
|
| 511 |
+
"bbox": [
|
| 512 |
+
174,
|
| 513 |
+
768,
|
| 514 |
+
825,
|
| 515 |
+
811
|
| 516 |
+
],
|
| 517 |
+
"page_idx": 4
|
| 518 |
+
},
|
| 519 |
+
{
|
| 520 |
+
"type": "text",
|
| 521 |
+
"text": "When we have continuous dimensions in the base set, however, we can’t define the matrix $\\mathbf { L }$ , so sampling indices from it is not possible. We propose Algorithm 2, which samples points directly from the base set $\\boldsymbol { B }$ instead (assuming continuous dimensions are bounded), and computes only the principal minors of $\\mathbf { L }$ needed for the relevant computations on the fly. ",
|
| 522 |
+
"bbox": [
|
| 523 |
+
174,
|
| 524 |
+
818,
|
| 525 |
+
825,
|
| 526 |
+
875
|
| 527 |
+
],
|
| 528 |
+
"page_idx": 4
|
| 529 |
+
},
|
| 530 |
+
{
|
| 531 |
+
"type": "text",
|
| 532 |
+
"text": "Even in the case where the dimensions of $\\boldsymbol { B }$ are discrete, Algorithm 2 requires less computation and space than Algorithm 1 (assuming the quality and similarity scores are stored once computed, and retrieved when needed). Previous analyses claimed that Algorithm 1 should be run for ${ \\cal O } ( \\bar { N } \\log ( N ) )$ ",
|
| 533 |
+
"bbox": [
|
| 534 |
+
176,
|
| 535 |
+
881,
|
| 536 |
+
823,
|
| 537 |
+
924
|
| 538 |
+
],
|
| 539 |
+
"page_idx": 4
|
| 540 |
+
},
|
| 541 |
+
{
|
| 542 |
+
"type": "text",
|
| 543 |
+
"text": "Algorithm 1 Drawing a sample from a discrete $k$ -DPP ",
|
| 544 |
+
"bbox": [
|
| 545 |
+
173,
|
| 546 |
+
103,
|
| 547 |
+
534,
|
| 548 |
+
118
|
| 549 |
+
],
|
| 550 |
+
"page_idx": 5
|
| 551 |
+
},
|
| 552 |
+
{
|
| 553 |
+
"type": "text",
|
| 554 |
+
"text": "Input: L, a symmetric, $N \\times N$ matrix where ${ \\bf L } _ { i , j } = q _ { i } q _ { j } K ( \\phi _ { i } , \\phi _ { j } )$ which defines a DPP over a finite base set of items $\\boldsymbol { B }$ , and $\\mathcal { Y } = \\{ 1 , \\ldots , N \\}$ , where $\\mathcal { \\mathrm { V } } _ { i }$ indexes a row or column of $\\mathbf { L }$ ",
|
| 555 |
+
"bbox": [
|
| 556 |
+
179,
|
| 557 |
+
121,
|
| 558 |
+
821,
|
| 559 |
+
151
|
| 560 |
+
],
|
| 561 |
+
"page_idx": 5
|
| 562 |
+
},
|
| 563 |
+
{
|
| 564 |
+
"type": "text",
|
| 565 |
+
"text": "Output: $B _ { \\mathbf { Y } }$ (the points in $\\boldsymbol { B }$ indexed by $\\mathbf { Y }$ ) ",
|
| 566 |
+
"bbox": [
|
| 567 |
+
173,
|
| 568 |
+
151,
|
| 569 |
+
470,
|
| 570 |
+
165
|
| 571 |
+
],
|
| 572 |
+
"page_idx": 5
|
| 573 |
+
},
|
| 574 |
+
{
|
| 575 |
+
"type": "text",
|
| 576 |
+
"text": "1: Initialize $\\mathbf { Y }$ to $k$ elements sampled from $\\mathcal { V }$ uniformly \n2: while not mixed do \n3: uniformly sample $u \\in \\mathbf { Y } , v \\in \\mathcal { Y } \\setminus \\mathbf { Y }$ \n4: set $\\mathbf { Y } ^ { \\prime } = \\mathbf { Y } \\cup \\{ v \\} \\setminus \\{ u \\}$ \n5: $\\begin{array} { r } { p \\gets \\frac { 1 } { 2 } m i n \\big ( 1 , \\frac { \\operatorname* { d e t } ( \\mathbf { L } _ { \\mathbf { Y } ^ { \\prime } } ) } { \\operatorname* { d e t } ( \\mathbf { L } _ { \\mathbf { Y } } ) } \\big ) } \\end{array}$ \n6: with probability $p$ : $\\mathbf { Y } = \\mathbf { Y } ^ { \\prime }$ ",
|
| 577 |
+
"bbox": [
|
| 578 |
+
179,
|
| 579 |
+
165,
|
| 580 |
+
550,
|
| 581 |
+
262
|
| 582 |
+
],
|
| 583 |
+
"page_idx": 5
|
| 584 |
+
},
|
| 585 |
+
{
|
| 586 |
+
"type": "text",
|
| 587 |
+
"text": "7: Return $B _ { \\mathbf { Y } }$ ",
|
| 588 |
+
"bbox": [
|
| 589 |
+
181,
|
| 590 |
+
257,
|
| 591 |
+
274,
|
| 592 |
+
271
|
| 593 |
+
],
|
| 594 |
+
"page_idx": 5
|
| 595 |
+
},
|
| 596 |
+
{
|
| 597 |
+
"type": "text",
|
| 598 |
+
"text": "Algorithm 2 Drawing a sample from a $k$ -DPP defined over a space with continuous and discrete dimensions ",
|
| 599 |
+
"bbox": [
|
| 600 |
+
176,
|
| 601 |
+
299,
|
| 602 |
+
823,
|
| 603 |
+
327
|
| 604 |
+
],
|
| 605 |
+
"page_idx": 5
|
| 606 |
+
},
|
| 607 |
+
{
|
| 608 |
+
"type": "text",
|
| 609 |
+
"text": "Input: A base set $\\boldsymbol { B }$ with some continuous and some discrete dimensions, a quality function $\\Psi$ : $\\mathbf { Y } _ { i } \\to q _ { i }$ , a feature function $\\Phi : \\mathbf { Y } _ { i } \\phi _ { i }$ ",
|
| 610 |
+
"bbox": [
|
| 611 |
+
173,
|
| 612 |
+
328,
|
| 613 |
+
823,
|
| 614 |
+
357
|
| 615 |
+
],
|
| 616 |
+
"page_idx": 5
|
| 617 |
+
},
|
| 618 |
+
{
|
| 619 |
+
"type": "text",
|
| 620 |
+
"text": "Output: $\\beta$ , a set of $k$ points in $\\boldsymbol { B }$ ",
|
| 621 |
+
"bbox": [
|
| 622 |
+
173,
|
| 623 |
+
357,
|
| 624 |
+
397,
|
| 625 |
+
369
|
| 626 |
+
],
|
| 627 |
+
"page_idx": 5
|
| 628 |
+
},
|
| 629 |
+
{
|
| 630 |
+
"type": "text",
|
| 631 |
+
"text": "1: Initialize $\\beta$ to $k$ points sampled from $\\boldsymbol { B }$ uniformly \n2: while not mixed do \n3: uniformly sample $u \\in \\beta , v \\in B \\setminus \\beta$ \n4: set $\\beta ^ { \\prime } = \\mathsf { \\bar { \\beta } } \\cup \\bar { \\{ v \\} } \\setminus \\{ u \\}$ \n5: compute the quality score for each item, $q _ { i } = \\Psi ( \\beta _ { i } ) , \\forall i$ , and $\\boldsymbol { q } _ { i } ^ { \\prime } = \\boldsymbol { \\Psi } ( \\beta _ { i } ^ { \\prime } ) , \\forall i$ \n6: construct $\\mathbf { L } _ { \\beta } = [ q _ { i } q _ { j } K ( \\Phi ( \\beta _ { i } ) , \\Phi ( \\beta _ { j } ) ) ] , \\forall i , j$ \n7: construct ${ \\bf L } _ { \\beta ^ { \\prime } } = [ q _ { i } ^ { \\prime } q _ { j } ^ { \\prime } \\mathcal { K } ( \\Phi ( \\beta _ { i } ^ { \\prime } ) , \\Phi ( \\beta _ { j } ^ { \\prime } ) ) ] , \\forall i , j$ \n8: $\\begin{array} { r } { p \\gets \\frac { 1 } { 2 } m i n ( 1 , \\frac { \\operatorname* { d e t } ( \\mathbf { L } _ { \\beta ^ { \\prime } } ) } { \\operatorname* { d e t } ( \\mathbf { L } _ { \\beta } ) } ) } \\end{array}$ \n9: with probability $p$ : $\\beta = \\beta ^ { \\prime }$ \n10: Return $\\beta$ ",
|
| 632 |
+
"bbox": [
|
| 633 |
+
176,
|
| 634 |
+
367,
|
| 635 |
+
735,
|
| 636 |
+
529
|
| 637 |
+
],
|
| 638 |
+
"page_idx": 5
|
| 639 |
+
},
|
| 640 |
+
{
|
| 641 |
+
"type": "text",
|
| 642 |
+
"text": "steps. There are $O ( N ^ { 2 } )$ computations required to compute the full matrix $L$ , and at each iteration we will compute at most $O ( k )$ new elements of $L$ , so even in the worst case we will save space and computation whenever $k \\log ( N ) < N$ . In expectation, we will save significantly more. ",
|
| 643 |
+
"bbox": [
|
| 644 |
+
174,
|
| 645 |
+
564,
|
| 646 |
+
825,
|
| 647 |
+
607
|
| 648 |
+
],
|
| 649 |
+
"page_idx": 5
|
| 650 |
+
},
|
| 651 |
+
{
|
| 652 |
+
"type": "text",
|
| 653 |
+
"text": "4.3 CONSTRUCTING L FOR HYPERPARAMETER OPTIMIZATION",
|
| 654 |
+
"text_level": 1,
|
| 655 |
+
"bbox": [
|
| 656 |
+
174,
|
| 657 |
+
632,
|
| 658 |
+
614,
|
| 659 |
+
647
|
| 660 |
+
],
|
| 661 |
+
"page_idx": 5
|
| 662 |
+
},
|
| 663 |
+
{
|
| 664 |
+
"type": "text",
|
| 665 |
+
"text": "The vector $\\phi _ { i }$ will encode $y _ { i }$ (an element of $\\mathcal { V }$ ), which in its most general form is an attribute-value mapping assigning values to different hyperparameters. ",
|
| 666 |
+
"bbox": [
|
| 667 |
+
174,
|
| 668 |
+
661,
|
| 669 |
+
823,
|
| 670 |
+
690
|
| 671 |
+
],
|
| 672 |
+
"page_idx": 5
|
| 673 |
+
},
|
| 674 |
+
{
|
| 675 |
+
"type": "text",
|
| 676 |
+
"text": "Let $\\phi _ { i }$ be a feature vector for $y _ { i } \\in \\mathcal { V }$ , a modular encoding of the attribute-value mapping, in which fixed segments of the vector are assigned to each hyperparameter attribute (e.g., the dropout rate, the choice of nonlinearity, etc.). For a hyperparameter that takes a numerical value in range $[ h _ { \\operatorname* { m i n } } , h _ { \\operatorname* { m a x } } ]$ , we encode value $h$ using one dimension $( j )$ of $\\phi$ and project into the range $[ 0 , 1 ]$ : ",
|
| 677 |
+
"bbox": [
|
| 678 |
+
174,
|
| 679 |
+
696,
|
| 680 |
+
825,
|
| 681 |
+
753
|
| 682 |
+
],
|
| 683 |
+
"page_idx": 5
|
| 684 |
+
},
|
| 685 |
+
{
|
| 686 |
+
"type": "equation",
|
| 687 |
+
"img_path": "images/4381b768d7bd0228de45f6fe4a0ad3388ac1a192b8e4046d72534f256bd3ed81.jpg",
|
| 688 |
+
"text": "$$\n\\phi [ j ] = \\frac { h - h _ { \\operatorname* { m i n } } } { h _ { \\operatorname* { m a x } } - h _ { \\operatorname* { m i n } } }\n$$",
|
| 689 |
+
"text_format": "latex",
|
| 690 |
+
"bbox": [
|
| 691 |
+
431,
|
| 692 |
+
768,
|
| 693 |
+
568,
|
| 694 |
+
801
|
| 695 |
+
],
|
| 696 |
+
"page_idx": 5
|
| 697 |
+
},
|
| 698 |
+
{
|
| 699 |
+
"type": "text",
|
| 700 |
+
"text": "This rescaling prevents hyperparameters with greater dynamic range from dominating the similarity calculations. A categorical-valued hyperparameter attribute that takes $m$ values is given $m$ elements of $\\mathbf { r }$ and a one-hot encoding. We then compute similarity using an RBF kernel, $\\begin{array} { r } { { \\cal K } = \\exp \\left( - \\frac { | | \\phi _ { i } - \\phi _ { j } | | ^ { 2 } } { 2 \\sigma ^ { 2 } } \\right) } \\end{array}$ and hence label our approach $k$ -DPP-RBF. Values for $\\sigma ^ { 2 }$ lead to models with different properties; when $\\sigma ^ { 2 }$ is small, points that are spread out have little impact, and when $\\sigma ^ { 2 }$ is large, the increased repulsion between the points encourages them to be as far apart as possible. This tradeoff is represented in Figure 1. ",
|
| 701 |
+
"bbox": [
|
| 702 |
+
173,
|
| 703 |
+
814,
|
| 704 |
+
825,
|
| 705 |
+
924
|
| 706 |
+
],
|
| 707 |
+
"page_idx": 5
|
| 708 |
+
},
|
| 709 |
+
{
|
| 710 |
+
"type": "text",
|
| 711 |
+
"text": "4.4 TREE-STRUCTURED HYPERPARAMETERS ",
|
| 712 |
+
"text_level": 1,
|
| 713 |
+
"bbox": [
|
| 714 |
+
176,
|
| 715 |
+
103,
|
| 716 |
+
495,
|
| 717 |
+
117
|
| 718 |
+
],
|
| 719 |
+
"page_idx": 6
|
| 720 |
+
},
|
| 721 |
+
{
|
| 722 |
+
"type": "text",
|
| 723 |
+
"text": "Many real-world hyperparameter search spaces are tree-structured. For example, the number of layers in a neural network is a hyperparameter, and each additional layer adds at least one new hyperparameter which ought to be tuned (the number of nodes in that layer). For a binary hyperparameter like whether or not to use regularization, we use a one-hot encoding. When this hyperparameter is “on,” we set the associated regularization strength as above, and when it is “off” we set it to zero. Intuitively, with all other hyperparameter settings equal, this causes the off-setting to be closest to the least strong regularization. One can also treat higher-level design decisions as hyperparameters (Komer et al., 2014), such as whether to train a logistic regression classifier, a convolutional neural network, or a recurrent neural network. In this construction, the type of model would be a categorical variable (and thus get a one-hot encoding), and all child hyperparameters for an “off” model setting (such as the convergence tolerance for logistic regression, when training a recurrent neural network) would be set to zero. ",
|
| 724 |
+
"bbox": [
|
| 725 |
+
174,
|
| 726 |
+
130,
|
| 727 |
+
825,
|
| 728 |
+
296
|
| 729 |
+
],
|
| 730 |
+
"page_idx": 6
|
| 731 |
+
},
|
| 732 |
+
{
|
| 733 |
+
"type": "text",
|
| 734 |
+
"text": "4.5 CONNECTION TO GAUSSIAN PROCESSES ",
|
| 735 |
+
"text_level": 1,
|
| 736 |
+
"bbox": [
|
| 737 |
+
178,
|
| 738 |
+
314,
|
| 739 |
+
493,
|
| 740 |
+
327
|
| 741 |
+
],
|
| 742 |
+
"page_idx": 6
|
| 743 |
+
},
|
| 744 |
+
{
|
| 745 |
+
"type": "text",
|
| 746 |
+
"text": "Gaussian processes are used widely in hyperparameter optimization algorithms. Hennig & Garnett (2016) claim that sampling from a DPP with kernel $\\kappa$ is equivalent to sequentially sampling proportional to the posterior variance of a GP defined with covariance kernel $\\kappa$ . Since the entropy of a Gaussian is proportional to the log determinant of the covariance matrix, points drawn from a DPP have probability proportional to exp(information gain), and the most probable set from the DPP is the set which maximizes the information gain. ",
|
| 747 |
+
"bbox": [
|
| 748 |
+
174,
|
| 749 |
+
339,
|
| 750 |
+
825,
|
| 751 |
+
424
|
| 752 |
+
],
|
| 753 |
+
"page_idx": 6
|
| 754 |
+
},
|
| 755 |
+
{
|
| 756 |
+
"type": "text",
|
| 757 |
+
"text": "5 HYPERPARAMETER OPTIMIZATION EXPERIMENTS ",
|
| 758 |
+
"text_level": 1,
|
| 759 |
+
"bbox": [
|
| 760 |
+
174,
|
| 761 |
+
444,
|
| 762 |
+
620,
|
| 763 |
+
460
|
| 764 |
+
],
|
| 765 |
+
"page_idx": 6
|
| 766 |
+
},
|
| 767 |
+
{
|
| 768 |
+
"type": "text",
|
| 769 |
+
"text": "In this section we present our hyperparameter optimization experiments. We compare $k$ -DPP-RBF, uniform sampling, and a Bayesian optimization algorithm in Section 5.1. We compare samples drawn using Algorithm 1 (which necessitates discretizing the hyperparameter space) and Algorithm 2 against samples drawn uniformly at random in Section 5.2. It is worth noting that as $k$ increases, all sampling methods approach the true optimum. ",
|
| 770 |
+
"bbox": [
|
| 771 |
+
174,
|
| 772 |
+
476,
|
| 773 |
+
825,
|
| 774 |
+
545
|
| 775 |
+
],
|
| 776 |
+
"page_idx": 6
|
| 777 |
+
},
|
| 778 |
+
{
|
| 779 |
+
"type": "text",
|
| 780 |
+
"text": "5.1 CONVOLUTIONAL NEURAL NETWORKS FOR TEXT CLASSIFICATION ",
|
| 781 |
+
"text_level": 1,
|
| 782 |
+
"bbox": [
|
| 783 |
+
176,
|
| 784 |
+
564,
|
| 785 |
+
673,
|
| 786 |
+
577
|
| 787 |
+
],
|
| 788 |
+
"page_idx": 6
|
| 789 |
+
},
|
| 790 |
+
{
|
| 791 |
+
"type": "text",
|
| 792 |
+
"text": "Our experiments consider a setting where hyperparameters have a large effect on performance: a convolutional neural network for text classification (Kim, 2014). The task is binary sentiment analysis on the Stanford sentiment treebank (Socher et al., 2013). On this balanced dataset, random guessing leads to $50 \\%$ accuracy. We use the CNN-non-static model from Kim (2014), with word2vec (Mikolov et al., 2013) vectors. The model architecture consists of a convolutional layer, a max-over-time pooling layer, then a fully connected layer leading to a softmax. ",
|
| 793 |
+
"bbox": [
|
| 794 |
+
174,
|
| 795 |
+
589,
|
| 796 |
+
825,
|
| 797 |
+
672
|
| 798 |
+
],
|
| 799 |
+
"page_idx": 6
|
| 800 |
+
},
|
| 801 |
+
{
|
| 802 |
+
"type": "text",
|
| 803 |
+
"text": "We begin with a search over three hyperparameters, assuming a budget of $k = 2 0$ repetitions of training the convolutional neural net. $L _ { 2 }$ regularization strengths in the range $[ e ^ { - 5 } , \\dot { e } ^ { - 1 } ]$ (or no regularization) and dropout rates in $[ 0 . 0 , 0 . 7 ]$ are considered. We consider three increasingly “easy” ranges for the learning rate: ",
|
| 804 |
+
"bbox": [
|
| 805 |
+
176,
|
| 806 |
+
679,
|
| 807 |
+
823,
|
| 808 |
+
736
|
| 809 |
+
],
|
| 810 |
+
"page_idx": 6
|
| 811 |
+
},
|
| 812 |
+
{
|
| 813 |
+
"type": "text",
|
| 814 |
+
"text": "• Hard: $[ e ^ { - 5 } , e ^ { 5 } ]$ , where the majority of the range leads to accuracy no better than chance. \n• Medium: $[ e ^ { - 5 } , e ^ { - 1 } ]$ , where half of the range leads to accuracy no better than chance. \n• Easy: $[ e ^ { - 1 0 } , e ^ { - 3 } ]$ , where the entire range leads to models that beat chance. ",
|
| 815 |
+
"bbox": [
|
| 816 |
+
215,
|
| 817 |
+
746,
|
| 818 |
+
810,
|
| 819 |
+
801
|
| 820 |
+
],
|
| 821 |
+
"page_idx": 6
|
| 822 |
+
},
|
| 823 |
+
{
|
| 824 |
+
"type": "text",
|
| 825 |
+
"text": "Figure 2 shows the accuracy (averaged over 50 runs) of the best model found after exploring $1 , 2 , \\ldots$ , $k$ hyperparameter settings. We see that $k$ -DPP-RBF finds better models with fewer iterations necessary than the other approaches, especially in the most difficult case. Figure 2 compares the sampling methods against a Bayesian optimization technique using a tree-structured Parzen estimator (BOTPE; Bergstra et al., 2011b). This technique evaluates points sequentially, allowing the model to choose the next point based on how well previous points performed (a closed loop approach). It is state-of-the-art on tree-structured search spaces (though its sequential nature limits parallelization). Surprisingly, we find it performs the worst, even though it takes advantage of additional information. ",
|
| 826 |
+
"bbox": [
|
| 827 |
+
173,
|
| 828 |
+
811,
|
| 829 |
+
825,
|
| 830 |
+
924
|
| 831 |
+
],
|
| 832 |
+
"page_idx": 6
|
| 833 |
+
},
|
| 834 |
+
{
|
| 835 |
+
"type": "image",
|
| 836 |
+
"img_path": "images/45835af4e7c90a921ea7467f1fd9bd0c5e530839dca611de927e6b82bc6cb68e.jpg",
|
| 837 |
+
"image_caption": [
|
| 838 |
+
"Figure 2: Average best-found model accuracy by iteration when training a convolutional neural network on three hyperparameter search spaces (defined in Section 5.1), averaged across 50 trials of hyperparameter optimization, with $k = 2 0$ . "
|
| 839 |
+
],
|
| 840 |
+
"image_footnote": [],
|
| 841 |
+
"bbox": [
|
| 842 |
+
181,
|
| 843 |
+
106,
|
| 844 |
+
813,
|
| 845 |
+
325
|
| 846 |
+
],
|
| 847 |
+
"page_idx": 7
|
| 848 |
+
},
|
| 849 |
+
{
|
| 850 |
+
"type": "text",
|
| 851 |
+
"text": "We hypothesize that the exploration/exploitation tradeoff in BO-TPE causes it to commit to more local search before exploring the space fully, thus not finding hard-to-reach global optima. ",
|
| 852 |
+
"bbox": [
|
| 853 |
+
173,
|
| 854 |
+
430,
|
| 855 |
+
823,
|
| 856 |
+
459
|
| 857 |
+
],
|
| 858 |
+
"page_idx": 7
|
| 859 |
+
},
|
| 860 |
+
{
|
| 861 |
+
"type": "text",
|
| 862 |
+
"text": "Note that when considering points sampled uniformly or from a DPP, the order of the $k$ hyperparameter settings in one trial is arbitrary (though this is not the case with BO-TPE as it is an iterative algorithm). The variance of the $k$ -DPP methods (not shown for clarity) tends to be high in early iterations, simply because the $k$ samples from a $k$ -DPP are likely to be more diverse than those sampled uniformly, but in all cases the variance of the best of the $k$ points is lower than when sampled uniformly. ",
|
| 863 |
+
"bbox": [
|
| 864 |
+
174,
|
| 865 |
+
465,
|
| 866 |
+
825,
|
| 867 |
+
550
|
| 868 |
+
],
|
| 869 |
+
"page_idx": 7
|
| 870 |
+
},
|
| 871 |
+
{
|
| 872 |
+
"type": "text",
|
| 873 |
+
"text": "5.2 OPTIMIZING WITHIN RANGES KNOWN TO BE GOOD ",
|
| 874 |
+
"text_level": 1,
|
| 875 |
+
"bbox": [
|
| 876 |
+
174,
|
| 877 |
+
575,
|
| 878 |
+
566,
|
| 879 |
+
588
|
| 880 |
+
],
|
| 881 |
+
"page_idx": 7
|
| 882 |
+
},
|
| 883 |
+
{
|
| 884 |
+
"type": "text",
|
| 885 |
+
"text": "Zhang & Wallace (2015) analyzed the stability of convolutional neural networks for sentence classification with respect to a large set of hyperparameters, and found a set of six which they claimed had the largest impact: the number of kernels, the difference in size between the kernels, the size of each kernel, dropout, regularization strength, and the number of filters. We optimized over their prescribed “Stable” ranges; average accuracies across 50 trials of hyperparameter optimization are shown in Figure 3, across $k = 2 0$ iterations, with each dimension discretized to five values (for the discretized experiments). For both uniform sampling and sampling using $k$ -DPP-RBF, discretizing the search space hurts performance, thus motivating the use of Algorithm 2. Additionally, we find that even in this case where every value gives reasonable performance, $k$ -DPP-RBF sampling outperforms uniform sampling. ",
|
| 886 |
+
"bbox": [
|
| 887 |
+
173,
|
| 888 |
+
603,
|
| 889 |
+
825,
|
| 890 |
+
742
|
| 891 |
+
],
|
| 892 |
+
"page_idx": 7
|
| 893 |
+
},
|
| 894 |
+
{
|
| 895 |
+
"type": "text",
|
| 896 |
+
"text": "Our experiments reveal that, while the hyperparameters proposed by Zhang & Wallace (2015), can have an effect, the learning rate, which they don’t analyze, is at least as impactful. ",
|
| 897 |
+
"bbox": [
|
| 898 |
+
176,
|
| 899 |
+
748,
|
| 900 |
+
821,
|
| 901 |
+
776
|
| 902 |
+
],
|
| 903 |
+
"page_idx": 7
|
| 904 |
+
},
|
| 905 |
+
{
|
| 906 |
+
"type": "text",
|
| 907 |
+
"text": "6 CONCLUSIONS ",
|
| 908 |
+
"text_level": 1,
|
| 909 |
+
"bbox": [
|
| 910 |
+
176,
|
| 911 |
+
804,
|
| 912 |
+
328,
|
| 913 |
+
820
|
| 914 |
+
],
|
| 915 |
+
"page_idx": 7
|
| 916 |
+
},
|
| 917 |
+
{
|
| 918 |
+
"type": "text",
|
| 919 |
+
"text": "We have explored open loop hyperparameter optimization built on sampling from $k$ -DPPs. We described how to construct $k$ -DPPs over hyperparameter search spaces, and showed that sampling from these retains the attractive parallelization capabilities of random search. Our experiments demonstrate that, under a limited computation budget, on a number of realistic hyperparameter optimization problems, these approaches perform better than sampling uniformly at random. As we increase the difficulty of our hyperparameter optimization problem (i.e., as values which lead to good model evaluations become more scarce) the improvement over sampling uniformly at random increases. An open-source implementation of our method is available.2 ",
|
| 920 |
+
"bbox": [
|
| 921 |
+
174,
|
| 922 |
+
840,
|
| 923 |
+
823,
|
| 924 |
+
924
|
| 925 |
+
],
|
| 926 |
+
"page_idx": 7
|
| 927 |
+
},
|
| 928 |
+
{
|
| 929 |
+
"type": "image",
|
| 930 |
+
"img_path": "images/90c072aff41332ea7a98513b982e7a69ff9ce543dfa8155fd76b7a7440176785.jpg",
|
| 931 |
+
"image_caption": [
|
| 932 |
+
"Figure 3: Average best-found model accuracy by iteration when training a convolutional neural network on the “Stable” search space (defined in Section 5.2), averaged across 50 trials of hyperparameter optimization, with $k =$ 20. Discretizing the space reduces the accuracy found for both uniform sampling and $k$ -DPP-RBF, but in both cases $k$ -DPP-RBF finds better optima than uniform sampling. "
|
| 933 |
+
],
|
| 934 |
+
"image_footnote": [],
|
| 935 |
+
"bbox": [
|
| 936 |
+
179,
|
| 937 |
+
107,
|
| 938 |
+
571,
|
| 939 |
+
330
|
| 940 |
+
],
|
| 941 |
+
"page_idx": 8
|
| 942 |
+
},
|
| 943 |
+
{
|
| 944 |
+
"type": "text",
|
| 945 |
+
"text": "",
|
| 946 |
+
"bbox": [
|
| 947 |
+
174,
|
| 948 |
+
363,
|
| 949 |
+
820,
|
| 950 |
+
390
|
| 951 |
+
],
|
| 952 |
+
"page_idx": 8
|
| 953 |
+
},
|
| 954 |
+
{
|
| 955 |
+
"type": "text",
|
| 956 |
+
"text": "REFERENCES ",
|
| 957 |
+
"text_level": 1,
|
| 958 |
+
"bbox": [
|
| 959 |
+
174,
|
| 960 |
+
411,
|
| 961 |
+
285,
|
| 962 |
+
426
|
| 963 |
+
],
|
| 964 |
+
"page_idx": 8
|
| 965 |
+
},
|
| 966 |
+
{
|
| 967 |
+
"type": "text",
|
| 968 |
+
"text": "Mohamed Osama Ahmed, Bobak Shahriari, and Mark Schmidt. Do we need harmless bayesian optimization and first-order bayesian optimization? NIPS BayesOpt, 2016. ",
|
| 969 |
+
"bbox": [
|
| 970 |
+
171,
|
| 971 |
+
434,
|
| 972 |
+
825,
|
| 973 |
+
460
|
| 974 |
+
],
|
| 975 |
+
"page_idx": 8
|
| 976 |
+
},
|
| 977 |
+
{
|
| 978 |
+
"type": "text",
|
| 979 |
+
"text": "Nima Anari, Shayan Oveis Gharan, and Alireza Rezaei. Monte carlo markov chain algorithms for sampling strongly rayleigh distributions and determinantal point processes. In Proceedings of the 29th Conference on Learning Theory, COLT 2016, New York, USA, June 23-26, 2016, pp. 103–115, 2016. URL http: //jmlr.org/proceedings/papers/v49/anari16.html. ",
|
| 980 |
+
"bbox": [
|
| 981 |
+
173,
|
| 982 |
+
469,
|
| 983 |
+
825,
|
| 984 |
+
521
|
| 985 |
+
],
|
| 986 |
+
"page_idx": 8
|
| 987 |
+
},
|
| 988 |
+
{
|
| 989 |
+
"type": "text",
|
| 990 |
+
"text": "Rmi Bardenet and Adrien Hardy. Monte carlo with determinantal point processes. In arXiv preprint arXiv:arXiv:1605.00361, 2016. ",
|
| 991 |
+
"bbox": [
|
| 992 |
+
171,
|
| 993 |
+
531,
|
| 994 |
+
823,
|
| 995 |
+
558
|
| 996 |
+
],
|
| 997 |
+
"page_idx": 8
|
| 998 |
+
},
|
| 999 |
+
{
|
| 1000 |
+
"type": "text",
|
| 1001 |
+
"text": "James Bergstra and Yoshua Bengio. Random search for hyper-parameter optimization. Journal of Machine Learning Research, 13:281–305, 2012. ",
|
| 1002 |
+
"bbox": [
|
| 1003 |
+
169,
|
| 1004 |
+
568,
|
| 1005 |
+
823,
|
| 1006 |
+
594
|
| 1007 |
+
],
|
| 1008 |
+
"page_idx": 8
|
| 1009 |
+
},
|
| 1010 |
+
{
|
| 1011 |
+
"type": "text",
|
| 1012 |
+
"text": "James Bergstra, Remi Bardenet, Yoshua Bengio, and Balazs Kegl. Algorithms for hyper-parameter optimization. In Proc. of NIPS, 2011a. ",
|
| 1013 |
+
"bbox": [
|
| 1014 |
+
169,
|
| 1015 |
+
604,
|
| 1016 |
+
823,
|
| 1017 |
+
631
|
| 1018 |
+
],
|
| 1019 |
+
"page_idx": 8
|
| 1020 |
+
},
|
| 1021 |
+
{
|
| 1022 |
+
"type": "text",
|
| 1023 |
+
"text": "James Bergstra, Daniel Yamins, and David D Cox. Making a science of model search: Hyperparameter optimization in hundreds of dimensions for vision architectures. In Proceedings of the 30th International Conference on Machine Learning (ICML-13), pp. 115–123, 2013. ",
|
| 1024 |
+
"bbox": [
|
| 1025 |
+
173,
|
| 1026 |
+
641,
|
| 1027 |
+
823,
|
| 1028 |
+
680
|
| 1029 |
+
],
|
| 1030 |
+
"page_idx": 8
|
| 1031 |
+
},
|
| 1032 |
+
{
|
| 1033 |
+
"type": "text",
|
| 1034 |
+
"text": "James S Bergstra, Remi Bardenet, Yoshua Bengio, and Bal ´ azs K ´ egl. Algorithms for hyper-parameter optimiza-´ tion. In Advances in Neural Information Processing Systems, pp. 2546–2554, 2011b. ",
|
| 1035 |
+
"bbox": [
|
| 1036 |
+
169,
|
| 1037 |
+
690,
|
| 1038 |
+
821,
|
| 1039 |
+
717
|
| 1040 |
+
],
|
| 1041 |
+
"page_idx": 8
|
| 1042 |
+
},
|
| 1043 |
+
{
|
| 1044 |
+
"type": "text",
|
| 1045 |
+
"text": "Emile Contal, David Buffoni, Alexandre Robicquet, and Nicolas Vayatis. Parallel gaussian process optimization with upper confidence bound and pure exploration. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pp. 225–240. Springer, 2013. ",
|
| 1046 |
+
"bbox": [
|
| 1047 |
+
174,
|
| 1048 |
+
727,
|
| 1049 |
+
823,
|
| 1050 |
+
766
|
| 1051 |
+
],
|
| 1052 |
+
"page_idx": 8
|
| 1053 |
+
},
|
| 1054 |
+
{
|
| 1055 |
+
"type": "text",
|
| 1056 |
+
"text": "Thomas Desautels, Andreas Krause, and Joel W Burdick. Parallelizing exploration-exploitation tradeoffs in gaussian process bandit optimization. Journal of Machine Learning Research, 15(1):3873–3923, 2014. ",
|
| 1057 |
+
"bbox": [
|
| 1058 |
+
173,
|
| 1059 |
+
775,
|
| 1060 |
+
823,
|
| 1061 |
+
801
|
| 1062 |
+
],
|
| 1063 |
+
"page_idx": 8
|
| 1064 |
+
},
|
| 1065 |
+
{
|
| 1066 |
+
"type": "text",
|
| 1067 |
+
"text": "Luc Devroye, Laszl ´ o Gy ´ orfi, and G ¨ abor Lugosi. ´ A probabilistic theory of pattern recognition, volume 31. Springer Science & Business Media, 2013. ",
|
| 1068 |
+
"bbox": [
|
| 1069 |
+
174,
|
| 1070 |
+
811,
|
| 1071 |
+
821,
|
| 1072 |
+
838
|
| 1073 |
+
],
|
| 1074 |
+
"page_idx": 8
|
| 1075 |
+
},
|
| 1076 |
+
{
|
| 1077 |
+
"type": "text",
|
| 1078 |
+
"text": "Javier Gonzalez, Zhenwen Dai, Philipp Hennig, and Neil Lawrence. Batch bayesian optimization via local ´ penalization. In Artificial Intelligence and Statistics, pp. 648–657, 2016. ",
|
| 1079 |
+
"bbox": [
|
| 1080 |
+
174,
|
| 1081 |
+
848,
|
| 1082 |
+
823,
|
| 1083 |
+
875
|
| 1084 |
+
],
|
| 1085 |
+
"page_idx": 8
|
| 1086 |
+
},
|
| 1087 |
+
{
|
| 1088 |
+
"type": "text",
|
| 1089 |
+
"text": "Maria Rita Iaco. Low discrepancy sequences: Theory and applications. \\` arXiv preprint arXiv:1502.04897, 2015. ",
|
| 1090 |
+
"bbox": [
|
| 1091 |
+
171,
|
| 1092 |
+
104,
|
| 1093 |
+
823,
|
| 1094 |
+
131
|
| 1095 |
+
],
|
| 1096 |
+
"page_idx": 9
|
| 1097 |
+
},
|
| 1098 |
+
{
|
| 1099 |
+
"type": "text",
|
| 1100 |
+
"text": "Tarun Kathuria, Amit Deshpande, and Pushmeet Kohli. Batched gaussian process bandit optimization via determinantal point processes. In Advances in Neural Information Processing Systems, pp. 4206–4214, 2016. ",
|
| 1101 |
+
"bbox": [
|
| 1102 |
+
174,
|
| 1103 |
+
140,
|
| 1104 |
+
823,
|
| 1105 |
+
178
|
| 1106 |
+
],
|
| 1107 |
+
"page_idx": 9
|
| 1108 |
+
},
|
| 1109 |
+
{
|
| 1110 |
+
"type": "text",
|
| 1111 |
+
"text": "Yoon Kim. Convolutional neural networks for sentence classification. EMNLP 2014, 2014. ",
|
| 1112 |
+
"bbox": [
|
| 1113 |
+
173,
|
| 1114 |
+
188,
|
| 1115 |
+
712,
|
| 1116 |
+
202
|
| 1117 |
+
],
|
| 1118 |
+
"page_idx": 9
|
| 1119 |
+
},
|
| 1120 |
+
{
|
| 1121 |
+
"type": "text",
|
| 1122 |
+
"text": "Brent Komer, James Bergstra, and Chris Eliasmith. Hyperopt-sklearn: automatic hyperparameter configuration for scikit-learn. In ICML workshop on AutoML. Citeseer, 2014. ",
|
| 1123 |
+
"bbox": [
|
| 1124 |
+
173,
|
| 1125 |
+
210,
|
| 1126 |
+
823,
|
| 1127 |
+
237
|
| 1128 |
+
],
|
| 1129 |
+
"page_idx": 9
|
| 1130 |
+
},
|
| 1131 |
+
{
|
| 1132 |
+
"type": "text",
|
| 1133 |
+
"text": "Alex Kulesza, Ben Taskar, et al. Determinantal point processes for machine learning. Foundations and Trend $\\textsuperscript { \\textregistered }$ in Machine Learning, 5(2–3):123–286, 2012. ",
|
| 1134 |
+
"bbox": [
|
| 1135 |
+
173,
|
| 1136 |
+
244,
|
| 1137 |
+
823,
|
| 1138 |
+
272
|
| 1139 |
+
],
|
| 1140 |
+
"page_idx": 9
|
| 1141 |
+
},
|
| 1142 |
+
{
|
| 1143 |
+
"type": "text",
|
| 1144 |
+
"text": "Lisha Li, Kevin Jamieson, Giulia DeSalvo, Afshin Rostamizadeh, and Ameet Talwalkar. Hyperband: Banditbased configuration evaluation for hyperparameter optimization. Proc. of ICLR, 17, 2017. ",
|
| 1145 |
+
"bbox": [
|
| 1146 |
+
171,
|
| 1147 |
+
280,
|
| 1148 |
+
821,
|
| 1149 |
+
308
|
| 1150 |
+
],
|
| 1151 |
+
"page_idx": 9
|
| 1152 |
+
},
|
| 1153 |
+
{
|
| 1154 |
+
"type": "text",
|
| 1155 |
+
"text": "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. ",
|
| 1156 |
+
"bbox": [
|
| 1157 |
+
173,
|
| 1158 |
+
315,
|
| 1159 |
+
823,
|
| 1160 |
+
354
|
| 1161 |
+
],
|
| 1162 |
+
"page_idx": 9
|
| 1163 |
+
},
|
| 1164 |
+
{
|
| 1165 |
+
"type": "text",
|
| 1166 |
+
"text": "Jasper Snoek, Hugo Larochelle, and Ryan P Adams. Practical bayesian optimization of machine learning algorithms. In Advances in neural information processing systems, pp. 2951–2959, 2012. ",
|
| 1167 |
+
"bbox": [
|
| 1168 |
+
174,
|
| 1169 |
+
363,
|
| 1170 |
+
821,
|
| 1171 |
+
390
|
| 1172 |
+
],
|
| 1173 |
+
"page_idx": 9
|
| 1174 |
+
},
|
| 1175 |
+
{
|
| 1176 |
+
"type": "text",
|
| 1177 |
+
"text": "Il’ya Meerovich Sobol’. On the distribution of points in a cube and the approximate evaluation of integrals. Zhurnal Vychislitel’noi Matematiki i Matematicheskoi Fiziki, 7(4):784–802, 1967. ",
|
| 1178 |
+
"bbox": [
|
| 1179 |
+
176,
|
| 1180 |
+
398,
|
| 1181 |
+
823,
|
| 1182 |
+
425
|
| 1183 |
+
],
|
| 1184 |
+
"page_idx": 9
|
| 1185 |
+
},
|
| 1186 |
+
{
|
| 1187 |
+
"type": "text",
|
| 1188 |
+
"text": "Richard Socher, Alex Perelygin, Jean Y Wu, Jason Chuang, Christopher D Manning, Andrew Y Ng, Christopher Potts, et al. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the conference on empirical methods in natural language processing (EMNLP), volume 1631, pp. 1642. Citeseer, 2013. ",
|
| 1189 |
+
"bbox": [
|
| 1190 |
+
174,
|
| 1191 |
+
433,
|
| 1192 |
+
825,
|
| 1193 |
+
486
|
| 1194 |
+
],
|
| 1195 |
+
"page_idx": 9
|
| 1196 |
+
},
|
| 1197 |
+
{
|
| 1198 |
+
"type": "text",
|
| 1199 |
+
"text": "Kevin Swersky, Jasper Snoek, and Ryan Prescott Adams. Freeze-thaw bayesian optimization. arXiv preprint arXiv:1406.3896, 2014. ",
|
| 1200 |
+
"bbox": [
|
| 1201 |
+
171,
|
| 1202 |
+
493,
|
| 1203 |
+
823,
|
| 1204 |
+
521
|
| 1205 |
+
],
|
| 1206 |
+
"page_idx": 9
|
| 1207 |
+
},
|
| 1208 |
+
{
|
| 1209 |
+
"type": "text",
|
| 1210 |
+
"text": "Zi Wang, Chengtao Li, Stefanie Jegelka, and Pushmeet Kohli. Batched high-dimensional bayesian optimization via structural kernel learning. In International Conference on Machine Learning (ICML), 2017. ",
|
| 1211 |
+
"bbox": [
|
| 1212 |
+
173,
|
| 1213 |
+
529,
|
| 1214 |
+
823,
|
| 1215 |
+
556
|
| 1216 |
+
],
|
| 1217 |
+
"page_idx": 9
|
| 1218 |
+
},
|
| 1219 |
+
{
|
| 1220 |
+
"type": "text",
|
| 1221 |
+
"text": "Ye Zhang and Byron Wallace. A sensitivity analysis of (and practitioners’ guide to) convolutional neural networks for sentence classification. arXiv preprint arXiv:1510.03820, 2015. ",
|
| 1222 |
+
"bbox": [
|
| 1223 |
+
173,
|
| 1224 |
+
564,
|
| 1225 |
+
823,
|
| 1226 |
+
592
|
| 1227 |
+
],
|
| 1228 |
+
"page_idx": 9
|
| 1229 |
+
},
|
| 1230 |
+
{
|
| 1231 |
+
"type": "text",
|
| 1232 |
+
"text": "Barret Zoph and Quoc V Le. Neural architecture search with reinforcement learning. arXiv preprint arXiv:1611.01578, 2016. ",
|
| 1233 |
+
"bbox": [
|
| 1234 |
+
173,
|
| 1235 |
+
599,
|
| 1236 |
+
823,
|
| 1237 |
+
627
|
| 1238 |
+
],
|
| 1239 |
+
"page_idx": 9
|
| 1240 |
+
}
|
| 1241 |
+
]
|
parse/train/HyBbjW-RW/HyBbjW-RW_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/HyBbjW-RW/HyBbjW-RW_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/rC8sJ4i6kaH/rC8sJ4i6kaH.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/rC8sJ4i6kaH/rC8sJ4i6kaH_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/rC8sJ4i6kaH/rC8sJ4i6kaH_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/rC8sJ4i6kaH/rC8sJ4i6kaH_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/rJeIGkBKPS/rJeIGkBKPS.md
ADDED
|
@@ -0,0 +1,293 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# IMPROVING CONFIDENT-CLASSIFIERS FOR OUT-OFDISTRIBUTION DETECTION
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Discriminatively trained neural classifiers can be trusted, only when the input data comes from the training distribution (in-distribution). Therefore, detecting outof-distribution (OOD) samples is very important to avoid classification errors. In the context of OOD detection for image classification, one of the recent approaches proposes training a classifier called “confident-classifier” by minimizing the standard cross-entropy loss on in-distribution samples and minimizing the KL divergence between the predictive distribution of OOD samples in the low-density “boundary” of in-distribution and the uniform distribution (maximizing the entropy of the outputs). Thus, the samples could be detected as OOD if they have low confidence or high entropy. In this paper, we analyze this setting both theoretically and experimentally. We also propose a novel algorithm to generate the “boundary” OOD samples to train a classifier with an explicit “reject” class for OOD samples. We compare our approach against several recent classifier-based OOD detectors including the confident-classifiers on MNIST and Fashion-MNIST datasets. Overall the proposed approach consistently performs better than others across most of the experiments.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Discriminatively trained deep neural networks have achieved state of the art results in many classification tasks such as speech recognition, image classification, and object detection. This has resulted in deployment of these models in real life applications where safety is paramount (e.g., autonomous driving). However, recent progress has shown that deep neural network (DNN) classifiers make overconfident predictions even when the input does not belong to any of the known classes (Nguyen et al. (2015)). This follows from the design of DNN classifiers that are optimized over in-distribution data without the knowledge of OOD data. The resulting decision boundaries are typically “unbounded/open” as shown in Figure 1a resulting in over-generalization (Spigler (2019), Scheirer et al. (2012)).
|
| 12 |
+
|
| 13 |
+
There have been many approaches proposed to address this problem under the umbrella of OOD detection1. Lee et al. (2018a) propose to explicitly train a classifier using the OOD samples generated by a GAN (Goodfellow et al. (2014a)). They empirically try to show that, for effective OOD detection, the generated OOD samples should follow and be close to the low-density boundaries of in-distribution, and the proposed GAN training indeed tries to do that. A multi-class softmax DNN classifier is trained with in-distribution samples to minimize the standard cross-entropy loss (minimizing the output entropy) and the generated OOD samples are trained to minimize a KL loss that forces the classifier’s predictive distribution to follow a uniform one (maximizing the output entropy). The resulting classifier is called a “confident-classifier”. One can then classify a sample as being in or out-of distribution based on the maximum prediction probability or the entropy of the output. Sricharan & Srivastava (2018) also follow a similar approach with slight modifications.
|
| 14 |
+
|
| 15 |
+
Contribution. One of the key assumptions in Lee et al. (2018a) and Sricharan & Srivastava (2018) is that the effect of maximizing the entropy for OOD samples close to the low-density boundaries of in-distribution might also propagate to samples that are far away from in-distribution. This training is expected to result in “bounded/closed” regions in input space with lower entropy over the in-distribution, and the rest of the region (corresponding to OOD), with higher entropy. The ideal decision boundary in such a scenario would be as shown in Figure 1b. We find that even though such a solution exists, the proposed training algorithm is unlikely to reach it. We justify this both theoretically and experimentally for a ReLU network (network with ReLU activation units) that was indeed used in Lee et al. (2018a). Assuming training with OOD samples close to the in-distribution boundary, we find that having an explicit reject class for OOD samples results in a solution close to the one depicted in Figure 1b. Therefore we propose to use such a classifier instead. We give intuitive arguments to justify the proposal. This forms the first key contribution of our paper.
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Figure 1: Figure shows how the decision boundaries would change and become more bounded when a typical classifier is trained with an auxiliary (“reject”) class containing OOD samples. (a) The unbounded decision boundaries of a typical 4-class classifier. Digit 9 is incorrectly classified as digit 2 with very high confidence. (b) A 5-class classifier trained with OOD samples $\mathbf { \epsilon } \cdot \mathbf { \gamma } _ { \mathbf { X } } \mathbf { \epsilon } )$ that are close to in-distribution and form the fifth (“reject���) class, resulting in bounded decision boundaries. Digit 9 is correctly classified as belonging to the “reject” (OOD) class.
|
| 19 |
+
|
| 20 |
+
Moreover, with toy experiments (refer to section D in appendix) on low-dimensional synthetic data, we analyze if GAN can indeed produce samples that can follow the low-density boundaries of indistribution. We find that, even though GAN produces samples close to the low-density boundaries of in-distribution, it is unable to cover the whole boundary, thus resulting in a sub-optimal OOD detector when trained on such samples. We therefore propose a novel algorithm to generate “boundary” OOD samples using a manifold learning network, (e.g., variational auto-encoder (VAE)) and show that the generated samples are diverse and cover the in-distribution boundaries better than the method proposed in Lee et al. (2018a). The resulting classifier trained with those samples improves the OOD detection results. This forms the second key contribution of our paper.
|
| 21 |
+
|
| 22 |
+
# 2 BACKGROUND
|
| 23 |
+
|
| 24 |
+
Lee et al. (2018a) propose a joint training of GAN and a classifier based on the following objective:
|
| 25 |
+
|
| 26 |
+
$$
|
| 27 |
+
\begin{array} { r l } & { \underset { G } { \mathop { \operatorname* { m i n } } } \underset { D } { \mathop { \operatorname* { m a x } } } \underset { \theta } { \underbrace { \operatorname* { m i n } } } \underbrace { { \mathbb { E } } _ { P _ { i n } ( \hat { x } , \hat { y } ) } [ - \log P _ { \theta } ( y = \hat { y } | \hat { x } ) ] } _ { ( \mathrm { a } ) } + \beta \underbrace { { \mathbb { E } } _ { P _ { G } ( x ) } [ \mathrm { K L } ( \mathcal { U } ( y ) | | P _ { \theta } ( y | x ) ) ] } _ { ( \mathrm { b } ) } } \\ & { \qquad + \underbrace { { \mathbb { E } } _ { P _ { i n } ( x ) } [ \log D ( x ) ] + { \mathbb { E } } _ { P _ { G } ( x ) } [ \log ( 1 - D ( x ) ) ] } _ { ( \mathrm { c } ) } } \end{array}
|
| 28 |
+
$$
|
| 29 |
+
|
| 30 |
+
where $( \mathsf { b } ) { + } ( \mathsf { c } )$ is the modified GAN loss and $\mathrm { ( a ) } { + } \mathrm { ( b ) }$ is the classifier loss $\boldsymbol { \theta }$ is the classifier’s parameter) called the confidence loss. The difference from the regular GAN objective is the additional KL loss in (1), which when combined with the original loss, forces the generator to generate samples in the low-density boundaries of the in-distribution $( P _ { i n } ( x ) )$ space. $\beta$ is a hyper-parameter that controls how close the OOD samples are to the in-distribution boundary. For the classifier, the KL loss pushes the OOD samples generated by GAN to produce a uniform distribution at the output, and therefore have higher entropy. This enables one to detect OOD samples based on the entropy or the confidence at the output of the classifier.
|
| 31 |
+
|
| 32 |
+
# 3 WHY MINIMIZING CONFIDENCE LOSS IS INSUFFICIENT FOR OOD DETECTION
|
| 33 |
+
|
| 34 |
+
Let $f : \mathbb { R } ^ { d } \mathbb { R } ^ { K }$ be the neural network function that maps input in $\mathbb { R } ^ { d }$ to $K$ output classes (input to the softmax layer). Let $f _ { k } : \mathbb { R } ^ { d } \mathbb { R }$ be the function that maps the input to output for a specific class $k \in \{ 1 , 2 , 3 . . . K \}$ . For a neural network with affine activations (e.g., ReLU and Leaky ReLU), each $f _ { k }$ is a continuous piece-wise affine function over a finite set of polytopes, $\{ Q _ { 1 } , Q _ { 2 } , \dot { \cdots } , Q _ { M } \}$ such that $\textstyle \mathbb { R } ^ { d } = \bigcup _ { l = 1 } ^ { M } Q _ { l }$ , as described in Croce & Hein (2018). This means that each $f _ { k }$ is affine within each $Q _ { l }$ $( l \in \{ 1 , 2 , 3 . . . M \} )$ . If the input space is $\mathbb { R } ^ { d }$ , some of these polytopes stretch to infinity (grow without bounds). Let $Q _ { l } ^ { \infty } \equiv Q _ { l }$ denote these “infinity polytopes”. The choice of the neural network structure and the weights define $f _ { k }$ ’s. Figure 2a illustrates these polytopes and $f _ { k }$ ’s for a simple 3-class ReLU classifier, where the input space is $\mathbb { R }$ . In this example, there are 4 polytopes in which $Q _ { 1 } ^ { \infty }$ and $Q _ { 4 } ^ { \infty }$ stretch to infinity.
|
| 35 |
+
|
| 36 |
+

|
| 37 |
+
Figure 2: $f _ { k }$ ’s and $Q _ { r }$ ’s for an example 3-class ReLU classifier where the input $x \in \mathbb { R }$ . $Q _ { 1 } ^ { \infty }$ and $Q _ { 4 } ^ { \infty }$ are infinity polytopes. (a) For sufficiently large (small) $x$ , there is a unique $k ^ { * } = 1$ in $Q _ { 4 } ^ { \infty }$ $k ^ { * } = 1$ in $Q _ { 1 } ^ { \infty }$ ). (b) For sufficiently large $x$ , there are multiple $k ^ { * }$ ’s in $Q _ { 4 } ^ { \infty }$ $( k ^ { * } = \{ 2 , 3 \}$ ). For sufficiently small $x$ , there is a unique $k ^ { * } = 3$ in $Q _ { 1 } ^ { \infty }$ .
|
| 38 |
+
|
| 39 |
+
Hein et al. (2019) mathematically show that a ReLU classifier (with softmax output) produces arbitrarily high confidence predictions (approaching 1) far away from the training data in almost all directions on an unbounded input space. This happens over $Q _ { l } ^ { \infty }$ ’s. Their results are summarized as follows.
|
| 40 |
+
|
| 41 |
+
For any $\pmb { x } \in \mathbb { R } ^ { d }$ , there exists a $\beta _ { l } ~ > ~ 0$ such that for all $\alpha _ { l } ~ \ge ~ \beta _ { l }$ , $\alpha _ { l } \pmb { x } \in Q _ { l } ^ { \infty }$ . Let $f _ { k } ^ { l } ( { \pmb x } ) =$ $\langle \pmb { v } _ { k } ^ { l } , \pmb { x } \rangle + a _ { k } ^ { l }$ be the piece-wise affine function for class $k$ over $Q _ { l }$ . Let $k ^ { * } = \arg \operatorname* { m a x } _ { k } \langle \pmb { v } _ { k } ^ { l } , \beta _ { l } \pmb { x } \rangle ^ { 2 }$ . Then, as $\alpha _ { l } \infty$ , the confidence for input $\alpha \boldsymbol { l } ^ { \mathbf { \mathcal { X } } }$ for class $k ^ { * }$ becomes arbitrarily high if $k ^ { * }$ is unique. i.e,
|
| 42 |
+
|
| 43 |
+
$$
|
| 44 |
+
\operatorname* { l i m } _ { \alpha _ { l } \to \infty } { \frac { e ^ { f _ { k ^ { * } } \left( \alpha _ { l } \pmb x \right) } } { \sum _ { l = 1 } ^ { K } e ^ { f _ { l } \left( \alpha _ { l } \pmb x \right) } } } = 1
|
| 45 |
+
$$
|
| 46 |
+
|
| 47 |
+
But if there are multiple $k ^ { * }$ ’s, arbitrarily large confidence values cannot be obtained far away from the in-distribution in the direction of $x$ . For instance, as shown in Figure $2 { \mathbf { b } } ^ { 3 }$ , for $Q _ { 4 } ^ { \infty }$ , $k ^ { * } =$ $\{ 2 , 3 \}$ and therefore arbitrarily high confidence predictions cannot be achieved as $\alpha _ { l } \infty$ . Having multiple $k ^ { * }$ ’s for every $Q _ { l } ^ { \infty }$ is highly unlikely, given that we are dealing with floating point numbers and also that it is not explicitly enforced during training. Therefore, arbitrarily high confidence values far away from the in-distribution are likely inevitable.
|
| 48 |
+
|
| 49 |
+
The above analysis is for the case where the input domain is unbounded $( R ^ { d } )$ . For bounded domains (for example, $[ \bar { 0 } , 1 ] ^ { d }$ for images), as pointed out in Hein et al. (2019), since we cannot let $\alpha _ { l } \to \infty$ , the above analysis cannot be directly applied to get arbitrary high confidence values. However the above technique in principle can be applied to increase the prediction confidence for samples far away from the in-distribution. Hein et al. (2019) conduct experiments to support the claim. The theoretical analysis of which can be done as follows. Let $\bar { \mathbb Z } ^ { d }$ represent the bounded input domain. Similar to the unbounded case, let $Q _ { l } ^ { \infty }$ denote “infinity polytopes” that stretch till the bounds of the input domain $\mathbb { Z } ^ { d }$ . For any $\pmb { x } \in \mathbb { Z } ^ { d }$ , there exists a $\beta _ { l } > 0$ such that for all $\alpha _ { l } \geq \beta _ { l }$ , $\alpha _ { l } \pmb { x } \in Q _ { l } ^ { \infty }$ . Let $\bar { f } _ { k } ^ { l } ( { \pmb x } ) = \langle { \pmb v } _ { k } ^ { l } , { \pmb x } \rangle + a _ { k } ^ { l }$ be the piece-wise affine function for class $k$ over $Q _ { l }$ . Let $k ^ { * } =$ arg $\operatorname* { m a x } _ { k } \langle \pmb { v } _ { k } ^ { l } , \beta _ { l } \pmb { x } \rangle$ . Then, as $\alpha _ { l }$ increases, the confidence for input $\alpha \boldsymbol { l } \mathbf { x }$ for class $k ^ { * }$ keeps increasing until the bounds of the domain is reached if $k ^ { * }$ is unique. If $f _ { k ^ { * } } ( \beta _ { l } x ) \ > > \ f _ { k } ( \beta _ { l } x ) \ \forall k \ \ne \ k ^ { * }$ (ignoring the effect of bias term for simplicity), the confidence for input $\alpha _ { l } x$ for the class $k ^ { * }$ is very high. Therefore, even for the case of bounded input space, one can obtain confidence predictions for OOD samples high enough for it to be considered as in-distribution samples.
|
| 50 |
+
|
| 51 |
+
Corollary. The higher the confidence of the output, the lower is the entropy. Hence a direct corollary of Hein et al. (2019)’s result is that the entropy of the classifier output for data far away from the in-distribution data in all directions would almost always be arbitrarily low (approaching 0) like the in-distribution samples. This makes it almost impossible to detect OOD samples based on the confidence or the entropy of the classifier outputs. For the case of bounded input domain, as one can increase the prediction confidence for OOD samples far from the in-distribution, the entropy of classifier output also decreases making those OOD samples to be classified as in-distribution samples. Therefore, the approaches in Lee et al. (2018a) and Sricharan & Srivastava (2018) would not be applicable.
|
| 52 |
+
|
| 53 |
+
# 4 ADDING AN EXPLICIT “REJECT” CLASS
|
| 54 |
+
|
| 55 |
+
When OOD samples are generated close to the in-distribution and follow its low-density boundaries as proposed in Lee et al. (2018a) and Sricharan & Srivastava (2018), we recommend adding an explicit reject class for OOD samples instead of minimizing the loss in Eq.1(b). Let the resulting classifier be called the reject-classifier. By adding an explicit reject class, our goal is to obtain a decision boundary close to the ideal decision boundary shown in Figure.1b, where the decision boundary of a $K + 1$ classifier divides the input space into regions such that the in-distribution region is classified as one of the first $K$ classes and the rest of the region as the $K + 1 ^ { t h }$ class, i.e., the reject class. The intuition on how such a decision boundary can be obtained is as follows. The arbitrarily high confidence predictions happen in polytopes that stretch to infinity (or stretch till the bounds of input space in case of bounded input space). Each of the “infinity polytopes” has its own class (or classes), $k ^ { * } ( \mathrm { o r } k ^ { * } \mathrm { s } )$ where high confidence predictions occur. If adding an explicit “reject” class results in $k ^ { * } =$ reject-class for all the “infinity polytopes” (i.e there is only one $k ^ { * }$ ), the arbitrarily high confidence predictions would only happen at the reject class for OOD samples far-off from training data. Therefore, these samples will be detected as OOD. We argue that in reject-classifier training, since we explicitly maximize the prediction confidence of $K \bar { + } 1 ^ { t h }$ -class for boundary OOD samples, we expect the same effect to persist for OOD samples far from the in-distribution as well (i.e., $k ^ { * } = K + 1$ ) resulting in close to ideal decision boundaries depicted in Figure.1b. This claim is supported by our experiments on a toy dataset (Figure. 5) and the superior performance of the reject-classifier over the confident-classifier on MNIST and Fashion MNIST datasets (Table. 1). Note that how close the resulting decision boundary of the reject-classifier is to the ideal one depends on how well the OOD samples follow the in-distribution boundary. We find that the method proposed in Lee et al. (2018a) to generate boundary OOD samples is not diverse enough as evidenced by experiments shown in the appendix (Section. D). Therefore we propose a novel approach for boundary OOD sample generation which is described in the next section that results in better boundary OOD samples that cover the in-distribution boundary quite effectively. This evident from our experiments described in the appendix (Section. D).
|
| 56 |
+
|
| 57 |
+
Lee et al. (2018a) indeed experiment with adding an explicit reject class instead of using a confidentclassifier, but the results are found to be worse. But this is because instead of using the boundary OOD samples they use another natural image dataset called “seen OOD” similar to Hendrycks et al. (2019) to train the classifier. However for images, it is difficult to represent the entire OOD space with a small number of samples such methods may not perform that well. Moreover as pointed out in both Lee et al. (2018a) and Hendrycks et al. (2019), as these “seen OOD” samples aren’t diverse, when used to train a reject classifier they can overfit to these training OOD samples. However we use boundary OOD samples that can guide the decision boundary of the classifier to be bounded around the in-distribution regions as depicted in Figure. 1b
|
| 58 |
+
|
| 59 |
+
Note that both the reject-classifier and the confident-classifier use boundary OOD samples for training. The confident-classifier tries to equalize $f _ { k }$ ’s for boundary OOD samples (i.e., maximize the entropy of output predictions) and expect this to persist over OOD samples far from the in-distribution as well (i.e., have multiple $k ^ { * }$ ’s). The reject-classifier on the other hand maximizes the prediction confidence of $K + 1 ^ { t h }$ for boundary OOD samples and expects it to persists over OOD samples far from the in-distribution (i.e., have a single $k ^ { * }$ at $k = K + 1 ,$ ). confidence $f _ { k }$ . In the unbounded case, for a confident-classifier, while it is proven that one can almost always find arbitrarily high confidence regions far from the in-distribution, for a reject classifier we can still expect those OOD samples to be classified as belonging to the $K + 1 ^ { t h }$ class. In the bounded case too as shown previously, one can obtain decreasingly low entropy regions far from the in-distribution for the confident classifier whereas for the reject-classifier it is similar to the unbounded case. As evident from the experimental results in Figure. 5 we can indeed find OOD samples with low entropy for the confident-classifiers without stretching to infinity, whereas for the reject-classifier, all those OOD samples far away from the in-distribution are correctly classified as OOD. The results in Table. 1 further reinforces the superiority of the reject-classifier over the confident classifier.
|
| 60 |
+
|
| 61 |
+

|
| 62 |
+
Figure 3: Categories of OOD samples that we generate: (a) Type I (yellow), which includes samples that are close to the data but outside the in-distribution sub-manifolds, and (b) Type II (black), which includes samples that lie on the in-distribution sub-manifolds and trace the in-distribution boundary; in-distribution clusters are represented through blue and red points.
|
| 63 |
+
|
| 64 |
+
# 5 OUT-OF-DISTRIBUTION SAMPLE GENERATION
|
| 65 |
+
|
| 66 |
+
The proposed approach leverages the following generic assumptions (Cayton (2005), Narayanan & Mitter (2010), Rifai et al. (2011)) that hold true for a wide range of problems, primarily for image data, which is the data used to validate our approach.
|
| 67 |
+
|
| 68 |
+
The manifold hypothesis states that the higher dimensional real-world data in the input space is likely concentrated on a much lower-dimensional sub-manifold.
|
| 69 |
+
|
| 70 |
+
The multi-class manifold hypothesis states that, if data contains multiple classes, different classes correspond to disjoint sub-manifolds separated by low-density regions in the input space.
|
| 71 |
+
|
| 72 |
+
To fully cover the “boundary” of in-distribution, we identify two categories of OOD samples that are to be generated. As shown in Figure 3, Type I) are the OOD samples that are close but outside the in-distribution sub-manifolds; Type II) are the OOD samples that are on the sub-manifolds but close to the “boundary” of the in-distribution.
|
| 73 |
+
|
| 74 |
+
# 5.1 OOD SAMPLES OUTSIDE THE DATA MANIFOLD
|
| 75 |
+
|
| 76 |
+
These samples are obtained by adding small perturbations to in-distribution samples that are concentrated on the manifold. These perturbations should be added in directions such that the resulting samples should fall outside the manifold. The directions locally normal to the data-supporting manifold can be thought of as the directions that are less likely to contain in-distribution samples and the tangent directions as the more likely ones. Therefore we add perturbations in the normal directions to get OOD samples.
|
| 77 |
+
|
| 78 |
+
Deep generative models such as VAEs (Kingma & Welling, 2013) and GANs (Goodfellow et al., 2014b) can model the data manifold of observations $\pmb { x } \in X$ through corresponding latent variables $z \in Z$ via a mapping function $g : Z \to X$ as $x = g ( z )$ . With a choice of reasonably lower dimensional $_ { z }$ and a flexible generative function $g$ , the model can efficiently represent the true data manifold. Following the multi-class manifold hypothesis, we use a conditional generative model that is conditioned over the class labels. For our experiments, we use a conditional variational autoencoder (CVAE).
|
| 79 |
+
|
| 80 |
+

|
| 81 |
+
Figure 4: Generated OOD samples using the proposed method; Type I OOD samples typically modify the background pixels (normal components have the least variance), while Type II OOD samples modify the object pixels.
|
| 82 |
+
|
| 83 |
+
Let $h : X \to Z$ and $g : Z \to { \hat { X } }$ denote the encoder and decoder functions of CVAE respectively. The tangent space of the manifold at a point $\pmb { x } \in X$ is given by the column space of the Jacobian4
|
| 84 |
+
|
| 85 |
+
$$
|
| 86 |
+
J ( { \pmb x } ) = \frac { \partial g ( { \pmb z } ) } { \partial { \pmb z } } \bigg | _ { { \pmb z } = h ( { \pmb x } ) }
|
| 87 |
+
$$
|
| 88 |
+
|
| 89 |
+
Let ${ \cal N } ( { \pmb x } )$ denote the null-space of ${ \pmb J } ^ { T } ( { \pmb x } )$ (left null space of $\pmb { J } ( \pmb { x } ) )$ . Then the basis vectors of ${ \cal N } ( x )$ span the normal bundle of the manifold at $_ { \textbf { \em x } }$ . Let ${ \pmb v } ( { \pmb x } ) \sim { \pmb N } ( { \pmb x } )$ be a randomly sampled unit vector from ${ \cal N } ( { \pmb x } )$ , then the perturbed sample is given by,
|
| 90 |
+
|
| 91 |
+
$$
|
| 92 |
+
\tilde { \pmb { x } } = \pmb { x } + \beta \pmb { v } ( \pmb { x } )
|
| 93 |
+
$$
|
| 94 |
+
|
| 95 |
+
where $\beta \in \mathbb { R }$ is a hyper-parameter that controls how far the perturbed sample is from the indistribution point. In our experiments, we use a stochastic $\beta$ that is uniformly sampled from in the range [0.1, 1.0]. As discussed before, for better OOD detection, the boundary samples generated should be diverse; because the proposed approach generates OOD samples by randomly perturbing every in-distribution training sample, the diversity of the generated samples is ensured. This is visually apparent from the experimental results on a 3D-dataset shown in section D of appendix. Figure 4 illustrates the perturbed samples for MNIST and Fashion MNIST datasets. One can observe that the perturbations added mostly modify the background pixels than the object pixels. This is because the normal directions to the manifold mostly represent least variance components of the image.
|
| 96 |
+
|
| 97 |
+
# 5.2 OOD SAMPLES ON THE DATA MANIFOLD
|
| 98 |
+
|
| 99 |
+
These are the samples that are in the low-density regions of the input space but close to the indistribution boundaries on the manifold.
|
| 100 |
+
|
| 101 |
+
For a variational auto-encoder, the aggregate posterior $q ( z )$ (Makhzani et al., 2015) is given by,
|
| 102 |
+
|
| 103 |
+
$$
|
| 104 |
+
q ( z ) = \int _ { \pmb { x } } q ( \pmb { z } | \pmb { x } ) p _ { i n } ( \pmb { x } ) d z
|
| 105 |
+
$$
|
| 106 |
+
|
| 107 |
+
where $p _ { i n } ( { \pmb x } )$ is the probability density function of in-distribution and $q ( \pmb { z } / \pmb { x } )$ is the approximate posterior. Assuming a smooth decoder, the high-density regions in the aggregate posterior can be thought of as corresponding to densely populated regions in the input space, and the input space density would gradually decrease as we sample away from the high-density regions in the aggregate posterior. Therefore the in-distribution boundary on the manifold can be approximated by regions at a distance away from the high-density areas where the density dips below a certain threshold. For our experiments, we approximate $q ( z )$ with a uni-modal Gaussian distribution whose mean $\hat { \mu }$ and co-variance $\hat { \Sigma }$ are estimated using the encoder mappings of in-distribution samples. We use Mahalanobis distance as a criterion to determine the distance from the mean to sample and generate the required OOD samples. Let $r$ be the Mahalanobis distance from the mean of $q ( z )$ that encompasses $9 5 \%$ of the training data. The OOD samples are generated by decoding the uniformly sampled samples from the latent space over the surface of a hyper-ellipsoid (Rubinstein, 1982) defined by 5, where $\hat { \mu } _ { z }$ and $\hat { \Sigma } _ { z }$ are the mean and co-variance estimates of $q ( z )$ , respectively.
|
| 108 |
+
|
| 109 |
+
$$
|
| 110 |
+
( z - \hat { \mu } _ { z } ) ^ { T } \hat { \Sigma } _ { z } ^ { - 1 } ( z - \hat { \mu } _ { z } ) = r ^ { 2 }
|
| 111 |
+
$$
|
| 112 |
+
|
| 113 |
+
It is fair to assume a uni-modal Gaussian distribution for $q ( z )$ as we fit a Gaussian per class. Moreover, a substantial gain in the ODD detection results when the classifier is trained with these samples can also be taken as evidence pointing towards the validity of such an assumption.
|
| 114 |
+
|
| 115 |
+
The generated OOD samples described in 5.1 and 5.2 are then used to train an $n + 1$ class softmax classifier, where the $n + \mathbf { \hat { l } } ^ { t h }$ class represents the OOD class.
|
| 116 |
+
|
| 117 |
+
# 6 EXPERIMENTS
|
| 118 |
+
|
| 119 |
+
Experiments5 are divided into 2 sections; the first section explains the toy experiments on a lowdimensional dataset to support our theoretical analysis of the confident-classifier, the second section gives details of OOD detection experiments on MNIST and Fashion MNIST ((Xiao et al., 2017)) using the proposed method.
|
| 120 |
+
|
| 121 |
+
# 6.1 LIMITATIONS OF CONFIDENT-CLASSIFIERS
|
| 122 |
+
|
| 123 |
+
In these experiments, the input space is $\mathbb { R } ^ { 2 }$ and the in-distribution consists of 2-classes. The samples for each of these classes are generated by sampling from 2 Gaussians with identity co-variances and means (-10, 0) and (10, 0) respectively, on the Cartesian coordinates. Anything outside 3 standard deviations (Mahalanobis distance) from the in-distribution means is considered OOD. The architecture of the neural network used is similar to the one used in Lee et al. (2018a), which is a ReLU-classifier with 2 fully-connected hidden layers with 500 neurons each.
|
| 124 |
+
|
| 125 |
+
Following the case in Lee et al. (2018a), for training, OOD samples are generated close to the indistribution as shown in Figure 5a. For testing, OOD samples are uniformly sampled from a 2D box $[ - 5 0 , 5 0 ] ^ { 2 }$ excluding the in-distribution regions.
|
| 126 |
+
|
| 127 |
+

|
| 128 |
+
Figure 5: Plots for boundary OOD samples experiments. (a) Training data in 2D. (b) Maximum prediction output on test data for a confident-classifier. (c) Classification output of a classifier with a “reject” class on test data $\mathrm { T C } =$ true class, $\mathbf { P C = }$ predicted class).
|
| 129 |
+
|
| 130 |
+
From Figure 5b, we observe that the ReLU-classifier trained to optimize confidence loss results in highly confident predictions for many OOD samples far from the in-distribution data. This renders the classifier ineffective at classifying the in and out of distribution samples based on the maximum prediction score (confidence) or the entropy of the output. However, from Figure 5c, for a classifier trained with explicit reject class, the test OOD samples are indeed classified as OOD. This supports the aforementioned intuitions in 4.
|
| 131 |
+
|
| 132 |
+
Note that these are not the results specific to a certain architecture of the neural network. Experiments with different hyper-parameters such as the number of hidden neurons, changing input dimensions, using sigmoid activation functions instead of ReLU lead to similar results. We remark however that for sigmoid networks, the results were not as extreme (in terms of the number of OOD samples with high-confidence) as for ReLU networks. This is understandable because sigmoid activation outputs will not produce arbitrarily large values, unlike the ReLU counterparts.
|
| 133 |
+
|
| 134 |
+
# 6.2 MNIST AND FASHION MNIST EXPERIMENTS
|
| 135 |
+
|
| 136 |
+
We validated our approach on MNIST and Fashion MNIST as in-distribution datasets and several other OOD datasets. For all MNIST as in-distribution experiments, we use a CVAE with a latent dimension of 8, and for Fashion MNIST, the latent dimension is set to 10. We compare our approach against the recent classifier-based OOD detectors such as confident-classifier, ODIN and Mahalanobis distance-based approach without feature ensemble $( \mathrm { M D } ) ^ { 6 }$ . The architecture for both CVAE and the classifier used are shown in the appendix. Both the networks are trained till convergence.
|
| 137 |
+
|
| 138 |
+
# 6.2.1 OOD DATASETS
|
| 139 |
+
|
| 140 |
+
MNIST is used as an OOD dataset for Fashion MNIST as in-distribution, and vice-versa. For MNIST 0-4 experiment, we use images in class 0 through 4 as in-distribution and class 5 through 9 as OOD. We use both character datasets and noise generated images as OOD datasets. The character datasets are Omniglot (Lake et al., 2015), EMNIST-letters (Cohen et al., 2017) and NotMNIST (Bulatov, 2011). The noise generated images are described below.
|
| 141 |
+
|
| 142 |
+
Gaussian noise includes gray-scale images, where each pixel is sampled from an independent normal distribution with 0.5 mean and unit-variance.
|
| 143 |
+
|
| 144 |
+
Uniform noise includes gray-scale images where each pixel is sampled from an independent uniform distribution in the range $[ 0 , 1 ]$ .
|
| 145 |
+
|
| 146 |
+
Sphere OOD contains images sampled from the surface of a 784 dimensional hyper-sphere centered at the origin with a radius equal to the maximum Euclidean distance of in-distribution samples from the origin and reshaped to $2 8 \times 2 8$ . This is used to show the effectiveness of our approach not only on the datasets that are restricted to a finite range such as $[ 0 , 1 ] ^ { d }$ for images in $[ 0 , \dot { 1 } ] ^ { d }$ but also for a general case of $\mathbb { R } ^ { d }$ .
|
| 147 |
+
|
| 148 |
+
# 6.2.2 EVALUATION METRICS FOR OOD DETECTION
|
| 149 |
+
|
| 150 |
+
We experimented with two different metrics as OOD score to determine if the given input sample is in or out of distribution. OOD class probability is the $n + 1 ^ { t h }$ class prediction probability. Indistribution max probability is the maximum prediction probabilities of the in-distribution classes. A higher (lower) OOD class probability (in-distribution max probability) indicates a higher probability of a sample being OOD. Except for MNIST 0-4 experiments, we find that the former metric gives the best results. We report only the best score in Table 1. We use the area under the ROC curve (AUROC↑), the area under the precision-recall curve (AUPR↑), the false positive rate at $9 5 \%$ true positive rate (FPR95↓) and the detection error as the metrics for evaluation. These metrics are commonly used for evaluating OOD detection methods (Lee et al., 2018a; Hendrycks et al., 2019). The details of which are in the appendix.
|
| 151 |
+
|
| 152 |
+
# 6.2.3 DETECTION RESULTS
|
| 153 |
+
|
| 154 |
+
Table 1 compares our approach with other approaches for experiments on MNIST and Fashion MNIST as in-distribution datasets. Since the classifier is trained with OOD samples, there is a possibility of reduction in the classification accuracy of in-distribution classes in comparison to training without OOD class. We therefore report classification accuracy of a classifier trained with and without OOD samples. We find that there is no significant change in accuracy. Training our method requires tuning hyper-parameter such as $\beta$ from Eq. 4, OOD class weight, and learning rate. The hyper-parameters were chosen based on the in-distribution classification accuracy and the AUROC of the validation generated OOD samples and the random noise datasets. For all our experiments we use a stochastic $\beta$ uniformly sampled in the range [0.1, 1], OOD class weight is set to 0.1, while the weights for the rest of the classes is set to 1.0, and Adadelta (Zeiler, 2012) is the optimizer used with learning rates of 0.1 and 0.01 for Fashion-MNIST and MNIST experiments, respectively. We do not tune the hyper parameters per OOD dataset unlike ODIN and Mahalanobis distance-based approaches, where the perturbation magnitude is tuned per OOD dataset. Even without this advantage, our method still performs better than these baselines for most of the OOD datasets.
|
| 155 |
+
|
| 156 |
+
Table 1: OOD detection results
|
| 157 |
+
|
| 158 |
+
<table><tr><td rowspan="2">ID Model (acc before OOD/ acc after OOD)</td><td rowspan="2">OOD</td><td>FPR at 95% TPR↓</td><td>Detection Error↓</td><td>AUROC↑</td><td>AUPR Out↑</td><td>AUPR In↑</td></tr><tr><td colspan="6">Ours/Confident-Classifier/ODIN/MD</td></tr><tr><td rowspan="6">MNIST (99.0/98.9)</td><td>F-MNIST EMNIST-letters</td><td>0.0/7.9/0.4/94.2 1.6/31.0/25.7/31.2</td><td>0.2/5.6/1.8/11.9 3.0/13.2/11.7/13.6</td><td>100.0/98.5/99.8/86.6 99.6/93.0/94.4/93.2</td><td>100.0/98.8/99.8/92.0 99.6/93.0/94.3/92.7</td><td>100.0/98.4/99.8/74.0 99.6/92.4/94.1/93.2</td></tr><tr><td>NotMNIST</td><td>0.0/26.5/11.3/34.8</td><td>0.0/12.3/6.9/16.3</td><td>100.0/94.0/97.8/91.7</td><td>100.0/93.9/100.0/91.7</td><td>100.0/93.8/97.7/92.3</td></tr><tr><td>Omniglot</td><td>0.0/0.0/0.0/98.5</td><td>0.0/1.0/0.2/46.9 0.0/0.0/0.0/24.6</td><td>100.0/100.0/100.0/19.8 100.0/100.0/100.0/50.9</td><td>100.0/100.0/100.0/40.8 100.0/100.0/100.0/71.8</td><td>100.0/100.0/100.0/35.0</td></tr><tr><td>Gaussian-Noise</td><td>0.0/0.0/0.0/99.9 0.0/0.0/0.0/82.6</td><td>0.0/0.0/0.0/26.4</td><td>100.0/100.0/100.0/65.0</td><td>100.0/100.0/100.0/76.0</td><td>100.0/100.0/100.0/35.1</td></tr><tr><td>Uniform-Noise Sphere-OOD</td><td>0.0/21.6/0.0/80.4</td><td>0.1/6.6/1.4/14.9</td><td>100.0/96.8/99.8/87.6</td><td>100.0/97.8/99.9/91.7</td><td>100.0/100.0/100.0/63.9 100.0/95.2/99.8/79.9</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td rowspan="6">F-MNIST (91.9/91.2)</td><td>MNIST EMNIST-letters</td><td>4.1/87.4/70.2/2.4 6.4/87.3/83.5/10.1</td><td>4.2/36.3/28.9/3.6 5.4/41.8/13.6/7.3</td><td>98.7/67.0/76.7/99.5</td><td>98.2/65.2/73.2/99.5</td><td>100.0/64.8/77.3/99.4</td></tr><tr><td></td><td></td><td></td><td>97.9/61.1/66.6/98.1</td><td>96.8/60.0/62.0/98.3</td><td>98.5/61.6/66.6/98.1</td></tr><tr><td>NotMNIST</td><td>0.8/78.9/80.2/7.2</td><td>1.2/32.2/33.9/5.8 0.9/22.1/7.1/26.8</td><td>99.7/73.7/69.3/97.8</td><td>99.5/73.0/63.0/97.4</td><td>99.8/72.4/70.5/98.2</td></tr><tr><td>Omniglot</td><td>0.0/59.8/9.6/58.4</td><td>0.2/9.6/3.8/19.9</td><td>99.8/85.6/97.9/83.2 99.8/95.8/98.0/80.0</td><td>99.9/85.8/97.6/84.9</td><td>99.6/85.1/98.2/83.4</td></tr><tr><td>Gaussian-Noise Uniform-Noise</td><td>0.0/32.2/4.5/99.7 0.2/71.0/99.4/1.7</td><td>1.3/16.4/24.7/3.3</td><td>99.8/88.6/74.7/98.9</td><td>99.9/96.7/96.7/87.0 99.8/91.8/82.9/99.2</td><td>99.5/94.7/95.6/66.3</td></tr><tr><td>Sphere-OOD</td><td>0.6/99.3/100.0/0.0</td><td>0.8/50.0/50.0/0.0</td><td>99.7/29.6/0.25/100.0</td><td>99.4/39.1/30.7/100.0</td><td>99.8/82.9/61.6/97.9 99.8/37.4/30.7/100.0</td></tr><tr><td rowspan="8">MNIST0-4 (99.8/99.6)</td><td>MNIST5-9</td><td>17.2/21.9/20.4/50.0</td><td>10.0/12.0/11.5/14.4</td><td>95.1/92.9/93.4/92.3</td><td>94.0/92.1/91.3/93.8</td><td>94.9/93.6/94.2/90.1</td></tr><tr><td>F-MNIST</td><td>0.2/1.7/2.0/41.4</td><td>1.6/3.1/3.4/15.1</td><td>99.8/99.4/99.4/92.5</td><td>99.8/99.5/99.4/93.3</td><td>99.7/99.3/99.3/91.9</td></tr><tr><td>EMNIST-letters</td><td>2.7/22.1/26.4/12.9</td><td>3.8/12.4/13.9/7.6</td><td>99.2/92.9/92.3/96.9</td><td>99.3/92.0/90.4/96.6</td><td>99.1/93.6/93.2/97.1</td></tr><tr><td>NotMNIST</td><td>0.0/10.9/28.0/2.8</td><td>0.1/7.7/13.3/3.1</td><td>100.0/97.5/93.5/99.3</td><td>100.0/97.5/92.7/99.2</td><td>100.0/97.6/93.7/99.4</td></tr><tr><td>Omniglot</td><td>0.0/0.0/2.3/0.0</td><td>0.0/0.1/3.6/0.4</td><td>100.0/100.0/99.1/100.0</td><td>100.0/100.0/99.3/100.0</td><td>100.0/100.0/98.8/100.0</td></tr><tr><td>Gaussian-Noise</td><td>0.0/0.0/0.0/0.2</td><td>0.0/0.0/0.1/2.4</td><td>100.0/100.0/100.0/97.5</td><td>100.0/100.0/100.0/98.6</td><td>100.0/100.0/99.7/92.2</td></tr><tr><td>Uniform-Noise</td><td>0.0/0.0/0.0/25.9</td><td>0.0/0.0/0.4/5.1</td><td>100.0/100.0/99.9/95.9</td><td>100.0/100.0/99.9/97.6</td><td>100.0/100.0/99.6/89.4</td></tr><tr><td>Sphere-OOD</td><td>0.0/7.1/0.2/22.7</td><td>0.1/5.5/2.0/6.9</td><td>100.0/98.2/99.6/96.5</td><td>100.0/98.6/99.7/97.6</td><td>100.0/97.4/99.3/93.8</td></tr><tr><td rowspan="8">F-MNIST0-4 (94.2/94.8)</td><td>F-MNIST5-9</td><td>19.7/55.8/29.2/75.8</td><td>12.3/17.1/14.6/26.4</td><td>92.5/89.5/92.1/79.5</td><td>88.7/90.2/91.3/79.8</td><td></td></tr><tr><td>MNIST</td><td>1.8/67.3/53.5/2.0</td><td>2.3/23.6/21.1/3.4</td><td>99.5/83.5/86.4/99.0</td><td>99.4/84.2/86.1/99.3</td><td>94.3/87.1/92.8/77.7</td></tr><tr><td>EMNIST-letters</td><td>1,2/71.6/48.4/14.1</td><td>2.4/24.2/20.3/7.6</td><td>99.6/82.6/87.9/97.6</td><td>99.6/83.8/87.7/98.0</td><td>99.6/81.7/85.7/98.5</td></tr><tr><td>NotMNIST</td><td>0.2/76.0/57.7/11.0</td><td>1.2/26.8/23.6/8.0</td><td>99.9/79.9/84.1/97.0</td><td>99.8/81.3/83.8/96.8</td><td>99,7/79.8/87.9/96.9 99.9/77.1/83.9/97.2</td></tr><tr><td>Omniglot</td><td>1.0/62.3/15.5/11.1</td><td>2.5/18.3/9.1/7.1</td><td>99.5/88.6/96.5/97.5</td><td>99.6/90.6/96.0/97.9</td><td>99.3/85.8/96.7/95.7</td></tr><tr><td>Gaussian-Noise</td><td>0.0/0.3/0.0/99.3</td><td>0.4/2.0/0.4/41.7</td><td>100.0/99.7/100.0/53.4</td><td>100.0/99.8/100.0/62.6</td><td>100.0/99.7/100.0/47.9</td></tr><tr><td>Uniform-Noise</td><td>0.0/9.8/1.3/36.3</td><td>0.3/5.4/3.0/8.5</td><td>100.0/98.1/99.2/95.0</td><td>100.0/98.6/99.4/96.6</td><td>100.0/97.5/98.9/90.1</td></tr><tr><td>Sphere-OOD</td><td>0.0/89.6/95.5/0.0</td><td>0.0/38.3/41.6/0.0</td><td>100.0/65.8/59.8/100.0</td><td>100.0/67.7/62.4/100.0</td><td>100.0/61.9/55.0/100.0</td></tr></table>
|
| 159 |
+
|
| 160 |
+
We would like to remark that our approach gives good OOD detection results consistently on all the OOD datasets used unlike the baselines compared. This indicates that our approach is robust to change in OOD datasets.
|
| 161 |
+
|
| 162 |
+
# 7 CONCLUSION
|
| 163 |
+
|
| 164 |
+
We have shown in the paper that the confident-classifier almost always has OOD samples that produce high confidence outputs (in the contexts described earlier). We provided empirical evidence that favor using an explicit “reject” class instead. However, the ODD detection capabilities of a reject-classifier depend on the extent to which the generated OOD samples follow the low-density boundaries of in-distribution. We also propose a novel algorithm for generating “effective” OOD samples for training an $n + 1$ -class classifier for OOD detection and the results for most of the experiments on gray-scale datasets are consistently better for our approach in comparisons to other methods compared. For future research, we would like to investigate its effectiveness on non-grayscale datasets such as CIFAR and TinyImageNet. However we would like to point out that the nullspace calculation for colored images is computationally quite expensive, hence requires a larger compute (refer appendix E).
|
| 165 |
+
|
| 166 |
+
# REFERENCES
|
| 167 |
+
|
| 168 |
+
Yaroslav Bulatov. Notmnist dataset. Google (Books/OCR), Tech. Rep.[Online]. Available: http://yaroslavvb. blogspot. it/2011/09/notmnist-dataset. html, 2, 2011.
|
| 169 |
+
|
| 170 |
+
L Cayton. Algorithms for manifold learning. Technical Report CS2008-0923, UCSD., 2005.
|
| 171 |
+
|
| 172 |
+
Gregory Cohen, Saeed Afshar, Jonathan Tapson, and Andre van Schaik. Emnist: an extension of ´ mnist to handwritten letters. arXiv preprint arXiv:1702.05373, 2017.
|
| 173 |
+
|
| 174 |
+
Francesco Croce and Matthias Hein. A randomized gradient-free attack on relu networks. arXiv preprint arXiv:1811.11493, 2018.
|
| 175 |
+
|
| 176 |
+
Terrance DeVries and Graham W Taylor. Learning confidence for out-of-distribution detection in neural networks. arXiv preprint arXiv:1802.04865, 2018.
|
| 177 |
+
|
| 178 |
+
Yarin Gal and Zoubin Ghahramani. Dropout as a bayesian approximation: Representing model uncertainty in deep learning. In international conference on machine learning, pp. 1050–1059, 2016.
|
| 179 |
+
|
| 180 |
+
Yarin Gal, Riashat Islam, and Zoubin Ghahramani. Deep bayesian active learning with image data. CoRR, abs/1703.02910, 2017.
|
| 181 |
+
|
| 182 |
+
Yonatan Geifman, Guy Uziel, and Ran El-Yaniv. Boosting uncertainty estimation for deep neural classifiers. CoRR, 2018.
|
| 183 |
+
|
| 184 |
+
I. J. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, S. Ozair D. Warde-Farley, A. Courville, and Y. Bengio. Generative adversarial nets. In Advances in neural information processing systems (NIPS), 2014a.
|
| 185 |
+
|
| 186 |
+
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, 2014b.
|
| 187 |
+
|
| 188 |
+
C. Guo, G. Pleiss, Y. Sun, and K. Q. Weinberger. On calibration of modern neural. In International Conference on Machine Learning (ICML), 2017.
|
| 189 |
+
|
| 190 |
+
M. Hein, M. Andriushchenko, and J. Bitterwolf. Why relu networks yield high-confidence predictions far away from the training data and how to mitigate the problem. arXiv preprint arXiv:1812.05720, 2019.
|
| 191 |
+
|
| 192 |
+
Dan Hendrycks and Kevin Gimpel. A baseline for detecting misclassified and out-of-distribution. In International Conference on Learning Representations (ICLR), 2016.
|
| 193 |
+
|
| 194 |
+
Dan Hendrycks, Mantas Mazeika, and Thomas Dietterich. Deep anomaly detection with outlier exposure. In International Conference on Learning Representations (ICLR), 2019.
|
| 195 |
+
|
| 196 |
+
Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013.
|
| 197 |
+
|
| 198 |
+
Brenden M. Lake, Ruslan Salakhutdinov, and Joshua B. Tenenbaum. Human-level concept learning through probabilistic program induction. Science, 350(6266):1332–1338, 2015. URL https: //science.sciencemag.org/content/350/6266/1332.
|
| 199 |
+
|
| 200 |
+
Kimin Lee, Honglak Lee, Kibok Lee, and Jinwoo Shin. Training confidence-calibrated classifiers for detecting out-of-distribution samples. International Conference on Learning Representations (ICLR), 2018a.
|
| 201 |
+
|
| 202 |
+
Kimin Lee, Kibok Lee, Honglak Lee, and Jinwoo Shin. A simple unified framework for detecting out-of-distribution samples and adversarial attacks. arXiv preprint arXiv:1807.03888, 2018b.
|
| 203 |
+
|
| 204 |
+
Shiyu Liang, Yixuan Li, and R. Srikant. Enhancing the reliability of out-of-distribution image detection in neural networks. In International Conference on Learning Representations (ICLR), 2018.
|
| 205 |
+
|
| 206 |
+
Alireza Makhzani, Jonathon Shlens, Navdeep Jaitly, Ian Goodfellow, and Brendan Frey. Adversarial autoencoders. arXiv preprint arXiv:1511.05644, 2015.
|
| 207 |
+
|
| 208 |
+
H Narayanan and S Mitter. Sample complexity of testing the manifold hypothesis. Advances in Neural Information Processing Systems, 2010.
|
| 209 |
+
|
| 210 |
+
Anh Nguyen, Jason Yosinski, and Jeff Clune. Deep neural networks are easily fooled: High confidence predictions for unrecognizable images. In Computer Vision and Pattern Recognition (CVPR), 2015.
|
| 211 |
+
|
| 212 |
+
S. Pidhorskyi, R. Almohsen, D. A. Adjeroh, and G. Doretto. Generative probabilistic novelty detection with adversarial autoencoders. In Advances in neural information processing systems (NeuRIPS), 2018.
|
| 213 |
+
|
| 214 |
+
Jie Ren, Peter J. Liu, Emily Fertig, Jasper Snoek, Ryan Poplin, Mark A. DePristo, Joshua V. Dillon, and Balaji Lakshminarayanan. Likelihood ratios for out-of-distribution detection. arXiv preprint arXiv:1906.02845, 2019.
|
| 215 |
+
|
| 216 |
+
Salah Rifai, Yann N, Dauphin, Pascal Vincent, Yoshua Bengio, and Xavier Muller. The manifold tangent classifier. Advances in Neural Information Processing Systems, 2011.
|
| 217 |
+
|
| 218 |
+
R. Y. Rubinstein. Generating random vectors uniformly distributed inside and on the surface of different regions. European Journal of Operational Research, 1982.
|
| 219 |
+
|
| 220 |
+
W. J. Scheirer, A. Rocha, A. Sapkota, and T. E. Boult. Towards open set recognition. IEEE transactions on pattern analysis and machine intelligence, 2012.
|
| 221 |
+
|
| 222 |
+
G. Spigler. Denoising autoencoders for overgeneralization in neural networks. arXiv preprint arXiv:1709.04762, 2019.
|
| 223 |
+
|
| 224 |
+
K. Sricharan and A. Srivastava. Building robust classifiers through generation of confident out of distribution examples. Third workshop on Bayesian Deep Learning (NeurIPS), 2018.
|
| 225 |
+
|
| 226 |
+
W. Wang, A. Wang, A. Tamar, X. Chen, and P. Abbeel. Safer classification by synthesis. arXiv preprint arXiv:1711.08534, 2017.
|
| 227 |
+
|
| 228 |
+
Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms, 2017.
|
| 229 |
+
|
| 230 |
+
Matthew D Zeiler. Adadelta: an adaptive learning rate method. arXiv preprint arXiv:1212.5701, 2012.
|
| 231 |
+
|
| 232 |
+
A APPENDIX
|
| 233 |
+
|
| 234 |
+
# B RELATED WORK
|
| 235 |
+
|
| 236 |
+
There have been many approaches in the literature proposed to address the problem of OOD detection in the context of image data. Most of the successful ones are either generative ((Pidhorskyi et al., 2018; Wang et al., 2017; Ren et al., 2019)) or classifier-based approaches (Hendrycks & Gimpel, 2016; Hendrycks et al., 2019; DeVries & Taylor, 2018; Liang et al., 2018; Lee et al., 2018b). Generative approaches either explicitly or implicitly estimate the input density or use reconstruction error as a criterion to decide if input belongs to OOD. Classifier-based approaches, on the other hand, incorporate OOD detection as a part of the classifier network. The approach proposed in this paper belongs to the latter category. Therefore we limit our related work discussion to only classifier-based approaches.
|
| 237 |
+
|
| 238 |
+
Typical discriminatively trained classifiers that model the conditional probability $P ( \boldsymbol { y } | \boldsymbol { x } )$ without any additional constraints, by definition can make reliable classification decisions only on indistribution data. For out-of-distribution data, the classifier output is arbitrary. Moreover, any meta information from the output of the classifier or the features learned are also conditioned on the data belonging to in-distribution. Therefore this information in-principle cannot be used to ascertain if the input is in or out of distribution. However, most of the recent approaches ((Hendrycks & Gimpel, 2016; Lee et al., 2018b; Liang et al., 2018; DeVries & Taylor, 2018))in the literature follow this approach.
|
| 239 |
+
|
| 240 |
+
Hendrycks & Gimpel (2016) propose a baseline approach to detect OOD inputs, called max-softmax by thresholding the maximum softmax output of a pre-trained classifier. Liang et al. (2018) improve upon this using temperature scaling (ODIN, (Guo et al., 2017)) and adding input perturbations. The assumptions is that these changes result in larger separation between in and out of distribution data in terms of their output predictions. Lee et al. (2018b) propose an approach based on the assumption that the class-conditional features of a softmax classifier follow a Gaussian distribution. Therefore, Mahalanobis distance (MD) from the mean of the Gaussian is used as a score to detect OOD. This is then combined with input perturbations similar to ODIN to enhance the OOD detection results. This method obtains state-of-the-art results on most of the baseline datasets used in OOD detection literature. Despite good results, the method can be seen as OOD detection on feature space rather than pixel space not conforming to the usual definition of OOD (By definition, the in-distribution, $p _ { i n } ( x )$ is defined for $x \in \mathbb { X }$ in pixel space, and hence OOD is also defined in the same space). Hence the effectiveness of the method highly depends on the features learned by the classifier, and also there is no guarantee that the optimization algorithm forces the features to follow a Gaussian distribution. Hendrycks et al. (2019) propose to train a classifier with a confidence loss where OOD data is sampled from a large natural dataset. Hein et al. (2019) also follow a similar approach using a confidence loss and uniformly generated random OOD samples from the input space. In addition, they not only minimize the confidence at the generated OOD samples, but also in the neighbourhood of those samples. However, because both these approaches use the confidence-loss, they suffer from the problems explained in this paper. Moreover, such approaches are only feasible for input spaces where it is possible to represent the support of OOD with finite samples (assuming uniform distribution over OOD space). This is not possible when the input space is $\mathbb { R } ^ { d }$ , whereas the method proposed in this paper is still applicable.
|
| 241 |
+
|
| 242 |
+
Geifman et al. (2018) propose to use Bayesian prediction uncertainties given by MC-Dropout (Gal & Ghahramani, 2016) for OOD detection. However, on the theoretical front, the Bayesian uncertainty measure only characterizes the uncertainty in in-distribution. Therefore in principle should not be applied to OOD detection.
|
| 243 |
+
|
| 244 |
+
# C TOY EXPERIMENT ON GENERAL OOD SAMPLES
|
| 245 |
+
|
| 246 |
+
In this case, both train and test OOD samples are uniformly sampled from a 2D box $[ - 5 0 , 5 0 ] ^ { 2 }$ excluding the in-distribution regions. From Figure 6, we observe that both confidence loss and reject class based classifiers are able to distinguish in and out of distribution samples effectively. Therefore, there is no clear winner between the two. However as mentioned previously, such approaches are only feasible for input spaces where (approximately) representing the entire OOD region with a finite number of samples is possible. This is definitely not possible for example when the input space is $\mathbb { R } ^ { d }$ .
|
| 247 |
+
|
| 248 |
+
# D GENERATING OOD SAMPLES USING A GAN VS OUR APPROACH
|
| 249 |
+
|
| 250 |
+
Lee et al. (2018a) propose to generate OOD samples in the low-density regions of in-distribution by optimizing a joint GAN-classifier loss, (1). With a toy experiment, they show that the generator indeed produces such samples and also these samples follow the “boundary” of the in-distribution data. However, in the experiment, they use a pre-trained classifier. The classifier is pre-trained to optimize the confidence loss on in-distribution and OOD samples sampled close to the in-distribution. Therefore the classifier already has the knowledge of those OOD samples. When GAN is then trained following the objective in (1), GAN likely generates those OOD samples close to the indistribution. But it is evident that this setting is not realistic as one cannot have a fully informative prior knowledge of those OOD samples if our objective is to generate them.
|
| 251 |
+
|
| 252 |
+
Therefore, we experiment by directly optimizing (1) where the classifier is not pre-trained. The indistribution data for the experiment is obtained by sampling over the surface of a unit sphere from its diagonally opposite quadrants to form 2 classes respectively as shown in Figure 7. We find that (with much hyper-parameter tuning), even though GAN ends up producing OOD samples close to the in-distribution, it does an unsatisfactory job at producing samples that could follow the entire indistribution boundary. Moreover, there is less diversity in the generated samples which make them ineffective at improving the classifier performance in OOD detection. Our intuition is that the loss $\left( 1 ( \mathsf { b } ) { + } 1 ( \mathsf { c } ) \right)$ that forces the generator of the GAN to generate samples in the high entropy regions of the classifier doesn’t necessarily enforce it to produce samples that follow the entire in-distribution boundary. The inability of GANs to generate such samples for a simple 3D dataset indicates that it would be even more difficult in higher dimensions.
|
| 253 |
+
|
| 254 |
+

|
| 255 |
+
Figure 6: Plots for general OOD samples experiments. (a) Training data in 2D. (b) Maximum prediction output on test data for a confident-classifier. (c) Classification output of a classifier with a “reject” class on test data.
|
| 256 |
+
|
| 257 |
+

|
| 258 |
+
Figure 7: Generated OOD samples using a joint training of a GAN and a confident-classifier. We observe that the generated OOD samples don’t cover the entire in-distribution boundary.
|
| 259 |
+
|
| 260 |
+
In comparison to the GAN based boundary OOD generation, our approach as visually apparent from Figure 8 produces samples that cover the in-distribution boundary quite effectively. While it is difficult to visualize how well the off-manifold OOD samples cover the boundary, one can imagine them having a good coverage on the off-manifold boundary as they are obtained by perturbing each training sample in the direction given by the null-spaces. Hence the diversity of the OOD samples is ensured. For on-manifold boundary OOD samples, as evident from Figure 8c, it forms a closed boundary around the in-distribution points.
|
| 261 |
+
|
| 262 |
+
# E DISCUSSION ON SAMPLE GENERATION COMPLEXITY
|
| 263 |
+
|
| 264 |
+
For generating OOD samples outside the manifold, we randomly sample from the left-null-space of the Jacobian as described earlier. But the complexity of this step depends on the number of basis vectors in the null-space and its dimensions. For the MNIST case, with the input dimensions $2 8 \times 2 8$ and latent dimension of 8, there are 776 basis vectors in the left-nullspace, each of dimension 784 (i.e., $2 8 \times 2 8$ ). For colored images such as CIFAR and TinyImagenet, the number of basis vectors are almost 3 times of that for gray-scaled images. To cover the in-distribution boundary effectively in all directions, many OOD samples for each in-distribution training sample are to be generated by taking random linear combinations of the basis vectors, which is quite expensive. This gives a quantitative measure of effective OOD sample complexity. However, we find that only a few OOD samples are sufficient to guide the decision boundary of the classifier to be bounded around the in-distribution regions evidenced by their OOD detection results.
|
| 265 |
+
|
| 266 |
+

|
| 267 |
+
Figure 8: Generated boundary OOD samples using our approach. (a) 3d plot of in-distribution data with out-of-manifold boundary OOD samples. (b) 3d plot of in-distribution data with on-manifold boundary OOD samples. (c) 2d projection of in-distribution data with on-manifold boundary samples to show that they cover the in-distribution boundary on the manifold.
|
| 268 |
+
|
| 269 |
+
# F EXPERIMENTAL ARCHITECTURE
|
| 270 |
+
|
| 271 |
+
The encoder and the decoder parts of the CVAE architecture, and the classifier used are described in Figure 9a, 9b and ${ 9 \mathrm { c } }$ respectively. The latent dimension $( d )$ is chosen per dataset. For MNIST, $d = 8$ and for Fashion MNIST, $d = 1 0$ . The number of features after the convolutions in the encoder is represented by $f$ . “cond $\mathbf { \nabla } _ { \mathbf { X } } \mathbf { \vec { \Omega } } ^ { \mathbf { { \nabla } } }$ is the one hot representation of class labels. $k$ in the classifier architecture represents the number of classes in the training data.
|
| 272 |
+
|
| 273 |
+
# G METRICS DEFINITIONS
|
| 274 |
+
|
| 275 |
+
The definitions of metrics used to evaluate OOD detection are as follows.
|
| 276 |
+
|
| 277 |
+
FPR at $95 \%$ TPR is the probability of an OOD input being misclassified as in-distribution when $9 5 \%$ of in-distribution samples are correctly classified as in-distribution (i.e, the true positive rate (TPR) is at $9 5 \%$ ). True positive rate is calculated as, $\begin{array} { r } { T P R = \frac { T P } { T P + F N } } \end{array}$ , where TP and FN denote the true positives and false negatives, respectively. The false positive rate (FPR) is computed as $\begin{array} { r } { F P R = \frac { F P } { F P + T N } } \end{array}$ , where FP and TN denote the false positives and true negatives, respectively.
|
| 278 |
+
|
| 279 |
+
Detection error is the minimum mis-classification probability over all possible thresholds over the OOD score. We assume that the test set contains equal number of in and out of distribution samples.
|
| 280 |
+
|
| 281 |
+
AUROC is the area under the receiver operating characteristic curve, which is a threshold independent metric. ROC curve is a plot of TPR versus FPR. AUROC can be interpreted as the probability that a positive example is assigned a higher detection score than a negative example. For a perfect detector, AUROC is $100 \%$ .
|
| 282 |
+
|
| 283 |
+
AUPR is the Area under the Precision-Recall (PR) curve. PR curve is a plot of precision $T P =$ $( T P + F P ) \rangle$ versus recall $( T P = ( T P + F N ) )$ . The metric AUPR-In and AUPR-Out represent the area under the PR curve depending on if in or out of distribution data are specified as positives, respectively.
|
| 284 |
+
|
| 285 |
+

|
| 286 |
+
|
| 287 |
+
# H MORE RESULTS
|
| 288 |
+
|
| 289 |
+
We report the OOD detection results for OOD detection methods based on softmax-score (Hendrycks & Gimpel (2016)), uncertainty of classifier obtained via MC-dropout (Gal & Ghahramani (2016)), and mutual information between predictions and model posterior (Gal et al. (2017)). The results are shown in Table 2.
|
| 290 |
+
|
| 291 |
+
Table 2: Results
|
| 292 |
+
|
| 293 |
+
<table><tr><td rowspan="2">ID Model</td><td rowspan="2">OOD</td><td>FPR at 95% TPR↓</td><td>Detection Error↓</td><td>AUROC↑</td><td>AUPR Out↑</td><td>AUPR In↑</td></tr><tr><td colspan="5">Softmax/MC-Dropout/Mutual-Info</td></tr><tr><td rowspan="7">MNIST</td><td>F-MNIST</td><td>1.61/2.1/54.3</td><td>3.3/3.5/14.5</td><td>99.5/99.4/90.8</td><td>99.5/99.5/91.5</td><td>99.5/99.4/86.2</td></tr><tr><td>EMNIST-letters</td><td>28.0/24.5/22.0</td><td>12.6/11.2/11.1</td><td>93.6/94.6/95.0</td><td>93.4/94.4/94.7</td><td>93.0/94.1/94.7</td></tr><tr><td>NotMNIST</td><td>13.1/12.5/22.1</td><td>7.1/6.7/9.1</td><td>97.4/97.6/95.5</td><td>97.8/97.9/96.0</td><td>97.0/97.1/94.0</td></tr><tr><td>Omniglot</td><td>0.0/0.0/92.8</td><td>0.5/0.6/19.5</td><td>100.0/100.0/84.5</td><td>100.0/100.0/88.7</td><td>100.0/100.0/73.9</td></tr><tr><td>Gaussian-Noise</td><td>0.0/0.0/100.0</td><td>0.0/0.0/49.3</td><td>100.0/100.0/17.2</td><td>100.0/100.0/37.7</td><td>100.0/100.0/34.0</td></tr><tr><td>Uniform-Noise</td><td>0.0/0.0/100.0</td><td>0.0/0.0/43.8</td><td>100.0/100.0/45.2</td><td>100.0/100.0/56.4</td><td>100.0/100.0/42.9</td></tr><tr><td>Sphere-OOD</td><td>0.8/1.3/7.6</td><td>2.6/3.1/4.2</td><td>99.3/99.2/97.3</td><td>99.5/99.4/99.3</td><td>99.1/99.0/93.1</td></tr><tr><td rowspan="7">F-MNIST</td><td>MNIST</td><td>84.5/68.9/19.4</td><td>34.5/25.0/11.9</td><td>70.6/82.2/93.5</td><td>70.9/83.0/91.3</td><td>68.2/80.3/94.9</td></tr><tr><td>EMNIST-letters</td><td>88.1/77.8/37.6</td><td>41.1/33.1/21.1</td><td>62.3/73.4/84.2/</td><td>62.3/73.2/79.6</td><td>61.3/72.2/87.9</td></tr><tr><td>NotMNIST</td><td>83.1/67.0/24.2</td><td>35.2/25.1/14.3</td><td>68.9/81.7/91.7</td><td>66.4/80.3/87.6</td><td>68.6/80.8/93.6</td></tr><tr><td>Omniglot</td><td>39.0/32.5/26.8</td><td>17.1/14.8/10.4</td><td>91.4/93.5/95.2</td><td>91.4/93.7/95.6</td><td>91.8/95.5/93.1</td></tr><tr><td>Gaussian-Noise</td><td>99.1/98.5/72.2</td><td>17.5/15.8/9.6</td><td>80.0/82.1/92.5</td><td>87.8/89.1/95.3</td><td>65.5/67.9/83.4</td></tr><tr><td>Uniform-Noise</td><td>96.9/96.5/48.8</td><td>29.4/24.2/16.8</td><td>70.1/76.8/90.9</td><td>78.6/84.0/92.5</td><td>58.11/64.8/87.9</td></tr><tr><td>Sphere-OOD</td><td>97.2/71.2/1.8</td><td>50.0/17.0/2.5</td><td>48.4/88.2/99.6</td><td>50.6/91.4/99.5</td><td>47.7/82.4/99.6</td></tr><tr><td rowspan="8">MNIST0-4</td><td>MNIST5-9</td><td>18.2/15.7/15.3</td><td>10.6/9.7/9.9</td><td>94.2/94.8/94.5</td><td>93.0/93.1/92.8</td><td>94.8/95.4/95.1</td></tr><tr><td>F-MNIST</td><td>3.1/4.4/8.8</td><td>4.0/4.6/5.9</td><td>99.0/98.8.97.8</td><td>99.2/99.0/98.4</td><td>98.7/98.4/96.6</td></tr><tr><td>EMNIST-LETTERS</td><td>25.3/21.6/21.4</td><td>12.8/12.2/12.2</td><td>92.8/93.5/93.4</td><td>90.6/91.6/91.3</td><td>93.3/93.9/94.1</td></tr><tr><td>NotMNIST</td><td>21.4/16.2/15.9</td><td>10.44/9.3/9.4</td><td>95.5/96.4/96.5</td><td>95.5/96.4/96.1</td><td>95.0/95.9/96.4</td></tr><tr><td>Omniglot</td><td>0.2/0.1/0.5</td><td>1.7/1.9/2.4</td><td>99.4/99.4/99.2</td><td>99.6/99.6/99.4</td><td>98.9/99.0/98.8</td></tr><tr><td>Gaussian-Noise</td><td>0.0/0.0/0.0</td><td>0.3/0.4/1.0</td><td>99.7/99.7/98.8</td><td>99.8.99.8/99.4</td><td>98.9/98.9/95.8</td></tr><tr><td>Uniform-Noise</td><td>0.0/0.0/0.0</td><td>0.6/0.9/2.2</td><td>99.7/99.6/98.3</td><td>99.8/99.8/99.0</td><td>99.1/99.0/95.2</td></tr><tr><td>Sphere-OOD</td><td>1.0/1.9/2.5</td><td>2.8/3.4/3.6</td><td>99.2/99.0/98.6</td><td>99.4/99.3/99.1</td><td>98.6/98.5/97.5</td></tr><tr><td rowspan="8">F-MNIST0-4</td><td>F-MNIST5-9</td><td>73.5/67.1/32.8</td><td>26.1/23.4/17.3</td><td>80.1/83.4/89.8</td><td>80.4/83.3/87.6</td><td>78.1/82.0/91.2</td></tr><tr><td>MNIST</td><td>44.9/43.9/73.9</td><td>15.9/16.0/16.9</td><td>91.0/91.4/87.7</td><td>91.2/91.3/89.5</td><td>90.4/90.5/82.3</td></tr><tr><td>EMNIST-letters</td><td>69.8/66.6/43.1</td><td>26.7/25.4/20.5</td><td>80.4/82.2/87.4</td><td>81.1/82.8/86.5</td><td>79.6/81.5/97.9</td></tr><tr><td>NotMNIST</td><td>71.9/67.0/38.6</td><td>24.3/20.8/17.0</td><td>82.8.86.1/90.8</td><td>84.3/87.7/90.4</td><td>80.2/83.4/91.0</td></tr><tr><td>Omniglot</td><td>44.8/41.3/29.6</td><td>15.3/14.0/11.5</td><td>91.6/93.0/94.7</td><td>92.1/93.8/94.9</td><td>91.0/92.2/93.9</td></tr><tr><td>Gaussian-Noise</td><td>0.3/0.5/98.3</td><td>2.3/2.3/12.2</td><td>99.8/99.7/87.3</td><td>99.8/99.8.92.4</td><td>99.7/99.7.74.2</td></tr><tr><td>Uniform-Noise</td><td>27.7/20.5/8.4</td><td>8.6/7.9/5.3</td><td>96.4/97.2/98.0</td><td>97.2/97.8/98.6</td><td>95.5/96.5/96.6</td></tr><tr><td>Sphere-OOD</td><td>86.5/67.3/10.7</td><td>33.7/20.4/7.8</td><td>71.6/86.2/97.3</td><td>73.4/88.0/96.7</td><td>67.3/83.0/97.8</td></tr></table>
|
parse/train/rJeIGkBKPS/rJeIGkBKPS_content_list.json
ADDED
|
@@ -0,0 +1,1677 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "IMPROVING CONFIDENT-CLASSIFIERS FOR OUT-OFDISTRIBUTION DETECTION ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
176,
|
| 8 |
+
101,
|
| 9 |
+
821,
|
| 10 |
+
146
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Anonymous authors Paper under double-blind review ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
183,
|
| 19 |
+
171,
|
| 20 |
+
398,
|
| 21 |
+
198
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "ABSTRACT ",
|
| 28 |
+
"text_level": 1,
|
| 29 |
+
"bbox": [
|
| 30 |
+
454,
|
| 31 |
+
236,
|
| 32 |
+
544,
|
| 33 |
+
251
|
| 34 |
+
],
|
| 35 |
+
"page_idx": 0
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"type": "text",
|
| 39 |
+
"text": "Discriminatively trained neural classifiers can be trusted, only when the input data comes from the training distribution (in-distribution). Therefore, detecting outof-distribution (OOD) samples is very important to avoid classification errors. In the context of OOD detection for image classification, one of the recent approaches proposes training a classifier called “confident-classifier” by minimizing the standard cross-entropy loss on in-distribution samples and minimizing the KL divergence between the predictive distribution of OOD samples in the low-density “boundary” of in-distribution and the uniform distribution (maximizing the entropy of the outputs). Thus, the samples could be detected as OOD if they have low confidence or high entropy. In this paper, we analyze this setting both theoretically and experimentally. We also propose a novel algorithm to generate the “boundary” OOD samples to train a classifier with an explicit “reject” class for OOD samples. We compare our approach against several recent classifier-based OOD detectors including the confident-classifiers on MNIST and Fashion-MNIST datasets. Overall the proposed approach consistently performs better than others across most of the experiments. ",
|
| 40 |
+
"bbox": [
|
| 41 |
+
233,
|
| 42 |
+
266,
|
| 43 |
+
764,
|
| 44 |
+
488
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "1 INTRODUCTION ",
|
| 51 |
+
"text_level": 1,
|
| 52 |
+
"bbox": [
|
| 53 |
+
176,
|
| 54 |
+
515,
|
| 55 |
+
336,
|
| 56 |
+
530
|
| 57 |
+
],
|
| 58 |
+
"page_idx": 0
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "text",
|
| 62 |
+
"text": "Discriminatively trained deep neural networks have achieved state of the art results in many classification tasks such as speech recognition, image classification, and object detection. This has resulted in deployment of these models in real life applications where safety is paramount (e.g., autonomous driving). However, recent progress has shown that deep neural network (DNN) classifiers make overconfident predictions even when the input does not belong to any of the known classes (Nguyen et al. (2015)). This follows from the design of DNN classifiers that are optimized over in-distribution data without the knowledge of OOD data. The resulting decision boundaries are typically “unbounded/open” as shown in Figure 1a resulting in over-generalization (Spigler (2019), Scheirer et al. (2012)). ",
|
| 63 |
+
"bbox": [
|
| 64 |
+
174,
|
| 65 |
+
545,
|
| 66 |
+
825,
|
| 67 |
+
671
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "There have been many approaches proposed to address this problem under the umbrella of OOD detection1. Lee et al. (2018a) propose to explicitly train a classifier using the OOD samples generated by a GAN (Goodfellow et al. (2014a)). They empirically try to show that, for effective OOD detection, the generated OOD samples should follow and be close to the low-density boundaries of in-distribution, and the proposed GAN training indeed tries to do that. A multi-class softmax DNN classifier is trained with in-distribution samples to minimize the standard cross-entropy loss (minimizing the output entropy) and the generated OOD samples are trained to minimize a KL loss that forces the classifier’s predictive distribution to follow a uniform one (maximizing the output entropy). The resulting classifier is called a “confident-classifier”. One can then classify a sample as being in or out-of distribution based on the maximum prediction probability or the entropy of the output. Sricharan & Srivastava (2018) also follow a similar approach with slight modifications. ",
|
| 74 |
+
"bbox": [
|
| 75 |
+
174,
|
| 76 |
+
679,
|
| 77 |
+
825,
|
| 78 |
+
830
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "Contribution. One of the key assumptions in Lee et al. (2018a) and Sricharan & Srivastava (2018) is that the effect of maximizing the entropy for OOD samples close to the low-density boundaries of in-distribution might also propagate to samples that are far away from in-distribution. This training is expected to result in “bounded/closed” regions in input space with lower entropy over the in-distribution, and the rest of the region (corresponding to OOD), with higher entropy. The ideal decision boundary in such a scenario would be as shown in Figure 1b. We find that even though such a solution exists, the proposed training algorithm is unlikely to reach it. We justify this both theoretically and experimentally for a ReLU network (network with ReLU activation units) that was indeed used in Lee et al. (2018a). Assuming training with OOD samples close to the in-distribution boundary, we find that having an explicit reject class for OOD samples results in a solution close to the one depicted in Figure 1b. Therefore we propose to use such a classifier instead. We give intuitive arguments to justify the proposal. This forms the first key contribution of our paper. ",
|
| 85 |
+
"bbox": [
|
| 86 |
+
174,
|
| 87 |
+
830,
|
| 88 |
+
825,
|
| 89 |
+
900
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "image",
|
| 95 |
+
"img_path": "images/a1e1dee32e312519a4291b7dd76931cea6037dbb84a5685b080c10dc01ef0683.jpg",
|
| 96 |
+
"image_caption": [
|
| 97 |
+
"Figure 1: Figure shows how the decision boundaries would change and become more bounded when a typical classifier is trained with an auxiliary (“reject”) class containing OOD samples. (a) The unbounded decision boundaries of a typical 4-class classifier. Digit 9 is incorrectly classified as digit 2 with very high confidence. (b) A 5-class classifier trained with OOD samples $\\mathbf { \\epsilon } \\cdot \\mathbf { \\gamma } _ { \\mathbf { X } } \\mathbf { \\epsilon } )$ that are close to in-distribution and form the fifth (“reject”) class, resulting in bounded decision boundaries. Digit 9 is correctly classified as belonging to the “reject” (OOD) class. "
|
| 98 |
+
],
|
| 99 |
+
"image_footnote": [],
|
| 100 |
+
"bbox": [
|
| 101 |
+
210,
|
| 102 |
+
99,
|
| 103 |
+
787,
|
| 104 |
+
231
|
| 105 |
+
],
|
| 106 |
+
"page_idx": 1
|
| 107 |
+
},
|
| 108 |
+
{
|
| 109 |
+
"type": "text",
|
| 110 |
+
"text": "",
|
| 111 |
+
"bbox": [
|
| 112 |
+
174,
|
| 113 |
+
367,
|
| 114 |
+
825,
|
| 115 |
+
467
|
| 116 |
+
],
|
| 117 |
+
"page_idx": 1
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"type": "text",
|
| 121 |
+
"text": "Moreover, with toy experiments (refer to section D in appendix) on low-dimensional synthetic data, we analyze if GAN can indeed produce samples that can follow the low-density boundaries of indistribution. We find that, even though GAN produces samples close to the low-density boundaries of in-distribution, it is unable to cover the whole boundary, thus resulting in a sub-optimal OOD detector when trained on such samples. We therefore propose a novel algorithm to generate “boundary” OOD samples using a manifold learning network, (e.g., variational auto-encoder (VAE)) and show that the generated samples are diverse and cover the in-distribution boundaries better than the method proposed in Lee et al. (2018a). The resulting classifier trained with those samples improves the OOD detection results. This forms the second key contribution of our paper. ",
|
| 122 |
+
"bbox": [
|
| 123 |
+
173,
|
| 124 |
+
473,
|
| 125 |
+
825,
|
| 126 |
+
598
|
| 127 |
+
],
|
| 128 |
+
"page_idx": 1
|
| 129 |
+
},
|
| 130 |
+
{
|
| 131 |
+
"type": "text",
|
| 132 |
+
"text": "2 BACKGROUND ",
|
| 133 |
+
"text_level": 1,
|
| 134 |
+
"bbox": [
|
| 135 |
+
174,
|
| 136 |
+
636,
|
| 137 |
+
326,
|
| 138 |
+
651
|
| 139 |
+
],
|
| 140 |
+
"page_idx": 1
|
| 141 |
+
},
|
| 142 |
+
{
|
| 143 |
+
"type": "text",
|
| 144 |
+
"text": "Lee et al. (2018a) propose a joint training of GAN and a classifier based on the following objective: ",
|
| 145 |
+
"bbox": [
|
| 146 |
+
171,
|
| 147 |
+
676,
|
| 148 |
+
823,
|
| 149 |
+
693
|
| 150 |
+
],
|
| 151 |
+
"page_idx": 1
|
| 152 |
+
},
|
| 153 |
+
{
|
| 154 |
+
"type": "equation",
|
| 155 |
+
"img_path": "images/d501a57b15f8ccab7d00966c00496cccf850eb55c7546ad7e03faebcd27bddfa.jpg",
|
| 156 |
+
"text": "$$\n\\begin{array} { r l } & { \\underset { G } { \\mathop { \\operatorname* { m i n } } } \\underset { D } { \\mathop { \\operatorname* { m a x } } } \\underset { \\theta } { \\underbrace { \\operatorname* { m i n } } } \\underbrace { { \\mathbb { E } } _ { P _ { i n } ( \\hat { x } , \\hat { y } ) } [ - \\log P _ { \\theta } ( y = \\hat { y } | \\hat { x } ) ] } _ { ( \\mathrm { a } ) } + \\beta \\underbrace { { \\mathbb { E } } _ { P _ { G } ( x ) } [ \\mathrm { K L } ( \\mathcal { U } ( y ) | | P _ { \\theta } ( y | x ) ) ] } _ { ( \\mathrm { b } ) } } \\\\ & { \\qquad + \\underbrace { { \\mathbb { E } } _ { P _ { i n } ( x ) } [ \\log D ( x ) ] + { \\mathbb { E } } _ { P _ { G } ( x ) } [ \\log ( 1 - D ( x ) ) ] } _ { ( \\mathrm { c } ) } } \\end{array}\n$$",
|
| 157 |
+
"text_format": "latex",
|
| 158 |
+
"bbox": [
|
| 159 |
+
245,
|
| 160 |
+
712,
|
| 161 |
+
751,
|
| 162 |
+
791
|
| 163 |
+
],
|
| 164 |
+
"page_idx": 1
|
| 165 |
+
},
|
| 166 |
+
{
|
| 167 |
+
"type": "text",
|
| 168 |
+
"text": "where $( \\mathsf { b } ) { + } ( \\mathsf { c } )$ is the modified GAN loss and $\\mathrm { ( a ) } { + } \\mathrm { ( b ) }$ is the classifier loss $\\boldsymbol { \\theta }$ is the classifier’s parameter) called the confidence loss. The difference from the regular GAN objective is the additional KL loss in (1), which when combined with the original loss, forces the generator to generate samples in the low-density boundaries of the in-distribution $( P _ { i n } ( x ) )$ space. $\\beta$ is a hyper-parameter that controls how close the OOD samples are to the in-distribution boundary. For the classifier, the KL loss pushes the OOD samples generated by GAN to produce a uniform distribution at the output, and therefore have higher entropy. This enables one to detect OOD samples based on the entropy or the confidence at the output of the classifier. ",
|
| 169 |
+
"bbox": [
|
| 170 |
+
173,
|
| 171 |
+
810,
|
| 172 |
+
825,
|
| 173 |
+
924
|
| 174 |
+
],
|
| 175 |
+
"page_idx": 1
|
| 176 |
+
},
|
| 177 |
+
{
|
| 178 |
+
"type": "text",
|
| 179 |
+
"text": "3 WHY MINIMIZING CONFIDENCE LOSS IS INSUFFICIENT FOR OOD DETECTION ",
|
| 180 |
+
"text_level": 1,
|
| 181 |
+
"bbox": [
|
| 182 |
+
174,
|
| 183 |
+
103,
|
| 184 |
+
743,
|
| 185 |
+
135
|
| 186 |
+
],
|
| 187 |
+
"page_idx": 2
|
| 188 |
+
},
|
| 189 |
+
{
|
| 190 |
+
"type": "text",
|
| 191 |
+
"text": "Let $f : \\mathbb { R } ^ { d } \\mathbb { R } ^ { K }$ be the neural network function that maps input in $\\mathbb { R } ^ { d }$ to $K$ output classes (input to the softmax layer). Let $f _ { k } : \\mathbb { R } ^ { d } \\mathbb { R }$ be the function that maps the input to output for a specific class $k \\in \\{ 1 , 2 , 3 . . . K \\}$ . For a neural network with affine activations (e.g., ReLU and Leaky ReLU), each $f _ { k }$ is a continuous piece-wise affine function over a finite set of polytopes, $\\{ Q _ { 1 } , Q _ { 2 } , \\dot { \\cdots } , Q _ { M } \\}$ such that $\\textstyle \\mathbb { R } ^ { d } = \\bigcup _ { l = 1 } ^ { M } Q _ { l }$ , as described in Croce & Hein (2018). This means that each $f _ { k }$ is affine within each $Q _ { l }$ $( l \\in \\{ 1 , 2 , 3 . . . M \\} )$ . If the input space is $\\mathbb { R } ^ { d }$ , some of these polytopes stretch to infinity (grow without bounds). Let $Q _ { l } ^ { \\infty } \\equiv Q _ { l }$ denote these “infinity polytopes”. The choice of the neural network structure and the weights define $f _ { k }$ ’s. Figure 2a illustrates these polytopes and $f _ { k }$ ’s for a simple 3-class ReLU classifier, where the input space is $\\mathbb { R }$ . In this example, there are 4 polytopes in which $Q _ { 1 } ^ { \\infty }$ and $Q _ { 4 } ^ { \\infty }$ stretch to infinity. ",
|
| 192 |
+
"bbox": [
|
| 193 |
+
173,
|
| 194 |
+
148,
|
| 195 |
+
825,
|
| 196 |
+
296
|
| 197 |
+
],
|
| 198 |
+
"page_idx": 2
|
| 199 |
+
},
|
| 200 |
+
{
|
| 201 |
+
"type": "image",
|
| 202 |
+
"img_path": "images/e3240de48c181d407a6c003558495dbbc3beaee10c4f342032ad63c3e150411e.jpg",
|
| 203 |
+
"image_caption": [
|
| 204 |
+
"Figure 2: $f _ { k }$ ’s and $Q _ { r }$ ’s for an example 3-class ReLU classifier where the input $x \\in \\mathbb { R }$ . $Q _ { 1 } ^ { \\infty }$ and $Q _ { 4 } ^ { \\infty }$ are infinity polytopes. (a) For sufficiently large (small) $x$ , there is a unique $k ^ { * } = 1$ in $Q _ { 4 } ^ { \\infty }$ $k ^ { * } = 1$ in $Q _ { 1 } ^ { \\infty }$ ). (b) For sufficiently large $x$ , there are multiple $k ^ { * }$ ’s in $Q _ { 4 } ^ { \\infty }$ $( k ^ { * } = \\{ 2 , 3 \\}$ ). For sufficiently small $x$ , there is a unique $k ^ { * } = 3$ in $Q _ { 1 } ^ { \\infty }$ . "
|
| 205 |
+
],
|
| 206 |
+
"image_footnote": [],
|
| 207 |
+
"bbox": [
|
| 208 |
+
218,
|
| 209 |
+
310,
|
| 210 |
+
779,
|
| 211 |
+
411
|
| 212 |
+
],
|
| 213 |
+
"page_idx": 2
|
| 214 |
+
},
|
| 215 |
+
{
|
| 216 |
+
"type": "text",
|
| 217 |
+
"text": "Hein et al. (2019) mathematically show that a ReLU classifier (with softmax output) produces arbitrarily high confidence predictions (approaching 1) far away from the training data in almost all directions on an unbounded input space. This happens over $Q _ { l } ^ { \\infty }$ ’s. Their results are summarized as follows. ",
|
| 218 |
+
"bbox": [
|
| 219 |
+
173,
|
| 220 |
+
493,
|
| 221 |
+
825,
|
| 222 |
+
550
|
| 223 |
+
],
|
| 224 |
+
"page_idx": 2
|
| 225 |
+
},
|
| 226 |
+
{
|
| 227 |
+
"type": "text",
|
| 228 |
+
"text": "For any $\\pmb { x } \\in \\mathbb { R } ^ { d }$ , there exists a $\\beta _ { l } ~ > ~ 0$ such that for all $\\alpha _ { l } ~ \\ge ~ \\beta _ { l }$ , $\\alpha _ { l } \\pmb { x } \\in Q _ { l } ^ { \\infty }$ . Let $f _ { k } ^ { l } ( { \\pmb x } ) =$ $\\langle \\pmb { v } _ { k } ^ { l } , \\pmb { x } \\rangle + a _ { k } ^ { l }$ be the piece-wise affine function for class $k$ over $Q _ { l }$ . Let $k ^ { * } = \\arg \\operatorname* { m a x } _ { k } \\langle \\pmb { v } _ { k } ^ { l } , \\beta _ { l } \\pmb { x } \\rangle ^ { 2 }$ . Then, as $\\alpha _ { l } \\infty$ , the confidence for input $\\alpha \\boldsymbol { l } ^ { \\mathbf { \\mathcal { X } } }$ for class $k ^ { * }$ becomes arbitrarily high if $k ^ { * }$ is unique. i.e, ",
|
| 229 |
+
"bbox": [
|
| 230 |
+
174,
|
| 231 |
+
556,
|
| 232 |
+
825,
|
| 233 |
+
616
|
| 234 |
+
],
|
| 235 |
+
"page_idx": 2
|
| 236 |
+
},
|
| 237 |
+
{
|
| 238 |
+
"type": "equation",
|
| 239 |
+
"img_path": "images/f8f50fb649b3367e59ec7452b98d00c5b28b3c39a645697ce557118985a1fb24.jpg",
|
| 240 |
+
"text": "$$\n\\operatorname* { l i m } _ { \\alpha _ { l } \\to \\infty } { \\frac { e ^ { f _ { k ^ { * } } \\left( \\alpha _ { l } \\pmb x \\right) } } { \\sum _ { l = 1 } ^ { K } e ^ { f _ { l } \\left( \\alpha _ { l } \\pmb x \\right) } } } = 1\n$$",
|
| 241 |
+
"text_format": "latex",
|
| 242 |
+
"bbox": [
|
| 243 |
+
411,
|
| 244 |
+
622,
|
| 245 |
+
586,
|
| 246 |
+
665
|
| 247 |
+
],
|
| 248 |
+
"page_idx": 2
|
| 249 |
+
},
|
| 250 |
+
{
|
| 251 |
+
"type": "text",
|
| 252 |
+
"text": "But if there are multiple $k ^ { * }$ ’s, arbitrarily large confidence values cannot be obtained far away from the in-distribution in the direction of $x$ . For instance, as shown in Figure $2 { \\mathbf { b } } ^ { 3 }$ , for $Q _ { 4 } ^ { \\infty }$ , $k ^ { * } =$ $\\{ 2 , 3 \\}$ and therefore arbitrarily high confidence predictions cannot be achieved as $\\alpha _ { l } \\infty$ . Having multiple $k ^ { * }$ ’s for every $Q _ { l } ^ { \\infty }$ is highly unlikely, given that we are dealing with floating point numbers and also that it is not explicitly enforced during training. Therefore, arbitrarily high confidence values far away from the in-distribution are likely inevitable. ",
|
| 253 |
+
"bbox": [
|
| 254 |
+
173,
|
| 255 |
+
670,
|
| 256 |
+
825,
|
| 257 |
+
755
|
| 258 |
+
],
|
| 259 |
+
"page_idx": 2
|
| 260 |
+
},
|
| 261 |
+
{
|
| 262 |
+
"type": "text",
|
| 263 |
+
"text": "The above analysis is for the case where the input domain is unbounded $( R ^ { d } )$ . For bounded domains (for example, $[ \\bar { 0 } , 1 ] ^ { d }$ for images), as pointed out in Hein et al. (2019), since we cannot let $\\alpha _ { l } \\to \\infty$ , the above analysis cannot be directly applied to get arbitrary high confidence values. However the above technique in principle can be applied to increase the prediction confidence for samples far away from the in-distribution. Hein et al. (2019) conduct experiments to support the claim. The theoretical analysis of which can be done as follows. Let $\\bar { \\mathbb Z } ^ { d }$ represent the bounded input domain. Similar to the unbounded case, let $Q _ { l } ^ { \\infty }$ denote “infinity polytopes” that stretch till the bounds of the input domain $\\mathbb { Z } ^ { d }$ . For any $\\pmb { x } \\in \\mathbb { Z } ^ { d }$ , there exists a $\\beta _ { l } > 0$ such that for all $\\alpha _ { l } \\geq \\beta _ { l }$ , $\\alpha _ { l } \\pmb { x } \\in Q _ { l } ^ { \\infty }$ . Let $\\bar { f } _ { k } ^ { l } ( { \\pmb x } ) = \\langle { \\pmb v } _ { k } ^ { l } , { \\pmb x } \\rangle + a _ { k } ^ { l }$ be the piece-wise affine function for class $k$ over $Q _ { l }$ . Let $k ^ { * } =$ arg $\\operatorname* { m a x } _ { k } \\langle \\pmb { v } _ { k } ^ { l } , \\beta _ { l } \\pmb { x } \\rangle$ . Then, as $\\alpha _ { l }$ increases, the confidence for input $\\alpha \\boldsymbol { l } \\mathbf { x }$ for class $k ^ { * }$ keeps increasing until the bounds of the domain is reached if $k ^ { * }$ is unique. If $f _ { k ^ { * } } ( \\beta _ { l } x ) \\ > > \\ f _ { k } ( \\beta _ { l } x ) \\ \\forall k \\ \\ne \\ k ^ { * }$ (ignoring the effect of bias term for simplicity), the confidence for input $\\alpha _ { l } x$ for the class $k ^ { * }$ is very high. Therefore, even for the case of bounded input space, one can obtain confidence predictions for OOD samples high enough for it to be considered as in-distribution samples. ",
|
| 264 |
+
"bbox": [
|
| 265 |
+
173,
|
| 266 |
+
761,
|
| 267 |
+
825,
|
| 268 |
+
859
|
| 269 |
+
],
|
| 270 |
+
"page_idx": 2
|
| 271 |
+
},
|
| 272 |
+
{
|
| 273 |
+
"type": "text",
|
| 274 |
+
"text": "",
|
| 275 |
+
"bbox": [
|
| 276 |
+
174,
|
| 277 |
+
102,
|
| 278 |
+
825,
|
| 279 |
+
204
|
| 280 |
+
],
|
| 281 |
+
"page_idx": 3
|
| 282 |
+
},
|
| 283 |
+
{
|
| 284 |
+
"type": "text",
|
| 285 |
+
"text": "Corollary. The higher the confidence of the output, the lower is the entropy. Hence a direct corollary of Hein et al. (2019)’s result is that the entropy of the classifier output for data far away from the in-distribution data in all directions would almost always be arbitrarily low (approaching 0) like the in-distribution samples. This makes it almost impossible to detect OOD samples based on the confidence or the entropy of the classifier outputs. For the case of bounded input domain, as one can increase the prediction confidence for OOD samples far from the in-distribution, the entropy of classifier output also decreases making those OOD samples to be classified as in-distribution samples. Therefore, the approaches in Lee et al. (2018a) and Sricharan & Srivastava (2018) would not be applicable. ",
|
| 286 |
+
"bbox": [
|
| 287 |
+
174,
|
| 288 |
+
210,
|
| 289 |
+
825,
|
| 290 |
+
337
|
| 291 |
+
],
|
| 292 |
+
"page_idx": 3
|
| 293 |
+
},
|
| 294 |
+
{
|
| 295 |
+
"type": "text",
|
| 296 |
+
"text": "4 ADDING AN EXPLICIT “REJECT” CLASS ",
|
| 297 |
+
"text_level": 1,
|
| 298 |
+
"bbox": [
|
| 299 |
+
176,
|
| 300 |
+
362,
|
| 301 |
+
531,
|
| 302 |
+
377
|
| 303 |
+
],
|
| 304 |
+
"page_idx": 3
|
| 305 |
+
},
|
| 306 |
+
{
|
| 307 |
+
"type": "text",
|
| 308 |
+
"text": "When OOD samples are generated close to the in-distribution and follow its low-density boundaries as proposed in Lee et al. (2018a) and Sricharan & Srivastava (2018), we recommend adding an explicit reject class for OOD samples instead of minimizing the loss in Eq.1(b). Let the resulting classifier be called the reject-classifier. By adding an explicit reject class, our goal is to obtain a decision boundary close to the ideal decision boundary shown in Figure.1b, where the decision boundary of a $K + 1$ classifier divides the input space into regions such that the in-distribution region is classified as one of the first $K$ classes and the rest of the region as the $K + 1 ^ { t h }$ class, i.e., the reject class. The intuition on how such a decision boundary can be obtained is as follows. The arbitrarily high confidence predictions happen in polytopes that stretch to infinity (or stretch till the bounds of input space in case of bounded input space). Each of the “infinity polytopes” has its own class (or classes), $k ^ { * } ( \\mathrm { o r } k ^ { * } \\mathrm { s } )$ where high confidence predictions occur. If adding an explicit “reject” class results in $k ^ { * } =$ reject-class for all the “infinity polytopes” (i.e there is only one $k ^ { * }$ ), the arbitrarily high confidence predictions would only happen at the reject class for OOD samples far-off from training data. Therefore, these samples will be detected as OOD. We argue that in reject-classifier training, since we explicitly maximize the prediction confidence of $K \\bar { + } 1 ^ { t h }$ -class for boundary OOD samples, we expect the same effect to persist for OOD samples far from the in-distribution as well (i.e., $k ^ { * } = K + 1$ ) resulting in close to ideal decision boundaries depicted in Figure.1b. This claim is supported by our experiments on a toy dataset (Figure. 5) and the superior performance of the reject-classifier over the confident-classifier on MNIST and Fashion MNIST datasets (Table. 1). Note that how close the resulting decision boundary of the reject-classifier is to the ideal one depends on how well the OOD samples follow the in-distribution boundary. We find that the method proposed in Lee et al. (2018a) to generate boundary OOD samples is not diverse enough as evidenced by experiments shown in the appendix (Section. D). Therefore we propose a novel approach for boundary OOD sample generation which is described in the next section that results in better boundary OOD samples that cover the in-distribution boundary quite effectively. This evident from our experiments described in the appendix (Section. D). ",
|
| 309 |
+
"bbox": [
|
| 310 |
+
173,
|
| 311 |
+
396,
|
| 312 |
+
825,
|
| 313 |
+
756
|
| 314 |
+
],
|
| 315 |
+
"page_idx": 3
|
| 316 |
+
},
|
| 317 |
+
{
|
| 318 |
+
"type": "text",
|
| 319 |
+
"text": "Lee et al. (2018a) indeed experiment with adding an explicit reject class instead of using a confidentclassifier, but the results are found to be worse. But this is because instead of using the boundary OOD samples they use another natural image dataset called “seen OOD” similar to Hendrycks et al. (2019) to train the classifier. However for images, it is difficult to represent the entire OOD space with a small number of samples such methods may not perform that well. Moreover as pointed out in both Lee et al. (2018a) and Hendrycks et al. (2019), as these “seen OOD” samples aren’t diverse, when used to train a reject classifier they can overfit to these training OOD samples. However we use boundary OOD samples that can guide the decision boundary of the classifier to be bounded around the in-distribution regions as depicted in Figure. 1b ",
|
| 320 |
+
"bbox": [
|
| 321 |
+
174,
|
| 322 |
+
762,
|
| 323 |
+
825,
|
| 324 |
+
888
|
| 325 |
+
],
|
| 326 |
+
"page_idx": 3
|
| 327 |
+
},
|
| 328 |
+
{
|
| 329 |
+
"type": "text",
|
| 330 |
+
"text": "Note that both the reject-classifier and the confident-classifier use boundary OOD samples for training. The confident-classifier tries to equalize $f _ { k }$ ’s for boundary OOD samples (i.e., maximize the entropy of output predictions) and expect this to persist over OOD samples far from the in-distribution as well (i.e., have multiple $k ^ { * }$ ’s). The reject-classifier on the other hand maximizes the prediction confidence of $K + 1 ^ { t h }$ for boundary OOD samples and expects it to persists over OOD samples far from the in-distribution (i.e., have a single $k ^ { * }$ at $k = K + 1 ,$ ). confidence $f _ { k }$ . In the unbounded case, for a confident-classifier, while it is proven that one can almost always find arbitrarily high confidence regions far from the in-distribution, for a reject classifier we can still expect those OOD samples to be classified as belonging to the $K + 1 ^ { t h }$ class. In the bounded case too as shown previously, one can obtain decreasingly low entropy regions far from the in-distribution for the confident classifier whereas for the reject-classifier it is similar to the unbounded case. As evident from the experimental results in Figure. 5 we can indeed find OOD samples with low entropy for the confident-classifiers without stretching to infinity, whereas for the reject-classifier, all those OOD samples far away from the in-distribution are correctly classified as OOD. The results in Table. 1 further reinforces the superiority of the reject-classifier over the confident classifier. ",
|
| 331 |
+
"bbox": [
|
| 332 |
+
176,
|
| 333 |
+
895,
|
| 334 |
+
821,
|
| 335 |
+
924
|
| 336 |
+
],
|
| 337 |
+
"page_idx": 3
|
| 338 |
+
},
|
| 339 |
+
{
|
| 340 |
+
"type": "image",
|
| 341 |
+
"img_path": "images/85ee5d4b168a7594194226d2a45f33753354b069c1af13abd85c4244d8630201.jpg",
|
| 342 |
+
"image_caption": [
|
| 343 |
+
"Figure 3: Categories of OOD samples that we generate: (a) Type I (yellow), which includes samples that are close to the data but outside the in-distribution sub-manifolds, and (b) Type II (black), which includes samples that lie on the in-distribution sub-manifolds and trace the in-distribution boundary; in-distribution clusters are represented through blue and red points. "
|
| 344 |
+
],
|
| 345 |
+
"image_footnote": [],
|
| 346 |
+
"bbox": [
|
| 347 |
+
205,
|
| 348 |
+
98,
|
| 349 |
+
792,
|
| 350 |
+
239
|
| 351 |
+
],
|
| 352 |
+
"page_idx": 4
|
| 353 |
+
},
|
| 354 |
+
{
|
| 355 |
+
"type": "text",
|
| 356 |
+
"text": "",
|
| 357 |
+
"bbox": [
|
| 358 |
+
173,
|
| 359 |
+
335,
|
| 360 |
+
825,
|
| 361 |
+
516
|
| 362 |
+
],
|
| 363 |
+
"page_idx": 4
|
| 364 |
+
},
|
| 365 |
+
{
|
| 366 |
+
"type": "text",
|
| 367 |
+
"text": "5 OUT-OF-DISTRIBUTION SAMPLE GENERATION ",
|
| 368 |
+
"text_level": 1,
|
| 369 |
+
"bbox": [
|
| 370 |
+
174,
|
| 371 |
+
537,
|
| 372 |
+
591,
|
| 373 |
+
554
|
| 374 |
+
],
|
| 375 |
+
"page_idx": 4
|
| 376 |
+
},
|
| 377 |
+
{
|
| 378 |
+
"type": "text",
|
| 379 |
+
"text": "The proposed approach leverages the following generic assumptions (Cayton (2005), Narayanan & Mitter (2010), Rifai et al. (2011)) that hold true for a wide range of problems, primarily for image data, which is the data used to validate our approach. ",
|
| 380 |
+
"bbox": [
|
| 381 |
+
174,
|
| 382 |
+
570,
|
| 383 |
+
825,
|
| 384 |
+
612
|
| 385 |
+
],
|
| 386 |
+
"page_idx": 4
|
| 387 |
+
},
|
| 388 |
+
{
|
| 389 |
+
"type": "text",
|
| 390 |
+
"text": "The manifold hypothesis states that the higher dimensional real-world data in the input space is likely concentrated on a much lower-dimensional sub-manifold. ",
|
| 391 |
+
"bbox": [
|
| 392 |
+
176,
|
| 393 |
+
619,
|
| 394 |
+
820,
|
| 395 |
+
647
|
| 396 |
+
],
|
| 397 |
+
"page_idx": 4
|
| 398 |
+
},
|
| 399 |
+
{
|
| 400 |
+
"type": "text",
|
| 401 |
+
"text": "The multi-class manifold hypothesis states that, if data contains multiple classes, different classes correspond to disjoint sub-manifolds separated by low-density regions in the input space. ",
|
| 402 |
+
"bbox": [
|
| 403 |
+
173,
|
| 404 |
+
655,
|
| 405 |
+
823,
|
| 406 |
+
683
|
| 407 |
+
],
|
| 408 |
+
"page_idx": 4
|
| 409 |
+
},
|
| 410 |
+
{
|
| 411 |
+
"type": "text",
|
| 412 |
+
"text": "To fully cover the “boundary” of in-distribution, we identify two categories of OOD samples that are to be generated. As shown in Figure 3, Type I) are the OOD samples that are close but outside the in-distribution sub-manifolds; Type II) are the OOD samples that are on the sub-manifolds but close to the “boundary” of the in-distribution. ",
|
| 413 |
+
"bbox": [
|
| 414 |
+
174,
|
| 415 |
+
689,
|
| 416 |
+
825,
|
| 417 |
+
746
|
| 418 |
+
],
|
| 419 |
+
"page_idx": 4
|
| 420 |
+
},
|
| 421 |
+
{
|
| 422 |
+
"type": "text",
|
| 423 |
+
"text": "5.1 OOD SAMPLES OUTSIDE THE DATA MANIFOLD ",
|
| 424 |
+
"text_level": 1,
|
| 425 |
+
"bbox": [
|
| 426 |
+
174,
|
| 427 |
+
765,
|
| 428 |
+
537,
|
| 429 |
+
779
|
| 430 |
+
],
|
| 431 |
+
"page_idx": 4
|
| 432 |
+
},
|
| 433 |
+
{
|
| 434 |
+
"type": "text",
|
| 435 |
+
"text": "These samples are obtained by adding small perturbations to in-distribution samples that are concentrated on the manifold. These perturbations should be added in directions such that the resulting samples should fall outside the manifold. The directions locally normal to the data-supporting manifold can be thought of as the directions that are less likely to contain in-distribution samples and the tangent directions as the more likely ones. Therefore we add perturbations in the normal directions to get OOD samples. ",
|
| 436 |
+
"bbox": [
|
| 437 |
+
174,
|
| 438 |
+
790,
|
| 439 |
+
825,
|
| 440 |
+
875
|
| 441 |
+
],
|
| 442 |
+
"page_idx": 4
|
| 443 |
+
},
|
| 444 |
+
{
|
| 445 |
+
"type": "text",
|
| 446 |
+
"text": "Deep generative models such as VAEs (Kingma & Welling, 2013) and GANs (Goodfellow et al., 2014b) can model the data manifold of observations $\\pmb { x } \\in X$ through corresponding latent variables $z \\in Z$ via a mapping function $g : Z \\to X$ as $x = g ( z )$ . With a choice of reasonably lower dimensional $_ { z }$ and a flexible generative function $g$ , the model can efficiently represent the true data manifold. Following the multi-class manifold hypothesis, we use a conditional generative model that is conditioned over the class labels. For our experiments, we use a conditional variational autoencoder (CVAE). ",
|
| 447 |
+
"bbox": [
|
| 448 |
+
176,
|
| 449 |
+
882,
|
| 450 |
+
823,
|
| 451 |
+
924
|
| 452 |
+
],
|
| 453 |
+
"page_idx": 4
|
| 454 |
+
},
|
| 455 |
+
{
|
| 456 |
+
"type": "image",
|
| 457 |
+
"img_path": "images/eb80af552ded9e37ae5a909d865cca318bdcb9efa3297135da6c31c205cf67b5.jpg",
|
| 458 |
+
"image_caption": [
|
| 459 |
+
"Figure 4: Generated OOD samples using the proposed method; Type I OOD samples typically modify the background pixels (normal components have the least variance), while Type II OOD samples modify the object pixels. "
|
| 460 |
+
],
|
| 461 |
+
"image_footnote": [],
|
| 462 |
+
"bbox": [
|
| 463 |
+
187,
|
| 464 |
+
112,
|
| 465 |
+
812,
|
| 466 |
+
246
|
| 467 |
+
],
|
| 468 |
+
"page_idx": 5
|
| 469 |
+
},
|
| 470 |
+
{
|
| 471 |
+
"type": "text",
|
| 472 |
+
"text": "",
|
| 473 |
+
"bbox": [
|
| 474 |
+
173,
|
| 475 |
+
324,
|
| 476 |
+
825,
|
| 477 |
+
381
|
| 478 |
+
],
|
| 479 |
+
"page_idx": 5
|
| 480 |
+
},
|
| 481 |
+
{
|
| 482 |
+
"type": "text",
|
| 483 |
+
"text": "Let $h : X \\to Z$ and $g : Z \\to { \\hat { X } }$ denote the encoder and decoder functions of CVAE respectively. The tangent space of the manifold at a point $\\pmb { x } \\in X$ is given by the column space of the Jacobian4 ",
|
| 484 |
+
"bbox": [
|
| 485 |
+
173,
|
| 486 |
+
387,
|
| 487 |
+
823,
|
| 488 |
+
417
|
| 489 |
+
],
|
| 490 |
+
"page_idx": 5
|
| 491 |
+
},
|
| 492 |
+
{
|
| 493 |
+
"type": "equation",
|
| 494 |
+
"img_path": "images/5212a8af96a6c365e592d8cb33ab5ac7fb8d261f4b81695b5c0711b5dfe58ad6.jpg",
|
| 495 |
+
"text": "$$\nJ ( { \\pmb x } ) = \\frac { \\partial g ( { \\pmb z } ) } { \\partial { \\pmb z } } \\bigg | _ { { \\pmb z } = h ( { \\pmb x } ) }\n$$",
|
| 496 |
+
"text_format": "latex",
|
| 497 |
+
"bbox": [
|
| 498 |
+
411,
|
| 499 |
+
422,
|
| 500 |
+
586,
|
| 501 |
+
462
|
| 502 |
+
],
|
| 503 |
+
"page_idx": 5
|
| 504 |
+
},
|
| 505 |
+
{
|
| 506 |
+
"type": "text",
|
| 507 |
+
"text": "Let ${ \\cal N } ( { \\pmb x } )$ denote the null-space of ${ \\pmb J } ^ { T } ( { \\pmb x } )$ (left null space of $\\pmb { J } ( \\pmb { x } ) )$ . Then the basis vectors of ${ \\cal N } ( x )$ span the normal bundle of the manifold at $_ { \\textbf { \\em x } }$ . Let ${ \\pmb v } ( { \\pmb x } ) \\sim { \\pmb N } ( { \\pmb x } )$ be a randomly sampled unit vector from ${ \\cal N } ( { \\pmb x } )$ , then the perturbed sample is given by, ",
|
| 508 |
+
"bbox": [
|
| 509 |
+
173,
|
| 510 |
+
468,
|
| 511 |
+
825,
|
| 512 |
+
512
|
| 513 |
+
],
|
| 514 |
+
"page_idx": 5
|
| 515 |
+
},
|
| 516 |
+
{
|
| 517 |
+
"type": "equation",
|
| 518 |
+
"img_path": "images/c3a646df1c7228843e8165354ed54de7a4b43880c6c6cb5a41782f1d38bd289d.jpg",
|
| 519 |
+
"text": "$$\n\\tilde { \\pmb { x } } = \\pmb { x } + \\beta \\pmb { v } ( \\pmb { x } )\n$$",
|
| 520 |
+
"text_format": "latex",
|
| 521 |
+
"bbox": [
|
| 522 |
+
444,
|
| 523 |
+
517,
|
| 524 |
+
553,
|
| 525 |
+
534
|
| 526 |
+
],
|
| 527 |
+
"page_idx": 5
|
| 528 |
+
},
|
| 529 |
+
{
|
| 530 |
+
"type": "text",
|
| 531 |
+
"text": "where $\\beta \\in \\mathbb { R }$ is a hyper-parameter that controls how far the perturbed sample is from the indistribution point. In our experiments, we use a stochastic $\\beta$ that is uniformly sampled from in the range [0.1, 1.0]. As discussed before, for better OOD detection, the boundary samples generated should be diverse; because the proposed approach generates OOD samples by randomly perturbing every in-distribution training sample, the diversity of the generated samples is ensured. This is visually apparent from the experimental results on a 3D-dataset shown in section D of appendix. Figure 4 illustrates the perturbed samples for MNIST and Fashion MNIST datasets. One can observe that the perturbations added mostly modify the background pixels than the object pixels. This is because the normal directions to the manifold mostly represent least variance components of the image. ",
|
| 532 |
+
"bbox": [
|
| 533 |
+
173,
|
| 534 |
+
539,
|
| 535 |
+
825,
|
| 536 |
+
665
|
| 537 |
+
],
|
| 538 |
+
"page_idx": 5
|
| 539 |
+
},
|
| 540 |
+
{
|
| 541 |
+
"type": "text",
|
| 542 |
+
"text": "5.2 OOD SAMPLES ON THE DATA MANIFOLD ",
|
| 543 |
+
"text_level": 1,
|
| 544 |
+
"bbox": [
|
| 545 |
+
174,
|
| 546 |
+
681,
|
| 547 |
+
498,
|
| 548 |
+
695
|
| 549 |
+
],
|
| 550 |
+
"page_idx": 5
|
| 551 |
+
},
|
| 552 |
+
{
|
| 553 |
+
"type": "text",
|
| 554 |
+
"text": "These are the samples that are in the low-density regions of the input space but close to the indistribution boundaries on the manifold. ",
|
| 555 |
+
"bbox": [
|
| 556 |
+
176,
|
| 557 |
+
707,
|
| 558 |
+
821,
|
| 559 |
+
736
|
| 560 |
+
],
|
| 561 |
+
"page_idx": 5
|
| 562 |
+
},
|
| 563 |
+
{
|
| 564 |
+
"type": "text",
|
| 565 |
+
"text": "For a variational auto-encoder, the aggregate posterior $q ( z )$ (Makhzani et al., 2015) is given by, ",
|
| 566 |
+
"bbox": [
|
| 567 |
+
173,
|
| 568 |
+
742,
|
| 569 |
+
799,
|
| 570 |
+
758
|
| 571 |
+
],
|
| 572 |
+
"page_idx": 5
|
| 573 |
+
},
|
| 574 |
+
{
|
| 575 |
+
"type": "equation",
|
| 576 |
+
"img_path": "images/5545ce97da41031fc2c9a39331d3468773411a0d22a3dbdbf9fee9fc14c1e36d.jpg",
|
| 577 |
+
"text": "$$\nq ( z ) = \\int _ { \\pmb { x } } q ( \\pmb { z } | \\pmb { x } ) p _ { i n } ( \\pmb { x } ) d z\n$$",
|
| 578 |
+
"text_format": "latex",
|
| 579 |
+
"bbox": [
|
| 580 |
+
405,
|
| 581 |
+
763,
|
| 582 |
+
593,
|
| 583 |
+
796
|
| 584 |
+
],
|
| 585 |
+
"page_idx": 5
|
| 586 |
+
},
|
| 587 |
+
{
|
| 588 |
+
"type": "text",
|
| 589 |
+
"text": "where $p _ { i n } ( { \\pmb x } )$ is the probability density function of in-distribution and $q ( \\pmb { z } / \\pmb { x } )$ is the approximate posterior. Assuming a smooth decoder, the high-density regions in the aggregate posterior can be thought of as corresponding to densely populated regions in the input space, and the input space density would gradually decrease as we sample away from the high-density regions in the aggregate posterior. Therefore the in-distribution boundary on the manifold can be approximated by regions at a distance away from the high-density areas where the density dips below a certain threshold. For our experiments, we approximate $q ( z )$ with a uni-modal Gaussian distribution whose mean $\\hat { \\mu }$ and co-variance $\\hat { \\Sigma }$ are estimated using the encoder mappings of in-distribution samples. We use Mahalanobis distance as a criterion to determine the distance from the mean to sample and generate the required OOD samples. Let $r$ be the Mahalanobis distance from the mean of $q ( z )$ that encompasses $9 5 \\%$ of the training data. The OOD samples are generated by decoding the uniformly sampled samples from the latent space over the surface of a hyper-ellipsoid (Rubinstein, 1982) defined by 5, where $\\hat { \\mu } _ { z }$ and $\\hat { \\Sigma } _ { z }$ are the mean and co-variance estimates of $q ( z )$ , respectively. ",
|
| 590 |
+
"bbox": [
|
| 591 |
+
173,
|
| 592 |
+
801,
|
| 593 |
+
825,
|
| 594 |
+
901
|
| 595 |
+
],
|
| 596 |
+
"page_idx": 5
|
| 597 |
+
},
|
| 598 |
+
{
|
| 599 |
+
"type": "text",
|
| 600 |
+
"text": "",
|
| 601 |
+
"bbox": [
|
| 602 |
+
174,
|
| 603 |
+
102,
|
| 604 |
+
825,
|
| 605 |
+
190
|
| 606 |
+
],
|
| 607 |
+
"page_idx": 6
|
| 608 |
+
},
|
| 609 |
+
{
|
| 610 |
+
"type": "equation",
|
| 611 |
+
"img_path": "images/4d3409b25030504b7353bbdbc77486e971d901204efa7bd23ef1e1221f6d741d.jpg",
|
| 612 |
+
"text": "$$\n( z - \\hat { \\mu } _ { z } ) ^ { T } \\hat { \\Sigma } _ { z } ^ { - 1 } ( z - \\hat { \\mu } _ { z } ) = r ^ { 2 }\n$$",
|
| 613 |
+
"text_format": "latex",
|
| 614 |
+
"bbox": [
|
| 615 |
+
398,
|
| 616 |
+
196,
|
| 617 |
+
598,
|
| 618 |
+
217
|
| 619 |
+
],
|
| 620 |
+
"page_idx": 6
|
| 621 |
+
},
|
| 622 |
+
{
|
| 623 |
+
"type": "text",
|
| 624 |
+
"text": "It is fair to assume a uni-modal Gaussian distribution for $q ( z )$ as we fit a Gaussian per class. Moreover, a substantial gain in the ODD detection results when the classifier is trained with these samples can also be taken as evidence pointing towards the validity of such an assumption. ",
|
| 625 |
+
"bbox": [
|
| 626 |
+
174,
|
| 627 |
+
222,
|
| 628 |
+
825,
|
| 629 |
+
265
|
| 630 |
+
],
|
| 631 |
+
"page_idx": 6
|
| 632 |
+
},
|
| 633 |
+
{
|
| 634 |
+
"type": "text",
|
| 635 |
+
"text": "The generated OOD samples described in 5.1 and 5.2 are then used to train an $n + 1$ class softmax classifier, where the $n + \\mathbf { \\hat { l } } ^ { t h }$ class represents the OOD class. ",
|
| 636 |
+
"bbox": [
|
| 637 |
+
174,
|
| 638 |
+
271,
|
| 639 |
+
823,
|
| 640 |
+
300
|
| 641 |
+
],
|
| 642 |
+
"page_idx": 6
|
| 643 |
+
},
|
| 644 |
+
{
|
| 645 |
+
"type": "text",
|
| 646 |
+
"text": "6 EXPERIMENTS ",
|
| 647 |
+
"text_level": 1,
|
| 648 |
+
"bbox": [
|
| 649 |
+
174,
|
| 650 |
+
320,
|
| 651 |
+
326,
|
| 652 |
+
337
|
| 653 |
+
],
|
| 654 |
+
"page_idx": 6
|
| 655 |
+
},
|
| 656 |
+
{
|
| 657 |
+
"type": "text",
|
| 658 |
+
"text": "Experiments5 are divided into 2 sections; the first section explains the toy experiments on a lowdimensional dataset to support our theoretical analysis of the confident-classifier, the second section gives details of OOD detection experiments on MNIST and Fashion MNIST ((Xiao et al., 2017)) using the proposed method. ",
|
| 659 |
+
"bbox": [
|
| 660 |
+
174,
|
| 661 |
+
352,
|
| 662 |
+
825,
|
| 663 |
+
409
|
| 664 |
+
],
|
| 665 |
+
"page_idx": 6
|
| 666 |
+
},
|
| 667 |
+
{
|
| 668 |
+
"type": "text",
|
| 669 |
+
"text": "6.1 LIMITATIONS OF CONFIDENT-CLASSIFIERS ",
|
| 670 |
+
"text_level": 1,
|
| 671 |
+
"bbox": [
|
| 672 |
+
174,
|
| 673 |
+
425,
|
| 674 |
+
511,
|
| 675 |
+
439
|
| 676 |
+
],
|
| 677 |
+
"page_idx": 6
|
| 678 |
+
},
|
| 679 |
+
{
|
| 680 |
+
"type": "text",
|
| 681 |
+
"text": "In these experiments, the input space is $\\mathbb { R } ^ { 2 }$ and the in-distribution consists of 2-classes. The samples for each of these classes are generated by sampling from 2 Gaussians with identity co-variances and means (-10, 0) and (10, 0) respectively, on the Cartesian coordinates. Anything outside 3 standard deviations (Mahalanobis distance) from the in-distribution means is considered OOD. The architecture of the neural network used is similar to the one used in Lee et al. (2018a), which is a ReLU-classifier with 2 fully-connected hidden layers with 500 neurons each. ",
|
| 682 |
+
"bbox": [
|
| 683 |
+
174,
|
| 684 |
+
450,
|
| 685 |
+
825,
|
| 686 |
+
535
|
| 687 |
+
],
|
| 688 |
+
"page_idx": 6
|
| 689 |
+
},
|
| 690 |
+
{
|
| 691 |
+
"type": "text",
|
| 692 |
+
"text": "Following the case in Lee et al. (2018a), for training, OOD samples are generated close to the indistribution as shown in Figure 5a. For testing, OOD samples are uniformly sampled from a 2D box $[ - 5 0 , 5 0 ] ^ { 2 }$ excluding the in-distribution regions. ",
|
| 693 |
+
"bbox": [
|
| 694 |
+
176,
|
| 695 |
+
541,
|
| 696 |
+
823,
|
| 697 |
+
584
|
| 698 |
+
],
|
| 699 |
+
"page_idx": 6
|
| 700 |
+
},
|
| 701 |
+
{
|
| 702 |
+
"type": "image",
|
| 703 |
+
"img_path": "images/c8a4126fa3994defb8d8e54d656f8525d7b279e2941dfe07ebdbc8b64984f1c5.jpg",
|
| 704 |
+
"image_caption": [
|
| 705 |
+
"Figure 5: Plots for boundary OOD samples experiments. (a) Training data in 2D. (b) Maximum prediction output on test data for a confident-classifier. (c) Classification output of a classifier with a “reject” class on test data $\\mathrm { T C } =$ true class, $\\mathbf { P C = }$ predicted class). "
|
| 706 |
+
],
|
| 707 |
+
"image_footnote": [],
|
| 708 |
+
"bbox": [
|
| 709 |
+
173,
|
| 710 |
+
598,
|
| 711 |
+
825,
|
| 712 |
+
773
|
| 713 |
+
],
|
| 714 |
+
"page_idx": 6
|
| 715 |
+
},
|
| 716 |
+
{
|
| 717 |
+
"type": "text",
|
| 718 |
+
"text": "From Figure 5b, we observe that the ReLU-classifier trained to optimize confidence loss results in highly confident predictions for many OOD samples far from the in-distribution data. This renders the classifier ineffective at classifying the in and out of distribution samples based on the maximum prediction score (confidence) or the entropy of the output. However, from Figure 5c, for a classifier trained with explicit reject class, the test OOD samples are indeed classified as OOD. This supports the aforementioned intuitions in 4. ",
|
| 719 |
+
"bbox": [
|
| 720 |
+
174,
|
| 721 |
+
843,
|
| 722 |
+
825,
|
| 723 |
+
900
|
| 724 |
+
],
|
| 725 |
+
"page_idx": 6
|
| 726 |
+
},
|
| 727 |
+
{
|
| 728 |
+
"type": "text",
|
| 729 |
+
"text": "",
|
| 730 |
+
"bbox": [
|
| 731 |
+
173,
|
| 732 |
+
103,
|
| 733 |
+
823,
|
| 734 |
+
132
|
| 735 |
+
],
|
| 736 |
+
"page_idx": 7
|
| 737 |
+
},
|
| 738 |
+
{
|
| 739 |
+
"type": "text",
|
| 740 |
+
"text": "Note that these are not the results specific to a certain architecture of the neural network. Experiments with different hyper-parameters such as the number of hidden neurons, changing input dimensions, using sigmoid activation functions instead of ReLU lead to similar results. We remark however that for sigmoid networks, the results were not as extreme (in terms of the number of OOD samples with high-confidence) as for ReLU networks. This is understandable because sigmoid activation outputs will not produce arbitrarily large values, unlike the ReLU counterparts. ",
|
| 741 |
+
"bbox": [
|
| 742 |
+
174,
|
| 743 |
+
138,
|
| 744 |
+
825,
|
| 745 |
+
222
|
| 746 |
+
],
|
| 747 |
+
"page_idx": 7
|
| 748 |
+
},
|
| 749 |
+
{
|
| 750 |
+
"type": "text",
|
| 751 |
+
"text": "6.2 MNIST AND FASHION MNIST EXPERIMENTS ",
|
| 752 |
+
"text_level": 1,
|
| 753 |
+
"bbox": [
|
| 754 |
+
174,
|
| 755 |
+
239,
|
| 756 |
+
532,
|
| 757 |
+
255
|
| 758 |
+
],
|
| 759 |
+
"page_idx": 7
|
| 760 |
+
},
|
| 761 |
+
{
|
| 762 |
+
"type": "text",
|
| 763 |
+
"text": "We validated our approach on MNIST and Fashion MNIST as in-distribution datasets and several other OOD datasets. For all MNIST as in-distribution experiments, we use a CVAE with a latent dimension of 8, and for Fashion MNIST, the latent dimension is set to 10. We compare our approach against the recent classifier-based OOD detectors such as confident-classifier, ODIN and Mahalanobis distance-based approach without feature ensemble $( \\mathrm { M D } ) ^ { 6 }$ . The architecture for both CVAE and the classifier used are shown in the appendix. Both the networks are trained till convergence. ",
|
| 764 |
+
"bbox": [
|
| 765 |
+
174,
|
| 766 |
+
266,
|
| 767 |
+
825,
|
| 768 |
+
349
|
| 769 |
+
],
|
| 770 |
+
"page_idx": 7
|
| 771 |
+
},
|
| 772 |
+
{
|
| 773 |
+
"type": "text",
|
| 774 |
+
"text": "6.2.1 OOD DATASETS ",
|
| 775 |
+
"text_level": 1,
|
| 776 |
+
"bbox": [
|
| 777 |
+
174,
|
| 778 |
+
366,
|
| 779 |
+
339,
|
| 780 |
+
381
|
| 781 |
+
],
|
| 782 |
+
"page_idx": 7
|
| 783 |
+
},
|
| 784 |
+
{
|
| 785 |
+
"type": "text",
|
| 786 |
+
"text": "MNIST is used as an OOD dataset for Fashion MNIST as in-distribution, and vice-versa. For MNIST 0-4 experiment, we use images in class 0 through 4 as in-distribution and class 5 through 9 as OOD. We use both character datasets and noise generated images as OOD datasets. The character datasets are Omniglot (Lake et al., 2015), EMNIST-letters (Cohen et al., 2017) and NotMNIST (Bulatov, 2011). The noise generated images are described below. ",
|
| 787 |
+
"bbox": [
|
| 788 |
+
174,
|
| 789 |
+
391,
|
| 790 |
+
825,
|
| 791 |
+
460
|
| 792 |
+
],
|
| 793 |
+
"page_idx": 7
|
| 794 |
+
},
|
| 795 |
+
{
|
| 796 |
+
"type": "text",
|
| 797 |
+
"text": "Gaussian noise includes gray-scale images, where each pixel is sampled from an independent normal distribution with 0.5 mean and unit-variance. ",
|
| 798 |
+
"bbox": [
|
| 799 |
+
173,
|
| 800 |
+
468,
|
| 801 |
+
823,
|
| 802 |
+
496
|
| 803 |
+
],
|
| 804 |
+
"page_idx": 7
|
| 805 |
+
},
|
| 806 |
+
{
|
| 807 |
+
"type": "text",
|
| 808 |
+
"text": "Uniform noise includes gray-scale images where each pixel is sampled from an independent uniform distribution in the range $[ 0 , 1 ]$ . ",
|
| 809 |
+
"bbox": [
|
| 810 |
+
173,
|
| 811 |
+
503,
|
| 812 |
+
821,
|
| 813 |
+
532
|
| 814 |
+
],
|
| 815 |
+
"page_idx": 7
|
| 816 |
+
},
|
| 817 |
+
{
|
| 818 |
+
"type": "text",
|
| 819 |
+
"text": "Sphere OOD contains images sampled from the surface of a 784 dimensional hyper-sphere centered at the origin with a radius equal to the maximum Euclidean distance of in-distribution samples from the origin and reshaped to $2 8 \\times 2 8$ . This is used to show the effectiveness of our approach not only on the datasets that are restricted to a finite range such as $[ 0 , 1 ] ^ { d }$ for images in $[ 0 , \\dot { 1 } ] ^ { d }$ but also for a general case of $\\mathbb { R } ^ { d }$ . ",
|
| 820 |
+
"bbox": [
|
| 821 |
+
174,
|
| 822 |
+
537,
|
| 823 |
+
825,
|
| 824 |
+
608
|
| 825 |
+
],
|
| 826 |
+
"page_idx": 7
|
| 827 |
+
},
|
| 828 |
+
{
|
| 829 |
+
"type": "text",
|
| 830 |
+
"text": "6.2.2 EVALUATION METRICS FOR OOD DETECTION ",
|
| 831 |
+
"text_level": 1,
|
| 832 |
+
"bbox": [
|
| 833 |
+
174,
|
| 834 |
+
623,
|
| 835 |
+
544,
|
| 836 |
+
638
|
| 837 |
+
],
|
| 838 |
+
"page_idx": 7
|
| 839 |
+
},
|
| 840 |
+
{
|
| 841 |
+
"type": "text",
|
| 842 |
+
"text": "We experimented with two different metrics as OOD score to determine if the given input sample is in or out of distribution. OOD class probability is the $n + 1 ^ { t h }$ class prediction probability. Indistribution max probability is the maximum prediction probabilities of the in-distribution classes. A higher (lower) OOD class probability (in-distribution max probability) indicates a higher probability of a sample being OOD. Except for MNIST 0-4 experiments, we find that the former metric gives the best results. We report only the best score in Table 1. We use the area under the ROC curve (AUROC↑), the area under the precision-recall curve (AUPR↑), the false positive rate at $9 5 \\%$ true positive rate (FPR95↓) and the detection error as the metrics for evaluation. These metrics are commonly used for evaluating OOD detection methods (Lee et al., 2018a; Hendrycks et al., 2019). The details of which are in the appendix. ",
|
| 843 |
+
"bbox": [
|
| 844 |
+
174,
|
| 845 |
+
648,
|
| 846 |
+
825,
|
| 847 |
+
787
|
| 848 |
+
],
|
| 849 |
+
"page_idx": 7
|
| 850 |
+
},
|
| 851 |
+
{
|
| 852 |
+
"type": "text",
|
| 853 |
+
"text": "6.2.3 DETECTION RESULTS ",
|
| 854 |
+
"text_level": 1,
|
| 855 |
+
"bbox": [
|
| 856 |
+
176,
|
| 857 |
+
804,
|
| 858 |
+
379,
|
| 859 |
+
818
|
| 860 |
+
],
|
| 861 |
+
"page_idx": 7
|
| 862 |
+
},
|
| 863 |
+
{
|
| 864 |
+
"type": "text",
|
| 865 |
+
"text": "Table 1 compares our approach with other approaches for experiments on MNIST and Fashion MNIST as in-distribution datasets. Since the classifier is trained with OOD samples, there is a possibility of reduction in the classification accuracy of in-distribution classes in comparison to training without OOD class. We therefore report classification accuracy of a classifier trained with and without OOD samples. We find that there is no significant change in accuracy. Training our method requires tuning hyper-parameter such as $\\beta$ from Eq. 4, OOD class weight, and learning rate. The hyper-parameters were chosen based on the in-distribution classification accuracy and the AUROC of the validation generated OOD samples and the random noise datasets. For all our experiments we use a stochastic $\\beta$ uniformly sampled in the range [0.1, 1], OOD class weight is set to 0.1, while the weights for the rest of the classes is set to 1.0, and Adadelta (Zeiler, 2012) is the optimizer used with learning rates of 0.1 and 0.01 for Fashion-MNIST and MNIST experiments, respectively. We do not tune the hyper parameters per OOD dataset unlike ODIN and Mahalanobis distance-based approaches, where the perturbation magnitude is tuned per OOD dataset. Even without this advantage, our method still performs better than these baselines for most of the OOD datasets. ",
|
| 866 |
+
"bbox": [
|
| 867 |
+
174,
|
| 868 |
+
829,
|
| 869 |
+
823,
|
| 870 |
+
898
|
| 871 |
+
],
|
| 872 |
+
"page_idx": 7
|
| 873 |
+
},
|
| 874 |
+
{
|
| 875 |
+
"type": "table",
|
| 876 |
+
"img_path": "images/0d0d5dc21263aca5b08148a42106ba94d1a74b0fb9d4c1bb5552560f2fe30717.jpg",
|
| 877 |
+
"table_caption": [
|
| 878 |
+
"Table 1: OOD detection results "
|
| 879 |
+
],
|
| 880 |
+
"table_footnote": [],
|
| 881 |
+
"table_body": "<table><tr><td rowspan=\"2\">ID Model (acc before OOD/ acc after OOD)</td><td rowspan=\"2\">OOD</td><td>FPR at 95% TPR↓</td><td>Detection Error↓</td><td>AUROC↑</td><td>AUPR Out↑</td><td>AUPR In↑</td></tr><tr><td colspan=\"6\">Ours/Confident-Classifier/ODIN/MD</td></tr><tr><td rowspan=\"6\">MNIST (99.0/98.9)</td><td>F-MNIST EMNIST-letters</td><td>0.0/7.9/0.4/94.2 1.6/31.0/25.7/31.2</td><td>0.2/5.6/1.8/11.9 3.0/13.2/11.7/13.6</td><td>100.0/98.5/99.8/86.6 99.6/93.0/94.4/93.2</td><td>100.0/98.8/99.8/92.0 99.6/93.0/94.3/92.7</td><td>100.0/98.4/99.8/74.0 99.6/92.4/94.1/93.2</td></tr><tr><td>NotMNIST</td><td>0.0/26.5/11.3/34.8</td><td>0.0/12.3/6.9/16.3</td><td>100.0/94.0/97.8/91.7</td><td>100.0/93.9/100.0/91.7</td><td>100.0/93.8/97.7/92.3</td></tr><tr><td>Omniglot</td><td>0.0/0.0/0.0/98.5</td><td>0.0/1.0/0.2/46.9 0.0/0.0/0.0/24.6</td><td>100.0/100.0/100.0/19.8 100.0/100.0/100.0/50.9</td><td>100.0/100.0/100.0/40.8 100.0/100.0/100.0/71.8</td><td>100.0/100.0/100.0/35.0</td></tr><tr><td>Gaussian-Noise</td><td>0.0/0.0/0.0/99.9 0.0/0.0/0.0/82.6</td><td>0.0/0.0/0.0/26.4</td><td>100.0/100.0/100.0/65.0</td><td>100.0/100.0/100.0/76.0</td><td>100.0/100.0/100.0/35.1</td></tr><tr><td>Uniform-Noise Sphere-OOD</td><td>0.0/21.6/0.0/80.4</td><td>0.1/6.6/1.4/14.9</td><td>100.0/96.8/99.8/87.6</td><td>100.0/97.8/99.9/91.7</td><td>100.0/100.0/100.0/63.9 100.0/95.2/99.8/79.9</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td rowspan=\"6\">F-MNIST (91.9/91.2)</td><td>MNIST EMNIST-letters</td><td>4.1/87.4/70.2/2.4 6.4/87.3/83.5/10.1</td><td>4.2/36.3/28.9/3.6 5.4/41.8/13.6/7.3</td><td>98.7/67.0/76.7/99.5</td><td>98.2/65.2/73.2/99.5</td><td>100.0/64.8/77.3/99.4</td></tr><tr><td></td><td></td><td></td><td>97.9/61.1/66.6/98.1</td><td>96.8/60.0/62.0/98.3</td><td>98.5/61.6/66.6/98.1</td></tr><tr><td>NotMNIST</td><td>0.8/78.9/80.2/7.2</td><td>1.2/32.2/33.9/5.8 0.9/22.1/7.1/26.8</td><td>99.7/73.7/69.3/97.8</td><td>99.5/73.0/63.0/97.4</td><td>99.8/72.4/70.5/98.2</td></tr><tr><td>Omniglot</td><td>0.0/59.8/9.6/58.4</td><td>0.2/9.6/3.8/19.9</td><td>99.8/85.6/97.9/83.2 99.8/95.8/98.0/80.0</td><td>99.9/85.8/97.6/84.9</td><td>99.6/85.1/98.2/83.4</td></tr><tr><td>Gaussian-Noise Uniform-Noise</td><td>0.0/32.2/4.5/99.7 0.2/71.0/99.4/1.7</td><td>1.3/16.4/24.7/3.3</td><td>99.8/88.6/74.7/98.9</td><td>99.9/96.7/96.7/87.0 99.8/91.8/82.9/99.2</td><td>99.5/94.7/95.6/66.3</td></tr><tr><td>Sphere-OOD</td><td>0.6/99.3/100.0/0.0</td><td>0.8/50.0/50.0/0.0</td><td>99.7/29.6/0.25/100.0</td><td>99.4/39.1/30.7/100.0</td><td>99.8/82.9/61.6/97.9 99.8/37.4/30.7/100.0</td></tr><tr><td rowspan=\"8\">MNIST0-4 (99.8/99.6)</td><td>MNIST5-9</td><td>17.2/21.9/20.4/50.0</td><td>10.0/12.0/11.5/14.4</td><td>95.1/92.9/93.4/92.3</td><td>94.0/92.1/91.3/93.8</td><td>94.9/93.6/94.2/90.1</td></tr><tr><td>F-MNIST</td><td>0.2/1.7/2.0/41.4</td><td>1.6/3.1/3.4/15.1</td><td>99.8/99.4/99.4/92.5</td><td>99.8/99.5/99.4/93.3</td><td>99.7/99.3/99.3/91.9</td></tr><tr><td>EMNIST-letters</td><td>2.7/22.1/26.4/12.9</td><td>3.8/12.4/13.9/7.6</td><td>99.2/92.9/92.3/96.9</td><td>99.3/92.0/90.4/96.6</td><td>99.1/93.6/93.2/97.1</td></tr><tr><td>NotMNIST</td><td>0.0/10.9/28.0/2.8</td><td>0.1/7.7/13.3/3.1</td><td>100.0/97.5/93.5/99.3</td><td>100.0/97.5/92.7/99.2</td><td>100.0/97.6/93.7/99.4</td></tr><tr><td>Omniglot</td><td>0.0/0.0/2.3/0.0</td><td>0.0/0.1/3.6/0.4</td><td>100.0/100.0/99.1/100.0</td><td>100.0/100.0/99.3/100.0</td><td>100.0/100.0/98.8/100.0</td></tr><tr><td>Gaussian-Noise</td><td>0.0/0.0/0.0/0.2</td><td>0.0/0.0/0.1/2.4</td><td>100.0/100.0/100.0/97.5</td><td>100.0/100.0/100.0/98.6</td><td>100.0/100.0/99.7/92.2</td></tr><tr><td>Uniform-Noise</td><td>0.0/0.0/0.0/25.9</td><td>0.0/0.0/0.4/5.1</td><td>100.0/100.0/99.9/95.9</td><td>100.0/100.0/99.9/97.6</td><td>100.0/100.0/99.6/89.4</td></tr><tr><td>Sphere-OOD</td><td>0.0/7.1/0.2/22.7</td><td>0.1/5.5/2.0/6.9</td><td>100.0/98.2/99.6/96.5</td><td>100.0/98.6/99.7/97.6</td><td>100.0/97.4/99.3/93.8</td></tr><tr><td rowspan=\"8\">F-MNIST0-4 (94.2/94.8)</td><td>F-MNIST5-9</td><td>19.7/55.8/29.2/75.8</td><td>12.3/17.1/14.6/26.4</td><td>92.5/89.5/92.1/79.5</td><td>88.7/90.2/91.3/79.8</td><td></td></tr><tr><td>MNIST</td><td>1.8/67.3/53.5/2.0</td><td>2.3/23.6/21.1/3.4</td><td>99.5/83.5/86.4/99.0</td><td>99.4/84.2/86.1/99.3</td><td>94.3/87.1/92.8/77.7</td></tr><tr><td>EMNIST-letters</td><td>1,2/71.6/48.4/14.1</td><td>2.4/24.2/20.3/7.6</td><td>99.6/82.6/87.9/97.6</td><td>99.6/83.8/87.7/98.0</td><td>99.6/81.7/85.7/98.5</td></tr><tr><td>NotMNIST</td><td>0.2/76.0/57.7/11.0</td><td>1.2/26.8/23.6/8.0</td><td>99.9/79.9/84.1/97.0</td><td>99.8/81.3/83.8/96.8</td><td>99,7/79.8/87.9/96.9 99.9/77.1/83.9/97.2</td></tr><tr><td>Omniglot</td><td>1.0/62.3/15.5/11.1</td><td>2.5/18.3/9.1/7.1</td><td>99.5/88.6/96.5/97.5</td><td>99.6/90.6/96.0/97.9</td><td>99.3/85.8/96.7/95.7</td></tr><tr><td>Gaussian-Noise</td><td>0.0/0.3/0.0/99.3</td><td>0.4/2.0/0.4/41.7</td><td>100.0/99.7/100.0/53.4</td><td>100.0/99.8/100.0/62.6</td><td>100.0/99.7/100.0/47.9</td></tr><tr><td>Uniform-Noise</td><td>0.0/9.8/1.3/36.3</td><td>0.3/5.4/3.0/8.5</td><td>100.0/98.1/99.2/95.0</td><td>100.0/98.6/99.4/96.6</td><td>100.0/97.5/98.9/90.1</td></tr><tr><td>Sphere-OOD</td><td>0.0/89.6/95.5/0.0</td><td>0.0/38.3/41.6/0.0</td><td>100.0/65.8/59.8/100.0</td><td>100.0/67.7/62.4/100.0</td><td>100.0/61.9/55.0/100.0</td></tr></table>",
|
| 882 |
+
"bbox": [
|
| 883 |
+
102,
|
| 884 |
+
128,
|
| 885 |
+
893,
|
| 886 |
+
501
|
| 887 |
+
],
|
| 888 |
+
"page_idx": 8
|
| 889 |
+
},
|
| 890 |
+
{
|
| 891 |
+
"type": "text",
|
| 892 |
+
"text": "",
|
| 893 |
+
"bbox": [
|
| 894 |
+
174,
|
| 895 |
+
532,
|
| 896 |
+
825,
|
| 897 |
+
659
|
| 898 |
+
],
|
| 899 |
+
"page_idx": 8
|
| 900 |
+
},
|
| 901 |
+
{
|
| 902 |
+
"type": "text",
|
| 903 |
+
"text": "We would like to remark that our approach gives good OOD detection results consistently on all the OOD datasets used unlike the baselines compared. This indicates that our approach is robust to change in OOD datasets. ",
|
| 904 |
+
"bbox": [
|
| 905 |
+
176,
|
| 906 |
+
665,
|
| 907 |
+
821,
|
| 908 |
+
707
|
| 909 |
+
],
|
| 910 |
+
"page_idx": 8
|
| 911 |
+
},
|
| 912 |
+
{
|
| 913 |
+
"type": "text",
|
| 914 |
+
"text": "7 CONCLUSION ",
|
| 915 |
+
"text_level": 1,
|
| 916 |
+
"bbox": [
|
| 917 |
+
176,
|
| 918 |
+
734,
|
| 919 |
+
318,
|
| 920 |
+
751
|
| 921 |
+
],
|
| 922 |
+
"page_idx": 8
|
| 923 |
+
},
|
| 924 |
+
{
|
| 925 |
+
"type": "text",
|
| 926 |
+
"text": "We have shown in the paper that the confident-classifier almost always has OOD samples that produce high confidence outputs (in the contexts described earlier). We provided empirical evidence that favor using an explicit “reject” class instead. However, the ODD detection capabilities of a reject-classifier depend on the extent to which the generated OOD samples follow the low-density boundaries of in-distribution. We also propose a novel algorithm for generating “effective” OOD samples for training an $n + 1$ -class classifier for OOD detection and the results for most of the experiments on gray-scale datasets are consistently better for our approach in comparisons to other methods compared. For future research, we would like to investigate its effectiveness on non-grayscale datasets such as CIFAR and TinyImageNet. However we would like to point out that the nullspace calculation for colored images is computationally quite expensive, hence requires a larger compute (refer appendix E). ",
|
| 927 |
+
"bbox": [
|
| 928 |
+
174,
|
| 929 |
+
770,
|
| 930 |
+
825,
|
| 931 |
+
924
|
| 932 |
+
],
|
| 933 |
+
"page_idx": 8
|
| 934 |
+
},
|
| 935 |
+
{
|
| 936 |
+
"type": "text",
|
| 937 |
+
"text": "REFERENCES ",
|
| 938 |
+
"text_level": 1,
|
| 939 |
+
"bbox": [
|
| 940 |
+
176,
|
| 941 |
+
103,
|
| 942 |
+
287,
|
| 943 |
+
118
|
| 944 |
+
],
|
| 945 |
+
"page_idx": 9
|
| 946 |
+
},
|
| 947 |
+
{
|
| 948 |
+
"type": "text",
|
| 949 |
+
"text": "Yaroslav Bulatov. Notmnist dataset. Google (Books/OCR), Tech. Rep.[Online]. Available: http://yaroslavvb. blogspot. it/2011/09/notmnist-dataset. html, 2, 2011. ",
|
| 950 |
+
"bbox": [
|
| 951 |
+
174,
|
| 952 |
+
126,
|
| 953 |
+
820,
|
| 954 |
+
155
|
| 955 |
+
],
|
| 956 |
+
"page_idx": 9
|
| 957 |
+
},
|
| 958 |
+
{
|
| 959 |
+
"type": "text",
|
| 960 |
+
"text": "L Cayton. Algorithms for manifold learning. Technical Report CS2008-0923, UCSD., 2005. ",
|
| 961 |
+
"bbox": [
|
| 962 |
+
169,
|
| 963 |
+
162,
|
| 964 |
+
779,
|
| 965 |
+
179
|
| 966 |
+
],
|
| 967 |
+
"page_idx": 9
|
| 968 |
+
},
|
| 969 |
+
{
|
| 970 |
+
"type": "text",
|
| 971 |
+
"text": "Gregory Cohen, Saeed Afshar, Jonathan Tapson, and Andre van Schaik. Emnist: an extension of ´ mnist to handwritten letters. arXiv preprint arXiv:1702.05373, 2017. ",
|
| 972 |
+
"bbox": [
|
| 973 |
+
171,
|
| 974 |
+
188,
|
| 975 |
+
825,
|
| 976 |
+
217
|
| 977 |
+
],
|
| 978 |
+
"page_idx": 9
|
| 979 |
+
},
|
| 980 |
+
{
|
| 981 |
+
"type": "text",
|
| 982 |
+
"text": "Francesco Croce and Matthias Hein. A randomized gradient-free attack on relu networks. arXiv preprint arXiv:1811.11493, 2018. ",
|
| 983 |
+
"bbox": [
|
| 984 |
+
171,
|
| 985 |
+
227,
|
| 986 |
+
825,
|
| 987 |
+
256
|
| 988 |
+
],
|
| 989 |
+
"page_idx": 9
|
| 990 |
+
},
|
| 991 |
+
{
|
| 992 |
+
"type": "text",
|
| 993 |
+
"text": "Terrance DeVries and Graham W Taylor. Learning confidence for out-of-distribution detection in neural networks. arXiv preprint arXiv:1802.04865, 2018. ",
|
| 994 |
+
"bbox": [
|
| 995 |
+
169,
|
| 996 |
+
263,
|
| 997 |
+
825,
|
| 998 |
+
294
|
| 999 |
+
],
|
| 1000 |
+
"page_idx": 9
|
| 1001 |
+
},
|
| 1002 |
+
{
|
| 1003 |
+
"type": "text",
|
| 1004 |
+
"text": "Yarin Gal and Zoubin Ghahramani. Dropout as a bayesian approximation: Representing model uncertainty in deep learning. In international conference on machine learning, pp. 1050–1059, 2016. ",
|
| 1005 |
+
"bbox": [
|
| 1006 |
+
176,
|
| 1007 |
+
301,
|
| 1008 |
+
823,
|
| 1009 |
+
345
|
| 1010 |
+
],
|
| 1011 |
+
"page_idx": 9
|
| 1012 |
+
},
|
| 1013 |
+
{
|
| 1014 |
+
"type": "text",
|
| 1015 |
+
"text": "Yarin Gal, Riashat Islam, and Zoubin Ghahramani. Deep bayesian active learning with image data. CoRR, abs/1703.02910, 2017. ",
|
| 1016 |
+
"bbox": [
|
| 1017 |
+
173,
|
| 1018 |
+
354,
|
| 1019 |
+
823,
|
| 1020 |
+
383
|
| 1021 |
+
],
|
| 1022 |
+
"page_idx": 9
|
| 1023 |
+
},
|
| 1024 |
+
{
|
| 1025 |
+
"type": "text",
|
| 1026 |
+
"text": "Yonatan Geifman, Guy Uziel, and Ran El-Yaniv. Boosting uncertainty estimation for deep neural classifiers. CoRR, 2018. ",
|
| 1027 |
+
"bbox": [
|
| 1028 |
+
171,
|
| 1029 |
+
392,
|
| 1030 |
+
825,
|
| 1031 |
+
421
|
| 1032 |
+
],
|
| 1033 |
+
"page_idx": 9
|
| 1034 |
+
},
|
| 1035 |
+
{
|
| 1036 |
+
"type": "text",
|
| 1037 |
+
"text": "I. J. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, S. Ozair D. Warde-Farley, A. Courville, and Y. Bengio. Generative adversarial nets. In Advances in neural information processing systems (NIPS), 2014a. ",
|
| 1038 |
+
"bbox": [
|
| 1039 |
+
173,
|
| 1040 |
+
430,
|
| 1041 |
+
825,
|
| 1042 |
+
473
|
| 1043 |
+
],
|
| 1044 |
+
"page_idx": 9
|
| 1045 |
+
},
|
| 1046 |
+
{
|
| 1047 |
+
"type": "text",
|
| 1048 |
+
"text": "Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pp. 2672–2680, 2014b. ",
|
| 1049 |
+
"bbox": [
|
| 1050 |
+
173,
|
| 1051 |
+
482,
|
| 1052 |
+
825,
|
| 1053 |
+
526
|
| 1054 |
+
],
|
| 1055 |
+
"page_idx": 9
|
| 1056 |
+
},
|
| 1057 |
+
{
|
| 1058 |
+
"type": "text",
|
| 1059 |
+
"text": "C. Guo, G. Pleiss, Y. Sun, and K. Q. Weinberger. On calibration of modern neural. In International Conference on Machine Learning (ICML), 2017. ",
|
| 1060 |
+
"bbox": [
|
| 1061 |
+
173,
|
| 1062 |
+
534,
|
| 1063 |
+
823,
|
| 1064 |
+
564
|
| 1065 |
+
],
|
| 1066 |
+
"page_idx": 9
|
| 1067 |
+
},
|
| 1068 |
+
{
|
| 1069 |
+
"type": "text",
|
| 1070 |
+
"text": "M. Hein, M. Andriushchenko, and J. Bitterwolf. Why relu networks yield high-confidence predictions far away from the training data and how to mitigate the problem. arXiv preprint arXiv:1812.05720, 2019. ",
|
| 1071 |
+
"bbox": [
|
| 1072 |
+
173,
|
| 1073 |
+
571,
|
| 1074 |
+
825,
|
| 1075 |
+
616
|
| 1076 |
+
],
|
| 1077 |
+
"page_idx": 9
|
| 1078 |
+
},
|
| 1079 |
+
{
|
| 1080 |
+
"type": "text",
|
| 1081 |
+
"text": "Dan Hendrycks and Kevin Gimpel. A baseline for detecting misclassified and out-of-distribution. In International Conference on Learning Representations (ICLR), 2016. ",
|
| 1082 |
+
"bbox": [
|
| 1083 |
+
173,
|
| 1084 |
+
625,
|
| 1085 |
+
821,
|
| 1086 |
+
655
|
| 1087 |
+
],
|
| 1088 |
+
"page_idx": 9
|
| 1089 |
+
},
|
| 1090 |
+
{
|
| 1091 |
+
"type": "text",
|
| 1092 |
+
"text": "Dan Hendrycks, Mantas Mazeika, and Thomas Dietterich. Deep anomaly detection with outlier exposure. In International Conference on Learning Representations (ICLR), 2019. ",
|
| 1093 |
+
"bbox": [
|
| 1094 |
+
173,
|
| 1095 |
+
662,
|
| 1096 |
+
825,
|
| 1097 |
+
693
|
| 1098 |
+
],
|
| 1099 |
+
"page_idx": 9
|
| 1100 |
+
},
|
| 1101 |
+
{
|
| 1102 |
+
"type": "text",
|
| 1103 |
+
"text": "Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. ",
|
| 1104 |
+
"bbox": [
|
| 1105 |
+
173,
|
| 1106 |
+
700,
|
| 1107 |
+
825,
|
| 1108 |
+
731
|
| 1109 |
+
],
|
| 1110 |
+
"page_idx": 9
|
| 1111 |
+
},
|
| 1112 |
+
{
|
| 1113 |
+
"type": "text",
|
| 1114 |
+
"text": "Brenden M. Lake, Ruslan Salakhutdinov, and Joshua B. Tenenbaum. Human-level concept learning through probabilistic program induction. Science, 350(6266):1332–1338, 2015. URL https: //science.sciencemag.org/content/350/6266/1332. ",
|
| 1115 |
+
"bbox": [
|
| 1116 |
+
174,
|
| 1117 |
+
739,
|
| 1118 |
+
823,
|
| 1119 |
+
782
|
| 1120 |
+
],
|
| 1121 |
+
"page_idx": 9
|
| 1122 |
+
},
|
| 1123 |
+
{
|
| 1124 |
+
"type": "text",
|
| 1125 |
+
"text": "Kimin Lee, Honglak Lee, Kibok Lee, and Jinwoo Shin. Training confidence-calibrated classifiers for detecting out-of-distribution samples. International Conference on Learning Representations (ICLR), 2018a. ",
|
| 1126 |
+
"bbox": [
|
| 1127 |
+
174,
|
| 1128 |
+
790,
|
| 1129 |
+
823,
|
| 1130 |
+
833
|
| 1131 |
+
],
|
| 1132 |
+
"page_idx": 9
|
| 1133 |
+
},
|
| 1134 |
+
{
|
| 1135 |
+
"type": "text",
|
| 1136 |
+
"text": "Kimin Lee, Kibok Lee, Honglak Lee, and Jinwoo Shin. A simple unified framework for detecting out-of-distribution samples and adversarial attacks. arXiv preprint arXiv:1807.03888, 2018b. ",
|
| 1137 |
+
"bbox": [
|
| 1138 |
+
171,
|
| 1139 |
+
843,
|
| 1140 |
+
825,
|
| 1141 |
+
872
|
| 1142 |
+
],
|
| 1143 |
+
"page_idx": 9
|
| 1144 |
+
},
|
| 1145 |
+
{
|
| 1146 |
+
"type": "text",
|
| 1147 |
+
"text": "Shiyu Liang, Yixuan Li, and R. Srikant. Enhancing the reliability of out-of-distribution image detection in neural networks. In International Conference on Learning Representations (ICLR), 2018. ",
|
| 1148 |
+
"bbox": [
|
| 1149 |
+
176,
|
| 1150 |
+
881,
|
| 1151 |
+
825,
|
| 1152 |
+
922
|
| 1153 |
+
],
|
| 1154 |
+
"page_idx": 9
|
| 1155 |
+
},
|
| 1156 |
+
{
|
| 1157 |
+
"type": "text",
|
| 1158 |
+
"text": "Alireza Makhzani, Jonathon Shlens, Navdeep Jaitly, Ian Goodfellow, and Brendan Frey. Adversarial autoencoders. arXiv preprint arXiv:1511.05644, 2015. ",
|
| 1159 |
+
"bbox": [
|
| 1160 |
+
173,
|
| 1161 |
+
103,
|
| 1162 |
+
823,
|
| 1163 |
+
132
|
| 1164 |
+
],
|
| 1165 |
+
"page_idx": 10
|
| 1166 |
+
},
|
| 1167 |
+
{
|
| 1168 |
+
"type": "text",
|
| 1169 |
+
"text": "H Narayanan and S Mitter. Sample complexity of testing the manifold hypothesis. Advances in Neural Information Processing Systems, 2010. ",
|
| 1170 |
+
"bbox": [
|
| 1171 |
+
171,
|
| 1172 |
+
141,
|
| 1173 |
+
823,
|
| 1174 |
+
170
|
| 1175 |
+
],
|
| 1176 |
+
"page_idx": 10
|
| 1177 |
+
},
|
| 1178 |
+
{
|
| 1179 |
+
"type": "text",
|
| 1180 |
+
"text": "Anh Nguyen, Jason Yosinski, and Jeff Clune. Deep neural networks are easily fooled: High confidence predictions for unrecognizable images. In Computer Vision and Pattern Recognition (CVPR), 2015. ",
|
| 1181 |
+
"bbox": [
|
| 1182 |
+
174,
|
| 1183 |
+
179,
|
| 1184 |
+
823,
|
| 1185 |
+
222
|
| 1186 |
+
],
|
| 1187 |
+
"page_idx": 10
|
| 1188 |
+
},
|
| 1189 |
+
{
|
| 1190 |
+
"type": "text",
|
| 1191 |
+
"text": "S. Pidhorskyi, R. Almohsen, D. A. Adjeroh, and G. Doretto. Generative probabilistic novelty detection with adversarial autoencoders. In Advances in neural information processing systems (NeuRIPS), 2018. ",
|
| 1192 |
+
"bbox": [
|
| 1193 |
+
173,
|
| 1194 |
+
231,
|
| 1195 |
+
823,
|
| 1196 |
+
273
|
| 1197 |
+
],
|
| 1198 |
+
"page_idx": 10
|
| 1199 |
+
},
|
| 1200 |
+
{
|
| 1201 |
+
"type": "text",
|
| 1202 |
+
"text": "Jie Ren, Peter J. Liu, Emily Fertig, Jasper Snoek, Ryan Poplin, Mark A. DePristo, Joshua V. Dillon, and Balaji Lakshminarayanan. Likelihood ratios for out-of-distribution detection. arXiv preprint arXiv:1906.02845, 2019. ",
|
| 1203 |
+
"bbox": [
|
| 1204 |
+
173,
|
| 1205 |
+
282,
|
| 1206 |
+
826,
|
| 1207 |
+
325
|
| 1208 |
+
],
|
| 1209 |
+
"page_idx": 10
|
| 1210 |
+
},
|
| 1211 |
+
{
|
| 1212 |
+
"type": "text",
|
| 1213 |
+
"text": "Salah Rifai, Yann N, Dauphin, Pascal Vincent, Yoshua Bengio, and Xavier Muller. The manifold tangent classifier. Advances in Neural Information Processing Systems, 2011. ",
|
| 1214 |
+
"bbox": [
|
| 1215 |
+
173,
|
| 1216 |
+
334,
|
| 1217 |
+
823,
|
| 1218 |
+
364
|
| 1219 |
+
],
|
| 1220 |
+
"page_idx": 10
|
| 1221 |
+
},
|
| 1222 |
+
{
|
| 1223 |
+
"type": "text",
|
| 1224 |
+
"text": "R. Y. Rubinstein. Generating random vectors uniformly distributed inside and on the surface of different regions. European Journal of Operational Research, 1982. ",
|
| 1225 |
+
"bbox": [
|
| 1226 |
+
173,
|
| 1227 |
+
372,
|
| 1228 |
+
823,
|
| 1229 |
+
402
|
| 1230 |
+
],
|
| 1231 |
+
"page_idx": 10
|
| 1232 |
+
},
|
| 1233 |
+
{
|
| 1234 |
+
"type": "text",
|
| 1235 |
+
"text": "W. J. Scheirer, A. Rocha, A. Sapkota, and T. E. Boult. Towards open set recognition. IEEE transactions on pattern analysis and machine intelligence, 2012. ",
|
| 1236 |
+
"bbox": [
|
| 1237 |
+
174,
|
| 1238 |
+
410,
|
| 1239 |
+
823,
|
| 1240 |
+
440
|
| 1241 |
+
],
|
| 1242 |
+
"page_idx": 10
|
| 1243 |
+
},
|
| 1244 |
+
{
|
| 1245 |
+
"type": "text",
|
| 1246 |
+
"text": "G. Spigler. Denoising autoencoders for overgeneralization in neural networks. arXiv preprint arXiv:1709.04762, 2019. ",
|
| 1247 |
+
"bbox": [
|
| 1248 |
+
176,
|
| 1249 |
+
449,
|
| 1250 |
+
823,
|
| 1251 |
+
478
|
| 1252 |
+
],
|
| 1253 |
+
"page_idx": 10
|
| 1254 |
+
},
|
| 1255 |
+
{
|
| 1256 |
+
"type": "text",
|
| 1257 |
+
"text": "K. Sricharan and A. Srivastava. Building robust classifiers through generation of confident out of distribution examples. Third workshop on Bayesian Deep Learning (NeurIPS), 2018. ",
|
| 1258 |
+
"bbox": [
|
| 1259 |
+
173,
|
| 1260 |
+
487,
|
| 1261 |
+
823,
|
| 1262 |
+
516
|
| 1263 |
+
],
|
| 1264 |
+
"page_idx": 10
|
| 1265 |
+
},
|
| 1266 |
+
{
|
| 1267 |
+
"type": "text",
|
| 1268 |
+
"text": "W. Wang, A. Wang, A. Tamar, X. Chen, and P. Abbeel. Safer classification by synthesis. arXiv preprint arXiv:1711.08534, 2017. ",
|
| 1269 |
+
"bbox": [
|
| 1270 |
+
174,
|
| 1271 |
+
525,
|
| 1272 |
+
823,
|
| 1273 |
+
554
|
| 1274 |
+
],
|
| 1275 |
+
"page_idx": 10
|
| 1276 |
+
},
|
| 1277 |
+
{
|
| 1278 |
+
"type": "text",
|
| 1279 |
+
"text": "Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms, 2017. ",
|
| 1280 |
+
"bbox": [
|
| 1281 |
+
174,
|
| 1282 |
+
563,
|
| 1283 |
+
823,
|
| 1284 |
+
592
|
| 1285 |
+
],
|
| 1286 |
+
"page_idx": 10
|
| 1287 |
+
},
|
| 1288 |
+
{
|
| 1289 |
+
"type": "text",
|
| 1290 |
+
"text": "Matthew D Zeiler. Adadelta: an adaptive learning rate method. arXiv preprint arXiv:1212.5701, 2012. ",
|
| 1291 |
+
"bbox": [
|
| 1292 |
+
174,
|
| 1293 |
+
601,
|
| 1294 |
+
825,
|
| 1295 |
+
630
|
| 1296 |
+
],
|
| 1297 |
+
"page_idx": 10
|
| 1298 |
+
},
|
| 1299 |
+
{
|
| 1300 |
+
"type": "text",
|
| 1301 |
+
"text": "A APPENDIX ",
|
| 1302 |
+
"bbox": [
|
| 1303 |
+
176,
|
| 1304 |
+
656,
|
| 1305 |
+
299,
|
| 1306 |
+
672
|
| 1307 |
+
],
|
| 1308 |
+
"page_idx": 10
|
| 1309 |
+
},
|
| 1310 |
+
{
|
| 1311 |
+
"type": "text",
|
| 1312 |
+
"text": "B RELATED WORK ",
|
| 1313 |
+
"text_level": 1,
|
| 1314 |
+
"bbox": [
|
| 1315 |
+
176,
|
| 1316 |
+
689,
|
| 1317 |
+
348,
|
| 1318 |
+
707
|
| 1319 |
+
],
|
| 1320 |
+
"page_idx": 10
|
| 1321 |
+
},
|
| 1322 |
+
{
|
| 1323 |
+
"type": "text",
|
| 1324 |
+
"text": "There have been many approaches in the literature proposed to address the problem of OOD detection in the context of image data. Most of the successful ones are either generative ((Pidhorskyi et al., 2018; Wang et al., 2017; Ren et al., 2019)) or classifier-based approaches (Hendrycks & Gimpel, 2016; Hendrycks et al., 2019; DeVries & Taylor, 2018; Liang et al., 2018; Lee et al., 2018b). Generative approaches either explicitly or implicitly estimate the input density or use reconstruction error as a criterion to decide if input belongs to OOD. Classifier-based approaches, on the other hand, incorporate OOD detection as a part of the classifier network. The approach proposed in this paper belongs to the latter category. Therefore we limit our related work discussion to only classifier-based approaches. ",
|
| 1325 |
+
"bbox": [
|
| 1326 |
+
173,
|
| 1327 |
+
722,
|
| 1328 |
+
825,
|
| 1329 |
+
847
|
| 1330 |
+
],
|
| 1331 |
+
"page_idx": 10
|
| 1332 |
+
},
|
| 1333 |
+
{
|
| 1334 |
+
"type": "text",
|
| 1335 |
+
"text": "Typical discriminatively trained classifiers that model the conditional probability $P ( \\boldsymbol { y } | \\boldsymbol { x } )$ without any additional constraints, by definition can make reliable classification decisions only on indistribution data. For out-of-distribution data, the classifier output is arbitrary. Moreover, any meta information from the output of the classifier or the features learned are also conditioned on the data belonging to in-distribution. Therefore this information in-principle cannot be used to ascertain if the input is in or out of distribution. However, most of the recent approaches ((Hendrycks & Gimpel, 2016; Lee et al., 2018b; Liang et al., 2018; DeVries & Taylor, 2018))in the literature follow this approach. ",
|
| 1336 |
+
"bbox": [
|
| 1337 |
+
174,
|
| 1338 |
+
854,
|
| 1339 |
+
823,
|
| 1340 |
+
924
|
| 1341 |
+
],
|
| 1342 |
+
"page_idx": 10
|
| 1343 |
+
},
|
| 1344 |
+
{
|
| 1345 |
+
"type": "text",
|
| 1346 |
+
"text": "",
|
| 1347 |
+
"bbox": [
|
| 1348 |
+
174,
|
| 1349 |
+
103,
|
| 1350 |
+
823,
|
| 1351 |
+
145
|
| 1352 |
+
],
|
| 1353 |
+
"page_idx": 11
|
| 1354 |
+
},
|
| 1355 |
+
{
|
| 1356 |
+
"type": "text",
|
| 1357 |
+
"text": "Hendrycks & Gimpel (2016) propose a baseline approach to detect OOD inputs, called max-softmax by thresholding the maximum softmax output of a pre-trained classifier. Liang et al. (2018) improve upon this using temperature scaling (ODIN, (Guo et al., 2017)) and adding input perturbations. The assumptions is that these changes result in larger separation between in and out of distribution data in terms of their output predictions. Lee et al. (2018b) propose an approach based on the assumption that the class-conditional features of a softmax classifier follow a Gaussian distribution. Therefore, Mahalanobis distance (MD) from the mean of the Gaussian is used as a score to detect OOD. This is then combined with input perturbations similar to ODIN to enhance the OOD detection results. This method obtains state-of-the-art results on most of the baseline datasets used in OOD detection literature. Despite good results, the method can be seen as OOD detection on feature space rather than pixel space not conforming to the usual definition of OOD (By definition, the in-distribution, $p _ { i n } ( x )$ is defined for $x \\in \\mathbb { X }$ in pixel space, and hence OOD is also defined in the same space). Hence the effectiveness of the method highly depends on the features learned by the classifier, and also there is no guarantee that the optimization algorithm forces the features to follow a Gaussian distribution. Hendrycks et al. (2019) propose to train a classifier with a confidence loss where OOD data is sampled from a large natural dataset. Hein et al. (2019) also follow a similar approach using a confidence loss and uniformly generated random OOD samples from the input space. In addition, they not only minimize the confidence at the generated OOD samples, but also in the neighbourhood of those samples. However, because both these approaches use the confidence-loss, they suffer from the problems explained in this paper. Moreover, such approaches are only feasible for input spaces where it is possible to represent the support of OOD with finite samples (assuming uniform distribution over OOD space). This is not possible when the input space is $\\mathbb { R } ^ { d }$ , whereas the method proposed in this paper is still applicable. ",
|
| 1358 |
+
"bbox": [
|
| 1359 |
+
174,
|
| 1360 |
+
152,
|
| 1361 |
+
825,
|
| 1362 |
+
472
|
| 1363 |
+
],
|
| 1364 |
+
"page_idx": 11
|
| 1365 |
+
},
|
| 1366 |
+
{
|
| 1367 |
+
"type": "text",
|
| 1368 |
+
"text": "Geifman et al. (2018) propose to use Bayesian prediction uncertainties given by MC-Dropout (Gal & Ghahramani, 2016) for OOD detection. However, on the theoretical front, the Bayesian uncertainty measure only characterizes the uncertainty in in-distribution. Therefore in principle should not be applied to OOD detection. ",
|
| 1369 |
+
"bbox": [
|
| 1370 |
+
174,
|
| 1371 |
+
478,
|
| 1372 |
+
823,
|
| 1373 |
+
534
|
| 1374 |
+
],
|
| 1375 |
+
"page_idx": 11
|
| 1376 |
+
},
|
| 1377 |
+
{
|
| 1378 |
+
"type": "text",
|
| 1379 |
+
"text": "C TOY EXPERIMENT ON GENERAL OOD SAMPLES ",
|
| 1380 |
+
"text_level": 1,
|
| 1381 |
+
"bbox": [
|
| 1382 |
+
174,
|
| 1383 |
+
555,
|
| 1384 |
+
604,
|
| 1385 |
+
570
|
| 1386 |
+
],
|
| 1387 |
+
"page_idx": 11
|
| 1388 |
+
},
|
| 1389 |
+
{
|
| 1390 |
+
"type": "text",
|
| 1391 |
+
"text": "In this case, both train and test OOD samples are uniformly sampled from a 2D box $[ - 5 0 , 5 0 ] ^ { 2 }$ excluding the in-distribution regions. From Figure 6, we observe that both confidence loss and reject class based classifiers are able to distinguish in and out of distribution samples effectively. Therefore, there is no clear winner between the two. However as mentioned previously, such approaches are only feasible for input spaces where (approximately) representing the entire OOD region with a finite number of samples is possible. This is definitely not possible for example when the input space is $\\mathbb { R } ^ { d }$ . ",
|
| 1392 |
+
"bbox": [
|
| 1393 |
+
174,
|
| 1394 |
+
585,
|
| 1395 |
+
825,
|
| 1396 |
+
683
|
| 1397 |
+
],
|
| 1398 |
+
"page_idx": 11
|
| 1399 |
+
},
|
| 1400 |
+
{
|
| 1401 |
+
"type": "text",
|
| 1402 |
+
"text": "D GENERATING OOD SAMPLES USING A GAN VS OUR APPROACH",
|
| 1403 |
+
"text_level": 1,
|
| 1404 |
+
"bbox": [
|
| 1405 |
+
176,
|
| 1406 |
+
704,
|
| 1407 |
+
741,
|
| 1408 |
+
719
|
| 1409 |
+
],
|
| 1410 |
+
"page_idx": 11
|
| 1411 |
+
},
|
| 1412 |
+
{
|
| 1413 |
+
"type": "text",
|
| 1414 |
+
"text": "Lee et al. (2018a) propose to generate OOD samples in the low-density regions of in-distribution by optimizing a joint GAN-classifier loss, (1). With a toy experiment, they show that the generator indeed produces such samples and also these samples follow the “boundary” of the in-distribution data. However, in the experiment, they use a pre-trained classifier. The classifier is pre-trained to optimize the confidence loss on in-distribution and OOD samples sampled close to the in-distribution. Therefore the classifier already has the knowledge of those OOD samples. When GAN is then trained following the objective in (1), GAN likely generates those OOD samples close to the indistribution. But it is evident that this setting is not realistic as one cannot have a fully informative prior knowledge of those OOD samples if our objective is to generate them. ",
|
| 1415 |
+
"bbox": [
|
| 1416 |
+
174,
|
| 1417 |
+
734,
|
| 1418 |
+
825,
|
| 1419 |
+
861
|
| 1420 |
+
],
|
| 1421 |
+
"page_idx": 11
|
| 1422 |
+
},
|
| 1423 |
+
{
|
| 1424 |
+
"type": "text",
|
| 1425 |
+
"text": "Therefore, we experiment by directly optimizing (1) where the classifier is not pre-trained. The indistribution data for the experiment is obtained by sampling over the surface of a unit sphere from its diagonally opposite quadrants to form 2 classes respectively as shown in Figure 7. We find that (with much hyper-parameter tuning), even though GAN ends up producing OOD samples close to the in-distribution, it does an unsatisfactory job at producing samples that could follow the entire indistribution boundary. Moreover, there is less diversity in the generated samples which make them ineffective at improving the classifier performance in OOD detection. Our intuition is that the loss $\\left( 1 ( \\mathsf { b } ) { + } 1 ( \\mathsf { c } ) \\right)$ that forces the generator of the GAN to generate samples in the high entropy regions of the classifier doesn’t necessarily enforce it to produce samples that follow the entire in-distribution boundary. The inability of GANs to generate such samples for a simple 3D dataset indicates that it would be even more difficult in higher dimensions. ",
|
| 1426 |
+
"bbox": [
|
| 1427 |
+
174,
|
| 1428 |
+
867,
|
| 1429 |
+
823,
|
| 1430 |
+
924
|
| 1431 |
+
],
|
| 1432 |
+
"page_idx": 11
|
| 1433 |
+
},
|
| 1434 |
+
{
|
| 1435 |
+
"type": "image",
|
| 1436 |
+
"img_path": "images/088a1ae8da339526e5888cf19e03a0856e97fab85b2cabb242947cecc4970edf.jpg",
|
| 1437 |
+
"image_caption": [
|
| 1438 |
+
"Figure 6: Plots for general OOD samples experiments. (a) Training data in 2D. (b) Maximum prediction output on test data for a confident-classifier. (c) Classification output of a classifier with a “reject” class on test data. "
|
| 1439 |
+
],
|
| 1440 |
+
"image_footnote": [],
|
| 1441 |
+
"bbox": [
|
| 1442 |
+
173,
|
| 1443 |
+
99,
|
| 1444 |
+
826,
|
| 1445 |
+
275
|
| 1446 |
+
],
|
| 1447 |
+
"page_idx": 12
|
| 1448 |
+
},
|
| 1449 |
+
{
|
| 1450 |
+
"type": "image",
|
| 1451 |
+
"img_path": "images/83d7e02e1b3cfc8961d6813349d88718050af524935b972b34a3cc7d29959d53.jpg",
|
| 1452 |
+
"image_caption": [
|
| 1453 |
+
"Figure 7: Generated OOD samples using a joint training of a GAN and a confident-classifier. We observe that the generated OOD samples don’t cover the entire in-distribution boundary. "
|
| 1454 |
+
],
|
| 1455 |
+
"image_footnote": [],
|
| 1456 |
+
"bbox": [
|
| 1457 |
+
256,
|
| 1458 |
+
359,
|
| 1459 |
+
767,
|
| 1460 |
+
502
|
| 1461 |
+
],
|
| 1462 |
+
"page_idx": 12
|
| 1463 |
+
},
|
| 1464 |
+
{
|
| 1465 |
+
"type": "text",
|
| 1466 |
+
"text": "",
|
| 1467 |
+
"bbox": [
|
| 1468 |
+
174,
|
| 1469 |
+
569,
|
| 1470 |
+
825,
|
| 1471 |
+
667
|
| 1472 |
+
],
|
| 1473 |
+
"page_idx": 12
|
| 1474 |
+
},
|
| 1475 |
+
{
|
| 1476 |
+
"type": "text",
|
| 1477 |
+
"text": "In comparison to the GAN based boundary OOD generation, our approach as visually apparent from Figure 8 produces samples that cover the in-distribution boundary quite effectively. While it is difficult to visualize how well the off-manifold OOD samples cover the boundary, one can imagine them having a good coverage on the off-manifold boundary as they are obtained by perturbing each training sample in the direction given by the null-spaces. Hence the diversity of the OOD samples is ensured. For on-manifold boundary OOD samples, as evident from Figure 8c, it forms a closed boundary around the in-distribution points. ",
|
| 1478 |
+
"bbox": [
|
| 1479 |
+
174,
|
| 1480 |
+
674,
|
| 1481 |
+
825,
|
| 1482 |
+
772
|
| 1483 |
+
],
|
| 1484 |
+
"page_idx": 12
|
| 1485 |
+
},
|
| 1486 |
+
{
|
| 1487 |
+
"type": "text",
|
| 1488 |
+
"text": "E DISCUSSION ON SAMPLE GENERATION COMPLEXITY ",
|
| 1489 |
+
"text_level": 1,
|
| 1490 |
+
"bbox": [
|
| 1491 |
+
176,
|
| 1492 |
+
795,
|
| 1493 |
+
642,
|
| 1494 |
+
810
|
| 1495 |
+
],
|
| 1496 |
+
"page_idx": 12
|
| 1497 |
+
},
|
| 1498 |
+
{
|
| 1499 |
+
"type": "text",
|
| 1500 |
+
"text": "For generating OOD samples outside the manifold, we randomly sample from the left-null-space of the Jacobian as described earlier. But the complexity of this step depends on the number of basis vectors in the null-space and its dimensions. For the MNIST case, with the input dimensions $2 8 \\times 2 8$ and latent dimension of 8, there are 776 basis vectors in the left-nullspace, each of dimension 784 (i.e., $2 8 \\times 2 8$ ). For colored images such as CIFAR and TinyImagenet, the number of basis vectors are almost 3 times of that for gray-scaled images. To cover the in-distribution boundary effectively in all directions, many OOD samples for each in-distribution training sample are to be generated by taking random linear combinations of the basis vectors, which is quite expensive. This gives a quantitative measure of effective OOD sample complexity. However, we find that only a few OOD samples are sufficient to guide the decision boundary of the classifier to be bounded around the in-distribution regions evidenced by their OOD detection results. ",
|
| 1501 |
+
"bbox": [
|
| 1502 |
+
174,
|
| 1503 |
+
825,
|
| 1504 |
+
825,
|
| 1505 |
+
924
|
| 1506 |
+
],
|
| 1507 |
+
"page_idx": 12
|
| 1508 |
+
},
|
| 1509 |
+
{
|
| 1510 |
+
"type": "text",
|
| 1511 |
+
"text": "",
|
| 1512 |
+
"bbox": [
|
| 1513 |
+
174,
|
| 1514 |
+
103,
|
| 1515 |
+
825,
|
| 1516 |
+
159
|
| 1517 |
+
],
|
| 1518 |
+
"page_idx": 13
|
| 1519 |
+
},
|
| 1520 |
+
{
|
| 1521 |
+
"type": "image",
|
| 1522 |
+
"img_path": "images/a388860e721a5a3ca6ff7cde4c4ed10db7765d3f28a13ccd81f8f5e45216672c.jpg",
|
| 1523 |
+
"image_caption": [
|
| 1524 |
+
"Figure 8: Generated boundary OOD samples using our approach. (a) 3d plot of in-distribution data with out-of-manifold boundary OOD samples. (b) 3d plot of in-distribution data with on-manifold boundary OOD samples. (c) 2d projection of in-distribution data with on-manifold boundary samples to show that they cover the in-distribution boundary on the manifold. "
|
| 1525 |
+
],
|
| 1526 |
+
"image_footnote": [],
|
| 1527 |
+
"bbox": [
|
| 1528 |
+
215,
|
| 1529 |
+
202,
|
| 1530 |
+
805,
|
| 1531 |
+
364
|
| 1532 |
+
],
|
| 1533 |
+
"page_idx": 13
|
| 1534 |
+
},
|
| 1535 |
+
{
|
| 1536 |
+
"type": "text",
|
| 1537 |
+
"text": "F EXPERIMENTAL ARCHITECTURE ",
|
| 1538 |
+
"text_level": 1,
|
| 1539 |
+
"bbox": [
|
| 1540 |
+
174,
|
| 1541 |
+
487,
|
| 1542 |
+
477,
|
| 1543 |
+
502
|
| 1544 |
+
],
|
| 1545 |
+
"page_idx": 13
|
| 1546 |
+
},
|
| 1547 |
+
{
|
| 1548 |
+
"type": "text",
|
| 1549 |
+
"text": "The encoder and the decoder parts of the CVAE architecture, and the classifier used are described in Figure 9a, 9b and ${ 9 \\mathrm { c } }$ respectively. The latent dimension $( d )$ is chosen per dataset. For MNIST, $d = 8$ and for Fashion MNIST, $d = 1 0$ . The number of features after the convolutions in the encoder is represented by $f$ . “cond $\\mathbf { \\nabla } _ { \\mathbf { X } } \\mathbf { \\vec { \\Omega } } ^ { \\mathbf { { \\nabla } } }$ is the one hot representation of class labels. $k$ in the classifier architecture represents the number of classes in the training data. ",
|
| 1550 |
+
"bbox": [
|
| 1551 |
+
173,
|
| 1552 |
+
525,
|
| 1553 |
+
825,
|
| 1554 |
+
595
|
| 1555 |
+
],
|
| 1556 |
+
"page_idx": 13
|
| 1557 |
+
},
|
| 1558 |
+
{
|
| 1559 |
+
"type": "text",
|
| 1560 |
+
"text": "G METRICS DEFINITIONS ",
|
| 1561 |
+
"text_level": 1,
|
| 1562 |
+
"bbox": [
|
| 1563 |
+
176,
|
| 1564 |
+
628,
|
| 1565 |
+
403,
|
| 1566 |
+
645
|
| 1567 |
+
],
|
| 1568 |
+
"page_idx": 13
|
| 1569 |
+
},
|
| 1570 |
+
{
|
| 1571 |
+
"type": "text",
|
| 1572 |
+
"text": "The definitions of metrics used to evaluate OOD detection are as follows. ",
|
| 1573 |
+
"bbox": [
|
| 1574 |
+
174,
|
| 1575 |
+
667,
|
| 1576 |
+
651,
|
| 1577 |
+
683
|
| 1578 |
+
],
|
| 1579 |
+
"page_idx": 13
|
| 1580 |
+
},
|
| 1581 |
+
{
|
| 1582 |
+
"type": "text",
|
| 1583 |
+
"text": "FPR at $95 \\%$ TPR is the probability of an OOD input being misclassified as in-distribution when $9 5 \\%$ of in-distribution samples are correctly classified as in-distribution (i.e, the true positive rate (TPR) is at $9 5 \\%$ ). True positive rate is calculated as, $\\begin{array} { r } { T P R = \\frac { T P } { T P + F N } } \\end{array}$ , where TP and FN denote the true positives and false negatives, respectively. The false positive rate (FPR) is computed as $\\begin{array} { r } { F P R = \\frac { F P } { F P + T N } } \\end{array}$ , where FP and TN denote the false positives and true negatives, respectively. ",
|
| 1584 |
+
"bbox": [
|
| 1585 |
+
174,
|
| 1586 |
+
689,
|
| 1587 |
+
825,
|
| 1588 |
+
762
|
| 1589 |
+
],
|
| 1590 |
+
"page_idx": 13
|
| 1591 |
+
},
|
| 1592 |
+
{
|
| 1593 |
+
"type": "text",
|
| 1594 |
+
"text": "Detection error is the minimum mis-classification probability over all possible thresholds over the OOD score. We assume that the test set contains equal number of in and out of distribution samples. ",
|
| 1595 |
+
"bbox": [
|
| 1596 |
+
174,
|
| 1597 |
+
770,
|
| 1598 |
+
821,
|
| 1599 |
+
797
|
| 1600 |
+
],
|
| 1601 |
+
"page_idx": 13
|
| 1602 |
+
},
|
| 1603 |
+
{
|
| 1604 |
+
"type": "text",
|
| 1605 |
+
"text": "AUROC is the area under the receiver operating characteristic curve, which is a threshold independent metric. ROC curve is a plot of TPR versus FPR. AUROC can be interpreted as the probability that a positive example is assigned a higher detection score than a negative example. For a perfect detector, AUROC is $100 \\%$ . ",
|
| 1606 |
+
"bbox": [
|
| 1607 |
+
174,
|
| 1608 |
+
804,
|
| 1609 |
+
825,
|
| 1610 |
+
861
|
| 1611 |
+
],
|
| 1612 |
+
"page_idx": 13
|
| 1613 |
+
},
|
| 1614 |
+
{
|
| 1615 |
+
"type": "text",
|
| 1616 |
+
"text": "AUPR is the Area under the Precision-Recall (PR) curve. PR curve is a plot of precision $T P =$ $( T P + F P ) \\rangle$ versus recall $( T P = ( T P + F N ) )$ . The metric AUPR-In and AUPR-Out represent the area under the PR curve depending on if in or out of distribution data are specified as positives, respectively. ",
|
| 1617 |
+
"bbox": [
|
| 1618 |
+
174,
|
| 1619 |
+
867,
|
| 1620 |
+
823,
|
| 1621 |
+
924
|
| 1622 |
+
],
|
| 1623 |
+
"page_idx": 13
|
| 1624 |
+
},
|
| 1625 |
+
{
|
| 1626 |
+
"type": "image",
|
| 1627 |
+
"img_path": "images/b2143eea6adcb6073eff29c47e53cb174a51e337198e97ffe586e957b331f527.jpg",
|
| 1628 |
+
"image_caption": [],
|
| 1629 |
+
"image_footnote": [],
|
| 1630 |
+
"bbox": [
|
| 1631 |
+
187,
|
| 1632 |
+
89,
|
| 1633 |
+
805,
|
| 1634 |
+
628
|
| 1635 |
+
],
|
| 1636 |
+
"page_idx": 14
|
| 1637 |
+
},
|
| 1638 |
+
{
|
| 1639 |
+
"type": "text",
|
| 1640 |
+
"text": "H MORE RESULTS ",
|
| 1641 |
+
"text_level": 1,
|
| 1642 |
+
"bbox": [
|
| 1643 |
+
174,
|
| 1644 |
+
642,
|
| 1645 |
+
344,
|
| 1646 |
+
659
|
| 1647 |
+
],
|
| 1648 |
+
"page_idx": 14
|
| 1649 |
+
},
|
| 1650 |
+
{
|
| 1651 |
+
"type": "text",
|
| 1652 |
+
"text": "We report the OOD detection results for OOD detection methods based on softmax-score (Hendrycks & Gimpel (2016)), uncertainty of classifier obtained via MC-dropout (Gal & Ghahramani (2016)), and mutual information between predictions and model posterior (Gal et al. (2017)). The results are shown in Table 2. ",
|
| 1653 |
+
"bbox": [
|
| 1654 |
+
173,
|
| 1655 |
+
674,
|
| 1656 |
+
825,
|
| 1657 |
+
731
|
| 1658 |
+
],
|
| 1659 |
+
"page_idx": 14
|
| 1660 |
+
},
|
| 1661 |
+
{
|
| 1662 |
+
"type": "table",
|
| 1663 |
+
"img_path": "images/a07c88c6be7643db53b3498369391fc909cbe4fd63381923e7129da25410db1a.jpg",
|
| 1664 |
+
"table_caption": [
|
| 1665 |
+
"Table 2: Results "
|
| 1666 |
+
],
|
| 1667 |
+
"table_footnote": [],
|
| 1668 |
+
"table_body": "<table><tr><td rowspan=\"2\">ID Model</td><td rowspan=\"2\">OOD</td><td>FPR at 95% TPR↓</td><td>Detection Error↓</td><td>AUROC↑</td><td>AUPR Out↑</td><td>AUPR In↑</td></tr><tr><td colspan=\"5\">Softmax/MC-Dropout/Mutual-Info</td></tr><tr><td rowspan=\"7\">MNIST</td><td>F-MNIST</td><td>1.61/2.1/54.3</td><td>3.3/3.5/14.5</td><td>99.5/99.4/90.8</td><td>99.5/99.5/91.5</td><td>99.5/99.4/86.2</td></tr><tr><td>EMNIST-letters</td><td>28.0/24.5/22.0</td><td>12.6/11.2/11.1</td><td>93.6/94.6/95.0</td><td>93.4/94.4/94.7</td><td>93.0/94.1/94.7</td></tr><tr><td>NotMNIST</td><td>13.1/12.5/22.1</td><td>7.1/6.7/9.1</td><td>97.4/97.6/95.5</td><td>97.8/97.9/96.0</td><td>97.0/97.1/94.0</td></tr><tr><td>Omniglot</td><td>0.0/0.0/92.8</td><td>0.5/0.6/19.5</td><td>100.0/100.0/84.5</td><td>100.0/100.0/88.7</td><td>100.0/100.0/73.9</td></tr><tr><td>Gaussian-Noise</td><td>0.0/0.0/100.0</td><td>0.0/0.0/49.3</td><td>100.0/100.0/17.2</td><td>100.0/100.0/37.7</td><td>100.0/100.0/34.0</td></tr><tr><td>Uniform-Noise</td><td>0.0/0.0/100.0</td><td>0.0/0.0/43.8</td><td>100.0/100.0/45.2</td><td>100.0/100.0/56.4</td><td>100.0/100.0/42.9</td></tr><tr><td>Sphere-OOD</td><td>0.8/1.3/7.6</td><td>2.6/3.1/4.2</td><td>99.3/99.2/97.3</td><td>99.5/99.4/99.3</td><td>99.1/99.0/93.1</td></tr><tr><td rowspan=\"7\">F-MNIST</td><td>MNIST</td><td>84.5/68.9/19.4</td><td>34.5/25.0/11.9</td><td>70.6/82.2/93.5</td><td>70.9/83.0/91.3</td><td>68.2/80.3/94.9</td></tr><tr><td>EMNIST-letters</td><td>88.1/77.8/37.6</td><td>41.1/33.1/21.1</td><td>62.3/73.4/84.2/</td><td>62.3/73.2/79.6</td><td>61.3/72.2/87.9</td></tr><tr><td>NotMNIST</td><td>83.1/67.0/24.2</td><td>35.2/25.1/14.3</td><td>68.9/81.7/91.7</td><td>66.4/80.3/87.6</td><td>68.6/80.8/93.6</td></tr><tr><td>Omniglot</td><td>39.0/32.5/26.8</td><td>17.1/14.8/10.4</td><td>91.4/93.5/95.2</td><td>91.4/93.7/95.6</td><td>91.8/95.5/93.1</td></tr><tr><td>Gaussian-Noise</td><td>99.1/98.5/72.2</td><td>17.5/15.8/9.6</td><td>80.0/82.1/92.5</td><td>87.8/89.1/95.3</td><td>65.5/67.9/83.4</td></tr><tr><td>Uniform-Noise</td><td>96.9/96.5/48.8</td><td>29.4/24.2/16.8</td><td>70.1/76.8/90.9</td><td>78.6/84.0/92.5</td><td>58.11/64.8/87.9</td></tr><tr><td>Sphere-OOD</td><td>97.2/71.2/1.8</td><td>50.0/17.0/2.5</td><td>48.4/88.2/99.6</td><td>50.6/91.4/99.5</td><td>47.7/82.4/99.6</td></tr><tr><td rowspan=\"8\">MNIST0-4</td><td>MNIST5-9</td><td>18.2/15.7/15.3</td><td>10.6/9.7/9.9</td><td>94.2/94.8/94.5</td><td>93.0/93.1/92.8</td><td>94.8/95.4/95.1</td></tr><tr><td>F-MNIST</td><td>3.1/4.4/8.8</td><td>4.0/4.6/5.9</td><td>99.0/98.8.97.8</td><td>99.2/99.0/98.4</td><td>98.7/98.4/96.6</td></tr><tr><td>EMNIST-LETTERS</td><td>25.3/21.6/21.4</td><td>12.8/12.2/12.2</td><td>92.8/93.5/93.4</td><td>90.6/91.6/91.3</td><td>93.3/93.9/94.1</td></tr><tr><td>NotMNIST</td><td>21.4/16.2/15.9</td><td>10.44/9.3/9.4</td><td>95.5/96.4/96.5</td><td>95.5/96.4/96.1</td><td>95.0/95.9/96.4</td></tr><tr><td>Omniglot</td><td>0.2/0.1/0.5</td><td>1.7/1.9/2.4</td><td>99.4/99.4/99.2</td><td>99.6/99.6/99.4</td><td>98.9/99.0/98.8</td></tr><tr><td>Gaussian-Noise</td><td>0.0/0.0/0.0</td><td>0.3/0.4/1.0</td><td>99.7/99.7/98.8</td><td>99.8.99.8/99.4</td><td>98.9/98.9/95.8</td></tr><tr><td>Uniform-Noise</td><td>0.0/0.0/0.0</td><td>0.6/0.9/2.2</td><td>99.7/99.6/98.3</td><td>99.8/99.8/99.0</td><td>99.1/99.0/95.2</td></tr><tr><td>Sphere-OOD</td><td>1.0/1.9/2.5</td><td>2.8/3.4/3.6</td><td>99.2/99.0/98.6</td><td>99.4/99.3/99.1</td><td>98.6/98.5/97.5</td></tr><tr><td rowspan=\"8\">F-MNIST0-4</td><td>F-MNIST5-9</td><td>73.5/67.1/32.8</td><td>26.1/23.4/17.3</td><td>80.1/83.4/89.8</td><td>80.4/83.3/87.6</td><td>78.1/82.0/91.2</td></tr><tr><td>MNIST</td><td>44.9/43.9/73.9</td><td>15.9/16.0/16.9</td><td>91.0/91.4/87.7</td><td>91.2/91.3/89.5</td><td>90.4/90.5/82.3</td></tr><tr><td>EMNIST-letters</td><td>69.8/66.6/43.1</td><td>26.7/25.4/20.5</td><td>80.4/82.2/87.4</td><td>81.1/82.8/86.5</td><td>79.6/81.5/97.9</td></tr><tr><td>NotMNIST</td><td>71.9/67.0/38.6</td><td>24.3/20.8/17.0</td><td>82.8.86.1/90.8</td><td>84.3/87.7/90.4</td><td>80.2/83.4/91.0</td></tr><tr><td>Omniglot</td><td>44.8/41.3/29.6</td><td>15.3/14.0/11.5</td><td>91.6/93.0/94.7</td><td>92.1/93.8/94.9</td><td>91.0/92.2/93.9</td></tr><tr><td>Gaussian-Noise</td><td>0.3/0.5/98.3</td><td>2.3/2.3/12.2</td><td>99.8/99.7/87.3</td><td>99.8/99.8.92.4</td><td>99.7/99.7.74.2</td></tr><tr><td>Uniform-Noise</td><td>27.7/20.5/8.4</td><td>8.6/7.9/5.3</td><td>96.4/97.2/98.0</td><td>97.2/97.8/98.6</td><td>95.5/96.5/96.6</td></tr><tr><td>Sphere-OOD</td><td>86.5/67.3/10.7</td><td>33.7/20.4/7.8</td><td>71.6/86.2/97.3</td><td>73.4/88.0/96.7</td><td>67.3/83.0/97.8</td></tr></table>",
|
| 1669 |
+
"bbox": [
|
| 1670 |
+
133,
|
| 1671 |
+
338,
|
| 1672 |
+
795,
|
| 1673 |
+
710
|
| 1674 |
+
],
|
| 1675 |
+
"page_idx": 15
|
| 1676 |
+
}
|
| 1677 |
+
]
|
parse/train/rJeIGkBKPS/rJeIGkBKPS_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/rJeIGkBKPS/rJeIGkBKPS_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|